Defending LLMs against Jailbreaking Attacks via Backtranslation

被引:0
|
作者
Wang, Yihan [1 ]
Shi, Zhouxing [1 ]
Bai, Andrew [1 ]
Hsieh, Cho-Jui [1 ]
机构
[1] UCLA, Los Angeles, CA 90095 USA
关键词
D O I
暂无
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Although many large language models (LLMs) have been trained to refuse harmful requests, they are still vulnerable to jailbreaking attacks which rewrite the original prompt to conceal its harmful intent. In this paper, we propose a new method for defending LLMs against jailbreaking attacks by "backtranslation". Specifically, given an initial response generated by the target LLM from an input prompt, our backtranslation prompts a language model to infer an input prompt that can lead to the response. The inferred prompt is called the backtranslated prompt which tends to reveal the actual intent of the original prompt, since it is generated based on the LLM's response and not directly manipulated by the attacker. We then run the target LLM again on the backtranslated prompt, and we refuse the original prompt if the model refuses the backtranslated prompt. We explain that the proposed defense provides several benefits on its effectiveness and efficiency. We empirically demonstrate that our defense significantly outperforms the baselines, in the cases that are hard for the baselines, and our defense also has little impact on the generation quality for benign input prompts. Our implementation is based on our library for LLM jailbreaking defense algorithms at https://github.com/YihanWang617/ llm-jailbreaking- defense, and the code for reproducing our experiments is available at https://github.com/YihanWang617/ LLM-Jailbreaking- Defense- Backtranslation.
引用
收藏
页码:16031 / 16046
页数:16
相关论文
共 50 条
  • [21] Defending networks against denial of service attacks
    Gelenbe, E
    Gellman, M
    Loukas, G
    UNMANNED/UNATTENDED SENSORS AND SENSOR NETWORKS, 2004, 5611 : 233 - 243
  • [22] Defending against Sybil attacks in sensor networks
    Zhang, QH
    Wang, P
    Reeves, DS
    Ning, P
    25th IEEE International Conference on Distributed Computing Systems Workshops, Proceedings, 2005, : 185 - 191
  • [23] An Adaptive Approach for Defending against DDoS Attacks
    Li, Muhai
    Li, Ming
    MATHEMATICAL PROBLEMS IN ENGINEERING, 2010, 2010
  • [24] Defending against adversarial attacks by randomized diversification
    Taran, Olga
    Rezaeifar, Shideh
    Holotyak, Taras
    Voloshynovskiy, Slava
    2019 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR 2019), 2019, : 11218 - 11225
  • [25] Defending against denial of service attacks in scout
    Spatscheck, O
    Peterson, LL
    USENIX ASSOCIATION PROCEEDINGS OF THE THIRD SYMPOSIUM ON OPERATING SYSTEMS DESIGN AND IMPLEMENTATION (OSDI '99), 1999, : 59 - 72
  • [26] Defending against terrorist attacks with limited resources
    Powell, Robert
    AMERICAN POLITICAL SCIENCE REVIEW, 2007, 101 (03) : 527 - 541
  • [27] Monitoring network and defending against worm attacks
    Bo, Chen
    Fang, Bin-Xing
    Zheng, Jun
    Yun, Xiao-Chun
    DYNAMICS OF CONTINUOUS DISCRETE AND IMPULSIVE SYSTEMS-SERIES B-APPLICATIONS & ALGORITHMS, 2006, 13E : 3363 - 3368
  • [28] Defending our database against inside attacks
    Scopinaro, Nicola
    SURGERY FOR OBESITY AND RELATED DISEASES, 2012, 8 (06) : 814 - 814
  • [29] Towards Defending Connected Vehicles Against Attacks
    AbdAllah, Eslam G.
    Zulkernine, Mohammad
    Gu, Yuan Xiang
    Liem, Clifford
    PROCEEDINGS OF THE FIFTH EUROPEAN CONFERENCE ON THE ENGINEERING OF COMPUTER-BASED SYSTEMS (ECBS 2017), 2017,
  • [30] Practical Techniques for Defending against DDoS Attacks
    Chen, Eric Y.
    Yonezawa, Akinori
    3RD ACS/IEEE INTERNATIONAL CONFERENCE ON COMPUTER SYSTEMS AND APPLICATIONS, 2005, 2005,