Recent development of agents has renewed demand for long-context reasoning capacity of LLMs. However, training LLMs for this capacity requires costly long-document curation or heuristic context synthesis. We observe that agents produce massive trajectories when solving problems, invoking tools and receiving environment observations across many turns. The evidence needed to answer the original question is thus scattered throughout these turns, requiring integration of distant context segments. Nevertheless, standard agent SFT masks tool responses and only trains turn-level tool selection, creating a supervision blind spot where these scattered signals go unused. We propose Agent Context Compilation (ACC), which converts trajectories from search, software engineering, and database querying agents into long-context QA pairs that combine the original question with tool responses and environment observations gathered across multiple turns, training the model to answer directly without tool use. This makes the dependencies between the question and the evidence explicit, enabling direct supervision of long-context reasoning over distant segments without additional annotation. ACC is a simple but effective approach that can be combined with any existing long-context extension or training method, providing scalable supervised fine-tuning data. We validate ACC on long-range dependency modeling tasks through MRCR and GraphWalks, challenging benchmarks requiring cross-turn coreference resolution and graph traversal over extended contexts. Training Qwen3-30B-A3B with ACC achieves 68.3 on MRCR (+18.1) and 77.5 on GraphWalks (+7.6), results comparable to Qwen3-235B-A22B, while preserving general capabilities on GPQA, MMLU-Pro, AIME, and IFEval. Further mechanism analysis reveals that the ACC-trained model exhibits task-adaptive attention restructuring and expert specialization.


翻译:近期智能体的发展重新激发了人们对大语言模型长上下文推理能力的需求。然而,为此能力训练大语言模型需要昂贵的长度文档整理或启发式上下文合成。我们观察到,智能体在解决问题时会生成大量轨迹,在多轮交互中调用工具并接收环境观测结果。回答原始问题所需的证据因此分散在这些轮次中,需要整合远距离的上下文片段。然而,标准智能体监督微调会屏蔽工具响应,仅训练轮次级别的工具选择,导致这些分散信号未被利用的监督盲区。我们提出智能体上下文编译(ACC),该方法将搜索、软件工程和数据库查询智能体的轨迹转换为长上下文问答对,将原始问题与跨多轮收集的工具响应和环境观测结果相结合,训练模型在无需工具使用的情况下直接回答。这使得问题与证据之间的依赖关系明确化,从而无需额外标注即可对远距离片段的上下文推理进行直接监督。ACC是一种简单而有效的方法,可与任何现有长上下文扩展或训练方法结合,提供可扩展的监督微调数据。我们在MRCR和GraphWalks上验证了ACC对长距离依赖建模任务的有效性,这些基准测试要求跨轮共指消解和在扩展上下文上进行图遍历。使用ACC训练Qwen3-30B-A3B在MRCR上达到68.3(+18.1),在GraphWalks上达到77.5(+7.6),其结果与Qwen3-235B-A22B相当,同时在GPQA、MMLU-Pro、AIME和IFEval上保持通用能力。进一步的机制分析表明,经过ACC训练的模型展现出任务自适应的注意力重构和专家特化。

0
下载
关闭预览

相关内容

TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
47+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
21+阅读 · 2013年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
1+阅读 · 53分钟前
定向能反无人机系统最新发展动态
专知会员服务
3+阅读 · 今天13:50
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
2+阅读 · 今天13:33
相关基金
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
47+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
21+阅读 · 2013年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员