paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Compressing Code Context for LLM-Based Issue Resolution

为基于 LLM 的 Issue 解决压缩代码上下文
ASE Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering2026匹配度 3/10 · 论文聚焦于为 LLM 修 GitHub issue 压缩代码上下文,属于 Coding Agent / Agentic 程序的应用场景,与用户关注的 Agentic 方向有交集,且使用强模型(SWE-bench 上的前沿 LLM)、具备问题驱动的动机。但其核心贡献是上下文蒸馏与轻量压缩模型(优化 token 成本与成功率),并非把静态分析应用于 Agentic 程序,也不涉及形式化验证、浮点或贝叶斯程序分析,与用户正在追的核心问题基本错位。引用 12 inbox
Haoxiang Jia, Earl T. Barr, Sergey Mechtaev
crossref: 2026-10-09

AI 速览

一句话:提出 OCD 上下文蒸馏与轻量压缩模型,推理时把代码上下文压缩约 6×,提升 LLM 修 issue 的成功率。

基于 LLM 的 GitHub issue 解决常因上下文过度近似而输入庞大且噪声充斥,造成成本高、效果差:通用压缩器破坏代码语义,代码专用工具又不感知代码结构与任务。本文提出两阶段框架:先用 Oracle 引导的上下文蒸馏(OCD),结合遗传搜索与 delta debugging 把代码上下文约简为成功修复所需的最小充分子序列;再用该数据微调轻量模型,使其在推理时压缩上下文、滤除噪声并保留修复要素。在 SWE-bench Verified 上对三个前沿 LLM 评估:压缩率稳定约 6×,token 预算较未压缩降低 51.8%–71.3%,issue 解决率提升 5.0%–9.2%,在效果、压缩率与延迟间取得优于现有基线的综合权衡。

问题
LLM 已能解决真实 GitHub issue,但现有方法对代码上下文过度近似,既带来高昂的输入处理成本,又让噪声淹没修复信号;通用压缩器损害代码语义完整性,而代码专用工具缺乏对代码结构与任务上下文的感知,难以保留关键修复要素。
方法
提出两阶段框架:一是 Oracle 引导的上下文蒸馏(OCD),结合遗传搜索与 delta debugging 将代码上下文系统化约简为最小充分子序列;二是用蒸馏数据微调一个轻量模型,使其在推理时压缩代码上下文、过滤噪声同时保留修复要素。
评估
在 SWE-bench Verified 上针对三个前沿 LLM 进行评估,压缩率稳定在约 6×,总 token 预算相对未压缩设置降低 51.8%–71.3%,issue 解决率提升 5.0%–9.2%,并在效果、压缩率与延迟的综合权衡上优于当前最优的上下文压缩基线。
原文摘要(Abstract)

Large Language Models (LLMs) are now capable of resolving real-world GitHub issues. However, current approaches overapproximate the code context and suffer from two compounding problems: the prohibitive cost of processing massive inputs, and low effectiveness as noise floods the context window and distracts the model from the bug-fixing signal. Existing compression techniques fail to resolve this tension: generic compressors compromise the semantic integrity of code, while code-specific tools lack awareness of code structure and task context to preserve essential patch ingredients. To address this, we propose a novel framework consisting of two components. First, Oracle-guided Context Distillation (OCD), a context distillation algorithm that combines genetic search and delta debugging to systematically reduce code contexts to their minimal sufficient subsequence — retaining only the ingredients required for a successful fix. We use this distilled data to fine-tune , a lightweight model that learns to compress code context at inference time, filtering noise and combating distraction while preserving fix ingredients. Evaluated on SWE-bench Verified across three frontier LLMs, maintains a stable compression rate of about 6× across models, reduces the total token budget by 51.8%–71.3% relative to the uncompressed setting, improves issue resolution rates by 5.0%–9.2%, and delivers the best overall balance among effectiveness, compression ratio, and latency compared with state-of-the-art context compression baselines.

链接与引用

DOI 原文 · arXiv · DBLP

BibTeX
@inproceedings{abs-2603-28119,
  title = {Compressing Code Context for LLM-Based Issue Resolution},
  author = {Haoxiang Jia and Earl T. Barr and Sergey Mechtaev},
  booktitle = {ASE},
  year = {2026},
  doi = {10.1145/3832783.3834397}
}