The receptive field of a unit is the region of the input that can affect it. It grows with each convolution by (k − 1) times the product of earlier strides, times the dilation, so strides and dilations make it grow fast. But not all of it matters equally: the effective receptive field, where gradients actually concentrate, is roughly Gaussian and much smaller. This page covers the recursive formula, how stride and dilation change it, how to design networks to see enough context, and the effective receptive field. In the exercises you check the formula against the set of input positions that can reach one output, then show in deep random networks that the region holding 95% of the gradient grows roughly like √L rather than linearly: a third of the theoretical field at 32 layers.
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.
How much of the image can one neuron see?
A neuron in the first convolutional layer sees only a 3 × 3 patch. A neuron in the second layer sees 3 × 3 first-layer neurons, which together cover 5 × 5 pixels. Each layer widens the view; strides and dilations widen it faster. To recognise a large object, the neurons that decide must see all of it. But the pixels near the middle of that view influence the neuron far more than those at the edges.
CNN building blocks
input pixels that affect the centre output (25 × 25 window shown)
receptive field of one output: 7 × 7 input pixels · total stride 1
Deep-learning "convolution" slides a small learned kernel over the input (no flip). Stride shrinks the output, padding preserves borders, dilation spreads the kernel to see further without more weights. Pooling summarises windows. Stacking layers grows the receptive field. Depthwise-separable and grouped convolutions cut cost by not connecting every input channel to every output channel. Transposed convolution upsamples, but uneven kernel overlap leaves checkerboard patterns. Squeeze-and-excitation rescales whole channels by gates computed from their global averages; CBAM adds a per-pixel spatial gate. (Here the gates are fixed functions of the averages so you can see their effect; in a network the excitation is learned.)
Why engineers care
If the receptive field is too small, a detector cannot see whole objects or enough context (a runway needs its surroundings); if strides are used carelessly, fine detail is lost. Computing receptive fields is a routine design check for detection, segmentation and audio networks.
📝 Quick check (Level 0)
0/3 answered
1. The receptive field is…
2. Each stacked convolution…
3. Within the receptive field, influence is…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.
By hand
Recursion: r₀ = 1, j₀ = 1; for each layer, r ← r + (k − 1)·d·j, then j ← j·s, where j is the total stride so far.
Examples:
three 3 × 3 convolutions, stride 1: r = 7;
three 3 × 3, stride 2 each: r = 1 + 2 + 4 + 8 = 15, total stride 8;
3 × 3 with dilations 1, 2, 4: r = 1 + 2 + 4 + 8 = 15;
7 × 7 stride 2, then 3 × 3 stride 2, then 3 × 3 stride 1: r = 1 + 6 + 4 + 8 = 19.
Layers needed at stride 1 with k = 3 to reach r: ⌈(r − 1)/2⌉, so 112 layers for 224 pixels; striding cuts this drastically.
Total stride: five stride-2 stages give 32 (a typical backbone’s output stride).
📝 Quick check (Level 1)
0/3 answered
1. Receptive field of five stride-1 3 × 3 convolutions:
2. Receptive field of 3 × 3 convolutions with dilations 1, 2, 4, 8:
3. Total stride of five stride-2 stages:
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 20 minUndergraduate students and practising engineers.
Receptive fields in code
Exercise 1. For four layer configurations, the recursion’s receptive field (7, 15, 15 and 19) matched the span of input positions found by walking back from one output through the layers.
Practice.
Check that the final features’ receptive field covers the largest objects you need to recognise, with margin for context.
Use striding and pooling early to grow the field cheaply; use dilation or attention when resolution must be kept.
Remember that the effective field is smaller (exercise 2): global pooling, attention or very deep stacks are needed for truly global context.
Tools such as torchscan or a short script applying the recursion compute fields for real architectures.
r, j = 1, 1for k, s, d in layers: r += (k - 1) * d * j; j *= s
🐍 Exercise 1: computing receptive fields
Implement the receptive-field recursion and check it against the set of input positions that can reach one output.
📝 Quick check (Level 2)
0/3 answered
1. To keep resolution while widening the field, use…
2. The effective receptive field is…
3. Truly global context needs…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.
Theory
Effective receptive field. Luo et al. (2016) measured how much each input pixel affects a unit, via the gradient. For linear stacks of uniform kernels, the impulse response after L layers is the L-fold convolution of the kernel, which by the central limit theorem is approximately Gaussian with standard deviation proportional to √L. So the effective field grows like √L while the theoretical one grows like L; the ratio shrinks like 1/√L.
Nonlinearities and training. ReLUs gate the gradient paths but do not change this picture qualitatively; Luo et al. found training enlarges the effective field somewhat, and that skip connections and dilations can enlarge it.
Design implications. Deep networks with small kernels therefore see much less context in practice than their nominal field suggests. Large kernels (ConvNeXt, RepLKNet), dilations and attention all address this.
📝 Quick check (Level 3)
0/3 answered
1. The effective field grows like…
2. The ratio effective/theoretical shrinks like…
3. Approaches to larger effective fields include…
Level 4: Expert
★★★★★ Expert⏱ 25 minResearchers: original papers and open problems.
Theoretical versus effective receptive field
History.
D. Hubel and T. Wiesel (1959–1962) described receptive fields of visual neurons.
W. Luo, Y. Li, R. Urtasun and R. Zemel (2016) introduced the effective receptive field.
A. Araujo, W. Norris and J. Sim (2019) gave practical receptive-field computations for CNNs.
X. Ding et al. (2022, RepLKNet) revisited very large kernels to enlarge effective fields.
Exercise 2. 1-D stacks of L random 3-tap convolutions (8 channels, ReLU). The gradient of the centre output with respect to the input is averaged over 20 random networks and inputs; the table gives the width of the smallest central window holding 95% of it.
layers
theoretical field
width holding 95%
ratio
width/√L
2
5
5
1.00
3.5
4
9
9
1.00
4.5
8
17
13
0.76
4.6
16
33
19
0.58
4.8
32
65
21
0.32
3.7
For shallow stacks the whole field matters; for deep ones most of it does not: at 32 layers 95% of the influence lay within a third of the theoretical field.
The effective width grew roughly like √L (width/√L stayed between about 3.5 and 4.8).
🐍 Exercise 2 (research): theoretical versus effective receptive field
Backpropagate from one output through deep random convolution stacks and measure the width that holds 95% of the gradient.
Receptive fields in AI, robotics and aerospace
Object detection at long range: small distant objects need high resolution, large nearby ones need large fields; feature pyramids (E9-5) serve both.
Semantic segmentation of terrain needs context (is this patch road or rooftop?), hence dilated or attention-based backbones.
Audio and vibration: receptive fields in time set how far back a model can look, as in WaveNet’s dilated convolutions (E11-13).
References
W. Luo, Y. Li, R. Urtasun, R. Zemel (2016). “Understanding the effective receptive field in deep convolutional neural networks.” Advances in NeurIPS.
A. Araujo, W. Norris, J. Sim (2019). “Computing receptive fields of convolutional neural networks.” Distill.
X. Ding, X. Zhang, J. Han, G. Ding (2022). “Scaling up your kernels to 31 × 31: revisiting large kernel design in CNNs.” Proc. CVPR.
At 32 layers 95% of the gradient lay within a third of the theoretical field.
Practice
Show:
Level 0
Problem 1Level 0
Receptive field of three stride-1 3 × 3 convolutions?
7.
Problem 2Level 0
Total stride of five stride-2 stages?
32.
Problem 3Level 0
Receptive field of one 3 × 3 convolution with dilation 2?
5.
Level 1
Problem 4Level 1
Receptive field of three 3 × 3 stride-2 convolutions?
1 + 2 + 4 + 8 = 15.
Problem 5Level 1
Receptive field of 3 × 3 convolutions with dilations 1, 2, 4, 8?
31.
Problem 6Level 1
Receptive field of 7 × 7 stride 2, then 3 × 3 stride 2, then 3 × 3 stride 1?
1 + 6 + 4 + 8 = 19.
Problem 7Level 1
Stride-1 3 × 3 layers needed for a field of 224?
⌈223/2⌉ = 112.
Level 2
Problem 8Level 2
95%-width at 32 layers in exercise 2?
21.
Problem 9Level 2
Theoretical field at 32 layers?
65.
Problem 10Level 2
Ratio of effective to theoretical at 32 layers?
21/65 ≈ 0.32.
Problem 11Level 2
95%-width at 16 layers?
19.
Problem 12Level 2
Weights of three 3 × 3, 64 → 64 convolutions (field 7, no bias)?
3 × 64 × 64 × 9 = 110 592.
Problem 13Level 2
Weights of one 7 × 7, 64 → 64 convolution (same field)?
64 × 64 × 49 = 200 704.
Level 3
Problem 14Level 3
Derive the receptive-field recursion.
Suppose a unit after layer l − 1 sees r_(l−1) input pixels and neighbouring units of that layer are j_(l−1) input pixels apart (the product of earlier strides). A layer-l unit combines k units of layer l − 1 spaced d apart in that layer, which is d·j_(l−1) apart in the input. They span (k − 1)·d·j_(l−1) extra input pixels beyond one unit’s field, so r_l = r_(l−1) + (k − 1)d·j_(l−1). The new spacing is j_l = s_l·j_(l−1). ∎
Problem 15Level 3
Explain why the effective field grows like √L.
For a linear stack with non-negative kernels, the influence of input position x on the centre output is the number (weighted) of paths from x to the centre, which is the L-fold convolution of the kernel with itself. By the central limit theorem this approaches a Gaussian whose variance is L times the kernel’s variance, so its width scales as √L, while the support (theoretical field) grows linearly in L. ∎
Problem 16Level 3
Explain why stacking three 3 × 3 convolutions is preferred to one 7 × 7.
Both have a 7 × 7 receptive field. The stack has 3·9 = 27 weights per channel pair against 49, so fewer parameters (110 592 against 200 704 for 64 channels), and it applies three nonlinearities instead of one, giving more expressive functions. VGG popularised this design. ∎
Problem 17Level 3
Advise how to make sure a runway-segmentation network sees enough context at 512 × 512.
Compute the theoretical receptive field of the final features and require it to exceed the image (or the runway’s typical extent plus surroundings), remembering that the effective field is much smaller. Use an encoder with stride 16–32, dilated convolutions or an ASPP module at the bottom (E10-5), or global context through attention or pyramid pooling (E10-6). Verify by measuring gradient-based effective receptive fields on trained models. ∎
Level 4
Problem 18Level 4
95%-width at 8 layers in exercise 2?
13.
Problem 19Level 4
Ratio of effective to theoretical at 16 layers?
19/33 ≈ 0.58.
Problem 20Level 4
Total stride of three stride-2 layers?
8.
Coding practice
🐍 Code 1 (Level 1): receptive field
The recursion over (k, s, d).
🐍 Code 2 (Level 0): layers needed
⌈(r − 1)/(k − 1)⌉.
🐍 Code 3 (Level 0): total stride
Product of strides.
🐍 Code 4 (Level 1): dilated stack
1 + Σ(k − 1)d.
🐍 Code 5 (Level 1): parameters for a field
Weights of a stride-1 stack reaching the target field.
Topic test
A timed test drawn at random from this topic's question bank. Each attempt gets new questions. For a longer test across the whole chapter, see the chapter test, or mix topics in the question bag.
Receptive Field Calculation: topic test
10 questions, drawn at random from a bank of 21. Every attempt is different.
⏱ Time limit: 15 minutes. The test submits itself when time runs out.
Levels covered: 0, 1, 2, 3, 4. No hints or solutions until you submit.