Defending Large Language Models against Jailbreak Attacks via Objective PriorityDefending Large Language Models Against Jailbreaking Attacks Through Goal Prioritization
AI summary
The paper proposes introducing objective priority in the training and inference stages to mitigate the risk of jailbreak when large language models face a conflict between helpfulness and safety objectives. Objective priority in the inference stage reduces the jailbreak attack success rate on ChatGPT from 66.4% to 3.6%, while the training stage reduces the attack success rate on Llama2-13B from 71.0% to 6.6%. Even when training contains no jailbreak samples, the method still halves the attack success rate. The authors also claim that stronger models face greater safety risks, but because of stronger instruction-following ability they are also easier to guide toward defense. The code is open-sourced on GitHub.