Recurrent Visual Memory for Infinite-Context Trajectories
Enable infinite-context interactions in long-horizon agents by introducing a recurrent visual memory module that passes compressed latent representations between trajectory segments.
Time
Compute level
Resources
What the paper used
Prerequisites
Scope
The Gap
Section 3.1.2 notes that 'a complete interaction trajectory can quickly exceed the model's context length,' forcing the authors to 'segment each full multi-turn trajectory into several single-step data instances for the policy update.'
“To manage this, we segment each full multi-turn trajectory into several single-step data instances for the policy update.”
Limitation
Segmentation severs the gradient flow and temporal context between distant steps. The model loses the ability to track state changes over long horizons (e.g., remembering a value seen 15 steps ago), as the attention mechanism is reset or limited to the current segment during training.
Proposed Solution
Modify the model architecture to include a recurrent memory module (e.g., Transformer-XL style recurrence or a learnable 'Memory Token'). Instead of segmenting trajectories into independent samples, pass a compressed latent representation of the visual history between segments, allowing the model to train on effectively infinite-length contexts.
Why This Matters
Enables the agent to solve tasks requiring long-term working memory, which is essential for complex data entry or multi-app cross-referencing tasks.
How to Get Started
How to test it: Hypothesis: Adding a recurrent memory token will retain temporal context across segmented trajectories and improve long-horizon accuracy. Baseline: Segmented trajectory model without recurrence. Metric: Multi-step task success rate on AndroidWorld. Stop if memory overhead causes out-of-memory errors without accuracy gains.
- Modify the agent architecture to incorporate a Transformer-XL style recurrence or learnable memory token mechanism.
- Adapt the training data pipeline to process continuous multi-turn trajectories without independent segmentation.
- Train the recurrent model on long-horizon tasks using a large compute cluster to stabilize latent memory updates.
- Benchmark the memory-augmented agent on long-context datasets against the original segmented baseline.
Code linked to this paper on Hugging Face: github.com/X-PLUG/MobileAgent
Suggested by AI. Adapt it to your setup.
Has This Been Done?
Papers such as 'Look Back to Reason Forward: Revisitable Memory for Long-Context LLM Agents' and 'ELMUR: External Layer Memory with Update/Rewrite for Long-Horizon RL Problems' investigate memory modules and external layers for long-horizon agent problems. They do not, however, implement the specific Transformer-XL style recurrence or learnable 'Memory Token' for passing compressed latent representations of visual history across trajectory segments as outlined.
- Look Back to Reason Forward: Revisitable Memory for Long-Context LLM Agents · 2025 · 33 citations
- ELMUR: External Layer Memory with Update/Rewrite for Long-Horizon RL Problems · 2025 · 12 citations
We searched OpenAlex for “Enable infinite-context interactions in long-horizon agents by introducing a recurrent visual memory module that passes compressed latent representations between trajectory segments.” and “Recurrent Visual Memory for Infinite-Context Trajectories” and an AI compared the idea with the top 10 results. A small search can miss relevant work.
Source Paper
Mobile-Agent-v3: Foundamental Agents for GUI AutomationJiabo Ye, Xi Zhang, Haiyang Xu +12 more · 2025
This paper presents GUI-Owl and Mobile-Agent-v3, a foundational end-to-end multimodal model and multi-agent framework designed for cross-platform GUI automation (Mobile, PC, Web). The authors introduce a self-evolving data production pipeline that synthesizes large-scale training data through model rollouts, critic-based filtering, and VLM-generated guidance, followed by a scalable reinforcement learning framework using Trajectory-aware Relative Policy Optimization (TRPO) to handle long-horizon tasks.
Related Ideas
- Neural Explicit Memory for Consistent Multi-Agent World SimulationSolaris: Building a Multiplayer Video World Model in Minecraft🟠Medium
- Visual Token Compression for Extended Context HistoryFara-7B: An Efficient Agentic Model for Computer Use🔴Hard
- Hierarchical Decay Mechanisms for Infinite-Context MemorytttLRM: Test-Time Training for Long Context and Autoregressive 3D Reconstruction🟡Fairly easy
- Compressive Memory for Agentic ContextsGLM-5: from Vibe Coding to Agentic Engineering🟠Medium
- Persistent Identity Memory ModuleStable Video Infinity: Infinite-Length Video Generation with Error Recycling🟡Fairly easy