Foundations to Frontier
Tests
E. Deep Learning › E8 CNN Architectures (one page each)

GoogLeNet / Inception v1

GoogLeNet (Szegedy et al., 2015) won ILSVRC 2014 with 6.67% top-5 error using 22 layers but about 12 times fewer parameters than AlexNet. Its building block, the Inception module, runs 1 × 1, 3 × 3 and 5 × 5 convolutions and pooling in parallel and concatenates them, with 1 × 1 convolutions first shrinking the channels so the expensive branches stay cheap. This page covers the module, the 1 × 1 reductions, auxiliary classifiers and global average pooling. In the exercises you build module 3a (192 → 256 channels, 163,696 parameters), then compute what the nine modules would cost without reductions: channels would grow to 4,944, and compute would rise from 1.1 to 12.1 billion multiply–adds.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Look at several scales at once

Should a layer use small 1 × 1 filters, medium 3 × 3, or large 5 × 5? GoogLeNet’s answer: all of them, side by side, and let training decide which to use. Each Inception module sends its input through four parallel branches and stacks their outputs. The trick that makes this affordable is to shrink the number of channels with cheap 1 × 1 convolutions before the expensive branches. Nine such modules, stacked 22 layers deep, won ImageNet 2014 with fewer parameters than AlexNet.

Architecture explorer: shapes, parameters and compute
stageoutput C × H × Wparametersmultiply–adds
stem192 × 28 × 28
124.7 k
477.68 M
3a256 × 28 × 28
164.1 k
128.05 M
3b480 × 14 × 14
389.4 k
304.27 M
4a512 × 14 × 14
376.8 k
73.61 M
4b512 × 14 × 14
449.8 k
87.91 M
4c512 × 14 × 14
510.8 k
99.85 M
4d528 × 14 × 14
606.1 k
118.52 M
4e832 × 7 × 7
869.4 k
170.00 M
5a832 × 7 × 7
1.04 M
51.08 M
5b1024 × 7 × 7
1.45 M
70.70 M
head1000 × 1 × 1
1.02 M
1.02 M
Total: 7,005,832 parameters (7.01 M), 1.58 G multiply–adds per image at 224 × 224.
AlexNet61.10 M parameters714.19 M MACs
VGG-16138.36 M parameters15.47 G MACs
GoogLeNet (Inception v1)7.01 M parameters1.58 G MACs
Bars show each row's share of the total. Convolutions dominate compute because they run at every position; fully connected layers dominate parameters in older designs (AlexNet, VGG). Changing the input size changes the compute of every convolution but not its parameters. Parameter counts include biases and BatchNorm scale and shift and match torchvision's implementations.
Why engineers care

GoogLeNet showed that careful design can buy accuracy without buying parameters or compute, the idea behind every efficient network that runs on drones, phones and satellites.

📝 Quick check (Level 0)
0/3 answered
  1. 1. An Inception module runs branches…
  2. 2. 1 × 1 convolutions in Inception mainly…
  3. 3. GoogLeNet has about … AlexNet's parameters.

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

By hand

  • Module 3a on 192 × 28 × 28 has four branches:

    • 1 × 1 to 64 channels;
    • 1 × 1 to 96, then 3 × 3 to 128;
    • 1 × 1 to 16, then 5 × 5 to 32;
    • 3 × 3 max pooling, then 1 × 1 to 32.

    The output has 64 + 128 + 32 + 32 = 256 channels, and the module has 163,696 parameters with biases.

  • Saving on the 5 × 5 branch: directly on 192 channels it needs 28²·25·192·32 ≈ 120.4 M multiply–adds. With a 1 × 1 reduction to 16 it needs 28²·(192·16 + 25·16·32) ≈ 12.4 M, 9.7 times less.

  • Naive module: without reductions, the pooling branch passes all 192 input channels through, so 3a would output 64 + 128 + 32 + 192 = 416 channels, and every later module would output more.

  • Auxiliary classifiers: during training, losses from two side classifiers (on 4a and 4d) are added with weight 0.3: L = L_main + 0.3(L_aux1 + L_aux2).

📝 Quick check (Level 1)
0/3 answered
  1. 1. Output channels of module 3a:
  2. 2. Saving from the 1 × 1 reduction on 3a's 5 × 5 branch:
  3. 3. Auxiliary losses are weighted by…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.

Inception in code

Exercise 1.

  • Module 3a turned a 192-channel input into 256 channels, all non-negative after ReLU.
  • It had exactly 163,696 parameters.
  • Same-padded 3 × 3 max pooling behaved as expected at the borders.

Practice.

  • torchvision’s googlenet adds BatchNorm after every convolution and, because of a long-standing quirk in the reference implementation, uses 3 × 3 in place of 5 × 5 in the third branch. It has 6.6 M parameters and is a reasonable lightweight backbone.
  • The auxiliary classifiers are used only in training and discarded at test time. Later work (Inception v3) found they act mainly as regularisers.
  • The original training used asynchronous SGD with momentum 0.9, reducing the learning rate by 4% every 8 epochs, with Polyak averaging of the weights.
  • The competition entry averaged 7 models over 144 crops per image.
model = torchvision.models.googlenet(weights="IMAGENET1K_V1")   # aux classifiers off at inference
🐍 Exercise 1: an Inception module
Implement the four-branch Inception module and check module 3a's shape and parameter count.
📝 Quick check (Level 2)
0/3 answered
  1. 1. Auxiliary classifiers are used…
  2. 2. torchvision's GoogLeNet adds…
  3. 3. The competition entry averaged…

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

Why parallel branches. Objects and their parts appear at many scales. A module that offers several receptive fields at once lets each layer pick the useful mixture. The authors motivated this by Arora et al.’s analysis of sparse networks: approximate an optimal sparse structure by dense, hardware-friendly blocks of different sizes.

Why reductions are essential. Concatenation means output channels are the sum of the branches. A pooling branch preserves its input channels, so without a projection the width can only grow from module to module. The expensive 3 × 3 and 5 × 5 branches then run on ever wider inputs, and compute explodes (exercise 2). A 1 × 1 reduction before each expensive branch, and a 1 × 1 projection after pooling, keep both width and cost under control.

Training a deep network before BatchNorm. At 22 layers, gradients to early layers were weak. The auxiliary classifiers inject gradient into the middle of the network and add regularisation.

Global average pooling. As in NiN (E8-5), the network ends with global average pooling, a dropout layer and one linear layer. The authors reported that this gave 0.6% better top-1 accuracy than fully connected layers.

📝 Quick check (Level 3)
0/3 answered
  1. 1. Without projections, module width…
  2. 2. Auxiliary classifiers help by…
  3. 3. GAP instead of fc layers improved top-1 by about…

Level 4: Expert

★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.

What do the 1 × 1 reductions buy?

History.

  • C. Szegedy et al. (2015) introduced GoogLeNet, which won ILSVRC 2014 classification with 6.67% top-5 error. The name honours LeNet; “Inception” comes from the film’s “we need to go deeper”.
  • S. Arora et al. (2014) analysed sparse deep representations, the stated theoretical motivation.
  • S. Ioffe and C. Szegedy (2015) introduced BatchNorm with Inception v2, and later versions followed (E8-7).

Exercise 2. This is a cost calculation, not a training run. It computes the channels, parameters and multiply–adds of GoogLeNet’s nine Inception modules (on the stem’s 192 × 28 × 28 output) with the paper’s widths, in two versions:

  • with the 1 × 1 reductions;
  • “naive” modules: 1 × 1, 3 × 3 and 5 × 5 directly on the input, plus a pooling branch that passes its channels through.
modules parameters multiply–adds channels after 3a → 5b
with 1 × 1 reductions 5,849,136 1.10 G 256 → 1,024
naive 92,456,592 12.09 G 416 → 4,944
  • The naive network would cost 11 times more compute and 16 times more parameters. Its width grows by the whole input at every module, and its 3 × 3 and 5 × 5 branches run on that growing width.
  • The largest single cost is module 4e’s, 3.3 G multiply–adds in the naive version against 0.17 G with reductions.
  • This shows only cost, not accuracy. Whether reductions hurt accuracy is an empirical question. The paper’s result is that the reduced network won the competition at about 1.5 G multiply–adds in total.
🐍 Exercise 2 (research): what do the reductions buy?
Compute the channels, parameters and multiply–adds of GoogLeNet's Inception modules with and without 1 × 1 reductions.

Inception in AI, robotics and aerospace

  • Efficient perception: Inception-style multi-branch blocks appear in detectors for aerial imagery, where objects vary greatly in size.
  • Transfer learning: Inception v3 features (E8-7) were widely used for medical, agricultural and remote-sensing classification.
  • Design lesson: budgeting compute per block, rather than stacking ever wider layers, guides network design for embedded hardware.

References

  1. C. Szegedy et al. (2015). “Going deeper with convolutions.” Proc. CVPR.
  2. S. Arora, A. Bhaskara, R. Ge, T. Ma (2014). “Provable bounds for learning some deep representations.” Proc. ICML.
  3. M. Lin, Q. Chen, S. Yan (2014). “Network in network.” Proc. ICLR.