Lune

ICLR2024顶会

Is Self-Repair a Silver Bullet for Code Generation?

Theo X. Olausson, Jeevana Priya Inala, Chenglong Wang, Jianfeng Gao, Armando Solar-Lezama

摘要

Large language models have shown remarkable aptitude in code generation, but still struggle to perform complex tasks. Self-repair -- in which the model debugs and repairs its own code -- has recently become a popular way to boost performance in these settings. However, despite its increasing popularity, existing studies of self-repair have been limited in scope; in many settings, its efficacy thus remains poorly understood. In this paper, we analyze Code Llama, GPT-3.5 and GPT-4's ability to perform self-repair on problems taken from HumanEval and APPS. We find that when the cost of carrying out repair is taken into account, performance gains are often modest, vary a lot between subsets of the data, and are sometimes not present at all. We hypothesize that this is because self-repair is bottlenecked by the model's ability to provide feedback on its own code; using a stronger model to artificially boost the quality of the feedback, we observe substantially larger performance gains. Similarly, a small-scale study in which we provide GPT-4 with feedback from human participants suggests that even for the strongest models, self-repair still lags far behind what can be achieved with human-level debugging.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learning 引用了 Training language models to follow instructions with human feedback
  • Self-Refine: Iterative Refinement with Self-Feedback 引用了 CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis
  • Self-Refine: Iterative Refinement with Self-Feedback 引用了 Training language models to follow instructions with human feedback
  • Teaching Large Language Models to Self-Debug 引用了 CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learning
  • Teaching Large Language Models to Self-Debug 引用了 CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis
  • Teaching Large Language Models to Self-Debug 引用了 Self-Refine: Iterative Refinement with Self-Feedback
  • Teaching Large Language Models to Self-Debug 引用了 Training language models to follow instructions with human feedback
  • Magicoder: Empowering Code Generation with OSS-Instruct 引用了 CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis
  • Magicoder: Empowering Code Generation with OSS-Instruct 引用了 Teaching Large Language Models to Self-Debug
  • AnalogCoder: Analog Circuit Design via Training-Free Code Generation 引用了 Teaching Large Language Models to Self-Debug
  • WorldCoder, a Model-Based LLM Agent: Building World Models by Writing Code and Interacting with the Environment 引用了 Teaching Large Language Models to Self-Debug
  • DiLu: A Knowledge-Driven Approach to Autonomous Driving with Large Language Models 引用了 Training language models to follow instructions with human feedback
  • Goedel-Prover-V2: Scaling Formal Theorem Proving with Scaffolded Data Synthesis and Self-Correction 引用了 Teaching Large Language Models to Self-Debug
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper60

  1. DiLu: A Knowledge-Driven Approach to Autonomous Driving with Large Language ModelsLicheng Wen, Daocheng Fu, Xin Li, Xinyu Cai 等ICLR 2024 · 255 次引用
  2. Magicoder: Empowering Code Generation with OSS-InstructYuxiang Wei, Zhe Wang, Jiawei Liu, Yifeng Ding 等ICML 2024 · 246 次引用
  3. Goedel-Prover-V2: Scaling Formal Theorem Proving with Scaffolded Data Synthesis and Self-CorrectionYong Lin, Shange Tang, Bohan Lyu, Ziran Yang 等ICLR 2026 · 160 次引用
  4. WorldCoder, a Model-Based LLM Agent: Building World Models by Writing Code and Interacting with the EnvironmentHao Tang, Darren Key, Kevin EllisNeurIPS 2024 · 123 次引用
  5. AnalogCoder: Analog Circuit Design via Training-Free Code GenerationYao Lai, Sungyoung Lee, Guojin Chen, Souradip Poddar 等AAAI 2025 · 105 次引用

它引用的 Paper13

  1. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
  2. Self-Refine: Iterative Refinement with Self-FeedbackAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan 等NeurIPS 2023 · 4,972 次引用
  3. Teaching Large Language Models to Self-DebugXinyun Chen, Maxwell Lin, Nathanael Schärli, Denny ZhouICLR 2024 · 1,085 次引用
  4. CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement LearningHung Le, Yue Wang, Akhilesh Deepak Gotmare, Silvio Savarese 等NeurIPS 2022 · 571 次引用
  5. CodeGen: An Open Large Language Model for Code with Multi-Turn Program SynthesisErik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu 等ICLR 2023 · 234 次引用

相关 Paper

  1. Self-Edit: Fault-Aware Code Editor for Code GenerationKechi Zhang, Zhuo Li, Jia Li, Ge Li 等ACL 2023 · 42 次引用
  2. INTERVENOR: Prompting the Coding Ability of Large Language Models with the Interactive Chain of RepairHanbin Wang, Zhenghao Liu, Shuo Wang, Ganqu Cui 等ACL Findings 2024 · 14 次引用
  3. Iterative Refinement of Project-Level Code Context for Precise Code Generation with Compiler FeedbackZhangqian Bi, Yao Wan, Zheng Wang, Hongyu Zhang 等ACL Findings 2024 · 18 次引用
  4. DebugBench: Evaluating Debugging Capability of Large Language ModelsRunchu Tian, Yining Ye, Yujia Qin, Xin Cong 等ACL Findings 2024 · 54 次引用
  5. CRUXEval: A Benchmark for Code Reasoning, Understanding and ExecutionAlex Gu, Baptiste Rozière, Hugh James Leather, Armando Solar-Lezama 等ICML 2024 · 270 次引用
黄昏的海面,两侧是细线勾勒的悬崖