arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2603.00601cs.SEcs.AI
收藏

代码空间理论:代码代理是否理解软件架构?

Theory of Code Space: Do Code Agents Understand Software Architecture?

Work in progress(工作进行中)

Grigory Sapunov

AI总结:

研究代码代理在多文件软件工程中能否构建维护更新一致的架构信念,通过基准测试揭示代理在主动探索中的能力差异及信念维护的稳定性问题。

摘要:

AI代码代理在孤立任务中表现出色,但在需要架构理解的多文件软件工程中表现不佳。我们引入了代码空间理论(ToCS)基准,评估代理在代码库探索中构建、维护和更新一致的架构信念的能力。代理在部分可观测条件下探索生成的代码库,定期将信念状态外化为结构化JSON,生成时间序列的架构理解。实验发现:首先,主动探索与被动观察的差距依赖于模型:某些模型通过主动探索构建更好的地图,而另一些模型则相反,揭示主动探索本身是非平凡的能力。其次,保留结构化信念地图在上下文中作为自支撑结构对某些模型有效,但对其他模型无效。第三,信念状态维护差异显著:较小模型在多次探测中保持稳定信念,而其较大的模型则在探测间经历灾难性信念崩溃,遗忘之前发现的组件。我们开源ToCS作为软件。代码:https://github.com/che-shr-cat/tocs

英文摘要:

AI code agents excel at isolated tasks yet struggle with multi-file software engineering requiring architectural understanding. We introduce Theory of Code Space (ToCS), a benchmark that evaluates whether agents can construct, maintain, and update coherent architectural beliefs during codebase exploration. Agents explore procedurally generated codebases under partial observability -- opening files under a budget -- and periodically externalize their belief state as structured JSON, producing a time-series of architectural understanding. Three findings emerge from experiments with four baselines and six frontier LLMs. First, the Active-Passive Gap is model-dependent: one model builds better maps through active exploration than from seeing all files at once, while another shows the opposite -- revealing that active exploration is itself a non-trivial capability absent from some models. Second, retaining structured belief maps in context acts as self-scaffolding for some models but not others, showing that the mechanism is model-dependent. Third, belief state maintenance varies dramatically: a smaller model maintains perfectly stable beliefs across probes while its larger sibling suffers catastrophic belief collapse -- forgetting previously-discovered components between probes. We release ToCS as open-source software. Code: https://github.com/che-shr-cat/tocs

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑