SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.29032 · 2026

TransMem: Transforming Hidden States into Memory for Large Language Models

Botian Shi, Pinlong Cai, Yirong Chen, Ding Wang, Hongsong Wang, Haodong Lei, Junming Liu

arXiv · PDF · Open in the Atlas

Code that ran

2 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 1 failure of our instrument; 4 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2607.29032.json · badge: /api/ran/2607.29032.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
Haodong-Lei-Ray/TransMem community
Papers with Code archive
2 ran · 4 no recorded run
FunctionStatusWhere it lives
build_additive_causal_mask Ran
ran, honoured the contract we drafted
Haodong-Lei-Ray/TransMem/transmem/transmem.py
pointer only (licence: NONE) · get_code("8d39ac93f0469c12")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Haodong-Lei-Ray/TransMem when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

to_qwen3_config Ran
ran; our contract draft was wrong, not the code
Haodong-Lei-Ray/TransMem/transmem/transmem.py
pointer only (licence: NONE) · get_code("d07b8393b37841a4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Haodong-Lei-Ray/TransMem when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

TransMem Not yet run
unverified (harvested, no recorded run)
Haodong-Lei-Ray/TransMem/transmem/transmem.py
pointer only (licence: NONE) · get_code("f28292f9bd5e497d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Haodong-Lei-Ray/TransMem when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

TransMemConfig Not yet run
unverified (harvested, no recorded run)
Haodong-Lei-Ray/TransMem/transmem/transmem.py
pointer only (licence: NONE) · get_code("7f8a97e419eceb46")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Haodong-Lei-Ray/TransMem when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

TransMemOutput Not yet run
unverified (harvested, no recorded run)
Haodong-Lei-Ray/TransMem/transmem/transmem.py
pointer only (licence: NONE) · get_code("5378ad9169c5726e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Haodong-Lei-Ray/TransMem when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

copy_top_layers_from_backbone Not yet run
unverified (harvested, no recorded run)
Haodong-Lei-Ray/TransMem/transmem/transmem.py
pointer only (licence: NONE) · get_code("f874613a587f4e1a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Haodong-Lei-Ray/TransMem when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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 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 taskspecific knowledge, we introduce evidence-conditioned selfdistillation. A memory-augmented student processes the full context and matches the predictive distribution of an evidenceonly 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 F1 on LoCoMo and 10.20-13.03 F1 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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2607.29032")
get_code_for_paper("2607.29032")
have("2607.29032")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2607.29032.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2607.29032.svg)](https://syntology.ai/paper/2607.29032)

Connect an agent — have() is free.