TL;DR
This paper explores how to interpret the internal workings of large text-to-image diffusion models like FLUX.1 by applying dictionary learning techniques (Sparse Autoencoders - SAEs, and Inference-Time Decomposition of Activations - ITDA). The authors demonstrate that these methods can effectively decompose model activations into interpretable features, enabling targeted control over image generation and outperforming traditional MLP neuron interpretability.
What Problem Does This Paper Address?
Text-to-image diffusion models have become incredibly powerful, capable of generating highly realistic images from text prompts. However, understanding how they achieve this and to what extent they can be controlled remains a significant challenge. Researchers are debating how much these models memorize training data and how precisely their outputs can be steered. This paper tackles the problem of interpreting the complex internal representations within these large models, aiming to make them more transparent and controllable by decomposing their hidden activations into meaningful features.
Methods
The core of this paper lies in applying two dictionary learning techniques to a large text-to-image diffusion model, FLUX.1:
- Sparse Autoencoders (SAEs): These are small neural networks trained to reconstruct input data using a sparse set of "features" learned by a decoder. The paper uses a "TopK" variant, which selects the top-K most relevant decoder features. They also introduce training efficiency improvements for large models.
- Inference-Time Decomposition of Activations (ITDA): This is a more recent technique that aims to achieve similar interpretability to SAEs but with potentially faster training. Instead of learning an encoder, ITDA uses gradient pursuit to find sparse representations based on data points from the activation distribution.
The authors also introduce a visual automated interpretation pipeline to evaluate the interpretability of the features learned by SAEs and ITDA. This pipeline uses a language model (Google Gemini) to generate explanations for "maximum activating examples" of features and then scores how well these explanations match new images.
Datasets
The paper uses the FLUX.1 model, specifically its "Schnell" variant, for training and evaluation. The activations are taken from various layers and timesteps of this model. No new datasets are introduced; the focus is on applying existing interpretability techniques to a large, state-of-the-art diffusion model.
Key Insights and Ideas
- SAEs and ITDA are effective for large diffusion models: The paper shows that these dictionary learning methods, previously applied to smaller models, scale well to a large text-to-image diffusion model like FLUX.1.
- Interpretable features can steer image generation: By manipulating the learned SAE features (through activation addition), the authors demonstrate the ability to influence specific aspects of the generated images, such as style or content.
- ITDA offers comparable interpretability to SAEs: While SAEs are a more established technique, ITDA shows promising results, achieving similar interpretability scores with potentially faster training.
- Normalization is crucial for training: The authors found that without proper normalization (specifically PCA whitening), a majority of SAE neurons become "dead" (rarely activate), hindering interpretability.
- Feature types differ between SAEs and ITDA: While both methods achieve good interpretability scores, manual inspection reveals that SAE features tend to capture more concrete objects (e.g., "hats," "faces"), whereas ITDA features often represent more general attributes (e.g., "colors," "textures," "regions"). This highlights a limitation of purely automated metrics.
Key Results
- Reconstruction Quality: Both SAEs and ITDAs achieve good reconstruction quality, with ITDA generally outperforming SAEs at similar dictionary sizes.
- Interpretability: SAEs and ITDA both outperform traditional MLP neurons on interpretability metrics.
- Steering Effectiveness: Steering with SAE features is effective, but the effects are constrained, suggesting that initial prompts should align with the features being steered. Steering on all timesteps can introduce artifacts, indicating that steering at specific timesteps is more effective.
- Feature Differences: SAE features show better pixel coverage compared to ITDA features.
Limitations and Future Work
- Automated Metrics Limitations: The paper acknowledges that automated interpretability metrics might not fully capture the nuances of feature meaning, as seen in the difference between SAE and ITDA features.
- Localized Feature Space: Steering effectiveness is constrained, suggesting that features might be localized within the model's representation, and their impact depends on the initial prompt.
- Model Architecture Adaptations: The current SAE architecture is applied without modification. The authors suggest that adapting the encoder with spatial inductive biases (e.g., making it convolutional) might be beneficial for image models.
- More Sophisticated Steering: Future work could explore more advanced steering techniques beyond simple activation addition, such as finetuning or methods aware of the steering effects.
- Bias Investigation: The authors note the potential for their autointerpretation pipeline to pick up on simple image characteristics like color and suggest further investigation into biases.
- Exploring Other Models and Timesteps: Future work could also involve comparing different variants of FLUX.1, exploring other diffusion models, and investigating intermediate timesteps.
Summary updated