Implicit Temporal Modeling with Learnable Alignment for Video Recognition

Shuyuan Tu, Qi Dai, Zuxuan Wu, Zhi-Qi Cheng, Han Hu, Yu-Gang Jiang

Abstract

Adapting Contrastive Language-Image Pretraining (CLIP) for video recognition typically involves either computationally expensive temporal self-attention or overly simplistic frame-level pooling. This paper introduces Implicit Learnable Alignment (ILA), a lightweight module designed to capture temporal dynamics by focusing on interactive points between adjacent frames. By generating a Mutual Information (MI) token that summarizes frame-to-frame relationships, ILA enables state-of-the-art performance on major benchmarks like Kinetics-400 and Something-Something-V2 with significantly reduced computational overhead.

1. Introduction

The success of Vision Transformers (ViT) and large-scale pretraining (e.g., CLIP) has set new standards for image-based tasks. However, extending these models to video requires effective temporal modeling to capture motion and object interactions. Existing approaches generally fall into two categories: heavyweight models that employ joint or factorized temporal attention, which are accurate but computationally prohibitive, and lightweight adapters that often lack the nuance required for motion-heavy datasets.

We propose Implicit Learnable Alignment (ILA), a method that shifts the focus from exhaustive "all-to-all" temporal attention to a more efficient alignment-based mechanism. The core hypothesis is that identifying and aligning key regions of interest between adjacent frames provides sufficient temporal context for high-accuracy video recognition.

2. Implicit Learnable Alignment (ILA)

The ILA module is integrated into standard ViT blocks to form Implicit Spatio-Temporal (IST) blocks. The process consists of four primary stages:

2.1 Interactive Point Prediction

For any pair of adjacent frames, a lightweight convolution module predicts a single "interactive point." This point is mathematically determined to represent the region containing the highest mutual information between the frames—essentially where the primary action or interaction is occurring.

2.2 Learnable Masking and MI Token Generation

Once the interactive point is identified, the model generates a coarse, learnable mask centered on this location. This mask emphasizes the relevant action region while suppressing background noise. The masked features are then pooled into a single "Mutual Information (MI) token." This token serves as a compact summary of the temporal relationship and motion cues between the frame pair.

2.3 Spatial Integration

The MI token is concatenated with the spatial tokens of the subsequent frame. During the standard spatial self-attention phase of the Transformer block, the model processes these tokens together. This allows the spatial features to be "informed" by the temporal summary provided by the MI token without requiring a separate, expensive temporal attention layer.

3. Experimental Evaluation

The effectiveness of ILA was tested on two distinct benchmarks: Kinetics-400 (K400), which focuses on general action recognition, and Something-Something-V2 (SSv2), which requires fine-grained understanding of temporal sequences (e.g., "moving something from left to right").

3.1 Performance and Efficiency

On Kinetics-400, the ILA-ViT-L model achieved a top-1 accuracy of 88.7%. More importantly, it demonstrated superior efficiency compared to existing heavyweights:

  • Vs. ViViT-H: ILA achieved 3.2% higher accuracy while requiring 12x less computation.
  • Vs. MViTv2-L: ILA outperformed this model by 1.9% with 4x fewer FLOPs.

3.2 Motion-Heavy Recognition

On the SSv2 dataset, where temporal ordering is critical, ILA showed significant gains over other CLIP-based methods. It outperformed X-CLIP and EVL by up to 8.7%, indicating that the alignment mechanism successfully captures complex motion cues that simple pooling methods miss.

4. Discussion

The success of ILA suggests that "alignment" is a powerful and efficient proxy for temporal modeling. By focusing on local interactive regions rather than global temporal attention, the model reduces redundancy and computational complexity ($O(N^2)$ vs $O(N^3)$).

A key finding in our ablation studies was that placing ILA modules in the earlier, shallower blocks of the Transformer yielded the best results. This suggests that capturing low-level motion cues early in the feature extraction process allows the model to build more robust high-level spatio-temporal representations.

5. Limitations and Future Work

While ILA is highly efficient, it currently operates on a pairwise basis, aligning adjacent frames. This may limit its ability to capture extremely long-range temporal dependencies spanning many seconds of video. Additionally, as a CLIP-based method, its performance is partially tied to the quality of the underlying image pretraining, which can sometimes introduce static biases in motion-only tasks. Future research will explore multi-frame alignment and the application of ILA to real-time streaming video.

6. Conclusion

Implicit Learnable Alignment provides a scalable and efficient path for adapting image-based foundation models to video. By replacing dense temporal attention with a targeted alignment mechanism, ILA achieves state-of-the-art results while maintaining a fraction of the computational footprint of previous models.

Summary updated

BibTeX
@inproceedings{tu2023implicit,
  author = {Shuyuan Tu and Qi Dai and Zuxuan Wu and Zhi-Qi Cheng and Han Hu and Yu-Gang Jiang},
  title = {{Implicit Temporal Modeling with Learnable Alignment for Video Recognition}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
}
Figure