Introduction
Deep neural networks have revolutionized AI, yet they remain largely "black boxes." Unlike traditional engineering where every component has a defined role, neural networks are optimized holistically, making the function of individual neurons opaque. Mechanistic interpretability aims to decode these internal representations, but existing methods often require significant human effort or fail to scale. SemanticLens addresses this by mapping the hidden components of neural networks into the understandable, multimodal space of foundation models like CLIP, enabling automated and scalable model auditing.
The SemanticLens Framework
SemanticLens bridges the gap between incomprehensible latent features and human-understandable concepts through a three-step process:
- Components to Concept Examples: For a specific neuron, the framework identifies highly activating images from a dataset. It employs Concept Relevance Propagation (CRP) to crop these images, isolating the specific features that triggered the neuron and removing background noise.
- Concept Examples to Semantic Space: These cropped examples are processed by a multimodal foundation model (e.g., CLIP or DINOv2). The resulting embeddings are averaged to create a semantic vector ($\vartheta$) that represents the neuron's "concept" in a structured space.
- Prediction to Components: CRP is used again to quantify how much each neuron contributed to a specific final prediction, providing a direct link between internal concepts and model output.
Capabilities and Use Cases
By embedding neurons in a multimodal space, SemanticLens transforms a neural network into a searchable database. This enables several key operations:
- Search: Users can query the "brain" of a model using text prompts to find neurons encoding specific attributes, such as "watermarks" or "skin tone."
- Describe: The framework can automatically label neurons by comparing their semantic vectors to a predefined set of textual concepts.
- Audit Alignment: Researchers can identify whether a model relies on valid reasoning or spurious correlations (e.g., using "snow" to identify a "shovel").
- Evaluate Interpretability: SemanticLens introduces computable metrics for concept "clarity" and "polysemanticity," allowing for the objective measurement of model interpretability at scale.
Key Findings and Results
The framework has been validated across diverse datasets, including ImageNet-1k and the ISIC 2019 melanoma detection challenge.
- Ubiquity of Spurious Correlations: Auditing a ResNet50v2 revealed that every ImageNet class studied relied on background concepts. For instance, the model used "palm trees" as a shortcut for detecting "oxen."
- Medical Model Debugging: In the ISIC dataset, SemanticLens identified that a melanoma detection model was relying on artifacts like "band-aids" and "scale bars." Retraining with augmented data to neutralize these shortcuts improved clean test accuracy from 71.4% to 72.8%.
- Human-AI Alignment: User studies with over 200 participants showed that SemanticLens's automated metrics correlate strongly (Pearson > 0.74) with human judgment of interpretability.
- Automated Labeling: The framework achieved state-of-the-art scores in automated neuron labeling, outperforming existing methods on fine-grained benchmarks.
Conclusion
SemanticLens provides a scalable path toward understanding the "why" behind AI decisions. While its effectiveness is currently tied to the quality and domain expertise of the underlying foundation model, it offers a powerful tool for proactive bias detection and model validation. Future work aims to extend these techniques to generative models and other modalities like audio and text, potentially integrating interpretability metrics directly into the training objective.
Summary updated