mlsanityData to 7 Oct 2026

CoCoSum: Contextual Code Summarization with Multi-Relational Graph Neural Network

arXiv 2107.01933 ↗First posted 5 Jul 2021cs.SEcited by 22

Not on the map. Why?

Abstract (arXiv)

Source code summaries are short natural language descriptions of code snippets that help developers better understand and maintain source code. There has been a surge of work on automatic code summarization to reduce the burden of writing summaries manually. However, most contemporary approaches mainly leverage the information within the boundary of the method being summarized (i.e., local context), and ignore the broader context that could assist with code summarization. This paper explores two global contexts, namely intra-class and inter-class contexts, and proposes the model CoCoSUM: Contextual Code Summarization with Multi-Relational Graph Neural Networks. CoCoSUM first incorporates class names as the intra-class context to generate the class semantic embeddings. Then, relevant Unified Modeling Language (UML) class diagrams are extracted as inter-class context and are encoded into the class relational embeddings using a novel Multi-Relational Graph Neural Network (MRGNN). Class semantic embeddings and class relational embeddings, together with the outputs from code token encoder and AST encoder, are passed to a decoder armed with a two-level attention mechanism to generate high-quality, context-aware code summaries. We conduct extensive experiments to evaluate our approach and compare it with other automatic code summarization models. The experimental results show that CoCoSUM is effective and outperforms state-of-the-art methods. Our source code and experimental data are available in the supplementary materials and will be made publicly available.

Key facts. Cited by 22 papers in the map (data through 7 Oct 2026). First posted on arXiv 5 Jul 2021.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2021: 2; 2022: 5; 2023: 5; 2024: 4; 2025: 1; 2026: 5.

22 papers.

Sort:

By area:

  1. 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
  2. 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 64
  3. 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
  4. 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
  5. 2024Repoformer: Selective Retrieval for Repository-Level Code Completioncited by 55
  6. 2021On the Evaluation of Neural Code Summarizationcited by 47
  7. 2021Multilingual training for Software Engineeringcited by 43
  8. 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
  9. 2023Exploring Continual Learning for Code Generation Modelscited by 22
  10. 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 15
  11. 2022M2TS: Multi-Scale Multi-Modal Approach Based on Transformer for Source Code Summarizationcited by 14
  12. 2025Towards an Understanding of Context Utilization in Code Intelligencecited by 10
10 more
  1. 2024RACONTEUR: A Knowledgeable, Insightful, and Portable LLM-Powered Shell Command Explainercited by 9
  2. 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completioncited by 7
  3. 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 6
  4. 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?cited by 5
  5. 2022A Survey of Deep Learning Models for Structural Code Understandingcited by 4
  6. 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generationcited by 3
  7. 2026DRAINCODE: Stealthy Energy Consumption Attacks on Retrieval-Augmented Code Generation via Context Poisoningcited by 3
  8. 2023Statement-based Memory for Neural Source Code Summarizationcited by 2
  9. 2026PhoenixRepair: Rethinking Repair Strategy Exploration in Software Agentscited by 2
  10. 2026SWE-Gate: Passing Functional Tests Is Not Enough for Software Engineering Agentscited by 0