OneLab experiment · 8 interactive visualizers

How machines learned to learn

A neural network is a pile of simple maths that gets better by being wrong. Here you can build, train and poke eight of them, from a single neuron in 1958 to the attention and diffusion models behind today's chatbots and image generators. Everything runs in your browser.

The visualizers

start at 00, or jump in anywhere

What is a neural network?

one minute

An artificial neuron takes some numbers in, multiplies each by a weight, adds them up, and squashes the total into an output. That's it. One neuron can only draw a straight line through data.

Connect thousands of them in layers and they can draw any shape, recognise faces or write sentences. Nobody sets the weights by hand: the network starts random, makes a guess, measures how wrong it was (the loss), and nudges every weight a little in the direction that would have made it less wrong. Repeat millions of times. That's training.

Every model on this page, and every chatbot, follows that same loop. What changes is how the neurons are wired.

x₁ x₂ x₃ w₁w₂w₃ Σ + bias squash y

The story so far

80 years in 20 moments

    Ideas on paper

  1. 1943

    A neuron, written as logic

    Warren McCulloch and Walter Pitts show that a simplified brain cell, one that fires when its inputs add up past a threshold, can compute logic. The first artificial neuron exists only as maths.

  2. 1949

    Cells that fire together wire together

    Psychologist Donald Hebb proposes that learning means strengthening connections between neurons that are active at the same time. Adjustable connection strengths become the core idea of every network since.

  3. 1958

    The perceptron learns

    Frank Rosenblatt builds the Mark I Perceptron, a machine with a camera that learns to tell simple shapes apart by adjusting its own weights. Newspapers predict thinking machines within years. Try it →

  4. 1969

    The first AI winter

    Marvin Minsky and Seymour Papert prove that a single perceptron can never learn XOR, a simple "one or the other, not both" rule. Funding dries up and neural networks fall out of fashion for over a decade.

  5. The comeback

  6. 1982

    Networks with memory

    John Hopfield shows a network of connected neurons can store and recall patterns, like a memory that completes a half-remembered picture. Physicists start paying attention.

  7. 1986

    Backpropagation

    David Rumelhart, Geoffrey Hinton and Ronald Williams popularise a way to train networks with hidden layers: pass the error backwards, layer by layer, and nudge every weight. Multilayer networks solve XOR easily. MLP → Backprop →

  8. 1989

    Networks that see

    Yann LeCun trains a convolutional network to read handwritten zip codes. Through the 1990s, descendants of it read a large share of the cheques written in the United States. Try it →

  9. 1997

    Long short-term memory

    Sepp Hochreiter and Jürgen Schmidhuber design the LSTM, a recurrent network with gates that decide what to remember and what to forget. It later powers speech recognition and translation on billions of phones. Try it →

  10. 2000s

    The quiet years

    Other methods win most benchmarks. A small group keeps working on neural networks, and in 2006 Hinton's team shows deep networks can be trained layer by layer. The phrase "deep learning" catches on.

  11. The deep learning boom

  12. 2009

    Data at scale

    Fei-Fei Li's team releases ImageNet, millions of labelled photos. Networks finally have enough examples to learn from, and graphics cards built for games turn out to be perfect for the maths.

  13. 2012

    AlexNet

    A deep convolutional network from Hinton's lab wins the ImageNet challenge by a huge margin. Within two years almost every computer vision team switches to neural networks.

  14. 2013

    Learning compact codes

    Diederik Kingma and Max Welling introduce the variational autoencoder, which squeezes data into a small, smooth space you can sample new examples from. The same year, word vectors show networks can learn that "king − man + woman ≈ queen". Try it →

  15. 2014

    Networks that create

    Ian Goodfellow's generative adversarial networks pit two networks against each other, one forging images and one spotting fakes. Machine-made faces start to look real.

  16. 2016

    AlphaGo

    DeepMind's AlphaGo, built on neural networks plus search, beats Lee Sedol at Go, a game long thought to need human intuition.

  17. 2017

    Attention is all you need

    Researchers at Google introduce the transformer. Instead of reading one word at a time, every word looks at every other word at once. It trains far faster on modern hardware and becomes the base of nearly every language model since. Try it →

  18. The generative era

  19. 2020

    Diffusion, and AlphaFold

    Jonathan Ho and colleagues show that a network trained to remove noise, step by step, can generate strikingly good images. The same year DeepMind's AlphaFold 2 predicts protein shapes with near-experimental accuracy. Try it →

  20. 2022

    AI goes mainstream

    Diffusion models like Stable Diffusion and DALL·E 2 turn text into images, and ChatGPT, a transformer trained to follow instructions, reaches a hundred million users in about two months.

  21. 2024

    Nobel prizes

    The Nobel Prize in Physics goes to John Hopfield and Geoffrey Hinton for foundational work on neural networks. The Chemistry prize honours Demis Hassabis and John Jumper for AlphaFold, shared with David Baker for protein design.

  22. Today

    Models that see, talk, reason and act

    Large transformer models now read images, write and run code, and carry out multi-step tasks. Mixture-of-experts designs route each word to a few specialist sub-networks so huge models stay affordable, and new architectures explore memory beyond attention. The training loop underneath is still the one from 1986.

Where neural networks are used today

and which kind does the work

📱Your phone

Face unlock, portrait-mode blur, night photos, keyboard suggestions, voice typing and live captions.

💬Language

Chat assistants, translation, summaries, search answers and coding helpers.

🩺Medicine

Spotting signs of disease in scans and retina photos, predicting protein structures, and screening drug candidates.

🌦️Science

Weather forecasts that run in minutes, new materials, telescope data, and particle physics.

🎨Creative tools

Image, video, music and voice generation, photo editing and upscaling.

🚗Transport

Driver assistance, lane keeping, traffic and arrival-time prediction, warehouse robots.

🛒Everyday web

Recommendations, spam and fraud filters, ad ranking, and detecting unusual card payments.

🏭Industry

Spotting defects on production lines, predicting machine failures, and balancing power grids.

About these demos: the networks here are deliberately tiny so they run instantly on any phone. The perceptron, MLP and backprop pages train live in your browser. The CNN and autoencoder were trained on the MNIST handwritten digits (LeCun, Cortes and Burges). The LSTM and transformer were trained on the element stories from OneLab's Periodic Table, about 26,000 characters, so they sound like those stories, invent words, and get facts wrong (the transformer has partly memorised the text). The diffusion model was trained on four simple 2D shapes. Real systems use the same ideas at millions to billions of times the size.