提出神经分页机制,让大模型高效管理有限上下文窗口。
Neural Paging: Learning Context Management Policies for Turing-Complete Agents
- 设计可微的页面控制器,模拟最优内存淘汰策略。
- 理论证明推理复杂度从O(N²)降为O(N·K²),提升长序列处理效率。
- 适合需要长期推理的智能体系统,如代码生成、复杂规划。
大型语言模型若配备外部读写记忆,理论上已具备图灵完备性。然而现有实现面临关键瓶颈:有限且昂贵的上下文窗口并非无限存储,而像一个稀缺的语义缓存。本文提出「神经分页」(Neural Paging)层级架构,将符号推理与信息资源管理解耦。我们定义了「上下文分页问题(CPP)」,并设计轻量级、可微的「页面控制器」,以近似「语义贝尔迪最优性」——在特定访问模式假设下保留未来价值高的令牌。理论分析表明,在上下文窗口大小为 $K$ 的约束下,神经分页将长时序推理的渐近复杂度从 $O(N^2)$ 降低至 $O(N \cdot K^2)$,并推导出鲁棒性边界(定理4),量化了在策略依赖访问下竞争比的退化程度。我们在合成分页轨迹上验证了这些边界,确认理论保证成立,并发现显著余量,为学习型策略提供了动机。
原文摘要 · Abstract (English)
The proof that Large Language Models (LLMs) augmented with external read-write memory constitute a computationally universal system has established the theoretical foundation for general-purpose agents. However, existing implementations face a critical bottleneck: the finite and costly Context Window, which functions not as infinite memory but as a scarce semantic cache. In this work, we introduce \textit{Neural Paging}, a hierarchical architecture that decouples symbolic reasoning from information resource management. We formulate the \textit{Context Paging Problem (CPP)} and propose a lightweight, differentiable \textit{Page Controller} designed to approximate ``Semantic Belady's Optimality'' -- retaining tokens with high future utility under explicit assumptions on access patterns. We provide theoretical analysis showing that, under bounded context window size~$K$, Neural Paging reduces the asymptotic complexity of long-horizon reasoning from quadratic $O(N^2)$ to $O(N \cdot K^2)$, and we derive a robustness bound (Theorem~4) that quantifies competitive-ratio degradation under policy-dependent access with bounded sensitivity. We validate these bounds on synthetic paging traces, confirming that the theoretical guarantees hold and identifying significant slack that motivates learned policies.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。