atlas

Research map / Large language models / Instruction and fine-tuning

LLM-Assisted Code Cleaning For Training Accurate Code Generators

ICLR 2024 · Large language models › Instruction and fine-tuning · approach: Fine-tuning generalization and delta compression · 4 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Uses GPT-3.5-turbo to clean existing algorithmic code datasets (renaming, modularization, plan annotation) verified by test cases, then fine-tunes CodeLlama-7B on the cleaned data, showing up to 30% gains on APPS and Code-Contests.

Problem

Code generation models are trained on datasets judged only by functional correctness, ignoring readability and structure; the paper asks whether improving code style and structure improves training data quality for algorithmic code generation.

Approach

Instead of generating new synthetic data, transform existing programs into parallel cleaned versions via LLM instructions (rename variables, modularize into helper functions, prepend natural-language plans), using test-case equivalence checks to keep functional correctness.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace original training programs with modularized programsCL-7B fine-tuning · APPS-Introductorypass@1: 18.7 -> 22.7Helped
Replace original training programs with modularized programsCL-7B fine-tuning · Code-Contestspass@25: 6.4 -> 8.3Helped
Use modularized examples instead of original examples for in-context learningCL-7B · APPS-Introductorypass@1: 14.2 -> 17.5Helped
Use modularized examples instead of original examples for in-context learningCL-7B · Code-Contestspass@100: 7.2 -> 9.3Helped
Add generated plan annotations to modularized training programs (ablation)CL-7B fine-tuning · APPS-Introductorypass@25: 42.6 -> 43.8Helped
Add generated plan annotations to modularized training programs (ablation)CL-7B fine-tuning · Code-Contestspass@100: 12.4 -> 10.8Hurt
Add ground-truth plans at inferenceCL-7B trained on planning data · Code-Contests-Planpass@100: 17.8 -> 28.1Helped
Rename variables descriptively without modularizing (ablation)CL-7B fine-tuning · APPS-Introductorypass@1: 17.2 -> 19.1Helped
Rename variables descriptively without modularizing (ablation)CL-7B fine-tuning · Code-Contestspass@10: 5 -> 4.7Hurt
Train on GPT-3.5-turbo-generated solutions instead of cleaned existing solutions (ablation)CL-7B fine-tuning · APPS-Introductorypass@1: 22.7 -> 21.1Hurt
Use GPT-4-Turbo instead of GPT-3.5-turbo for transformations (ablation)CL-7B trained on modularized data · APPS-Introductorypass@10: 33.0 -> 34.3Helped
Train on 15% of the modularized dataset instead of the full original dataset (ablation)CL-7B fine-tuning · APPSpass@1No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: APPS Code-Contests

Benchmarks: APPS-Introductory APPS-Interview APPS-Competition Code-Contests

Metrics: pass@1 pass@10 pass@25 pass@100

Baselines: CodeLlama-7B fine-tuned on original data GPT-3.5-turbo distillation (D_distill) AlphaCode-9B AlphaCode-41B Code-Davinci-002 GPT-3.5-turbo

Builds on: CodeLlama chain-of-thought prompting Parsel AlphaCode dataset

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy