SCOPE: Leveraging Subgoal Critiques for Code Generation

· Source: cs.SE updates on arXiv.org · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Expert, extended

Summary

SCOPE, a novel prover-initialized subgoal critic, significantly enhances large language model (LLM) code generation reliability by addressing semantic requirement violations. It adapts a Lean-oriented prover model, DeepSeek-Prover-V2-7B, to produce structured feedback: subgoals, gap analysis, and a robustness checklist. This approach combines supervised fine-tuning, process-aligned reinforcement learning with dense semantic and sparse execution rewards, and feedback-guided inference. Experiments on LiveCodeBench V6 show SCOPE achieving 39.4% pass@1, outperforming Reflexion (36.6%) and coder-only baselines (20.6%). On BigCodeBench (Hard), it reached 42.6% pass@1, surpassing Reflexion (36.5%). SCOPE's gains are concentrated in tasks with concrete semantic constraints, leading to more localized and surgical code corrections.

Key takeaway

For AI Engineers developing LLM-based code generation systems, you should integrate structured semantic critics like SCOPE. This approach provides explicit repair obligations, reducing broad search and leading to more precise, localized code corrections. By specializing a smaller critic for semantic feedback, you can significantly improve reliability and reduce crash-like failures in your generated code, especially for tasks with complex semantic constraints.

Key insights

SCOPE uses a prover-initialized critic to generate structured semantic feedback, improving LLM code generation reliability.

Principles

Method

SCOPE's three stages are: data construction with a tutor LLM, supervised fine-tuning of DeepSeek-Prover-V2-7B for role alignment, and process-aligned reinforcement learning with GRPO.

In practice

Topics

Best for: Research Scientist, AI Scientist, Machine Learning Engineer, AI Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by cs.SE updates on arXiv.org.