SCOPE: Leveraging Subgoal Critiques for Code Generation
- URL: http://arxiv.org/abs/2607.05810v1
- Date: Tue, 07 Jul 2026 04:09:41 GMT
- Title: SCOPE: Leveraging Subgoal Critiques for Code Generation
- Abstract summary: We present SCOPE, a prover-d subgoal critic for code generation.<n>SCOPE adapts a Lean-oriented prover model to produce three parseable feedback fields for downstream code generation.<n>Our approach combines supervised fine-tuning, process-aligned reinforcement learning (RL), and feedback-guided inference.
- Score: 14.869703886733761
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Code generation with large language models (LLMs) remains unreliable because generated programs can appear correct while still violating key semantic requirements in the natural language specification. Existing feedback-based methods improve over coder-only generation, but they often rely on unstructured critique or execution signals that do not explicitly identify what the code is semantically missing. We present SCOPE, a prover-initialized subgoal critic for code generation. SCOPE adapts a Lean-oriented prover model to produce three parseable feedback fields for downstream code generation: subgoals, gap analysis, and a robustness checklist. Our approach combines supervised fine-tuning, process-aligned reinforcement learning (RL), and feedback-guided inference, with two complementary rewards during RL: a dense reward for structured critique quality and a sparse reward based on whether the critique improves the coder's execution score. Experiments show that SCOPE improves over the compared feedback baselines. On LiveCodeBench V6, SCOPE achieves 39.4% pass@1, compared with 36.6% for Reflexion and 20.6% for the coder-only baseline. On BigCodeBench (Hard), it reaches 42.6%, surpassing Reflexion at 36.5% and coder-only generation at 34.5%. Further analysis shows that SCOPE's gains are concentrated in tasks with concrete semantic constraints and that its code corrections are more localized than Reflexion's.
Related papers
- Beyond Output Correctness: Benchmarking and Evaluating Large Language Model Reasoning in Coding Tasks [4.641791001110209]
We introduce CodeRQ-Bench, the first benchmark for evaluating reasoning quality across three coding task categories: generation, summarization, and classification.<n>We propose VERA, a two-stage evaluator that combines evidence-grounded verification with ambiguity-aware score correction.<n>Experiments on CodeRQ-Bench show that VERA consistently outperforms strong baselines across four datasets.
arXiv Detail & Related papers (2026-04-14T07:12:46Z) - EvolveCoder: Evolving Test Cases via Adversarial Verification for Code Reinforcement Learning [46.87136299625531]
Reinforcement learning with verifiable rewards (RLVR) is a promising approach for improving code generation in large language models.<n>We propose a solution-conditioned and adversarial verification framework that iteratively refines test cases based on the execution behaviors of candidate solutions.<n>We introduce EvolveCoder-22k, a large-scale coding reinforcement learning dataset constructed through multiple rounds of adversarial test case evolution.
arXiv Detail & Related papers (2026-03-13T06:26:50Z) - 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) - BRIDGE: Building Representations In Domain Guided Program Verification [67.36686119518441]
BRIDGE decomposes verification into three interconnected domains: Code, Specifications, and Proofs.<n>We show that this approach substantially improves both accuracy and efficiency beyond standard error feedback methods.
arXiv Detail & Related papers (2025-11-26T06:39:19Z) - Critique-Coder: Enhancing Coder Models by Critique Reinforcement Learning [49.35842828047236]
Reinforcement Learning (RL) has emerged as a popular training paradigm, particularly when paired with reasoning models.<n>We propose Critique Reinforcement Learning (CRL), where a model is tasked with generating a critique for a given (question, solution) pair.<n>We show that textscCritique-Coder consistently outperforms RL-only baselines on different benchmarks.
arXiv Detail & Related papers (2025-09-26T18:30:49Z) - When Retriever Meets Generator: A Joint Model for Code Comment Generation [3.6781644685120924]
RAGSum is built on top offuse retrieval and generation using a single CodeT5 backbone.<n>A contrastive pre-training phase shapes code embeddings for nearest-neighbor search.<n>A lightweight self-refinement loop is deployed to polish the final output.
arXiv Detail & Related papers (2025-07-16T18:12:27Z) - Turning the Tide: Repository-based Code Reflection [52.13709676656648]
We introduce LiveRepoReflection, a benchmark for evaluating code understanding and generation in multi-file repository contexts.<n>1,888 rigorously filtered test cases across $6$ programming languages to ensure diversity, correctness, and high difficulty.<n>We also create RepoReflection-Instruct, a large-scale, quality-filtered instruction-tuning dataset derived from diverse sources.
arXiv Detail & Related papers (2025-07-14T02:36:27Z) - Teaching LLM to Reason: Reinforcement Learning from Algorithmic Problems without Code [76.80306464249217]
We propose TeaR, which aims at teaching LLMs to reason better.<n>TeaR leverages careful data curation and reinforcement learning to guide models in discovering optimal reasoning paths through code-related tasks.<n>We conduct extensive experiments using two base models and three long-CoT distillation models, with model sizes ranging from 1.5 billion to 32 billion parameters, and across 17 benchmarks spanning Math, Knowledge, Code, and Logical Reasoning.
arXiv Detail & Related papers (2025-07-10T07:34:05Z) - CHORUS: Zero-shot Hierarchical Retrieval and Orchestration for Generating Linear Programming Code [0.0]
This study explores the efficiency of Large Language Models (LLMs) in generating solver-specific Linear Programming (LP) code.<n>We propose CHORUS, a retrieval-augmented generation framework for synthesizing Gurobi-based LP code from natural language problem statements.<n> Experiments on the NL4-Code benchmark show that CHORUS improves the performance of open-source LLMs by a significant margin compared to baseline and conventional RAG.
arXiv Detail & Related papers (2025-05-02T16:36:57Z) - A Preliminary Study on the Robustness of Code Generation by Large Language Models [40.01096420024215]
We present the first empirical study of LLM-generated code robustness using the CoderEval benchmark.<n>We find that 35.2% of their outputs are less robust than human-written code, with over 90% of deficiencies caused by missing conditional checks.<n>To address these issues, we propose RobGen, a model-agnostic framework that improves robustness without retraining.
arXiv Detail & Related papers (2025-03-26T03:44:03Z) - Rewriting the Code: A Simple Method for Large Language Model Augmented Code Search [7.822427053078387]
Generation-Augmented Retrieval (GAR) framework generates exemplar code snippets to augment queries.
We propose a simple yet effective method that additionally Rewrites the Code (ReCo) within the for style normalization.
Code Style Similarity is the first metric tailored to quantify stylistic similarities in code.
arXiv Detail & Related papers (2024-01-09T12:12:50Z)
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.