TL;DR
Resolution as Attention (RAA) introduces a new dimension to LLM agent memory: perceptual granularity. By rendering past interactions as images and dynamically adjusting their resolution based on relevance, RAA reduces token consumption by over 50% without sacrificing task performance, effectively treating visual clarity as a form of attention.
What Problem Does This Paper Address?
As LLM-based agents tackle increasingly complex, long-horizon tasks—like software engineering or multi-step web research—their interaction histories explode. This "context bloat" makes memory management a survival requirement for scalability.
Current approaches generally fall into two camps:
- Retrieval: Deciding what to remember. If the retriever misses a crucial detail, it's gone from the agent's view.
- Compression: Deciding how to summarize. This often discards fine-grained details (like a specific variable name or error code) that might become critical later.
Recent "optical compression" methods render text into images to save tokens, but they typically apply a uniform compression rate. The authors argue that not all past interactions are equally important at every step. An agent doesn't need to "see" a setup step from ten minutes ago in high definition if it's currently focused on a different sub-task, but it might need that detail back later.
Methods
The core idea of Resolution as Attention (RAA) is to treat image resolution as a proxy for attention. The system consists of a lightweight perception layer that sits in front of a frozen, vision-capable LLM agent.
The workflow follows four main steps:
- Rendering: Each past interaction (reasoning, action, observation) is rendered into a canonical image.
- Relevance Estimation: A lightweight model (fine-tuned from Qwen3-Reranker-0.6B) scores each past interaction's relevance to the current task and the latest interaction.
- Resolution Mapping: A learnable sigmoid function maps these relevance scores to a resolution scale (from 0 to 1).
- Perception: The canonical images are resized according to their assigned scales. Highly relevant steps remain crisp; irrelevant ones become blurry thumbnails.
Training Strategy: The authors used a two-stage training process. First, Relevance Supervision distills "decision relevance" from a larger teacher model. Second, Resolution Reinforcement uses Group Relative Policy Optimization (GRPO) to fine-tune the estimator. The reward function balances two goals: maintaining "decision fidelity" (making sure the agent makes the same choice it would with full text) and maximizing "token savings."
Datasets
The models were trained and evaluated on benchmarks designed for long-horizon agentic reasoning:
- Training: 12,000 decision histories collected from 1,853 ClawGym training tasks.
- Evaluation:
- ClawGym-Bench: 200 tasks across categories like Software Dev and Planning.
- AppWorld: 168 tasks requiring code-based interaction with simulated apps (used to test generalization).
Key Insights and Ideas
- Quadratic Efficiency: Because image tokens scale quadratically with resolution ($s^2$), even a modest reduction in resolution leads to massive token savings.
- Non-Destructive Memory: Unlike textual pruning or summarization, RAA is non-destructive. If an interaction that was "blurred" at step 10 becomes relevant again at step 50, the system can simply re-render it at high resolution.
- Plug-and-Play Compatibility: RAA is orthogonal to existing methods. It can be layered on top of retrieval or summarization systems to provide "adaptive perception" on whatever content those systems decide to keep.
- Cross-Agent Transfer: A perception layer trained using one agent (e.g., Qwen-3.8B) generalizes well to others (e.g., Kimi-K3) without further fine-tuning.
Key Results
RAA consistently outperformed representative baselines (FIFO, LongLLMLingua, AgentOCR) across multiple backbones:
- Token Reduction: Achieved history token savings of 57.5% on Qwen-3.8-27B, 51.5% on Qwen-3.6-27B, and 55.9% on Kimi-K3.
- Performance Maintenance: Despite the massive token cuts, task scores remained comparable to the "Vanilla" approach (which uses the full, uncompressed history).
- Latency: The overhead for relevance estimation and rendering is minimal, accounting for only 2.51% of the end-to-end latency.
Limitations and Future Work
- Consistency vs. Correctness: The current RL objective rewards the agent for being consistent with its full-text self. If the base agent makes a mistake, RAA will try to preserve that mistake rather than correcting it. Future work could incorporate task-success rewards.
- Prefix Caching: Dynamically changing the resolution of past interactions at every step breaks KV-cache prefix sharing, which is a common optimization for long-context LLMs. Developing "cache-aware" perception policies is a key next step.
- OCR Bottleneck: The system's effectiveness is strictly bounded by the vision-LLM's OCR capabilities. If the backbone cannot read small text well, the "blurriness" threshold for RAA becomes much higher.
Summary updated