ViSAE: Inside the Visual Mind - Neuroscience-Motivated Concept Circuits for Vision Transformers
Overview
ViSAE is a mechanistic interpretability toolbox for understanding Vision Transformer (ViT) inner workings through concept circuits. Motivated by neuroscience-inspired principles, it addresses the challenges of adapting sparse autoencoder (SAE)-based interpretation to vision models by improving concept coverage efficiency and enabling automated, scalable feature interpretation.
Core Innovation: Neuroscience-motivated concept circuits with 20x efficiency improvement over ImageNet.
Three Core Components
1. Comprehensive Probing Suite
Concept Vocabulary
64K images for probing
16K visually grounded concept vocabulary
20x efficiency improvement over ImageNet for concept coverage
28.7% interpretation accuracy improvement over existing concept sets
Design Philosophy
Inspired by neuroscience:
High-dimensional concept representations
Visually grounded semantic encoding
Efficient coverage of visual semantic space
2. Automated Circuit Recovery Algorithms
Top-down Concept Reading
Reads concepts from specific ViT components
Identifies which neurons encode particular concepts
Maps representation to semantic vocabulary
Bottom-up Circuit Tracing
Traces how concepts flow through network layers
Identifies concept processing pathways
Reveals hierarchical concept composition
Concept Circuits
Definition: Computational pathways that process specific concepts
Advantage: Automated discovery vs. manual interpretation
Visually grounded concepts (analogous to sensory grounding)
Layer-wise circuit tracing (similar to cortical hierarchy analysis)
Implementation Details
Probing Suite Construction
1. Collect diverse visual concepts (16K vocabulary)
2. Create probing images for each concept (64K total)
3. Optimize image selection for coverage efficiency
4. Validate concept-visual correspondence
Concept Reading Workflow
1. Extract ViT representations for probing images
2. Map activations to concept vocabulary
3. Identify neurons encoding each concept
4. Quantify encoding strength and purity
Circuit Tracing Workflow
1. Select target concept to trace
2. Identify upstream concept dependencies
3. Trace processing pathway through layers
4. Visualize concept circuit structure
5. Verify circuit with intervention tests
Editing complexity: Concept editing effects may propagate unexpectedly
Related Work
Sparse Autoencoder Interpretability
SAE-based interpretation for language models
Feature decomposition methods
Interpretability toolkits
Concept-based Interpretability
Concept activation vectors
Testing with concept activation vectors (TCAV)
Concept bottleneck models
Vision Transformer Interpretability
Attention visualization
Probing methods for ViT
Layer-wise relevance propagation
Neuroscience Inspirations
Visual cortex concept encoding
Hierarchical visual processing
Semantic grounding in perception
Practical Usage
Installation
git clone https://github.com/deep-real/ViSAE
cd ViSAE
pip install -r requirements.txt
Basic Workflow
from visae import ViSAEInterpreter
# Initialize interpreter for a ViT model
interpreter = ViSAEInterpreter(model_name='vit-base-patch16-224')
# Load probing suite (64K images, 16K concepts)
interpreter.load_probing_suite()
# Read concepts from specific layer
layer_10_concepts = interpreter.read_concepts(layer_idx=10)
# Trace concept circuit (e.g., 'bird_shape')
bird_circuit = interpreter.trace_circuit(target_concept='bird_shape')
# Audit model for bias
audit_report = interpreter.audit_model(test_dataset)
# Edit concept to steer behavior
interpreter.edit_concept(concept='background', strength=0.3)
Auditing Example
# Check if model relies on background for classification
audit = interpreter.audit_concept_importance(
concept='background_water',
task='bird_classification'
)
if audit.importance > threshold:
print("Warning: High background reliance detected")
# Edit to reduce background importance
interpreter.edit_concept('background_water', strength=0.1)
Key Takeaways
Neuroscience-Inspired Design
ViSAE translates neuroscience principles into practical AI interpretability tools:
Practical steering (concept editing for bias mitigation)
ViSAE provides a principled, practical framework for understanding and controlling Vision Transformers. Its strong empirical validation (ICML 2026) and open-source availability make it an immediately useful tool for interpretability research and model auditing.