Quant Memo
Core

Receptive Fields and Dilation

The receptive field is how far back in the input a single output value can 'see' — and dilation is a trick for growing that view fast, without adding layers or losing resolution.

Prerequisites: Convolutional Neural Networks, One-Dimensional Convolutions for Price Series

A convolutional layer looking at a price series only ever sees a small local window at a time — a 3-day kernel cannot tell a pattern that started 3 days ago from one that started 30 days ago, because it never looks that far back in one step. Stack enough layers and later layers do end up depending on a wider stretch of the original input — but how wide, and how many layers to see a whole month of data? That "how far back can this one output see" question is exactly what receptive field measures, and it grows disappointingly slowly with an ordinary stack of convolutions — the problem dilation solves.

The analogy: how far can you see through a stack of fences

Imagine standing behind a series of picket fences, asking how wide a strip of the world you can see through the gaps. One fence limits your view to a narrow strip. Stack a second fence behind it and your visible strip barely widens, since you're constrained by the narrowest gap in the chain. To see a much wider strip without an impractical number of fences, space each fence's pickets further apart as you go back — the same number of pickets, spread wider, lets far more of the world behind be visible through the combined gaps. That's dilation: same kernel size, same number of layers, spaced-out taps that let each layer's field of view grow much faster.

ordinary (d=1 always) span = 9 dilated (d=1,2,4,8) span = 31
Four ordinary layers cover a 9-day span; four dilated layers with doubling gaps cover a 31-day span from the same number of layers and parameters.

Receptive field growth, layer by layer

For a stack of ordinary (non-dilated) 1D convolutions with kernel size kk, the receptive field after LL layers is:

R=1+L(k1)R = 1 + L(k-1)

In words: each layer adds (k1)(k-1) more positions to what a single output can see, so the field grows linearly with depth — to see 100 days back with kernel size 3, you'd need roughly L=50L=50 stacked layers.

Dilated convolutions fix this by inserting gaps between the kernel's taps: dilation rate dd means the kernel looks at kk positions spaced dd apart instead of consecutively. Stack layers with dilation rates that double each time (d=1,2,4,8,d=1,2,4,8,\dots) and the receptive field grows exponentially with depth instead of linearly:

R=1+(k1)i=0L12i=1+(k1)(2L1)R = 1 + (k-1)\sum_{i=0}^{L-1} 2^i = 1 + (k-1)(2^L - 1)

In words: because each layer's dilation doubles, the covered span roughly doubles per added layer, so a stack needing 50 ordinary layers to see 100 days back needs only about 6–7 dilated layers.

Worked example 1: ordinary stacking, kernel size 3

With k=3k=3, each layer adds (k1)=2(k-1)=2 to the receptive field. After L=1,2,3,4L=1,2,3,4 layers: R=3,5,7,9R=3,5,7,9. Four layers sees only 9 days back — reaching a 61-day field needs L=(611)/2=30L=(61-1)/2=30 layers.

Worked example 2: dilated stacking, kernel size 3, doubling dilation

Same kernel, dilation rates d=1,2,4,8d=1,2,4,8 across 4 layers. Using R=1+(k1)(2L1)R=1+(k-1)(2^L-1): L=1R=3L=1\to R=3, L=2R=7L=2\to R=7, L=3R=15L=3\to R=15, L=4R=31L=4\to R=31. Four dilated layers already reach a 31-day view versus 9 for four ordinary layers — and just 3 more (L=7L=7: R=255R=255) would comfortably cover a full year, something ordinary stacking needs well over 100 layers for.

Function explorer
-2260.1
x = 1.00f(x) = 2.718

The gap between linear and exponential growth above is exactly the gap between ordinary and dilated receptive-field growth — a small change in the exponent's base compounds into an enormous difference after only a handful of steps, the same reason 4 dilated layers already outpace 30 ordinary ones.

Receptive field is how much of the input one output value effectively depends on. Ordinary stacked convolutions grow it only linearly with depth; dilated convolutions — spacing the kernel's taps apart and doubling that spacing each layer — grow it exponentially, covering long price histories with far fewer layers and no loss of time resolution.

What this means in practice

Dilation is the core trick behind temporal convolutional networks used on financial time series, letting a model see months of history with a manageable number of layers while keeping every output at the same fine time resolution as the input (unlike pooling, which shrinks resolution to grow the receptive field). The tradeoff: a dilated kernel skips positions between taps, so within one layer it can miss short, sharp local patterns that fall entirely in the gaps — usually addressed by mixing in some ordinary layers, or relying on lower layers (smaller dilation) to cover short-range structure.

Practice

  1. With k=5k=5 and ordinary (non-dilated) stacking, how many layers are needed for a receptive field of at least 41?
  2. With k=5k=5 and dilation doubling each layer (d=1,2,4,d=1,2,4,\dots), how many layers are needed for the same target of at least 41?
  3. Why does pooling (shrinking resolution) also grow the receptive field, and what does dilation avoid by not shrinking resolution?

The common confusion is thinking a bigger receptive field always means "sees the input better." A wide receptive field only tells you that an output could depend on distant inputs, not that it usefully does — if the dilation gaps are too large relative to the pattern you care about, a layer can systematically miss short, important local structure entirely, since it only samples specific spaced-out positions rather than a contiguous local window. Receptive field size is a necessary condition for a model to use long-range context, not a guarantee that it does so well.

Related concepts

Practice in interviews

Further reading

  • Yu & Koltun, Multi-Scale Context Aggregation by Dilated Convolutions (2016)
  • Bai, Kolter & Koltun, An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling (2018)
ShareTwitterLinkedIn