← Back to Blog
Neural Computing 2 Apr 2025

Neural Networks: From Perceptron to Deep Learning

The human brain contains roughly 86 billion neurons, each connected to thousands of others via synaptic junctions. When computer scientists speak of "neural networks" they are invoking this biological metaphor - however loosely. This page traces the intellectual arc from a single hand-crafted neuron in 1943 all the way to the architecture behind today's large language models, with three live simulations so you can see the theory firing in real time.

Part I - The Single Neuron

In 1943, neurophysiologist Warren McCulloch and mathematician Walter Pitts published a landmark paper proposing a mathematical model of the neuron [1]. Their formal neuron was binary: it either fired or it did not, depending on whether the weighted sum of its inputs exceeded a threshold. Despite gross simplification, the McCulloch–Pitts neuron captured the essential computational idea - thresholded summation.

Frank Rosenblatt (1958) extended this into the perceptron - a single-layer machine that could adjust its weights via a supervised learning rule to classify linearly separable patterns [2]. The perceptron takes each input, multiplies it by a learned weight, adds a bias, and squashes the result with a sigmoid activation (σ) to produce a continuous output between 0 and 1.

Simulation: The Perceptron

This neuron has been pre-trained as an AND gate: it outputs ≈ 1 only when both inputs are 1. Toggle the inputs to see the weighted sum and output change in real time.

AND truth table

A B AND Neuron output
00 0≈ 0.00
01 0≈ 0.01
10 0≈ 0.01
11 1≈ 0.99
Try this: Set both inputs to 1 - the neuron fires (AND = true) and the output node turns green. Now set one input to 0 - it stays dark. This neuron draws a single straight line through input space to separate the 0s from the 1s. AND is linearly separable, so one neuron handles it fine.

The excitement around the perceptron was short-lived. In 1969, Minsky and Papert rigorously demonstrated that a single layer cannot learn functions whose inputs are not linearly separable [3]. The canonical example - XOR - sent neural network research into a decade-long winter.

Part II - The XOR Problem

XOR (exclusive or) outputs 1 when exactly one input is 1. Plot the four truth-table rows on a plane: you cannot draw a single straight line separating the two 1s (at (0,1) and (1,0)) from the two 0s (at (0,0) and (1,1)). No matter what weights and bias you assign, a single neuron will always misclassify at least one case.

The solution is to add a hidden layer. The hidden neurons learn intermediate representations - essentially warping the input space into one where a final neuron can draw a separating line. In the network below, two hidden neurons act as NAND and OR gates respectively; their outputs feed an AND-like output neuron, producing XOR.

Simulation: XOR Network

A pre-trained 2→4→1 network. Line thickness and colour show connection weight (blue = positive, red = negative). Drag the sliders to explore the decision boundary.

0.50
0.50

XOR truth table

Input 1 Input 2 XOR
000
011
101
110

Network output: -

Try this: Drag Input 1 to 1 and Input 2 to 0 - the output turns green (XOR = 1). Now drag both to 1 - it goes red (XOR = 0). Watch the top hidden neuron: it is the NAND gate - it shuts off when both inputs are fully on, which is exactly what causes the output to drop.

The training algorithm that makes multi-layer networks learnable is backpropagation: a method for computing gradients through every layer and using those gradients to nudge all weights toward lower error. Rumelhart, Hinton & Williams made the technique widely known in 1986 [4]. With backpropagation, networks with hidden layers could finally be trained at scale.

Part III - Going Deeper

A single hidden layer is theoretically sufficient to approximate any continuous function (the universal approximation theorem), but in practice, depth matters enormously. Each additional layer learns a more abstract representation of the previous layer's output. In image recognition, early layers detect edges; middle layers combine edges into textures and shapes; deep layers recognise faces or objects. The same hierarchy emerges in language models: word patterns, phrases, grammar, world knowledge.

Simulation: Deep Network

Three hidden layers (2→5→4→3→1, 45 connections total). The weights are random - the point is the shape of the computation, not the task. Watch how the signal transforms as it passes through each layer.

0.50
0.50
Try this: Set both sliders to 0.9 and watch the signal ripple outward through all three hidden layers - most neurons light up. Now try 0.1 for Input 1 and 0.9 for Input 2. The intermediate layers respond completely differently even though the output may look similar; this is hierarchical representation in action.

Scaling this pattern up - more layers, more neurons, and vastly more training data - is what produces modern large language models. A GPT-style model is structurally this same architecture with hundreds of layers and billions of weights, plus one key addition: the attention mechanism, which lets every position in a sequence look at every other position before the layer-by-layer transformation begins. The result is that the network can relate distant words and concepts before compressing them into its representation.

Biological Plausibility: How Close Is the Analogy?

Modern artificial neural networks diverge from biology in important ways. Biological neurons communicate via discrete action potentials (spikes) rather than continuous activations; synaptic plasticity follows Hebbian and spike-timing-dependent rules rather than global gradient descent; and no neuroscientist has found a plausible cortical implementation of backpropagation.

Spiking Neural Networks (SNNs) attempt to close this gap by modelling individual spikes and their timing. Maass (1997) showed that SNNs are computationally more powerful than rate-coded networks in certain regimes [5]. SNNs run efficiently on neuromorphic hardware such as Intel's Loihi chip, which mimics the event-driven, low-power operation of biological neural tissue.

What Biology Still Teaches Us

Despite their differences, biological neural systems remain a wellspring of architectural inspiration. Convolutional neural networks (CNNs) were partly motivated by Hubel and Wiesel's discovery of oriented edge detectors in the visual cortex [6]. Attention mechanisms in transformers bear a functional resemblance to selective attention in primate cognition. And the study of circuit motifs in simple organisms like C. elegans continues to inspire network architecture research. The artificial network is a pale shadow of the biological original - but it is a shadow cast by the same light.

References

  1. McCulloch, W. S. & Pitts, W. (1943). A logical calculus of the ideas immanent in nervous activity. Bulletin of Mathematical Biophysics, 5, 115–133. doi:10.1007/BF02478259
  2. Rosenblatt, F. (1958). The perceptron: A probabilistic model for information storage and organization in the brain. Psychological Review, 65(6), 386–408. doi:10.1037/h0042519
  3. Minsky, M. & Papert, S. (1969). Perceptrons: An Introduction to Computational Geometry. MIT Press. doi:10.7551/mitpress/11301.001.0001
  4. Rumelhart, D. E., Hinton, G. E. & Williams, R. J. (1986). Learning representations by back-propagating errors. Nature, 323, 533–536. doi:10.1038/323533a0
  5. Maass, W. (1997). Networks of spiking neurons: The third generation of neural network models. Neural Networks, 10(9), 1659–1671. doi:10.1016/S0893-6080(97)00011-7
  6. Hubel, D. H. & Wiesel, T. N. (1962). Receptive fields, binocular interaction and functional architecture in the cat's visual cortex. Journal of Physiology, 160(1), 106–154. doi:10.1113/jphysiol.1962.sp006837