[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-84864-en":3,"doc-seo-84864-105":29,"detail-sidebar-cat-0-en-105":90},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":4,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},84864,8796095461564,"Liam","https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d",8,"Research & Report","SCOPE: Leveraging Subgoal Critiques for Code Generation","Code generation with large language models (LLMs) can produce programs that seem correct while violating semantic requirements specified in natural-language. Existing feedback methods often use unstructured critiques or execution signals that fail to pinpoint what the code lacks. SCOPE introduces a prover-initialized subgoal critic that outputs three structured, parseable feedback fields—subgoals, gap analysis, and a robustness checklist—then uses supervised fine-tuning, process-aligned RL, and feedback-guided inference to improve repairs.","SCOPE: Leveraging Subgoal Critiques for Code  \nGeneration  \nYueke Zhang∗ , Yifan Zhang∗ , Zihan Fang∗ , Kevin Leach∗ , Juan Zhai†, Wei Zhang‡, Yu Huang∗  \n∗ Vanderbilt University  \n{yueke.zhang, yifan.zhang.2, zihan.fang, kevin.leach, [yu.huang](yu.huang}@vanderbilt.edu)[}](yu.huang}@vanderbilt.edu)[@vanderbilt.edu](yu.huang}@vanderbilt.edu)  \n†University of Massachusetts at Amherst  \n[juanzhai@umass.edu](juanzhai@umass.edu)  \n‡IBM  \n[weiz@us.ibm.com](weiz@us.ibm.com)  \narXiv :2607 .058 10v 1 [ cs . SE] 7 Jul 2026  \nAbstract—Code generation with large language models (LLMs) remains unreliable because generated programs can appear correct while still violating key semantic requirements in the naturallanguage 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 proverinitialized 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 anda sparse reward based on whether the critique improves the coder’s execution score.  \nExperiments 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 localized code corrections than Reflexion’s.  \nIndex Terms—LLM for Coding, Code Generation  \nI. INTRODUCTION  \nLarge Language Models (LLMs) for coding are now mainstream [1], [2] . AI coding assistants have moved from early trials to routine practice across industry and open source: enterprises report broad adoption and measurable productivity gains [3], [4] . Recent data highlights rapid growth in AIassisted development, while field studies with large organizations document sustained usage and positive developer experience impacts [5] .  \nHowever, reliability remains the central obstacle for LLMbased code generation [6] . Code LLMs often produce programs that look plausible but violate the user’s actual intent: they may hallucinate APIs, invent unsupported behaviors, or implement logic that passes superficial checks while failing on edge cases [7],[8] . Testing helps, but it does not fully solve the problem [9] . In realistic software settings, developers cannot enumerate tests for every path, corner case, and semantic constraint, and recent studies show that LLM-generated tests are themselves incomplete, sometimes invalid, and often weak  \nat exposing real defects [10], [11] . Thus, passing a limited test suite is useful evidence, but it is not the same as showing that the generated code actually satisfies the intended behavior [12] .  \nFig. 1. A natural-language task usually contains latent semantic requirements that are difficult to recover from execution feedback alone. SCOPE fills this gap by asking a prover-initialized critic to expose those requirements as explicit repair obligations before the coder revises the program.  \nA natural response to unreliable code generation is verification, but this is precisely where the difficulty deepens [13] . Existing approaches based on contracts, symbolic reasoning, and SMT solvers can verify well-specified properties, yet they rely on precise formal statements of behavior that are rarely available in open-ended natural-language programming tasks [14], [15] . Recent work at the intersection of LLMsand formal methods","cbCaitJ9OCTXpZYA","https://ap.wps.com/l/cbCaitJ9OCTXpZYA","pdf",18446393,1,12,"English","en",105,"# Abstract\n# Introduction\n## Reliability challenges in LLM code generation\n## From verification to actionable semantic obligations\n## SCOPE approach and intuition","[{\"question\":\"Why can LLM-generated code still fail even when it looks correct?\",\"answer\":\"Generated programs may satisfy surface-level checks while violating semantic requirements in the natural-language specification, such as hallucinating APIs, inventing unsupported behavior, or failing edge cases.\"},{\"question\":\"What is SCOPE and what feedback does it produce?\",\"answer\":\"SCOPE is a prover-initialized subgoal critic that produces three parseable feedback fields: subgoals, gap analysis, and a robustness checklist to make missing semantic obligations explicit.\"},{\"question\":\"How does SCOPE improve code generation compared with prior feedback baselines?\",\"answer\":\"SCOPE combines supervised fine-tuning, process-aligned reinforcement learning, and feedback-guided inference, using complementary rewards for structured critique quality and critique-driven improvement in execution score, leading to higher pass@1 on benchmark evaluations.\"}]",1784198898,30,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":85,"head_meta":87,"extra_data":89,"updated_unix":27},"scope-leveraging-subgoal-critiques-for-code-generation","",{"@graph":35,"@context":84},[36,53,67],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/research-report/",3,{"item":51,"name":13,"@type":42,"position":52},"https://docshare.wps.com/document/scope-leveraging-subgoal-critiques-for-code-generation/84864/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":61,"encodingFormat":60,"isAccessibleForFree":62,"interactionStatistic":63},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":40,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-16",true,{"@type":64,"interactionType":65,"userInteractionCount":4},"InteractionCounter",{"@type":66},"ViewAction",{"@type":68,"mainEntity":69},"FAQPage",[70,76,80],{"name":71,"@type":72,"acceptedAnswer":73},"Why can LLM-generated code still fail even when it looks correct?","Question",{"text":74,"@type":75},"Generated programs may satisfy surface-level checks while violating semantic requirements in the natural-language specification, such as hallucinating APIs, inventing unsupported behavior, or failing edge cases.","Answer",{"name":77,"@type":72,"acceptedAnswer":78},"What is SCOPE and what feedback does it produce?",{"text":79,"@type":75},"SCOPE is a prover-initialized subgoal critic that produces three parseable feedback fields: subgoals, gap analysis, and a robustness checklist to make missing semantic obligations explicit.",{"name":81,"@type":72,"acceptedAnswer":82},"How does SCOPE improve code generation compared with prior feedback baselines?",{"text":83,"@type":75},"SCOPE combines supervised fine-tuning, process-aligned reinforcement learning, and feedback-guided inference, using complementary rewards for structured critique quality and critique-driven improvement in execution score, leading to higher pass@1 on benchmark evaluations.","https://schema.org",{"og:url":51,"og:type":86,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":88,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":91},[92,96,100,104,109,114,119,121,126,129,133],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":93,"show_sort_weight":94,"slug":95},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":97,"show_sort_weight":98,"slug":99},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":45,"category_name":101,"show_sort_weight":102,"slug":103},"Exam",70,"exam",{"id":105,"doc_module":4,"doc_module_name":45,"category_name":106,"show_sort_weight":107,"slug":108},5,"Comic",60,"comic",{"id":110,"doc_module":4,"doc_module_name":45,"category_name":111,"show_sort_weight":112,"slug":113},6,"Technology",50,"technology",{"id":115,"doc_module":4,"doc_module_name":45,"category_name":116,"show_sort_weight":117,"slug":118},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":28,"slug":120},"research-report",{"id":122,"doc_module":4,"doc_module_name":45,"category_name":123,"show_sort_weight":124,"slug":125},9,"Religion & Spirituality",20,"religion-spirituality",{"id":124,"doc_module":4,"doc_module_name":45,"category_name":127,"show_sort_weight":124,"slug":128},"World Cup","world-cup",{"id":130,"doc_module":4,"doc_module_name":45,"category_name":131,"show_sort_weight":130,"slug":132},10,"Lifestyle","lifestyle",{"id":134,"doc_module":4,"doc_module_name":45,"category_name":135,"show_sort_weight":105,"slug":136},19,"General","general"]