CausalDetox: Causal Head Selection and Intervention for Language Model Detoxification

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Wang, Yian, Chen, Yuen, Goyal, Agam, Sundaram, Hari
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866917412840931328
author Wang, Yian
Chen, Yuen
Goyal, Agam
Sundaram, Hari
author_facet Wang, Yian
Chen, Yuen
Goyal, Agam
Sundaram, Hari
contents Large language models (LLMs) frequently generate toxic content, posing significant risks for safe deployment. Current mitigation strategies often degrade generation quality or require costly human annotation. We propose CAUSALDETOX, a framework that identifies and intervenes on the specific attention heads causally responsible for toxic generation. Using the Probability of Necessity and Sufficiency (PNS), we isolate a minimal set of heads that are necessary and sufficient for toxicity. We utilize these components via two complementary strategies: (1) Local Inference-Time Intervention, which constructs dynamic, input-specific steering vectors for context-aware detoxification, and (2) PNS-Guided Fine-Tuning, which permanently unlearns toxic representations. We also introduce PARATOX, a novel benchmark of aligned toxic/non-toxic sentence pairs enabling controlled counterfactual evaluation. Experiments on ToxiGen, ImplicitHate, and ParaDetox show that CAUSALDETOX achieves up to 5.34% greater toxicity reduction compared to baselines while preserving linguistic fluency, and offers a 7x speedup in head selection.
format Preprint
id arxiv_https___arxiv_org_abs_2604_14602
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle CausalDetox: Causal Head Selection and Intervention for Language Model Detoxification
Wang, Yian
Chen, Yuen
Goyal, Agam
Sundaram, Hari
Computation and Language
Artificial Intelligence
Large language models (LLMs) frequently generate toxic content, posing significant risks for safe deployment. Current mitigation strategies often degrade generation quality or require costly human annotation. We propose CAUSALDETOX, a framework that identifies and intervenes on the specific attention heads causally responsible for toxic generation. Using the Probability of Necessity and Sufficiency (PNS), we isolate a minimal set of heads that are necessary and sufficient for toxicity. We utilize these components via two complementary strategies: (1) Local Inference-Time Intervention, which constructs dynamic, input-specific steering vectors for context-aware detoxification, and (2) PNS-Guided Fine-Tuning, which permanently unlearns toxic representations. We also introduce PARATOX, a novel benchmark of aligned toxic/non-toxic sentence pairs enabling controlled counterfactual evaluation. Experiments on ToxiGen, ImplicitHate, and ParaDetox show that CAUSALDETOX achieves up to 5.34% greater toxicity reduction compared to baselines while preserving linguistic fluency, and offers a 7x speedup in head selection.
title CausalDetox: Causal Head Selection and Intervention for Language Model Detoxification
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2604.14602