vix.ing · top · new · best · stats · spec

Semantic-Preserving Adversarial Code Comprehension

2022/09/12 by Yiyang Li, Hongqiu Wu, Li, Yiyang +3
Computer Science · Medicine · #Adversarial Robustness in Machine Learning #COVID-19 diagnosis using AI #Computation and Language (cs.CL) #FOS: Computer and information sciences #Topic Modeling

paper · pdf · doi:10.48550/arxiv.2209.05130

openalex publication_date 2022/09/12 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28

Abstract

Based on the tremendous success of pre-trained language models (PrLMs) for source code comprehension tasks, current literature studies either ways to further improve the performance (generalization) of PrLMs, or their robustness against adversarial attacks. However, they have to compromise on the trade-off between the two aspects and none of them consider improving both sides in an effective and practical way. To fill this gap, we propose Semantic-Preserving Adversarial Code Embeddings (SPACE) to find the worst-case semantic-preserving attacks while forcing the model to predict the correct labels under these worst cases. Experiments and analysis demonstrate that SPACE can stay robust against state-of-the-art attacks while boosting the performance of PrLMs for code.

Related