paper-with-me

홈 › Papers

Backdooring Neural Code Search

2023-05-27 · Weisong Sun, Yuchen Chen, Guanhong Tao, Chunrong Fang, Xiangyu Zhang, Quanjun Zhang, Bin Luo

Reusing off-the-shelf code snippets from online repositories is a common practice, which significantly enhances the productivity of software developers. To find desired code snippets, developers resort to code search engines through natural language queries. Neural code search models are hence behind many such engines. These models are based on deep learning and gain substantial attention due to their impressive performance. However, the security aspect of these models is rarely studied. Particularly, an adversary can inject a backdoor in neural code search models, which return buggy or even vulnerable code with security/privacy issues. This may impact the downstream software (e.g., stock trading systems and autonomous driving) and cause financial loss and/or life-threatening incidents. In this paper, we demonstrate such attacks are feasible and can be quite stealthy. By simply modifying one variable/function name, the attacker can make buggy/vulnerable code rank in the top 11%. Our attack BADCODE features a special trigger generation and injection procedure, making the attack more effective and stealthy. The evaluation is conducted on two neural code search models and the results show our attack outperforms baselines by 60%. Our user study demonstrates that our attack is more stealthy than the baseline by two times based on the F1 score.

📄 PDF Abstract BibTeX arXiv:2305.17506

Code (1)

wssun/badcode 공식 구현 pytorch

Tasks

Autonomous DrivingCode SearchNatural Language Queries

Similar Papers 제목 키워드 기반

Dynamic Backdoor Attacks Against Deep Neural Networks

2021-01-01 · Ahmed Salem, Rui Wen, Michael Backes, Shiqing Ma 외

Current Deep Neural Network (DNN) backdooring attacks rely on adding static triggers (with fixed patterns and locations) on model inputs that are prone to detection. In this paper, we propose the first class of dynamic …

Semantic Shield: Defending Vision-Language Models Against Backdooring and Poisoning via Fine-grained Knowledge Alignment

2024-11-23 · CVPR 2024 1 · Alvi Md Ishmam, Christopher Thomas

In recent years there has been enormous interest in vision-language models trained using self-supervised objectives. However, the use of large-scale datasets scraped from the web for training also makes these models vuln…

Language ModelingLanguage Modelling

Dynamic Backdoor Attacks Against Machine Learning Models

2020-03-07 · Ahmed Salem, Rui Wen, Michael Backes, Shiqing Ma 외

Machine learning (ML) has made tremendous progress during the past decade and is being adopted in various critical real-world applications. However, recent research has shown that ML models are vulnerable to multiple sec…

Backdoor AttackBIG-bench Machine Learning

Backdooring Vision-Language Models with Out-Of-Distribution Data

2024-10-02 · Weimin Lyu, Jiachen Yao, Saumya Gupta, Lu Pang 외

The emergence of Vision-Language Models (VLMs) represents a significant advancement in integrating computer vision with Large Language Models (LLMs) to generate detailed text descriptions from visual inputs. Despite thei…

Image CaptioningImage to textQuestion AnsweringVisual Question Answering+1

Forgetting to Forget: Attention Sink as A Gateway for Backdooring LLM Unlearning

2025-10-19 · Bingqi Shang, Yiwei Chen, Yihua Zhang, Bingquan Shen 외 arxiv

Large language model (LLM) unlearning is a key approach for removing undesired data, knowledge, or behaviors from pretrained models while retaining their general utility. Yet, with the rise of open-weight LLMs, we ask: c…