TaPR: Test-Aware Policy Refinement for Feedback-Conditioned Code Generation

Aofan Liu, Jingxiang Meng, Fangxin Liu, Yongbiao Chen
8/1/2026
cs.AI
rlhf-rlvr-dpo

No confident code implementation found for this paper.

Abstract

Multi-turn code agents rely on execution feedback to repair incorrect programs, yet standard reinforcement learning paradigms optimize and evaluate policy performance primarily using single-shot outcome rewards. This misalignment conflates initial code generation with feedback-driven refinement, discards granular execution signals across intermediate turns, and fails to evaluate whether the policy actually acquires self-repair capabilities.

Show full abstract

We propose Test-aware Policy Refinement (TaPR), a framework that transforms execution feedback into a dense per-turn test-pass-ratio reward under a consistent multi-turn interaction protocol. Across six models on 219 code-generation problems from LiveCodeBench, TaPR improves the pooled three-turn success rate (Pass@3) by 2.44 percentage points. In the predefined 7B/8B high-headroom slice, pooled accuracy increases from 30.25% to 33.56% (+3.31 pp), with 42 improvements and 13 regressions in paired trials. On a matched Qwen3-8B ablation, the dense reward supplies nonzero feedback in all of the first ten steps and reaches a higher Hard-subset peak than outcome-only GRPO within the tested budget, although GRPO nearly matches pooled Pass@3 by step 300. Our primary contribution is a reward-decomposition framework and a turn-aware evaluation protocol that decouple first-shot generation quality from multi-turn repair competence.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{liu2026tapr,
  title  = {TaPR: Test-Aware Policy Refinement for Feedback-Conditioned Code Generation},
  author = {Aofan Liu and Jingxiang Meng and Fangxin Liu and Yongbiao Chen},
  year   = {2026},
  eprint = {2608.00494},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2608.00494v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2608.00494.svg)](https://codeofpaper.com/paper/2608.00494)

Discussion