Semi-Instruct: Bridging Natural-Instruct and Self-Instruct for Code Large Language Models
On the map: Synthetic data and self-improvement for LLMs → Code and instruction data synthesis
Abstract (arXiv)
Instruction tuning plays a pivotal role in Code Large Language Models (Code LLMs) for the task of program synthesis. Presently, two dominant paradigms for collecting tuning data are natural-instruct (human-written) and self-instruct (automatically generated). Natural-instruct includes diverse and correct codes but lacks instruction-code pairs, and exists improper code formats like nested single-line codes. In contrast, self-instruct automatically generates proper paired data. However, it suffers from low diversity due to generating duplicates and cannot ensure the correctness of codes. To bridge the both paradigms, we propose Semi-Instruct. It first converts diverse but improper codes from natural-instruct into proper instruction-code pairs through a method similar to self-instruct. To verify the correctness of generated codes, we design a novel way to construct test cases by generating cases' inputs and executing correct codes from natural-instruct to get outputs. Finally, diverse and correct instruction-code pairs are retained for instruction tuning. Experiments show that semi-instruct is significantly better than natural-instruct and self-instruct. Furthermore, the performance steadily improves as data scale increases.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Placed in Code and instruction data synthesis, one of 13 directions in Synthetic data and self-improvement for LLMs. Builds on 26 of its 35 references that are in the map. First posted on arXiv 1 Mar 2024.
Builds on
26 of 35 references.
Closest ancestors · 1
Same direction, newest first
Other references · 25
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023WizardLM: Empowering large pre-trained language models to follow complex instructionscited by 1,116
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,057
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021Measuring Coding Challenge Competence With APPScited by 879
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2023StarCoder: may the source be with you!cited by 790
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
- 2021Cross-Task Generalization via Natural Language Crowdsourcing Instructionscited by 696
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2022CodeT: Code Generation with Generated Testscited by 369
13 more
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2022A Systematic Evaluation of Large Language Models of Codecited by 360
- 2022The Stack: 3 TB of permissively licensed source codecited by 354
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 199
- 2022Large Language Models Meet NL2Code: A Surveycited by 135
- 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
- 2023Self-Edit: Fault-Aware Code Editor for Code Generationcited by 110
- 2023PanGu-Coder2: Boosting Large Language Models for Code with Ranking Feedbackcited by 69
- 2022Generating Natural Language Proofs with Verifier-Guided Searchcited by 52
- 2021Few-Shot Semantic Parsing with Language Models Trained On Codecited by 50
- 2020Automated Unit Test Generation for Pythoncited by 18
- 2019Many Independent Objective (MIO) Algorithm for Test Suite Generationcited by 4
Built on by
Citing papers per year: 2024: 2; 2025: 1.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2025Infinite-Instruct: Synthesizing Scaling Code instruction Data with Bidirectional Synthesis and Static Verification
- 2024SelfCodeAlign: Self-Alignment for Code Generation
- 2025Secure-Instruct: An Automated Pipeline for Synthesizing Instruction-Tuning Datasets Using LLMs for Secure Code Generation
- 2024InverseCoder: Self-improving Instruction-Tuned Code LLMs with Inverse-Instruct
- 2024DolphCoder: Echo-Locating Code Large Language Models with Diverse and Multi-Objective Instruction Tuning
- 2025Training with Pseudo-Code for Instruction Following
- 2025On Code-Induced Reasoning in LLMs
- 2024Evaluating and Aligning CodeLLMs on Human Preference