HumorReject: Decoupling LLM Safety from Refusal Prefix via A Little Humor
Zihui Wu, Haichang Gao, Jiacheng Luo, Zhaoxiang Liu
TL;DR
HumorReject tackles the vulnerability of LLM safety to prefix-injection by decoupling safety from explicit refusal prefixes through humor as an indirect refusal. It trains humor-based safety using a 400-sample preference dataset and ORPO with LoRA fine-tuning on two instruct-tuned LLMs, achieving near-perfect safety under prefix-injection and resistant performance against mismatched generalization and adaptive attacks. Benign-input performance is preserved, addressing over-defense concerns common to safety alignments. The work demonstrates that training-data design can be as impactful as alignment algorithms for LLM safety and provides a public dataset and tooling to advance this direction.
Abstract
Large Language Models (LLMs) commonly rely on explicit refusal prefixes for safety, making them vulnerable to prefix injection attacks. We introduce HumorReject, a novel data-driven approach that reimagines LLM safety by decoupling it from refusal prefixes through humor as an indirect refusal strategy. Rather than explicitly rejecting harmful instructions, HumorReject responds with contextually appropriate humor that naturally defuses potentially dangerous requests. Our approach effectively addresses common "over-defense" issues while demonstrating superior robustness against various attack vectors. Our findings suggest that improvements in training data design can be as important as the alignment algorithm itself in achieving effective LLM safety. The code and dataset are available at https://github.com/wooozihui/HumorReject.
