AIAny
Icon for item

Cortex: Consolidating Context into Parametric Memory

Internalizes context-induced performance gains into model parameters by generating prospective queries and distilling context-conditioned outputs into mergeable low-rank or structural feed-forward updates, balancing consolidation and retention across 4B–120B dense and MoE models.

Introduction

Most fixes or skills provided through context disappear once that context is removed. This paper reframes that problem as Memory Consolidation: internalize context-conditioned improvements into the model itself while preserving unrelated capabilities. The central insight is to anticipate how context will be used (via prospective queries) and distill the resulting behavior into compact, mergeable parameter updates so the model retains the benefit without needing persistent context.

Key Findings
  • Proposes a consolidation objective that unifies context-specified editing, skill learning, and behavioral steering under a common formalization; consolidation is performed by distilling context-conditioned outputs into low-rank or structural feed-forward updates. This makes updates mergeable and compatible with model maintenance workflows.
  • Evaluated on a five-task-family testbed (single, batch, sequential updates) across dense and mixture-of-experts backbones from 4B to 120B, including text-only and multimodal settings. Cortex lies on the empirical consolidation–retention Pareto frontier in most settings, demonstrating favorable trade-offs compared to baselines.
  • Quantitative example: after 50 sequential factual edits on a 14B model, the Cortex-Structural variant recovers 88.9% of the context-induced gain while retaining 99.8% of original non-target performance — illustrating strong consolidation with minimal collateral degradation.
  • Introduces practical mechanisms: prospective query generation to anticipate downstream uses of context, novelty gating to avoid redundant writes, and options for low-rank vs. structural updates to trade capacity, mergeability, and compute cost.
Who it's for and trade-offs

Great fit if you need to make context-driven changes persistent in deployed LLMs (factual edits, new skills, policy steering) without keeping expensive retrieval or prompt scaffolding. The method is especially relevant for teams managing model updates at scale who value mergeable parameter edits and controlled retention of legacy capabilities.

Look elsewhere if you require guaranteed lossless preservation of all behaviors (the method favors empirical Pareto-optimal trade-offs, not absolute invariance), if your deployment forbids any parameter modification, or if you only need ephemeral, session-scoped context where retrieval-based approaches suffice.

Where it sits methodologically

Cortex complements retrieval and fine-tuning by occupying the middle ground: it anticipates likely uses of context (like retrieval would) but internalizes behavior via compact parametric edits (like fine-tuning) while emphasizing mergeability and minimal non-target impact. Benchmarks and ablations in the paper quantify consolidation vs. forgetting dynamics and compare low-rank and structural update families across model sizes and modalities.

Information

  • Websitearxiv.org
  • AuthorsJintian Zhang, Feng He, Xinnian Liang, Ziwen Xu, Haoming Xu, Haojing Huang, Shuangzhi Wu, Ningyu Zhang
  • Published date2026/10/14

More Items

Restores recoverability in on-policy distillation by having the teacher generate critiques of incorrect student rollouts, guide a critique-free student rewrite, and score the revised solution as privileged context; yields improved math-reasoning performance, largest gains on competition problems.

Explores asymmetric compute allocation in looped Mixture-of-Experts models by compressing the first loop visit's sequence and reallocating saved compute to enlarge hidden size, yielding consistent NLL reductions and predicted compute savings across 1.3B–7B configurations.

Demonstrates that additive weighted aggregation in rubric-based reinforcement learning enables reward hacking—models improve rubric coverage but produce worse answers—and proposes ProRubric, an offline regrouping that aggregates checklist criteria into conjunctive protocol-level dimensions to raise appropriateness without losing coverage.