一句话:提出两阶段框架 LOSVER,用行级可修改性信号引导 PLM 聚焦易漏洞代码区域,提升漏洞检测与分类性能。
现有基于预训练语言模型(PLM)的漏洞分析方法通常不显式指明输入代码中哪些部分更可能含有漏洞,模型只能自行推断 token 级相关性,导致训练时难以学到易漏洞代码的特征。本文提出 LOSVER,一个两阶段框架:先定位“可修改行”,即未来可能被改动、常与漏洞相关的代码段,再在训练与推理中赋予这些行更高的重要性,使 PLM 聚焦潜在易漏洞区域。作者在 Devign、Big-Vul 和 PrimeVul 三个基准数据集上评估了漏洞检测、分类与补丁对分析。实验表明,在 UniXcoder 之上应用 LOSVER 可稳定提升性能,检测准确率提高 4 个百分点,分类加权 F1 提升 2 点以上,说明行级可修改性信号能显著增强 PLM 的漏洞分析效果。
The prevalence of software vulnerabilities necessitates accurate and scalable detection techniques. While Pre-trained Language Models (PLMs) have shown strong potential in vulnerability analysis, most existing methods provide no explicit guidance on which parts of the input code are more likely to be vulnerable. As a result, the model must infer token-level relevance without any indication of which parts are important, making it harder to learn the characteristics of vulnerable code during training. We address this by proposing LOSVER (Line-level mOdifiability Signal-guided VulnERability analyzer), a novel two-stage framework that enhances PLM-based vulnerability analysis using line-level modifiability signals. LOSVER first localizes modifiable lines, which are code segments likely to be changed in the future and often associated with vulnerabilities, and then assigns them greater importance, allowing the PLM to focus on potentially vulnerable regions during both training and inference. We evaluated LOSVER across three benchmark datasets (Devign, Big-Vul, and PrimeVul) for vulnerability detection, classification, and patch-pair analysis. Experimental results demonstrate that LOSVER consistently improves performance, increasing detection accuracy by 4 percentage points and the weighted F1-score for classification by over 2 points when applied on top of UniXcoder. These results demonstrate that integrating line-level modifiability signals significantly enhances the effectiveness of PLM-based software vulnerability analysis across both detection and classification tasks.
DOI 原文 ·
@inproceedings{paperbot9563,
title = {LOSVER: Line-Level Modifiability Signal-Guided Vulnerability Detection and Classification},
author = {Doha Nam and Jongmoon Baik},
booktitle = {ASE},
year = {2025},
doi = {10.1109/ase63991.2025.00092}
}