MoNe: modular neural memory for long context without fine-tuning and with O(1) querying

28 August 202624 views

MoNe, a new module, connects to any frozen transformer model and processes long texts in blocks, fine-tuning directly during the testing phase. This makes request cost and peak memory independent of context length: on 128K tokens, MoNe saves about 80% of resources compared to classic in-context learning.

MoNe: modular neural memory for long context without fine-tuning and with O(1) querying

The Problem: Long Context Hits Memory Limits

The more text fed to a model as input, the harder it becomes for it to process each new prompt. The classic in-context learning approach requires the model to "re-read" the entire context with every request. This means both response time and GPU memory consumption grow along with the length of the input text. In practice, this becomes noticeable already at tens of thousands of tokens, and at 128K tokens, resources are used extremely inefficiently.

Worse still, regular transformers have a native context window beyond which quality drops sharply. Even if the model formally accepts long input, it starts to "forget" details from the middle of the text. This is especially evident on tasks like needle-in-a-haystack, where you need to find one important fact within a large volume of information.

The MoNe Idea: Moving Context into Separate Memory

The MoNe (Modular Neural Memory) method proposes eliminating the direct dependency between context length and query cost. It is a lightweight modular neural memory that connects to an already trained, frozen transformer model. There is no need to fine-tune the base model — you only need to add an external module that takes over context handling.

The key trick lies in how the memory is structured. MoNe processes the input text not as a whole, but in fixed-size segments. Inside the module, fast weight networks are used — they are trained directly at the testing stage, updating their parameters with local gradients at the layer level. This sounds complex, but essentially it means: the memory adapts to a specific text without touching the weights of the main model.

Two-Phase Architecture: Preprocessing and Querying Separately

Inference is split into two independent stages. The first stage performs preprocessing: the model reads the context in segments, forms keys and values from them, and stores them in external memory. This stage is linear — the cost grows proportionally to the text length, but it is a one-time operation.

In the second stage — when a query arrives — the memory no longer accesses the original context. Instead, it generates keys and values only from the query tokens. Context tokens are not re-read, which means response time does not depend on the length of the original text at all. Formally, this is expressed as O(N) for preprocessing and O(1) for querying, where N is the context length.

Thanks to this separation, peak GPU memory usage stops growing with N. This is an important advantage: even with a very long context, the model does not try to hold all input tokens in memory simultaneously.

What This Gives in Practice

The authors tested the approach on the RULER benchmark, which includes scenarios with "needle in a haystack" and specific word extraction. This is exactly where standard in-context learning noticeably degrades as context length increases. MoNe, in contrast, shows stable results and generalizes to lengths that significantly exceed the native window of the base model.

Efficiency deserves special emphasis. When working with 128K tokens, MoNe reduces computational costs and peak GPU memory by approximately 80% compared to regular ICL. At the same time, the module's additional parameters amount to only 6.4% — meaning the memory overhead for storing the model itself is minimal.

Summary

MoNe is a fresh take on the long-context problem. Instead of scaling up computational power or devising complex attention mechanisms, the researchers propose moving context handling into a separate module. It requires no fine-tuning of the transformer, adds few parameters, yet makes query responses constant in time and prevents peak memory from growing with the text.

For now, this is a preprint on arXiv from an international group of researchers. But the direction looks promising: if the method proves itself on a broader range of tasks, it could become a practical way to turn ordinary frozen models into systems that comfortably handle very long documents without major changes to their architecture.

Frequently asked questions

Related materials

All materials
AURA-Eval: How to Check Whether an LLM Agent Recognized a Risk and Changed Its Next Step
News

AURA-Eval: How to Check Whether an LLM Agent Recognized a Risk and Changed Its Next Step

The framework evaluates LLM agents’ behavior not by their final verdict, but by how they respond to risk at key decision points: tool-call trajectories are interrupted, after which the model must continue reasoning and acting, while a panel of LLM judges assesses risk detection, the nature of the step, and its safety. Across 1,249 tasks drawn from 157 R-Judge trajectories, unsafe actions become more frequent among 20 models when no safe path is available, and removing oversight before execution turns 52.3% of initially safe cases into unsafe ones.

10 November 2026
Chern–Simons Reservoir Memory: Autonomous Connectivity Dynamics and Density Transport
News

Chern–Simons Reservoir Memory: Autonomous Connectivity Dynamics and Density Transport

The article explores how a reservoir preserves the history of input signals both in its density distribution and in its geometric degrees of freedom. A comparison of four mechanisms shows that current creates a separate connected component that alters the subsequent density response, while accounting for all measured features yields a small improvement in decoding pulse order.

10 November 2026
STAR: Adaptive Normalization of Temporal Context and Service Graphs for End-to-End Incident Management
Research

STAR: Adaptive Normalization of Temporal Context and Service Graphs for End-to-End Incident Management

The STAR framework trains representations from metrics, logs, and traces, using learnable normalization that accounts for multiscale temporal dynamics and dependency structures between services. On two real-world datasets, this pipeline delivers consistent improvements in anomaly detection, failure ranking, and root cause analysis over state-of-the-art baselines.

10 November 2026
MoNe: modular neural memory for long context without fine-tuning and with O(1) querying