paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Pre-training by Predicting Program Dependencies for Vulnerability Analysis Tasks

通过预测程序依赖为漏洞分析任务进行预训练
ICSE Proceedings of the IEEE/ACM 46th International Conference on Software Engineering2024匹配度 3/10 · 论文涉及程序依赖分析与代码预训练,与“ML/PL 交叉、程序分析”有弱交集;但其核心是提升漏洞分析任务,未涉及 Agentic 程序/LLM 交互程序、用 LLM 改进静态分析、浮点程序分析或贝叶斯程序分析,与用户研究画像主线匹配有限。引用 19 inbox
Zhongxin Liu, Zhijie Tang, Junwei Zhang, Xin Xia, Xiaohu Yang
crossref: 2026-09-12

AI 速览

一句话:提出控制依赖预测与数据依赖预测两种预训练目标,提升漏洞分析并可直接进行依赖分析。

漏洞分析对软件安全至关重要。现有代码预训练目标要么忽略控制/数据依赖等语义结构,要么只学习使用该结构,尚未探究学习分析语义结构知识能否带来收益。本文提出两种新颖预训练目标:控制依赖预测(CDP)与数据依赖预测(DDP),分别基于源代码预测语句级控制依赖和 token 级数据依赖。CDP/DDP 引导模型学习细粒度依赖分析知识,预训练后既可微调增强漏洞代码理解,也可直接用于部分与完整函数的依赖分析。作者以 Transformer 模型 PDBERT 实现,并在漏洞检测、分类、评估三项任务及程序依赖分析上评估;结果显示 PDBERT 达到当前最优,控制/数据依赖预测 F1 分别超过 99% 和 94%。

问题
现有代码预训练目标忽视或仅使用代码的控制/数据依赖等语义结构,未研究学习分析这些结构的知识能否提升漏洞分析。
方法
提出 CDP 和 DDP 两种预训练目标,预训练 PDBERT 预测语句级控制依赖与 token 级数据依赖,并用于下游微调或直接依赖分析。
评估
在漏洞检测、漏洞分类、漏洞评估及程序依赖分析上评估;三项下游任务达到 SOTA,依赖预测 F1 控制超过 99%、数据超过 94%。
原文摘要(Abstract)

Vulnerability analysis is crucial for software security. Inspired by the success of pre-trained models on software engineering tasks, this work focuses on using pre-training techniques to enhance the understanding of vulnerable code and boost vulnerability analysis. The code understanding ability of a pre-trained model is highly related to its pre-training objectives. The semantic structure, e.g., control and data dependencies, of code is important for vulnerability analysis. However, existing pre-training objectives either ignore such structure or focus on learning to use it. The feasibility and benefits of learning the knowledge of analyzing semantic structure have not been investigated. To this end, this work proposes two novel pre-training objectives, namely Control Dependency Prediction (CDP) and Data Dependency Prediction (DDP), which aim to predict the statement-level control dependencies and token-level data dependencies, respectively, in a code snippet only based on its source code. During pre-training, CDP and DDP can guide the model to learn the knowledge required for analyzing fine-grained dependencies in code. After pre-training, the pre-trained model can boost the understanding of vulnerable code during fine-tuning and can directly be used to perform dependence analysis for both partial and complete functions. To demonstrate the benefits of our pre-training objectives, we pre-train a Transformer model named PDBERT with CDP and DDP, fine-tune it on three vulnerability analysis tasks, i.e., vulnerability detection, vulnerability classification, and vulnerability assessment, and also evaluate it on program dependence analysis. Experimental results show that PDBERT benefits from CDP and DDP, leading to state-of-the-art performance on the three downstream tasks. Also, PDBERT achieves F1-scores of over 99% and 94% for predicting control and data dependencies, respectively, in partial and complete functions.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot11413,
  title = {Pre-training by Predicting Program Dependencies for Vulnerability Analysis Tasks},
  author = {Zhongxin Liu and Zhijie Tang and Junwei Zhang and Xin Xia and Xiaohu Yang},
  booktitle = {ICSE},
  year = {2024},
  doi = {10.1145/3597503.3639142}
}