Vision transformers reveal reusable world knowledge in their layers
"World Knowledge" in the Weights: Reading Concept Circuits of Vision Transformers
Computer Vision and Pattern Recognition
Summary
Vision transformers are computer models that understand images very well, but it's not clear how they internally represent what they 'know' about the world. The authors developed a way to read the model’s inner workings as concept circuits that show how ideas connect across layers. This helps identify when the model relies on wrong clues and allows fixing those mistakes, improving accuracy. They also compare different models to see how training affects what they learn about concepts.
What this means in practice
- •For machine learning engineers: Detect hidden shortcut dependencies in vision transformer models to improve their robustness.
- •For ai system maintainers: Guide interventions on vision transformer internals during inference to correct misclassifications effectively.
Authors
Yanlin Chen, Tang Li, Xi Peng
Abstract
Vision transformers (ViTs) have achieved remarkable generalization across visual domains, yet little is known about how they internally represent the structure of the world. To address this gap, we use Cross-Layer Transcoders (CLTs) to read concept circuits from ViTs: directed graphs whose nodes correspond to sparse, interpretable concepts and edges capture concept interactions across layers. Our method yields two complementary views of model behavior. The global concept circuit is input-invariant and can be recovered directly from learned cross-layer weights, exposing the reusable "world knowledge" encoded in the model. The instance concept circuit is input-dependent and identifies the concepts and pathways actually used for a specific prediction, enabling faithful example-level explanations. We demonstrate the utility of concept circuits in three ways: (1) Automatic spurious correlation discovery: leveraging the statistics of our global concept circuits to identify shortcut dependencies within the model. (2) Spurious correlation removal: intervening on the instance concept circuit to steer the model towards correct predictions. Empirical results show that our method outperforms existing counterparts by 11.0% on the Waterbird dataset. (3) Model comparison: contrasting the global concept circuits of different foundation models (e.g., CLIP vs. DINO) to reveal how supervision paradigms shape representational structure. Our code is available at https://github.com/deep-real/VisionCLT