LSTMem: Hierarchical Long Short-Term Online Memory for Large Language Models
Not on the map. Why?
Abstract (arXiv)
Large language models increasingly serve as long-horizon assistants and agents, where they must both accumulate information across interactions and make the relevant parts available when later requests depend on them. Existing compact online memories typically use a single persistent state both to accumulate history and to serve readout, so what the memory stores cannot be controlled separately from what it exposes to the current computation. We propose LSTMem, an LSTM-inspired online memory that instead equips each layer of a frozen LLM with two matrix-valued states: a cell state that accumulates history and a hidden state whose readouts correct the backbone's attention. Input and forget gates control what the cell stores, while an output gate separately controls what the cell exposes through the hidden state. LSTMem further connects memory across depth through forward hidden-state propagation and block-end feedback, and uses higher-layer reconstruction gradients to refine lower-layer cell states before rebuilding hidden states from shallow to deep layers. Across memory benchmarks on Qwen3-4B-Instruct, LSTMem consistently improves MemoryAgentBench, LoCoMo, and HotpotQA over the plain backbone. Comparisons further show that the LSTM-based memory formulation outperforms an associative-memory counterpart, while removing cross-layer hidden-memory propagation degrades performance. These results demonstrate the benefits of separating memory accumulation from memory expression and organizing memory hierarchically across model depth. The code is available at https://github.com/Longchentong/LSTMem.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 60 of its 67 references that are in the map. First posted on arXiv 27 Sep 2026.
Builds on
60 of 67 references.
References · 60
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2025Qwen3 Technical Reportcited by 8,820
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,754
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,568
- 2023GPQA: A Graduate-Level Google-Proof Q&A Benchmarkcited by 2,879
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,737
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,389
38 more
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
- 2019ZeRO: Memory Optimizations Toward Training Trillion Parameter Modelscited by 1,301
- 2023Instruction-Following Evaluation for Large Language Modelscited by 1,228
- 2025A-MEM: Agentic Memory for LLM Agentscited by 1,063
- 2024Evaluating Very Long-Term Conversational Memory of LLM Agentscited by 830
- 2025Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memorycited by 779
- 2024LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memorycited by 707
- 2024A Survey on the Memory Mechanism of Large Language Model based Agentscited by 634
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 613
- 2023MemoryBank: Enhancing Large Language Models with Long-Term Memorycited by 556
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 532
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 514
- 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 502
- 2021A Dataset of Information-Seeking Questions and Answers Anchored in Research Paperscited by 486
- 2025LLMs Get Lost In Multi-Turn Conversationcited by 429
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 396
- 2024∞Bench: Extending Long Context Evaluation Beyond 100K Tokenscited by 367
- 2023Adapting Language Models to Compress Contextscited by 356
- 2024Learning to (Learn at Test Time): RNNs with Expressive Hidden Statescited by 355
- 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 348
- 2024LoRA Learns Less and Forgets Lesscited by 328
- 2024Titans: Learning to Memorize at Test Timecited by 328
- 2024xLSTM: Extended Long Short-Term Memorycited by 327
- 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Modelscited by 287
- 2025Evaluating Memory in LLM Agents via Incremental Multi-Turn Interactionscited by 254
- 2025MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory Agentcited by 246
- 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attentioncited by 200
- 2023In-context Autoencoder for Context Compression in a Large Language Modelcited by 199
- 2025Kimi Linear: An Expressive, Efficient Attention Architecturecited by 196
- 2024Eagle and Finch: RWKV with Matrix-Valued States and Dynamic Recurrencecited by 159
- 2024HGRN2: Gated Linear RNNs with State Expansioncited by 127
- 2025Context Length Alone Hurts LLM Performance Despite Perfect Retrievalcited by 127
- 2025MemGen: Weaving Generative Latent Memory for Self-Evolving Agentscited by 109
- 2024MEMORYLLM: Towards Self-Updatable Large Language Modelscited by 93
- 2025Test-time regression: a unifying framework for designing sequence models with associative memorycited by 74
- 2025ATLAS: Learning to Optimally Memorize the Context at Test Timecited by 66
- 2024Longhorn: State Space Models are Amortized Online Learnerscited by 59
50 most cited of 60 All 60 (JSON)
Built on by
Not cited yet.