arXiv:2608.26602cs.SEcs.CL2026-08

用任务触发的关系生成,让模型在代码库中高效推理。

The Thousand-Graph Hypothesis: A Testable Hypothesis of Task-Conditioned Relation Materialization in Repository-Level Code Reasoning

  • 仅用实体接口,推理时动态构建关系图。
  • 两层索引使准确率提升至95.6%。
  • 适合大规模代码库的智能分析场景。

大型软件仓库常超出模型上下文限制。将仓库知识训练进模型成本高且快速过时,局部检索可能遗漏分散需求,而显式关系图又需持续维护。本文提出一种仅包含实体的外部接口,在推理阶段根据任务条件动态生成关系。采用两层索引分离全局路由与局部实体聚焦,在 DeepSeek-V4-Flash 和 SWE-bench Verified 上评估,基础版、单层和双层配置的准确率分别为92.1%、94.2%和95.6%,且无需预先构建实体-关系边。

原文摘要 · Abstract (English)

Large software repositories are often beyond model context limits. Training repository knowledge into models is costly and quickly stale, while local retrieval can miss scattered requirements, and explicit relation graphs add ongoing maintenance burden. We propose an entity-only external interface with task-conditioned relation materialization during inference. A two-layer index separates global routing from local entity focus and is evaluated on DeepSeek-V4-Flash and SWE-bench Verified. The base, one-layer, and two-layer conditions achieve 92.1%, 94.2%, and 95.6% success, respectively, under zero pre-built entity-relation edges.

代码理解关系推理大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。