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

Inception v2/v3/v4, Inception-ResNet

After GoogLeNet, the Inception family refined the module. Inception v2 added batch normalisation and replaced 5 × 5 convolutions with two 3 × 3s. Inception v3 factorised n × n convolutions into 1 × n followed by n × 1, reduced grids efficiently, and introduced label smoothing. Inception v4 and Inception-ResNet added residual connections, which sped up training. This page covers each refinement and its cost saving. In the exercises you check that a 1 × 3 then 3 × 1 pair equals a rank-1 3 × 3 kernel, then measure how separable real kernels are: learned 3 × 3 kernels kept only 82% of their energy in their best rank-1 approximation, which helps explain why factorisation worked in the middle of the network but not in early layers.

Level 0: Foundation

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

Cheaper bricks for the same building

The Inception team spent 2015–2016 making their modules cheaper and easier to train:

  • they normalised every layer’s outputs (batch normalisation);
  • they replaced each big 5 × 5 filter by two 3 × 3s;
  • they split a 3 × 3 filter into a 1 × 3 followed by a 3 × 1;
  • they softened the training targets so the network would not become overconfident;
  • finally they added the shortcut connections that ResNet had just introduced.

Each step kept accuracy while cutting cost or training time.

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.
GoogLeNet (Inception v1)7.01 M parameters1.58 G MACs
ResNet-5025.56 M parameters4.09 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

Inception v3 became one of the most used pretrained networks for transfer learning, in remote sensing and medical imaging among other fields. Label smoothing is now a default regulariser in vision and language models.

📝 Quick check (Level 0)
0/3 answered
  1. 1. A 3 × 3 filter can be split into…
  2. 2. Label smoothing makes targets…
  3. 3. Inception-ResNet adds…

Level 1: Beginner

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

By hand

  • 5 × 5 → two 3 × 3 (C → C): 18C² weights instead of 25C², a 28% saving, with an extra ReLU.
  • n × n → 1 × n then n × 1: 2nC² instead of n²C², saving 1 − 2/n:
    • 33% for 3 × 3;
    • 71% for 7 × 7, which Inception v3 used on its 17 × 17 grid.
  • Rank:
    • a 1 × 3 kernel a followed by a 3 × 1 kernel b equals the 3 × 3 kernel b·aᵀ, which has rank 1;
    • the Sobel kernel [[1, 0, −1], [2, 0, −2], [1, 0, −1]] = [1, 2, 1]ᵀ·[1, 0, −1] is exactly rank 1;
    • the identity matrix keeps only 1/3 of its energy at rank 1.
  • Label smoothing: with ε = 0.1 and K = 10 classes, the target is 0.91 on the true class and 0.01 on each other class. Inception v3 used ε = 0.1 with K = 1,000.
  • Efficient grid reduction: run a stride-2 convolution and a stride-2 pooling in parallel and concatenate, for example 320 + 320 = 640 channels. This halves the side without a representational bottleneck and without the cost of convolving before pooling.
📝 Quick check (Level 1)
0/3 answered
  1. 1. Saving from 7 × 7 → 1 × 7 + 7 × 1:
  2. 2. Smoothed target on the true class (ε = 0.1, K = 10):
  3. 3. A 1 × 3 then 3 × 1 kernel has rank…

Level 2: Intermediate

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

Inception refinements in code

Exercise 1.

  • A 1 × 3 then 3 × 1 convolution matched a single 3 × 3 convolution with the outer-product kernel.
  • The factorised weight counts matched 18/25 and 2/7.
  • Smoothed targets summed to 1.
  • A residual branch scaled by 0.1 added a tenth of its output.

Practice.

  • torchvision’s inception_v3 expects 299 × 299 inputs and has an auxiliary classifier used only in training.
  • Inception v3 training recipe:
    • RMSProp with decay 0.9 and ε = 1.0;
    • learning rate 0.045, decayed by 0.94 every two epochs;
    • gradient clipping at 2.0.
  • Label smoothing is built into PyTorch: nn.CrossEntropyLoss(label_smoothing=0.1).
  • In Inception-ResNet, scaling residual branches by 0.1–0.3 before adding them prevented networks with more than 1,000 filters per layer from “dying” early in training.
model = torchvision.models.inception_v3(weights="IMAGENET1K_V1")   # input 3 x 299 x 299
loss_fn = nn.CrossEntropyLoss(label_smoothing=0.1)
🐍 Exercise 1: factorisation and label smoothing
Count factorised weights, implement a 1 × n then n × 1 convolution, label smoothing and a scaled residual.
📝 Quick check (Level 2)
0/3 answered
  1. 1. Inception v3's input size:
  2. 2. PyTorch label smoothing:
  3. 3. Inception-ResNet scaled residuals by…

Level 3: Advanced

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

Theory

Design principles stated in the Inception v3 paper:

  • avoid representational bottlenecks, so the representation shrinks gently from input to output;
  • higher-dimensional representations are easier to process locally;
  • spatial aggregation can be done on lower-dimensional embeddings with little loss, because neighbouring outputs are strongly correlated;
  • balance width and depth.

When factorisation works. A 1 × n then n × 1 pair with Cmid channels between and a nonlinearity can represent much more than a rank-1 kernel. It is still a constraint. The authors found it worked poorly in early layers and well on medium grids (12 to 20 pixels). Exercise 2 shows that individual learned 3 × 3 kernels are far from rank 1, about 18% of their energy lying outside the best rank-1 fit.

Label smoothing as regularisation.

  • With one-hot targets, cross-entropy keeps pushing the true-class logit up without bound, encouraging overconfidence and large weights.
  • Smoothed targets have a finite optimum: the logit gap log((1 − ε + ε/K)/(ε/K)).
  • The cost: smoothing removes information from the penultimate features, which can hurt transfer learning and knowledge distillation (Müller, Kornblith and Hinton, 2019).

Residual Inception. Adding identity shortcuts (E8-8) to Inception blocks made training markedly faster. Final accuracy depended more on model size than on the residuals: Inception-v4, without residuals, matched Inception-ResNet-v2.

📝 Quick check (Level 3)
0/3 answered
  1. 1. Factorisation worked poorly in…
  2. 2. With label smoothing the optimal logit gap is…
  3. 3. Residual connections in Inception mainly…

Level 4: Expert

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

How separable are 3 × 3 kernels?

History.

  • S. Ioffe and C. Szegedy (2015) introduced batch normalisation and BN-Inception (Inception v2), reaching 4.8% top-5 error with an ensemble.
  • C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens and Z. Wojna (2016) introduced Inception v3, with factorisation, label smoothing and efficient grid reduction: 5.6% top-5 for a single model and 3.5% for an ensemble.
  • C. Szegedy, S. Ioffe, V. Vanhoucke and A. Alemi (2017) introduced Inception-v4 and Inception-ResNet: 3.08% top-5 with an ensemble.
  • M. Jaderberg, A. Vedaldi and A. Zisserman (2014) sped up trained CNNs by low-rank approximation of their filters.

Exercise 2. For three families of 3 × 3 kernels, we measure the share of each kernel’s energy (sum of squared entries) captured by its best rank-1 approximation, which is the best single 1 × 3 then 3 × 1 pair, and by its best rank-2 approximation:

  • 2,000 random Gaussian kernels;
  • 2,000 edge detectors (Gaussian derivatives) at random angles;
  • the 16 kernels learned by the small digit network of E8-1.
3 × 3 kernels rank-1 energy rank-2 energy share at least 95% rank-1
random Gaussian 0.745 0.971 0.025
edge at random angle 0.814 1.000 0.272
learned (E8-1 network) 0.815 0.984 0.188
  • Learned kernels are not close to rank 1. On average 18% of their energy is outside the best single 1 × 3 then 3 × 1 pair, little better than random kernels.
  • Edges at arbitrary angles are exactly rank 2. A derivative of a Gaussian is the sum of an x-part and a y-part, so two pairs represent it perfectly. Only horizontal and vertical edges are rank 1.
  • Implication. Replacing a first-layer 3 × 3 convolution by one 1 × 3 then 3 × 1 per channel would distort it. Inception v3 instead factorised mid-network convolutions, where many channels and a nonlinearity between the halves give the pair more freedom, and it reported poor results in early layers. Seeds 1 and 2 of the learned network gave rank-1 fractions of 0.81 and 0.77.
🐍 Exercise 2 (research): how separable are 3 × 3 kernels?
Measure how much of each kernel's energy a 1 × 3 then 3 × 1 factorisation can capture, for random, oriented and learned kernels.

Inception refinements in AI, robotics and aerospace

  • Transfer learning: Inception v3 features were widely fine-tuned for remote-sensing scene classification and plant and crop disease detection from drone images.
  • Low-rank acceleration: separable and low-rank filter approximations speed up networks on embedded processors with little accuracy loss when applied to suitable layers.
  • Calibration: label smoothing reduces overconfidence, which matters when a robot acts on predicted probabilities.

References

  1. S. Ioffe, C. Szegedy (2015). “Batch normalization: accelerating deep network training by reducing internal covariate shift.” Proc. ICML.
  2. C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, Z. Wojna (2016). “Rethinking the Inception architecture for computer vision.” Proc. CVPR.
  3. C. Szegedy, S. Ioffe, V. Vanhoucke, A. A. Alemi (2017). “Inception-v4, Inception-ResNet and the impact of residual connections on learning.” Proc. AAAI.
  4. M. Jaderberg, A. Vedaldi, A. Zisserman (2014). “Speeding up convolutional neural networks with low rank expansions.” Proc. BMVC.
  5. R. Müller, S. Kornblith, G. Hinton (2019). “When does label smoothing help?” Advances in NeurIPS.