liveBook · Manning

Spatial hierarchy

As explained in Deep Learning with Python, Third Edition

A layered organization of features in which deeper layers represent patterns over increasingly large spatial extents of the input.

A spatial hierarchy organizes visual understanding from small, local patterns to larger and more abstract structures. In a ConvNet, early convolution layers detect features such as edges; later layers combine them into textures, parts, and whole objects. Because the same local patterns can appear anywhere, this layered organization supports translation-invariant recognition. section 8.1.1

From edges to cats

Imagine recognizing a cat. Small patterns such as lines and textures combine into parts such as eyes or ears, which combine into the high-level concept of a cat. Downsampling helps successive layers see increasingly large portions of the original image instead of keeping high-level features confined to tiny windows. section 8.1.1 section 8.1.2

Use these rules when structuring a convolutional model:

  • Stack convolution layers to build increasingly complex patterns from earlier feature maps. section 8.1.1
  • Downsample with max pooling, convolution strides, or average pooling so information becomes less spatially distributed and more concentrated in channels. section 8.1.2
  • Avoid removing downsampling when the task requires high-level features to cover the whole input. section 8.1.2
Figure 8.2 The visual world forms a spatial hierarchy of visual modules: elementary lines or textures combine into simple objects such as eyes or ears, which combine into high-level concepts such as “cat.”
visual hierarchy hires

Visualize how elementary lines and textures combine into object parts and high-level concepts. section 8.1.1

How Deep Learning with Python, Third Edition covers it

How deep it goes
Explains layer-wise feature composition and downsampling, but defers detailed architectural treatment of pretrained networks.
Examples
Uses edges, textures, eyes, ears, cats, MNIST digits, and an ImageNet-trained model reused for furniture classification.
What you can do after
Apply it via ConvNet design choices that enlarge spatial coverage while preserving useful visual information.
How it connects
Connects convolution, feature maps, max pooling, downsampling, pretrained models, feature extraction, and fine-tuning.

Also explained in

Compare how 2 books explain spatial hierarchy →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Deep Learning with Python, Third Edition. The section links point to the parts of the book it draws on.