DifFRACT: Diffusion Feature Reconstruction and Attribution for Circuit Tracing

Artyom Mazur, Nina Konovalova, Aibek AlanovNeurIPS 2026

TL;DR

Ask an image generator for a "white stop sign," and it will stubbornly hand you a red one. Why? By adapting circuit-tracing tools from language models to state-of-the-art diffusion transformers like FLUX.1, this paper maps out the exact internal wiring that turns text and noise into pixels—letting us watch concepts assemble across time and surgically fix stubborn model biases without wrecking the image.

What Problem Does This Paper Address?

Modern text-to-image models—specifically Multimodal Diffusion Transformers (MM-DiTs) like FLUX.1 and Stable Diffusion 3.5—juggle separate streams of text tokens and noisy image patches across multiple denoising steps. Yet how they actually bind attributes or propagate meaning from words to pixels remains largely a black box.

Until now, interpretability researchers mostly relied on Sparse Autoencoders (SAEs). Think of an SAE as a microscope that takes a snapshot of a model’s activations at a single point and breaks them into human-readable concepts (like "cat ears" or "watercolor style"). The catch? Between those snapshots sit dense, nonlinear Multi-Layer Perceptrons (MLPs) that scramble everything up, making it nearly impossible to trace how an early text concept mathematically triggers a later visual feature. In Large Language Models (LLMs), researchers solved this using transcoders to trace full computational circuits. Carrying this over to diffusion is much harder: activation distributions shift wildly across denoising timesteps, and information jumps constantly between text and image streams.

Methods

Instead of reconstructing activations at a single point like an SAE, a transcoder learns to approximate the entire input-to-output transformation of an MLP layer using a wide, sparsely activating bottleneck. Because the transcoder replaces the opaque MLP with sparse, interpretable features, the connections through the MLP become explicit.

To make this work in MM-DiTs (targeting the double-stream blocks where text and image have separate MLPs), the authors introduce Temporal-Aware Transcoders:

  • Timestep Conditioning: Because the statistical distribution of activations changes drastically as noise turns into a clean image, the authors condition the transcoder’s encoder on the denoising timestep $t$ using FiLM (Feature-wise Linear Modulation).
Figure 1: Architecture of the Temporal-Aware Transcoder for one (layer, stream) pair. The timestep t produces per-channel scale and shift that modulate the encoder input via FiLM; the modulated input is encoded into a wide, sparse code z and decoded into the reconstruction ˆy of the MLP output.
  • Local Replacement Model (LRM): To trace a circuit for a specific generation, they freeze the model's nonlinearities at their current input values—locking attention probabilities and LayerNorm denominators in place—and swap MLPs for transcoders. This turns the entire forward pass into an exact, linear sum of feature contributions.
  • Iterative Graph Construction: Starting from a target feature (say, "cat eyes" in layer 12), they run budgeted backward passes to discover which earlier text and image features pushed its activation up or down, then aggregate across spatial positions and prune away weak links to leave a clean, readable attribution graph.
Figure 2: Iterative graph construction and position aggregation for a target image-stream feature cat eyes at layer ℓ. A cluster of small circles is one feature at several positions; outlined circles are discovered sources, whose incoming edges are not yet computed, filled circles are expanded ones. MLP-error and input vertices are omitted.

Datasets

The specific training datasets used to train the transcoders are not discussed in the main text of the paper (deferred to Appendix F). For evaluation, the authors construct custom, controlled prompt grids—such as 8 prompts $\times$ 30 seeds for testing atypical object colors (e.g., a white stop sign, a blue pomegranate), 16 prompts $\times$ 3 seeds for concept vs. context steering, and a 48-prompt corpus for measuring feature co-activation—evaluated blind by human annotators and a vision-language model.

Key Insights and Ideas

  • Watching the Prompt Hand Off the Baton: Diffusion is known to rely on text early and refine visuals late, and attribution graphs catch this exact handoff from the inside. Early in denoising, visual features draw almost all their signal from text; by the final step, the image stream is essentially talking to itself. Crucially, this means semantic edits only work if you intervene in the earliest steps!
  • Concept vs. Context Channels: Graphs reveal features that single-feature SAE searches completely miss. For "a baseball bat," concept features fire on the words baseball bat, while context features fire on associated concepts (glove, batter). Suppressing the concept swaps the bat for a ball; suppressing the context keeps the long wooden shape intact while stripping its identity into a plain stick.
  • Active Suppressors: Models don't just activate what they want; they actively hold down competing ideas. On a prompt about a dog, a dedicated dog-suppressor feature fires negative edges into cat features to keep feline traits from bleeding in. Flipping a dog into a cat requires dialing down the dog and turning off its anti-cat suppressor.
  • Why "White Stop Signs" Fail: When asked for an atypical color, the model stages a tug-of-war: lexical white features push against the red image feature, while associative features on stop sign push for red—and the training prior usually wins.

Key Results

  • No Sparsity Tax: Across layers 6, 12, and 18 of FLUX.1[schnell], Temporal-Aware Transcoders match or slightly beat timestep-conditioned SAEs on normalized MSE at matched sparsity ($L_0$), giving circuit-tracing superpowers for free.
  • Quantifying the Temporal Shift: Across 80 graphs in FLUX.1[schnell], text-stream attribution plummets from 89.9% at step 0 to 5.4% at step 3, while image-stream share climbs from 10.1% to 94.6%. Causally, suppressing "cat" text features in steps 0–1 erases the cat 72.2% of the time; doing so in steps 2–3 erases it 0% of the time.
  • Surgical Precision on Color Priors: At a matched budget of 4 features on atypical color prompts, suppressing graph-selected associative companions achieves the requested color 82.1% of the time (vs. 36.2% baseline and 56.2% target-feature-only). While co-activation selection gets close on color (76.7%), the circuit graph is far more surgical, accidentally destroying the object in only 13.8% of cases compared to 21.7% for co-activation and 75.8% for contrast-based selection.
  • Cross-Model Generalization: FLUX.1[dev] cleanly reproduces both the temporal shift and color-prior fixes (81.9% success vs. 62.7% for co-activation), while SD3.5-medium reproduces both trends in direction.

Limitations and Future Work

  • Local, Partial Explanations: A graph explains a single feature at one layer and timestep, not the whole image. For image-stream targets, pruned feature vertices account for 46% of the target's preactivation, with reconstruction/truncation errors taking up 30%.
  • Frozen Attention: Because attention probabilities are frozen in the LRM, graphs show what information flows through attention, not why the model chose to attend there.
  • Double-Stream Only: Due to compute budgets (around 40 minutes on an H100 per graph, plus training costs), the authors only model the first 16 double-stream blocks of FLUX.1, leaving its 38 single-stream blocks—and non-MM-DiT architectures—for future work.

Summary updated

Abstract

Mechanistic interpretability seeks to explain neural network behavior by decomposing model computations into interpretable features and circuits. While transcoder-based circuit tracing has recently enabled detailed causal analyses of large language models, it remains unclear how semantic information propagates across denoising steps and how text and image representations interact within multimodal diffusion transformers (MM-DiT) for image generation. Existing methods provide only partial insight: attention maps expose a limited view of token interactions, while sparse autoencoders can discover interpretable features but do not directly reveal how these features are transformed and composed through nonlinear MLP layers. In this work, we extend transcoder-based circuit tracing to multimodal diffusion transformers. We train timestep-conditioned transcoders that faithfully approximate the input-output behavior of the MLP sublayers in the double-stream blocks of FLUX.1[schnell]. By replacing MLPs with transcoders and linearizing the remaining computation, we obtain exact feature-to-feature attribution and build compact attribution graphs over interpretable features. Empirically, our transcoders match or slightly outperform sparse autoencoders on the sparsity-faithfulness tradeoff. The graphs recover the known shift from prompt-driven to image-driven computation across denoising steps, point to candidate mechanisms of attribute binding and cross-stream semantic propagation, and yield intervention-testable explanations for systematic generation errors. On prompt grids labeled blind, graph-guided interventions reach effects that single-feature steering does not; at a matched budget, features chosen from the graph fix a color prior more often than the target feature alone and destroy the object less often than features chosen by co-activation. FLUX.1[dev] reproduces the temporal and color-prior results, and SD3.5-medium reproduces them in direction. Our results demonstrate that transcoder-based circuit analysis is feasible for state-of-the-art multimodal diffusion transformers. The code is available at https://github.com/Artalmaz31/DifFRACT
BibTeX
@inproceedings{mazur2026diffract,
  author = {Artyom Mazur and Nina Konovalova and Aibek Alanov},
  title = {{DifFRACT: Diffusion Feature Reconstruction and Attribution for Circuit Tracing}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=hwwQnLpJt5},
}
Figure