mlsanityData to 7 Oct 2026

LAMNER: Code Comment Generation Using Character Language Model and Named Entity Recognition

arXiv 2204.09654 ↗First posted 5 Apr 2022cs.CL cs.AI cs.SEcited by 1

Not on the map. Why?

Abstract (arXiv)

Code comment generation is the task of generating a high-level natural language description for a given code method or function. Although researchers have been studying multiple ways to generate code comments automatically, previous work mainly considers representing a code token in its entirety semantics form only (e.g., a language model is used to learn the semantics of a code token), and additional code properties such as the tree structure of a code are included as an auxiliary input to the model. There are two limitations: 1) Learning the code token in its entirety form may not be able to capture information succinctly in source code, and 2) The code token does not contain additional syntactic information, inherently important in programming languages. In this paper, we present LAnguage Model and Named Entity Recognition (LAMNER), a code comment generator capable of encoding code constructs effectively and capturing the structural property of a code token. A character-level language model is used to learn the semantic representation to encode a code token. For the structural property of a token, a Named Entity Recognition model is trained to learn the different types of code tokens. These representations are then fed into an encoder-decoder architecture to generate code comments. We evaluate the generated comments from LAMNER and other baselines on a popular Java dataset with four commonly used metrics. Our results show that LAMNER is effective and improves over the best baseline model in BLEU-1, BLEU-2, BLEU-3, BLEU-4, ROUGE-L, METEOR, and CIDEr by 14.34%, 18.98%, 21.55%, 23.00%, 10.52%, 1.44%, and 25.86%, respectively. Additionally, we fused LAMNER's code representation with the baseline models, and the fused models consistently showed improvement over the non-fused models. The human evaluation further shows that LAMNER produces high-quality code comments.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 50 of its 88 references that are in the map. First posted on arXiv 5 Apr 2022.

Builds on

50 of 88 references.

References · 50

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
  3. 2013Distributed Representations of Words and Phrases and their Compositionalitycited by 3,462
  4. 2014Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modelingcited by 2,341
  5. 2014CIDEr: Consensus-based Image Description Evaluationcited by 2,027
  6. 2016Enriching Word Vectors with Subword Informationcited by 1,578
  7. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  8. 2020BLEURT: Learning Robust Metrics for Text Generationcited by 1,196
  9. 2019Text Summarization with Pretrained Encoderscited by 553
  10. 2015Bidirectional LSTM-CRF Models for Sequence Taggingcited by 544
  11. 2018Fundamentals of Recurrent Neural Network (RNN) and Long Short-Term Memory (LSTM) Networkcited by 415
  12. 2018Newsroom: A Dataset of 1.3 Million Summaries with Diverse Extractive Strategiescited by 292
38 more
  1. 2017OpenNMT: Open-source Toolkit for Neural Machine Translationcited by 251
  2. 2018code2vec: Learning Distributed Representations of Codecited by 249
  3. 2017Learning to Represent Programs with Graphscited by 219
  4. 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
  5. 2020A Transformer-based Approach for Source Code Summarizationcited by 129
  6. 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 99
  7. 2020Retrieval-Augmented Generation for Code Summarization via Hybrid GNNcited by 89
  8. 2020Improved Code Summarization via a Graph Neural Networkcited by 79
  9. 2019A Neural Model for Generating Natural Language Summaries of Program Subroutinescited by 76
  10. 2018DeepBugs: A Learning Approach to Name-based Bug Detectioncited by 65
  11. 2019Code Generation as a Dual Task of Code Summarizationcited by 62
  12. 2021Self-Supervised Bug Detection and Repaircited by 59
  13. 2020Multi-task Learning based Pre-trained Language Model for Code Completioncited by 58
  14. 2020Deep Learning for Source Code Modeling and Generation: Models, Applications and Challengescited by 55
  15. 2020Big Code != Big Vocabulary: Open-Vocabulary Models for Source Codecited by 53
  16. 2019Retrieve and Refine: Exemplar-based Neural Comment Generationcited by 36
  17. 2018Automated software vulnerability detection with machine learningcited by 34
  18. 2018Learning to Represent Editscited by 34
  19. 2020Improved Automatic Summarization of Subroutines via Attention to File Contextcited by 34
  20. 2020Exploring Software Naturalness through Neural Language Modelscited by 32
  21. 2020Learning to Update Natural Language Comments Based on Code Changescited by 30
  22. 2016Tree-to-Sequence Attentional Neural Machine Translationcited by 28
  23. 2020Code to Comment "Translation": Data, Metrics, Baselining & Evaluationcited by 28
  24. 2017Sorting and Transforming Program Repair Ingredients via Deep Learning Code Similaritiescited by 26
  25. 2016Learning Continuous Semantic Representations of Symbolic Expressionscited by 25
  26. 2017Dynamic Neural Program Embedding for Program Repaircited by 23
  27. 2019CoaCor: Code Annotation for Code Retrieval with Reinforcement Learningcited by 22
  28. 2020Learning Semantic Program Embeddings with Graph Interval Neural Networkcited by 20
  29. 2018Automatic Generation of Text Descriptive Comments for Code Blockscited by 18
  30. 2019A Literature Study of Embeddings on Source Codecited by 18
  31. 2020SCELMo: Source Code Embeddings from Language Modelscited by 16
  32. 2017Semantic Code Repair using Neuro-Symbolic Transformation Networkscited by 13
  33. 2018Studying the Difference Between Natural and Programming Language Corporacited by 13
  34. 2020Retrieve and Refine: Exemplar-based Neural Comment Generationcited by 10
  35. 2021API2Com: On the Improvement of Automatically Generated Code Comments Using API Documentationscited by 10
  36. 2019Semantic Source Code Models Using Identifier Embeddingscited by 6
  37. 2020On the Generation, Structure, and Semantics of Grammar Patterns in Source Code Identifierscited by 5
  38. 2021Does Code Structure Affect Comprehension? On Using and Naming Intermediate Variablescited by 1

Built on by

Cited by year

Citing papers per year: 2024: 1.

1 paper.