paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Towards Robust Models of Code via Energy-Based Learning on Auxiliary Datasets

基于辅助数据集能量学习的鲁棒代码模型
ASE Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering2022匹配度 2/10 · 论文关注代码模型的鲁棒性(OOD检测与对抗防御),属于机器学习与程序语言的交叉,但未涉及用户核心方向:静态分析在ML/Agentic程序中的应用、LLM/Agent改进静态分析、浮点程序分析或贝叶斯程序分析。引用 0 inbox
Nghi D. Q. Bui, Yijun Yu
crossref: 2026-09-12

AI 速览

一句话:提出用辅助OOD数据与能量有界学习提升代码模型鲁棒性,兼顾OOD检测与对抗防御。

现有提升源代码模型鲁棒性的方法主要关注识别对抗样本,而忽视了分布外(OOD)样本,即偏离给定训练分布的有效样本。本文提出引入辅助OOD数据集,并与主数据集联合训练,以增强模型鲁棒性。具体而言,作者采用能量有界学习目标函数,使分布内样本获得更高得分、分布外样本获得更低得分,从而将OOD样本纳入源代码模型的训练过程。在OOD检测和对抗样本检测任务上的评估结果表明,现有源代码模型的鲁棒性得到提升:既能更准确地识别OOD数据,又能同时增强对对抗攻击的抵抗能力。

问题
现有源代码模型鲁棒性研究侧重识别对抗样本,却较少处理分布外(OOD)的有效样本,导致模型对偏离训练分布的数据不够稳健。
方法
引入辅助OOD数据集与主数据集联合训练,并采用能量有界学习目标,提高分布内样本得分、降低分布外样本得分,将OOD样本融入源代码模型训练。
评估
在OOD检测和对抗样本检测任务上进行评估,结果显示模型能更准确识别OOD数据,并更有效地抵抗对抗攻击。
原文摘要(Abstract)

Existing approaches to improving the robustness of source code models concentrate on recognizing adversarial samples rather than valid samples that fall outside of a given distribution, which we refer to as out-of-distribution (OOD) samples. To this end, we propose to use an auxiliary dataset (out-of-distribution) such that, when trained together with the main dataset, they will enhance the model’s robustness. We adapt energy-bounded learning objective function to assign a higher score to in-distribution samples and a lower score to out-of-distribution samples in order to incorporate such out-of-distribution samples into the training process of source code models. In terms of OOD detection and adversarial samples detection, our evaluation results demonstrate a greater robustness for existing source code models to become more accurate at recognizing OOD data while being more resistant to adversarial attacks at the same time.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot7231,
  title = {Towards Robust Models of Code via Energy-Based Learning on Auxiliary Datasets},
  author = {Nghi D. Q. Bui and Yijun Yu},
  booktitle = {ASE},
  year = {2022},
  doi = {10.1145/3551349.3561171}
}