arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.25599cs.SEcs.LG
收藏

PLMGH:PLM-GNN混合在代码分类和漏洞检测中的关键因素

PLMGH: What Matters in PLM-GNN Hybrids for Code Classification and Vulnerability Detection

Polytechnique Montréal(蒙特利尔理工学院);Quantstamp

Mohamed Taoufik Kaouthar El Idrissi, Edward Zulkoski, Mohammad Hamdaqa

AI总结:

本文通过系统配对三种代码专用PLM与三种基础GNN架构,研究PLM-GNN混合在代码分类和漏洞检测中的性能,发现混合模型优于GNN-only基线,且PLM选择比GNN架构影响更大。

摘要:

代码理解模型越来越多地依赖预训练语言模型(PLMs)和图神经网络(GNNs),以捕捉互补的语义和结构信息。我们通过系统地配对三种代码专用PLMs与三种基础GNN架构,对PLM-GNN混合进行受控经验研究,应用于代码分类和漏洞检测任务。我们比较了这些混合模型与仅PLM和仅GNN的基线,在Java250和Devign数据集上,包括标识符混淆设置。在两个任务中,混合模型一致优于仅GNN基线,并且在冻结PLM上往往提高排名质量。在Devign上,性能和鲁棒性对PLM特征源比对GNN骨干更敏感。我们还发现,较大的PLMs在该管道中不一定是更好的特征提取器,且PLM选择的影响大于GNN选择。最后,我们将这些发现转化为代码分类和漏洞检测中PLM-GNN设计选择的实用指南。

英文摘要:

Code understanding models increasingly rely on pretrained language models (PLMs) and graph neural networks (GNNs), which capture complementary semantic and structural information. We conduct a controlled empirical study of PLM-GNN hybrids for code classification and vulnerability detection tasks by systematically pairing three code-specialized PLMs with three foundational GNN architectures. We compare these hybrids against PLM-only and GNN-only baselines on Java250 and Devign, including an identifier-obfuscation setting. Across both tasks, hybrids consistently outperform GNN-only baselines and often improve ranking quality over frozen PLMs. On Devign, performance and robustness are more sensitive to the PLM feature source than to the GNN backbone. We also find that larger PLMs are not necessarily better feature extractors in this pipeline, and that the PLM choice has more impact than the GNN choice. Finally, we distill these findings into practical guidelines for PLM-GNN design choices in code classification and vulnerability detection.

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

↑