Route-Align-Verify for Functional Correctness in Code Generation
- URL: http://arxiv.org/abs/2608.03341v1
- Date: Tue, 04 Aug 2026 08:52:40 GMT
- Title: Route-Align-Verify for Functional Correctness in Code Generation
- Abstract summary: RAV is a lightweight and modular framework that improves code generation with a fixed backbone model through three coordinated stages.<n>We evaluate RAV on the MBPP benchmark under both the sanitized and full settings.<n>Results indicate that functional correctness in code generation can be meaningfully improved without modifying the backbone architecture.
- Score: 0.8475107963160777
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Large language models (LLMs) have substantially improved code generation, yet achieving strong functional correctness remains difficult, especially for heterogeneous programming tasks where a single prompting strategy and a single directly generated output are often insufficient. In this paper, we present RAV, a lightweight and modular framework that improves code generation with a fixed backbone model through three coordinated stages: Route, which applies task-aware prompt routing before generation; Align, which reduces the mismatch between fine-tuning prompts and inference-time prompts through aligned LoRA adaptation; and Verify, which selects the final output by executing multiple candidates against visible public tests. We evaluate RAV on the MBPP benchmark under both the sanitized and full settings. The complete RAV pipeline achieves the best performance among all evaluated configurations, reaching 0.8911 on MBPP Sanitized and 0.8520 on MBPP Full. Compared with the base model, these results represent improvements of 6.35 and 9.92 percentage points, respectively. Component-wise ablation experiments further show that task-aware routing and aligned adaptation become substantially more effective when combined with execution-based verification. Additional robustness and contamination analyses support the reliability of the observed improvements. Overall, the results indicate that functional correctness in code generation can be meaningfully improved without modifying the backbone architecture, by jointly optimizing how tasks are prompted, how the model is adapted, and how final outputs are selected.
Related papers
- Do Agent Optimizers Compound? A Continual-Learning Evaluation on Terminal-Bench 2.0 [53.71882250666667]
Most reported gains from agent-optimization methods are one-shot.<n>This does not test the setting that matters for deployed agents.<n>We compare three approaches to agent-harness optimization.
arXiv Detail & Related papers (2026-07-15T16:36:04Z) - DaV-Gen: End-to-End Generative Retrieval via Draft-and-Verify [4.546259713278263]
textbfDaV-Gen is a novel unified solution designed to fundamentally the paradigm for both search and recommendation.<n>During training, the model is concurrently optimized for both candidate drafting and fine-grained verification.<n>This is achieved by a composite loss function that jointly trains the model on two distinct but related objectives.
arXiv Detail & Related papers (2026-07-09T11:22:50Z) - LLM-as-a-Verifier: A General-Purpose Verification Framework [74.40111651545979]
We introduce LLM-as-a-Verifier, a general-purpose verification framework.<n>It provides fine-grained feedback for agentic tasks without requiring additional training.<n>It achieves state-of-the-art performance on several benchmarks.
arXiv Detail & Related papers (2026-07-06T17:59:35Z) - Developing a Totally Unimodular Linear Program for Optimal Conformance Checking: When and Why It Complements A* [0.324890820102255]
This paper introduces a reformulation of alignment-based conformance checking as a totally unimodular linear program (LP)<n>By exploiting the underlying network-flow structure, the proposed formulation guarantees an optimal extreme-point solution through LP relaxation.<n>We derive simple algorithm-selection guidelines that combine both approaches, achieving average runtime savings of 38.6% with 96% selection accuracy compared to always using A*.
arXiv Detail & Related papers (2026-05-26T12:30:23Z) - PARM: Pipeline-Adapted Reward Model [60.769414637325326]
Reward models (RMs) are central to aligning large language models (LLMs) with human preferences, powering advanced decoding strategies.<n>While most prior work focuses on single-step generation, real-world applications increasingly adopt multi-stage pipelines.<n>We investigate this through code generation for optimization, constructing a pipeline that integrates reward models into both formulation and solution stages.
arXiv Detail & Related papers (2026-04-20T14:29:08Z) - $V_1$: Unifying Generation and Self-Verification for Parallel Reasoners [69.66089681814013]
$V_$ is a framework that unifies generation and verification through efficient pairwise ranking.<n>$V_$-Infer improves Pass@1 by up to $10%$ over pointwise verification.<n>$V_$-PairRL achieves $7$--$9%$ test-time scaling gains over standard RL and pointwise joint training.
arXiv Detail & Related papers (2026-03-04T17:22:16Z) - CVeDRL: An Efficient Code Verifier via Difficulty-aware Reinforcement Learning [57.24524263804788]
Code verifiers play a critical role in post-verification for LLM-based code generation.<n>Existing supervised fine-tuning methods suffer from data scarcity, high failure rates, and poor inference efficiency.<n>We show that naive RL with only functionality rewards fails to generate effective unit tests for difficult branches and samples.
arXiv Detail & Related papers (2026-01-30T10:33:29Z) - Optimization Modeling via Semantic Anchored Alignment [30.047608671041104]
We propose SAC-Opt, a backward-guided correction framework that grounds optimization modeling in problem semantics rather than solver feedback.<n>At each step, SAC-Opt aligns the original semantic anchors with those reconstructed from the generated code and selectively corrects only the mismatched components.<n> Empirical results on seven public datasets demonstrate that SAC-Opt improves average modeling accuracy by 7.8%, with gains of up to 21.9% on the ComplexLP dataset.
arXiv Detail & Related papers (2025-09-28T12:25:31Z) - Toward Reproducible Cross-Backend Compatibility for Deep Learning: A Configuration-First Framework with Three-Tier Verification [1.5269986601063288]
This paper presents a configuration-first framework for evaluating cross-backend compatibility in deep learning systems.<n>The framework decouples experiments from code using YAML, supports both library and repository models, and employs a three-tier verification protocol.<n>We observe that 72.0% of runs pass, with most discrepancies occurring under stricter thresholds.
arXiv Detail & Related papers (2025-08-29T16:28:28Z) - CompassVerifier: A Unified and Robust Verifier for LLMs Evaluation and Outcome Reward [50.97588334916863]
We develop CompassVerifier, an accurate and robust lightweight verifier model for evaluation and outcome reward.<n>It demonstrates multi-domain competency spanning math, knowledge, and diverse reasoning tasks, with the capability to process various answer types.<n>We introduce VerifierBench benchmark comprising model outputs collected from multiple data sources, augmented through manual analysis of metaerror patterns to enhance CompassVerifier.
arXiv Detail & Related papers (2025-08-05T17:55:24Z) - On the Role of Feedback in Test-Time Scaling of Agentic AI Workflows [71.92083784393418]
Agentic AI (systems that autonomously plan and act) are becoming widespread, yet their task success rate on complex tasks remains low.<n>Inference-time alignment relies on three components: sampling, evaluation, and feedback.<n>We introduce Iterative Agent Decoding (IAD), a procedure that repeatedly inserts feedback extracted from different forms of critiques.
arXiv Detail & Related papers (2025-04-02T17:40:47Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.