Abstract
Deep neural networks are often criticized as "black boxes," where internal decision-making processes remain opaque to human observers. While saliency maps identify where a model focuses, they fail to explain what the model perceives. Conversely, existing natural language explanation (NLE) methods often rely on expensive, human-annotated neuron datasets. This paper introduces DeViL (Decoding Vision features into Language), a lightweight, post-hoc explanation framework that translates internal vision activations into natural language. By leveraging a frozen language model and a novel dropout-based training strategy, DeViL provides layer-wise textual descriptions and open-vocabulary saliency maps without requiring specialized neuron-level supervision.
1. Introduction
Understanding the internal representations of vision models is critical for safety, debugging, and trust. Current interpretability tools generally fall into two categories: saliency-based methods (e.g., Grad-CAM) and concept-based methods. Saliency maps provide spatial heatmaps but lack semantic labels, leaving users to guess why a specific region was highlighted. Concept-based methods provide textual labels but typically require manual labeling of individual neurons—a process that is labor-intensive and difficult to scale across different architectures.
DeViL bridges this gap by providing fine-grained, localized text descriptions of internal features using only standard image-caption datasets. It acts as a "translator," converting the high-dimensional vector space of a vision backbone into human-readable text via a Large Language Model (LLM).
2. The DeViL Framework
The architecture of DeViL is designed for modularity and efficiency, consisting of three primary components:
- Frozen Vision Backbone: Any off-the-shelf vision model (such as ResNet or ViT) can be used. Its weights remain unchanged during training.
- Translation Transformer ($f$): This is the only trainable component. It maps feature maps from various layers of the vision model into a sequence of "prefix tokens."
- Frozen Language Model (LLM): An off-the-shelf LLM (e.g., OPT or GPT-2) receives the prefix tokens as a prompt and generates a natural language description of the visual features.
By keeping the backbone and the LLM frozen, DeViL ensures that the generated descriptions are faithful to the original vision model's internal state rather than the biases of a newly trained joint model.
3. Training via Strategic Dropout
A significant challenge in training DeViL is the "granularity gap": standard datasets like Conceptual Captions (CC3M) provide global descriptions for entire images, but interpretability requires describing local features or specific layers. The authors address this using two forms of dropout:
- Spatial Dropout: During training, spatial locations in the feature map are randomly masked before pooling. This forces the translation transformer to learn to describe the image even when it only has access to a fraction of the features, effectively teaching it to associate specific text with local regions.
- Layer Dropout: The model randomly subselects different layers to pass to the transformer. This ensures the system is robust enough to interpret features from any depth of the network—from low-level textures to high-level semantic objects—at inference time.
4. Experimental Results
DeViL was evaluated on its ability to generate captions and its accuracy in describing specific neural concepts.
4.1 Image Captioning Performance
When tested as a standard captioning tool on the CC3M dataset, DeViL (using a CLIP-ViT backbone and OPT LLM) achieved a CIDEr score of 86.29. This significantly outperforms previous lightweight baselines like ClipCap, which achieved 71.82, demonstrating that DeViL is a highly effective bridge between vision and language.
4.2 Neuron Description Accuracy
To test its interpretability prowess, the model was evaluated on the MILANNOTATIONS benchmark, which contains human-labeled neuron activations. DeViL achieved a BERTScore of 0.382, surpassing the specialized MILAN model (0.362). Notably, DeViL achieved this state-of-the-art performance without ever being trained on human-annotated neuron data, proving its ability to generalize from general image-caption pairs to specific internal features.
4.3 Computational Efficiency
DeViL is remarkably accessible; the entire training process requires only 24 hours on a single A100 GPU. This makes it a practical tool for researchers to apply to various vision architectures without needing massive compute clusters.
5. Interpretability and Diagnostics
DeViL offers several unique capabilities for model introspection:
- Hierarchical Analysis: Qualitatively, DeViL confirms that vision models learn hierarchically. Descriptions from lower layers often focus on "textures," "edges," or "patterns," while higher layers transition to complex concepts like "animals," "vehicles," or specific activities.
- Open-Vocabulary Saliency: Unlike traditional saliency maps limited to a model's training classes (e.g., the 1,000 ImageNet classes), DeViL can be queried with any word. By measuring the LLM's likelihood of generating a specific word based on local features, users can generate saliency maps for arbitrary concepts like "smile" or "handlebar."
- Faithfulness as a Diagnostic: DeViL acts as a faithful messenger. If a vision model misclassifies an object—for instance, mistaking a dog for a cat—DeViL will describe the internal features as "cat-like." This allows developers to pinpoint exactly where a model's logic begins to diverge from reality.
6. Conclusion and Future Work
DeViL provides a scalable, efficient, and highly effective method for "giving vision models a voice." By translating internal activations into natural language, it moves beyond simple heatmaps toward a more nuanced understanding of neural representations.
While highly capable, the model is currently limited by the vocabulary of its training data (CC3M) and can exhibit sensitivity to synonyms in saliency map generation. Future research may focus on better aligning these open-vocabulary maps with gradient-based methods to further refine spatial localization accuracy. Nonetheless, DeViL represents a significant step forward in making complex vision models interpretable to humans.
Summary updated