Papers › Mela: Test-Time Memory Consolidation based on Transformation Hypothesis

Mela: Test-Time Memory Consolidation based on Transformation Hypothesis

11 May 2026arXiv:2605.10537added by Syntology

Lungchuan Chen

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

Memory consolidation, the process by which transient experiences are transformed into stable, structured representations, is a foundational organizing principle in the human brain, yet it remains largely unexplored as a design principle for modern sequence models. In this work, we leverage established neuroscientific theories of memory consolidation and cross-frequency coupling to propose the Hierarchical Memory Module (HMM), a neural memory architecture composed of two functionally distinct sub-modules that operate at different update frequencies. Inspired by the transformation hypothesis, the low-frequency sub-module produces high-level representations that capture abstract, gist-level knowledge, while the high-frequency sub-module produces fine-grained representations that preserve richer episodic detail. The final memory output is dynamically reconstructed as a context-dependent combination of both representations, analogous to the reconstructive nature of human memory retrieval. We integrate HMM into a Transformer-based language decoder to form Mela, a family of memory-augmented language models that perform online memory consolidation at test time. To further exploit the multi-granularity memory representations produced by HMM, we introduce MemStack, a method that distributes different levels of memory features across the early layers of the decoder without introducing additional tokens. Experiments on language modeling demonstrate that Mela outperforms Transformer baselines across all the model sizes. Moreover, with the pretrained context length fixed at 4K, Mela maintains performance on significantly longer contexts, whereas Transformer baselines degrade rapidly beyond their training length. Extensive ablation studies validate the contribution of each component and provide guidance for practical configuration.

PaperPDFCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2605.10537")

Code

Syntology Ran 10 of 10 code samples harvested from 1 repository linked to this paper; 0 have no recorded run. Of those that ran: 1 ran · violated contract; 2 ran · our draft was wrong; 2 ran · fixture could not drive it; 5 ran with no contract checked.

By repository: found in paper text by Syntology: 10 samples from 1 repository, 10 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Musubi-ai/Mela found in paper text by Syntology report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

10 samples harvested; 10 ran; 0 honoured the contract we drafted; 0 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · violated contract
2ran · our draft was wrong
2ran · fixture could not drive it
5ran

Licence: 0 of the 10 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from Musubi-ai/Mela. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

repeat_kv Musubi-ai/Mela/mela/model/modeling_mela.py found in paper text by Syntology ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 3c76e52815c5401d · report
apply_rotary_pos_emb Musubi-ai/Mela/mela/model/commons.py found in paper text by Syntology ran · our draft was wrong Apache-2.0 (permissive) · 583539efd6fd01fb · report
associative_loss Musubi-ai/Mela/mela/model/memory_functions.py found in paper text by Syntology ran fingerprinted Apache-2.0 (permissive) · 8ad20b8953074ff7 · report
chunked_associative_scan Musubi-ai/Mela/mela/model/optimized_assoc_scan.py found in paper text by Syntology ran Apache-2.0 (permissive) · e36fba42acfe90e3 · report
eager_attention_forward Musubi-ai/Mela/mela/model/modeling_mela.py found in paper text by Syntology ran Apache-2.0 (permissive) · e0f7e52d8d40e0e1 · report
eager_segment_attention_forward Musubi-ai/Mela/mela/model/modeling_mela.py found in paper text by Syntology ran Apache-2.0 (permissive) · 9e080bec60979a84 · report
exists Musubi-ai/Mela/mela/model/optimized_assoc_scan.py found in paper text by Syntology ran · violated contract fingerprinted Apache-2.0 (permissive) · b7c3487f192e31b7 · report
pad_at_dim Musubi-ai/Mela/mela/model/optimized_assoc_scan.py found in paper text by Syntology ran · fixture could not drive it Apache-2.0 (permissive) · e62e48a00ed06f63 · report
rotate_half Musubi-ai/Mela/mela/model/commons.py found in paper text by Syntology ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · e03d53ba9d4f9ae5 · report
softcapping Musubi-ai/Mela/mela/model/commons.py found in paper text by Syntology ran fingerprinted Apache-2.0 (permissive) · dd7d7cc8c2612b17 · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2605.10537, was issued in May 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections