Why can a deep network with no non-linear activation functions represent nothing more than a single linear (affine) layer?
Deep learning, Neurons and activations
Level L1 Beginner. Length Short. Nature Th Theoretical.
What's being asked
Whether you know why stacking linear layers collapses into one linear function and why non-linear activations are essential for deep networks.
Key idea
A linear transformation of a linear transformation is still linear: stacking any number of layers without non-linear activations collapses into a single weighted sum plus offset, which can only draw a flat decision boundary.
Steps
- Core rule: a linear (affine) layer simply multiplies its inputs by weights and adds a shift (bias). Applying one linear rule after another gives a single linear rule—just like in school algebra, where is still one straight line.
- Across many layers: whether you stack linear layers or , the whole network reduces to one combined weighted sum and one offset, so depth adds extra numbers to tune without adding any curves or bends.
- What this misses: a single linear layer can only separate classes with a straight line or flat plane, so it fails on simple non-linear patterns like XOR (where and are one class while and are the other).
- Role of non-linearities: inserting a non-linear activation such as (which keeps positive values and sets negative values to zero) between layers bends the boundary so deeper layers can build curved and complex shapes.
Common mistakes
- Thinking more hidden layers or more hidden units let a network learn curves when there are no non-linear activations.
- Claiming that a curved activation (such as a sigmoid) at the final output layer alone fixes this; the decision boundary before it is still a single straight line or flat plane.
How long your answer should be
3–4 sentences: the collapse to one linear rule, why flat boundaries limit it, and what a non-linearity adds.
Read this
Previous in Deep learning: What is the difference between a perceptron and a logistic (sigmoid) neuron?
Next in Deep learning: What is backpropagation in a neural network, and what roles do the forward pass and the backward pass play during training?