An image classifier can accept far more inputs than there are plausible images. A 28 × 28 array of pixel values has an enormous number of possible configurations, but only a tiny, structured portion looks like a handwritten digit. That portion is a data manifold: a lower-dimensional subspace that, nearby, resembles a line or surface. section 5.1.2
Moving between handwritten digits
Slightly change a recognizable digit and it will usually remain recognizable. Digits can also be connected by sequences of small changes that pass through digit-like images, though shapes near class boundaries may be ambiguous. This does not mean that averaging the pixels of two digits produces a valid digit: a path along the manifold differs from a straight line through the surrounding input space. section 5.1.2
Figure 5.8 Difference between linear interpolation and interpolation on the latent manifold. Every point on the latent manifold of digits is a valid digit, but the average of two digits usually isn’t.
Compare straight-line interpolation with interpolation on the latent manifold; the figure shows why a pixel average need not be a valid digit. section 5.1.2
This structure helps explain generalization. A neural network can fit even randomly shuffled labels, so fitting training samples alone is not enough. Useful generalization comes from approximating the data’s latent manifold and interpolating between sufficiently nearby training samples. It depends on dense coverage of the relevant inputs; predictions can stop making sense when inputs move far from what the model has seen. section 5.1.2 section 5.5
Think of two colored sheets crumpled together: each sheet is a class, and successive neural-network layers transform the tangled shape until the classes are easier to separate. Feature engineering offers another route—choose a representation that makes the latent manifold smoother and simpler. For a clock image, extracting hand-tip coordinates and then hand angles makes the task much easier. section 2.3.6 section 5.4.2
Rule of thumb: include the variations on which a model must perform in its training data; data augmentation can help capture anticipated variations. Manifold-based interpolation supports local generalization, not reliable adaptation to substantially novel situations or every kind of algorithmic reasoning. section 19.2.2 section 19.2


