Skip to main content
QUICK REVIEW

[Paper Review] A Survey on Pretrained Language Models for Neural Code Intelligence

Yichen Xu, Yanqiao Zhu|arXiv (Cornell University)|Dec 20, 2022
Software Engineering ResearchComputer Science7 citations
TL;DR

This survey provides a comprehensive review of pretrained language models for Neural Code Intelligence (NCI), covering model architectures, pretraining techniques, downstream tasks, datasets, and challenges. It highlights the state-of-the-art performance of these models in code summarization, generation, and translation, while identifying key gaps such as limited structural bias integration and project-scale code understanding.

ABSTRACT

As the complexity of modern software continues to escalate, software engineering has become an increasingly daunting and error-prone endeavor. In recent years, the field of Neural Code Intelligence (NCI) has emerged as a promising solution, leveraging the power of deep learning techniques to tackle analytical tasks on source code with the goal of improving programming efficiency and minimizing human errors within the software industry. Pretrained language models have become a dominant force in NCI research, consistently delivering state-of-the-art results across a wide range of tasks, including code summarization, generation, and translation. In this paper, we present a comprehensive survey of the NCI domain, including a thorough review of pretraining techniques, tasks, datasets, and model architectures. We hope this paper will serve as a bridge between the natural language and programming language communities, offering insights for future research in this rapidly evolving field.

Motivation & Objective

  • To bridge the gap between the NLP and programming language communities by unifying research on pretrained language models for code intelligence.
  • To systematically categorize and analyze existing pretraining techniques, model architectures, and learning paradigms in Neural Code Intelligence.
  • To review downstream tasks and benchmark datasets used in NCI research, providing a foundation for future model development.
  • To identify critical challenges such as insufficient modeling of program structure, runtime semantics, and inter-module dependencies in real-world codebases.
  • To explore emerging applications of code language models beyond traditional tasks, including math problem solving and automated code education tools.

Proposed method

  • Conduct a systematic literature review of 2212.10079 and related works in NCI, focusing on sequence-based language modeling approaches.
  • Categorize and analyze model architectures, including Transformers and their variants, used in code language modeling.
  • Examine pretraining objectives such as masked language modeling and causal language modeling, applied to large-scale code corpora from platforms like GitHub.
  • Map downstream tasks such as code summarization, code generation, code translation, and defect detection to their corresponding datasets and evaluation metrics.
  • Evaluate the role of structural information (e.g., ASTs, control/data flow) in enhancing model performance, noting current limitations in integrating such biases.
  • Discuss the potential of leveraging runtime semantics and execution traces to improve program understanding and synthesis, especially in complex tasks like theorem proving.

Experimental results

Research questions

  • RQ1How do pretrained language models improve performance across key NCI tasks such as code summarization and generation?
  • RQ2What are the dominant model architectures and pretraining strategies used in state-of-the-art code language models?
  • RQ3To what extent do current models incorporate structural or semantic program information beyond token-level sequences?
  • RQ4What are the key limitations in scaling NCI models to real-world, multi-file software projects with inter-module dependencies?
  • RQ5What emerging applications exist for code language models beyond traditional software engineering tasks?

Key findings

  • Pretrained language models have achieved state-of-the-art performance across a wide range of NCI tasks, including code summarization, generation, and translation.
  • Models like Codex have demonstrated remarkable capabilities in program synthesis, enabling tools like GitHub Copilot and solving complex problems such as math word problems and Olympiad-level theorems.
  • Despite progress, most models still lack effective integration of program structure (e.g., ASTs) and runtime semantics, limiting their ability to generalize across complex codebases.
  • Current models are primarily trained on isolated code snippets, making it difficult to model inter-file or project-level dependencies, which is essential for real-world software development.
  • Code language models are being successfully applied beyond traditional NLP tasks, such as in automated theorem proving (GPT-f), education (course material generation), and robotics task planning.
  • Ethical concerns remain unresolved, particularly regarding the use of open-source code for training without proper consideration of licensing and contributor rights.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.