Lune

ICML2023顶会

LEVER: Learning to Verify Language-to-Code Generation with Execution

Ansong Ni, Srini Iyer, Dragomir Radev, Veselin Stoyanov, Wen-Tau Yih, Sida I. Wang, Xi Victoria Lin

摘要

The advent of large language models trained on code (code LLMs) has led to significant progress in language-to-code generation. State-of-the-art approaches in this area combine LLM decoding with sample pruning and reranking using test cases or heuristics based on the execution results. However, it is challenging to obtain test cases for many real-world language-to-code applications, and heuristics cannot well capture the semantic features of the execution results, such as data type and value range, which often indicates the correctness of the program. In this work, we propose LEVER, a simple approach to improve language-to-code generation by learning to verify the generated programs with their execution results. Specifically, we train verifiers to determine whether a program sampled from the LLMs is correct or not based on the natural language input, the program itself and its execution results. The sampled programs are reranked by combining the verification score with the LLM generation probability, and marginalizing over programs with the same execution results. On four datasets across the domains of table QA, math QA and basic Python programming, LEVER consistently improves over the base code LLMs(4.6% to 10.9% with code-davinci-002) and achieves new state-of-the-art results on all of them.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 76 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • OctoPack: Instruction Tuning Code Large Language Models 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
  • OctoPack: Instruction Tuning Code Large Language Models 引用了 Teaching Large Language Models to Self-Debug
  • OctoPack: Instruction Tuning Code Large Language Models 引用了 CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquing
  • OctoPack: Instruction Tuning Code Large Language Models 引用了 Language Models are Few-Shot Learners
  • OctoPack: Instruction Tuning Code Large Language Models 引用了 DS-1000: A Natural and Reliable Benchmark for Data Science Code Generation
  • OctoPack: Instruction Tuning Code Large Language Models 引用了 Finetuned Language Models are Zero-Shot Learners
  • Self-Consistency Improves Chain of Thought Reasoning in Language Models 引用了 Language Models are Few-Shot Learners
  • Teaching Large Language Models to Self-Debug 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
  • Teaching Large Language Models to Self-Debug 引用了 Language Models are Few-Shot Learners
  • CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquing 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
  • CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquing 引用了 Teaching Large Language Models to Self-Debug
  • CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquing 引用了 Language Models are Few-Shot Learners
  • Chain-of-Table: Evolving Tables in the Reasoning Chain for Table Understanding 引用了 Language Models are Few-Shot Learners
  • Finetuned Language Models are Zero-Shot Learners 引用了 Language Models are Few-Shot Learners
  • Many-Shot In-Context Learning 引用了 Language Models are Few-Shot Learners
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper76

  1. Teaching Large Language Models to Self-DebugXinyun Chen, Maxwell Lin, Nathanael Schärli, Denny ZhouICLR 2024 · 1,085 次引用
  2. CRITIC: Large Language Models Can Self-Correct with Tool-Interactive CritiquingZhibin Gou, Zhihong Shao, Yeyun Gong, Yelong Shen 等ICLR 2024 · 699 次引用
  3. Many-Shot In-Context LearningRishabh Agarwal, Avi Singh, Lei Zhang, Bernd Bohnet 等NeurIPS 2024 · 271 次引用
  4. Chain-of-Table: Evolving Tables in the Reasoning Chain for Table UnderstandingZilong Wang, Hao Zhang, Chun-Liang Li, Julian Martin Eisenschlos 等ICLR 2024 · 244 次引用
  5. OctoPack: Instruction Tuning Code Large Language ModelsNiklas Muennighoff, Qian Liu, Armel Randy Zebaze, Qinkai Zheng 等ICLR 2024 · 203 次引用

它引用的 Paper18

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu 等ICLR 2022 · 4,966 次引用
  3. CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and GenerationYue Wang, Weishi Wang, Shafiq R. Joty, Steven C. H. HoiEMNLP 2021 · 1,224 次引用
  4. Self-Consistency Improves Chain of Thought Reasoning in Language ModelsXuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V. Le 等ICLR 2023 · 681 次引用
  5. DS-1000: A Natural and Reliable Benchmark for Data Science Code GenerationYuhang Lai, Chengxi Li, Yiming Wang, Tianyi Zhang 等ICML 2023 · 504 次引用

相关 Paper

  1. CodePRM: Execution Feedback-enhanced Process Reward Model for Code GenerationQingyao Li, Xinyi Dai, Xiangyang Li, Weinan Zhang 等ACL Findings 2025 · 6 次引用
  2. Scaling Agentic Verifier for Competitive CodingZeyao Ma, Jing Zhang, Xiaokang Zhang, Jiaxi Yang 等ICML 2026 · 2 次引用
  3. HARDTESTGEN: A High-Quality RL Verifier Generation Pipeline for LLM Algorithimic CodingZhongmou He, Yee Man Choi, Kexun Zhang, Ivan Bercovich 等ICLR 2026
  4. Revisit Self-Debugging with Self-Generated Tests for Code GenerationXiancai Chen, Zhengwei Tao, Kechi Zhang, Changzhi Zhou 等ACL 2025
  5. Debug like a Human: A Large Language Model Debugger via Verifying Runtime Execution Step by StepLi Zhong, Zilong Wang, Jingbo ShangACL Findings 2024 · 69 次引用
黄昏的海面,两侧是细线勾勒的悬崖