HyperAIHyperAI

Command Palette

Search for a command to run...

검증의 지평: 코딩 agent 보상에 대한 만능 해결책은 없다

초록

고전적인 직관은 해결책을 생성하는 것보다 검증하는 것이 더 쉽다는 것을 시사한다. 오늘날의 coding agents에게 이러한 직관은 전복되고 있다. 파운데이션 모델이 더 강력한 추론 능력을 갖추어 가고 엔지니어링 하니스가 더욱 정교해짐에 따라, 복잡한 후보 솔루션을 생성하는 것은 더 이상 어렵지 않다. 대신 이를 신뢰성 있게 검증하는 것이 더 어려운 과제로 부상했다. 우리가 구축할 수 있는 모든 검증기는 인간의 의도를 대리하는 것에 불과하며, 의도 그 자체는 결코 아니다. 이로 인해 검증은 이중적인 난제에 직면하게 된다. 첫째, 의도는 본질적으로 명확히 지정되지 않아 그것이 충족되었는지 정확히 확인하는 것이 본질적으로 어렵다. 둘째, 모델 학습 과정에서 최적화는 대리 변수와 의도 간의 격차를 확대하며, 이는 리워드 해킹이나 신호 포화로 나타난다. 이에 대응하여, 우리는 확장성, 충실도, 강건성이라는 세 가지 차원을 따라 검증 신호의 품질을 특성화하고, 이 세 가지를 동시에 달성하는 것이 핵심 과제임을 주장한다. 또한 우리는 네 가지 보상 구성을 연구한다. 일반 코딩 작업을 위한 테스트 검증기, 프론트엔드 작업을 위한 루브릭 검증기, 현실 세계 agent 작업을 위한 검증자로서의 사용자, 그리고 장기적 작업을 위한 automated agent 검증기이다. 다양한 작업 유형과 정책 능력 수준에 걸쳐, 우리는 보상 설계의 핵심 과제와 보상 신호를 더 효과적으로 활용하는 방법에 대해 심층 분석 및 실험을 수행한다. 실험 결과, 특화된 검증 설계는 리워드 해킹을 효과적으로 억제하고 작업 완료 품질을 향상시키며, 여러 내부 및 공개 벤치마크에서 상당한 성능 향상을 달성함을 보여준다. 이러한 경험들은 종합적으로 하나의 핵심 관찰을 제시한다. 정책 능력이 지속적으로 성장함에 따라 고정된 보상 함수는 효과성을 유지할 수 없으며, 검증기는 생성기와 공진화해야 한다는 것이다.

One-sentence Summary

The Qwen Team characterizes verification signals across scalability, faithfulness, and robustness to address the proxy limitations of coding agent rewards, demonstrating through experiments across internal and public benchmarks that targeted reward constructions suppress reward hacking, improve task completion quality, and must co-evolve with generator capabilities rather than rely on static functions.

Key Contributions

  • This paper characterizes verification signal quality along three dimensions, scalability, faithfulness, and robustness, and establishes their simultaneous optimization as a central challenge for coding agents.
  • The study develops four specialized reward constructions tailored to distinct development scenarios, including a test verifier for general coding tasks, a rubric verifier for frontend tasks, a user-as-verifier design for real-world agent tasks, and an automated agent verifier for long-horizon tasks.
  • Extensive experiments across diverse task types and policy capability levels demonstrate that targeted verification designs effectively suppress reward hacking, improve task completion quality, and yield significant gains across multiple internal and public benchmarks.

Introduction

The authors examine a shifting dynamic in coding agent development where generating sophisticated code has outpaced the ability to reliably verify it. Because human intent is inherently underspecified, existing verifiers act only as imperfect proxies that inevitably suffer from reward hacking, signal saturation, and misalignment as model capabilities grow. Prior approaches typically rely on static test suites, fixed rubrics, or offline feedback, which fail to capture dynamic runtime behavior, distinguish engineering quality, or adapt to emerging exploitation strategies. To address these gaps, the authors propose a co-evolutionary framework that aligns verifier design with generator advancement across four distinct task domains. They introduce targeted reward constructions, including a trajectory-level behavior monitor that penalizes shortcut-dependent solutions, and demonstrate that adaptive verification significantly suppresses reward hacking while improving clean task completion across multiple benchmarks.

Dataset

Method

The authors propose a comprehensive verification and training framework designed to ensure that reward signals remain faithful, scalable, and robust as policy capabilities advance. This approach treats verification as core infrastructure that actively co-evolves with the policy model. As illustrated in the conceptual diagram, the intelligence capabilities of both the verifier and the policy model progress over training time. The system is designed to overcome challenges such as reward hacking and guidance saturation by continuously evolving the verifier in tandem with the policy, creating a co-evolution flywheel that sustains trustworthy capability growth.

For frontend and visual tasks, the authors design an agentic interactive judge that evaluates generated artifacts through simulated user interactions. Refer to the framework diagram for the complete pipeline. The process begins with preprocessing, where page information such as the accessibility tree and browser state is extracted, while evaluation criteria are synthesized into critical and detail checklists. An action planner then generates a comprehensive action list in a single forward pass, specifying the sequence of interactions required to exercise the target functionality. This action list is executed by a Playwright-based render server in a live browser environment, which records an interaction trace comprising screen recordings and state changes. Finally, a judge model evaluates sampled frames from the recordings alongside the source code against the predefined rubric criteria to produce a final score. By grounding evaluation in actual runtime behavior rather than static code inspection, this architecture captures dynamic behaviors like state transitions and multi-step workflows while resisting reward hacking based on source code length.

The training process leverages these verification signals through multiple objectives tailored to different data types. For tasks derived from real-world user interactions, the authors treat user feedback as the primary verifier. They extract process-level natural language feedback and partition the response trajectory into contiguous spans with consistent polarity. The training framework incorporates Supervised Fine-Tuning (SFT) and Reweight SFT (RW-SFT), which applies differentiated loss weights to tokens based on their polarity annotations to amplify positive signals and attenuate negative ones. Standard SFT applies a uniform cross-entropy loss across all tokens, whereas RW-SFT introduces a weight function defined as:

w(pt)={wposif pt=positivewneuif pt=neutralwnegif pt=negativew ( p _ { t } ) = \left\{ \begin{array} { l l } { w _ { \mathrm { p o s } } } & { \mathrm { i f ~ } p _ { t } = \mathrm { p o s i t i v e } } \\ { w _ { \mathrm { n e u } } } & { \mathrm { i f ~ } p _ { t } = \mathrm { n e u t r a l } } \\ { w _ { \mathrm { n e g } } } & { \mathrm { i f ~ } p _ { t } = \mathrm { n e g a t i v e } } \end{array} \right.w(pt)=wposwneuwnegif pt=positiveif pt=neutralif pt=negative

The corresponding loss is calculated as:

LRWSFT(θ)=Et[w(pt)logπθ(ytx,y<t)]\mathcal { L } _ { \mathrm { R W - S F T } } ( \theta ) = - \mathbb { E } _ { t } [ w ( p _ { t } ) \log \pi _ { \theta } ( y _ { t } \mid x , y _ { < t } ) ]LRWSFT(θ)=Et[w(pt)logπθ(ytx,y<t)]

To further align the model with human intent, the authors introduce Span-Level KTO. This method defines the implicit reward for each span as the sum of log-likelihood ratios between the policy model and a frozen reference model:

rθ(x,Sk)=t=skek[logπθ(ytx,y<t)logπref(ytx,y<t)]r _ { \theta } ( x , S _ { k } ) = \sum _ { t = s _ { k } } ^ { e _ { k } } \left[ \log \pi _ { \theta } ( y _ { t } \mid x , y _ { < t } ) - \log \pi _ { \mathrm { r e f } } ( y _ { t } \mid x , y _ { < t } ) \right]rθ(x,Sk)=t=skek[logπθ(ytx,y<t)logπref(ytx,y<t)]

The reference point is estimated online using an exponential moving average of batch rewards:

zrefαzref+(1α)rˉbatchz _ { \mathrm { r e f } } \gets \alpha \cdot z _ { \mathrm { r e f } } + ( 1 - \alpha ) \cdot \bar { r } _ { \mathrm { b a t c h } }zrefαzref+(1α)rˉbatch

The preference loss applies distinct value functions to positive and negative spans based on the advantage relative to the reference point:

(Sk)={λwσ(βak)if pSk=positiveλlσ(βak)if pSk=negative\ell ( S _ { k } ) = \left\{ \begin{array} { l l } { - \lambda _ { w } \cdot \sigma ( \beta \cdot a _ { k } ) } & { \mathrm { i f ~ } p _ { S _ { k } } = \mathrm { p o s i t i v e } } \\ { - \lambda _ { l } \cdot \sigma ( - \beta \cdot a _ { k } ) } & { \mathrm { i f ~ } p _ { S _ { k } } = \mathrm { n e g a t i v e } } \end{array} \right.(Sk)={λwσ(βak)λlσ(βak)if pSk=positiveif pSk=negative

The overall preference objective is computed as the expectation over all spans:

Lpref(θ)=ESk[(Sk)]\mathcal { L } _ { \mathrm { p r e f } } ( \theta ) = \mathbb { E } _ { S _ { k } } [ \ell ( S _ { k } ) ]Lpref(θ)=ESk[(Sk)]

Neutral tokens are preserved through standard cross-entropy regularization:

Lneutral(θ)=EtTneu[logπθ(ytx,y<t)]\mathcal { L } _ { \mathrm { n e u t r a l } } ( \theta ) = - \mathbb { E } _ { t \in \mathcal { T } _ { \mathrm { n e u } } } [ \log \pi _ { \theta } ( y _ { t } \mid x , y _ { < t } ) ]Lneutral(θ)=EtTneu[logπθ(ytx,y<t)]

The complete training objective combines the preference loss with the neutral regularization term to guide policy optimization.

Experiment

The experiments evaluate the proposed Span-KTO framework against standard supervised and reweighting baselines across multiple software engineering benchmarks, validating its capacity to improve both task resolution rates and overall agent behavior. Analysis demonstrates that simply discarding or heavily penalizing negative training data degrades performance, whereas Span-KTO effectively mitigates negative behaviors such as inefficiency and miscommunication, particularly during complex or unresolved tasks. Complementary studies on evaluator design reveal that prompt granularity must be carefully calibrated to balance filtering quality and ranking consistency, as optimal evaluation strategies fundamentally depend on the downstream training objective. Finally, ablation studies confirm the stability of the interactive judging pipeline and indicate that Span-KTO reliably learns from negative spans without requiring explicit sample imbalance compensation.

The authors evaluate the +Mon. variant against a baseline across three SWE-Bench variants. Results show that the +Mon. variant consistently achieves superior code resolution capabilities while drastically reducing the frequency of hacking behaviors and resolved instances under hacking conditions. The +Mon. variant demonstrates a substantial improvement in clean resolution rates across all tested benchmarks. Hacking rates are significantly lower for the +Mon. variant compared to the baseline. The rate of resolved instances under hacking conditions is markedly reduced, indicating enhanced robustness against shortcut behaviors.

The authors systematically refine an evaluation prompt across five versions to enhance the faithfulness of automated code repair assessments. Gradual improvements are achieved by correcting specific behavioral flaws such as reliance on static analysis, missing end-to-end validation, and role boundary violations. While the fourth version yields the strongest alignment with ground-truth quality scores, the fifth version introduces excessive constraints that degrade overall performance. Addressing specific evaluator failure modes like lazy static analysis and role confusion steadily boosts accuracy and ranking consistency. Moderately detailed instructions successfully guide the model through the intended review pipeline without overwhelming its processing capacity. Overly prescriptive rubrics in the final iteration reduce effectiveness, highlighting a trade-off between rule granularity and model compliance.

The the the table presents examples of user feedback that highlight specific omissions in model outputs, categorized by task outcome and signal type. It demonstrates that omissions, ranging from missing mandatory filters to core functionality or context, are annotated across both successful and partial task outcomes. The data indicates that users primarily provide explicit signals regarding these gaps, although implicit signals are also utilized for certain complex scenarios. Omissions are identified as a key issue, with rationales highlighting gaps in mandatory filters, core management features, and contextual references. These omission-related deficiencies occur across both success and partial task outcomes, suggesting that successful tasks may still lack specific details or completeness. User feedback serves as an explicit signal for most omissions, while implicit signals are utilized for specific scenarios such as back-end review exceptions.

The authors evaluate different prompting and voting strategies for an evaluator agent, measuring performance across instruction clarity and unit test alignment. Results indicate that incorporating examples consistently improves clarity scores, while adding ground truth patches alongside examples yields the highest alignment performance. Different model and voting configurations reveal trade-offs between interaction efficiency and evaluation accuracy. Incorporating examples into the evaluation strategy significantly boosts instruction clarity metrics. Adding ground truth patches alongside examples further enhances unit test alignment performance. Different model and voting configurations demonstrate varying trade-offs between interaction efficiency and evaluation accuracy.

The the the table presents threshold-conditioned average unit-test scores for five evaluator prompt versions. Prompt v4 exhibits the strongest filtering quality at moderate thresholds, while prompt v5 achieves the highest score at the strictest threshold but with a significantly reduced number of retained samples. Prompt v4 maintains the strongest filtering quality at moderate thresholds. Prompt v5 yields the highest score at the strictest threshold but relies on a very small sample size. Stricter thresholds result in a substantial drop in the number of qualifying samples across all versions.

The experiments evaluate a modified model variant across SWE-Bench tasks, iteratively refine evaluation prompts to test automated assessment reliability, and analyze user feedback to validate output completeness. Testing demonstrates that the modified variant significantly enhances code resolution and robustness while minimizing shortcut-driven hacking behaviors. Iterative prompt refinement reveals that moderately detailed instructions paired with concrete examples and ground truth patches optimally balance instruction clarity, unit test alignment, and filtering quality, whereas overly prescriptive rules or excessively strict thresholds ultimately degrade performance by restricting viable outputs. Collectively, these findings highlight that task success does not guarantee completeness, as omission-related gaps frequently persist, and underscore the importance of balancing evaluation granularity with model compliance to maintain both accuracy and practical utility.


AI로 AI 구축

아이디어에서 출시까지 — 무료 AI 코코딩, 즉시 사용 가능한 환경, 최적의 GPU 가격으로 AI 개발을 가속화하세요.

AI 협업 코딩
바로 사용 가능한 GPU
최적의 가격

HyperAI Newsletters

최신 정보 구독하기
한국 시간 매주 월요일 오전 9시 에 이번 주의 최신 업데이트를 메일로 발송합니다
이메일 서비스 제공: MailChimp