TL;DR
Eventful Transformers significantly reduce the computational burden of processing video with Vision Transformers by exploiting temporal redundancy. By identifying and updating only the "active" tokens that change significantly between frames, the method achieves 2-4x computational savings with minimal impact on accuracy and provides fine-grained, runtime control over the compute budget.
What Problem Does This Paper Address?
Vision Transformers (ViTs) have set new state-of-the-art benchmarks in computer vision, but their high computational cost—often an order of magnitude higher than traditional CNNs—remains a major barrier to deployment. This is especially true in video processing, where models are typically applied frame-by-frame, redundantly recomputing features for static background elements and slowly changing objects.
While previous work has explored "adaptive" models that skip entire frames or regions, these often require extensive re-training or struggle to translate theoretical sparsity into actual wall-clock speedups. The authors identify a unique opportunity: because Transformers operate on discrete token vectors, they are naturally suited for fine-grained, token-level updates that can directly reduce runtime using standard operators.
Methods
The core contribution is the Eventful Transformer block, a modified version of the standard Transformer block designed to be "redundancy-aware."
Token Gating
The authors introduce a Gate module (Figure 2) that maintains a set of "reference tokens" in memory. For each new frame, the gate compares incoming tokens to these references. Only tokens that have changed beyond a certain threshold (or the top-$r$ most changed tokens) are selected for re-computation.
Sparse Updates
Once tokens are selected, the model avoids full re-computation in two ways:
- Token-wise operations: For layers like the MLP or linear projections, the model simply "gathers" the active tokens, processes them, and "scatters" the results back into a buffer (Figure 3).
- Sparse Self-Attention: This is the most complex part. The authors develop strategies to update the self-attention mechanism without recomputing the full $N \times N$ attention matrix.
- For the Query-Key product, they only recompute the rows and columns corresponding to updated tokens (Figure 5).
- For the Attention-Value product, they use a "delta-based" update strategy, where the new output is calculated by adding the changes (deltas) to the previous frame's output (Figure 6).
Adaptivity
Because the number of updated tokens ($r$) is a hyperparameter that can be changed at runtime, the model offers an "efficiency knob." A system can dynamically reduce the budget if battery is low or increase it if the scene becomes highly dynamic (Figure 1).
Datasets
The authors evaluated their method across several demanding video tasks:
- ImageNet VID: For video object detection.
- EPIC-Kitchens 100: For action recognition in egocentric (first-person) videos.
- Kinetics-400: A large-scale action recognition benchmark used for additional validation.
Key Insights and Ideas
- Off-the-shelf Compatibility: One of the most powerful aspects of this method is that it can often be applied to existing, pre-trained Transformers without any re-training, particularly for tasks like object detection.
- Transformers vs. CNNs: The authors argue that Transformers are actually better suited for exploiting temporal redundancy than CNNs. In CNNs, spatial sparsity is difficult to turn into speedups without specialized hardware or kernels. In Transformers, tokens are independent vectors, making "gather/scatter" operations highly effective.
- Complementary Redundancy: Temporal redundancy (skipping tokens that don't change over time) and spatial redundancy (skipping tokens that aren't important in a single frame) are complementary. The authors showed that combining their method with spatial pooling leads to even greater savings.
Key Results
- Efficiency: On the ViTDet model for object detection, the method reduced GFlops by 3.8x with only a 1.68% drop in mAP.
- Action Recognition: For the ViViT model on EPIC-Kitchens, they achieved a 2.4x cost reduction with a 1.62% accuracy drop.
- Wall-clock Speedups: Unlike many theoretical papers, the authors demonstrated real-world speedups: up to 2.48x on CPU and 1.74x on GPU using a standard PyTorch implementation.
Limitations and Future Work
- Memory Overhead: Reusing computations requires storing reference tensors and attention matrices in memory. For very large models or high-resolution inputs, this memory footprint can be significant (e.g., hundreds of MBs for the attention matrix).
- Implementation Efficiency: The current implementation uses "vanilla" PyTorch operators. The authors believe that custom CUDA kernels for the gating logic could further improve the speedup ratios.
- Distribution Shifts: In action recognition tasks, the authors found that the "temporal head" of the model was sensitive to the sparse update patterns, requiring a small amount of fine-tuning to maintain peak accuracy.
Summary updated