Table of Contents
Fetching ...

Infinite-Instruct: Synthesizing Scaling Code instruction Data with Bidirectional Synthesis and Static Verification

Wenjing Xing, Wenke Lu, Yeheng Duan, Bing Zhao, Zhenghui kang, Yaolong Wang, Kai Gao, Lei Qiao

TL;DR

Infinite-Instruct presents a scalable, bidirectional approach to synthesize high-quality code instruction data by deriving programming problems from code (Reverse Construction) and reconstructing problem vocabularies via a knowledge-graph-driven Backfeeding Construction. A seven-dimensional, cross-language static-analysis pipeline filters samples to ensure instruction validity and code quality. Empirical results on mainstream code-generation benchmarks show substantial performance gains for both 7B- and 32B-parameter models, achieving strong results with far less data than competing methods. The framework emphasizes data quality, diversity, and efficiency, and the authors open-source the underlying datasets. This work offers a practical path to scalable, high-quality SFT data for programming-focused LLMs with broad potential impact in AI-assisted software development.

Abstract

Traditional code instruction data synthesis methods suffer from limited diversity and poor logic. We introduce Infinite-Instruct, an automated framework for synthesizing high-quality question-answer pairs, designed to enhance the code generation capabilities of large language models (LLMs). The framework focuses on improving the internal logic of synthesized problems and the quality of synthesized code. First, "Reverse Construction" transforms code snippets into diverse programming problems. Then, through "Backfeeding Construction," keywords in programming problems are structured into a knowledge graph to reconstruct them into programming problems with stronger internal logic. Finally, a cross-lingual static code analysis pipeline filters invalid samples to ensure data quality. Experiments show that on mainstream code generation benchmarks, our fine-tuned models achieve an average performance improvement of 21.70% on 7B-parameter models and 36.95% on 32B-parameter models. Using less than one-tenth of the instruction fine-tuning data, we achieved performance comparable to the Qwen-2.5-Coder-Instruct. Infinite-Instruct provides a scalable solution for LLM training in programming. We open-source the datasets used in the experiments, including both unfiltered versions and filtered versions via static analysis. The data are available at https://github.com/xingwenjing417/Infinite-Instruct-dataset

Infinite-Instruct: Synthesizing Scaling Code instruction Data with Bidirectional Synthesis and Static Verification

TL;DR

Infinite-Instruct presents a scalable, bidirectional approach to synthesize high-quality code instruction data by deriving programming problems from code (Reverse Construction) and reconstructing problem vocabularies via a knowledge-graph-driven Backfeeding Construction. A seven-dimensional, cross-language static-analysis pipeline filters samples to ensure instruction validity and code quality. Empirical results on mainstream code-generation benchmarks show substantial performance gains for both 7B- and 32B-parameter models, achieving strong results with far less data than competing methods. The framework emphasizes data quality, diversity, and efficiency, and the authors open-source the underlying datasets. This work offers a practical path to scalable, high-quality SFT data for programming-focused LLMs with broad potential impact in AI-assisted software development.

Abstract

Traditional code instruction data synthesis methods suffer from limited diversity and poor logic. We introduce Infinite-Instruct, an automated framework for synthesizing high-quality question-answer pairs, designed to enhance the code generation capabilities of large language models (LLMs). The framework focuses on improving the internal logic of synthesized problems and the quality of synthesized code. First, "Reverse Construction" transforms code snippets into diverse programming problems. Then, through "Backfeeding Construction," keywords in programming problems are structured into a knowledge graph to reconstruct them into programming problems with stronger internal logic. Finally, a cross-lingual static code analysis pipeline filters invalid samples to ensure data quality. Experiments show that on mainstream code generation benchmarks, our fine-tuned models achieve an average performance improvement of 21.70% on 7B-parameter models and 36.95% on 32B-parameter models. Using less than one-tenth of the instruction fine-tuning data, we achieved performance comparable to the Qwen-2.5-Coder-Instruct. Infinite-Instruct provides a scalable solution for LLM training in programming. We open-source the datasets used in the experiments, including both unfiltered versions and filtered versions via static analysis. The data are available at https://github.com/xingwenjing417/Infinite-Instruct-dataset

Paper Structure

This paper contains 37 sections, 5 figures, 4 tables.

Figures (5)

  • Figure 1: Automated Prompt Synthesis Technology Roadmap.
  • Figure 2: Complexity Score Comparison
  • Figure 3: Benchmark with MBPP
  • Figure 4: Benchmark with MHPP
  • Figure 5: Percentage of topic types