Md. Asif Uddin

Chapter 11 I.11

Convolutional Neural Networks

A convolution applies one small filter at every position, because a feature's meaning does not depend on where it sits.

Weight sharing plus locality: one small detector slid everywhere.

How this chapter is built

M3Load-bearing

The content is mathematics. Understanding is demonstrated by computation, not recall.

basics3/11what the words mean
concept2/2what to picture
theory0/4why it works, and when it does not
mathematics0/15derive it, then compute it
practice0/9build it, break it, read the papers

Five strands, not one. Mathematics is the spine; the other four are the body. A chapter cannot pay its way out of teaching with problems, nor out of problems with teaching.

Before you start

The problem

A fully connected layer over a 224x224 image has fifty million parameters per unit and learns each corner of the image separately. Locality and weight sharing remove both problems at once, and the derivation is identical for any signal with a grid.

One kernel applied at every positionA six by six input grid with a three by three kernel window that moves across it, and a four by four output grid beside it. The same nine weights are used at every position, which is what weight sharing means and why the parameter count does not grow with the image.inputfeature mapsame 9 weightsSix by six in, four by four out: a 3×3 kernel with no padding loses one position at each edge.Nine weights and a bias, whatever the size of the image. A dense layer here would need over a thousand.That reuse is the locality prior, welded into the architecture rather than learned.
Fig. 11 — One kernel applied at every position. Nine weights and a bias, whatever the size of the image — the reuse is the locality prior.

What this chapter covers

  • kernels
  • convolution
  • padding
  • stride
  • pooling
  • feature maps
  • CNN architectures
  • LeNet
  • AlexNet
  • VGG
  • ResNet
  • EfficientNet

Apparatus

The mathematics this chapter leans on, held in Book 0 so it can be assumed here without being taught here. Not a gate — follow a link when a step stops making sense.

The chain rule 0.MC.03 · The chain rule for matrix products 0.MC.07 · Inner products, norms and cosine similarity 0.LA.03

Notation

  • HSpatial height in pixels
  • W (spatial)Spatial width in pixels
  • CChannels in vision; compute in FLOPs in the scaling chapters
  • WA weight matrix
  • Gradient operator
  • JA Jacobian matrix

Propositions

  1. Prop. 1A convolution is one small filter applied at every position.The same weights are used at every location, so the parameter count depends on the kernel and not on the image. That reuse is the locality prior, welded into the layer rather than learned.
  2. Prop. 2Padding and stride decide the output size, and nothing else does.One formula gives the spatial size of every convolution's output. Most shape errors in a vision pipeline are that formula applied without being read.
  3. Prop. 3A convolutional network buys range with depth.One layer sees a small window. Stacking layers widens it by a fixed amount each time, so how far a unit can see is a fact about the architecture, computable before any training.
  4. Prop. 4Pooling keeps the answer and throws away the address.Taking a maximum over a neighbourhood makes the response survive a small shift and destroys the record of where it was. Both halves of that trade are real, and one of them has to be undone for dense tasks.

Worked problems

0/5 problems0/4 variants0/10 exercisesowes 15 more

Not yet written. At M3 this chapter owes 5 worked problems across 4 distinct variants, and 10 exercises, every one with a published solution. The build enforces that from the day the chapter is marked published.