arXiv cs.AI· Jingzhi Gong, Jie M. Zhang, Gunel Jahangirova, Dong Huang, Mohammad Reza Mousavi, Mark Harman·· 3 天前AI 评分43
COMPAS:面向代码生成的难度感知联合搜索优化方法
COMPAS: Difficulty-Aware Joint Search for Optimizing Code Generation
AI 导读
研究者提出代码生成优化方法 COMPAS,通过低成本模型选择与提示词-解码设置联合搜索,学习按任务难度划分的质量-成本前沿,并将测试任务在线路由到匹配的配置。在 LiveCodeBench 相同搜索预算下,COMPAS 将 pass@1 从最佳基线的 45.9% 提升至 52.8%,成本从 $36.57 降至 $4.92。
正文 · 原文
Abstract:Code generation systems make each LLM call with a model, a prompt, and decoding settings. However, existing optimization methods usually tune only part of these choices or use one fixed configuration for all tasks: global optimizers search one configuration for all tasks, routers choose only a model, and prompt optimizers keep the model and decoding settings fixed. This leaves their joint, group-specific interactions unclear. We therefore examine how these choices interact and observe that prompts and decoding settings interact, tuning effects vary by model, and the best configuration varies by task difficulty. Guided by these observations, we introduce COMPAS (Code-generation Optimization over Models, Prompts, And Decoding Settings), a difficulty-aware method that learns group-specific quality-cost fronts through low-cost model selection and joint prompt-decoding search, then routes each test task to its matching front online without further search. Under a matched search budget on LiveCodeBench, COMPAS improves pass@1 from 45.9% for the best baseline to 52.8% while reducing cost from $36.57 to $4.92. This also transfers to repository-level code generation on SWE-bench, resolving 76.0% of tasks versus 70.0% for the best baseline. Code and the reproducibility artifact are available at this https URL.
| Comments: | Accepted by AAAI 2027 main track |
| Subjects: | Software Engineering (cs.SE); Artificial Intelligence (cs.AI) |
| Cite as: | arXiv:2608.04336 [cs.SE] |
| (or arXiv:2608.04336v2 [cs.SE] for this version) | |
| https://doi.org/10.48550/arXiv.2608.04336 arXiv-issued DOI via DataCite |
Submission history
From: Jingzhi Gong [view email]
[v1]
Wed, 5 Aug 2026 01:28:43 UTC (284 KB)
[v2]
Wed, 2 Dec 2026 02:49:07 UTC (284 KB)
来源:arXiv cs.AI · arxiv.org