TL;DR
Bau, Zhou, Khosla, Oliva and Torralba (2017) introduce Network Dissection, a way to measure how interpretable the hidden units of a convolutional network are. Each unit is compared, pixel by pixel, with a large set of human-labelled visual concepts (the Broden dataset) such as objects, parts, scenes, textures and colours, and is given the concept it matches best. The paper's main finding is that interpretability is not a by-product of accuracy: it depends on the basis of the representation, on training conditions, and on the architecture.
Builds on: Network Dissection, Receptive Field, Intersection over Union · Leads to: no lessons yet
Why it mattered
Before this paper, researchers had seen individual units that seemed to detect things, such as a unit that fires on table lamps or on bicycle wheels. Those observations were largely anecdotal. The paper turned them into a number that can be compared across layers, networks and training methods. It also introduced Broden, a dataset with dense labels across objects, parts, scenes, materials, textures and colours, which later interpretability work has reused as a concept benchmark. Its central argument, that interpretability and discriminative power are different properties, shapes how people in Mechanistic Interpretability think about what a good representation is.
The problem
Deep networks often seem to learn units that correspond to human concepts. The question the paper asks is whether this is a special property of the network's natural coordinate system or a loose impression. If a representation is disentangled, its variables line up with meaningful factors, and reading them out would explain the network. If not, any apparent concept is a chimera.
Two questions had no good answer. First, how do you define disentanglement for a network, when the concept list is human-made? Second, do the interpretable units reflect a special alignment of the feature space, or would a rotated version of the same layer look just as interpretable? The paper answers both by measuring alignment between single units and single concepts, and by testing what happens when the basis is rotated.
How it works
Network Dissection has three steps, in the order the paper runs them. The diagram shows the flow.
flowchart LR B[Broden: labelled concept masks] --> M[Score each unit against each concept] N[CNN unit activations on Broden images] --> T[Threshold each unit at its top 0.5 percent] T --> M M --> I[IoU for each unit and concept pair] I --> C[Count unique concepts per layer]
- Gather concepts. Broden is a dataset of images where every pixel carries concept labels. It merges several dense datasets and adds 11 colour names. Check: a pixel can carry several labels, for example a unified "cat" label, a "leg" label and the colour "black".
- Record responses. For each image, the paper collects the activation map of every convolutional unit. For each unit , it finds a threshold so that the activation exceeds at 0.5 percent of spatial locations across the dataset. Check: the threshold is set from the unit's own distribution, not from a fixed number.
- Turn the unit into a segmentation. The low-resolution activation map is scaled up to the mask resolution with bilinear interpolation, then thresholded. The pixels above threshold form the unit's predicted region for the image.
- Score against each concept. The predicted region is compared with each concept mask. The score is the intersection over union, summed over the whole dataset. A unit counts as a detector for a concept if this score exceeds 0.04.
- Count. A layer's interpretability is the number of unique concepts that some unit detects. The paper calls this the number of unique detectors.
The method needs only forward passes. It does not train or change the network, so it can be applied to any convolutional model.
The math
Let be the activation map of unit on image , and let be the mask for concept . The upscaled, thresholded map is
where is the bilinear upscaling of and is 1 where the condition holds and 0 otherwise. The threshold satisfies over all spatial locations in the dataset.
Step 4 in symbols: the score
The score for unit as a segmenter for concept is the dataset-wide intersection over union:
The sums run over images that contain at least one label of the same category as . The vertical bars mean the number of pixels in a set. The unit is a detector for when , and the paper keeps only the top-ranked label when a unit matches several.
Step 5 in symbols: the count
For a layer with units , the number of unique detectors is the size of the set of concepts for which at least one unit passes the threshold. Counting distinct concepts, not detecting units, means that two units detecting the same concept count once.
The rotation test
The paper's key experiment changes the basis of a layer. For a layer with as its activations and an orthogonal matrix , the rotated representation is . Because is invertible, a downstream network can absorb it, so the discriminative power is unchanged. The test asks whether the count of unique detectors also stays the same. If it does not, interpretability depends on the basis, which is the paper's finding.
Worked examples
Setting: a unit's predicted region and a concept mask, each on one tiny image of 10 pixels. The predicted region covers 4 pixels. The concept mask covers 6 pixels. They overlap on 3 pixels.
- Intersection: pixels.
- Union: pixels.
- IoU: .
- Threshold check: , so this unit is a detector for the concept.
Interpretation: the score is the fraction of the combined area on which the unit and the concept agree. A 0.43 score is well above the paper's 0.04 cut-off, so the unit counts as a detector.
Setting: Table 3 of the paper reports, for the 256 units of conv5 of AlexNet trained on Places205, 194 units that raters agreed were interpretable. For conv1, the table reports 57 interpretable units out of 96.
- Share at conv5: , about 76 percent of units.
- Share at conv1: , about 59 percent of units.
- Difference: , about 16 percentage points more units are interpretable at conv5.
Interpretation: interpretability rises with depth in this network, which matches the paper's observation that higher layers contain more object and part detectors. The table also shows that human consistency, the agreement among raters on the ground-truth labels, is 91 percent at conv5, so the labels are most reliable at the top layer.
Setting: a conv5 layer of 256 units, trained on Places. The paper reports that after a random orthogonal rotation of this representation, the number of unique detectors is 80 percent smaller than before, with the same discriminative power.
- Suppose the original layer has 100 unique detectors.
- After the rotation, the count drops by 80 percent: unique detectors.
- The classifier downstream is unchanged, because the rotation is undone by the next layer's weights.
Try it: a layer has 150 unique detectors. The paper's rotation reduces that count by 80 percent. How many unique detectors are left, and what does this say about the claim that interpretability follows from discriminative power? Answer: detectors remain. The same accuracy comes with a fifth as many named units, so interpretability is a separate property that must be measured.
Common mistakes and tradeoffs
It is tempting to think that a unit which fires on a picture of a cat is a cat detector; in fact a unit can fire on many things, and the score is what decides. The paper's IoU is a measure of overlap between the thresholded region and a labelled mask, so a unit that fires on fur, grass and a cat may score low on the cat concept and higher on a texture concept.
It is tempting to think that the concept list is a neutral measuring stick; in fact the method finds only concepts that are in Broden. A unit that responds to a concept absent from Broden cannot be scored against that concept at all, so it will look uninterpretable under this method. Interpretability is therefore relative to the dataset's vocabulary, which is a real limit.
It is tempting to think that a high count of unique detectors means the network understands the images better; in fact the paper's analysis is about alignment with single units, not about understanding. Batch normalisation, for example, reduced interpretability in the paper's experiments, while its accuracy was similar.
It is tempting to think that a rotation-invariant measure would be better; in fact the rotation test shows why the natural basis matters for interpretability. A method that reads units directly is only as informative as the basis those units define.
When to use the method: to compare layers, architectures or training conditions by how well their units align with human concepts, on a vision network you can run forward. When not to use it: for a non-convolutional model, or for concepts that are not in the labelled dataset. Alternatives include visualisation of maximally activating patches, linear probes, and later work on directions in activation space rather than single units.
History
Before 2017, the idea that individual units detect human concepts came from observations. Zhou and colleagues had shown that units in a network trained to classify scenes behave as object detectors, and human judges were used to check them. The paper's contribution was to put the labelling step on an automatic footing, using a dense dataset, and to test whether the single unit is the right unit of analysis at all.
The paper was posted to arXiv in April 2017, and its source code and data were made available on the authors' project page. The rotation experiment and the training-condition experiments made it a standard reference for later work on the alignment of network features with human concepts. The question it raised, whether a network's natural basis carries meaning, is still open, and the field has since developed other ways of finding directions in activation space.
Results
The paper's findings, in the order the lesson built them:
- Network Dissection scores each hidden unit of a vision network against labelled concepts, using intersection over union.
- A unit is a detector for a concept when the score exceeds 0.04; a layer's interpretability is the number of unique concepts detected.
- Rotating a layer's basis with an orthogonal matrix leaves accuracy unchanged but cuts the number of unique detectors by 80 percent in the paper's experiment, so interpretability is a separate property.
- Interpretability rises with depth and depends on training. Batch normalisation reduced it in the paper, and Places supervision gave more detectors than ImageNet.
- Next, read Mechanistic Interpretability for the wider programme of looking inside networks, and Network Dissection for the method as a lesson.
Reading guide
- Section 1, Introduction and Figure 1: the observation that units sometimes detect objects, and the three questions the paper asks. Needs Convolutional Neural Network.
- Section 1.1, Related Work: prior unit visualisation and probing. Needs Linear Classifier for the probing idea.
- Section 2, Network Dissection: the three steps, Broden, and the IoU score. Needs Image Segmentation, Intersection over Union, Receptive Field and Bilinear Interpolation. Read Section 2.2 slowly.
- Section 3.1, Human evaluation: Table 3, where the method's labels are compared with human descriptions. Needs Network Dissection.
- Section 3.2, Axis-aligned interpretability: the rotation test and Figure 4. Needs Orthogonal Matrix and Rotation Matrix.
- Sections 3.3 to 3.4: layers, architectures and supervision. Needs VGG Network, Going deeper with convolutions, Deep Residual Learning for Image Recognition (ResNet) and Self-Supervised Learning.
- Section 3.5: training conditions, including Dropout and Batch Normalization.
- Sections 3.6 and 3.7: discrimination against interpretability, and layer width with Global Average Pooling.
Check yourself
QuestionRecall: what are the three steps of Network Dissection, in order?Show answer
QuestionComputation: a unit's predicted region covers 5 pixels, a concept mask covers 9 pixels, and they overlap on 4 pixels. What is the IoU, and does the unit count as a detector at the paper's 0.04 threshold?Show answer
QuestionWhy: the rotation test keeps discriminative power the same but changes the count of unique detectors. What does that show?Show answer
QuestionApplied: a team wants to use Network Dissection to check whether a new vision network has learned a concept that is not in Broden, such as a specific type of machine part. What should they expect, and what should they do?Show answer
Sources
- Bau, Zhou, Khosla, Oliva and Torralba, "Network Dissection: Quantifying Interpretability of Deep Visual Representations", arXiv:1704.05796, 2017. https://arxiv.org/abs/1704.05796
- DOI record: https://doi.org/10.48550/arXiv.1704.05796