A Single Neuron Works: Precise Concept Erasure in Text-to-Image Diffusion Models

Qinqin He, Jiaqi Weng, Jialing Tao, Hui Xue
9/25/2025
cs.CV

No official code found. Best implementation: Alibaba-AAIG/SNCE (4 stars, last commit 2025-10-09).

Abstract

Text-to-image models exhibit remarkable capabilities in image generation. However, they also pose safety risks of generating harmful content. A key challenge of existing concept erasure methods is the precise removal of target concepts while minimizing degradation of image quality. In this paper, we propose Single Neuron-based Concept Erasure (SNCE), a novel approach that can precisely prevent harmful content generation by manipulating only a single neuron. Specifically, we train a Sparse Autoencoder (SAE) to map text embeddings into a sparse, disentangled latent space, where individual neurons align tightly with atomic semantic concepts. To accurately locate neurons responsible for harmful concepts, we design a novel neuron identification method based on the modulated frequency scoring of activation patterns. By suppressing activations of the harmful concept-specific neuron, SNCE achieves surgical precision in concept erasure with minimal disruption to image quality. Experiments on various benchmarks demonstrate that SNCE achieves state-of-the-art results in target concept erasure, while preserving the model's generation capabilities for non-target concepts. Additionally, our method exhibits strong robustness against adversarial attacks, significantly outperforming existing methods.

View on arXivView PDF

Code Implementations(1)

Alibaba-AAIG/SNCECommunity69%

This repository contains the code and experimental materials for the paper "A Single Neuron Works: Precise Concept Erasure in Text-to-Image Diffusion Models"

40PythonSep 26, 20251 years ago

Similar Papers

Cite this paper

@article{he2025single,
  title  = {A Single Neuron Works: Precise Concept Erasure in Text-to-Image Diffusion Models},
  author = {Qinqin He and Jiaqi Weng and Jialing Tao and Hui Xue},
  year   = {2025},
  eprint = {2509.21008},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.21008v1}
}

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/2509.21008.svg)](https://codeofpaper.com/paper/2509.21008)

Discussion