Skip to content

TransMem: Transforming Hidden States into Memory for Large Language Models

Jul 2026 · arXiv.org · Vol abs/2607.29032 · 0 citations · 38 references
Computer Science

TL;DR

TransMem is proposed, a lightweight inference-time parametric memory module that transforms sparse historical hidden states from a frozen LLM backbone into reusable memory representations and introduces evidence-conditioned self-distillation to learn transferable memory utilization rather than task-specific knowledge.

Abstract

Large language model (LLM) agents increasingly operate over long interaction histories, where effective reasoning requires identifying and exploiting task-relevant evidence distributed across past observations and actions. However, useful information encoded in previously computed representations is often underutilized during subsequent generation. We propose \textbf{TransMem}, a lightweight inference-time parametric memory module that transforms sparse historical hidden states from a frozen LLM backbone into reusable memory representations. TransMem uses a lightweight gating network to dynamically apply the latent intervention to the current hidden states, without repeatedly encoding the preceding context. To learn transferable memory utilization rather than task-specific knowledge, we introduce evidence-conditioned self-distillation. A memory-augmented student processes the full context and matches the predictive distribution of an evidence-only teacher that shares the same frozen backbone. Experiments on LoCoMo, HotpotQA, and MemoryAgentBench demonstrate consistent improvements across different model architectures and scales. TransMem yields gains of 11.58--29.25 $F_1$ on LoCoMo and 10.20--13.03 $F_1$ on HotpotQA, while improving the average MemoryAgentBench accuracy from 29.54\% to 40.00\%. These results establish sparse historical hidden states as an effective and efficient memory substrate for long-context LLM agents. Our code is available at https://github.com/Haodong-Lei-Ray/TransMem.

View source

Similar papers

Jul 2026

Penelope: Localized Latent Recurrence for Efficient Structured Reasoning

Penelope is introduced, an efficient latent-reasoning framework for pretrained decoder-only Transformers that localizes recurrent computation to a selected decoder interval and attains competitive accuracy relative to established latent-reasoning models while reducing measured inference latency.

Yutong Chen, Shouqian Shi, Xin-Ran Liu et al. · 0 citations
Preprint Aug 2026

Stop When Memory Suffices: Evidence-Conditioned Progressive Execution for LLM Agents

This work introduces Router-Mem, an evidence-conditioned progressive execution framework for long-horizon agent memory that is trained with evidence-level supervision and rationale-conditioned representation distillation and achieves strong answer quality while maintaining low online latency.

Yi-Dan Lin, Kai-Xiang Wang, Jiong Lou et al. · 1 citation
#natural language process... Preprint Sep 2026

Lngram v2: Latent N-Gram Memory with Interpretable Discrete Representations

Analysis shows that Lngram v2 substantially reduces both total and activated memory parameters while maintaining or improving language modeling performance, and shows that its discrete IDs preserve substantial semantic structure of continuous hidden states, enabling semantic recovery from IDs alone and stable ID--seman...

Yun Zheng, Bin Wen, Xiao-Jie Wang et al. · 0 citations
Preprint Aug 2026

DART: Decoded Attention over Recurrent States for Efficient Long-Context Sequence Modeling

DART (Decoded Attention over Recurrent sTates), which retains the chunk state contributions produced by the Mamba-2 chunked scan as chunk state memories, decodes token-conditioned keys and values from these memories, and performs state-memory attention (SMA) over the resulting KV pairs.

Yixiao Qian, Song Chen, Pengkai Wang et al. · 0 citations
Preprint Aug 2026

Architecture-Dependent Causal Transfer of Activation States Across Large Language Models

End-to-end activation-state transfer between LLMs, as currently implemented, is architecture-dependent rather than universal, and it is concluded that end-to-end activation-state transfer between LLMs is architecture-dependent rather than universal.

Fernando Cardenas Piepereit · 3 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.