What is a perceptron?
A perceptron is a single artificial neuron that classifies an input into one of two classes. It multiplies each input by a weight, adds a bias, and outputs 1 if the total is above a threshold and 0 otherwise. Geometrically, it splits the input space with a straight line, or a flat plane in higher dimensions.
Frank Rosenblatt introduced the perceptron in 1958, together with a learning rule that adjusts the weights from labeled examples. It is the building block of every neural network: each neuron in a modern model computes the same weighted sum, with a smooth activation in place of the hard threshold. Its main limit, that one neuron can only draw one straight boundary, is the reason networks have hidden layers.
Key ideas
- A perceptron computes a weighted sum plus a bias and outputs 1 if it passes a threshold.
- Its decision boundary is a straight line in 2D, or a hyperplane in more dimensions.
- The weights set the boundary's orientation, and the bias shifts it away from the origin.
- The learning rule changes the weights only when the perceptron makes a mistake.
- On linearly separable data, the learning rule is guaranteed to converge.
- A single perceptron cannot learn XOR; that takes at least one hidden layer.
Common questions
What is the difference between a perceptron and logistic regression?
Both compute a weighted sum of the inputs. A perceptron passes it through a hard threshold and only updates on mistakes. Logistic regression passes it through a sigmoid, outputs a probability, and is trained by minimizing cross-entropy loss, so it keeps adjusting even on correctly classified points.
What happens if the data is not linearly separable?
The perceptron learning rule never settles. The line keeps moving, because some point is always misclassified. Variants such as the pocket algorithm keep the best weights seen so far, and the averaged perceptron uses the average of all weights over training.
What is a multi-layer perceptron?
A multi-layer perceptron (MLP) is a feedforward neural network with one or more hidden layers between input and output. Despite the name, its neurons usually use smooth activations such as ReLU or sigmoid instead of the perceptron's step, so the network can be trained with backpropagation.
Is the perceptron still used today?
Rarely on its own, because logistic regression and support vector machines give better boundaries for the same linear model. Its weighted sum is still the core computation inside every neuron of a modern neural network, and the averaged perceptron remains a fast baseline for some text classification tasks.
Related explainers
- Neural Networks — Neurons, layers, and how networks learn
- Bias & Decision Boundaries — How bias terms shift activation and shape decision regions
- Activation Functions — Why networks need non-linearity to learn
- Forward Propagation — How data flows through a network
- Support Vector Machines — Maximum margin classifiers and the kernel trick
- Classification vs Regression — Two kinds of prediction and when to use each
References
- Rosenblatt (1958), "The perceptron: A probabilistic model for information storage and organization in the brain", Psychological Review
- Nielsen, "Neural Networks and Deep Learning", chapter 1
- Goodfellow, Bengio & Courville (2016), "Deep Learning", section 6.1: Example: Learning XOR
Last updated