Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Learning Deep Features for Discriminative Localization

Global average pooling lets CNNs localize objects from image labels alone

  • Problem Classification CNNs with fully-connected output layers lose the localization their convolutional layers show. Dropping those layers cuts parameters but was thought to cost accuracy and location cues.
  • Method Class activation mapping, or CAM, places global average pooling before the output layer. It reads the output weights back onto the feature maps, so each location shows its part of the class score.
  • Results With a box-selection heuristic, GoogLeNet-GAP reached 37.1% top-5 test error, compared to 34.2% for fully supervised AlexNet.

Where localization disappears

Convolutional layers of CNNs already act as object detectors, although no object locations are given during training. That ability is lost once fully-connected layers are used for classification. Newer networks such as Network in Network and GoogLeNet drop fully-connected layers to cut parameters without giving up accuracy.

Network in Network uses global average pooling mainly as a regularizer against overfitting. The authors found that this pooling layer does more: with a small change, the network keeps its localization all the way to the final layer. That matters because localization would then come from image-level labels alone, with no box training.

Keeping the spatial layout until the output

The key idea is to place global average pooling just before the output and read the output weights back onto the feature maps. Global average pooling collapses each feature map to one number, and the class score is a weighted sum of those numbers. Because that sum is linear, the same weights can be applied to the maps before averaging, which keeps a spatial layout.

The authors call the resulting map a class activation map (CAM), and a single forward pass yields it.

The network is built like Network in Network and GoogLeNet, with convolutional layers, then pooling, then one output layer. The output layer's weights are therefore the link between a class and the regions that drive it.

The class activation map formula

For unit k, the global average pooling result is F_k, the sum of its activation f_k(x,y) over all spatial positions, written \(F_k = \sum_{x,y} f_k(x,y)\). The class score before softmax is \(S_c = \sum_k w_{ck} F_k\), where w_ck is the output weight of class c for unit k. Writing each F_k as a sum over space and swapping the two sums gives \(S_c = \sum_{x,y} \sum_k w_{ck} f_k(x,y)\).

The inner sum defines the class activation map \(M_c(x,y) = \sum_k w_{ck} f_k(x,y)\) for class c. Summing M_c over all locations gives the class score, so each location carries its own part of that score. The authors read a high value of M_c at a location as evidence that the location drives class c.

The authors expect each unit to respond to a visual pattern inside its receptive field, so f_k marks where that pattern is present. Upsampling M_c to the input size gives a map over the image pixels. The softmax bias is ignored in this derivation, since the authors judge it to have little impact on classification.

From heat map to bounding box

To turn a map into a box, the authors threshold it and keep regions above 20% of the map's maximum value. The box then covers the largest connected component of that thresholded segmentation. For top-5 evaluation this is done for each of the five highest-ranked classes.

The step is a fixed rule applied to the map, not a learned detector. For the test set the authors use a different way of choosing boxes, which the test section covers.

Why average pooling rather than max pooling

Oquab et al. used global max pooling for weakly supervised localization, and it picks out one peak per map. The authors note that this localizes a point lying on the object's boundary rather than its full extent.

The authors argue that averaging rewards a network for activating every discriminative part, because any low part pulls the average down. A max, by contrast, ignores all low responses once one strong response exists. They present this as the intuition behind the choice, to be checked experimentally.

On ILSVRC validation, GoogLeNet-GAP reached 43.00 top-5 localization error, compared to 45.26 for GoogLeNet-GMP. Their classification top-5 errors are close, at 13.2 for GoogLeNet-GAP and 13.9 for GoogLeNet-GMP. Since classification is similar, the authors attribute the localization gap to the pooling choice.

Classification cost of removing fully-connected layers

For each backbone the authors cut the network after a chosen convolution layer, then added a 3x3 convolution with 1024 units. They then fine-tuned on the 1.3M ILSVRC training images for 1000-way classification.

On the ILSVRC validation set, GoogLeNet-GAP scored 13.2 top-5 error, compared to 11.3 for GoogLeNet. Most drops are in the range of 1 to 2 percent, as the authors report. AlexNet is the largest loser, with 26.3 top-5 error for AlexNet-GAP compared to 19.5 for AlexNet.

To close that gap, the authors added two convolution layers before GAP, which gives AlexNet*-GAP a top-5 error of 20.9. The GAP networks keep most of their classification accuracy, which matters because a box is only right when its class is right.

Localization error on ILSVRC validation

The first localization check uses the ILSVRC validation set, with top-1 and top-5 localization errors. GoogLeNet-GAP reached 43.00 top-5 localization error, compared to 49.34 for the original GoogLeNet.

Backprop saliency on the original networks scored 50.55 for GoogLeNet, 51.46 for VGGnet and 52.64 for AlexNet. Each of these is above the 43.00 of CAM on GoogLeNet-GAP, so CAM gives lower error in this comparison. The authors describe the CAM advantage over backprop as large.

GoogLeNet-GAP beats GoogLeNet on localization, although GoogLeNet is better at classification. The authors suspect that GoogLeNet's 7x7 mapping resolution limits its boxes, while GoogLeNet-GAP uses 14x14. They offer this as an explanation rather than as a tested result.

Test-set result and the box heuristic

With a box-selection heuristic, GoogLeNet-GAP reached 37.1% top-5 test error, compared to 34.2% for fully supervised AlexNet.

The authors chose this rule because it improved results on the validation set, so the 37.1% is not the plain GoogLeNet-GAP setting.

The authors acknowledge that the gap to fully supervised networks with the same architecture is still large.

Localized crops for bird recognition

CUB-200-2011 contains 200 bird species, with 5,994 training images and 5,794 test images. Using full images and no box annotations, GoogLeNet-GAP reached 63.0% accuracy.

The authors used thresholding to find bird boxes on training and test images, then re-extracted features from the crops. Cropping lifted accuracy to 67.8%. Training with annotated bounding boxes reached 70.5%.

At an IoU threshold of 0.5, the CAM boxes locate the bird in 41.0% of images. Chance performance was 5.5%, so the localization is well above chance.

Methods that use boxes and parts score higher, for example PANDA R-CNN at 76.4%. So the 67.8% crop result shows a gain from localization, not the best number reported on this dataset.

GAP features as generic features

The authors trained a linear SVM on the GAP outputs, which replaces the softmax weights for each new dataset. They compared this against fc7 from AlexNet and average pooling from GoogLeNet across eight scene and object benchmarks.

On SUN Attribute, GoogLeNet-GAP scored 91.98, compared to 92.05 for average-pooled GoogLeNet features. On Caltech256 the figures were 70.62 and 72.03, both well above 54.92 for AlexNet fc7.

The authors summarize GoogLeNet-GAP as competitive with GoogLeNet, even though it has fewer convolutional layers. For localization on these datasets, the authors show example maps and judge them by eye, with no score.

Pattern discovery and question answering

For scenes, the authors trained one-vs-all linear SVMs on 4675 fully annotated images from 10 SUN scene categories. CAM then listed the objects that most often overlap the high-activation regions, such as sink and faucet for bathrooms.

For concepts, the authors used hard-negative mining from prior work to train detectors from caption text. They show top-ranked images and CAMs for concepts such as mirror in lake. For text, a weak detector trained on 350 StreetView images highlighted text without any box labels.

The authors also used localizable features in a visual question answering baseline from prior work. That baseline reached 55.89% overall accuracy on test-standard in the Open-Ended track. The highlighted regions are shown for the predicted answers, but no localization score is given.

Class-specific units

The softmax weights rank the units for each class, so the most useful units can be shown directly. The authors segment each unit's top activation images by its receptive field, following the earlier unit-visualization work. This is done for AlexNet*-GAP trained on ImageNet and on the Places database.

For lakeland terrier, units detecting dog face and body fur carry the weight. For living room, units detecting sofa, table and fireplace do. The authors describe the network as a bag of such class-specific units, with their combination guiding classification.

Limitations

The headline test number depends on a box-selection rule chosen after validation experiments. The authors attribute part of GoogLeNet's weaker result to its 7x7 mapping resolution, which they did not isolate in a separate test.

Box-level localization is scored on ILSVRC and, for birds, on CUB-200-2011 with IoU. The scene, concept, text and question-answering results are shown as maps or examples, not as localization scores. The pattern discovery experiments have no train and test split, so they are not held-out evaluations. The classification drops of 1 to 2 percent are the cost of removing the fully-connected layers, and AlexNet's drop is larger.

Paper info

Authors
Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, Antonio Torralba
Venue
arXiv · Preprint
First published
2015-12-14
Added
2026-11-11
Updated
2015-12-14
Version
v1
arXiv
1512.04150
Category
cs.CV
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, Antonio Torralba (2015). Learning Deep Features for Discriminative Localization. arXiv:1512.04150v1. https://arxiv.org/abs/1512.04150v1

BibTeX
@misc{zhou2015learning,
  title = {{Learning Deep Features for Discriminative Localization}},
  author = {Bolei Zhou and Aditya Khosla and Agata Lapedriza and Aude Oliva and Antonio Torralba},
  year = {2015},
  eprint = {1512.04150},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1512.04150v1}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up