mlsanityData to 14 Oct 2026

CodeExp: Explanatory Code Document Generation

arXiv 2211.15395 ↗First posted 25 Nov 2022cs.CL cs.LGcited by 4

Not on the map. Why?

Abstract (arXiv)

Developing models that can automatically generate detailed code explanation can greatly benefit software maintenance and programming education. However, existing code-to-text generation models often produce only high-level summaries of code that do not capture implementation-level choices essential for these scenarios. To fill in this gap, we propose the code explanation generation task. We first conducted a human study to identify the criteria for high-quality explanatory docstring for code. Based on that, we collected and refined a large-scale code docstring corpus and formulated automatic evaluation metrics that best match human assessments. Finally, we present a multi-stage fine-tuning strategy and baseline models for the task. Our experiments show that (1) our refined training dataset lets models achieve better performance in the explanation generation tasks compared to larger unrefined data (15x larger), and (2) fine-tuned models can generate well-structured long docstrings comparable to human-written ones. We envision our training dataset, human-evaluation protocol, recommended metrics, and fine-tuning strategy can boost future code explanation research. The code and annotated data are available at https://github.com/subercui/CodeExp.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 12 of its 38 references that are in the map. First posted on arXiv 25 Nov 2022.

Builds on

12 of 38 references.

References · 12

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  2. 2019BERTScore: Evaluating Text Generation with BERTcited by 5,512
  3. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
  4. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  5. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  6. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
  7. 2020A Transformer-based Approach for Source Code Summarizationcited by 133
  8. 2020PyMT5: multi-mode translation of natural language and Python code with transformerscited by 80
  9. 2017A parallel corpus of Python functions and documentation strings for automated code documentation and code generationcited by 57
  10. 2020Code to Comment "Translation": Data, Metrics, Baselining & Evaluationcited by 29
  11. 2019Automatic Code Summarization: A Systematic Literature Reviewcited by 18
  12. 2019A Survey of Automatic Generation of Source Code Comments: Algorithms and Techniquescited by 15

Built on by

Cited by year

Citing papers per year: 2023: 1; 2024: 3.

4 papers.