Introduction
The intersection of Natural Language Processing (NLP) and Software Engineering (SE) has seen a paradigm shift with the advent of Large Language Models (LLMs). Historically, these two communities viewed code through distinct lenses: NLP researchers treated code as a high-quality dataset for logical reasoning, while SE researchers sought automation for development tasks. This survey provides a unified "panoramic" perspective, categorizing over 70 models and 40 evaluation tasks to demonstrate how LLMs are becoming integral across the entire software development lifecycle—from requirements gathering to system operations.
Taxonomy of Code LMs
To navigate the rapidly expanding field, the authors organize "Code LMs" into a structured taxonomy based on three primary criteria: model relationship, architecture, and training objectives.
- Model Relationship:
- Raw LMs: General-purpose models like LLaMA or GPT-4 that exhibit strong coding capabilities.
- Adapted LMs: General models further refined through "continual pretraining" on massive code repositories (e.g., Codex, Code LLaMA).
- Specialized LMs: Models designed from the ground up for code-centric tasks (e.g., CodeBERT, CodeT5).
- Architecture: Models are categorized by their Transformer configuration—Encoder-only (understanding), Decoder-only (generation), or Encoder-Decoder (translation/transformation).
- Training Objectives: Beyond standard next-token prediction, the survey highlights code-specific objectives like Fill-In-the-Middle (FIM), which enables models to complete code snippets by considering both preceding and following context.
Datasets and Benchmarks
The survey reviews over 180 datasets, ranging from massive pretraining corpora like The Stack (3TB of code) to ubiquitous generation benchmarks like HumanEval and MBPP. A significant trend is the shift toward more complex, repository-level benchmarks such as SWE-bench, which requires models to resolve real-world GitHub issues by navigating entire codebases rather than isolated functions.
Key Insights and Evolution
Several critical observations emerge from the current research landscape:
- Quality over Quantity: Model size is not the sole determinant of performance. For instance, Phi-1 (1.3B), trained on high-quality synthetic "textbook" data, outperforms much larger models, highlighting the importance of data curation.
- Structural Awareness: Code is not merely text; it possesses strict formal structures. Modern models increasingly incorporate Abstract Syntax Trees (ASTs) and Data Flow Graphs to better capture program logic.
- The Rise of Agents: The field is moving toward interactive coding, where LLMs act as agents that write, execute, and self-debug code based on interpreter feedback.
Performance Trends
The rapid progress in the field is best illustrated by performance on the HumanEval benchmark.
In early 2021, Codex (12B) established a baseline with a Pass@1 score of 28.8%. By 2023, GPT-4 pushed this boundary to 67.0%. Currently, open-source specialized models like DeepSeek Coder (33B) are achieving scores exceeding 70%, rivaling or surpassing top-tier closed-source models. Despite these gains, models still struggle with low-resource languages like Verilog or COBOL.
Challenges and Future Directions
Despite the revolution, several hurdles remain:
- Benchmark Saturation: As HumanEval becomes "solved," there is a pressing need for more difficult, contamination-resistant benchmarks.
- Language Bias: Research remains heavily skewed toward imperative languages (Python, C++), leaving a gap in declarative and functional programming support.
- Enterprise Integration: Integrating LLM-generated snippets into massive, legacy enterprise systems poses significant engineering and safety challenges.
- Safety and Ethics: Ensuring models do not generate vulnerable code or leak sensitive training data remains a critical area for "guardrail" research.
Summary updated