Learning Compact State Abstractions for LLM Agents
Organizations: University of Massachusetts Amherst · Adobe Research
Abstract
LLM agents commonly use the full interaction history as a proxy for state, retaining all past observations and actions regardless of whether they remain relevant. We instead ask what information an agent actually needs to carry forward. We define agent state as a compact abstraction of interaction history that preserves the competence of a fixed reference agent, with the minimal such abstraction as the ideal. Because matching the reference agent's behavior is unnecessarily restrictive and difficult for black-box policies, we define sufficiency through task performance rather than behavior matching. We represent state abstractions as deterministic recursive programs and search over them using an LLM-guided genetic algorithm. Across ALFWorld and ScienceWorld, the learned abstractions preserve near-reference task success while reducing mean policy input by up to 71% and 57%, respectively. The resulting programs are directly inspectable, providing an explicit account of what information is retained, updated, and discarded during interaction.
Figures & tables
| Full | Ours | LLM-S | ACON | |||||
|---|---|---|---|---|---|---|---|---|
| ALFWorld task | Succ. | Tok. | Succ. | Tok. | Succ. | Tok. | Succ. | Tok. |
| Pick & Place | 1.00 | 281 | 0.96 | 82 (71%) | 0.94 | 211 (25%) | 1.00 | 183 (35%) |
| Look in Light | 0.95 | 296 | 1.00 | 247 (17%) | 0.95 | 207 (30%) | 0.83 | 200 (32%) |
| Clean & Place | 0.74 | 519 | 0.72 | 245 (53%) | 0.67 | 245 (53%) | 0.67 | 207 (60%) |
| Heat & Place | 0.74 | 555 | 0.85 | 172 (69%) | 0.63 | 256 (54%) | 0.25 | 201 (64%) |
| Cool & Place | 0.76 | 561 | 0.74 | 167 (70%) | 0.59 | 252 (55%) | 0.83 | 216 (61%) |
| Full | Ours | LLM-S | ACON | |||||
|---|---|---|---|---|---|---|---|---|
| ScienceWorld task | Succ. | Tok. | Succ. | Tok. | Succ. | Tok. | Succ. | Tok. |
| Lifespan | 1.00 | 260 | 0.92 | 136 (48%) | 0.92 | 236 (9%) | 0.83 | 229 (12%) |
| Forces | 0.42 | 394 | 0.75 | 412 (+5%) | 0.33 | 265 (33%) | 0.50 | 208 (47%) |
| Classification | 0.50 | 395 | 0.44 | 169 (57%) | 0.50 | 246 (38%) | 0.38 | 239 (39%) |
| Genetics | 0.67 | 401 | 0.83 | 247 (38%) | 0.58 | 237 (41%) | 0.58 | 209 (48%) |
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| Task family | Persistent information retained |
|---|---|
| ALFWorld | |
| Pick & Place | current location, target and destination, held object, search frontier, searched receptacles, task phase |
| Look in Light | object locations, receptacle contents, open/closed state, device state, examination results, recent observations |
| Clean & Place | location, held object, target locations, cleanliness, receptacle contents, searched locations, task completion |
| Heat & Place | target identity and location, required condition, object property, container state, task phase |
| Cool & Place | target identity and location, required transformation, container state, searched locations, task phase |
| Task family | Program LOC | State fields |
|---|---|---|
| ALFWorld | ||
| Pick & Place | 278 | 11 |
| Look in Light | 174 | 11 |
| Clean & Place | 297 | 15 |
| Heat & Place | 428 | 18 |
| Cool & Place | 358 | 18 |
| Hyperparameter | Value |
|---|---|
| Initial population size | 1 |
| Population size | 8 |
| Search iterations | 10 (ALFWorld), 5 (ScienceWorld) |
| Tournament size | 3 |
| Crossover probability | 0.5 |
| Proposer model | GPT-5.6 Luna |
| Success | Paired diff. method | Paired diff. per run | |
| Method | (mean std, 3 runs) | (95% CI) | (run 1 / 2 / 3) |
| – | – | ||
| Full history | pp | / / | |
| Token-matched window | pp | / / |
| Task family | Full history | Token-matched window | ||
|---|---|---|---|---|
| Pick & Place | 47 | |||
| Look in Light | 19 | |||
| Clean & Place | 46 | |||
| Heat & Place | 27 | |||
| Cool & Place | 34 | |||
| Two Objects | 29 |
| Task family | Matched | last- success |
|---|---|---|
| Pick & Place | 2 | +25.5 pp |
| Heat & Place | 6 | +24.7 pp |
| Cool & Place | 6 | +11.7 pp |
| Pooled | – | +10.0 pp |
| Split | full history | 95% CI | |
|---|---|---|---|
| Seen | 68 | +1.5 pp | |
| Unseen | 134 | -1.5 pp |
| Task | Full@Qwen | @Qwen | Token reduction |
|---|---|---|---|
| Pick & Place | 1.00 | 0.96 | 68% |
| Look in Light | 0.95 | 0.84 | 6% |
| Clean & Place | 0.83 | 0.78 | 46% |
| Heat & Place | 0.78 | 0.85 | 69% |
| Cool & Place | 0.94 | 0.94 | 64% |
| Two Objects | 0.86 | 0.90 | 0% |
| Full history | ||
|---|---|---|
| Mean tokens per call | 3,967 | 218 (95%) |
| Tokens per call at step cap | 27.5k | 250 |
| Tokens added per step | 48.5 | 0.06 |
| Tokens per episode | 1.89M | 66k |
| Task family | Meta-LLM calls | Meta-LLM tokens | Rollouts |
|---|---|---|---|
| Pick & Place | 126 | 2.0M | 768 |
| Look in Light | 74 | 1.2M | 456 |
| Clean & Place | 148 | 3.8M | 888 |
| Heat & Place | 139 | 3.4M | 828 |
| Cool & Place | 146 | 3.6M | 888 |
| Two Objects | 80 | 1.5M | 492 |
| ALFWorld | ScienceWorld | |||
|---|---|---|---|---|
| Category | Share | Per step | Share | Per step |
| Target / goal | 22.8% | 0.97 | 10.0% | 0.23 |
| Current location | 16.3% | 0.66 | 7.3% | 0.17 |
| Exploration memory | 20.4% | 0.72 | 0.0% | 0.00 |
| Object & container knowledge | 21.0% | 0.83 | 42.5% | 0.85 |
| Inventory | 3.8% | 0.19 | 4.8% | 0.06 |
| Hidden field group | Families | Change in success | 95% CI |
|---|---|---|---|
| Progress & control | 7 | pp | |
| Exploration memory | 5 | pp | |
| Recent observations | 4 | pp | |
| Object & container knowledge | 8 | pp | |
| Last action / result | 5 | pp | |
| Inventory | 7 | pp |
State Abstraction
State abstraction studies how to compress states in decision and dynamical systems while preserving the information needed for prediction, planning, or control.
See all 31 papers