Search papers, labs, and topics across Lattice.
This paper introduces CAUSALDETOX, a method for identifying and mitigating toxicity in LLMs by pinpointing specific attention heads causally responsible for generating toxic content. The method uses the Probability of Necessity and Sufficiency (PNS) to isolate a minimal set of toxicity-driving heads, which are then targeted via inference-time intervention using dynamic steering vectors or PNS-guided fine-tuning to unlearn toxic representations. Experiments across multiple benchmarks, including a new PARATOX benchmark, demonstrate CAUSALDETOX achieves superior toxicity reduction with improved fluency and efficiency compared to existing methods.
LLMs can be detoxified with minimal performance impact by surgically intervening on a small subset of attention heads causally linked to toxicity, identified via a novel causal inference approach.
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.