AI GLOSSARY · AI CONCEPTS
Perceptron
Definition
A perceptron is a simple algorithm that decides between two classes by multiplying each input by a learned weight, adding the results and applying a threshold. It is the basic building block of early neural networks.
Also called: perceptrons, single-layer perceptron, perceptron algorithm, perceptron model, what is a perceptron.
In plain language
A perceptron is one of the simplest learning programs. It looks at a few numbers, such as features of an email, gives each number a weight showing how much it matters, adds them up and answers yes or no. During training it nudges the weights whenever it gets an example wrong. Think of a scale where you adjust the importance of each ingredient until the verdict matches the examples. The limit is that a single perceptron can only separate classes with a straight dividing line, so it cannot represent XOR in the original two binary input features. A nonlinear feature transformation changes that representation. Its weighted-input calculation also helps explain the units used in larger networks.
Technical definition
A binary perceptron uses an affine score and a threshold. A common update changes weights after a misclassified example, using its features, label and a step size. The standard convergence result assumes separable data and its specified update procedure; it is not a guarantee for nonseparable problems or arbitrary stopping rules. A multilayer perceptron is a different architecture.
Worked examples in this catalogue
Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.
Skill by Skill Almanac · Illustrative, not executed
split-leakage-check 53/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- A check of train, validation and test files for duplicates, shared groups, time and label leakage, printed as JSON.
- Why it exercises the concept
- This linked skill checks data-split contamination rather than training a perceptron. Clean splits are one requirement for a meaningful held-out evaluation.
Skill by Skill Almanac · Illustrative, not executed
mock-record-generator 42/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- Seeded mock records as CSV or JSON, generated from a JSON field list or a simple TypeScript interface.
- Why it exercises the concept
- Not a training skill. A perceptron needs rows of numbers to learn from, and seeded mock records give you a repeatable toy table to try one on. Real labels would have to come from your own data.
Skill by Skill Almanac · Illustrative, not executed
data-analysis-eda 56/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- A fixed exploratory-analysis procedure and CSV profiler that keeps findings descriptive, evidenced and caveated.
- Why it exercises the concept
- Profiling can reveal missing values, feature types and class balance before fitting a classifier. It does not prove separability or predict how well a perceptron will generalize.
Coding tool · Illustrative, not executed
Claude Code
- What you see
- Claude Code's overview page describes it as an agentic coding tool that reads your codebase, edits files and runs commands.
- Why it exercises the concept
- A perceptron is short enough to write in a few lines. You can ask a coding agent to write one and run it on a toy table, then check the weights it learned yourself.
How it shows up when you use agents
An agent can help you study a perceptron as a small example of learning from data: weighted inputs, an output, and a rule that changes the weights after each mistake. The same idea repeats, in far larger form, in the layers of a neural network.
If you ask a coding agent to write one, the exercise is useful and quick. Ask for a perceptron on a tiny table, run it and read the weights. Then compare XOR in its original two features with a representation containing their product. The change tests the importance of the supplied features; reaching a maximum iteration count is not proof of convergence.
What breaks when it is misunderstood: people assume any perceptron-based model is limited to straight lines. A single affine decision boundary is linear in the features supplied to it. Stacked layers with a nonlinear activation function are not, which is why modern networks can learn curved boundaries. The step size of the weight updates is the learning rate, a setting you choose. Check any score on held-out data, not on the rows the model trained on.
Worked example (illustrative)
For binary inputs x₁,x₂, add the feature x₁x₂ and choose the score x₁+x₂−2x₁x₂−0.5. Predict 1 for a positive score and 0 otherwise. The four inputs (0,0),(1,0),(0,1),(1,1) return 0,1,1,0: XOR. This hand-specified linear rule in transformed features does not make XOR linearly separable in its original two features, and no perceptron was trained here.
Common confusions
- Perceptron versus neural network. A single perceptron is a simple linear classifier. Neural networks may have one or many layers and different connection patterns. See Neural network.
- Perceptron versus multilayer perceptron. The multilayer version has several layers of units and can handle problems a single layer cannot. IBM mentions multilayer perceptrons only briefly, as a foundation for later network types.
- Perceptron versus modern unit. The classic perceptron uses a hard step output. Other units use activations such as smooth sigmoid or tanh and nonsmooth ReLU, which CS231n describes as stand-ins for a neuron's firing rate.
- Myth. The perceptron is only a historical curiosity. IBM calls it the historical ancestor of today's networks, and its weighted-sum idea still appears in them.
Related terms
Terms that mention Perceptron
4 terms mention this one
More in AI concepts
Sources
- What is a neural network?, IBM (accessed 2026-11-24)
- CS231n Convolutional Neural Networks for Visual Recognition: Neural Networks Part 1, Stanford University (accessed 2026-11-24)
- Understanding Machine Learning, section 9.1.2: Perceptron for Halfspaces, Shalev-Shwartz and Ben-David (accessed 2026-11-24)
- Polynomial features and the XOR perceptron example, scikit-learn (accessed 2026-11-24)
Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-24. Wikipedia is never the only source.
Review record
Last verified
Drafted by Claude (original draft) and Codex (automated revisions); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-24. Last verified .
Change log (7)
- : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
- : First version.
- : Verifier pass: added Claude Code overview source.
- : Learning-method scope and counterexample corrections; independent exact-version review pending.
- : Aligned related-tool explanations with scoped definitions; no blanket claims about the full catalog.
- : Removed unsupported session-prevalence and chat-model universals; retained the algorithm and toy exercise. Independent recheck pending.
- : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.