Abstract
AdaFrame is a reinforcement learning-based framework designed to optimize video recognition efficiency by adaptively selecting the most informative frames for processing. By employing a memory-augmented LSTM and a utility network that predicts the value of future observations, AdaFrame achieves significant computational savings—up to 60% on average—while maintaining high classification accuracy across large-scale benchmarks.
Introduction
Modern video recognition typically involves processing high-dimensional data across hundreds or thousands of frames. Standard approaches often utilize uniform sampling, which processes a fixed number of evenly spaced frames. This method is inherently inefficient as it ignores temporal redundancy and the varying complexity of different video categories. For instance, identifying a static object may require only a single frame, whereas distinguishing between subtle actions requires observing temporal dynamics. AdaFrame addresses these challenges by framing video recognition as a sequential decision-making process, learning to look at only the most relevant frames on a per-video basis.
Methodology
AdaFrame operates as an agent that determines which frame to sample next and when to terminate the inference process. The architecture consists of several key components:
- Global Memory: To provide the agent with a broad understanding of the video's content, a lightweight CNN (MobileNetV2) processes heavily downsampled frames to generate a "global context."
- Memory-Augmented LSTM: This core component processes the current frame's features alongside its previous hidden state and a context vector retrieved from the Global Memory via soft-attention.
- Selection and Utility Networks: The selection network employs a Gaussian policy to output the timestamp of the next frame, allowing for both forward and backward temporal jumps. Concurrently, a utility network estimates the expected future reward, facilitating Adaptive Lookahead Inference. If the predicted utility of further sampling plateaus, the process halts early.
The model is trained using Policy Gradient (REINFORCE), with a reward function designed to maximize the confidence margin of the correct class over time.
Experimental Results
The framework was evaluated on the FCVID and ActivityNet datasets. AdaFrame consistently outperformed standard baselines, such as uniform sampling and traditional LSTMs, across various computational budgets.
Efficiency Gains
On the FCVID dataset, AdaFrame matched the accuracy of a 25-frame baseline (80.2% mAP) while processing an average of only 8.21 frames, representing a 58.9% reduction in GFLOPs. Similarly, on ActivityNet, it achieved a 63.3% reduction in compute while matching the all-frame baseline accuracy (71.0% mAP).
Qualitative Insights
Analysis of the learned policy revealed that frame allocation correlates strongly with task difficulty. Simple static classes (e.g., "Eiffel Tower", "gorilla") required fewer frames, while complex actions (e.g., "making ice cream") prompted the model to sample more extensively. Furthermore, the agent frequently utilized its ability to jump backward in time—doing so in 42.8% of FCVID videos—highlighting the importance of non-linear temporal exploration.
Conclusion
AdaFrame presents a robust solution for efficient video recognition by decoupling the "stop" decision from frame selection through utility prediction. While the system introduces a fixed overhead for global memory extraction (approximately 1.32 GFLOPs), its ability to drastically reduce per-video computation makes it highly effective for large-scale applications. Future work may involve integrating 3D CNNs to process temporal snippets and further optimizing the framework for specific hardware constraints.
Summary updated