arXiv:2609.03309cs.SESep 2026

Manuscript Offprint

arXiv:2609.03309

TIPCODER: Reinforcement Learning Boosted Test-time Instruction Proposer for Code Generation

Minyu Chen, Sihao Wu, Ling-I Wu, Song Qin, Jingyang Li, Lei Ning, Jianxin Xue, Guoqiang Li

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Test-time scaling for code generation typically explores the solution space by sampling multiple programs from a fixed instruction. We study a complementary direction: instance-level instruction-space exploration. Our observation is that many coding failures stem from missing constraints, overlooked edge cases, or misleading reasoning paths induced by the original prompt. To address this, we propose TIPCODER, a test-time instruction proposer that generates problem-specific auxiliary tips before code synthesis. TIPCODER distills multi-turn debugging trajectories into proactive guidance and further optimizes the Proposer with reinforcement learning using a marginal-utility reward. At inference time, it generates both a base solution and a tip-guided solution, and applies a Reward Model for post-hoc selection. This exploration-selection design allows tips to expose additional candidate potential while reducing regressions from unnecessary guidance. Across the evaluated code-generation benchmarks and target Code LLMs, TIPCODER provides a consistent instruction-level test-time scaling strategy, comparing favorably with stochastic sampling and generic prompt optimization baselines under a shared reward-model-based selection protocol.

1 Introduction

Code Large Language Models (Guo et al., 2024; Hui et al., 2024) have become increasingly effective at translating natural-language specifications into executable programs. However, their outputs remain highly sensitive to the initial problem instruction, which may omit implicit constraints, under-specify boundary cases, or induce a spurious reasoning trajectory. Existing test-time scaling methods, such as Best-of-N sampling (Brown et al., 2024), improve reliability by allocating additional computation to explore the solution space (Snell et al., 2025; Muennighoff et al., 2025). Since these methods typically sample from a fixed conditioning context, they may remain concentrated around the same flawed interpretation when the original instruction is misleading. This motivates a complementary scaling axis: adapting the instruction that guides solution search.

Prompt optimization demonstrates that instructions can be optimized to improve model behavior (Zhou et al., 2023; Yang et al., 2024; Agrawal et al., 2026; Hu et al., 2025). For code generation, however, the limiting factor is often not the absence of a globally better prompt, but the absence of instance-specific guidance. A failure may hinge on a particular boundary case, index convention, library behavior, numerical constraint, or ambiguity in the specification. Such localized failure modes are poorly captured by fixed dataset-level prompts or generic reminders such as “consider edge cases”. We therefore study instance-level instruction proposing: generating a problem-specific auxiliary instruction before code synthesis.

We introduce TIPCODER, a test-time instruction proposer for code generation. Given a programming problem, a Proposer generates an auxiliary tip that highlights relevant constraints, likely pitfalls, or implementation considerations. The target Code LLM then produces two candidates: a base solution conditioned on the original instruction and a tip-guided solution conditioned on the augmented instruction. The tip is not intended to specify the solution; instead, it modifies the conditioning context so that the generator explores an alternative region of the solution space.

To learn such tips, TIPCODER distills multi-turn debugging trajectories into proactive guidance. In these trajectories, an initial solution fails, feedback exposes a missing requirement or incorrect assumption, and a subsequent solution repairs the

∗^{*} Corresponding authors.

†^{\dagger} Our dataset and code are available at https://github.com/Minkow/TipCoder error. This process reveals information that would have been useful before the initial generation. We first initialize the Proposer with Supervised Fine-Tuning on distilled repair guidance, and then optimize it with RL in a frozen Code LLM environment. The reward measures the marginal utility of the generated tip relative to base generation, encouraging corrective instructions while penalizing harmful or redundant perturbations.

At inference time, the utility of a tip is instance-dependent. A tip-guided candidate may recover a solution that is unlikely under the original prompt, but can also perturb an already correct base trajectory. Thus, the base and tip-guided candidates define an oracle-selection upper bound for instruction-guided scaling, while practical deployment requires instance-wise selection. TIPCODER uses a Reward Model (RM) for this post-hoc selection. The RM does not create instruction-level exploration, but approximates the selector needed to realize the candidate potential exposed by the Proposer.

TIPCODER operates as an external prompt-level module and requires no access to the target Code LLM's parameters, gradients, or execution feedback during inference. Across multiple code-generation benchmarks and backbones, TIPCODER consistently improves pass rates over base generation and stochastic sampling. Under the same RM reranking protocol, it also outperforms self-hinting and generic context-optimization baselines, indicating that the gains arise from more effective instance-level instruction proposals rather than from the mere availability of an additional candidate selector.

Our contributions are summarized as follows:

  • Instance-level instruction-space exploration. We formulate test-time instruction proposing as a complementary scaling axis for code generation, where problem-specific auxiliary instructions guide solution search beyond fixed-prompt stochastic sampling and dataset-level prompt optimization.

  • Debugging-distilled and utility-optimized Proposer. We distill multi-turn debugging trajectories into proactive tips that capture latent constraints, edge cases, and failure modes. We then optimize the Proposer with RL using a marginal-utility reward.

  • Exploration-selection decomposition. We use RM-based reranking to approximate

instance-wise selection between base and tip-guided candidates, and evaluate TIPCODER against stochastic sampling, self-hinting, and context-optimization baselines under the same reranking protocol.

References (1)