ENGRAM: From Agent Experience to Weights through Verified Consolidation
Organizations: University of New South Wales · The Hong Kong University of Science and Technology (Guangzhou)
Abstract
Language-model agents use experience through external retrieval and parameter learning. Consolidating stored experience into model weights requires deciding both which experience to train on and when its external records can leave retrieval. Admission based solely on student mastery can exclude useful teacher demonstrations, while removal immediately after training can discard guidance that the model still needs. We introduce ENGRAM, a framework that separates training admission from memory release. A demonstration-aware gate admits skills based on student mastery or sufficient successful teacher demonstrations. The student learns from selected action traces with context from an Engram Trace Graph (ETG). A verification gate then compares the updated model without episodic retrieval against the base model with retrieval on reserved probes. Release requires valid training participation and scores meeting both relative and absolute criteria; records for skills that fail verification remain retrievable. Experiments across interactive and reasoning benchmarks show consistent gains over frozen-weight ETG controls, with ablations supporting demonstration-aware admission and selective adapter activation. A controlled held-out comparison shows that verified release substantially reduces the retrievable footprint while remaining close to retain-all performance and outperforming immediate and budget-matched random release. ENGRAM also improves task performance while reducing input-token usage and model calls. Skill-level verification further reduces retrievable experience through selective archival, retaining external guidance for skills that do not meet the release criteria. Code is available in anonymous.4open.science/r/engram-anonymous.
Figures & tables
| Method | W | M | Adaptation mechanism |
|---|---|---|---|
| RISE ( 2024 ) | – | Learning multi-turn revision | |
| Agent-Pro ( 2024 ) | – | Updating beliefs and behavioral policies | |
| SEAL ( 2025 ) | – | Generating self-edits for parameter updates | |
| EvolveR ( 2025 ) | Distilling strategic principles and learning the policy | ||
| AgentEvolver ( 2025 ) | Generating tasks and reusing experience for policy learning | ||
| MAGE ( 2026 ) | – | Updating skills, graph memory, and strategies |
| Task / Metric | BALROG | MAGE | Engram |
|---|---|---|---|
| Crafter / Progress / Peak Prog. |
| Variant | Crafter | ALFWorld | WebShop | HotpotQA | WebQ | FinQA |
|---|---|---|---|---|---|---|
| Full Engram | 34.2 | 90.3 | 83.4 | 71.5 | 53.7 | 69.3 |
| Mastery-only admission | 30.5 | 85.8 | 79.6 | 68.3 | 51.8 | 66.6 |
| ETG with frozen weights | 26.9 | 82.1 | 75.0 | 64.2 | 50.6 | 64.0 |
| Without activation gate | 32.7 | 87.3 | 80.8 | 70.1 | 52.6 | 68.1 |
| SFT, no inference ETG | 30.8 | 85.1 | 78.6 | 68.0 | 51.5 | 66.9 |
| Held-out performance | ETG records | ||||
|---|---|---|---|---|---|
| Release policy | EM | F1 | F1 [95% CI] | Retrievable | Archived |
| Retain all | 54.4 | 71.1 | Reference | 600 | 0 |
| Immediate release | 50.9 | 66.8 | 13 | 587 | |
| Random release | 51.6 | 67.6 | 269 | 331 | |
| Verified release | 54.0 | 70.9 | 269 | 331 | |
| Benchmark | Method | Time (s) | Calls | Input (k) | Output (k) | SR / F1 (%; pp) |
|---|---|---|---|---|---|---|
| ALFWorld | ReAct-style | 50.27 | 36.50 | 73.64 | 1.95 | 57.0(-33.3) |
| Reflexion | 167.86 | 104.33 | 252.86 | 6.92 | 42.7(-47.6) | |
| Base + ETG | 43.76 | 29.50 | 81.24 | 1.66 | ||
| SFT, no inference ETG | 60.53 | 22.58 | 35.76 | 1.30 | ||
| Engram | 65.91 | 25.50 | 46.50 | 1.51 | 90.3 | |
| WebQuestions | CoT | 1.56 | 1.00 | 1.74 | 0.07 | 37.8(-15.9) |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Task / Metric | BALROG | MAGE | Engram |
|---|---|---|---|
| Crafter / Progress |
| Setting | ALFWorld | WebShop | WebQuestions | Crafter |
| Maximum training tokens | 16,384 | 8,192 | 8,192 | 8,192 |
| Data passes | 3 | 3 | 3 | 3 |
| Optimizer updates | 5,004 | 2,149 | 450 | 1,281 |
| Training seed | 42 | 42 | 42 | 42 |
| Learning rate | ||||
| LoRA rank / scaling | 16 / 32 | 16 / 32 | 16 / 32 | 16 / 32 |
| Setting | ALFWorld | WebShop | WebQuestions | Crafter |
| Maximum training tokens | 16,384 | 8,192 | 8,192 | 8,192 |
| Data passes | 3 | 3 | 3 | 3 |
| Optimizer updates | 5,004 | 2,149 | 450 | 1,281 |
| Training seed | 42 | 42 | 42 | 42 |
| Learning rate | ||||
| LoRA rank / scaling | 16 / 32 | 16 / 32 | 16 / 32 | 16 / 32 |
| Step | Executed action | Policy / experience access |
|---|---|---|
| 1 | search[...navy blue 3x-large] | Base + retained ETG |
| 2 | click[b01hqtwl6s] | Approved adapter; ETG off |
| 3 | click[navy blue] | Approved adapter; ETG off |
| 4 | click[3x-large] | Approved adapter; ETG off |
| 5 | click[buy now] | Approved adapter; ETG off |