Auto-regressive method reduces memory use in language model agents
ARSM: Auto-Regressive State Machine for Agentic Reasoning Compression
Computation and Language
Summary
Language model agents working on long tasks face a big problem: their memory fills up quickly, slowing them down. The authors introduce ARSM, which organizes past interactions into small, meaningful chunks and uses a state machine to manage memory efficiently without extra training. This method keeps the agents performing well but uses fewer memory tokens, making them more practical for long, complex tasks. They tested ARSM on various benchmark tasks and showed it saves memory while maintaining accuracy.
What this means in practice
- •For autonomous agent developers: Cut memory usage in language model-based agents running long multi-step tasks without losing task accuracy.
- •For conversational ai engineers: Design conversational systems that maintain consistent decisions over long dialogues by compressing interaction histories efficiently.
Authors
Xiafeng Man, Siyuan Ye, Xiaosong Ma
Abstract
While Large Language Model (LLM)-based agents demonstrate strong capabilities in long-horizon tasks by interleaving reasoning with external environment interactions, the continuous accumulation of context rapidly creates a critical memory bottleneck. Existing memory compression methods rely on task-specific optimization or external auxiliary models, introducing significant computational overhead. Furthermore, the resulting compressed representations tend to lose structured relationships, leading to information dilution, attention collapse, and degraded decision consistency. To address these limitations, we propose Auto-Regressive State Machine (ARSM), a lightweight training-free framework that enables in-situ reasoning compression through structured state evolution. ARSM introduces two key components: (i) a trajectory abstraction mechanism that reorganizes interaction histories into compact Hypothesis-Action-Result (HAR) micro-chains; (ii) a dynamic state machine that regulates hierarchical memory through atomic operations and a compression-control parameter. These components are unified within an auto-regressive, self-compressive generation space, where each model output jointly performs external action execution and internal state updates. We evaluate ARSM on Webshop, Multi-Objective Multi-Hop QA, and SWE-Bench Lite datasets. Experimental results show that ARSM maintains the task performance while simultaneously reducing token consumption, offering a practical, cost-effective route toward scalable autonomous agents for long-horizon tasks.