A benchmark for functional memory in long-context LLMs — testing rule retention, multi-step composition, and continual rule revision across symbolic domains.
Human memory is inherently imprecise and highly compressed — we remember the law, not every measurement. Current retrieval benchmarks miss this entirely.
A scientist does not memorize every data point. They remember the law that best explains the observations — and update it when new evidence arrives.
A programmer does not recall every line of a codebase. They internalize the design invariant that governs how changes should be made.
A user does not expect an assistant to recite past examples verbatim, but to infer a preference or policy and apply it correctly in new situations.
Each task tests a distinct aspect of functional memory, from single-rule retention to compositional integration to belief revision.
Preserve inferred rules across long distractors
The model observes examples of a hidden operator f early in the context, then must retain and apply the rule to a absolute new input after a long distractor passage.
Integrate distributed rule fragments
Multiple operators are scattered across the context. The final query requires composing them: y = fK(fK−1(⋯f1(x)⋯)).
Update beliefs when rules change
The model first sees examples of fold, then later examples of fnew. The query must be answered with the updated rule — not the original one.
For all three tasks, the queries involve entirely novel problems that do not explicitly appear in the provided text. Therefore, the model cannot derive the answers through simple text matching. Instead, it must infer the correct operators and apply them to these new instances.
Procedurally generated tasks span diverse rule types, preventing surface-level pattern matching and reducing data leakage risk.
Arithmetic combinations, modular ops, digit-level transformations, piecewise expressions.
f(x₁, x₂) = 2·x₁ + 3·x₂
Reversal, rotation, prefix/suffix extraction, concatenation, delimiter wrapping.
f(x) = concat(reverse(x), first(x))
Union, intersection, difference, symmetric diff, ordered selection, element relabeling.
f(A,B) = sorted((A∪B) \ (A∩B))
Agent trajectory tasks: file moves, renames, and structured folder transformations.
move "draft" files → review/
Carefully designed controls isolate individual factors and enable principled ablation analysis.
Standard condition with examples followed by a long distractor and then the query.
[prefix], [examples], [distractor], [question]
No demonstrations provided. Measures whether models exploit artifacts or prior knowledge.
[prefix], [distractor], [question]
Examples placed immediately before the query. Isolates memory-distance degradation.
[prefix], [examples], [question]
Beyond Retrieval Bench uniquely combines long-range compositional reasoning, rule learning, and continual update — none of which are primary focuses in prior work.
| Benchmark | Exact Text Match | Chain Reasoning | Max Hops | Max Length | NLU Tasks | Leakage Risk | Rule Learning | Update / Revision |
|---|---|---|---|---|---|---|---|---|
| NIAH | Yes | No | — | 128K | No | Exists | No | No |
| RULER | Yes | No | — | 128K | No | Exists | No | No |
| MRCR | Partial | No | — | ≥1M | Partial | Exists | No | No |
| BABILong | Partial | Yes | ≤320 | ≥10M | Yes | Exists | No | Partial |
| Michelangelo | Partial | Yes | ≤20 | ≥1M | Yes | Low | No | Partial |
| LongBench v2 | No | Partial | ≤10 | 2M | Yes | Exists | Partial | No |
| NoliMa | No | Yes | ≤4 | 128K | Partial | Exists | No | No |
| Ours (BRB) | Partial | Yes | ∞(Theoretically) | ∞(Theoretically) | Yes | Low ✦ | Yes ✦ | Yes ✦ |
✦ Primary design focus. Low leakage risk because all contexts are procedurally generated fresh for each evaluation.
Each case is scored by four independent signals; a case is considered correct when at least three of the four signals agree.
Check whether the correct answer appears as a substring within the model response.
Apply word-boundary regex matching on the full response to avoid false positives.
Extract the answer after the 【Answer】 marker and apply word-boundary matching.
LLM-thinking independently judges whether the model response is semantically correct.
Evaluated at 7 controlled lengths:
Memory Composition evaluated at K operators:
Memory Revision evaluated at edit steps:
| Model | Total Params | Active Params | Context Window | Architecture | Type | Access Date |
|---|---|---|---|---|---|---|
| DeepSeek-chat (v4-flash-preview) | 284B | 13B | 1M | Transformer-style | Open-source | 20260424 |
| DeepSeek-reasoner (v4-flash-preview-thinking) | 284B | 13B | 1M | Transformer-style | Open-source | 20260424 |
| DeepSeek-v4-pro (v4-pro-preview-thinking) | 1.6T | 49B | 1M | Transformer-style | Open-source | 20260424 |
| MiniMax-M2.7 | 229B | 10B | 200K | Transformer-style | Open-source | 20260318 |
| Kimi-K2.6 | 1T | 32B | 256K | Transformer-style | Open-source | 20260420 |
| Kimi-K3 | 2.8T | ~50B to 104B | 1M | Hybird DeltaNet-style | Open-source | 20260716 |
| Qwen-3.5-plus | 397B | 17B | 1M | Hybird DeltaNet-style | Open-source | 20260216 |
| Doubao-seed-1.6-flash | - | - | 256K | - | Proprietary | 20250611 |
| Doubao-seed-2.0-pro | - | - | 256K | - | Proprietary | 20260214 |
Performance across three task types reveals distinct capability gaps in state-of-the-art long-context LLMs.
Accuracy vs. Context length
Accuracy vs. Context length
Accuracy vs. Context length
Accuracy drop vs. Context length
Accuracy drop vs. Context length
Accuracy drop vs. Context length
A dedicated version of Beyond Retrieval Bench is designed for evaluating base / pretrain models that have not been instruction-tuned. Instead of generating free-form answers, models are scored via perplexity (PPL) / log-probability over carefully designed option sets — eliminating any dependence on instruction following.
Tests whether the model retains and applies a rule encountered far earlier in the context.
retrieval_similar: plausible answer derived by surface-level token matching rather than rule application.
Tests whether the model can compose two or more rules to produce a correct answer.
surface_similar: textually close but wrong; wrong_rule: applies one rule correctly but fails on composition.
Tests whether the model updates a rule when a later rule overrides it.
retrieval_similar: based on surface matching; old_rule: applies the superseded rule, revealing failure to update.
Tasks are procedurally generated from symbolic templates, not drawn from natural-language documents. Performance on synthetic rules may not directly transfer to real-world scenarios.
Current domains cover numerical, string, set, and file-system tasks. Real-world functional memory (e.g., scientific hypotheses, social preferences) remains outside scope.
Results suggest new directions for model architectures and training paradigms explicitly targeting rule compression, long-range composition, and continual belief revision.
Tsinghua University & Deepseek AI
Tsinghua University
Acknowledgements
Hu Shiqiang · Huang Yanwen · Chen Qinyu · Dai Damai · Chang Jiang · Mo Shulan · Jia Xiaoxuan