Introduction
Video-language pretraining has achieved significant milestones, yet it faces a persistent "goldilocks" dilemma: models are often either too computationally intensive for edge devices like smartphones and smart glasses, or too lightweight to accurately capture complex temporal dynamics. Traditionally, supporting a range of hardware—from mobile processors to high-end GPUs—requires training and maintaining multiple separate models of varying sizes.
Furthermore, most existing models are "short-sighted," typically trained on clips lasting only a few seconds. Increasing the frame count to process longer videos usually results in a quadratic explosion in computational costs. AdaVid addresses these challenges by introducing a single transformer-based model capable of dynamically adapting its embedding dimensions—its "thickness"—at inference time based on available resources.
The AdaVid Framework
The core innovation of AdaVid is the Adaptive Transformer Layer. Drawing inspiration from Matryoshka Representation Learning (MRL), the authors designed components that can be "sliced" during inference to reduce compute without retraining.
Adaptive Components
- Adaptive FFN & LayerNorm: These modules utilize the upper-left sub-matrices of their weights. For instance, if only half the precision is required, the model uses only the first $d/2$ dimensions of the weights and biases.
- Adaptive Multi-Head Attention: Rather than shrinking the internal dimension of every head, AdaVid reduces the number of active attention heads. This approach preserves the integrity of the features learned within each individual head.
- AdaVid-Agg: To handle long-form video, the framework includes a lightweight hierarchical aggregator. This component distills features from multiple short clips into a single representation with negligible added compute cost.
Training Strategy
During the pretraining phase, the model is randomly assigned to process tokens at different dimensions (e.g., full, 3/4, 1/2, or 1/4 size). This "elastic" training objective encourages the model to store essential "coarse" information in the initial dimensions and reserve later dimensions for "fine-grained" details.
Datasets and Evaluation
AdaVid was pretrained on the Ego4D dataset, which contains 3,000 hours of first-person video. Performance was evaluated across several challenging benchmarks:
- Short Video: EgoMCQ for action recognition and retrieval.
- Long Video: SummaryMCQ, EgoSchema (3-minute VideoQA), and LongVideoRetrieval.
- Temporal Reasoning: Diving48, a dataset requiring full-clip observation for correct classification.
Key Insights
The "Coarse-to-Fine" Advantage
The researchers discovered that a "d-dec" strategy—gradually decreasing the embedding dimension in deeper layers—outperforms constant or increasing dimensions. This aligns with the intuition that early layers require higher dimensionality to process raw visual details, while deeper layers can represent high-level semantic concepts more compactly.
Implicit Regularization
Interestingly, the AdaVid-trained model often outperforms standard models even when operating at full embedding size. The adaptive training process acts as a structured form of dropout, providing a regularization effect that yields more robust representations.
The Compute-Frame Trade-off
Beyond power saving, AdaVid allows users to "reinvest" saved compute into processing more frames. On the Diving48 benchmark, AdaVid processed 128 frames using less compute than a standard model processing 96 frames, leading to higher accuracy by allowing the model to "see" more of the action.
Key Results
- Efficiency: AdaVid-EgoVLP matches the performance of the standard EgoVLP baseline on retrieval tasks while utilizing 50% less compute (FLOPs).
- Accuracy Gains: On EgoMCQ (intra), AdaVid achieved 59.5% accuracy, surpassing the baseline's 57.2%.
- Long-Form Performance: On EgoSchema, the AdaVid-Agg model outperformed significantly larger models like LongViViT, despite its smaller computational footprint.
- Scaling Success: On Diving48, increasing the frame count from 64 to 128 via the adaptive framework pushed Top-1 accuracy to 82.2%, outperforming heavyweights like TimeSformer-L.
Limitations and Future Work
While highly efficient, AdaVid experiences a performance drop in fine-grained tasks at extremely low compute settings (e.g., 0.06x FLOPs). Future research may explore adaptive retrieval, where a "slim" version of the model quickly ranks candidates in a large database, followed by a "full" version for high-precision reranking. Scaling this approach to larger datasets and diverse architectures remains a promising direction.
Summary updated