Skip to main content
QUICK REVIEW

[Paper Review] Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Code

Ziyin Zhang, Kai Chen|arXiv (Cornell University)|Nov 14, 2023
Semantic Web and OntologiesComputer Science17 citations
TL;DR

This paper surveys the landscape of language models for code, uniting NLP and software engineering perspectives, and provides a taxonomy, task coverage, and insights into code-specific features and future directions.

ABSTRACT

In this work we systematically review the recent advancements in software engineering with language models, covering 70+ models, 40+ evaluation tasks, 180+ datasets, and 900 related works. Unlike previous works, we integrate software engineering (SE) with natural language processing (NLP) by discussing the perspectives of both sides: SE applies language models for development automation, while NLP adopts SE tasks for language model evaluation. We break down code processing models into general language models represented by the GPT family and specialized models that are specifically pretrained on code, often with tailored objectives. We discuss the relations and differences between these models, and highlight the historical transition of code modeling from statistical models and RNNs to pretrained Transformers and LLMs, which is exactly the same course that had been taken by NLP. We also go beyond programming and review LLMs' application in other software engineering activities including requirement engineering, testing, deployment, and operations in an endeavor to provide a global view of NLP in SE, and identify key challenges and potential future directions in this domain. We keep the survey open and updated on GitHub at https://github.com/codefuse-ai/Awesome-Code-LLM.

Motivation & Objective

  • Motivate bridging NLP and software engineering communities in the study of language models for code.
  • Provide a comprehensive taxonomy of code-oriented LLMs from general LMs to code-specialized models.
  • Summarize downstream tasks, evaluation benchmarks, and code-specific features used in training and evaluation.
  • Highlight challenges, opportunities, and future directions for code language modeling and deployment in SE workflows.

Proposed method

  • Present a taxonomy of pretrained language models for code, distinguishing general-domain LMs, code-pretrained models, and specialized architectures.
  • Discuss code-specific features (e.g., AST, CFG, unit tests) and training objectives (e.g., infilling, instruction tuning) adopted from NLP.
  • Review downstream tasks and evaluation benchmarks across five input/output modalities (text-to-code, code-to-code, code-to-text, code-to-pattern, text-to-text).
  • Synthesize historical progression from statistical/RNN approaches to Transformer-based LLMs in code processing.
  • Outline integration with autonomous agents and production deployment aspects in SE contexts.

Experimental results

Research questions

  • RQ1What are the distinct model families and training paradigms used for code modeling, and how do they relate to NLP and SE traditions?
  • RQ2What are the canonical downstream tasks, benchmarks, and evaluation metrics for code language models, and how do they evolve with emerging capabilities like infilling and instruction tuning?
  • RQ3What code-specific features (e.g., ASTs, data flows) are leveraged to improve code understanding and generation in LLMs?
  • RQ4What are the key challenges and future directions at the intersection of NLP and SE for code LLMs?

Key findings

  • The survey covers 50+ models, 30+ tasks, 170+ datasets, and 700+ related works, highlighting the breadth of the field.
  • There is a historical transition in code modeling from statistical/RNN models to pretrained Transformers and large language models, mirroring NLP trends.
  • Code-specific features such as ASTs, CFGs, and unit tests are increasingly integrated into training and evaluation of code LLMs.
  • Recent advancements include instruction tuning, infilling objectives, scaling laws, architectural improvements, and autonomous agent research in code modeling.
  • Code engineering requirements in SE provide real-world testbeds that drive LLM development toward production readiness.
  • The work emphasizes ongoing alignment between NLP techniques and SE needs, advocating a unified view and continual updating via an open GitHub resource.

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.