Advanced Machine Learning

21: Convolutional Neural Networks

Schedule (you are here )

# date topic description
124-Aug-2026Introduction
226-Aug-2026Foundations of learningDrop/Add
331-Aug-2026PAC learnabilityHW1
402-Sep-2026Linear learning models
507-Sep-2026Labor Day HolidayHoliday
609-Sep-2026Principal Component AnalysisProject ideas
714-Sep-2026Curse of DimensionalityHW2, HW1 due
816-Sep-2026Bayesian Decision Theory
921-Sep-2026Parameter estimation: MLE
1023-Sep-2026Parameter estimation: MAP & NBfinalize teams
1128-Sep-2026Logistic RegressionHW3, HW2 due
1230-Sep-2026Kernel Density Estimation
1305-Oct-2026Support Vector Machines
1407-Oct-2026Matrix Factorization
1512-Oct-2026* MidtermExam, HW3 due
1614-Oct-2026k-means clustering
1719-Oct-2026Invited: Intro to Causal Learning I
# date topic description
1821-Oct-2026Invited: Intro to Causal Learning II
1926-Oct-2026* Mid-point projects checkpointHW4, P
2028-Oct-2026Expectation Maximization
2102-Nov-2026Stochastic Gradient Descent
2204-Nov-2026Automatic Differentiation
2309-Nov-2026Nonlinear embedding approachesHW5, HW4 due
2411-Nov-2026Model comparison & calibration
2516-Nov-2026Convolutional Neural Networks
2618-Nov-2026Word Embedding
2723-Nov-2026Thanksgiving BreakHoliday
2825-Nov-2026Thanksgiving BreakHoliday
2930-Nov-2026* Final ExamExam
3002-Dec-2026Project Final PresentationsHW5 due, P
3107-Dec-2026No classClasses End
3216-Dec-2026Project Reportsdue
3317-Dec-2026Grades due 5 p.m.PAWS

Outline for the lecture

  • Why Convolutions? Inductive Biases & Equivariance
  • History of CNNs (1962–2012)
  • Building Blocks & Convolution Arithmetic
  • Skip Connections, Gates & Loss Landscapes
  • Fully Convolutional Networks, U-Net & 3D MeshNet
  • Generative, Geometric & Modern ConvNets (2016–2026)

Connecting the Dots: Why Structured Architectures?

1. Curse of Dimensionality & Dense Parameter Wall
A $256 \times 256 \times 3$ image has $d = 196{,}608$ inputs — one dense layer of $10^3$ units needs $197\text{M}$ weights and breaks if objects shift!
2. Localized Kernels & Inner-Product Templates
Sliding a small learnable filter over space evaluates local template similarity everywhere with $O(k^2)$ shared weights.
3. Reverse-Mode AD & Stochastic Optimization
Shared weights fan out across pixels, so Speelpenning's AD sums spatial gradients — trained cleanly via SGD, AdamW, and skip highways.
4. Deep Model Generalization & Calibration
Last lecture we compared LeNet-5 vs. ResNet-110 calibration; today we open the hood on how deep ConvNets work.
5. Today: Convolutional Neural Networks
Locality, Toeplitz weight sharing, translation equivariance, residual highways, dense segmentation & modern ConvNeXt!
# date topic
402-Sep-2026Linear learning models
714-Sep-2026Curse of Dimensionality
9–11Sep 2026MLE, MAP & Logistic Regression
1230-Sep-2026Kernel Density Estimation
1305-Oct-2026Support Vector Machines
14–20Oct 2026Matrix Fact., K-Means & EM
2102-Nov-2026Stochastic Gradient Descent
2204-Nov-2026Automatic Differentiation
2309-Nov-2026Nonlinear embedding approaches
2411-Nov-2026Model comparison & calibration
2516-Nov-2026Convolutional Neural Networks

Why Convolutions?

Replacing brute-force dense connectivity with locality, weight sharing, and shift equivariance.

Why Dense Layers Fail on Visual Signals

Suppose we feed a $256 \times 256$ RGB image ($\vec{x} \in \RR^{196{,}608}$) into a single dense hidden layer of $1{,}000$ units:
  • Parameter Explosion: $196{,}608 \times 1{,}000 \approx \mathbf{1.97 \times 10^8}$ weights in layer 1 alone!
  • Zero Shift Generalization: Moving a cat 3 pixels right routes through completely different weights.
  • Spatial Locality Ignored: Neighboring pixels and opposite corners are treated identically.
Dense MLP (O(N²) params) Every output sees every pixel uniquely 20 distinct weights here Conv Layer (O(k²) params) Local window + shared color weights Only 3 shared weights (w₋₁, w₀, w₊₁)!
Convolutions encode two structural priors: spatial locality and stationarity (shared detectors).

From Dense Matrix to Toeplitz Weight Sharing

A 1D convolution $\vec{y} = \bm{K}\vec{x}$ is simply a linear map $\vec{y} = \bm{W}\vec{x}$ with two constraints on $\bm{W}$:
1. Dense Matrix W (N×N) w₁₁ w₁₂ w₁₃ w₁₄ w₁₅ w₂₁ w₂₂ w₂₃ w₂₄ w₂₅ w₃₁ w₃₂ w₃₃ w₃₄ w₃₅ w₄₁ w₄₂ w₄₃ w₄₄ w₄₅ w₅₁ w₅₂ w₅₃ w₅₄ w₅₅ 25 independent parameters Locality 2. Locally Connected (k=3) w₁₁ w₁₂ 0 0 0 w₂₁ w₂₂ w₂₃ 0 0 0 w₃₂ w₃₃ w₃₄ 0 0 0 w₄₃ w₄₄ w₄₅ 0 0 0 w₅₄ w₅₅ Zeros outside kernel width Sharing 3. Toeplitz Conv Matrix b c 0 0 0 a b c 0 0 0 a b c 0 0 0 a b c 0 0 0 a b Only 3 shared params (a, b, c)!
Reverse-Mode AD Link (Lecture 18): Because $(a,b,c)$ fan out across rows in $\bm{W}\vec{x}$, backprop sums gradients over space: $\displaystyle \frac{\partial {\cal L}}{\partial w_u} = \sum_i \frac{\partial {\cal L}}{\partial y_i} x_{i+u}$ and $\displaystyle \frac{\partial {\cal L}}{\partial \vec{x}} = \bm{W}^\top \frac{\partial {\cal L}}{\partial \vec{y}}$!

Discrete Convolution vs. Cross-Correlation

1. Convolution ($*$): flips kernel $180^\circ$
$(I * K)[i,j] = \sum_{u,v} I[i - u,\, j - v]\, K[u, v]$
2. Cross-Correlation ($\star$): DL Conv default
$(I \star K)[i,j] = \sum_{u,v} I[i + u,\, j + v]\, K[u, v]$
Why DL skips the flip: Since $\bm{K}$ is learned, $\bm{K}$ vs. $\bm{K}_{\text{flip}}$ span the exact same hypothesis space — and the flipped kernel $*$ reappears automatically in $\bm{W}^\top$ during backprop!

Translation Equivariance vs. Invariance

Let $T_{\Delta}$ shift an image by $\Delta = (\Delta_x, \Delta_y)$: $[T_{\Delta}\bm{X}]_{i,j} = X_{i-\Delta_x,\, j-\Delta_y}$.
$\displaystyle \big((T_{\Delta}\bm{X}) \star \bm{K}\big)[i,j] = \sum_{u,v} X_{i - \Delta_x + u,\, j - \Delta_y + v}\, K_{u,v} = \big[T_{\Delta}(\bm{X} \star \bm{K})\big]_{i,j}$
Translation Equivariance: T(X ⋆ K) = (TX) ⋆ K Input X Shift T Shifted T(X) ⋆ K Shifted Feature Map Essential for segmentation & object detection! Approximate Invariance: f(TX) ≈ f(X) Pool / GAP Same Class: "Cat" (p = 0.96) Pooling & Global Avg Pooling discard position for classification.

History of CNNs

From cat visual cortex (1962) to Neocognitron (1980), LeNet (1998), and ImageNet GPUs (2012).

Cat Visual Cortex: Hubel & Wiesel (1962)

cat's brain
fukushima

Fukushima's Neocognitron (1979 / 1980)

neocognitron
waibel

Time Delay Neural Network: Waibel et al. (1989)

tdnn
lecun

Backprop-Trained CNN: LeCun et al. (1989)

cnn 1989
lecun

LeNet-5 for Document Recognition (1998)

lenet
Alternating Conv $\to$ Subsample hierarchy, deployed to read millions of handwritten checks in production.
ciresan

GPU CNNs + MaxPooling: Cireşan et al. (2011)

gpunet
Alex Krizhevsky

AlexNet & the ImageNet Breakthrough (2012)

alexnet
Ingredients: ReLU activations, dual GPUs, overlapping MaxPool, data augmentation & Dropout — slashing ImageNet Top-5 error from $26.2\%$ to $15.3\%$.

CNN Building Blocks

Convolving a 2D Kernel Across an Image

convolution 1
$$ \bm{K} = \left( \begin{array}{ccc} 0 & 1 & 2 \\ 2 & 2 & 0 \\ 0 & 1 & 2 \end{array} \right) $$
convolution 2 flat convolution

Zero Padding, Stride & Output Geometry

same pad
Same Padding: $p = \lfloor k/2 \rfloor$ preserves $H \times W$
full pad
Full Padding: $p = k - 1$ expands output size
Unified 2D Output Shape Formula (kernel $k$, padding $p$, stride $s$, dilation $d$):
$H_{\text{out}} = \left\lfloor \frac{H_{\text{in}} + 2p - d(k - 1) - 1}{s} \right\rfloor + 1$

Convolution Arithmetic & Shift Equivariance

Click output cells or kernel weights, vary p/s/d, and drag Δx/Δy to test translation equivariance.
Shape: 9×9 → 9×9 Params: 10 vs 6,561

Multi-Channel Tensors & Volumetric Convolution

Mapping $\bm{X} \in \RR^{C_{\text{in}} \times H \times W} \to \bm{Y} \in \RR^{C_{\text{out}} \times H' \times W'}$ uses a 4D filter tensor $\boldsymbol{\mathcal{W}} \in \RR^{C_{\text{out}} \times C_{\text{in}} \times k \times k}$:
$\displaystyle Y_{m, i, j} = b_m + \sum_{c=1}^{C_{\text{in}}} \sum_{u,v} X_{c,\, i+u,\, j+v}\, \mathcal{W}_{m, c, u, v} \qquad \text{Parameters} = C_{\text{out}}\,(C_{\text{in}}\, k^2 + 1)$
3D kernel across channels
Each filter spans all $C_{\text{in}}$ input channels (or 3D depth)
Stack of C_out filters
$C_{\text{out}}$ distinct filters produce $C_{\text{out}}$ feature maps

Spatial Pooling: Max vs. Average

max pooling anim max pooling flat
MaxPool: keeps strongest feature activation in window
average pooling
AvgPool: smooth spatial summary (or Global Avg Pool at top)
Downsampling shrinks memory and grows receptive fields — at the cost of fine spatial localization!

What Do Learned Channels Detect?

Original input
Input Image
Raw RGB pixels
Layer 1 filters
Layer 1 (Conv + Pool)
Edges & color blobs
Layer 2 features
Layer 2 (Pooled Grid)
Corners & textures
Layer 3 features
Layer 3 (Deep Pooled)
Object parts & wholes
Alternating convolutions and pooling build a hierarchy from pixels → edges → textures → semantic object parts!

From Feature Maps to Class Predictions

1. Flatten + Dense MLP Head (AlexNet / VGG)
$7 \times 7 \times 512 \to 4096 \to 1000$ classes.
Uses 102.7M parameters ($74\%$ of VGG-16!) and locks network to a fixed input resolution.
2. Global Average Pooling + Linear Head (ResNet)
$\displaystyle \bar{z}_c = \frac{1}{HW}\sum_{i=1}^H \sum_{j=1}^W F_{c, i, j}$, then $\text{softmax}(\bm{W}\bar{\vec{z}} + \vec{b})$.
0 pooling parameters, natural regularizer, works on arbitrary $H \times W$!
VGG-16 Style: Flatten → Dense 4096 → 1000 7×7×512 25,088 4,096 102.7M weights! Modern Style: Global Avg Pool → Linear 1000 H×W×512 GAP 1×1×512 W ∈ ℝ¹⁰⁰⁰ˣ⁵¹² 0.5M weights (200× less!)

1×1 Convolution: Per-Pixel Channel MLP

At each pixel $(i,j)$, apply a shared linear map across channels:
$\vec{y}_{i,j} = \bm{W}\vec{x}_{i,j} + \vec{b}, \qquad \bm{W} \in \RR^{C_{\text{out}} \times C_{\text{in}}}$
1x1 volumetric convolution
Channel Mixing & Bottlenecks:
Shrink $256 \to 64$ before $3\times 3$ convs ($\sim 9\times$ fewer FLOPs) and combine cross-channel features cheaply.
one convolution
gif upconv

Transposed Convolution (Upconvolution)

upconv
Forward strided conv multiplies by sparse Toeplitz $\bm{W}$:
Upconv multiplies by $\bm{W}^\top$ (exact backward operator!)
$H_{\text{out}} = (H_{\text{in}} - 1)s - 2p + k$
  • Not mathematical deconvolution ($\bm{W}^{-1}$), just learnable spatial upsampling!
  • Checkerboard trap: if $k$ is not divisible by $s$, uneven overlaps create artifacts (fix: resize + conv).

Dilated Convolution: Exponential Context

dilated convolution
Insert $d-1$ zeros between kernel taps — keeping only $k^2$ weights!
$R_{\ell} = R_{\ell-1} + (k_{\ell} - 1)\, d_{\ell} \prod_{m < \ell} s_m$
  • $d = 1, 2, 4, 8 \implies$ RF grows exponentially ($3 \to 7 \to 15 \to 31$).
  • Preserves full $100\%$ spatial resolution without pooling or skip-buffer RAM!

Receptive Field Growth: Pooling vs. Dilation

Compare plain 3×3 stacks, strided pooling encoders, and exponential dilation (d = 1, 2, 4, 8). Click the output grid to move the neuron!
RF: 31×31 Out: 32×32 3D Cost: 72.5K (~600)

Live CNN Layer-by-Layer Simulator

Summary: Eight Core CNN Primitives

1. Shared Kernel Conv: Toeplitz weight sharing ($\sim k^2$ params) + translation equivariance.
2. Padding ($p$) & Stride ($s$): Valid/Same/Full border control & downsampling geometry.
3. Multi-Channel 4D Tensors: Every output filter mixes all $C_{\text{in}}$ input channels.
4. Pooling & GAP: Spatial downsampling & parameter-free class-head aggregation.
5. $1 \times 1$ Convolution: Per-pixel channel MLP for bottleneck compute savings.
6. Transposed Conv ($\bm{W}^\top$): Learnable spatial upsampling (watch checkerboard artifacts).
7. Dilated Conv ($d$): Exponential receptive field at full spatial resolution.
8. End-to-End Composition: Hierarchies from Gabor edges $\to$ parts $\to$ semantics.

Skip Connections

How identity shortcuts unlock 100+ layer networks via Reverse-Mode AD.

The Depth Paradox & Dark Knowledge

Why couldn't we train deep plain nets before 2015?
  • Degradation Paradox: Deeper plain nets had higher training error — an optimization barrier, not overfitting!
  • Mimic Nets & Dark Knowledge (2014–15): Train a thin student on a shallow teacher's softened probabilities (same Temperature $T$ from Lecture 20!): $$q_i = \frac{\exp(z_i / T)}{\sum_j \exp(z_j / T)}$$
  • FitNets (2015): Intermediate feature hints let deep thin nets train — but still needed two-stage teacher distillation!
Dark knowledge shadow of the vampire

Highway Networks: Learned Carry Gates (May 2015)

  • $$\vec{y} = H(\vec{x}, \bm{W}_H) \odot T(\vec{x}, \bm{W}_T) + \vec{x} \odot C(\vec{x}, \bm{W}_C)$$
  • Tie carry gate $C = 1 - T$ with sigmoid transform gate $T(\vec{x}, \bm{W}_T) = \sigma(\bm{W}_T \vec{x} + \vec{b}_T)$: $$\vec{y} = H(\vec{x}, \bm{W}_H) \odot T(\vec{x}, \bm{W}_T) + \vec{x} \odot \big(1 - T(\vec{x}, \bm{W}_T)\big)$$
  • $$\vec{y} = \begin{cases} \vec{x} & \text{if } T(\vec{x}, \bm{W}_T) = 0 \quad (\text{pure identity skip!}) \\ H(\vec{x}, \bm{W}_H) & \text{if } T(\vec{x}, \bm{W}_T) = 1 \quad (\text{nonlinear transform}) \end{cases}$$
  • Key Initialization Trick: set gate bias $\vec{b}_T \ll 0$ so $T \approx 0$ at step 0 and gradients flow freely!

Training 100 Layers with Highway Gates

Train models with 100+ layers directly end-to-end instead of collapsing past 10–20! Highway networks depth scaling

Residual Networks: The Identity Highway (Dec 2015)

Drop the learned gate completely ($C \equiv 1, T \equiv 1$): learn residual $\mathcal{F}(\vec{x}) = \mathcal{H}(\vec{x}) - \vec{x}$!
$\vec{x}_{\ell+1} = \vec{x}_\ell + \mathcal{F}(\vec{x}_\ell, \bm{W}_\ell) \implies \vec{x}_L = \vec{x}_\ell + \sum_{k=\ell}^{L-1} \mathcal{F}(\vec{x}_k, \bm{W}_k)$
$\displaystyle \frac{\partial {\cal L}}{\partial \vec{x}_\ell} = \frac{\partial {\cal L}}{\partial \vec{x}_L}\!\left(\underbrace{\bm{I}}_{\text{Direct AD Highway!}} + \;\frac{\partial}{\partial \vec{x}_\ell}\sum_{k=\ell}^{L-1}\mathcal{F}(\vec{x}_k, \bm{W}_k)\right)$
Zero extra gate parameters; paired with BatchNorm for stable activations across 152+ layers.
resnet block

ResNet Architecture & Overcoming Degradation

resnet whole resnet perf
56-layer Plain Net fails on training error; 56-layer ResNet beats 20-layer easily!

How Skip Connections Smooth the Loss Landscape

loss landscape
Filter-normalized 2D slices of ResNet-56 (Li et al., 2018): skip connections turn a chaotic terrain into a smooth, well-conditioned basin.

Deep Gradient Flow: Plain vs. Highway vs. ResNet

Sweep network depth L, Highway gate bias b_T, and weight scale σ_w to watch Reverse-Mode AD gradient norms across 100 layers.
Layer-1 Grad — Plain: 10^-7.0 Highway: 10^-0.5 ResNet: 10^0.3

DenseNet: How Channel Concatenation Stays Small

densenet architecture
ResNet adds: $\vec{x}_\ell = \vec{x}_{\ell-1} + \mathcal{F}_\ell(\vec{x}_{\ell-1})$
DenseNet concatenates: $\vec{x}_\ell = \mathcal{H}_\ell\!\big([\vec{x}_0, \vec{x}_1, \dots, \vec{x}_{\ell-1}]\big)$
Channel count grows linearly ($C_\ell = C_0 + \ell g$), so raw weights would grow as $O(L^2 g^2)$ — 3 tricks tame it:
1. Tiny Growth Rate ($g = 12\text{–}32$): Each layer only emits $g$ new channels instead of wide $256\text{–}512$ maps!
2. $1\times 1$ Bottleneck (DenseNet-B): Compresses all $C_\ell$ concatenated channels down to $4g$ before each $3\times 3$ conv ($4g \to g$).
3. Transition Layers (DenseNet-C): Between blocks, $1\times 1$ conv ($\theta = 0.5$) + AvgPool halves channels ($C \to 0.5C$).

DenseNet Effect: Loss Landscape & Efficiency

DenseNet vs no-skip loss landscape
Dense connections keep the loss surface smooth and convex-like (Li et al., 2018) while reusing all prior feature maps — cutting parameters by $\sim 3\times$ at equal accuracy!

Fully Convolutional Networks

Predicting dense $H \times W$ pixel labels directly with convolutions.

Semantic Segmentation: Dense Per-Pixel Prediction

Semantic segmentation task
Map $\bm{X} \in \RR^{C \times H \times W} \to \hat{\bm{Y}} \in \Delta_K^{H \times W}$: classify every pixel simultaneously via per-pixel cross-entropy or Dice loss.

Replacing Dense Layers with Convolutions

cc 1 cc 2 cc 3

Fully Convolutional Network & Multi-Scale Skip Fusion

FCN skip fusion FCN examples
Takeaway: When input and target share spatial geometry, keep everything convolutional and fuse coarse semantic + fine boundary layers!

Segmentation with Twists

U-Net, the 3D memory wall, and pure dilated MeshNet in the browser.
Olaf Ronneberger
Olaf Ronneberger

Encoder–Decoder Standard: U-Net & 3D V-Net (2015)

U-Net / V-Net architecture

The 3D U-Net Parameter & Memory Wall

3D U-Net diagram U-Net parameters
23.5M parameters + $O(N^3)$ skip tensors force 80 GB GPUs or subcube patching!

3D Brain Segmentation & FreeSurfer Benchmark

Brain segmentation tasks FreeSurfer segmentation
FreeSurfer: gold-standard atlas pipeline (hours per CPU scan)
Alex Fedorov
Alex Fedorov

MeshNet: Pure Dilated 3D Segmentation

MeshNet dilated architecture MeshNet parameter comparison
  • 72,516 vs. 23,523,355 parameters (>320× fewer than 3D U-Net)!
  • ~600 KB vs. ~2 GB model footprint — zero pooling, zero skip buffers.
  • Trained directly on T1 MRI volumes with FreeSurfer labels.

MeshNet: Subvolume Training & Full-Brain Inference

MeshNet pipeline MeshNet example output

MeshNet: Outperforming Teacher, U-Net & Multimodal

Better than teacher
Denoises teacher errors
Multimodal input channels
Multimodal MRI channels
MeshNet vs U-Net
Higher Dice at 1/300th size
Multi-subject empirical regularization lets a compact 3D FCN even beat noisy training masks!
T1 MRI vs. FreeSurfer vs. MeshNet — 3D Segmentation Comparison (2017)

Zero-Footprint 3D Brain Segmentation in Browser

Advanced & Modern CNNs

Causal autoregressive masks, deformable sampling, depthwise separability & modern frontier roles.

Autoregressive Factoring & Masked Convolutions

Turn image generation into exact chain-rule density estimation in raster-scan order: $\quad \displaystyle p(\bm{x}) = \prod_{i=1}^{H \cdot W} p(x_i \mid x_1, \dots, x_{i-1})$
5×5 Raster Patch at xᵢ xᵢ Green = allowed past (pre-xᵢ) Gray = future (masked to 0) Mask A (Layer 1: center = 0) 1 1 1 1 0 0 0 0 0 Mask B (Layers ≥ 2: center = 1) 1 1 1 1 1 0 0 0 0
  • Multiply kernel weights by binary mask $\bm{M}$: $\bm{W}_{\text{causal}} = \bm{W} \odot \bm{M}$ strictly zeroes connections from future pixels.
  • Why Mask A vs. Mask B? Layer 1 must block center pixel $x_i$ itself so the model cannot predict $x_i = x_i$ trivially; deeper layers can read center features via Mask B!
  • RGB channels: Mask B also masks $R \to G \to B$ sequentially at the same pixel.

PixelCNN: Parallel Training & Blind-Spot Fix

Training ($O(1)$ Passes) vs. Sampling ($O(HW)$ Passes)
Training: Because ground truth $\bm{x}$ is known, one masked conv pass evaluates all $H \cdot W$ conditionals in parallel!
Sampling: Must generate one pixel at a time left-to-right, top-to-bottom.
The Blind-Spot Bug & Gated V+H Fix
Stacking $3\times 3$ Mask B kernels leaves an upper-right triangular blind spot of past pixels unreachable by $x_i$.
Gated PixelCNN pairs a Vertical Stack (rows above) with a Horizontal Stack (current row left).
Naive 3×3 Stack: Blind Spot! xᵢ Blind Spot (?) Upper-right past is never seen! Gated V + H Stack: Fixed! Vertical Stack (All Upper Rows) Horiz xᵢ 100% of past context captured! tanh(W_f*x) ⊙ σ(W_g*x)

WaveNet: Causal Dilated Audio at ≥ 16 kHz

16 kHz audio
16,000 raw waveform samples per second
WaveNet causal dilated stack
1D causal dilated convolutions ($d = 1, 2, 4, 8 \dots$)
$p(\bm{x}) = \prod_{t=1}^T p(x_t \mid x_1, \dots, x_{t-1})$ over thousands of audio steps via exponentially dilated 1D stacks!

WaveNet: Conditioned Text-to-Speech Comparison

Model "The blue lagoon..."
Parametric
Concatenative
WaveNet
Model "English poetry and..."
Parametric
Concatenative
WaveNet
Unconditioned WaveNet babbling (pure raw waveform model):

Deformable Convolutions: Learned Sampling Offsets

deformable convolution diagram
Augment fixed grid offsets $\vec{p}_n$ with learned fractional shifts $\Delta\vec{p}_n$:
$y(\vec{p}_0) = \sum_{\vec{p}_n \in \mathcal{R}} w(\vec{p}_n)\, x(\vec{p}_0 + \vec{p}_n + \Delta\vec{p}_n)$
  • A tiny conv branch predicts $2k^2$ offsets $(\Delta x_n, \Delta y_n)$ from the feature map.
  • Bilinear interpolation evaluates $x$ at fractional coordinates — making $\nabla_{\Delta\vec{p}_n}$ smooth for AD!
deformable sampling demo

Causal Masked & Deformable Receptive Fields

Explore PixelCNN causal Mask A/B & blind-spot elimination, or switch to Deformable Conv to rotate/scale the receptive field!

Modernizing ConvNets: Separable Convolutions & ConvNeXt

Factorize spatial filtering from channel mixing (MobileNet / Xception):
$\displaystyle \frac{\text{DW}\,(k^2 C_{\text{in}}) + \text{PW}\,(C_{\text{in}} C_{\text{out}})}{\text{Std}\,(k^2 C_{\text{in}} C_{\text{out}})} = \frac{1}{C_{\text{out}}} + \frac{1}{k^2} \approx \mathbf{\frac{1}{9}}$
  • ConvNeXt (Liu et al., CVPR 2022): modernize ResNet with ViT tricks — $7\times 7$ depthwise conv, $4\times$ inverted bottleneck, GELU & LayerNorm.
  • Pure ConvNets match or beat Swin Transformers while keeping translation equivariance!
ConvNeXt Block vs. Standard Conv 1. 7×7 Depthwise Conv Wide spatial context 1 filter per channel (groups=C) 2. 1×1 Inverted MLP C → 4C → GELU → C LayerNorm (replaces BatchNorm) + Identity Skip Connection (ResNet Highway) ImageNet-1K Top-1 Accuracy @ ~4.5G FLOPs ResNet-50: 76.5% | Swin-T ViT: 81.3% | ConvNeXt-T: 82.1%

Convolutions Across Frontier AI (2020–2026)

1. Diffusion U-Nets
Time- & text-conditioned residual U-Nets with spatial self-attention denoise latent grids in DDPM and Latent Diffusion Models.

Ho et al. (2020); Rombach et al. (CVPR 2022)
2. 3D Medical Imaging
On $256^3$ ($16.7\text{M}$ voxel) MRIs, quadratic attention is prohibitive — self-configuring nnU-Net, SynthSeg & dilated MeshNet / Brainchop lead.

Isensee et al. (Nat. Methods 2021); Billot et al. (2023)
3. Sequence & SSM Hybrids
Short 1D causal depthwise convolutions sit inside modern State-Space Models (Mamba) & neural audio codecs.

Next lecture: Word Embedding & sequence representations!
Whenever data lives on regular 1D, 2D, or 3D grids, local equivariant convolutions remain indispensable.

Take Home Points

  • Inductive Biases Beat Brute Force: Spatial locality + Toeplitz weight sharing cut dense $O(H^2 W^2)$ parameters to $O(k^2)$ and guarantee translation equivariance $T_{\Delta}(\bm{X} \star \bm{K}) = (T_{\Delta}\bm{X}) \star \bm{K}$.
  • Convolution Geometry & Receptive Fields: Output dimension obeys $\lfloor (H_{\text{in}} + 2p - d(k-1) - 1)/s \rfloor + 1$; pooling sacrifices spatial resolution, whereas dilated convolutions grow context exponentially ($2^\ell$) at full resolution.
  • Skip Connections Tame Reverse-Mode AD: Highway gates ($b_T \ll 0$) and ResNet identity shortcuts ($\vec{x} + \mathcal{F}(\vec{x})$) inject $+\bm{I}$ into the backward Jacobian, smoothing loss landscapes across $100+$ layers.
  • Dense Prediction Without Dense Layers: $1\times 1$, transposed ($\bm{W}^\top$), and dilated convolutions enable resolution-agnostic FCNs, encoder–decoder U-Nets, and $320\times$ leaner 3D MeshNets (Brainchop).
  • Modern Versatility: Causal masks (PixelCNN / WaveNet), learned fractional offsets (Deformable Conv), and depthwise-separable blocks (ConvNeXt, Diffusion U-Nets, SSMs) keep convolutions central to AI.