TL;DR
Processing long videos with Video Large Language Models (VideoLLMs) requires filtering out redundant frames to fit within limited context windows. While most keyframe selection methods operate "offline" with full access to the video and user query, SVMemAgent is a lightweight reinforcement learning agent that manages a fixed-size streaming memory completely "online"—without knowing the video's duration or the future query. By leveraging a novel dual-branch architecture and task-driven rewards, it outperforms existing online baselines and even rivals offline methods.
What Problem Does This Paper Address?
To understand long videos, VideoLLMs rely on keyframe selection to distill hours of footage into a compact set of informative frames. However, most existing techniques are designed for offline settings: they assume the entire video and the user's specific query are available before selection begins.
Real-world applications—such as wearable devices, AR glasses, and embodied AI robotics—operate under strict online streaming constraints. In these scenarios, frames arrive sequentially, the total video duration is unknown, and the user's query isn't provided until the very end. Naive approaches like fixed-interval sampling easily overflow memory budgets, while offline retrieval methods simply cannot function without a query or future frames.
The authors tackle this gap by formulating Streaming Video Memory (SVMem), a strict online streaming setting where an agent must continuously decide whether to keep or discard incoming frames to maintain a highly representative, fixed-capacity memory buffer.
Methods
The authors introduce SVMemAgent, a lightweight model (195.6M parameters) that executes a two-stage action policy at each timestep: first, it decides whether to discard or retain an incoming frame; if retained, it decides which existing memory slot to replace.
Dual-Branch Architecture
To balance visual content and time progression, the agent splits processing into two streams:
- Semantic Branch: Uses a DINOv3 image encoder and a transformer layer to evaluate the visual content of the incoming frame against the current memory slots and a running average of the global stream context.
- Temporal Branch: Ignores visual features entirely and uses sinusoidal positional encodings of normalized timestamps to ensure the memory maintains uniform temporal coverage across the video.
Two-Stage Training Pipeline
- Stage 1: Cold-Start Training: Because ground-truth labels for query-agnostic streaming are non-existent, the agent is initially trained via supervised learning using heuristic pseudo-labels (maximizing visual novelty and temporal uniformity).
- Stage 2: GRPO with Task-Driven Rewards: The agent is then optimized using Group Relative Policy Optimization (GRPO). During training rollouts, the final memory states are passed to a frozen VideoLLM alongside diverse question-answer pairs. The negative cross-entropy loss (log-probability) of the correct answer serves as the reward signal, teaching the agent a general prior for what makes a frame "informative."
Diversity-Aware Advantage Discounting (DAAD)
A major challenge in training via reinforcement learning here is language bias: VideoLLMs can often guess the correct answer using text priors alone, yielding identical rewards regardless of which frames the agent selected. To prevent this noisy feedback from destabilizing training, the authors introduce DAAD. It calculates a state diversity metric (Jaccard distance) across rollout groups and adaptively discounts the RL advantages when highly diverse memory states yield nearly identical rewards.
Datasets
- Training: Subsets of video-question-answer pairs from the Video-R1 and LongVILA datasets, filtered for videos longer than 64 seconds.
- Offline Evaluation Benchmarks: VideoMME, LongVideoBench, and EgoSchema (where queries are answered after the video stream concludes).
- Online Evaluation Benchmark: RVS-Ego (where queries are posed at arbitrary timestamps mid-stream).
Key Insights and Ideas
- Query-Agnostic Prior Learning: By exposing the agent to a wide distribution of training queries via task-driven rewards, it implicitly learns to identify universally important visual cues, allowing it to function effectively at inference time when no query is present.
- The Necessity of Temporal Uniformity: Ablation studies revealed that the temporal branch alone outperforms the semantic branch alone. In streaming scenarios with unknown durations, maintaining a mathematically uniform spread of frames across time is a safer baseline than relying purely on visual content.
- Emergent Text Preference: Through optimization, SVMemAgent naturally developed a tendency to preserve frames containing textual information (like product labels or signs), recognizing text as critical evidence for downstream QA tasks without any explicit instruction to do so.
Key Results
- Superior Online Performance: SVMemAgent consistently outperformed strict online baselines (FIFO, Reservoir sampling, TimeChat-Online, Flash-VStream, and MA-LMM) across all benchmarks. When paired with an InternVL3.5-8B backbone, it achieved a 57.4% average accuracy, outperforming its closest state-of-the-art online competitor by a significant margin.
- Competitive with Offline Methods: Remarkably, despite having no access to future frames or queries, SVMemAgent achieved performance competitive with—and sometimes superior to—relaxed or offline methods like StreamChat and AKS.
- High Efficiency: Operating at 61.7 FPS with an additional latency of just 16.2 ms per frame, the agent is highly viable for real-time deployment on edge devices.
- Cross-Model Generalization: Although trained using a small InternVL3.5-2B model as its reward evaluator, the learned policy successfully generalized to entirely different downstream architectures like Qwen3-VL-8B.
Limitations and Future Work
- Fixed Frame Rate: The current system assumes a steady stream of 1 FPS. Future iterations will need to handle variable frame rates or bursty streaming inputs.
- Static Memory Capacity: The memory budget ($K$) is fixed during inference. Dynamically scaling the memory capacity based on the complexity of the video stream or hardware constraints remains an open area of research.
- Downstream Bias: While DAAD successfully mitigates language bias during the training of the frame selection policy, the downstream VideoLLM used at inference may still suffer from inherent language biases when generating final answers.
Summary updated