One-Step is Enough: Sparse Autoencoders for Text-to-Image Diffusion Models

Viacheslav Surkov, Chris Wendler, Antonio Mari, Mikhail Terekhov, Justin Deschenaux +3 more
10/28/2024
36 citations
cs.LGcs.AIcs.CV
diffusion-flowtransformer-attention

Official code: surkovv/sdxl-unbox (91 stars, Jupyter Notebook, MIT, last commit 2025-10-30).

Abstract

For large language models (LLMs), sparse autoencoders (SAEs) have been shown to decompose intermediate representations that often are not interpretable directly into sparse sums of interpretable features, facilitating better control and subsequent analysis. However, similar analyses and approaches have been lacking for text-to-image models.

Show full abstract

We investigate the possibility of using SAEs to learn interpretable features for SDXL Turbo, a few-step text-to-image diffusion model. To this end, we train SAEs on the updates performed by transformer blocks within SDXL Turbo's denoising U-net in its 1-step setting. Interestingly, we find that they generalize to 4-step SDXL Turbo and even to the multi-step SDXL base model (i.e., a different model) without additional training. In addition, we show that their learned features are interpretable, causally influence the generation process, and reveal specialization among the blocks. We do so by creating RIEBench, a representation-based image editing benchmark, for editing images while they are generated by turning on and off individual SAE features. This allows us to track which transformer blocks' features are the most impactful depending on the edit category. Our work is the first investigation of SAEs for interpretability in text-to-image diffusion models and our results establish SAEs as a promising approach for understanding and manipulating the internal mechanisms of text-to-image models.

View on arXivView PDF

Code Implementations(1)

surkovv/sdxl-unboxOfficial100%
MIT

Sparse Autoencoders for Stable Diffusion XL models.

9110Jupyter Notebook, PythonOct 27, 20241 years agoMIT

Similar Papers

Cite this paper

@article{surkov2024onestep,
  title  = {One-Step is Enough: Sparse Autoencoders for Text-to-Image Diffusion Models},
  author = {Viacheslav Surkov and Chris Wendler and Antonio Mari and Mikhail Terekhov and Justin Deschenaux and Robert West and Caglar Gulcehre and David Bau},
  year   = {2024},
  eprint = {2410.22366},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.22366v5}
}

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

Discussion