Decoding Vision Transformers: the Diffusion Steering Lens

Ryota Takatsuki, Sonia Joseph, Ippei Fujisawa, Ryota Kanai

Introduction

The Diffusion Steering Lens (DSL) introduces a training-free framework for interpreting the internal mechanisms of Vision Transformers (ViTs). By leveraging representation steering and a pre-trained diffusion decoder, DSL enables researchers to visualize the specific functional contributions of individual attention heads and MLP layers, providing a window into how these models incrementally construct visual understanding.

The Interpretability Gap

In natural language processing, the "Logit Lens" allows for the inspection of a model's internal state by projecting hidden vectors onto the vocabulary space. Applying a similar logic to computer vision is non-trivial; visual data lacks a discrete, low-dimensional vocabulary. While previous attempts like the "Diffusion Lens" could visualize the overall residual stream, they often failed to isolate the direct contributions of specific submodules. Because individual components typically make subtle, incremental updates, their specific signals are frequently overwhelmed by the cumulative state of the model.

Methodology: Steering and Patching

To overcome these limitations, DSL employs two primary techniques within a text-to-image diffusion pipeline (e.g., CLIP ViT-bigG/14):

  1. Representation Steering: Instead of decoding a raw hidden state, DSL takes a "corrupted" (noisy) version of the representation and "steers" it toward the target internal state using a scaling coefficient ($\alpha$). This process effectively amplifies the signal of the specific layer or head under investigation.
  2. Submodule Patching: To isolate the immediate impact of a component, DSL "patches" the outputs of all subsequent submodules with their corrupted counterparts. This intervention blocks "indirect" paths—where later layers might filter or transform the signal—ensuring the final visualization reflects only the direct influence of the targeted submodule.
The DSL architecture uses representation steering and submodule patching to isolate direct contributions within a ViT.

Key Insights: The "Slow Burner" Nature of ViTs

Analysis using DSL reveals that visual evolution in ViTs is significantly slower than in Large Language Models. While LLMs often converge on a prediction in early layers, ViTs are "slow burners." DSL visualizations show that meaningful visual structures only begin to coalesce in the residual stream around layer 30 of a 48-layer model.

Visual evolution across layers for a cup image, demonstrating that meaningful structures emerge late in the model (around layer 30).

Furthermore, the research highlights the Hydra Effect: even when a specific attention head appears to be processing a clear visual concept, its removal (ablation) may not significantly degrade the final output. This suggests that ViTs maintain high levels of redundancy, with multiple pathways capable of representing similar information.

Results and Validation

The efficacy of DSL was validated through several experiments:

  • Enhanced Visualization: DSL successfully recovers signals from intermediate layers that standard diffusion-based methods miss.
  • Interventional Accuracy: The clarity of DSL visualizations correlates strongly with the actual impact a submodule has on the model's final prediction.
  • Targeted Image Cleaning: In tests involving synthetic overlays (e.g., a flower placed over an ImageNet object), DSL-guided ablation successfully identified and silenced the specific heads responsible for the overlay, effectively "cleaning" the image. This method performed comparably to computationally intensive baselines like ACDC.

Conclusion

Diffusion Steering Lens provides a powerful, non-invasive tool for mechanistic interpretability in vision models. By isolating direct submodule contributions, it moves beyond global state visualization to a more granular understanding of the ViT "thought process." Future work will focus on reducing steering artifacts and extending the method to models outside existing diffusion pipelines.

Summary updated

BibTeX
@inproceedings{takatsuki2025decoding,
  author = {Ryota Takatsuki and Sonia Joseph and Ippei Fujisawa and Ryota Kanai},
  title = {{Decoding Vision Transformers: the Diffusion Steering Lens}},
  booktitle = {Workshops @ CVPR},
  year = {2025},
  url = {https://openreview.net/forum?id=FZADLKvrxd},
}
Figure