Defending against large language model jailbreak attacks via back-translationDefending LLMs against Jailbreaking Attacks via Backtranslation
The researchers propose a method for defending against large language model jailbreak attacks via backtranslation, and have open-sourced the implementation and reproduction code. The method first has the target model generate an initial response to the input prompt, then uses a language model to infer from the response a backtranslated prompt that could have led to that response; since the backtranslated prompt is generated based on the model's response and is not directly controlled by the attacker, it often exposes the true intent of the original prompt. The target model is then made to generate again for the backtranslated prompt; if the model refuses the backtranslated prompt, the original prompt is refused. The authors' experiments show that this defense significantly outperforms baselines in situations where baseline methods struggle, and has little impact on generation quality for normal inputs. The implementation is based on the authors' large language model jailbreak defense algorithm library, and the reproduction code is available at https://github.com/YihanWang617/LLM-Jailbreaking-Defense-Backtranslation。