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 条
  • [41] FLARE: Defending Federated Learning against Model Poisoning Attacks via Latent Space Representations
    Wang, Ning
    Xiao, Yang
    Chen, Yimin
    Hu, Yang
    Lou, Wenjing
    Hou, Y. Thomas
    ASIA CCS'22: PROCEEDINGS OF THE 2022 ACM ASIA CONFERENCE ON COMPUTER AND COMMUNICATIONS SECURITY, 2022, : 946 - 958
  • [42] CONTRA: Defending Against Poisoning Attacks in Federated Learning
    Awan, Sana
    Luo, Bo
    Li, Fengjun
    COMPUTER SECURITY - ESORICS 2021, PT I, 2021, 12972 : 455 - 475
  • [43] Defending Against Adversarial Attacks in Deep Neural Networks
    You, Suya
    Kuo, C-C Jay
    ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING FOR MULTI-DOMAIN OPERATIONS APPLICATIONS, 2019, 11006
  • [44] Defending Wireless Infrastructure Against the Challenge of DDoS Attacks
    Xianjun Geng
    Yun Huang
    Andrew B. Whinston
    Mobile Networks and Applications, 2002, 7 : 213 - 223
  • [45] Two Layer Defending Mechanism against DDoS Attacks
    Subramanian, Kiruthika
    Gunasekaran, Preetha
    Selvaraj, Mercy
    INTERNATIONAL ARAB JOURNAL OF INFORMATION TECHNOLOGY, 2015, 12 (04) : 317 - 324
  • [46] Defending against Contagious Attacks on a Network with Resource Reallocation
    Bai, Rufan
    Lin, Haoxing
    Yang, Xinyu
    Wu, Xiaowei
    Li, Minming
    Jia, Weijia
    THIRTY-FIFTH AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE, THIRTY-THIRD CONFERENCE ON INNOVATIVE APPLICATIONS OF ARTIFICIAL INTELLIGENCE AND THE ELEVENTH SYMPOSIUM ON EDUCATIONAL ADVANCES IN ARTIFICIAL INTELLIGENCE, 2021, 35 : 5135 - 5142
  • [47] Defending Against Targeted Poisoning Attacks in Federated Learning
    Erbil, Pinar
    Gursoy, M. Emre
    2022 IEEE 4TH INTERNATIONAL CONFERENCE ON TRUST, PRIVACY AND SECURITY IN INTELLIGENT SYSTEMS, AND APPLICATIONS, TPS-ISA, 2022, : 198 - 207
  • [48] Composite hybrid techniques for defending against targeted attacks
    Sidiroglou, Stelios
    Keromytis, Angelos D.
    MALWARE DETECTION, 2007, : 213 - +
  • [49] FEINT AND ATTACK: ATTENTION-BASED STRATEGIES FOR JAILBREAKING AND PROTECTING LLMS
    Pu, Rui
    Li, Chaozhuo
    Ha, Rui
    Chen, Zejian
    Zhang, Litian
    Liu, Zheng
    Qiu, Lirong
    Zhang, Xi
    arXiv,
  • [50] FLDetector: Defending Federated Learning Against Model Poisoning Attacks via Detecting Malicious Clients
    Zhang, Zaixi
    Cao, Xiaoyu
    Jia, Jinyuan
    Gong, Neil Zhenqiang
    PROCEEDINGS OF THE 28TH ACM SIGKDD CONFERENCE ON KNOWLEDGE DISCOVERY AND DATA MINING, KDD 2022, 2022, : 2545 - 2555