§6.0What a Feedforward Network Is

Part II DL pp. 168–170 · ~5 min read

  • feedforward network
  • output layer
  • width

Welcome to Part II — the established, essentially-solved technology of modern deep networks. It opens with the quintessential model: deep feedforward networks , also called feedforward neural networks or multilayer perceptrons (MLPs) . The goal is to approximate some function ff^* — for a classifier, y=f(x)y = f^*(\boldsymbol{x}) maps an input to a category — by learning the parameters θ\boldsymbol{\theta} of a mapping y=f(x;θ)y = f(\boldsymbol{x}; \boldsymbol{\theta}) that best approximates it.

Three words, three ideas:

  • Feedforward — information flows one way: from x\boldsymbol{x}, through intermediate computations, to yy, with no feedback connections. (Add feedback and you get recurrent networks, chapter 10.)
  • Network — the model is a chain of composed functions f(x)=f(3)(f(2)(f(1)(x)))f(\boldsymbol{x}) = f^{(3)}(f^{(2)}(f^{(1)}(\boldsymbol{x}))), described by a directed acyclic graph.
  • Neural — loosely inspired by neuroscience: each layer is vector-valued, and each element plays the role of a neuron receiving input from many others. But the honest framing is function approximation machines designed for statistical generalization, only occasionally borrowing from the brain.
input xh⁽¹⁾ = f⁽¹⁾(x)h⁽²⁾ = f⁽²⁾(h⁽¹⁾)ŷ = f⁽³⁾(h⁽²⁾)hidden layers — targets NOT given by the datadepth = length of the chain (3 here) · width = units per layer (4)

The chain f³∘f²∘f¹. The output layer is driven directly by the labels; the depth of the chain is the source of the name “deep learning”; each layer’s width is how many parallel units it holds. The training data says what the output must do — but never what each hidden layer should compute.

Why we need more than a linear model

Linear models (linear/logistic regression) fit efficiently and reliably — in closed form or by convex optimization — but their capacity is confined to linear functions, so they cannot capture the interaction between two input variables. The remedy: apply the linear model not to x\boldsymbol{x} but to a nonlinear transform ϕ(x)\phi(\boldsymbol{x}) — a set of features, a new representation of x\boldsymbol{x}. The whole question becomes how to choose φ:

Three strategies for the feature map φ — click a row
How φ is obtainedTrade-off
1. Generic φa fixed, generic map (RBF kernel)fits anything, generalizes poorly
2. Hand-engineer φhuman-designed featurespowerful but decades of per-task labor
3. Learn φ (deep learning)θ learned from a broad family φ(x; θ)gives up convexity, wins in practice
Dotted-underlined cells have explanations — click one.

The recurring theme of the whole book

“Improve the model by learning the features” is not confined to feedforward networks — it is the thread running through every model in this book. Feedforward networks apply it to learning deterministic xy\boldsymbol{x} \to y mappings without feedback; later chapters apply the same principle to stochastic mappings, feedback (recurrence), and full probability distributions. The hidden layer ϕ(x;θ)\phi(\boldsymbol{x}; \boldsymbol{\theta}) is where a network stops consuming features and starts inventing them.

The chapter ahead

Deploying a feedforward network reuses every linear-model design decision — the optimizer, the cost function, the form of the output units (§6.2) — plus decisions unique to having hidden layers: the activation functions for hidden units (§6.3), the architecture (how many layers, how wide, how connected — §6.4), and the algorithm that makes learning tractable at all: back-propagation for computing gradients of these composed functions (§6.5). We begin, as the book does, with the smallest network that does something a linear model cannot: learning XOR.

Check yourself — what a feedforward network is

1.Why are these networks called 'feedforward', and what changes that name?

2.In f = f³(f²(f¹(x))), which layers' behavior does the training data directly specify?

3.What can't a linear model do that motivates feature maps φ(x)?

4.Deep learning's strategy is to LEARN φ. What does it give up, and what does it gain over the other two strategies?

5.Which best describes the book's stance on the 'neural' in neural networks?

5 questions