arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2506.08581cs.SE
收藏

评估Sentence-BERT在代码注释分类任务中的性能与效率

Evaluating the Performance and Efficiency of Sentence-BERT for Code Comment Classification

Fabian C. Peña, Steffen Herbold

AI总结:

本研究针对多标签代码注释分类任务,在13216条标注注释句子数据集上微调结合不同分类头的Sentence-BERT模型,平衡了分类性能提升与推理效率下降的关系。

摘要:

本研究针对多标签代码注释分类任务评估Sentence-BERT,目标是在控制推理阶段效率约束的同时最大化分类性能。研究基于包含13216条带标注注释句子的数据集,对Sentence-BERT模型进行微调,并结合不同的分类头以识别注释类型。虽然更大的模型在F1值上优于小模型,但小模型在运行时间和GFLOPS方面均表现出优异的效率。最终研究实现了合理的F1提升(+0.0346)与最小效率下降(运行时间增加1.4倍,GFLOPS增加2.1倍)之间的平衡。

英文摘要:

This work evaluates Sentence-BERT for a multi-label code comment classification task seeking to maximize the classification performance while controlling efficiency constraints during inference. Using a dataset of 13,216 labeled comment sentences, Sentence-BERT models are fine-tuned and combined with different classification heads to recognize comment types. While larger models outperform smaller ones in terms of F1, the latter offer outstanding efficiency, both in runtime and GFLOPS. As result, a balance between a reasonable F1 improvement (+0.0346) and a minimal efficiency degradation (+1.4x in runtime and +2.1x in GFLOPS) is reached.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑