Multi-Layer Perceptron
Stacking layers of neurons lets a network build a hierarchy of features. See how depth, width, and non-linearity combine to solve complex problems.
Adding hidden layers between the input and output transforms a flat classifier into a deep network. Each successive layer builds upon the features extracted by the previous one.
The Forward Pass
Data flows strictly in one direction. Each layer calculates its weighted sums, applies its non-linear activation functions, and passes the resulting activations to the next layer.
The Need for Non-Linearity
If you stack linear layers without non-linear activations between them, the math collapses. The entire deep network is mathematically equivalent to a single linear transformation, meaning depth buys you nothing.
Depth vs Width
A wide, shallow network has the capacity to memorize patterns, but a deep network learns a hierarchy. Depth allows the network to compose simple features into complex abstractions.
Where It Breaks
As networks get deeper, the signals passing through them tend to either shrink away to nothing or explode into infinity. Without careful initialization, deep MLPs become mathematically untrainable.
The Quick Version
- Stacking layers builds a hierarchy of abstract features.
- Activations flow from input to output in a forward pass.
- Non-linearity is required to stop the math from collapsing into a single layer.
- Depth enables feature composition; width merely increases capacity.
- Poor initialization breaks deep networks due to exploding or vanishing signals.