ImageNet classification with deep convolutional neural networks
Alex Krizhevsky, Ilya Sutskever et al.
1.6k
Citations
135
Influential Citations
International Conference on Learning Representations
Venue
2022
Year
An LLM trained for program synthesis using input-output examples and natural language descriptions.
Code generation has become a cornerstone application of large language models, with systems like OpenAI's Codex setting high bars. However, most prior work focused on single-turn prompts—where a user provides a complete description and expects a final code output. CodeGen challenges this paradigm by showing that breaking down programming problems into multiple conversational turns can yield better results. This is especially relevant for complex tasks where the initial specification is incomplete or ambiguous. By releasing a 16.1B parameter model and a new benchmark, the authors provide the community with tools to explore multi-turn synthesis more systematically.

CodeGen is an autoregressive transformer trained with a standard next-token prediction objective. The key innovation lies in its sequential training pipeline over three distinct datasets:

This staged approach allows the model to first acquire general linguistic knowledge, then learn cross-language programming patterns, and finally specialize in Python. The authors train models at four scales: 350M, 2.7B, 6.1B, and 16.1B parameters. All models use the same transformer architecture with hyperparameters detailed in the paper.

For multi-turn evaluation, the authors introduce the Multi-Turn Programming Benchmark (MTPB). In this benchmark, each problem is presented as a series of prompts that gradually refine the specification. The model must generate code after each turn, and the final solution is evaluated against test cases. This setup mimics real-world programming where requirements evolve through conversation.

On the standard HumanEval benchmark, CodeGen models show clear scaling trends. CodeGen-NL already matches or exceeds GPT-Neo and GPT-J. CodeGen-Multi improves further, and CodeGen-Mono delivers the best performance. Notably, CodeGen-Mono 2.7B competes with Codex 2.5B, CodeGen-Mono 6.1B approaches Codex 12B, and CodeGen-Mono 16.1B is competitive with or outperforms Codex 12B.

On MTPB, the authors report pass rates for 5 test cases with 40 samples per model per problem. Performance improves consistently with model size and data size, confirming that multi-turn synthesis benefits from larger models. This suggests that the ability to handle iterative specification is not a separate skill but emerges from scaling.
CodeGen's main contribution is twofold: it provides an open-source, competitive code generation model, and it systematically demonstrates the value of multi-turn prompting. The sequential training approach—from natural language to multi-language to Python—offers a blueprint for building specialized code models without sacrificing generality. The MTPB benchmark fills a gap in evaluating iterative code synthesis, which is more aligned with practical software development than single-turn benchmarks.
However, the paper has limitations. The MTPB is small (only 5 test cases), and the evaluation does not cover zero-shot or few-shot scenarios outside the training distribution. Additionally, the model's performance on languages other than Python is not thoroughly assessed. Future work could extend the multi-turn paradigm to other domains and explore more diverse benchmarks.
Overall, CodeGen advances the state of the art in program synthesis by showing that conversational interaction can unlock better code generation, and by providing the community with a strong open-source baseline for further research.
Alex Krizhevsky, Ilya Sutskever et al.
Ashish Vaswani, Noam Shazeer et al.
Douglas M. Bates, Martin Mächler et al.
Diederik P. Kingma, Jimmy Ba