Abstract
Temporal Action Localization (TAL) requires identifying the start and end times of actions within long, untrimmed videos and classifying them. Most modern approaches separate this into short-term feature extraction and long-range temporal boundary localization. However, the high GPU memory cost of processing long videos often forces a compromise: researchers either freeze the feature extraction backbone or use low spatial resolutions, both of which limit performance. This is particularly problematic for Video Transformers, which exhibit quadratic memory complexity. We introduce TALLFormer, a memory-efficient, end-to-end trainable transformer that utilizes a Long-term Memory (LMM) mechanism. By caching and reusing video features across training iterations, TALLFormer significantly reduces GPU memory consumption and training time. This efficiency allows for the use of powerful, unfrozen video transformer backbones at high resolution. TALLFormer achieves state-of-the-art results using only RGB frames, reaching an average mAP of 59.1% on THUMOS14 and 35.6% on ActivityNet-1.3.
Introduction: The "Memory Wall" in Video Understanding
Temporal Action Localization is often described as the video equivalent of object detection. Unlike simple action recognition, which classifies a short, trimmed clip, TAL requires a model to parse untrimmed videos that may span several minutes. The primary technical hurdle in this domain is the "Memory Wall."
Processing high-resolution video frames (e.g., 224x224) over long durations requires massive GPU memory. To manage this, traditional methods typically make a "devil’s bargain":
- Freezing the Backbone: Using a pre-trained feature extractor and keeping its weights fixed. This prevents the model from learning task-specific visual cues.
- Downsampling: Reducing the spatial resolution (e.g., to 96x96), which destroys fine-grained details necessary for distinguishing similar actions.
With the advent of Video Transformers, this bottleneck has become even more restrictive due to the quadratic memory scaling of self-attention mechanisms. TALLFormer addresses these challenges by rethinking how temporal features are stored and updated during training.
The TALLFormer Architecture
TALLFormer is designed to maintain high representational power without the prohibitive memory cost. The framework consists of four primary components:
1. Short-term Transformer Encoder
The model utilizes a powerful backbone, such as VideoSwin, to extract features from short video clips (typically 1-2 seconds). Unlike previous methods, TALLFormer keeps this backbone trainable, allowing the visual features to adapt specifically to the localization task.
2. Long Memory Module (LMM)
The LMM is the core innovation of TALLFormer. It leverages the observation that video content is often redundant across short time spans. Instead of re-processing every single clip in a long video during every training iteration, TALLFormer processes only a small, randomly selected subset of clips. The features for the remaining clips are retrieved from a "long-term memory" bank that stores features computed in previous iterations. This drastically reduces the computational load per step.
3. Temporal Consistency Module (TCM)
Because the features in the memory bank were computed in previous iterations using an older version of the encoder, they can become "stale." The TCM employs self-attention layers to allow fresh features (from the current iteration) and stale features (from the memory bank) to interact. This process smooths out inconsistencies and allows the model to capture global temporal dependencies across the entire video.
4. Temporal Boundary Localization Module (TBLM)
The final refined features are passed to the TBLM, a prediction head that outputs the final action categories and their corresponding start and end timestamps.
Experimental Results
TALLFormer was evaluated on three major benchmarks: THUMOS14, ActivityNet-1.3, and HACS-Segment.
State-of-the-Art Performance
On THUMOS14, TALLFormer achieved an average mAP of 59.1%, representing a 7.1% improvement over previous state-of-the-art methods. On ActivityNet-1.3, it reached 35.6% mAP. Notably, these results were achieved using only RGB frames. Many competing models rely on a "two-stream" approach (RGB + Optical Flow) and external action classifiers to reach high accuracy; TALLFormer proves that a sufficiently powerful, end-to-end trained transformer can outperform these complex pipelines using visual data alone.
Efficiency and Scalability
The model's efficiency is one of its most significant contributions. A variant of the model, TALLFormer-12, can be trained on a standard 12GB GPU (such as an RTX 3080) while still outperforming much larger models. Furthermore, because it does not require the pre-computation of optical flow, TALLFormer is significantly faster during inference. On ActivityNet-1.3, it processes videos in approximately 1.58 seconds, compared to 11.74 seconds for competitors like AFSD.
Key Insights
- The Necessity of Fine-tuning: The authors demonstrated that freezing the backbone leads to a performance drop of 8-9% mAP. TALLFormer’s memory efficiency is what makes this critical fine-tuning possible.
- Redundancy as an Asset: By recognizing that every frame does not need a fresh feature update in every training step, the LMM turns video redundancy into a computational advantage.
- Simplification: By removing the need for optical flow and external classifiers, TALLFormer offers a more streamlined and deployable architecture for real-world video analysis.
Conclusion and Future Work
TALLFormer successfully bridges the gap between high-resolution feature extraction and long-range temporal modeling. While the Long Memory Module is currently a training-time optimization, future work may explore ways to further optimize the inference path. Additionally, the authors suggest that this "long-memory" approach could be extended to multimodal tasks, such as video-language grounding, where long-term context is equally vital.
Summary updated