Skip to content
AI.info

Deep architectures

Designing Convolutional Stages

Design and reason about convolutional stages by tracking spatial resolution, channel capacity, receptive field, aliasing, and feature reuse.

By the end you can

Begin with a shape ledger, not a block diagram

A convolutional architecture is easier to evaluate when every stage declares height, width, channels, stride, and receptive-field growth. Attractive diagrams often hide destructive compression or an unplanned activation-memory spike.

The ledger also clarifies interfaces. A detection head, skip connection, or decoder needs exact spatial and channel contracts, not the vague claim that it receives “deep features.”

One column of that ledger is more treacherous than the rest. Receptive field, as normally computed, is a geometric upper bound. It is the set of input pixels that could in principle reach a unit. What actually reaches it is much smaller. Luo and colleagues measured the real contribution in 2016 and found a Gaussian falloff. On the CamVid segmentation network they examined, a 505×505 theoretical window carried an effective diameter of about 100 pixels at initialisation. A stage plan that reads its receptive-field column as a promise of usable context is reading the wrong number. Keep the ledger anyway. It is what makes the discrepancy visible at all.

A CNN design is a sequence of tensor contracts whose geometry must remain auditable.

Case

Table 1 of the residual-network paper prints geometry and cost on one page

Table 1 of the residual-network paper is exactly such a ledger. A 224 by 224 crop goes through five named stages, and the output grids are 112, 56, 28, 14 and 7. The table prints the block stacked at each stage and how many times. Then it closes with one arithmetic row: 1.8, 3.6, 3.8, 7.6 and 11.3 billion FLOPs for the 18, 34, 50, 101 and 152-layer variants. He and colleagues put geometry and cost on the same page. That is what makes a stage plan arguable instead of decorative.

Notice what the table does not print. It gives the grid at every stage and the price of every variant. It says nothing about how much of each unit's nominal window carries weight. That is the quantity the next section measures. It turns the jump from 18 to 152 layers into a smaller purchase than the FLOPs row suggests.

Figure

A stage ladder spends resolution to buy depth, and the bottleneck block makes each extra layer cheaper than the last. Both rows are Table 1 of “Deep Residual Learning for Image Recognition”.

Visual

A conventional stage hierarchy

The pattern is common. A stem, then a high-resolution stage learning edges and short motifs, then middle stages trading positions for channels and context, then a low-resolution stage holding semantic combinations, then a task head that pools, decodes or fuses according to the output geometry. The five ResNet grids of 112, 56, 28, 14 and 7 are one instance of it.

But each transition creates a tradeoff. The two that follow are the ones with published price tags: what depth actually buys in usable context, and what stride costs in sampling stability.

FigureProcess · 5 steps
  1. 1

    Stem

    Convert raw input into an initial feature grid while controlling early information loss.

  2. 2

    High-resolution stage

    Learn edges, textures, and short motifs with many spatial positions.

  3. 3

    Middle stages

    Trade some resolution for wider channels and broader context.

  4. 4

    Low-resolution stage

    Represent semantic combinations with fewer positions and larger receptive fields.

  5. 5

    Task head

    Pool, decode, or fuse features according to the output geometry.

Comparison

Three ways to expand context

Stride or pooling reduces the number of spatial positions. It expands the receptive field quickly and cuts later activation cost, at the risk of aliasing and lost detail. Dilation spaces the kernel taps without shrinking the grid. More local layers grow context through repeated mixing, keeping regular neighbourhoods and adding nonlinear transformations. All three enlarge access. But they alter computation and information differently, and two of the three have measured exchange rates.

Depth is the one most often overestimated. The window a unit nominally sees and the window it actually uses are not the same size. Luo and colleagues named the gap in 2016: “We introduce the notion of an effective receptive field, and show that it both has a Gaussian distribution and only occupies a fraction of the full theoretical receptive field.” Because the impact of input pixels inside the window is Gaussian-distributed, the effective receptive field grows only as O(√n) with the number of stacked layers. The theoretical one grows linearly, so the effective share shrinks at O(1/√n). Their measured log-domain slopes were 0.56 for the ERF size and −0.43 for the ERF/theoretical ratio. On a CamVid segmentation ResNet with 16 residual blocks and 4 stride-2 subsamplings, a theoretical receptive field of 505×505 pixels delivered an ERF diameter of only about 100 pixels at initialisation, reaching roughly 150 by the end of training. Four times the nominal window buys twice the usable one. Budget depth in √n.

Dilation has its own discount, and it has a name. Panqu Wang and colleagues called it “gridding” in 2018, and described it plainly: “as zeros are padded between two pixels in a convolutional kernel, the receptive field of this kernel only covers an area with checkerboard patterns - only locations with non-zero values are sampled, losing some neighboring information.” With a 3×3 kernel at rate r=2, only 9 of the 25 pixels in the covered region are actually read. At least 75% of the information in the region is discarded. Repeated equal dilation r leaves the contributing locations at most (w′×h′)/r² of the layer below.

The cost is measurable on one backbone. Their Cityscapes validation accuracy without CRF runs 72.9% mIoU with no dilation, 75.0% for Dilation-conv, 75.4% for Dilation-RF and 76.4% for Dilation-bigger. Zhengyang Wang and Shuiwang Ji confirmed the artifact independently in 2018. Degridding alone lifted a DeepLabv2 baseline on PASCAL VOC 2012 val from 75.1% to 75.4% mIoU, and from 71.7% to 72.3% without COCO pre-training. Spreading the taps is not free. You pay for the reach in samples you never read.

FigureComparison · 3 columns

Stride or pooling

Reduce the number of spatial positions.

  • Expands receptive field quickly
  • Cuts later activation cost
  • Risks aliasing and lost detail
  • Useful when exact localization is secondary

Dilation

Space kernel taps without reducing grid size.

  • Preserves output resolution
  • Expands theoretical coverage
  • Can create gridding patterns
  • Useful for dense prediction

More local layers

Grow context through repeated mixing.

  • Keeps regular neighborhoods
  • Adds nonlinear transformations
  • Costs depth and activations
  • Useful when gradual abstraction helps

Example

The same input supports different stage plans

The output contract determines where resolution should be retained, and dense prediction is where that contract bites hardest. Yu and Koltun built a backbone around exactly that in 2016: “The architecture is based on the fact that dilated convolutions support exponential expansion of the receptive field without loss of resolution or coverage.” Their 10-layer Cityscapes variant, Dilation10, scored 68.7% mean class IoU on the validation set and 67.1% on the test set. The Cityscapes paper lists the same 67.1% for the method independently, where it is the best-performing baseline. A stage plan scored by the benchmark's own authors is a different kind of claim from a stage plan defended by its diagram.

  • Image classification: aggressive downsampling can be acceptable once the object remains recognizable at coarse scale.
  • Small-defect inspection: early stride may erase a two-pixel crack before any later layer can recover it.
  • Speech spectrogram tagging: asymmetric kernels can respect different time and frequency scales.
  • Volumetric imaging: three-dimensional convolutions capture local depth context but create steep memory costs.
  • High-resolution segmentation: a 7-layer context module of 3×3 convolutions, dilations 1, 1, 2, 4, 8, 16, 1, reaches a 67×67 receptive field while the output grid never shrinks. Added to Yu and Koltun's front end it raised PASCAL VOC-2012 validation mean IoU from 69.8% to 71.3% (Basic) and 72.1% (Large).

Analogy

Changing map scale during an investigation

A regional investigation moves between street maps, district maps, and a national map. Coarser maps reveal large routes but cannot recover the exact doorway omitted when the map was coarsened.

Learned feature channels can preserve summaries that are not present in ordinary maps. Downsampling is irreversible unless detail travels through another path.

The analogy breaks in one instructive place. A map's stated scale tells you what it resolves. A stage's stated receptive field does not. The 505×505 window that behaved like about 100 pixels is a map whose legend and whose ink disagree.

Resolution changes what evidence remains addressable, not merely how large the tensor appears.

Steps

Build a stage plan from the output backward

Backward design prevents the backbone from discarding evidence needed by the head. State the smallest relevant structure the model must preserve. Set the final resolution the classification, localization or dense output requires. Allocate downsampling events only after sufficient local evidence has been encoded. Budget channels and memory where abstraction demands capacity, while monitoring activations. Then verify every intermediate tensor and interface with executable shape assertions.

Two of those steps should be costed with published numbers, not intuition. When step one sets a context target, size it against the effective receptive field and not the theoretical one. Depth is a slow way to buy reach. Growth goes as O(√n), and the CamVid network reached only about 150 pixels of effective diameter after training inside a 505×505 nominal window. When step three places a dilation schedule instead of a stride, cost the gridding: 9 of 25 taps at r=2, and a schedule change on one fixed backbone running from 72.9% mIoU to 75.0%, then 75.4%, then 76.4%.

FigureProcess · 5 steps
  1. 1. State the smallest relevant structure

    Measure the minimum object, event, or motif the model must preserve.

  2. 2. Set the final required resolution

    Choose the grid needed by classification, localization, or dense output.

  3. 3. Allocate downsampling events

    Place stride only after sufficient local evidence has been encoded.

  4. 4. Budget channels and memory

    Widen stages where abstraction demands capacity, while monitoring activations.

  5. 5. Verify with shape tests

    Assert every intermediate tensor and interface in executable tests.

Key idea

Stride is a sampling decision

Subsampling a changing signal without suitable low-pass behavior can fold high-frequency structure into misleading lower-frequency patterns. Learned filters may reduce this problem. Architecture alone does not guarantee adequate anti-aliasing.

Test controlled translations and fine patterns when downsampling is central to the design. Benchmark accuracy can conceal instability caused by phase and sampling effects, and the size of what it conceals has been measured. Azulay and Weiss reported it in 2019: “We show that the chance that a CNN output on a randomly chosen image will change after translating downward by a single pixel can be as high as 30%.” The measurement covers six pretrained ImageNet networks — Keras VGG16, ResNet50 and InceptionResNetV2, and PyTorch VGG16, ResNet50 and DenseNet121 — with 1,000 images each and four one-pixel perturbation protocols. They attribute the instability to downsampling that ignores the sampling theorem. That is a test a reader can run. Shift the input by one pixel and count how often the top-1 label moves.

The signal-processing case was made independently the same year. Richard Zhang reached the same diagnosis in 2019: “modern convolutional networks are not shift-invariant, as small input shifts or translations can cause drastic changes in the output”, because “commonly used downsampling methods, such as max-pooling, strided-convolution, and average-pooling, ignore the sampling theorem”. Naively inserting a low-pass filter degrades performance, which is why the fix went unused. Integrated correctly it is compatible with those same components. Rect-2, Tri-3 and Bin-5 filters raised ResNet50's shift consistency by +0.8%, +1.7% and +2.1% respectively. More than doubling the depth to ResNet101 bought only +0.6%. Accuracy rose by +0.7% to +0.9% at the same time, which suggests the filter is doing regularisation as well. A filter bought more stability than the extra layers did.

Downsampling should be reviewed as signal processing, not only as a compute shortcut.

Convolution extends beyond two-dimensional images

A one-dimensional causal convolution can model audio, telemetry, or token sequences without reading future positions. Dilation expands temporal history while preserving parallel training across known sequences. The same arithmetic that gives a 67×67 window at unchanged grid size in two dimensions gives long history at unchanged sample rate in one. It carries the same gridding liability, since a rate-r schedule reads only its non-zero taps along the time axis too.

Three-dimensional convolution couples two spatial axes with time or depth. It captures local motion or volumetric structure. But activation cost grows rapidly, and temporal sampling becomes an architectural assumption.

Kernel dimensionality should match the axes where local translation and shared structure are credible.

A stage can be too narrow, too wide, or simply misplaced

Channel count is not a universal proxy for information. Too few channels can create a bottleneck. Excessive width at high resolution can exhaust memory without improving the relevant representation.

Ablate stage depth, width, and transition location separately. Compound changes make it impossible to know whether gains came from context, capacity, regularization, or compute. The published ablations show how much rides on the isolated variable. Hold the backbone fixed and change only the dilation schedule: Cityscapes validation mIoU moves from 72.9% to 76.4%. Hold the architecture fixed and change only the downsampling filter: ResNet50's shift consistency moves by up to +2.1%, against +0.6% for doubling the depth. Neither number would have been legible from a run that changed two things at once.

Treat stage geometry as a set of testable hypotheses rather than a decorative architecture diagram.

Key takeaways