Chronos Enables Code Agents to Reason over Software Evolution
作者: Xin Yin, Yiang Zhang, Zhiyuan Peng, Chao Ni, Zhe Cui, Xiaohua Xin
分类: cs.SE, cs.CL
发布日期: 2026-10-08
备注: 22 pages, 3 figures
💡 一句话要点
提出Chronos框架以增强代码代理对软件演化的推理能力
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 代码代理 软件演化 历史信息 结构化经验 语义搜索 多跳扩展 补丁生成 智能软件工程
📋 核心要点
- 现有方法在处理软件演化时缺乏有效的历史信息利用,导致代码代理的推理能力不足。
- Chronos框架通过将合并的拉取请求转化为结构化经验卡片,并利用类型图连接历史信息,增强了代码代理的推理能力。
- 实验结果表明,Chronos在多个基准测试上显著提高了代码代理的解决率,尤其在SWE-Bench Verified上提升至79.8%。
📝 摘要(中文)
历史拉取请求记录了代码库当前状态背后的设计决策、兼容性约束和实现模式。针对新任务的相关经验可以跨越不同关注点的相关更改。我们提出了Chronos,一个在测试时框架,使这一连接历史对基于大型语言模型(LLM)的代码代理可用。Chronos将合并的拉取请求提炼为结构化经验卡片,并通过代码级、开发者意图和组织关系的类型图将它们连接起来。语义搜索识别入口卡片,加权多跳扩展检索连接更改以进行选择性阅读。该内存指导候选生成和补丁选择:一个专注于补丁的更改代理和一个验证策略代理各自开发补丁,而一个演化管理者则咨询历史以选择其中之一。在SWE-Bench Verified上,完整工作流程提高了SWE-Agent在所有六个评估的LLM基础上的表现,平均解决率从69.2%提高到72.9%,使用MiniMax M2.5时达到79.8%。
🔬 方法详解
问题定义:论文旨在解决现有代码代理在软件演化推理中对历史信息利用不足的问题,导致其在新任务中的表现不佳。
核心思路:Chronos框架通过提炼历史拉取请求为结构化经验卡片,并通过类型图连接这些卡片,使代码代理能够有效利用历史经验进行推理和决策。
技术框架:Chronos的整体架构包括经验卡片的提炼、语义搜索、加权多跳扩展、候选生成和补丁选择等模块。每个模块协同工作,以实现对历史信息的有效利用。
关键创新:最重要的创新在于将拉取请求的历史信息结构化,并通过图结构连接,使得代码代理能够在补丁生成和选择过程中参考相关历史信息,从而提升推理能力。
关键设计:在设计中,重点考虑了经验卡片的结构化方式、图的类型定义以及加权多跳扩展的策略,以确保信息检索的准确性和有效性。
🖼️ 关键图片
📊 实验亮点
在SWE-Bench Verified基准测试中,Chronos框架将SWE-Agent的平均解决率从69.2%提升至72.9%,并在使用MiniMax M2.5时达到79.8%。在SWE-Bench Pro和FEA-Bench Lite上,解决率分别从48.3%提升至51.7%和从41.0%提升至43.5%。
🎯 应用场景
Chronos框架的潜在应用领域包括软件开发、代码审查和自动化补丁生成等。通过增强代码代理的推理能力,开发者可以更高效地处理软件演化中的复杂性,从而提高代码质量和开发效率。未来,Chronos可能对软件工程领域的智能化发展产生深远影响。
📄 摘要(原文)
Historical pull requests record the design decisions, compatibility constraints, and implementation patterns behind a codebase's current state. Experience relevant to a new task can span related changes whose descriptions emphasize different concerns. We introduce Chronos, a test-time framework that makes this connected history available to large language model (LLM)-based code agents. Chronos distills merged pull requests into structured experience cards and connects them through a typed graph of code-level, developer-intent, and organizational relations. Semantic search identifies entry cards, and weighted multi-hop expansion retrieves connected changes for selective reading. The same memory guides candidate generation and patch selection: a patch-focused change agent and a validation-strategy agent each develop a patch, and an evolution steward consults history to select between them. On SWE-Bench Verified, the full workflow improves SWE-Agent across all six evaluated LLM backbones, raising the mean resolution rate from 69.2% to 72.9% and reaching 79.8% with MiniMax M2.5. With the same backbone, it raises resolution rates from 48.3% to 51.7% on SWE-Bench Pro and from 41.0% to 43.5% on FEA-Bench Lite. Both experience-guided single-agent variants also outperform the base agent. In a human evaluation on 100 tasks with ten cards retrieved per task, graph-grounded retrieval increases the mean number of useful cards from 1.24 to 2.87 over flat semantic retrieval. These results demonstrate the value of PR relations for retrieving useful repository experience and of the evaluated workflows for applying that experience during patch generation and selection.