Summary of Ledex: Training Llms to Better Self-debug and Explain Code, by Nan Jiang et al.
LeDex: Training LLMs to Better Self-Debug and Explain Code
by Nan Jiang, Xiaopeng Li, Shiqi Wang, Qiang Zhou, Soneya Binta Hossain, Baishakhi Ray, Varun Kumar, Xiaofei Ma, Anoop Deoras
First submitted to arxiv on: 28 May 2024
Categories
- Main: Computation and Language (cs.CL)
- Secondary: Artificial Intelligence (cs.AI); Software Engineering (cs.SE)
GrooveSquid.com Paper Summaries
GrooveSquid.com’s goal is to make artificial intelligence research accessible by summarizing AI papers in simpler terms. Each summary below covers the same AI paper, written at different levels of difficulty. The medium difficulty and low difficulty versions are original summaries written by GrooveSquid.com, while the high difficulty version is the paper’s original abstract. Feel free to learn from the version that suits you best!
Summary difficulty | Written by | Summary |
---|---|---|
High | Paper authors | High Difficulty Summary Read the original abstract here |
Medium | GrooveSquid.com (original content) | Medium Difficulty Summary A recent study proposes LeDex, a training framework designed to improve self-debugging capabilities of Large Language Models (LLMs) for generating correct code. Self-debugging allows LLMs to refine their generated code based on execution feedback. Previous methods focused on prompting LLMs with few-shot examples, which are ineffective for small open-sourced LLMs. LeDex uses an automated pipeline to collect a high-quality dataset for code explanation and refinement by generating explanations and refinement trajectories from the LLM or a larger teacher model and filtering via execution verification. The framework involves supervised fine-tuning (SFT) and reinforcement learning (RL) on both successful and failed trajectories with a novel reward design considering code explanation and refinement quality. SFT improves pass@1 by up to 15.92% and pass@10 by 9.30% over four benchmarks, while RL training brings additional improvements. The trained LLMs exhibit iterative refinement abilities and can continuously refine code. |
Low | GrooveSquid.com (original content) | Low Difficulty Summary Imagine if computers could write their own code, but then they could fix mistakes on their own too? That’s what this study is all about! They developed a new way to train computer models to learn from their own mistakes. This helps them become better at writing correct code in the first place. The team tested their approach and found that it worked really well, even when the computers were small or had limited training data. They also showed that these smart computers can keep refining their code until it’s perfect. This breakthrough could help make software development faster and more efficient! |
Keywords
» Artificial intelligence » Few shot » Fine tuning » Prompting » Reinforcement learning » Supervised » Teacher model