§7.14Tangent Distance · Tangent Prop · Manifold Tangent Classifier

Part II DL pp. 270–273 · ~4 min read

  • tangent distance
  • tangent prop
  • manifold tangent classifier
  • double backprop

§7.14 Regularizing along the manifold

Several of this chapter’s ideas share a hidden theme: the manifold hypothesis (§5.11.3) — data concentrates near a low-dimensional manifold, and examples on the same manifold share a class. If we know the directions of variation along that manifold (translating, rotating, or scaling an image keeps its class), we can bake that invariance directly into a model.

The earliest attempt is tangent distance : a nearest-neighbor classifier that measures distance not with the generic Euclidean metric but with the distance between the manifolds the two points lie on. Since finding the closest pair of points on two manifolds is expensive, it approximates each manifold by its tangent plane at the point and measures the distance between those planes — a small linear system. It needs the tangent vectors specified in advance.

Tangent prop (fig 7.9) carries the same idea into a neural net: add a penalty that makes each output locally invariant along the known manifold tangents. The output should not change as we move along the manifold (the class is preserved) but is free to change across it. Drag the point and toggle the two styles:

Fig 7.9 (interactive) — f should stay constant along the tangent v (invariant factor) and change along the normal; tangent prop penalizes ∇f·v infinitesimally, augmentation takes a finite step
class manifoldtangent vnormalx
Tangent prop: penalize the infinitesimal derivative Ω = (∇ₓf·v)² so f stays flat along the tangent v — without ever visiting a new point.

The classifier should be constant along the tangent (the factor of variation that keeps the class) and free to change along the normal (where the class changes).

Formally, penalize the directional derivative of ff along each tangent:

Term by term

Ω(f)=i((xf(x))v(i))2\Omega(f) = \sum_i \Big( (\nabla_{\boldsymbol{x}} f(\boldsymbol{x}))^\top \boldsymbol{v}^{(i)} \Big)^2
v(i)\boldsymbol{v}^{(i)}the known manifold tangent vectors — directions like translation, rotation, scaling that keep the class fixedinvariant dirs
(xf)v(i)(\nabla_{\boldsymbol{x}} f)^\top \boldsymbol{v}^{(i)}the directional derivative of the output along tangent i; driving it to zero makes ∇f ORTHOGONAL to the tangents — f is flat along the manifoldkill this
i()2\sum_i(\cdot)^2sum over tangent directions (and outputs), scaled by a hyperparameterthe penalty

A family of invariance regularizers

Tangent prop sits in a family. Dataset augmentation (§7.4) encodes the same prior knowledge but by taking finite steps (visiting transformed inputs) rather than an infinitesimal penalty — which is why augmentation confers resistance to larger perturbations and plays nicely with ReLU (different units activate for different transformed versions), while tangent prop’s infinitesimal approach struggles with ReLU. Two more methods drop the “known directions” requirement and instead resist change in all directions:

Invariance regularizers: which directions, and at what scale
mechanismdirectionsscale
Tangent distanceNN metric = distance between class manifolds (via tangent planes)specified tangents
Tangent proppenalize ∇f·v along known tangentsspecifiedinfinitesimal
Dataset augmentationtrain on transformed inputsspecifiedfinite
Double backproppenalize the whole Jacobian ‖∇f‖all directionsinfinitesimal
Adversarial trainingtrain f(x′)=f(x) for x′ near xall directionsfinite
Dotted-underlined cells have explanations — click one.

The symmetry is neat: dataset augmentation is the finite version of tangent prop, and adversarial training is the finite version of double backprop .

Learning the tangents instead of specifying them

Tangent prop’s weakness is needing the tangent vectors up front. The manifold tangent classifier (Rifai et al.) removes that: an autoencoder first learns the manifold structure by unsupervised learning and estimates the tangent vectors (chapter 14), which then regularize the classifier exactly as tangent prop does. The learned tangents go beyond the classical geometric invariants (translation, rotation, scaling) to object-specific factors — like the ways a body’s parts can move. The algorithm is just two steps: (1) an autoencoder learns the manifold tangents unsupervised; (2) those tangents regularize the classifier via the tangent-prop penalty.

End of the chapter

That covers the main strategies for regularizing neural networks — norm penalties, constraints, augmentation, noise, early stopping, parameter sharing, sparsity, bagging, dropout, adversarial and tangent methods. Regularization is a central theme of machine learning and will resurface in nearly every chapter that follows. The other central theme — how to actually optimize these models — is next.

On to training: chapter 8, Optimization for Training Deep Models.

Check yourself — tangent methods and the manifold hypothesis

1.What does tangent prop's penalty Ω(f) = Σᵢ(∇ₓf·v⁽ⁱ⁾)² actually enforce?

2.In TangentLab, what do the tangent and normal directions represent, and why should the classifier treat them differently?

3.How are dataset augmentation and tangent prop related, and why does augmentation work better with ReLU?

4.The comparison table pairs four methods by 'directions' and 'scale'. Which pairing is correct?

5.What problem does the manifold tangent classifier solve, and how?

5 questions