NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Large Language Models Meet NL2Code: A Survey

Daoguang Zan, Bei Chen, Fengji Zhang, Dianjie Lu, Bingchao Wu, Bei Guan, Yongji Wang, Jian-Guang Lou

Introduction

The long-standing ambition of "programming in plain English"—technically known as Natural Language to Code (NL2Code)—has undergone a radical transformation. Historically, this task relied on rigid heuristic rules or expert systems that struggled to scale. With the advent of deep learning, progress was made, but it initially required vast amounts of expensive, manually labeled natural language-code pairs.

The recent explosion of Large Language Models (LLMs) has shifted the paradigm toward zero-shot generation using models trained on massive, unlabeled code repositories. This paper provides the first comprehensive survey of 27 LLMs specifically designed for NL2Code, identifying the core factors that drive success and the gaps that still separate AI from human programmers.

The Evolving Landscape of NL2Code Models

The field is moving at an unprecedented pace, with model architectures and parameter counts evolving rapidly. The survey categorizes these models into two primary architectural camps:

  • Decoder-only Models: (e.g., Codex, GPT-J, CodeGen) These are currently favored for larger scales and causal language modeling, where the model predicts the next token in a sequence.
  • Encoder-Decoder Models: (e.g., CodeT5, AlphaCode) These are often utilized for tasks requiring a deep bidirectional understanding of the input description before generation begins.
Timeline and parameter scale of major LLMs for code generation (2020-2022).

Methodology and Data

The authors identify a "holy trinity" of success factors for modern NL2Code models: Large Size, Premium Data, and Expert Tuning.

Data Strategies

Success is heavily dependent on the quality of the training corpora. The paper reviews massive unlabeled datasets such as The Stack, GitHub-Code, and BigQuery. A key insight is that "Premium Data" is not just about volume; it requires aggressive de-duplication and the filtering of low-quality or auto-generated code to prevent the model from learning bad habits.

Evaluation Benchmarks

To track progress, the authors summarize 17 benchmarks. The gold standard remains HumanEval, consisting of 164 hand-written Python problems with unit tests. Other critical benchmarks include MBPP for entry-level concepts and APPS for competitive programming. Newer multilingual sets like HumanEval-X are now testing cross-language capabilities in Java, C++, and JavaScript.

The Scaling of Code Intelligence

One of the most significant findings of the survey is the clear correlation between model scale and performance. As parameter counts move from millions to billions, the pass@1 rate on HumanEval shows consistent, near-linear improvement on a log scale.

Scaling trends showing (a) pass@1 performance and (b) syntax error rates relative to model size.

Syntax vs. Semantics

Increasing model size drastically reduces syntax errors—the "grammar" of code. For instance, the 16B version of CodeGen-Mono achieves a syntax error rate of only 6%. However, semantic correctness—the underlying logic of the code—scales more slowly. This suggests that while larger models are better at writing valid code, the primary bottleneck remains the model's ability to reason through complex logic.

The Temperature Trade-off

Hyperparameter tuning, particularly sampling temperature, plays a vital role. Higher temperatures lead to more diverse code, which is beneficial for pass@100 metrics (where the model has 100 attempts to find a solution). Conversely, lower temperatures are more reliable for pass@1 scenarios, where the model must get the answer right on the first try.

Challenges and Future Frontiers

Despite the impressive performance of landmark models like Codex (12B) and open-source alternatives like CodeGen-Mono (16.1B), several critical gaps remain:

  1. Understanding Ability: LLMs remain highly sensitive to prompt phrasing and struggle with complex, multi-step requirements that human developers navigate with ease.
  2. The "Yes-Man" Problem: Unlike humans, LLMs rarely admit when a prompt is nonsensical or unsolvable, often providing confident but incorrect answers. Developing "self-validation" is a key research frontier.
  3. Adaptive Learning: Humans can read a new API's documentation and apply it immediately. LLMs generally require retraining or complex retrieval-augmented generation to handle updated libraries or new frameworks.
  4. Explainability: While models can generate functional code, they often lack the ability to explain the logic behind it, which is essential for collaborative software maintenance.

To support the community in this fast-moving field, the authors maintain a live tracker of model performance and evolution at https://nl2code.github.io.

Summary updated

BibTeX
@inproceedings{zan2023large,
  author = {Daoguang Zan and Bei Chen and Fengji Zhang and Dianjie Lu and Bingchao Wu and Bei Guan and Yongji Wang and Jian-Guang Lou},
  title = {{Large Language Models Meet NL2Code: A Survey}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-long.411},
}
Figure