From Fragments to Paths: Task-Level Context Recovery for Large Industrial Codebases
作者: Jiawei He, Weisong Sun, Mengyu Shi, Jie Jia, Tong Bian, Xikai Yang, Dong Sun
分类: cs.SE, cs.AI
发布日期: 2026-06-22
备注: 12 pages, 3figures
💡 一句话要点
提出DeepDiscovery以解决大型工业代码库的任务级上下文恢复问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 软件工程 代码库理解 任务上下文恢复 深度学习 工业应用 自动化编程 智能编程助手
📋 核心要点
- 现有方法在处理大型工业代码库时,往往只能检索到局部片段,无法有效恢复复杂任务所需的整体上下文。
- DeepDiscovery通过两阶段的Location-Inference框架,定位任务锚点并恢复多关系上下文,从而提升代码库理解能力。
- 在多项实验中,DeepDiscovery在任务相关文件恢复和下游软件工程性能上均显著优于五个基线方法,解决了实际应用中的关键问题。
📝 摘要(中文)
大型语言模型在软件工程任务中表现出色,但理解大型工业代码库仍然具有挑战性。现有方法通常仅检索局部片段,无法恢复复杂任务所需的更广泛上下文。本文提出DeepDiscovery,一种针对大型工业代码库的任务级理解方法,采用两阶段的Location-Inference框架,定位高置信度任务锚点,并在预算约束下恢复多关系代码库结构的任务相关上下文。实验结果表明,DeepDiscovery在多个场景中显著提升了任务相关文件的恢复能力和下游软件工程性能。
🔬 方法详解
问题定义:本文旨在解决大型工业代码库中任务级上下文恢复的挑战。现有方法往往只能获取局部信息,导致无法满足复杂任务的需求。
核心思路:DeepDiscovery的核心思路是通过两阶段的Location-Inference框架,首先定位高置信度的任务锚点,然后在此基础上恢复更广泛的任务相关上下文,以提高整体理解能力。
技术框架:DeepDiscovery的整体架构分为两个主要阶段:第一阶段为任务锚点的定位,第二阶段为在多关系代码库结构中恢复任务相关上下文。该框架在预算约束下进行优化,确保高效性。
关键创新:DeepDiscovery的主要创新在于其两阶段的Location-Inference框架,能够在复杂的代码库中有效地定位和恢复任务上下文,这与现有方法的局部片段检索形成了鲜明对比。
关键设计:在设计中,DeepDiscovery采用了特定的参数设置和损失函数,以优化任务锚点的定位精度和上下文恢复的全面性,同时确保在不进行离线预处理的情况下实现最佳性能。
🖼️ 关键图片
📊 实验亮点
在27个中等规模任务中,DeepDiscovery在文件恢复质量上超越了五个代表性基线方法,且在生产规模的集成代码库生态系统中,Full Recall Rate的提升幅度在1.6到9.2个百分点之间。在SWE-bench Verified的控制性端到端评估中,DeepDiscovery系统的Solve Rate达到了78.6%,比基线提高了8.2个百分点。
🎯 应用场景
该研究的潜在应用领域包括大型软件项目的代码理解、自动化代码生成和智能编程助手等。通过提升代码库的任务级理解能力,DeepDiscovery能够显著提高软件工程师的工作效率,降低开发成本,并推动智能编程工具的发展。未来,该方法有望在更多复杂的工业应用中得到推广和应用。
📄 摘要(原文)
Large language models have shown strong performance on software engineering (SE) tasks, yet understanding large industrial repositories remains challenging. Existing methods often retrieve only local fragments and fail to recover the broader task-relevant context needed for complex repository-level tasks. We present DeepDiscovery, a task-level repository-understanding method for large industrial codebases. DeepDiscovery uses a two-stage \textit{Location--Inference} framework to localize high-confidence task anchors and recover broader task-relevant context over multi-relational repository structure under budget constraints. Across controlled method-level evaluation, organization-internal industrial repository-understanding scenarios, and end-to-end evaluation on SWE-bench Verified, DeepDiscovery consistently improves task-relevant file recovery and downstream SE performance. On 27 medium-scale tasks, DeepDiscovery achieves the best file recovery quality among five representative baselines without offline preprocessing. On organization-internal industrial tasks from a production-scale integrated codebase ecosystem, including 27 medium-scale tasks and 40 large-scale tasks, DeepDiscovery improves Full Recall Rate across multiple AI coding systems, with absolute gains ranging from 1.6 to 9.2 percentage points on large subprojects and from 2.5 to 7.4 percentage points on medium-scale subprojects. In a controlled end-to-end evaluation on SWE-bench Verified, a system equipped with DeepDiscovery achieves a 78.6\% Solve Rate, outperforming the corresponding baseline by 8.2 percentage points. These results suggest that stronger task-level repository understanding can improve coding-agent performance on complex SE tasks.