Skip to content

Short-Length Adversarial Training Helps LLMs Defend against Long-Length Jailbreak Attacks: Theoretical and Empirical EvidenceShort-length Adversarial Training Helps LLMs Defend Long-length Jailbreak Attacks: Theoretical and Empirical Evidence

arXiv· arXiv:2502.04204· NeurIPS 2025· Shaopeng Fu, Liang Ding, Jingfeng Zhang, Di Wang·Indexed by this site · 25 days ago· Originally publishedDefenses
AI summary

For adversarial suffix jailbreak attacks, the paper shows that to defend against adversarial suffixes of length Θ(M), it suffices to align the LLM with adversarial suffixes of length Θ(√M). The theoretical part analyzes adversarial in-context learning of a linear Transformer on a linear regression task and gives a robust generalization bound that depends on Θ(√M_test/M_train). Adversarial training is performed on multiple open-source LLMs and jailbreak attacks with different adversarial suffix lengths are tested; results show that the attack success rate is positively correlated with the ratio of the square root of the test suffix length to the training suffix length. On this basis, the authors argue that long-length jailbreak attacks can be defended against through efficient short-length adversarial training; code is available at https://github.com/fshp971/adv-icl。

Read originalNeurIPS 2025