AI
New method opens the black box of vision transformers through residual stream analysis
Researchers introduce a scalable framework to interpret how vision transformers process visual information by analyzing 6,600+ features across all network layers.
Understanding what happens inside vision transformers (ViTs)—neural networks that process images—remains one of deep learning's most pressing puzzles. A new research paper tackles this challenge head-on by mapping out how these models represent and manipulate visual data from input to output.
Mapping internal representations#
The researchers analyzed over 6,600 features extracted from across all layers of ViTs using sparse autoencoders, a technique that identifies interpretable patterns within the model's internal state. Their findings reveal a clear progression: features begin as simple, low-level visual patterns (like edges and textures) at early layers and gradually transform into higher-level semantic concepts (like objects and scenes) as they travel deeper through the network.
Notably, the team discovered that ViTs employ specialized feature types to encode curved shapes and spatial positions—a capability not immediately obvious from standard model analysis.
The residual replacement model#
The core innovation is the residual replacement model, which swaps out opaque transformer computations with interpretable features found in the model's residual stream (intermediate calculations). This replacement yields a much simpler yet accurate approximation of how the original model operates, enabling researchers to understand ViT mechanisms without requiring deep technical expertise.
By dramatically reducing computational complexity while preserving model behavior, this framework achieves what the authors call "human-scale interpretability"—making AI decision-making processes transparent and understandable.
Practical applications#
Beyond fundamental understanding, the framework proves useful for addressing real-world problems. The researchers demonstrate its application in removing spurious correlations—cases where models rely on accidental statistical patterns rather than genuine semantic understanding. This capability could help debias machine learning systems before deployment.
The work represents a significant step toward transparent AI, offering a scalable tool for researchers to peer inside vision transformers and verify their behavior.

