Skip to content
Conference Open access

Detoxifying Large Language Models via Localized Feature Editing with Sparse Autoencoders

Sep 2026 · Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence · pp. 735-743 · 0 citations · 37 references

TL;DR

L DeLFE, a lightweight controlled detoxification approach that identifies specific toxic features across model layers and performs targeted interventions on them, and designs three feature-level strategies that adjust intervention timing and strength to reconstruct the target model’s original activations.

Abstract

Large Language Models (LLMs) powerful generative capabilities also pose significant risks, underscoring the need for effective detoxification methods to ensure safer deployment. Due to the polysemantic nature of LLM neurons, recent neuron intervention methods inevitably entangle unrelated concepts, compromising generation quality and interpretability. Sparse Autoencoders (SAEs) have opened new horizons for decomposing model activations into monosemantic features, offering interpretability and targeted feature-level steering. Empirical findings reveal that, despite capturing interpretable features, indiscriminate interventions on toxicity-related features expose the fragility of LLMs, achieving toxicity mitigation at the cost of degraded fluency. Building upon this finding, we propose DeLFE, a lightweight controlled detoxification approach that identifies specific toxic features across model layers and performs targeted interventions on them. DeLFE learns toxicity subspaces from label-guided SAE feature subsets to characterize toxic v.s. non-toxic activation patterns. When auto-completing a response token-by-token, DeLFE tracks the toxicity-triggering risks and steers toxic features away from the subspace via a flow-matching feature transformation. We further design three feature-level strategies that adjust intervention timing and strength to reconstruct the target model’s original activations. Extensive experiments demonstrate that our method achieves strong detoxification effectiveness while maintaining high generation quality across models of varying sizes and diverse base LLMs.

Read PDF

Similar papers

Open access Aug 2026

Sparse Autoencoders Reveal Structural and Family-level Features in BiRNA-BERT

SPIRAL is presented, a layer-wise SAE analysis of BiRNA-BERT, a layer-wise SAE analysis of RNA language models where byte-pair tokenization breaks the one-token-one-nucleotide correspondence that nucleotide-level attribution assumes.

M. Hossain, MD. Roqunuzzaman Sojib, Md Toki Tahmid et al. · 0 citations
#machine learning Preprint Oct 2026

What Do Sparse Autoencoder Feature Discovery Scores Identify? From Activations to Interventions

Sparse autoencoder (SAE) features are typically discovered from how their activations co-vary with behaviour, yet they are often used through interventions such as steering or ablation. We take intervention attribution, the first-order effect of a specified intervention on the model output, as our estimand. For a broad...

Yi-Feng Guo, Yan-Ran Li, Xiang Chen · 0 citations
#artificial intelligence Preprint Sep 2026

An Efficient and Modular Framework for Targeted Harm Mitigation in LLMS

A modular correction framework that augments pretrained LLMs with Activated LoRA (aLoRA) adapters and a context-aware routing mechanism to eliminate harms from misaligned model responses is proposed, offering a lightweight and efficient path toward safer and more controllable LLM deployments.

Robert C. Campbell, Momin Abbas, Muneeza Azmat et al. · 0 citations
#artificial intelligence Preprint Sep 2026

Neuralyzing the Trace: Selective Representation-Level Unlearning with Contrastive Sparse Autoencoders

This work introduces SCALPEL, a contrastive sparse autoencoder designed to learn more selective forget features and shows theoretically that contrastive training promotes target-selective features and that the selection score controls expected background knowledge perturbation.

Itai Zehavi, Fanny Jourdan, Ulrich Aivodji · 0 citations
#artificial intelligence Preprint Oct 2026

ScopeSAE: Model-Scope Feature Discovery with Interpretable Layer Selection

Sparse autoencoders (SAEs) are a central tool in mechanistic interpretability. However, existing SAEs are primarily trained per layer. The modeling subspace is therefore fixed by layer identity, independent of which token-layer states actually drive each prediction. We argue that this constraint contributes to several...

Qing-Wen Zeng, Ze-Hao Fu, Shu-Yu Meng et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.