paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Mutual Learning-Based Framework for Enhancing Robustness of Code Models via Adversarial Training

基于互学习的对抗训练框架:增强代码模型的鲁棒性
ASE Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering2024匹配度 3/10 · 论文研究的是深度代码模型的对抗鲁棒性提升,属于机器学习与程序语言的交叉,但与用户核心关注的静态分析、Agentic程序、LLM/Agent改进静态分析、浮点程序分析及贝叶斯程序分析均无直接关系。引用 5 inbox
Yangsen Wang, Yizhou Chen, Yifan Zhao, Zhihao Gong, Junjie Chen, Dan Hao
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 MARVEL,用互学习结合对抗训练提升深度代码模型鲁棒性,同时保持预测精度。

深度代码模型(DCMs)在多种代码任务上表现优异,但鲁棒性不足,输入微小噪声即可导致错误输出。本文提出 MARVEL:初始化两个相同 DCM,一个接收高斯扰动数据并进行对抗训练,另一个接收干净数据,两者在拟合真实标签的同时互相拟合内部参数,从而兼顾鲁棒性与预测性能。作者选取 3 个 DCM、5 个数据集和 3 种先进攻击方法,在 45 个下游任务上评估,并与 2 种先进鲁棒性增强技术比较。结果表明 MARVEL 在全部 45 个任务上提升鲁棒性,在 43/45 任务上优于两个基线,平均提升 15.33% 和 31.88%,同时精度相对原始 DCM 误差在 ±2.43% 以内。

问题
深度代码模型对输入噪声鲁棒性差,微小扰动可导致错误输出,限制其实际应用。
方法
MARVEL 初始化两个相同 DCM,分别用高斯扰动数据和干净数据进行对抗训练与正常训练,并通过互学习拟合真实标签及彼此内部参数。
评估
在 3 个 DCM、5 个数据集、3 种攻击方法组合成的 45 个下游任务上,与 2 种先进鲁棒性增强基线比较,并报告鲁棒性提升与精度损失。
原文摘要(Abstract)

Deep code models (DCMs) have achieved impressive accomplishments and have been widely applied to various code-related tasks. However, existing studies show that some DCMs have poor robustness, and even small noise in the input data can lead to erroneous outputs. This phenomenon can seriously hinder the application of these DCMs in real-world scenarios. To address this limitation, we propose MARVEL, a mutual learning-based framework for enhancing the robustness of DCMs via adversarial training. Specifically, MARVEL initializes two identical DCMs, one of which receives Gaussian-distorted data and performs adversarial training, and the other receives the clean data. Then these two DCMs work together to not only fit the true labels but also fit each other’s internal parameters. Our intuition is that the DCM can enhance robustness by training noisy data, while the DCM achieves accurate prediction performance by learn the clean data. Their mutual learning enables the DCM to balance both robustness and predictive performance.We selected three popular DCMs, five open-source datasets, and three state-of-the-art attack methods to evaluate the performance of MARVEL on 45 (3×5×3) downstream tasks composed of their combinations. Additionally, we set two of the state-of-the-art robustness enhancement techniques as baselines. The experimental results show that MARVEL significantly enhances the robustness of DCMs across all 45 tasks. In 43 out of 45 tasks, MARVEL outperforms the two baselines with an average improvement of 15.33% and 31.88%, respectively. At the same time, MARVEL can maintain the inherent accuracy with an error margin within +-2.43% compared to the original DCMs.CCS CONCEPTS• Software and its engineering → Search-based software engineering; • Computing methodologies → Artificial intelligence.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{WangCZG0024,
  title = {Mutual Learning-Based Framework for Enhancing Robustness of Code Models via Adversarial Training},
  author = {Yangsen Wang and Yizhou Chen and Yifan Zhao and Zhihao Gong and Junjie Chen and Dan Hao},
  booktitle = {ASE},
  year = {2024},
  doi = {10.1145/3691620.3695519}
}