Compile, Don't Memorize: A Context Compilation Architecture (CCA) for In-Context Learning
作者: Jinhu Qi, Minda Hu, Wentao Zhang, Weiqiang Jin, Yanyu Chen, Junli Wang, Irwin King
分类: cs.CL
发布日期: 2026-09-01
备注: Accepted to EMNLP 2026 (Findings). Code, data, and cached completions available at https://github.com/TonyQJH/cca-emnlp2026
🔗 代码/项目: GITHUB
💡 一句话要点
提出上下文编译架构以解决长上下文学习的脆弱性问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 上下文学习 大型语言模型 中间表示 验证机制 机器学习
📋 核心要点
- 现有的上下文学习方法在处理复杂任务时表现出脆弱性,常因忽视细节导致整体失败。
- 提出的上下文编译架构(CCA)通过固定槽位的类型化中间表示来编译上下文,从而增强模型的推理能力。
- 在CL-bench的实验中,CCA在所有基础模型上均超越了传统方法,Kimi K2.5的性能从15.4%提升至21.4%。
📝 摘要(中文)
大型语言模型(LLMs)在处理上下文学习(ICL)任务时,长且新颖的上下文定义了一系列问题的规则、知识和输出模式。然而,在对每个细节进行评分的基准测试中,即使是强大的开放权重模型也仅能通过12-16%的任务。我们认为这种脆弱性源于结构性问题:主流的“读取与推理”范式要求模型在一次前向传播中提取、规划、生成和自我验证。因此,我们提出了上下文编译架构(CCA),其核心创新是具有固定槽位的类型化中间表示(IR),将任何文本上下文一次性编译。执行验证器和违规门控修正循环作为下游结果。实验结果表明,CCA在CL-bench上超越了传统提示和两种长上下文基线,显著提升了模型性能。
🔬 方法详解
问题定义:本论文旨在解决大型语言模型在上下文学习任务中的脆弱性,现有方法在处理复杂规则时容易出错,导致整体响应失败。
核心思路:论文提出的上下文编译架构(CCA)通过引入类型化中间表示(IR),将上下文编译为固定格式,从而简化模型的推理过程,减少错误发生的可能性。
技术框架:CCA的整体架构包括上下文编译模块、执行验证器和违规门控修正循环。上下文编译模块将输入的文本上下文转化为结构化的IR,随后通过验证器检查输出的有效性,并在发现违规时触发修正机制。
关键创新:CCA的核心创新在于其类型化中间表示,具有固定槽位的设计使得模型能够更清晰地理解和处理复杂规则,与传统的“读取与推理”方法相比,显著提高了任务的成功率。
关键设计:在设计中,CCA采用了固定的槽位结构,包括规则(必须做、必须不做、条件)、输出规范、可用工具和数据特征等,确保上下文的有效编译和后续处理。
🖼️ 关键图片
📊 实验亮点
实验结果显示,CCA在CL-bench上超越了传统的提示方法和两种长上下文基线(ReadAgent-P和Ctx2Skill),在所有基础模型上均取得了显著提升,Kimi K2.5的性能从15.4%提升至21.4%,尤其在规则密集的子类别中表现突出。
🎯 应用场景
该研究的潜在应用领域包括自然语言处理、智能问答系统和自动化决策支持等。通过提高模型在复杂任务中的表现,CCA能够为实际应用提供更可靠的支持,推动智能系统在多种场景下的应用和发展。
📄 摘要(原文)
Large language models (LLMs) increasingly handle in-context learning (ICL) tasks where a long, novel context defines the rules, knowledge, and output schema for a series of questions. On benchmarks that grade against every detail of the context, even strong open-weights models pass only 12-16% of tasks: a single overlooked rule fails the whole response. We argue this brittleness is structural: the dominant "read-and-reason" paradigm asks the model to extract, plan, generate, and self-verify in one forward pass. We therefore ask whether explicit context compilation can fix it, how it compares to existing long-context strategies (gist retrieval, multi-agent self-play), and where the resulting harness benefit holds across task structure and model scale. We propose the Context Compilation Architecture (CCA), whose central novelty is a typed intermediate representation (IR) with fixed slots (rules.{must_do, must_not, conditional}, output_spec, available_tools, data_profile) into which any prose context is compiled once; executable verifiers and a violation-gated correction loop follow as downstream consequences. On CL-bench (1,899 tasks across 4 open base models), CCA outperforms vanilla prompting and two long-context baselines (ReadAgent-P, Ctx2Skill) on every base model, lifting Kimi K2.5 from 15.4% to 21.4% with gains concentrated on rule-dense sub-categories. Code and cached completions are available at https://github.com/TonyQJH/cca-emnlp2026.