English

Understanding Code Semantics: An Evaluation of Transformer Models in Summarization

Machine Learning 2023-10-30 v2

Abstract

This paper delves into the intricacies of code summarization using advanced transformer-based language models. Through empirical studies, we evaluate the efficacy of code summarization by altering function and variable names to explore whether models truly understand code semantics or merely rely on textual cues. We have also introduced adversaries like dead code and commented code across three programming languages (Python, Javascript, and Java) to further scrutinize the model's understanding. Ultimately, our research aims to offer valuable insights into the inner workings of transformer-based LMs, enhancing their ability to understand code and contributing to more efficient software development practices and maintenance workflows.

Keywords

Cite

@article{arxiv.2310.16314,
  title  = {Understanding Code Semantics: An Evaluation of Transformer Models in Summarization},
  author = {Debanjan Mondal and Abhilasha Lodha and Ankita Sahoo and Beena Kumari},
  journal= {arXiv preprint arXiv:2310.16314},
  year   = {2023}
}

Comments

Accepted at GenBench, EMNLP 2023. All authors are co-first authors and have equal contributions

R2 v1 2026-06-28T13:00:59.849Z