In-Model Context Compression with Agentic Soft Tokens for Long-Horizon LLM Agents
Xuning He, Kai Fan, Runyu Zhang, Binghuan Wang, Yuxiang Zhang, Xue Jiang, Yihong Dong
Abstract
Long-horizon LLM agents play an important role in solving complex and sustained tasks, with ever-growing interaction contexts. However, these accumulated contexts will raise substantial computational cost and obscure key decision-relevant evidence. Existing methods typically train external compressors or context-management agents to rewrite context as shorter hard-token sequences, but such external selection may not align with the LLM's evolving representation and is necessarily lossy. In this paper, we introduce Agentic Soft-Token Compression (ASTC), a training-free compression method using soft tokens within LLM agent for long-horizon tasks. Specifically, ASTC uses the model's native recurrent dynamics to determine the already absorbed information, leveraging the commonly-used hybrid Gated Delta Network (GDN)-attention. It then carries this information forward as agentic soft tokens while retaining exact values as hard tokens. The resulting compact sequence reduces later-layer computation and yields reusable KV caches, extending the savings across the agent's trajectory. Extensive experiments on long-horizon tasks show that ASTC matches or exceeds the uncompressed agent's accuracy with up to 59.84% fewer end-to-end Attention Pairs, while trained compressors require 12.3 to 194.9 times more Attention Pairs per successful task. These findings highlight agentic soft tokens as a model-native way to carry absorbed context forward as the task representation evolves.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI, cs.LG, cs.NE
- Comments
- 29 pages, 7 figures, 13 tables. Code: https://github.com/RISE-X-Lab/Agentic-Soft-Token
Related papers
MemRole: From Memories to Decisions for Long-Horizon Reasoning in Role-Playing Agents
Shared title terminologycs.CLMengting Li, Xilong Cheng, Zhihao Xiao et al.
KEEPER: Learning Control-Sufficient Textual Memory for Long-Horizon LLM Agents
Shared title terminologycs.CLJinkyeong Choi, Chaebin Jeong, Junsung Jeon et al.
Don't Lose the Thread: Empowering Long-Horizon LLM Agents with Cognitive Resource Self-Allocation
Shared title terminologycs.CLZheng Zhu, Xiaozhuan Liang, Xi Chen et al.
MERIT: Experience-Guided Memory for Long-Horizon Persona-Specific Persuasive Dialogue
Shared title terminologycs.CLRohan Kirti, Akash Ghosh, Pratik Amrit et al.
ContextFact: Remembering Facts in Context for Long-Term Conversational Agents
Shared title terminologycs.CLJiayu Huang, Yichao Cai, Xinyu Li et al.
TrackMem: Tracking Evolving Beliefs in Long-Horizon Financial Dialogue
Shared title terminologycs.CLAustin M. Y. Cheung, Harsh Vardhan Gupta, Go Nam Lui et al.