Lune

FSE2024Top-tier venue

SimLLM: Calculating Semantic Similarity in Code Summaries using a Large Language Model-Based Approach

Xin Jin, Zhiqiang Lin

2024Year
8Citations
3Top-tier citations

Abstract

Code summaries are pivotal in software engineering, serving to improve code readability, maintainability, and collaboration. While recent advancements in Large Language Models (LLMs) have opened new avenues for automatic code summarization, existing metrics for evaluating summary quality, such as BLEU and BERTScore, have notable limitations. Specifically, these existing metrics either fail to capture the nuances of semantic meaning in summaries or are further limited in understanding domain-specific terminologies and expressions prevalent in code summaries. In this paper, we present Sim LLM, a novel LLM-based approach designed to more precisely evaluate the semantic similarity of code summaries. Built upon an autoregressive LLM using a specialized pretraining task on permutated inputs and a pooling-based pairwise similarity measure, Sim LLM overcomes the shortcomings of existing metrics. Our empirical evaluations demonstrate that Sim LLM not only outperforms existing metrics but also shows a significantly high correlation with human ratings.

Ask about this paper

Your agent reads all of it.

Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

lune papers fulltext 5c1b501f-35b4-4312-a3a2-d8d715ee9152

Cited by top-tier papers3

Ask how each one uses it

Builds on14

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines