增强GraphCodeBERT在代码相似性任务中的可解释性
Augmenting the Interpretability of GraphCodeBERT for Code Similarity Tasks
AI总结:
本文利用GraphCodeBERT增强代码相似性评估的可解释性,在识别相似代码片段的同时说明判断依据,帮助开发者理解并信任结果。
摘要:
评估代码片段之间的相似程度对于确保软件质量至关重要,但由于需要捕捉代码更深层的语义特征,这一任务仍然具有挑战性。传统的基于语法的方法往往无法识别这些语义联系。近期的进展在一定程度上解决了这一挑战,但它们常常以牺牲可解释性为代价。为了改善这一问题,我们提出了一种方法,旨在通过使用GraphCodeBERT来提高相似性评估的透明度,该方法能够识别代码片段之间的语义关系。该方法不仅能够识别相似的代码片段,还能阐明做出该判断的原因,从而帮助开发者更好地理解并信任评估结果。我们实现的源代码可在 https://www.github.com/jorge-martinez-gil/graphcodebert-interpretability 获取。
英文摘要:
Assessing the degree of similarity of code fragments is crucial for ensuring software quality, but it remains challenging due to the need to capture the deeper semantic aspects of code. Traditional syntactic methods often fail to identify these connections. Recent advancements have addressed this challenge, though they frequently sacrifice interpretability. To improve this, we present an approach aiming to improve the transparency of the similarity assessment by using GraphCodeBERT, which enables the identification of semantic relationships between code fragments. This approach identifies similar code fragments and clarifies the reasons behind that identification, helping developers better understand and trust the results. The source code for our implementation is available at https://www.github.com/jorge-martinez-gil/graphcodebert-interpretability.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。