Introduction: The Foundation of Everything
Your brain contains 86 billion neurons. Each one receives signals, accumulates them, and if it exceeds a threshold, sends a signal. It's mechanical. Electrical. Simple.
The perceptron is the mathematical imitation of this. Frank Rosenblatt invented it in 1957. It's tiny. Trivial. But it's the fundamental building block of all modern deep learning. The Transformers that power GPT-4? Millions of stacked perceptrons.
Understanding the perceptron = understanding the foundation.
The Biological Neuron: The Inspiration
Real neurons:
- Receive signals via dendrites (inputs)
- Accumulate in the cell body
- If the signal exceeds a threshold, the neuron fires
- Send a signal along the axon (output) via synapses

The artificial perceptron simulates this mathematically.
The Simple Perceptron: The Mechanism

Takes numbers as input (). Outputs a number between 0 and 1.
Step 1: The Linear Combination
Symbol by symbol:
- : the inputs. They change with every example presented.
- : the weights. Each weight says how much the matching input counts. These are learned parameters: training searches for them, and once training ends they stop moving.
- : the bias, also a learned parameter. A constant offset added whatever the inputs are: it shifts the threshold at which the neuron fires.
- : the result of the computation. Not a parameter, a value recomputed for every example.
In one sentence: each input is multiplied by its importance, everything is added up, an offset is added, and the bigger the total the more excited the neuron. Hold on to the split: and are learned and frozen; and are recomputed on every pass.
Step 2: The Activation Function (Step Function)
Transforms into the final output.
For the simple perceptron, the activation function is the step function:
- If , output = 1
- If , output = 0
It's binary. All or nothing. The neuron "fires" or doesn't.
Inputs: ,
Weights: , , Bias:
Since , output = 1
Geometric Interpretation: Separating the Space
Mathematically, the perceptron defines a line (in 2D) or a plane (in 3D) or a hyperplane (in higher dimensions) that divides the space.
Points on one side are classified 0, on the other side 1.
Visual 2D example (with ):
| Inputs | Output | |
|---|---|---|
| 0 | ||
| 0 | ||
| 0 | ||
| 1 |
This is the AND logic gate: the output is 1 only when both inputs are 1.
The Simple Perceptron's Dilemma
The perceptron can only draw lines (or planes). If the data isn't linearly separable, the algorithm never converges.
Problematic example: XOR.
| Inputs | XOR Output |
|---|---|
| 0 | |
| 1 | |
| 1 | |
| 0 |
There is no straight line putting both 1s on one side and both 0s on the other. Sketch it: the 1s sit at and , so on one diagonal of the square; the 0s sit at and , on the other. The two diagonals cross, so any line you draw is forced to leave a 1 and a 0 on the same side.
In 1969, Minsky and Papert prove that the simple perceptron can never solve XOR. This is not a programming mistake someone could patch: it is a mathematical impossibility. The effect on the field is brutal, funding dries up, and the "first AI winter" begins.

The Multi-Layer Perceptron: The Solution
How to solve XOR? Add a hidden layer between the input and the output.
Architecture
Each neuron in a layer connects to all neurons in the next. This is a Multi-Layer Perceptron (MLP).

Why It Works for XOR
Hidden layer: 2 neurons.
- Neuron 1: learns " OR " (at least one 1)
- Neuron 2: learns "NOT ( AND )" (not both 1)
Output layer: combines both.
- "Neuron 1 AND Neuron 2" = XOR!
The hidden layer transforms the space. It makes the problem linearly separable.
Each hidden layer warps the data space. It's as if the network flattens the data to make it "cuttable" by a straight line. More layers = more possible deformations = more complex patterns capturable.

Activation Functions
Without an activation function (or with a linear one), stacking 100 linear layers equals a single linear layer.
and are the two layers' weight tables, and their biases, all learned. The final equality says that once expanded, you are left with a single multiplication by a table and a single shift . In other words: two purely linear stacked layers are exactly equivalent to one, and nothing was gained by using two.
It is non-linearity that gives the network its power. Which non-linearity to choose (step, sigmoid, hyperbolic tangent, ReLU and its descendants) is the subject of its own lesson: Activation Functions.
Backpropagation: How Learning Happens
How does an MLP learn? Through backpropagation, discovered by Rumelhart, Hinton, and Williams in 1986.
Rumelhart, Hinton and Williams, Learning representations by back-propagating errors, Nature 323, pp. 533-536, 1986. The paper predates arXiv, so there is no preprint link to give.

Process:
-
Forward pass: data passes through the network, produces a prediction.
-
Loss computation: compare prediction vs reality. Measure the error (MSE, cross-entropy, etc.)
-
Backward pass: compute how each weight contributes to the error. Uses the chain rule to propagate the gradient layer by layer, from output to input.
-
Weight update: each weight moves in the direction that reduces the error.
Symbol by symbol: is the weight being corrected; (script "L") is the loss, the number measuring the error; is the weight's gradient, meaning "how much the loss rises if I raise a hair"; and ("alpha") is the learning rate, the fraction of that advice you agree to follow, the step size.
The minus sign is the whole point: if raising the weight raises the error, lower the weight. You always move against the direction the gradient marks as uphill.

SGD: Mini-batches and Randomness
You do not update the weights only after sweeping all the data, far too slow. You work in mini-batches of 32, 64 or 128 examples at a time.
Stochastic Gradient Descent (SGD): "stochastic" just means "at random", because the batches are drawn at random from the data. The result is a bit noisy, and that noise sometimes helps escape a bad hollow.
Modern optimizers such as Adam, RMSprop or AdaGrad adapt the learning rate weight by weight instead of imposing a single one on the whole network. They usually converge faster than plain SGD; that is the subject of Modern optimizers.

The Universal Approximation Theorem
George Cybenko, 1989:
An MLP with JUST ONE hidden layer containing enough neurons can approximate any continuous function, to any desired precision.
G. Cybenko, Approximation by Superpositions of a Sigmoidal Function, Mathematics of Control, Signals and Systems 2, pp. 303-314, 1989. Again a pre-arXiv paper: no preprint link.
In other words: a multi-layer perceptron can in principle learn any regularity.
But it's misleading.
Yes, theoretically it's true. In practice? The number of neurons needed can be astronomical. To capture a simple pattern, you might need billions of neurons.
This is where deep learning comes in: use many layers, each relatively thin. Much more efficient than a single giant layer.
From the Perceptron to Deep Learning
Historical path:
| Year | Breakthrough | Authors |
|---|---|---|
| 1957 | Perceptron | Rosenblatt |
| 1969 | AI Winter (XOR impossible) | Minsky & Papert |
| 1986 | Backpropagation -> powerful MLP | Rumelhart, Hinton, Williams |
| 1997 | LSTM for sequences | Hochreiter, Schmidhuber |
| 1998 | Convolutional networks (CNN) for images | LeCun |
| 2017 | Transformers | Vaswani et al. |
| 2022-2024 | Giant LLMs (ChatGPT, Claude, Llama) | , |
Each step = architectural innovation. But the fundamental principle: neurons with weights, non-linearities, gradient-based learning, backpropagation. It's still the perceptron, just more sophisticated.
The success of modern deep learning doesn't come just from deep architectures. It also comes from:
- Smart weight initialization (Xavier, He)
- Normalization (BatchNorm, LayerNorm)
- Regularization (dropout, weight decay)
- Adaptive optimization (Adam)
- Data augmentation (manufacturing variants of the examples you already have)
Each solves a practical problem in training deep networks.
Why This Matters
The perceptron is the conceptual and historical foundation of all deep learning. By understanding its mechanisms (weights, biases, activation, backpropagation), you have the keys to understanding GPT-4, CNNs for vision, Transformers for language. Everything builds on it.
1. In the perceptron computation z = w_1 Β· x_1 + β¦ + b, which pieces are learned during training and then frozen?
2. Why can a simple perceptron never learn XOR?
3. What do you get by stacking two purely linear layers, with no activation function between them?
4. The universal approximation theorem says one hidden layer is enough to approximate any continuous function. Why do we build deep networks anyway?
5. In the update rule w = w β Ξ± Β· gradient, what does the minus sign guarantee?