Interpreting large text-to-image diffusion models with dictionary learningInterpreting Large Text-to-Image Diffusion Models with Dictionary Learning
At FLUX.1 layer 18 (k=64, d=64000), SAE mean score is 0.819, ITDA is 0.776, and MLP is 0.654.
- The internal representations of text-to-image diffusion models are hard to decompose, and it is unclear how precisely the output can be controlled. The authors test on the 12 billion parameter FLUX.1 whether dictionary learning can yield interpretable, steerable features.
- Train TopK SAE and ITDA on the double and single block residual streams of FLUX.1 Schnell. Because variance is concentrated in a few eigenvalues, apply spectral normalization before training. Gemini scores based on blue-highlighted images; for steering, add the decoder vector to local activations.
- At layer 18, k=64, d=64000, the autointerp mean scores for SAE, ITDA, and MLP are 0.819, 0.776, and 0.654. The authors say ITDA reconstruction is usually better at similar dictionary sizes. Steering requires the prompt to be related to the feature, and full-step steering introduces visible artifacts.
- The authors leave spatial inductive bias, the comparison between Schnell and Dev, and whether automatic interpretation is biased toward colors as future work. Experiments are trained on Schnell, 256×256 single-step generation; the paper does not report steering success rates or the number of features for automatic interpretation.
- Evaluated models
- FLUX.1 Schnell
- Benchmarks
- FLUX.1 Schnell 256x256 single-step generations
- Metrics
- autointerp scorevariance explaineddead feature proportion
The researchers apply two dictionary learning methods, sparse autoencoders (SAEs) and ITDA, to the large text-to-image diffusion model Flux 1, and propose an automated visualization interpretation pipeline to examine the interpretability of the embeddings learned by both. The results show that SAEs can accurately reconstruct residual stream embeddings, with interpretability superior to MLP neurons. The study also uses SAE features to control image generation through activation addition, while ITDA is comparable to SAEs in interpretability.
Paper analysis
What problem does this paper attempt to solve?
The authors aim to perform sparse decomposition on the FLUX.1 residual stream and test whether it can be interpreted and steered.
Can the residual activations of large-scale text-to-image diffusion models be sparsely decomposed into features that are interpretable and can intervene in generation.
- Scenario: The authors state that after improvements in text-to-image capabilities, the degree of memorization and precision of control remain debated. The authors believe that understanding features and intervening in generation can enhance artistic expression and improve transparency.
- Existing gaps: SAEs have been used on vision encoders and small-scale diffusion models. The authors state they have not seen automatic interpretation on diffusion models; FLUX.1 has 12 billion parameters, and the residual stream is highly anisotropic.
- Core observation: The authors expect features to vary across time steps, spatial positions, and layers. Variance is concentrated in the first few eigenvalues, so the authors first perform spectral whitening, then apply the same technique to MMDiT layers.
- This paper proposes: Train SAE and ITDA, compare with MLP neurons using visual automatic interpretation, and use SAE features for activation addition steering. Appendix C gives implementation changes for training on large models.
What related research exists?
Related work includes SAEs, diffusion dictionary learning, steering methods, and ITDA.
In the introduction and Related Work, the paper divides prior work into dictionary learning, diffusion model applications, steering, and ITDA.
Sparse Autoencoders and Automated Interpretation
- SAE: Bricken et al. (2023), Huben et al. (2024), and Sharkey et al. (2022) learned overcomplete decoding bases and sparse coefficients to decompose superposition features. Gao et al. (2024)'s TopK keeps the largest k coefficients after projection.
- Automated interpretation: Bills et al. (2023) used a language model to explain MLP neurons and simulate activations. The paper states that SAE features can also be interpreted, with scores exceeding MLP neurons and other sparse decompositions. Juang et al. (2024) replaced token-by-token simulation with classification of whether an image fits the explanation.
- Vision agents: Shaham et al. (2025)'s automated interpretation agent has many functions; interpretation and scoring are only a small part.
Dictionary Learning on Diffusion Models
- Generative models: This paper considers flow matching and rectified flow (Lipman et al., 2023; Liu et al., 2022); the authors say these constitute most state-of-the-art text-to-image models. Denoising diffusion is in Ho et al. (2020) and Song et al. (2021), and MMDiT in Esser et al. (2024).
- Existing diffusion SAEs: Vision Transformer residual streams are in Daujotas (2024) and Fry (2024); class-conditional and text-to-image diffusion are in Cywiński and Deja (2025), Ijishakin et al. (2024), and Kim et al. (2024). Some are at the innermost U-Net bottleneck; the paper points to Kwon et al. (2023) for evidence that this location is especially interpretable.
Steering
- Vector and SAE steering: Turner et al. (2024) added vectors to the residual stream; the paper also mentions similar work on GANs and diffusion. Chalnev et al. (2024), Daujotas (2024), and O'Brien et al. (2024) steered with SAE features, including adding global latents for CLIP-conditioned generators.
- Surkov et al. (2024): Trained SAEs on each hidden layer of the UNet in Stable Diffusion XL Turbo, evaluated steering, and demonstrated pure feature-guided generation. The authors say this paper scales up similar approaches and notes that FLUX.1's MMDiT has normalization challenges.
- Kim and Ghadiyaram (2025): Trained SAEs on the text encoders of SDXL-Turbo and FLUX.1 Dev, and reported controllability comparable to or exceeding non-steering baselines in adversarial scenarios. The authors say this approach changes the conditioning rather than the generation process.
ITDA
- Leask et al. (2025): Removed the learnable encoder and used Smith (2024)'s ITO, i.e., gradient tracking, for encoding. Dictionary rows are selected from training batches by reconstruction loss, with pruning. The paper says it promises training in minutes, an order of magnitude faster than SAE.
Baselines and Data
- Baselines: The automated interpretation comparison is against MLP neurons, which the paper says follows Huben et al. (2024). For reconstruction, SAE and ITDA are compared with each other. The paper uses no named external benchmark; activations are taken from the FLUX.1 residual stream.
The authors place dictionary learning on the generation residual stream rather than the text encoder, and compare the interpretability of SAE and ITDA together.
How does the paper address this problem?
Train TopK SAE and ITDA with spectral whitening, then perform visual automatic interpretation and activation addition.
Train TopK SAE and ITDA on the double and single block residual streams of FLUX.1 Schnell, use spectral whitening to reduce dead features, then score with automated interpretability, and add decoder vectors to local activations for steering.
Model Differences and SAE
- Architecture differences: The authors note that FLUX uses AdaLN; LayerNorm nonlinearity is often considered to hinder interpretability, and more complex normalization also depends on timestep and prompt.
- TopK encoding: Sparsity satisfies L0(e) not exceeding k, encoded as e = Topk(Wenc(x − bpost + bpre)). Higher k gives better reconstruction but may reduce interpretability.
- Decoding and loss: y is obtained by multiplying Wdec by e and adding bdec, fitting the original activation with MSE. The main text recipe does not add AuxK; a footnote says AuxK helps, see Appendix C.
Training Location and Whitening
- Location: The methods section says training is done across different layers and timesteps, varying resources. Most SAEs use Schnell's single-step, 256x256 generation; the focus is double block layer 18, which the authors call the parameter-count midpoint.
- Scope and budget: Also train double and single at layer 9, and single layer 18 (Figure 2). In the figure, there are 19 double blocks and 38 single blocks. All SAEs are trained for 30k steps, i.e., 30M tokens.
- Dead features: Without normalization, dead features exceed 99%, with or without AuxK; variance explained can exceed 60%, but features are crowded into a low-dimensional subspace. The authors say surviving features appear interpretable, but fewer than 1000.
- Whitening: Use PCA on the first few batches of data to decorrelate then standardize; at inference, transform back to the original residual stream, and this affine transformation can be folded into the weights. After whitening, dead latents are below 30%. With only mean and standard deviation normalization, the authors say performance is similar, but all SAEs in this paper use PCA.
ITDA
- Encoding: Remove the learnable encoder and use gradient tracking to obtain coefficients, requiring no encoder weights. The paper says further details are in Smith (2024).
- Dictionary: Training points whose reconstruction MSE exceeds a threshold are added directly to the dictionary. The threshold is determined by a sweep; the paper does not give its value. Inputs are normalized, but PCA is not applied.
- Loss: Training uses FVU, FVU(y,y∗)=MSE(y,y∗)/MSE(y∗,μy∗), i.e., the ratio of error to the mean-baseline error. The paper writes this quantity is usually 0.1 to 0.5, and can exceed 1.
- Unadopted changes: Early top-k limiting growth, adding residual errors rather than data points to the dictionary, and post-training K-Means pruning. The authors say none of the three noticeably improved the trade-off between dictionary size and reconstruction accuracy.
Interpretation and Steering
- Pipeline: An interpreter looks at images with blue-highlighted activations and writes common patterns; a scorer looks at single images and judges whether they fit that interpretation. Both use google/gemini-2.0-flash-001. Appendix D gives the full prompts.
- Comparison setting: Run at layer 18, k=64, d=64000, using only active features and max-activating examples, with MLP neurons as baseline.
- Steering: Add the decoder vector of a selected feature to the activations of a region of the image. The authors mainly study Layer 18, and apply it only on a subset of sampling steps.
What experiments did the paper conduct?
Layer 18, k=64, d=64000: SAE average score 0.819, ITDA 0.776, MLP 0.654.
Experimental Setup
- Model under test: FLUX.1 Schnell, a 12 billion parameter MMDiT; Schnell is timestep-distilled and can generate in 1 step.
- Data: Most SAEs use Schnell single-step, 256x256 generation. All SAEs are trained for 30k steps, i.e., 30M tokens.
- Layers: The focus is double block layer 18, which the authors call the parameter-count midpoint. There are also double and single at layer 9, and single layer 18 (Figure 2).
- Evaluation: Both the interpreter and scorer are google/gemini-2.0-flash-001, with scores from 0 to 1. Appendix D gives the full prompts.
- Baselines and metrics: The automated interpretation baseline is MLP neurons. Metrics are autointerp score, variance explained, and dead feature proportion. Steering is qualitative observation.
- Protocol: Automated interpretation is run at layer 18, k=64, d=64000, using max-activating examples and counting only active features. The paper does not report the number of features, number of repetitions, or human agreement.
Main Results
According to Figure 7, at layer 18, k=64, d=64000, counting only active features:
Method Mean Median SAE 0.819 0.860 ITDA 0.776 0.817 MLP neurons 0.654 0.650 - Score comparison: The authors say SAE and ITDA are comparable, and MLP neurons are overall less interpretable, although some of their features score very high.
- MLP morphology: The authors say that in the visual inspection in Appendix B, highly interpretable MLP neuron activations lie in semantically fixed contiguous regions, and they consider them possibly causally related to generation.
- Content not separated in scores: In the conclusion, the authors say ITDA corresponds more to colors, textures, and regions, while SAE corresponds more to objects such as hats and faces; and they say SAE's pixel coverage is better than ITDA's sparser activations (Appendix B).
Reconstruction Quality
- Figure 6: Compares different k and dictionary sizes on double block 18. The legend includes seven ITDA settings (d=16.0k to d=64.0k) and SAE d=59.0k. The authors say ITDA reconstruction is usually better at similar dictionary sizes. The main text does not give VE for each point.
- Figure 8: Appendix compares multiple layers, both at d=64k, k=64. The x-axis Layer scale goes to 30, and the y-axis Variance explained goes from 0.0 to 1.0. The main text does not give values for each layer.
- No normalization: The authors report VE can exceed 60%, but dead features exceed 99%, and surviving features are fewer than 1000 (Sections 3.3, 4.2).
Steering
- Prompt constraint: The authors say steering at Layer 18 often corresponds to the max-activating pattern, but the prompt must be related to the feature. The anime style in Figure 1 only works for "A cartoon", not for prompts like "A person". The authors think the feature space may be local.
- Steps: The Figure 1 example applies steering only in the first 5 of 7 steps. The authors say applying steering at all steps introduces visible artifacts.
- Negative: The authors say negative steering works in some cases, but can only remove small details, and requires more complex prompts than positive steering. The paper does not report success rates or sample sizes.
Other Ablations and Analyses
- Without normalization, dead features exceed 99% (with or without AuxK); after PCA whitening, dead latents are below 30% (Section 3.3).
- With only mean and standard deviation normalization and no PCA, the authors say performance is similar (Section 3.3).
- None of the three ITDA changes noticeably improved the dictionary size vs. reconstruction trade-off; the paper does not give FVU for these changes (Section 3.5).
- In Figure 3, the text component norm at the final double blocks jumps sharply; the authors think this may correspond to different inference phases. The residual stream norm rises by an order of magnitude over timesteps (Section 4.1). Figure 4 is for single blocks; the main text gives no specific norms.
- Figure 5 shows PCA component variance is highly anisotropic. The authors say this is unusual for text models, and the main variance dimensions align with the basis; it may relate to outlier dimensions, CLIP image embeddings, VAE noise, or positional embeddings.
- In Appendix B, Figure 9 shows SAE max-activating examples, and Figure 10 shows ITDA; the caption notes the pixel coverage difference. The main text gives no coverage numbers.
What are some points that can be further explored?
The authors leave structural changes, Dev comparison, and automated interpretation bias for future work.
Limitations and Future Directions Noted by the Authors
- Evaluation tasks: The authors write that current evaluation uses simple metrics like autointerp; usage on classification, segmentation, and depth estimation is left for later (Section 6).
- Encoder architecture: The authors write that the SAE follows LLM practice and was not modified for images, and think spatial inductive biases may be needed, and steering may need to be closer to fine-tuning (Section 6).
- Input scope: The authors write that only image activations are considered, not variable resolutions or timesteps other than pure noise (Section 6).
- Model variants: The authors write that only Schnell was examined; comparing Dev with crosscoders is future work (Section 6).
- Interpretation bias: The authors write that automated interpretation may pick up simple features like color; a detailed investigation is left for later (Section 6).
- Metric meaning: The authors say autointerp does not distinguish abstract visual attributes from manipulable semantic concepts, and call this a limitation of the metric (Section 7).
Experimental Coverage
- Model and location: Experiments use FLUX.1 Schnell's image residual stream, focusing on double block layer 18, with double/single at layer 9 and single layer 18 as well (Section 3.3, Figure 2).
- Automated interpretation: At layer 18, k=64, d=64000, SAE, ITDA, and MLP neurons are compared, with google/gemini-2.0-flash-001 as the evaluator (Section 5.2, Figure 7). The paper does not report the number of features, repetitions, or human agreement.
- Reconstruction figures: Figure 6 compares different k and d on double block 18, with ITDA from d=16.0k to d=64.0k and SAE at d=59.0k. Figure 8 is cross-layer results at d=64k, k=64. The main text does not give VE for any point in either figure.
- Steering: Qualitative experiments are at Layer 18; the Figure 1 example is applied in the first 5 of 7 steps. The paper does not report success rates or sample sizes.
- Training budget: Resolution is 256x256, and SAEs are trained for 30k steps, i.e., 30M tokens (Section 3.3). The paper does not report ITDA's threshold.
Summarize the main content of the paper
The authors decompose the FLUX.1 residual stream with SAE and ITDA, and report interpretability and steering.
The authors use dictionary learning to decompose the residual stream of the large text-to-image diffusion model FLUX.1, and experiment with intervening in generation using these features.
- Problem: The authors believe the model already has physical structure representations, but the degree of memorization and precision of control remain unclear. The authors state they have not seen automatic interpretation on diffusion models.
- Approach: On FLUX.1 Schnell, 256x256 single-step generation, train TopK SAE and ITDA on the residual streams of double and single blocks. The SAE uses PCA whitening to handle spectral anisotropy.
- Evaluation: Both interpretation and scoring use google/gemini-2.0-flash-001. Steering adds the decoded vector of selected features to local activations of the image.
- Automatic interpretation: At layer 18, k=64, d=64000, SAE, ITDA, and MLP scores are 0.819, 0.776, and 0.654 respectively (Figure 7).
- Reconstruction: Without normalization, dead features exceed 99%; after PCA whitening, dead latents are below 30%. The authors state that in Figure 6, at similar dictionary sizes, ITDA reconstruction is generally better than SAE.
- Authors' conclusions: The authors state that steering requires prompts to be related to features; Figure 1 applies steering only in the first 5 of 7 steps, and applying it to all steps shows visible artifacts. The authors believe that when not directly related to earlier layer representations, later layer features have low effect; and they state that similar scores do not distinguish ITDA's colors, textures, regions from SAE's specific objects.