Assessing Code Generation with Intermediate Languages
Xun Deng, Sicheng Zhong, Honghua Dong, Jingyu Hu, Sidi Mohamed, Beillahi, Xujie Si, Fan Long

TL;DR
This paper systematically evaluates the impact of intermediate languages like natural language, pseudo-code, and programming languages on the performance of various large language models in code generation tasks, highlighting the conditions under which they are most effective.
Contribution
It provides a comprehensive analysis of intermediate language use across multiple models and languages, revealing insights into their effectiveness and limitations in code generation.
Findings
Natural language is the most effective intermediate representation.
Intermediate languages are more effective in larger models not yet at SOTA.
Multiple prompting without self-correction improves GPT model performance.
Abstract
Intermediate step methodologies like chain of thoughts (COT) have demonstrated effectiveness in enhancing the performance of Large Language Models (LLMs) on code generation. This study explores the utilization of intermediate languages, including various programming languages, natural language solutions, and pseudo-code, and systematically evaluates their impact on the performance of LLMs in code generation tasks. Our experiments encompass eleven models across the CodeLlama, GPT, and Mistral families, as well as newly released smaller models. Our findings reveal that intermediate languages generally exhibit greater efficacy in larger models that have not yet achieved state-of-the-art performance. Natural language consistently emerges as the most effective intermediate representation across all target languages. However, we observe no universally effective intermediate formal language…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques
