How do you derive the recurrence for the receptive field of a stack of convolution and pooling layers with kernel sizes kl and strides sl, and what receptive field does it give for a unit in (a) a 3×3 conv with stride 2 followed by two 3×3 convs with stride 1, and (b) a 3×3 conv with stride 1, a 2×2 max-pool with stride 2, then two 3×3 convs with stride 1?

Deep learning, Convolutional networks
Level L3 Intermediate. Length Medium. Nature Th+Mat Both.

What's being asked

Whether you understand that each layer's growth is scaled by the strides before it, and can apply the recurrence including pooling.

Key idea

Let rl be the receptive field after layer l and jl the jump (input distance between neighbouring units). Start with r0=j0=1. Then rl=rl−1+(kl−1) jl−1 and jl=jl−1 sl. Pooling is a layer with its own k and s.

Steps

  1. This is the harder follow-up to `receptive-field-stacked-convs`, which comes first. Derive: a unit in layer l looks at kl neighbouring units of layer l−1. Those neighbours are jl−1 input pixels apart. So the window spans kl−1 gaps of size jl−1, and it adds (kl−1) jl−1 pixels to the field of one unit of layer l−1. This gives rl=rl−1+(kl−1) jl−1.
  2. The jump: moving one unit along layer l moves sl units along layer l−1, so jl=jl−1 sl. Strides multiply, which is why striding early makes every later layer grow the field faster.
  3. (a) Start r0=1, j0=1. Conv 3, stride 2: r1=1+2⋅1=3, j1=2. Conv 3, stride 1: r2=3+2⋅2=7, j2=2. Conv 3, stride 1: r3=7+2⋅2=11. So the receptive field is 11×11.
  4. (b) Conv 3, stride 1: r1=3, j1=1. Pool 2, stride 2: r2=3+1⋅1=4, j2=2. Conv 3, stride 1: r3=4+2⋅2=8, j3=2. Conv 3, stride 1: r4=8+2⋅2=12. So the receptive field is 12×12.
  5. Cross-check (b) backwards from one output unit, using rl−1=slrl+(kl−sl): 1→3→5 across the two last convs, then the pool gives 2⋅5+(2−2)=10, then the first conv gives 10+2=12. The answers match.
  6. Remark: this is the theoretical receptive field. The effective receptive field, where pixels really influence the output, is smaller and roughly Gaussian-shaped, with the centre pixels counting most.

Common mistakes

How long your answer should be

Half a page, about 4 minutes.

Read this

Previous in Deep learning: A network has input x=(1,2)⊤, two hidden units, and one linear output y^=a1w21+a2w22+b2. All weights and biases start at 0. The loss is 12(y^−1)2 and the learning rate is 1. What happens over two gradient-descent steps (a) with sigmoid hidden units and (b) with ReLU hidden units, and what happens to the two hidden units?
Next in Deep learning: Why do residual connections make very deep networks trainable?