mlsanityData to 7 Oct 2026

SelfCodeAlign: Self-Alignment for Code Generation

arXiv 2410.24198 ↗First posted 31 Oct 2024cs.CL cs.LG cs.SEcited by 61

Not on the map. Why?

Abstract (arXiv)

Instruction tuning is a supervised fine-tuning approach that significantly improves the ability of large language models (LLMs) to follow human instructions. We propose SelfCodeAlign, the first fully transparent and permissive pipeline for self-aligning code LLMs without extensive human annotations or distillation. SelfCodeAlign employs the same base model for inference throughout the data generation process. It first extracts diverse coding concepts from high-quality seed snippets to generate new tasks. It then samples multiple responses per task, pairs each with test cases, and validates them in a sandbox environment. Finally, passing examples are selected for instruction tuning. In our primary experiments, we use SelfCodeAlign with CodeQwen1.5-7B to generate a dataset of 74k instruction-response pairs. Finetuning on this dataset leads to a model that achieves a 67.1 pass@1 on HumanEval+, surpassing CodeLlama-70B-Instruct despite being ten times smaller. Across all benchmarks, this finetuned model consistently outperforms the original version trained with OctoPack, the previous state-of-the-art method for instruction tuning without human annotations or distillation. Additionally, we show that SelfCodeAlign is effective across LLMs of various sizes, from 3B to 33B, and that the base models can benefit more from alignment with their own data distribution. We further validate each component's effectiveness in our pipeline, showing that SelfCodeAlign outperforms both direct distillation from GPT-4o and leading GPT-3.5-based distillation methods, such as OSS-Instruct and Evol-Instruct. SelfCodeAlign has also led to the creation of StarCoder2-Instruct, the first fully transparent, permissively licensed, and self-aligned code LLM that achieves state-of-the-art coding performance.

Key facts. Cited by 61 papers in the map (data through 7 Oct 2026). Builds on 45 of its 64 references that are in the map. First posted on arXiv 31 Oct 2024.

Builds on

45 of 64 references.

References · 45

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
  3. 2021Program Synthesis with Large Language Modelscited by 3,509
  4. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  5. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
  6. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  7. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  8. 2019ZeRO: Memory Optimizations Toward Training Trillion Parameter Modelscited by 1,278
  9. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  10. 2018Adafactor: Adaptive Learning Rates with Sublinear Memory Costcited by 896
  11. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  12. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
33 more
  1. 2023StarCoder: may the source be with you!cited by 790
  2. 2023Large Language Modelscited by 774
  3. 2023OpenAssistant Conversations -- Democratizing Large Language Model Alignmentcited by 712
  4. 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 527
  5. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
  6. 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 442
  7. 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
  8. 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 342
  9. 2023Principle-Driven Self-Alignment of Language Models from Scratch with Minimal Human Supervisioncited by 318
  10. 2020Unsupervised Translation of Programming Languagescited by 262
  11. 2024OpenCodeInterpreter: Integrating Code Generation with Execution and Refinementcited by 242
  12. 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 173
  13. 2023ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generationcited by 166
  14. 2023Self-Alignment with Instruction Backtranslationcited by 149
  15. 2022Practical Program Repair in the Era of Large Pre-trained Language Modelscited by 133
  16. 2023InferFix: End-to-End Program Repair with LLMscited by 113
  17. 2023Learning Performance-Improving Code Editscited by 103
  18. 2024LongAlign: A Recipe for Long Context Alignment of Large Language Modelscited by 102
  19. 2023Impact of Code Language Models on Automated Program Repaircited by 85
  20. 2022Language Models Can Teach Themselves to Program Bettercited by 75
  21. 2024Evaluating Language Models for Efficient Code Generationcited by 69
  22. 2021AVATAR: A Parallel Corpus for Java-Python Program Translationcited by 59
  23. 2024CodeUltraFeedback: An LLM-as-a-Judge Dataset for Aligning Large Language Models to Coding Preferencescited by 56
  24. 2023Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repaircited by 55
  25. 2023SALMON: Self-Alignment with Instructable Reward Modelscited by 54
  26. 2023Large Language Models for Compiler Optimizationcited by 52
  27. 2023Can It Edit? Evaluating the Ability of Large Language Models to Follow Code Editing Instructionscited by 46
  28. 2023Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMscited by 45
  29. 2024Top Leaderboard Ranking = Top Coding Proficiency, Always? EvoEval: Evolving Coding Benchmarks via LLMcited by 38
  30. 2024Learning Code Preference via Synthetic Evolutioncited by 19
  31. 2024XFT: Unlocking the Power of Code Instruction Tuning by Simply Merging Upcycled Mixture-of-Expertscited by 7
  32. 2024Planning-Aware Code Infilling via Horizon-Length Predictioncited by 6
  33. 2024Arctic-SnowCoder: Demystifying High-Quality Data in Code Pretrainingcited by 5

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 2; 2025: 40; 2026: 19.

61 papers.

Sort:

By area:

  1. 2025SWE-smith: Scaling Data for Software Engineering Agentscited by 255
  2. 2025SWE-rebench: An Automated Pipeline for Task Collection and Decontaminated Evaluation of Software Engineering Agentscited by 127
  3. 2025KodCode: A Diverse, Challenging, and Verifiable Synthetic Dataset for Codingcited by 115
  4. 2025CodeElo: Benchmarking Competition-level Code Generation of LLMs with Human-comparable Elo Ratingscited by 109
  5. 2025OpenCodeReasoning: Advancing Data Distillation for Competitive Codingcited by 106
  6. 2025OpenCodeInstruct: A Large-scale Instruction Tuning Dataset for Code LLMscited by 57
  7. 2025LongCat-Flash Technical Reportcited by 54
  8. 2024ProSec: Fortifying Code LLMs with Proactive Security Alignmentcited by 24
  9. 2025HardTests: Synthesizing High-Quality Test Cases for LLM Codingcited by 22
  10. 2025DataFlow: An LLM-Driven Framework for Unified Data Preparation and Workflow Automation in the Era of Data-Centric AIcited by 22
  11. 2025EpiCoder: Encompassing Diversity and Complexity in Code Generationcited by 21
  12. 2025A Technical Survey of Reinforcement Learning Techniques for Large Language Modelscited by 19
38 more
  1. 2025A Survey on LLM Mid-Trainingcited by 18
  2. 2025GraphCodeAgent: Dual Graph-Guided LLM Agent for Retrieval-Augmented Repo-Level Code Generationcited by 17
  3. 2025PurpCode: Reasoning for Safer Code Generationcited by 17
  4. 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic Systemcited by 15
  5. 2025Propose, Solve, Verify: Self-Play Through Formal Verificationcited by 11
  6. 2025Teaching an Old LLM Secure Coding: Localized Preference Optimization on Distilled Preferencescited by 10
  7. 2024DSTC: Direct Preference Learning with Only Self-Generated Tests and Code to Improve Code LMscited by 9
  8. 2025RefineCoder: Iterative Improving of Large Language Models via Adaptive Critique Refinement for Code Generationcited by 8
  9. 2025Scoring Verifiers: Evaluating Synthetic Verification for Code and Reasoningcited by 8
  10. 2025Towards Formal Verification of LLM-Generated Code from Natural Language Promptscited by 8
  11. 2025DynaCode: A Dynamic Complexity-Aware Code Benchmark for Evaluating Large Language Models in Code Generationcited by 7
  12. 2025R2Vul: Learning to Reason about Software Vulnerabilities with Reinforcement Learning and Structured Reasoning Distillationcited by 7
  13. 2025Grammar-Based Code Representation: Is It a Worthy Pursuit for LLMs?cited by 5
  14. 2025The Code Barrier: What LLMs Actually Understand?cited by 5
  15. 2025Text-to-Pipeline: Bridging Natural Language and Data Preparation Pipelinescited by 5
  16. 2025Agnostics: Learning to Code in Any Programming Language via Reinforcement with a Universal Learning Environmentcited by 5
  17. 2025CodeEvo: Interaction-Driven Synthesis of Code-centric Data through Hybrid and Iterative Feedbackcited by 4
  18. 2025AgentPack: A Dataset of Code Changes, Co-Authored by Agents and Humanscited by 4
  19. 2026Secure Code Generation via Online Reinforcement Learning with Vulnerability Reward Modelcited by 4
  20. 2026MemToolAgent: Leveraging Memory for Tool Using Agents Based on Environment and User Feedbackcited by 4
  21. 2025GiFT: Gibbs Fine-Tuning for Code Generationcited by 3
  22. 2025Do Code Semantics Help? A Comprehensive Study on Execution Trace-Based Information for Code Large Language Modelscited by 3
  23. 2025Increasing LLM Coding Capabilities through Diverse Synthetic Coding Taskscited by 3
  24. 2026To See is Not to Master: Teaching LLMs to Use Private Libraries for Code Generationcited by 3
  25. 2026ACE: Self-Evolving LLM Coding Framework via Adversarial Unit Test Generation and Preference Optimizationcited by 3
  26. 2026BenchEvolver: Frontier Task Synthesis via Solution-Centric Evolutioncited by 3
  27. 2025Building A Proof-Oriented Programmer That Is 64% Better Than GPT-4o Under Data Scarcitycited by 2
  28. 2025Generating High-Quality Datasets for Code Editing via Open-Source Language Modelscited by 2
  29. 2026Exploring Pass-Rate Reward in Reinforcement Learning for Code Generationcited by 2
  30. 2026When AI Reviews Its Own Code: Recursive Self-Training Collapse in Code LLMscited by 2
  31. 2026Don't Claim Benchmark-Oriented Optimization Improves General Coding Capability -- Diverse Evaluation Is Requiredcited by 2
  32. 2026TailSFT: Filtered Fine-Tuning Improves Post-Training Performancecited by 2
  33. 2025Success is in the Details: Evaluate and Enhance Details Sensitivity of Code LLMs through Counterfactualscited by 1
  34. 2025From Output to Evaluation: Does Raw Instruction-Tuned Code LLMs Output Suffice for Fill-in-the-Middle Code Generation?cited by 1
  35. 2025TopXGen: Topic-Diverse Parallel Data Generation for Low-Resource Machine Translationcited by 1
  36. 2025Beyond Language Barriers: Multi-Agent Coordination for Multi-Language Code Generationcited by 1
  37. 2025Verification Limits Code LLM Trainingcited by 1
  38. 2025Breaking Memorization Barriers in LLM Code Fine-Tuning via Information Bottleneck for Improved Generalizationcited by 1

50 most cited of 61 All 61 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2024CodecLM: Aligning Language Models with Tailored Synthetic Data
  2. 2024Semi-Instruct: Bridging Natural-Instruct and Self-Instruct for Code Large Language Models
  3. 2025MAIN: Mutual Alignment Is Necessary for instruction tuning
  4. 2025SeDi-Instruct: Enhancing Alignment of Language Models through Self-Directed Instruction Generation
  5. 2025Towards Alignment-Centric Paradigm: A Survey of Instruction Tuning in Large Language Models
  6. 2024Self-Judge: Selective Instruction Following with Alignment Self-Evaluation
  7. 2025PACIFIC: a framework for generating benchmarks to check Precise Automatically Checked Instruction Following In Code
  8. 2024InverseCoder: Self-improving Instruction-Tuned Code LLMs with Inverse-Instruct