跳到正文
arXiv cs.AI· Aditya Golatkar, Alessandro Achille, Renos Zabounidis, Vlad Sobal, Yangruibo Ding, Baishakhi Ray, Jonathan Buck, Guy Van den Broeck, Maryam Fazel, Pietro Perona, Wei Xia, Stefano Soatto·· 14 小时前AI 评分58

Skeleton Coding:以程序结构作为智能体规格

Skeleton Coding: Program Structure as a Specification for Agents

AI 导读

论文提出 Skeleton Coding,让开发者用类代码的高层格式与行为规格一起指定程序结构,而非只给测试和输入输出示例。作者将 AI 辅助编码建模为控制问题,证明骨架可指数级减少所需测试数量;在四个模型和三个基准上,最佳骨架规格使平均测试错误相对最佳端到端行为规格降低 48.4%,即使智能体可查询完整参考实现,加入骨架仍可相对降低最多 27.0%。

正文 · 原文

Authors:Aditya Golatkar, Alessandro Achille, Renos Zabounidis, Vlad Sobal, Yangruibo Ding, Baishakhi Ray, Jonathan Buck, Guy Van den Broeck, Maryam Fazel, Pietro Perona, Wei Xia, Stefano Soatto

View PDF HTML (experimental)

Abstract:Coding agents are typically provided end-to-end behavioral specifications that the code they produce should satisfy, such as tests and input--output examples. How many such specifications must a developer provide, and which ones, for the agent to produce the developer's intended program? We argue that this cannot be determined a priori, for it depends on the structure of the implementation, which is left to the agent to decide. An agent first commits to a structure---a decomposition into data types, modules, and functions---which fixes a class of candidate programs; behavioral specifications then select a program within that class. A set of tests that suffices for one structure may leave another badly underdetermined, requiring different edge cases or exponentially more examples. Since the structure is chosen by the agent, developers cannot ensure their specification is complete without reverse-engineering it from thousands of lines of generated code. To resolve this, we introduce Skeleton Coding, in which developers jointly specify the structure---in high-level, code-like format---alongside behavioral specifications. Theoretically, we model AI-assisted coding as a control problem, and show that skeletons can reduce exponentially the number of tests developers must supply to steer an agent toward an acceptable program. Empirically, across four models and three benchmarks, the best-performing skeleton specifications reduce mean test error by 48.4% relative to the best end-to-end behavioral specifications. Even when the agent can query a complete reference implementation, adding a skeleton reduces mean test error relatively by up to 27.0%. Skeletons also narrow the average gap between small and large models by about 52.4% while lowering implementation cost by 15--26x, and reduce code erosion by 24.7% on average.
Subjects: Software Engineering (cs.SE); Artificial Intelligence (cs.AI); Machine Learning (cs.LG)
Cite as: arXiv:2610.38214 [cs.SE]
  (or arXiv:2610.38214v1 [cs.SE] for this version)
  https://doi.org/10.48550/arXiv.2610.38214

arXiv-issued DOI via DataCite

Submission history

From: Aditya Golatkar [view email]
[v1] Wed, 28 Oct 2026 03:09:39 UTC (380 KB)

来源:arXiv cs.AI · arxiv.org