Automated Natural Language Explanation of Deep Visual Neurons with Large Models

Chenxu Zhao, Wei Qian, Yucheng Shi, Mengdi Huai, Ninghao LiuarXiv 2023 · DOI

Abstract

Deep Neural Networks (DNNs) are often criticized as "black boxes" due to the difficulty of interpreting the functional roles of individual neurons. Traditional interpretability methods either rely on manual visualization or require extensive human-labeled datasets. This paper introduces a fully automated pipeline that utilizes Large Language Models (LLMs) and Vision-Language Models (VLMs) to generate precise natural language explanations for neuron activations. The framework is model-agnostic, scalable, and demonstrates high alignment with human interpretations while often providing greater descriptive detail.

Introduction

Understanding the internal representations of DNNs is crucial for AI safety and transparency. While visualization techniques can identify image regions that activate specific neurons, translating these visual patterns into human-understandable concepts typically requires human intervention. Existing automated methods, such as Network Dissection, are limited by the scope of manually curated concept datasets like Broden. As models scale, these human-dependent bottlenecks become increasingly problematic. This work proposes a "post-hoc" automated interpreter that leverages the broad knowledge encoded in foundation models to explain neuron behavior without manual labeling.

Methodology

The proposed framework consists of a three-stage automated pipeline designed to map neuron activations to semantic concepts.

Overview of the automated neuron explanation pipeline, showing the flow from target neuron to final natural language explanation.
  1. Image Patch Collection: For a target neuron, the system identifies the top $K$ images from a dataset that elicit the strongest activations. It then employs an occlusion-based technique to isolate the specific image patches responsible for these activations.
  2. Concept Vocabulary Generation: To avoid the limitations of static vocabularies, the system prompts an LLM (e.g., GPT) to generate a set of descriptive features relevant to the classes in the dataset. For example, the LLM might be asked to list features that distinguish a "bridge," resulting in a rich, domain-specific candidate set.
  3. Explanation Generation via VLM: Finally, a Vision-Language Model (such as CLIP) computes the similarity between the isolated image patches and the LLM-generated phrases. The phrase with the highest aggregate similarity score is selected as the natural language explanation for the neuron.

Experimental Results

The framework was evaluated on ImageNet and Places365 datasets across multiple architectures, including AlexNet, ResNet50, and Vision Transformers (ViT).

Qualitative Performance

The automated explanations show strong qualitative agreement with human baselines. In many instances, the model provides more granular descriptions than human annotators. For example, while a human might label a neuron's preference as "windows," the automated system identifies "small, slit-like windows," capturing the specific geometric nuances of the activation.

Qualitative comparison between human-generated and automated neuron explanations across different architectures and layers.

Functional Validation through Ablation

To verify that the generated explanations reflect the actual functional role of neurons, the researchers performed ablation studies. In one instance, a neuron in a ResNet50 model was identified as representing "mashed avocado." Deleting this single neuron resulted in an 84% drop in the model's accuracy for the "guacamole" category, confirming that the explanation accurately captured a critical feature used for classification.

Discussion and Conclusion

The results highlight the hierarchical nature of DNNs, with early layers focusing on low-level textures (e.g., grids, stripes) and deeper layers representing complex semantic concepts (e.g., clock faces). By using foundation models as proxies for "common sense" knowledge, this method provides a scalable path toward interpreting large-scale vision models.

However, the approach is currently limited by the vocabulary generated by the LLM and the inherent biases of the VLM used for matching. Furthermore, while this work focuses on individual neurons, future research is needed to explain "polysemantic" neurons and the collective behavior of neuron groups. Despite these limitations, the framework represents a significant step toward fully automated, high-fidelity model interpretability.

Summary updated

BibTeX
@misc{zhao2023automated,
  author = {Chenxu Zhao and Wei Qian and Yucheng Shi and Mengdi Huai and Ninghao Liu},
  title = {{Automated Natural Language Explanation of Deep Visual Neurons with Large Models}},
  year = {2023},
  eprint = {2310.10708},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.10708},
}
Figure