Self-Destructive Language Model

Yuhui Wang, Rongyi Zhu, Ting Wang
5/18/2025
18 citations
cs.LGcs.AIcs.CR

Official code: ZJUWYH/seam (5 stars, Python, MIT, last commit 2026-03-02).

Abstract

Harmful fine-tuning attacks pose a major threat to the security of large language models (LLMs), allowing adversaries to compromise safety guardrails with minimal harmful data. While existing defenses attempt to reinforce LLM alignment, they fail to address models' inherent "trainability" on harmful data, leaving them vulnerable to stronger attacks with increased learning rates or larger harmful datasets.

Show full abstract

To overcome this critical limitation, we introduce SEAM, a novel alignment-enhancing defense that transforms LLMs into self-destructive models with intrinsic resilience to misalignment attempts. Specifically, these models retain their capabilities for legitimate tasks while exhibiting substantial performance degradation when fine-tuned on harmful data. The protection is achieved through a novel loss function that couples the optimization trajectories of benign and harmful data, enhanced with adversarial gradient ascent to amplify the self-destructive effect. To enable practical training, we develop an efficient Hessian-free gradient estimate with theoretical error bounds. Extensive evaluation across LLMs and datasets demonstrates that SEAM creates a no-win situation for adversaries: the self-destructive models achieve state-of-the-art robustness against low-intensity attacks and undergo catastrophic performance collapse under high-intensity attacks, rendering them effectively unusable. The code is available: https://github.com/ZJUWYH/seam. (Warning: this paper contains potentially harmful content generated by LLMs.)

View on arXivView PDF

Code Implementations(1)

ZJUWYH/seamOfficial100%
MIT
50Python, ShellMay 6, 20259 months agoMIT

Similar Papers

Cite this paper

@article{wang2025selfdestructive,
  title  = {Self-Destructive Language Model},
  author = {Yuhui Wang and Rongyi Zhu and Ting Wang},
  year   = {2025},
  eprint = {2505.12186},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.12186v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.12186.svg)](https://codeofpaper.com/paper/2505.12186)

Discussion