Skip to main navigation Skip to search Skip to main content

Safeguarding Language Models via Self-Destruct Trapdoor

  • Shahar Katz
  • , Bar Alon
  • , Ariel Shaulov
  • , Lior Wolf
  • , Mahmood Sharif

Research output: Chapter in Book/Report/Conference proceeding › Conference contribution › peer-review

Abstract

The potential misuse and misalignment of language models (LMs) is a central safety concern. This work presents Self-Destruct, a novel mechanism to restrict specific behaviors in LMs by leveraging overlooked properties of the underlying hardware. We observe that the LM frameworks use limited-precision formats (e.g., BF16), which are vulnerable to overflow errors during matrix multiplications. Exploiting this property, Self-Destruct replaces selected weights in pre-trained LM layers with values that act as traps, triggering a system error only when the model engages in targeted behaviors, such as harmful text generation, while leaving normal functionality unaffected. Unlike posthoc filters, this safeguard is embedded directly within the model, introduces neither inference overhead nor auxiliary models, and requires only a set of examples for calibration. Extensive experiments with five LM families demonstrate that Self-Destruct provides competitive protection against jailbreak attacks while preserving accuracy on standard benchmarks. In addition, we also show that Self-Destruct is versatile, helping mitigate biased text generation and enable model fingerprinting, highlighting the potential of hardware-aware safeguards as an efficient, low-overhead complement to existing LM defenses. Our code is available at: https://github.com/shaharkatz3/ LLM-Self-Destruct-Trapdoor.

Original languageEnglish
Title of host publicationLong Papers
EditorsVera Demberg, Kentaro Inui, Lluis Marquez Villodre
PublisherAssociation for Computational Linguistics (ACL)
Pages6939-6958
Number of pages20
ISBN (Electronic)9798891763807
DOIs
StatePublished - 1 Jan 2026
Externally publishedYes
Event19th Conference of the European Chapter of the Association for Computational Linguistics, EACL 2026 - Rabat, Morocco
Duration: 24 Mar 2026 → 29 Mar 2026

Publication series

NameEACL 2026 - 19th Conference of the European Chapter of the Association for Computational Linguistics, Proceedings of the Conference, Vol. 1 - (Long Papers)
Volume1

Conference

Conference19th Conference of the European Chapter of the Association for Computational Linguistics, EACL 2026
Country/TerritoryMorocco
CityRabat
Period24/03/26 → 29/03/26

ASJC Scopus subject areas

  • Computational Theory and Mathematics
  • Software
  • Linguistics and Language

Fingerprint

Dive into the research topics of 'Safeguarding Language Models via Self-Destruct Trapdoor'. Together they form a unique fingerprint.

Cite this