atlas

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

SelfCodeAlign: Self-Alignment for Code Generation

NeurIPS 2024 · Large language models › Instruction and fine-tuning · approach: Instruction data selection · 5 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.

Proposes SelfCodeAlign, a transparent self-alignment pipeline where a code LLM generates its own coding tasks, multiple test-validated responses, and keeps passing pairs for instruction tuning, yielding a 74k dataset and CodeQwen-7B-based models.

Problem

Instruction tuning for code LLMs typically relies on costly human annotations or distillation from proprietary models, which may be restricted; prior self-instruct attempts for code degraded performance.

Approach

Use the base model alone for the whole pipeline: extract coding concepts from filtered seed functions, generate diverse tasks (Self-OSS-Instruct), sample multiple (response, tests) pairs, execute them in a sandbox, and keep only passing responses for instruction tuning.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
fine-tune CodeQwen-7B on SelfCodeAlign self-generated instruction dataCodeQwen-7B · HumanEval+pass@1: 45.7 -> 67.1Helped
train on SelfCodeAlign data instead of OctoPackCodeQwen-7B · HumanEval+pass@1: 50.6 -> 67.1Helped
use passing responses only instead of random responses (ablation)SelfCodeAlign · HumanEval+pass@1: 61.6 -> 65.2Helped
use passing responses only instead of failing responses only (ablation)SelfCodeAlign · HumanEval+pass@1: 57.9 -> 65.2Helped
increase random unfiltered response data from 15.6k to 27.7k examples (ablation)SelfCodeAlign · HumanEval+pass@1: 61.6 -> 61.6No clear effect
add concept generation between filtered seed functions and instruction generation (ablation)SelfCodeAlign · HumanEval+pass@1: 59.8 -> 65.2Helped
replace filtered functions with random code snippets for concept generation (ablation)SelfCodeAlign · HumanEval+pass@1: 65.2 -> 64.0Hurt
use SelfCodeAlign self-generated data rather than GPT-3.5-Turbo Evol-Instruct dataCodeQwen-7B · HumanEval+pass@1: 59.1 -> 67.1Helped
use SelfCodeAlign self-generated data rather than GPT-3.5-Turbo OSS-Instruct dataCodeQwen-7B · HumanEval+pass@1: 61.6 -> 67.1Helped
self-align with the base model's own data rather than GPT-4o responsesCodeQwen-7B · HumanEval+pass@1: 65.9 -> 67.1Helped
generate training data with StarCoder-3 instead of Llama-8 (ablation)StarCoder-3 · HumanEval+pass@1: 34.1 -> 35.4Helped
generate training data with DeepSeek-33 instead of the base model itself (ablation)StarCoder-3 · HumanEval+pass@1: 35.4 -> 42.1Helped

Surprising findings

Limitations

Experimental setup

Datasets: The Stack V1 (Python functions with docstrings) OctoPack OSS-Instruct dataset Evol-Instruct code dataset

Benchmarks: HumanEval+ MBPP+ LiveCodeBench EvoEval EvalPerf ClassEval DS-1000 CanItEdit

Metrics: pass@1 DPS win-rate

Baselines: CodeQwen1.5-7B-Chat CodeQwen1.5-7B-OctoPack OctoCoder-16B StarCoder2-15B CodeLlama-70B-Instruct OSS-Instruct Evol-Instruct GPT-4o direct distillation DeepSeek-Coder-6.7B-Instruct

Builds on: Self-Instruct OSS-Instruct OctoPack Evol-Instruct MultiPL-T

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