Cortex: Consolidating Context into Parametric Memory
Jintian Zhang, Feng He, Xinnian Liang, Ziwen Xu, Haoming Xu, Haojing Huang, Shuangzhi Wu, Ningyu Zhang
Abstract
Context can improve large language model performance, but these gains may be lost after context removal. Inspired by biological systems consolidation, we formulate Memory Consolidation (MC) as internalizing these gains while preserving non-target capabilities, connecting context-specified editing, skill learning, and behavioral steering under a common objective. We introduce a five-task-family testbed measuring consolidation and retention under single, batch, and sequential updates. We propose Cortex, which generates prospective queries to anticipate uses of context and distills context-conditioned outputs into mergeable low-rank or structural feed-forward network updates. Across 4B--120B dense and mixture-of-experts backbones, including both text-only and multimodal models, Cortex lies on the empirical consolidation--retention Pareto frontier in most evaluated settings. After 50 sequential factual edits on a 14B model, Cortex-Structural recovers 88.9% of the context-induced gain while retaining 99.8% of original non-target performance.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI, cs.CV, cs.LG, cs.MA
- Comments
- Technical report
Related papers
LimeTree: Linear-Memory Graph Neural Networks over Tree-Graphs for Resource-Efficient Language Modeling and Context Extrapolation
Shared title terminologycs.CLElisabeth Fink
From Long Context to Selective Memory:A Survey of Memory-Centric Compression for Large Language Models
Shared title terminologycs.CLChaogui Gou
Same Context, Different Agents: A Behavioral Study of Semantic Layers, Multi-Agent Orchestration and Memory Compaction in Data Agents
Shared title terminologycs.CLZhivar Sourati, Marianne Menglin Liu, Zheng Wang et al.
FOLD: Position-Free Far Memory with Local Order for Long-Context Speculative Decoding
Shared title terminologycs.CLShuxuan Li, Jialiang Kang, Yanghao Zhou et al.
MemDuet: Learning Dual-Process Memory for Long-Context Reasoning
Shared title terminologycs.CLJiangcheng Song, Haodong Jing, Yulin Mu et al.
Leto: Utility-Centric Agent Memory
Shared title terminologycs.CLShuguang Chen, Salman Paracha