Manuscript Offprint
arXiv:2610.25075MoCKEFA: Model-Conditioned Keyframe Extraction and Fair Attribution for Video Model Explanation
Abstract
We show that a video can be represented with just a few keyframes without sacrificing a given model's belief about the video. Our method is the first in it's kind that extracts these keyframes conditioned on the model's prediction which is massively helpful for building explainable video models. We then fairly distribute the importance of the video to the model among the keyframes with game theoretically fair Shapley values. Through qualitative and quantitative experiments, we show that keyframe attribution is superior to the traditional frame attribution. Further we conduct preliminary exploration on highlighting the important changes among the frames by looking at the differences between adjacent keyframes.
1. Introduction
Temporal attribution quantifies each frame’s influence on a video model’s decision. However, some adjacent frames are highly correlated [11][26] and some are noisy making per-frame analysis redundant and difficult to interpret. Our algorithm asks the model itself; not any external entity “which frames are actually important for your decision?”. The answer to this lets us represent the whole video with a few keyframes that the model values. Then we judge the relative importance of these keyframes by “fairly” distributing the total importance of the video among the keyframes. This shift not only enhances interpretability but also significantly reduces computational overhead.
Any method that interprets a model’s decision must not significantly alter the very decision that we are trying to explain. Also, they must not utilize any reference other than the model itself to derive the explanations [18]. Current keyframe extraction methods [7] [10] [42] are designed to enhance (hence change) the model decision. Some methods use an external model to find the keyframes [7]. Such traits make existing methods of keyframe extraction un-

Figure 1. MoCKEFA framework. Keyframe extraction: model selects keyframes that are important for model's decision. Continuous temporal regions can be represented with just a selected keyframe with minimal change to the model belief. Fair attribution: Shapley values are calculated for each keyframe that gives game-theoretically "fair" attributions
suitable for explaining model decision. We introduce the first Model Conditioned Keyframe Extraction and Fair Attribution (MoCKEFA), an algorithm that coalesces a video stream into cohesive groups sharing a common core characteristic that is essential for the model decision, and extracts a representative keyframe from each group (Figure 1). Crucially, repeating this keyframe in place of the full group does not significantly alter the model's belief, revealing that intra-group changes are largely inconsequential to the decision. Instead, only transitions between keyframes carry meaningful temporal information. This refined understanding of temporal attribution promises to be critical in domains such as medical AI and autonomous driving [23].
Keyframe attribution can be framed as a cooperative game-theoretic problem, where n players jointly contribute to a total payoff. The central question, then, is how to define a fair distribution of this value. Lloyd Shapley [30] addressed this by proposing four axioms that any fair allocation must satisfy (see Section 2); their intuitive appeal has made them the de facto standard for fairness. Shapley further proved that the Shapley value is the unique solution satisfying these axioms, and it has since been widely adopted to compute individual payoffs in n-player games. In computer vision, this framework has been readily adapted—notably, Play Fair [27] employed Shapley values for video frame attribution. Following this lead, we treat each keyframe as a player, with the model's prediction serving as the total payoff.
In frame-wise Shapley attribution such as in Play Fair [27], mutually redundant frames receive nearly equal payoffs—but these payoffs reflect only the unique information each frame contributes relative to others, not any intrinsic value embedded within the frame itself. Consequently, per-frame payoffs alone cannot reliably reveal the true importance of each core characteristic (main distinct concepts in the video). By assigning attribution at the keyframe level, we obtain a far more interpretable representation. Consider Figure 2, where the video is partitioned into three visually coherent shots. Plot G (keyframe-wise) and Plot F (frame-wise) tell contrasting stories: while most frames within a group receive similar frame-level scores, the human mind more naturally grasps the per-keyframe, per-core-characteristic assignment of attribution in plot G. Beyond interpretability, keyframes also offers a practical computational advantage—exact Shapley values require -players model evaluations, so reducing the number of players dramatically lowers cost. That said, Figure 2 reveals a subtle limitation: the last frame of the first group and the last two frames of the second group receive above-average attribution, as they lie near the boundary of the next group—which has higher average attribution. This suggests that MoCKEFA by discretizing a continuous physical process, introduces a mild approximation. Nevertheless, we find this approximation sufficiently accurate for our analysis, and in Section 5 we show that finer groupings can arbitrarily approximate the original video.
In general, video understanding models cannot process variable video lengths. A problem arise when we have to remove certain frames in the video to estimate keyframe attributions. Play Fair [27] creates a new multi-scale model that can process variable lengths. But if we calculate attribution with such a secondary model we are actually estimating the attribution given by this new model, not the original model. On the other hand our attribution method does not require any modifications to the model and will work on any model architecture. We show that temporal freezing can be used to significantly reduce the burden of evaluating on a background set required by Shapley value calculation. Temporal freezing also gives more intuitive and quantitatively better results than other filling methods such as all zero values and sampling from a distribution of other videos.
Our contributions to video temporal attribution:
• We introduce the first model conditioned keyframe extraction algorithm suitable for explaining video models that can 1) Use the model output to group adjacent frames of a video into several shots. 2) Extract a keyframe from each shot that can represent the information contained in each shot that is valuable to the model decision.
• Show that temporal freezing is more intuitive and qualitatively better than other methods to fill in missing frames for temporal attribution in videos.
• Show that Sahpley-based keyframe attributions makes more intuitive sense and easy to interpret than other frame-wise attribution baselines.
Filling missing frames A common way to evaluate the importance of a feature is to evaluate the model on situations where the feature is absent. The feature must often be replaced with a neutral. The neutral value must not leak any information about the removed features to the model while not significantly changing the input distribution. So the choice of the neutral value is non-trivial. Researchers commonly use a constant value, noise and Gaussian blur as ways to fill in the missing parts of the image [9] [37] [37]. Pixels of constant colors are commonly used [28] [46] but might create out-of-distribution samples [37]. Replacing the missing values of data with sampled values from a background dataset has been a standard method specially in the Shapley value literature [36] [18] [28]. Although this make sense for some less complex data modalities it will create out-of-distribution samples in highly complex data modalities such as video [38]. Temporal freezing has been used to fill in removed video frames [21] [15].
Feature attributions Several feature attribution methods have been used for machine learning. Guided backpropagation [39] and GradCAM relies on the model gradients [29]. Integrated Gradients [38] has some favorable theoretical guerentees. LIME [28], DeepLIFT tries to avoid some problems inherent to earlier methods [32] [31]. Occlusion Sensitivity Analysis (OSA) masks certain regions in the input to see if those areas are important for the model [46]. Video attribution is more complicated than images be-

Figure 2. Comparison of frame-wise (F) and group-wise (G) attribution. Keyframes have a red dot on the top. The three moments represent three stages of the bending of the left leg of the person.
cause of the spacio temporal relationships between various sections of the input video [17]. Some examples are as follows. GradCAM++ [4], Saliency tube [35] [47], SWAG-V [14] [13], STEP [17] [8], Adaptive occlusion analysis for video [40]. Play Fair worked on the rarely studies topic of video frame attribution [27]. Shapley values are considered the gold standard in feature attributions because they are the only formulation that satisfy the following axioms. Efficiency: The individual payoffs of each player must add up to the total value. Symmetry: If two players contribute equally under all possible coalitions, their payoffs must be equal. Dummy: If a player does not change the total value under any coalition, it should have zero payoff. Additivity: If we create a new game with combined payouts of two other games, the payoff of each player must add up [30] [18] [45]. The exact calculation of Shapley values is very computationally heavy and requires number of model evaluations for number of features. There are methods that can be used to approximate Shapley values with less computational requirements. For example, Kernel SHAP [18]. Shapley sampling values [24]. Partition SHAP creates a hierarchy of features and calculates the Shapley values along this hierarchical tree. This both allows for inter feature correlations to be accounted and for faster computation [44] [22] [25]. The hierarchical structure can be manually defined and hence allows us to define in a way that considers the temporal and sequential nature of video data. Play Fair [27] applies Shapley values to solve the video frame attribution.
3. Model Conditioned Keyframe Extraction
As adjacent frames of a video are often highly redundant, we can represent many sets of adjacent frames with just a single keyframe extracted from the same set. We introduce model conditioned keyframe extraction, which partitions a video into groups with the same core characteristic guided by the model and extracts a single representative keyframe from each group. Let's represent a video as an ordered sequence of frames as . Let the video be partitioned into groups . Each group contains one or more adjacent frames where and are the start and end frame indices. Each group has a representative keyframe that can be used to represent the whole group. The resulting distilled video is the ordered sequence which contains the set of keyframes . An example of video distillation is shown in Figure 3.
In a related work, Huang et al [15] ordered the frames according to their predicted class logit response. The top n best frames were repeated (temporal freezing) to create a video of full length. They observed a significant drop in performance. The problem with this method is that the selected n frames might contain very similar information and the collection of frames is not necessarily better than using just one frame. In contrast our method can select keyframes that have independent value to the model.
The algorithm: Consider frames 1 and 2. Find best frame from to replace both the frames (which choice degrades the model belief the least). This frame is the current keyframe . Consider frame 3. Find the best frame from to replace frames 1, 2 and 3. Update . Keep doing this until the model belief degrades more than the threshold. When that happens finish distilling group 1 and repeat the above process starting with the next frame that does not already belong to a group to find the next group.
Important changes in the video: A keyframe alone can represent a group of frames means all the changes that the model value are located between adjacent groups. Changes withing the same group are insignificant to the model. We can estimate the relative importance of each of these changes in future work.
Why independent grouping? According to the Algorithm 1, when creating a new group we start with a fresh video with no distillation. When creating group 2, we do not use the video with group 1 already distilled (all the frames in the group 1 replaced with the keyframe). This is because we need to check how the model belief change when we form the group 2 independent of group 1. If we start with group 1 already distilled, the group 2 we find will be conditioned on group 1. We want all the groups to capture the similar regions of the video in an equal quality and strength. But this independent grouping creates a secondary problem. We cannot directly control the quality of the distilled video. We can only measure the final quality of the distilled video once all the groups are being found and distilled. We show that we can control the final quality of the grouped video by changing the grouping threshold. Higher threshold results in coarse groups where the video will be represented by only a few groups. While the brevity of the representation will increase, the potential for the video to deviate

Figure 3. Example of a distilled video. Frames 0 to 4 can be represented just by the frame 0. Frames 5, 6 and 7 are groups with just one frame. Frame from 8 to 15 can be represented with just the frame 14. Temporal Freezing can be used to create the new video with the original length. Check Sec 5.2 for metric definitions
Algorithm 1 Model-guided keyframe extraction algorithm. [i,j]: all elements from i to j including both
Require: Video vid, Threshold THR, model model
1: function BEST_FRAME(vid, [grp], i, j) 2: v = COPY(vid) 3: v[grp + i] = v[j] 4: \Delta_{mj} = \text{MARGIN_CHANGE}(model, v) 5: v = COPY(vid) 6: v[grp + j] = v[i] 7: \Delta_{mi} = \text{MARGIN_CHANGE}(model, v) 8: return (i, ) or (j, ) with min 9: end function
10: function EXTRACT_KEYPOINTS(vid, THR) ▷ Main 11: T = number of frames in vid 12: i = 0, d = {} 13: while i < T do 14: i*, \Delta_{mi*} = \text{BEST_FRAME}(vid, [], i, i + 1) 15: j = i + 1 16: while 17: j = j + 1 18: i*, \Delta_{mi*} = \text{BEST_FRAME}(vid, [i, j - 1], i*, j) 19: end while 20: Append group: (i*, [1, j]) → d 21: i ← j + 1 22: end while 23: return d 24: end function
from the original one is higher. Lower threshold will result in finer groups where the video will be represented with a greater number of groups. In this case the grouped video will be more similar to the original one, but the brevity of the video will decrease.
4. Temporal Keyframe Attribution
We estimate keyframe attribution for the distilled video using Shapley values [30] [18]. When calculating the Shapely values we get the difference between the model output with and without a given keyframe under all the possible combinations of other keyframes. Since a general video understanding model cannot process videos of arbitrary length, we need to fill in missing frames with a suitable fill-in frames after removing a keyframe. See section 4.1 for a discussion on filling methods. We start with the distilled video which contains the keyframes in the set K. To remove a keyframe from , repeat the existing keyframes according to the length of the groups they belong and to fill in the missing values, we use a fill operator where . We assume the full distilled and filled video is a proxy for the original video .
where: K: set of all keypoints, S: a subset of keypoints chosen from K which does not include the group i. : distilled and filled video which only contains keyframes in S. Frames belonging to other groups have been removed and filled-in with a desired filling method.
Following the common intuition, earlier work [27] estimated frame Shapley values. We on the other hand do keyframe attribution since they provide more intuitive explanations and reduced compute requirements (Section 1).
Video understanding models in general cannot process inputs with variable lengths. Play fair [27] built a multi-scale model which can handle variable-length inputs. But training several models to build a multi-scale model is very compute and time consuming. Most importantly, it will estimate temporal attributions relative to the multi-scale model; not the original model. Our method has no limitations on model architectures, such as transformers [1] and LSTMs [3], which can handle variable input sizes and makes no modifications to the model. To achieve this, we fill in missing frames with "neutral" frames to simulate the lack of frames.
4.1. Filling methods
The method used to fill in the missing frames must minimally change the temporal consistency of the video. Consider the example in Figure 1 for instance. After distillation, we are left with keyframes 2,3,5 and 7. Let's think about how we are going to remove keyframe 5. How will the video look if the events shown in keyframe 5 never happened, but events surrounding it which are 3 and 7, still happened? We explore several options next.
Let's say we have a distilled video with keyframes 1,2,3,4,5, and 6. Each group consist of the keyframe repeat-ing one or several times. In this example, group 1 consists of a keyframe repeating twice, group 2 ones, group 3 four times, group 5 three times and group 6 one time. Assume we would like to remove group 3 while keeping the number of frames in the video unchanged. There are an infinite number of ways to fill in the missing frames. We experimented with several cases while avoiding several methods that would clearly break the consistency of video.
| v | 1 | 1 | 2 | 3 | 3 | 3 | 3 | 4 | 5 | 5 | 5 | 6 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 2 | - | - | - | - | 4 | 5 | 5 | 5 | 6 | |
| past | 1 | 1 | 2 | 2 | 2 | 2 | 2 | 4 | 5 | 5 | 5 | 6 |
| future | 1 | 1 | 2 | 4 | 4 | 4 | 4 | 4 | 5 | 5 | 5 | 6 |
| mid | 1 | 1 | 2 | 2 | 2 | 4 | 4 | 4 | 5 | 5 | 5 | 6 |
| random | 1 | 1 | 2 | 2 | 2 | 2 | 2 | 4 | 5 | 5 | 5 | 6 |
| 1 | 1 | 2 | 2 | 2 | 2 | 4 | 4 | 5 | 5 | 5 | 6 | |
| 1 | 1 | 2 | 2 | 2 | 4 | 4 | 4 | 5 | 5 | 5 | 6 | |
| 1 | 1 | 2 | 2 | 4 | 4 | 4 | 4 | 5 | 5 | 5 | 6 | |
| 1 | 1 | 2 | 4 | 4 | 4 | 4 | 4 | 5 | 5 | 5 | 6 |
Past fills the missing frames with the immediate frame from the past (left). If there are no frames present in the past, this will take the immediate future frames. future uses the immediate future frame. If there is no future frames, it uses the immediate past frame. Mid fills the left half of the missing frames from the past and the right half from the future. If there are an odd number of frames to be filled, a random choice is made between he two middle points. Random chooses a random number of frames from the number of frames to be filled and this number of frames are filled from the left to right with the immediate frame from the past. The rest is filled with the most immediate future frame. In all these cases, if there are no frames in the past, they are filled with the most immediate future frame and vise-versa. Zero fills all the missing frames with all-zero frames. Late is a combination of past and future methods. During the Shapley value calculation, we need to obtain the model inferences where is a subset of the groups. Let be the video created with past method of filling while be the video created with the future method. Under the late method we calculate and use in Shapely value calculation.
Why not interpolate to generate the missing frames? Filling-in the missing frames of a video with interpolation is a well-established technique [5]. We noticed that interpolation can inadvertently re-introduce the information from removed frames back into the video. For example assume we removed the frame 4 from the original video in Figure 1. A good interpolation tool can look at frame 3 and 5 and interpolate the location of the ball and the person's hand for frame 4 successfully. This will defeat our intention to remove the frame 4 in the first place. But shouldn't the model be able to interpolate the missing information anyway, at least in some cases? Yes, this may be true. If the model can actually regain the lost information using its internal knowledge, the model will not "think" the missing frames are important, and the missing frames will get a low importance score since when we remove the frame in question, the model belief will not change significantly.
5. Evaluations
5.1. Models and Datasets
We use the UCF101 dataset [34] which contains 101 classes of different activities. All the evaluations are performed on the 3783 test samples of the split 1 as defined in [16] and the R3D model fine-tuned on UCF-101 by [40]. We use the a subset of the test set of the SSV2 dataset [12][20] and randomly sample 6 samples from each of the 174 classes to create a daaset of 1044 samples due to restrictions in computing resources. We use V-JEPA model [2] which is a ViT-L 256 model with video classification head pretrained on the SSV2 dataset.
5.2. Keyframe extraction quality
We want to distill (keyframe extraction + filling) the video in a way that minimally affect the model's belief. This manner we can make sure that the distillation does not affect the downstream attribution task. A plot of the model feature distributions taken from the distilled vs original videos did not show any significant deviation (Appendix 2.a). The Tables 1 and 2 shows the change of various metrics after distillation. We use the following metrics to measure distillation quality. The margin is defined as Let . This compares the best prediction logit to a background of next best logits. Entropy of a prediction is defined as . We are interested in how these metrics changes after distillation. We define the logit change as . This signifies how has the max logit changed after distillation () with respect to the original video (). Similarly we also define the entropy change and margin change as and . We used as the metric when doing the distillation. We do not just use the logit because we want to track a more nuanced view of model belief than provided by the simple logit. In certain cases the inference class may change after distillation. The agreement, measure the percentage of samples in the dataset that did not change their prediction class after distillation. is the average number of keyframes found.
From Tables 1 and 2, it is evident that as we lower the threshold, more keyframes are found (increasing ) and the increases. This is because lower thresholds allow more nuanced and milder distillation which resembles the original video more closely. Negative values for and
| Thr | Ag% | ||||||
|---|---|---|---|---|---|---|---|
| -1e-1 | 14.98 | -0.011 | -0.587 | -0.078 | -0.051 | 0.043 | 99.55 |
| -1e-2 | 7.01 | -0.024 | -1.327 | -0.131 | -0.089 | 0.119 | 98.65 |
| -1e-3 | 4.72 | -0.016 | -1.408 | -0.118 | -0.076 | 0.017 | 98.28 |
| -1e-5 | 4.51 | -0.015 | -1.406 | -0.116 | -0.074 | -0.020 | 98.31 |
| 1e-4 | 4.48 | -0.022 | -1.410 | -0.116 | -0.074 | -0.021 | 98.28 |
| 5e-4 | 4.41 | -0.014 | -1.407 | -0.115 | -0.072 | -0.037 | 98.26 |
| 1e-3 | 4.33 | -0.013 | -1.381 | -0.114 | -0.072 | -0.046 | 98.23 |
| 5e-3 | 3.96 | -0.009 | -1.380 | -0.105 | -0.064 | -0.098 | 98.10 |
| 1e-2 | 3.66 | -0.005 | -1.391 | -0.096 | -0.055 | -0.166 | 97.96 |
Table 1. UCF101 Metrics after distillation
| Thr | Ag% | ||||||
|---|---|---|---|---|---|---|---|
| -1 | 15.89 | -0.006 | -0.183 | -0.077 | -0.043 | 0.012 | 99.81 |
| -1e-1 | 11.87 | -0.031 | -3.690 | -0.272 | -0.187 | 0.170 | 96.65 |
| 1e-5 | 6.45 | 0.039 | -6.608 | -0.116 | -0.054 | -0.566 | 90.52 |
| 1e-4 | 6.44 | 0.039 | -6.606 | -0.115 | -0.053 | -0.570 | 90.52 |
| 5e-4 | 6.45 | 0.038 | -6.644 | -0.117 | -0.054 | -0.566 | 90.61 |
| 1e-3 | 6.39 | 0.040 | -6.641 | -0.113 | -0.051 | -0.577 | 90.52 |
| 5e-3 | 6.19 | 0.043 | -6.562 | -0.102 | -0.043 | -0.643 | 89.94 |
| 1e-2 | 5.93 | 0.051 | -6.518 | -0.083 | -0.029 | -0.960 | 89.37 |
Table 2. SSV2 Metrics after distillation
indicates that the model's confidence of its original prediction increased after distillation compared to the original video. As we decrease the threshold the model confidence on average increased compared to the original video (also evidenced by increasing ) and finally it decreases and comes back to the original level. This is because at first the keyframe extraction algorithm finds better keyframes that boosts the model decision (by removing noisy/unnecessary frames). But as the distillation comes closer to the original video this advantage vanishes. Although tempting, increasing the model confidence does not always results in better attributions as shown in Sec 5.5. We observe that for the same threshold is higher for SSV2 compared to UCF-101. This may be due to SSV2 having more motion-centric videos where minute details in motion is more important than UCF-101.
Iterative distillation We can iteratively change the threshold till we get the desired similarity of the distilled and the original videos. See Figure 4 for an example. In this manner we can arbitrarily increase the similarity between the distilled and the original videos. But we use a fixed threshold for our attribution experiments due to simplicity.
5.3. Filling methods
To investigate which type of filling method is the most suitable, we randomly removed a group from distilled videos from the two datasets and filled it out with different filling methods. We calculated the L2 distance and the KL-
| Method | UCF-101 | SSV2 | ||
|---|---|---|---|---|
| L2 | KL-Div | L2 | KL-Div | |
| future | 0.00875 | 0.04164 | 0.01168 | 0.01321 |
| past | 0.00877 | 0.04182 | 0.01174 | 0.01396 |
| late | 0.00867 | 0.04116 | 0.01175 | 0.01400 |
| mid | 0.00872 | 0.04137 | 0.01174 | 0.01369 |
| random | 0.00870 | 0.04124 | 0.01169 | 0.01354 |
| zero | 0.01212 | 0.08637 | 0.01425 | 0.01800 |
Table 3. We removed a single randomly chosen group from each crystallized video and filled in the missing values using different methods. Then we obtained the model embeddings of these filled videos. This table shows the difference in the distributions of the original embeddings and the filled embeddings. L2: Average sample-wise Euclidian distance. KL-DIV: Average sample-wise KL divergence
Divergence between the original and the filled video embeddings taken from the model. From Table 3 it can be seen that the late is the best method for UCF101 and while future is the best for SSV2. Further all the temporal freezing based filling methods produced distributions that are very close to the original while filling with all-zero frames produced a distribution that is more different. The small discrepancy between the two datasets might indicate that different types of videos may require different types of filling methods. We might be able to estimate better temporal attribution if we used the optimum filling type for each video rather than the dataset best for all the individual videos. This in an interesting direction for further investigation in the future.
5.4. Attribution Results
Metrics: To evaluate the validity of the temporal attributions, we conduct a systematic removal test on the distilled videos and its corresponding importance values. Starting from the full distilled video, we iteratively remove one keyframe at a time, fill-in the resulting gaps, and record the model's output performance. We use the prediction logit and the probability (logit after softmax) normalized for each video as metrics when calculating the AUC. The order of removal is determined by five distinct strategies: random , ascending , descending , left-to-right , and right-to-left . This design allows us to assess how the model's predictions degrade as frames are progressively withheld. We omit the addition test metrics in the main text, as they are conceptually redundant and yield consistent conclusions (Appendix 4.b).
Group-wise attribution: We calculate all Shapley-based attributions using SHAP python package [19]. We use three different strategies to calculate Shapley values. Exact: Strictly follows equation 1 and requires model evaluations. Calculated only for the UCF-101 dataset due to high compute requirements under the larger model we used for the SSV2 dataset. We use two methods that were design

GT=Moving [part] of [something]
pred=Moving [part] of [something]
L=7.99 P=0.71
m1=2.49 m3=2.98
m5=3.19 e=1.47
Thr=0.0001
L=4.96 P=0.07
m1=-1.27 m3=-0.99
m5=-0.35 e=2.56
grp=Touching (without moving)
[part] of [something]
Thr=-0.01
L=8.37 P=0.79
m1=2.37 m3=3.26
m5=3.63 e=1.08
grp=Moving [part] of [something]
Thr=-0.1
L=9.24 P=0.88
m1=3.20 m3=3.94
m5=4.26 e=0.72
grp=Moving [part] of [something]
Thr=-0.2
L=7.99 P=0.71
m1=2.49 m3=2.98
m5=3.19 e=1.47
grp=Moving [part] of [something]
Figure 4. Iterative distillation till the desired similarity to the original video is achieved. Top figure is the original video. Then from top to bottom we decrease the threshold to distill with more finer groups.
to reduce the computational requirements of exact Shapley calculation by means of approximation. Partition: Calculate Shapley values along a user-defined hierarchical structure of the groups [18]. We defined an intuitive temporally-constrained hierarchy suitable for videos (Appendix 4.a). Kernel: Use linear regression [18] and only used for UCF-101 since it provided very similar results to the Partition method.
Frame-wise attribution: GradCAM [29] is used as it is a classic gradient based method. Integrated Gradients [39] is used as another axiomatic method. Occlusion [46] is used as a perturbation method. We also calculate frame-wise Shapley values using the partition method. All frame-wise methods gives per-frame attributions and we take group-wise mean to get per-keypoint attributions.
Tables 4 to 7 shows the removal test results on the two datasets. Each group-wise attributions outperform each frame-wise attributions. All three Shapley based methods for group-wise attribution for the UCF-101 yielded similar results showing that approximations found solutions close to the exact Shapley values (Tables 4 and 5). For SSV2 dataset, group-wise calculation of Shapley values with partition method shows the best performance again showing the superiority of group-wise attribution with Shapley values (Tables 6 and 7).
Figures 5 and 6 show how the keyframe extraction finds groups of frames that can be grouped together and represented with a single keyframe. Most of the groups contain visually similar frames or contain redundant changes. For example in the middle part of Figure 6, the first three frames where no motion happens is grouped together. The other sparsely-sampled keyframes may be sufficient for the model to understand the movements of the objects. Sometimes very similar adjacent frames are being put into different groups. We believe we will be able to solve these cases with iterative distillation.
Table 4. Removal test for the probability AUC of group attribution - UCF101. F- frame-wise attribution. G-Group-wise attribution
| Method | ||||||
|---|---|---|---|---|---|---|
| F | Partition | 0.708 | 0.663 | 0.688 | 0.674 | 0.697 |
| IG | 0.690 | 0.688 | 0.688 | 0.674 | 0.697 | |
| Gradam | 0.686 | 0.692 | 0.688 | 0.674 | 0.697 | |
| Occlusion | 0.693 | 0.681 | 0.689 | 0.674 | 0.697 | |
| G | Kernel | 0.722 | 0.650 | 0.688 | 0.674 | 0.697 |
| Partition | 0.725 | 0.646 | 0.688 | 0.674 | 0.697 | |
| Exact | 0.731 | 0.638 | 0.690 | 0.674 | 0.697 | |
Table 5. Removal test for the Logit AUC of group attribution - UCF101. F- frame-wise attribution. G-Group-wise attribution
| Method | ||||||
|---|---|---|---|---|---|---|
| F | Partition | 0.743 | 0.706 | 0.725 | 0.717 | 0.732 |
| IG | 0.726 | 0.726 | 0.726 | 0.717 | 0.732 | |
| Gradam | 0.723 | 0.729 | 0.727 | 0.717 | 0.732 | |
| Occlusion | 0.730 | 0.720 | 0.726 | 0.717 | 0.732 | |
| G | Kernel | 0.752 | 0.697 | 0.726 | 0.717 | 0.732 |
| Partition | 0.755 | 0.693 | 0.726 | 0.717 | 0.732 | |
| Exact | 0.758 | 0.688 | 0.727 | 0.717 | 0.732 | |
Table 6. Removal test for the probability AUC of group attribution - SSV2. F- frame-wise attribution. G-Group-wise attribution
| Method | ||||||
|---|---|---|---|---|---|---|
| F | Partition | 0.516 | 0.380 | 0.462 | 0.441 | 0.402 |
| Gradam | 0.471 | 0.477 | 0.463 | 0.441 | 0.402 | |
| Occlusion | 0.471 | 0.439 | 0.463 | 0.441 | 0.402 | |
| G | Partition | 0.550 | 0.340 | 0.460 | 0.441 | 0.402 |
5.5. Distillation affects attribution quality
We create a single metric to measure the attribution quality by combining two removal AUC metrics Att.Metric = . Higher Att.Metric indicates higher quality of attribution. Figure 7 shows the relationship between the at-

Figure 5. Attribution examples - UCF101. Keyframes are shown with red a circle

Figure 6. Attribution examples - SSV2. Keyframes are shown with red a circle
Table 7. Removal test for the logit AUC of group attribution - SSV2. F- frame-wise attribution. G-Group-wise attribution
| Method | |||||
|---|---|---|---|---|---|
| Partition | 0.621 | 0.505 | 0.577 | 0.549 | 0.529 |
| F Gradam | 0.584 | 0.585 | 0.578 | 0.549 | 0.529 |
| Occlusion | 0.586 | 0.556 | 0.576 | 0.549 | 0.529 |
| G Partition | 0.646 | 0.470 | 0.576 | 0.549 | 0.529 |

Figure 7. Effect of distillation quality on attribution
tribution quality and the distillation quality. The keyframe attribution algorithm can do a better job when the distilled video is closer to the original video ( values closer to zero). Negative values indicate that the model confidence about the predicted class increased after distillation. On average, the attribution quality degraded when this happens. It may be due to the data distribution being different from the original video. When the changed video further modified in the attribution algorithm, the distribution change may get amplified further.

Figure 8. Important changes
5.6. Exploring important changes between frames
We can visualize important changes of the video by taking the pixel difference between adjacent keyframes. Refer Sec 1 for a further discussion. Figure 8 shows four keyframes from the same example as Figure 6 bottom part. RMSE between the images highlight the hand and the dark object that move between the keyframes.
5.7. Conclusions
MoCKEFA introduces the first video model explanation method that extracts keyframes from a video guided by the model and performs keyframe attribution. We show that the keyframe attributions are more intuitive and of higher quality than the baselines through qualitative and quantitative studies. Our use of fixed thresholds when extracting keyframes doesn't work for some examples and requires adaptive threshold selection. Also our distillation method is very compute intensive. These must be solved in future work.
References
[1] Anurag Arnab, Mostafa Dehghani, Georg Heigold, Chen Sun, Mario Lučić, and Cordelia Schmid. Vivit: A video vision transformer. In Proceedings of the IEEE/CVF international conference on computer vision, pages 6836–6846, 2021. 4
[2] Mido Assran, Adrien Bardes, David Fan, Quentin Garrido, Russell Howes, Matthew Muckley, Ammar Rizvi, Claire Roberts, Koustuv Sinha, Artem Zholus, et al. V-jepa 2: Self-supervised video models enable understanding, prediction and planning. arXiv preprint arXiv:2506.09985, 2025. 5
[3] Yi Bin, Yang Yang, Fumin Shen, Ning Xie, Heng Tao Shen, and Xuelong Li. Describing video with attention-based bidirectional lstm. IEEE transactions on cybernetics, 49(7): 2631–2641, 2018. 4
[4] Aditya Chattopadhay, Anirban Sarkar, Prantik Howlader, and Vineeth N Balasubramanian. Grad-cam++: Generalized gradient-based visual explanations for deep convolutional networks. In 2018 IEEE winter conference on applications of computer vision (WACV), pages 839–847. IEEE, 2018. 3
[5] George Ciubotariu, Zhuyun Zhou, Yeying Jin, Zongwei Wu, Radu Timofte, Zhenzhong Chen, Jiaxin Chen, Xinxin Chen, Yuantong Zhang, Fuqiang Bai, Tian Shu, Wenzhuo Ma, Daiqin Yang, Qipei Li, Lei Sun, Jiachen Tu, Guoyi Xu, Yaoxin Jiang, Jiajia Liu, Yaokun Shi, Mila Xu, Xiaotong Luo, Yuan Gao, Wenjun Zeng, Nikhil Akalwadi, Praneel Nadgir, Yashas A B, Rashmi Khot, Ramesh Ashok Tabib, Uma Mudenagudi, Varda I Pattanshetty, Varsha I Pattanshetty, Padmashree Desai, Sujatha C, Lize Zhang, Hao Yin, Luyang Wang, Boqi Zhang, Jiawei Shi, Hao Kang, Zhe Yang, and Yixiang Qiang. High fps video frame interpolation challenge at ntire 2026. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, pages 1728–1740, 2026. 5
[6] Guodong Ding, Fadime Sener, and Angela Yao. Temporal action segmentation: An analysis of modern techniques. IEEE Transactions on Pattern Analysis and Machine Intelligence, 46(2):1011–1030, 2023. 2
[7] Wenkai Dong, Zhaoxiang Zhang, Chunfeng Song, and Tie-niu Tan. Identifying the key frames: An attention-aware sampling method for action recognition. Pattern Recognition, 130:108797, 2022. 1, 2
[8] Ruth Fong, Mandela Patrick, and Andrea Vedaldi. Understanding deep networks via extremal perturbations and smooth masks. In Proceedings of the IEEE/CVF international conference on computer vision, pages 2950–2958, 2019. 3
[9] Ruth C Fong and Andrea Vedaldi. Interpretable explanations of black boxes by meaningful perturbation. In Proceedings of the IEEE international conference on computer vision, pages 3429–3437, 2017. 2
[10] Amir Ghodrati, Babak Ehteshami Bejnordi, and Amirhossein Habibian. Frameexit: Conditional early exiting for efficient video recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 15608–15618, 2021. 1, 2
[11] Nermin Goran, Alen Begović, and Namir Škaljo. Adjacent image correlation for video quality assessment. In 2020 International Symposium ELMAR, pages 45–48. IEEE, 2020. 1
[12] Raghav Goyal, Samira Ebrahimi Kahou, Vincent Michalski, Joanna Materzynska, Susanne Westphal, Heuna Kim, Valentin Haenel, Ingo Fruend, Peter Yianilos, Moritz Mueller-Freitag, et al. The" something something" video database for learning and evaluating visual common sense. In Proceedings of the IEEE international conference on computer vision, pages 5842–5850, 2017. 5
[13] Thomas Hartley, Kirill Sidorov, Christopher Willis, and David Marshall. Swag: Superpixels weighted by average gradients for explanations of cnns. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 423–432, 2021. 3
[14] Thomas Hartley, Kirill Sidorov, Christopher Willis, and David Marshall. Swag-v: explanations for video using superpixels weighted by average gradients. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 604–613, 2022. 3
[15] De-An Huang, Vignesh Ramanathan, Dhruv Mahajan, Lorenzo Torresani, Manohar Paluri, Li Fei-Fei, and Juan Carlos Niebles. What makes a video a video: Analyzing temporal information in video understanding models and datasets. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7366–7375, 2018. 2, 3
[16] Hirokatsu Kataoka, Tenga Wakamiya, Kensho Hara, and Yutaka Satoh. Would mega-scale datasets further enhance spatiotemporal 3d cnns? arXiv preprint arXiv:2004.04968, 2020. 5
[17] Zhenqiang Li, Weimin Wang, Zuoyue Li, Yifei Huang, and Yoichi Sato. Towards visually explaining video understanding networks with perturbation. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 1120–1129, 2021. 3
[18] Scott M Lundberg and Su-In Lee. A unified approach to interpreting model predictions. Advances in neural information processing systems, 30, 2017. 1, 2, 3, 4, 7
[19] Scott M Lundberg and Su-In Lee. A unified approach to interpreting model predictions. Curran Associates, Inc., 2017. 6
[20] Farzaneh Mahdisoltani, Guillaume Berger, Waseem Gharbieh, David Fleet, and Roland Memisevic. On the effectiveness of task granularity for transfer learning. arXiv preprint arXiv:1804.09235, 2018. 5
[21] Joonatan Manttari, Sofia Broomé, John Folkesson, and Hedvig Kjellstrom. Interpreting video features: A comparison of 3d convolutional networks and convolutional lstm networks. In Proceedings of the Asian conference on computer vision, 2020. 2
[22] Spencer Matthews and Brian Hartman. mshap: Shap values for two-part models. Risks, 10(1):3, 2021. 3
[23] Lili Meng, Bo Zhao, Bo Chang, Gao Huang, Wei Sun, Frederick Tung, and Leonid Sigal. Interpretable spatio-temporal attention for video action recognition. In Proceedings of the IEEE/CVF international conference on computer vision workshops, pages 0–0, 2019. 1
[24] Rory Mitchell, Joshua Cooper, Eibe Frank, and Geoffrey Holmes. Sampling permutations for shapley value estimation. Journal of Machine Learning Research, 23(43):1–46, 2022. 3
[25] Amin Nayebi, Sindhu Tipirneni, Chandan K Reddy, Brandon Foreman, and Vignesh Subbian. Windowshap: An efficient framework for explaining time-series classifiers based on shapley values. Journal of biomedical informatics, 144:104438, 2023. 3
[26] Yingwei Pan, Yehao Li, Ting Yao, Tao Mei, Houqiang Li, and Yong Rui. Learning deep intrinsic video representation by exploring temporal coherence and graph structure. In IJ-CAI, pages 3832–3838, 2016. 1
[27] Will Price and Dima Damen. Play fair: Frame attributions in video models. In Asian Conference on Computer Vision, pages 480–497. Springer, 2020. 2, 3, 4
[28] Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. "why should i trust you?" explaining the predictions of any classifier. In Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining, pages 1135–1144, 2016. 2
[29] Ramprasaath R Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad-cam: Visual explanations from deep networks via gradient-based localization. In Proceedings of the IEEE international conference on computer vision, pages 618–626, 2017. 2, 7
[30] Lloyd S Shapley. A value for n-person games. 1953. 1, 3, 4
[31] Avanti Shrikumar, Peyton Greenside, Anna Shcherbina, and Anshul Kundaje. Not just a black box: Learning important features through propagating activation differences. arXiv preprint arXiv:1605.01713, 2016. 2
[32] Avanti Shrikumar, Peyton Greenside, and Anshul Kundaje. Learning important features through propagating activation differences. In International conference on machine learning, pages 3145–3153. PMIR, 2017. 2
[33] Oleksii Sidorov, Marius Pedersen, Sumit Shekhar, and Nam Wook Kim. Are all the frames equally important? In Extended Abstracts of the 2020 CHI Conference on Human Factors in Computing Systems, pages 1–7, 2020. 2
[34] Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012. 5
[35] Alexandros Stergiou, Georgios Kapidis, Grigorios Kalliatakis, Christos Chrysoulas, Remco Veltkamp, and Ronald Poppe. Saliency tubes: Visual explanations for spatio-temporal convolutions. In 2019 IEEE international conference on image processing (ICIP), pages 1830–1834. IEEE, 2019. 3
[36] Erik Strumbelj and Igor Kononenko. An efficient explanation of individual classifications using game theory. The Journal of Machine Learning Research, 11:1–18, 2010. 2
[37] Pascal Sturmfels, Scott Lundberg, and Su-In Lee. Visualizing the impact of feature attribution baselines. Distill, 5:e22, 2020. 2
[38] Mukund Sundararajan and Amir Najmi. The many shapley values for model explanation. In International conference on machine learning, pages 9269–9278. PMLR, 2020. 2
[39] Mukund Sundararajan, Ankur Taly, and Qiqi Yan. Axiomatic attribution for deep networks. In International conference on machine learning, pages 3319–3328. PMLR, 2017. 2, 7
[40] Tomoki Uchiyama, Naoya Sogi, Koichiro Niinuma, and Kazuhiro Fukui. Visually explaining 3d-cnn predictions for video classification with an adaptive occlusion sensitivity analysis. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 1513–1522, 2023. 3, 5
[41] Haoqian Wu, Keyu Chen, Haozhe Liu, Mingchen Zhuge, Bing Li, Ruizhi Qiao, Xiujun Shu, Bei Gan, Liangsheng Xu, Bo Ren, et al. Newsnet: A novel dataset for hierarchical temporal segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10669–10680, 2023. 2
[42] Zuxuan Wu, Caiming Xiong, Chih-Yao Ma, Richard Socher, and Larry S Davis. Adaframe: Adaptive frame selection for fast video recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1278–1287, 2019. 1, 2
[43] Boyang Xia, Zhihao Wang, Wenhao Wu, Haoran Wang, and Jungong Han. Temporal saliency query network for efficient video recognition. In European conference on computer vision, pages 741–759. Springer, 2022. 2
[44] Sascha Xu, Joscha Cüppers, and Jilles Vreeken. Succinct interaction-aware explanations. In Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V. 1, pages 1715–1726, 2025. 3
[45] H Peyton Young. Monotonic solutions of cooperative games. International Journal of Game Theory, 14(2):65–72, 1985. 3
[46] Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In European conference on computer vision, pages 818–833. Springer, 2014. 2, 7
[47] Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning deep features for discriminative localization. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2921–2929, 2016. 3
[48] Wentao Zhu, Yufang Huang, Xiufeng Xie, Wenxian Liu, Jincan Deng, Debing Zhang, Zhangyang Wang, and Ji Liu. Autoshot: A short video dataset and state-of-the-art shot boundary detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2238–2247, 2023. 2