JOURNAL ARTICLE

Interpretable Code Summarization

Md. Sarwar KamalSonia Farhana NimmyNilanjan Dey

Year: 2024 Journal:   IEEE Transactions on Reliability Vol: 74 (1)Pages: 2280-2289   Publisher: Institute of Electrical and Electronics Engineers

Abstract

Code summarization is a process of creating a readable natural language from programming source codes. Code summarization has become a popular research topic for software maintenance, code generation, and code recovery. Existing code summarization methods follow the encoding/decoding approach and use various machine learning techniques to generate natural language from source codes. Although most of these methods are state of the art, it is difficult to understand the complex encoding and decoding process to map the tokens with natural language words. Therefore, these coding and decoding approaches are treated as opaque models (black box). This research proposes explainable AI methods that overcome the black box features for the token mapping in code summarization process. Here, we created an abstract syntax tree (AST) from the tokens of the source code. We then embedded the AST into natural language words using a bilingual statistical probability approach to generate possible statistical parse trees. We applied a page rank algorithm among the parse trees to rank the trees. From the best-ranked tree, we generate the comment for the corresponding code snippet. To explain our code generation method, we used Takagi–Sugeno fuzzy approach, layerwise relevance propagation and a hidden Markov model. These approaches make our method trustworthy and understandable to humans to understand the process of source code token mapping with natural language words.

Keywords:
Automatic summarization Computer science Code (set theory) Reliability theory Programming language Reliability engineering Natural language processing Artificial intelligence Engineering Failure rate

Metrics

2
Cited By
1.28
FWCI (Field Weighted Citation Impact)
46
Refs
0.76
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Natural Language Processing Techniques
Physical Sciences →  Computer Science →  Artificial Intelligence

Related Documents

JOURNAL ARTICLE

Code Summarization

D SteidlB HummelE JuergensS YauJ CollofelloS Wood FifieldH DunsmoreV ShenT TennyX XiaL BaoD LoZ XingA HassanS LiX HuG LiX XiaD LoZ JinS HaiducJ AponteA Marcus

Journal:   International Research Journal of Modernization in Engineering Technology and Science Year: 2023
JOURNAL ARTICLE

Code fragment summarization

Annie T. T. YingMartin P. Robillard

Year: 2013 Pages: 655-658
JOURNAL ARTICLE

Outlier Summarization via Human Interpretable Rules

Yuhao DengYu WangLei CaoLianpeng QiaoYuping WangJingzhe XuYizhou YanSamuel Madden

Journal:   Proceedings of the VLDB Endowment Year: 2024 Vol: 17 (7)Pages: 1591-1604
© 2026 ScienceGate Book Chapters — All rights reserved.