InverseCoder: Self-improving Instruction-Tuned Code LLMs with Inverse-Instruct
Recent advancements in open-source code large language models (LLMs) have been driven by fine-tuning on the data generated from powerful closed-source LLMs, which are expensive to obtain. This paper explores whether it is possible to use a fine-tuned open-source model to generate additional data to augment its instruction-tuning dataset. We make two observations: (1) A code snippet can serve as the response to different instructions. (2) Instruction-tuned code LLMs perform better at translating code into instructions than the reverse. Based on these observations, we propose Inverse-Instruct, a data augmentation technique that uses a fine-tuned LLM to generate additional instructions of code responses from its own training dataset. The additional instruction-response pairs are added to the original dataset, and a stronger code LLM can be obtained by fine-tuning on the augmented dataset. We empirically validate Inverse-Instruct on a range of open-source code models (e.g. CodeLlama-Python and DeepSeek-Coder) and benchmarks (e.g., HumanEval(+), MBPP(+), DS-1000 and MultiPL-E), showing it consistently improves the base models.
Authors
- Xishan Zhang (ORCID: https://orcid.org/0000-0002-8574-6199)
- Wei Wang (ORCID: https://orcid.org/0000-0002-9761-4118)
- S. B. Liu (ORCID: https://orcid.org/0000-0001-8787-930X)
- Ziyuan Nan
- Yunji Chen (ORCID: https://orcid.org/0000-0003-3925-5185)
- Kaizhao Yuan
- Yewen Pu (ORCID: https://orcid.org/0009-0000-4190-0636)
- Zidong Du (ORCID: https://orcid.org/0000-0002-7603-4210)
- Yutong Wu (ORCID: https://orcid.org/0000-0002-4258-2032)
- Rui Zhang (ORCID: https://orcid.org/0000-0002-6889-1247)
- Xing Jun Hu (ORCID: https://orcid.org/0009-0007-4314-0520)
- Lingzhe Gao
- Di Huang (ORCID: https://orcid.org/0000-0002-5371-8169)
- Qi Guo (ORCID: https://orcid.org/0000-0002-3196-2742)
- Wenxuan Shi
- Dawei Yin (ORCID: https://orcid.org/0000-0003-2553-7827)
Institutions
- Autodesk (United States) (US)
- Institute of Computing Technology (CN)
- Baidu (China) (CN)
Publication Details
- Journal
- Proceedings of the AAAI Conference on Artificial Intelligence
- Published
- 2025-04-11
- DOI
- https://doi.org/10.1609/aaai.v39i24.34742
- Primary Topic
- Microfluidic and Capillary Electrophoresis Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Science Foundation
- National Natural Science Foundation of China
- Chinese Academy of Sciences
- Youth Innovation Promotion Association of the Chinese Academy of Sciences
- Youth Innovation Promotion Association