5.1 CNN Architecture Landscape

AlexNet, VGGNet, GoogLeNet, ResNet, DenseNet, SENet, NASNet and the evolution of deep image classifiers

Contents
1. ImageNet and the Deep Learning Revolution 2. AlexNet (2012) 3. ZFNet (2013) 4. VGGNet (2014) 5. GoogLeNet / Inception v1 (2014) 6. ResNet (2015) 7. ResNet Variants and Inception Extensions 8. DenseNet (2016) 9. NASNet (2017) 10. Other Notable Architectures 11. Chronological Summary Interactive: ResNet Block Walkthrough Flashcards

1. ImageNet and the Deep Learning Revolution

The ImageNet Large Scale Visual Recognition Challenge (ILSVRC) began in 2010 and served as the primary benchmark driving the modern deep learning era. It features 1000 object categories, 1.2 million training images, 50K validation images, and 150K test images. Performance is measured by Top-1 and Top-5 error rates.

Definition — Top-1 vs. Top-5 Error
Top-1 error: The model's single highest-probability prediction must match the ground truth label.
Top-5 error: The ground truth label must appear among the model's 5 highest-probability predictions.

Historical Top-5 Error Progression

YearModelTop-5 Error (%)Notes
2010NEC America28.2Shallow ensemble
2011Xerox25.8Shallow ensemble
2012AlexNet15.3 (ens.)First deep learning winner
2013ZFNet14.7Visualization-guided design
2014VGGNet6.8 (ens.)Deeper, uniform 3×3 kernels
2014GoogLeNet6.67Inception modules
2015ResNet3.57 (ens.)Surpassed estimated human level
Human (Karpathy)5.1Estimated human-level
2017SENet3.79Channel attention
2017NASNet3.8Neural architecture search
2018AmoebaNet3.7Evolutionary search
2018AutoAugment3.52Learned augmentation
ImageNet Top-5 error rates by year and architecture
Top-5 error on ImageNet ILSVRC over time. AlexNet (2012) caused the inflection. ResNet (2015) crossed the estimated human threshold.
Key insight
Deep learning (single model) surpassed shallow ensembles starting in 2012. By 2015 ResNet surpassed human-level performance. More data — even weakly labeled (e.g., Instagram) — consistently improves performance further.
Classification accuracy scaling with data
Classification accuracy scaling with data: ResNeXt-101 with and without large-scale Instagram pretraining. Weakly supervised data at scale dramatically improves accuracy.

2. AlexNet (2012)

AlexNet (Krizhevsky, Sutskever, Hinton) was the breakthrough architecture that launched the deep learning revolution in computer vision, winning ILSVRC 2012 with a margin of nearly 11 percentage points over the runner-up.

Architecture

Five convolutional layers followed by three fully connected layers:

AlexNet architecture diagram
AlexNet architecture showing the dual-GPU split and layer progression from 224×224×3 input to 1000-class softmax output.

Key Innovations

InnovationDetails
ReLU activationsApplied after every conv and FC layer; trains ~6x faster than tanh
Data augmentationRandom 224×224 crops from 256×256, horizontal flips, PCA color jitter
DropoutApplied in FC layers with rate 0.5 to reduce overfitting
GPU trainingTrained on two GPUs with grouped convolutions
Local Response NormalizationBefore MaxPool in layers 1 and 2; rarely used today
Parameters
Approximately 60 million parameters total; the vast majority reside in the fully connected layers, not the convolutional layers.

3. ZFNet (2013)

ZFNet (Zeiler and Fergus, "Visualizing and Understanding Convolutional Networks") improved AlexNet by using deconvolution-based visualization to understand what each layer learns, guiding architectural changes.

ZFNet architecture
ZFNet architecture with 7×7 kernels and stride 2 in Conv1, correcting the aliasing seen in AlexNet's 11×11 stride-4 filters.
PropertyAlexNetZFNetReason
Conv1 kernel11×117×7Captures mid-range frequencies missed by 11×11
Conv1 stride42Eliminates aliasing in feature maps

The visualization methodology was ZFNet's primary contribution, providing the field with interpretability tools that guided subsequent architecture design. Top-5 error: 14.7%.

4. VGGNet (2014)

VGGNet (Simonyan and Zisserman) demonstrated that depth with small uniform kernels was the key to better performance. It uses only 3×3 convolutions throughout the entire network.

Receptive Field Equivalence

The central insight: stacking small kernels achieves the same receptive field as a single large kernel but with fewer parameters and more non-linearities.

Receptive Field Formula
$n$ stacked 3×3 layers have the same receptive field as a single $(2n+1) \times (2n+1)$ kernel.
Stacked 3×3 layersEquivalent single kernelParameters (per channel)Non-linearities
25×5$2 \times 9 = 18$ vs. $25$2 vs. 1
37×7$3 \times 9 = 27$ vs. $49$3 vs. 1
VGGNet architecture
VGGNet architecture: stacked 3×3 convolution blocks with max-pooling between groups and three fully connected layers at the end.

VGG16 / VGG19 Structure

VGG16 (16 weight layers): 2×Conv-64 → Pool, 2×Conv-128 → Pool, 3×Conv-256 → Pool, 3×Conv-512 → Pool, 3×Conv-512 → Pool, FC-4096, FC-4096, FC-1000 → Softmax.

StrengthsWeaknesses
Simple, uniform architecture~138 million parameters (VGG16)
Demonstrated depth mattersSlow to train; high memory usage
Excellent transfer learning backboneMost parameters wastefully in FC layers

Top-5 error: 7.5% (single model), 6.8% (ensemble).

5. GoogLeNet / Inception v1 (2014)

GoogLeNet (Szegedy et al., "Going Deeper with Convolutions") introduced the Inception module: instead of choosing a single kernel size, apply multiple kernel sizes in parallel and concatenate the results. 22 layers deep with only ~5 million parameters.

Inception Module

Naive version (and why it fails)

The naive inception module applies 1×1, 3×3, 5×5 convolutions and 3×3 max-pooling in parallel, then concatenates. The problem: concatenating all outputs explodes the number of feature maps and hence parameters/computation.

The solution: add 1×1 bottleneck convolutions before the expensive 3×3 and 5×5 operations to first reduce the channel dimension.

Inception module naive and with dimensionality reduction
(a) Naive inception module and (b) inception module with 1×1 bottleneck convolutions for dimensionality reduction. The 1×1 convolutions dramatically cut computation.

Full Architecture

GoogLeNet full architecture
GoogLeNet: stacked inception modules, auxiliary classifiers at two intermediate points, and final average pooling before softmax.
Key insight
GoogLeNet achieved better accuracy than VGG (~6.67% vs. ~6.8% top-5 error) with 28x fewer parameters (~5M vs. ~138M). The combination of multi-scale inception modules, 1×1 bottlenecks, and average pooling instead of FC layers is responsible.

6. ResNet (2015)

ResNet (He et al., "Deep Residual Learning for Image Recognition") solved the degradation problem that had prevented very deep networks from training effectively.

The Degradation Problem

In very deep plain networks, adding more layers causes accuracy to saturate and then decrease — even the training error increases. This is not overfitting and not underfitting in the conventional sense. A 56-layer plain network has higher training error than a 20-layer network.

Degradation problem in deep networks
The degradation problem: the 56-layer plain network has higher training and test error than the 20-layer network. Adding depth hurts performance without residual connections.

Residual Learning

Instead of learning the desired mapping $H(\mathbf{x})$ directly, learn the residual $F(\mathbf{x}) = H(\mathbf{x}) - \mathbf{x}$:

Residual Block Output
$$\mathbf{y} = F(\mathbf{x}) + \mathbf{x}$$ where $\mathbf{x}$ is the input (identity shortcut), $F(\mathbf{x})$ is the learned residual, and $\mathbf{y}$ is the block output.

Why it works:

  1. Easy identity mapping: If a layer is not needed, the network sets $F(\mathbf{x}) \approx 0$, making the block an identity function. This is easy to learn.
  2. Gradient highway: The identity shortcut provides a direct path for gradients to flow back through the network, alleviating vanishing gradients.
  3. Ensemble interpretation: ResNets can be viewed as an ensemble of many shorter networks.
Residual block with skip connection
Residual block: the skip connection bypasses the stacked weight layers, adding the input $\mathbf{x}$ to the learned residual $F(\mathbf{x})$.

Residual Block Variants

Basic and bottleneck residual blocks
Left: basic residual block (two 3×3 convolutions) for ResNet-18/34. Right: bottleneck block (1×1 reduce, 3×3 process, 1×1 restore) for ResNet-50/101/152.
VariantLayersParametersBlock type
ResNet-1818~11.7MBasic (3×3, 3×3)
ResNet-3434~21.8MBasic
ResNet-5050~25.6MBottleneck (1×1, 3×3, 1×1)
ResNet-101101~44.5MBottleneck
ResNet-152152~60.2MBottleneck
Comparison of VGG-19, 34-layer plain, and 34-layer residual
Architecture comparison: VGG-19 (left), 34-layer plain network (center), 34-layer residual network (right). The residual network achieves lower error despite being the same depth as the failing plain network.

Top-5 error: 4.49% (single ResNet-152), 3.57% (ensemble) — the first architecture to surpass estimated human-level performance (5.1%).

7. ResNet Variants and Inception Extensions

7.1 ResNet Pre-activation (2016)

He et al. proposed moving BN and ReLU before the convolution (pre-activation) rather than after:

The identity shortcut becomes a truly clean path (no BN or ReLU), enabling unimpeded gradient flow. ResNet-1001 with pre-activation: test error 4.92% vs. 7.61% original on CIFAR-10.

ResNet pre-activation ordering
Pre-activation ResNet: (a) original BN-after-Conv ordering vs. (b) proposed BN-ReLU-Conv ordering. Pre-activation gives a cleaner gradient path through the shortcut.

7.2 Wide ResNet (2016)

Instead of going deeper, make the network wider (more feature maps per layer). Notation: WRN-$d$-$k$ has depth $d$ and width multiplier $k$.

Effect of width multiplier k on CIFAR error
Ablation study: increasing width multiplier $k$ at fixed depth consistently reduces CIFAR-10/100 error. A 16-layer wide network can match very deep thin networks.

7.3 Inception v2 and v3

Szegedy et al. ("Rethinking the Inception Architecture") proposed two factorizations:

Step 1: Replace 5×5 with two stacked 3×3

Two stacked 3×3 convolutions have the same receptive field as one 5×5 but use fewer parameters ($2 \times 9 = 18$ vs. 25 per channel pair) and add an extra non-linearity.

Inception v2: factorized 5x5
Original 5×5 branch (left) replaced by two stacked 3×3 convolutions (right).
Step 2: Asymmetric factorization (n×n into 1×n and n×1)

A 3×3 convolution can be factorized into a 1×3 followed by a 3×1 convolution, reducing computation by ~33%.

Asymmetric factorization
Asymmetric factorization: $n \times n$ into $1 \times n$ then $n \times 1$ convolutions.

Inception v3 = Inception v2 + RMSprop optimizer + label smoothing regularization + factorized 7×7 in the stem + batch-normalized FC before auxiliary classifier.

Inception v3 full architecture
Inception v3: stacked Inception-A (35×35), Inception-B (17×17), and Inception-C (8×8) blocks with reduction layers between stages.

7.4 Inception v4 and Inception-ResNet (2016)

Inception v4 introduced a cleaner, more uniform inception architecture. Inception-ResNet v1/v2 adds residual connections on top of inception blocks, enabling faster convergence.

Inception-ResNet-A module
Inception-ResNet-A module: three parallel branches combined via a 1×1 linear projection, then added to the input via a residual connection.

7.5 ResNeXt (2016)

ResNeXt (Xie et al.) introduces a new dimension: cardinality (the number of parallel transformation paths). The block follows a split-transform-aggregate pattern.

ResNeXt Block — 32×4d
Split 256-d input into 32 groups of 4 channels, apply 1×1→3×3→1×1 convolutions within each group, then sum all 32 outputs. Same FLOPs as ResNet-50, but better accuracy.
ResNet vs ResNeXt block
ResNet-50 bottleneck block (left) vs. ResNeXt-50 (32×4d) block (right). ResNeXt splits into 32 parallel paths of width 4, equivalent to grouped convolutions.
SettingTop-1 Error (%)
ResNet-50 (1×64d)23.9
ResNeXt-50 (32×4d)22.2
ResNet-101 (1×64d)22.0
ResNeXt-101 (32×4d)21.2

Increasing cardinality is more effective than increasing depth or width for improving accuracy at the same computational budget.

7.6 Squeeze-and-Excitation Networks (SENet, 2017)

SENet (Hu et al.) introduces a lightweight channel attention mechanism that re-weights feature map channels based on their global importance. It can be inserted into any existing architecture.

SE Block Pipeline
Squeeze: Global Average Pooling — $z_c = \frac{1}{H \times W} \sum_{i,j} u_c(i,j)$, producing $(1 \times 1 \times C)$.
Excitation: $\mathbf{s} = \sigma(\mathbf{W}_2 \cdot \delta(\mathbf{W}_1 \cdot \mathbf{z}))$ (two FC layers, reduction ratio $r=16$).
Scale: $\tilde{\mathbf{x}}_c = s_c \cdot u_c$ — channel-wise multiplication.
SE block pipeline
SE block: (1) transformation (standard conv), (2) squeeze via global average pooling, (3) excitation via two FC layers with sigmoid, (4) channel-wise scaling.
SE-ResNet module
Standard ResNet block (left) vs. SE-ResNet block (right). The SE branch adds channel attention at only ~10% computational overhead.
ArchitectureOriginal Top-5 (%)SE Version Top-5 (%)
ResNet-507.86.62
ResNet-1017.16.19
ResNet-1526.75.73
ResNeXt-506.05.49
VGG-169.37.58

SENet won ILSVRC 2017 with Top-5 error 3.79%.

8. DenseNet (2016)

DenseNet (Huang et al., "Densely Connected Convolutional Networks") extends ResNet's skip connections to the extreme: every layer receives feature maps from all preceding layers via concatenation.

DenseNet Layer Input
$$\mathbf{x}_l = H_l([\mathbf{x}_0, \mathbf{x}_1, \ldots, \mathbf{x}_{l-1}])$$ where $[\cdot]$ denotes channel-wise concatenation and $H_l$ is BN → ReLU → Conv(3×3) → Dropout.

For a network with $L$ layers there are $\frac{L(L+1)}{2}$ direct connections (vs. $L$ in a plain network).

DenseNet dense block connections
Dense block: each layer receives the concatenation of all preceding feature maps, enabling explicit feature reuse throughout the block.

Architecture Details

DenseNet full architecture
DenseNet full architecture: initial convolution, three dense blocks separated by transition layers, global average pooling, and linear classifier.

DenseNet vs. ResNet

PropertyResNetDenseNet
Connection typeAddition (residual)Concatenation (dense)
Feature reuseImplicitExplicit — all previous features available
ParametersHigherLower
FLOPsHigherLower
MemoryLowerHigher (must store all feature maps)
DenseNet vs ResNet: error vs. parameters and FLOPs
DenseNet achieves comparable accuracy to ResNet with significantly fewer parameters and FLOPs, at the cost of higher memory consumption.

9. NASNet (2017)

NASNet (Zoph et al., "Learning Transferable Architectures for Scalable Image Recognition") uses machine learning to search for optimal architectures, replacing hand-crafted design with reinforcement learning.

Search Process

NASNet search overview
NAS overview: a controller RNN samples architectures, child networks are trained to get validation accuracy $R$, and the controller is updated via REINFORCE.
  1. A controller RNN samples an architecture from the search space with probability $p$.
  2. The proposed child network is trained to obtain validation accuracy $R$.
  3. The gradient of $p$ is scaled by $R$ to update the controller (REINFORCE algorithm).
  4. Repeat: the controller gradually learns to propose better architectures.

Cell-Based Search

Rather than searching for the full architecture, NASNet searches for two types of cells:

NASNet-A normal and reduction cells
NASNet-A Normal Cell (left) and Reduction Cell (right) found by the controller RNN. These are stacked to build the full architecture.

Performance

NASNet-A performance on ImageNet
NASNet-A accuracy vs. number of operations and parameters on ImageNet. NASNet achieves better accuracy at lower compute than manually designed competitors.

10. Other Notable Architectures

SqueezeNet — AlexNet accuracy at 50x fewer parameters

SqueezeNet uses fire modules (squeeze 1×1 conv + expand mix of 1×1 and 3×3 convs) with bypass connections. AlexNet-level accuracy with ~50x fewer parameters, making it suitable for mobile/edge deployment.

SqueezeNet architecture
SqueezeNet architecture with fire modules and bypass connections between fire2–fire3 and fire4–fire5.
Xception — Depthwise separable convolutions throughout

Xception replaces all inception modules with depthwise separable convolutions: a depthwise conv (one filter per input channel) followed by a pointwise 1×1 conv to combine channels. Dramatically more parameter-efficient than standard convolutions.

MobileNet (v1/v2/v3) — Mobile-optimized architectures

Hand-crafted architectures optimized for mobile devices using depthwise separable convolutions. MobileNet v2 introduces inverted residuals (expand channels, apply depthwise conv, compress back) and linear bottlenecks (no ReLU at the narrow end to preserve information).

Capsule Networks — Routing by agreement

Proposed by Hinton et al. Key differences from standard CNNs: (1) vector output (capsules) instead of scalar activation — magnitude represents probability of entity existence, orientation represents entity properties. (2) Routing by agreement instead of max-pooling, preserving spatial relationships between object parts. (3) Potentially requires less training data.

Capsule network architecture
Capsule network: Conv1 extracts local features, PrimaryCaps creates capsule vectors, DigitCaps uses routing by agreement to classify.

11. Chronological Summary and Design Paradigms

YearArchitectureKey InnovationTop-5 Error (%)Parameters
2012AlexNetReLU, dropout, GPU training15.3~60M
2013ZFNetVisualization-guided design, smaller first filters14.7~60M
2014VGGNetStacked 3×3 convolutions, uniform depth6.8~138M
2014GoogLeNetInception modules, 1×1 bottlenecks, avg pooling6.67~5M
2015ResNetResidual connections, identity shortcuts3.5725–60M
2016Inception v2/v3Factorized convolutions, asymmetric kernels
2016DenseNetDense connectivity via concatenationLower than ResNet
2016Wide ResNetWidth multiplier — wider beats deeper5.79 (top-5)Varies
2016ResNeXtCardinality (grouped convolutions)~25M
2017SENetChannel attention (squeeze-and-excitation)3.79+10%
2017NASNetNeural architecture search with RL3.8Varies
2018AmoebaNetEvolutionary architecture search3.7Varies

Design Paradigm Evolution

EraApproachExamples
2012–2014Make it deeperAlexNet → ZFNet → VGG
2014–2015Make it smarter (multi-scale, residual)GoogLeNet, ResNet
2015–2016Refine the building blocksInception v2/v3, DenseNet, Wide ResNet, ResNeXt, SE
2017+Learn the architecture itselfNASNet, AmoebaNet, ENASNet
Key recurring themes
1×1 convolutions are crucial bottleneck layers for dimensionality reduction.
Batch normalization is essential for stable training of deep networks.
Residual connections solve the degradation problem and enable training very deep networks.
Width vs. depth: Wider networks can match deeper ones with fewer layers (Wide ResNet).
Channel attention (SE blocks) provides a cheap accuracy boost for any architecture.

Flashcards