arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.27209cs.SEcs.AI
收藏

构建中的理论:协调语言模型用于研究软件,其中规范在演变

Theory Under Construction: Orchestrating Language Models for Research Software Where the Specification Evolves

Microsoft Research(微软研究院)

Halley Young, Nikolaj Björner

AI总结:

本文提出Comet-H框架,通过迭代提示自动机协调语言模型在研究软件中的应用,解决规范演变中的 hallucination accumulation 和 desynchronization 问题,并通过实验证明其有效性。

摘要:

大型语言模型如今能够生成大量代码和撰写研究文本,但研究软件项目需要比单个产物更多。数学论文、可执行系统、基准表面和公开声明必须共同发展,但往往相互偏离。我们识别出两种特定于语言模型的失败模式:hallucination accumulation,即声明超出代码或理论支持的范围,且未支持的断言在不同会话中传播;以及desynchronization,即代码、理论或模型自身的世界模型失去同步。我们提出Comet-H,一种迭代提示自动机,协调构想、实现、评估、基础和论文写作作为单个工作区状态的耦合坐标。在每一步,控制器通过评分当前工作区缺乏的内容选择下一个提示,将未完成的后续工作向前推进并保留半衰期,并在文档更改时重新检查论文和README与代码和基准。我们将提示选择框架为一个小的上下文老虎机问题,提示作为臂,工作区缺陷作为上下文,线性得分由手权加权。这种透明的评分器,配以逐渐遗忘的未完成工作记录,限制了长周期的后续工作,无需学习策略,并使每个提示选择在工作区中可读。我们创建了包含46个研究软件仓库的组合,涵盖二十余个领域。我们深入研究A3,一个完全在循环内构建的Python静态分析工具,其在90案例基准上的F1值为0.768,优于下一个最佳基准0.364。在约400次提交中,我们发现审计和收缩阶段主导了每条成功轨迹的后期阶段。

英文摘要:

Large language models can now generate substantial code and draft research text, but research-software projects require more than either artifact alone. The mathematical thesis, executable system, benchmark surface, and public claims must mature together, yet often drift apart. We identify two LM-specific failure modes: hallucination accumulation, in which claims exceed what code or theory supports and unsupported assertions propagate across sessions; and desynchronization, in which code, theory, or the model's own world model fall out of alignment. We propose Comet-H, an iterative prompt automaton that orchestrates ideation, implementation, evaluation, grounding, and paper-writing as coupled coordinates of a single workspace state. At each step, a controller selects the next prompt by scoring it against what the workspace currently lacks, carries unfinished follow-up work forward with a half-life, and re-checks the paper and README against the code and benchmarks whenever documentation changes. We frame prompt selection as a small contextual bandit problem over prompt families, with prompts as arms, workspace deficits as context, and a hand-weighted linear score. This transparent scorer, paired with a fading record of unfinished work, bounds long-horizon follow-ups, requires no learned policy, and makes each prompt choice legible from the workspace. We created a portfolio of 46 research-software repositories across two dozen domains. We study A3 in depth, a Python static-analysis tool built entirely within the loop, which reaches (F1 = 0.768) on a 90-case benchmark, compared with a next-best baseline of 0.364. Across approximately 400 commits, we find that audit-and-contraction passes dominate the later phases of every successful trajectory.

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

↑