LLMs can self-defend against jailbreaks in a practical way: the SELFDEFEND vision paperLLMs Can Defend Themselves Against Jailbreaking in a Practical Manner: A Vision Paper
AI summary
The paper proposes a lightweight jailbreak defense scheme, SELFDEFEND, which exploits the property that LLMs can identify harmful prompts that violate safety policies, designs a shadow stack to check user prompts in parallel, and triggers a checkpoint when the normal stack outputs "No" or a harmful prompt. The authors claim it can defend against various existing jailbreak attacks, incurring only minimal latency for jailbreak prompts and negligible latency for normal prompts. Manual analysis on GPT-3.5/4 shows the approach is effective in multiple jailbreak scenarios.