Tokencito Game of the day Play

What is a neural network?

A neural network is a kind of machine learning model made of layers of simple units connected to each other. Each connection has a weight, a number that says how much it matters. When you train it with examples, those weights are adjusted little by little so the network makes fewer mistakes. That is how it recognizes photos, voices or text.

  • 🐣 Smallx1
  • 🐥 Mediumx3
  • 🦅 Bigx8
Cost per token: example

Put it to the test

A question from the app. Pick an answer.

In an AI chat, what is the model?

Start playing on the web

Layers, connections and weights

Picture a network that tells whether a photo has a cat in it. The first layer takes the photo as numbers: how light or dark each dot is. The middle layers combine those numbers, and the last one gives a single answer: cat or no cat.

Each unit does something very simple: it takes numbers from the previous layer, mixes them according to the weights of its connections and passes one number to the next layer. No single unit knows what a cat is. The answer comes from thousands or millions of those small calculations together.

How it learns: a mixing board

Think of a mixing board with thousands of knobs, one for each weight. At first they are set anywhere and the network answers at random. It is shown a photo with the right answer, the size of its mistake is measured and every knob is turned a tiny bit in the direction that makes the mistake smaller.

That repeats over thousands of photos. Nobody turns the knobs by hand or writes the rule "pointy ears, whiskers": the network finds the settings that work on its own. That is why, like all machine learning, it depends on its examples: it learns their patterns and can fail on cases that do not look like them.

Deep learning and language models

Deep learning means using neural networks with many layers. "Deep" refers to the number of layers, not to deeper understanding. With more layers, the network can build ideas on top of ideas: in a photo network, the first layers tend to react to edges and later ones to more complete shapes.

The language models you chat with are huge neural networks, with billions of weights. Those weights are called parameters, and they are what gets saved when a model is trained. The idea is the same as with the cat, but instead of deciding "cat or not", they predict which piece of text comes next.

Common mistakes

"It works like the brain." The name comes from a loose inspiration in neurons, but an artificial neuron is just a calculation: it multiplies, adds and passes on a number. Your brain learns all the time and from few examples; a network usually needs a huge number and, once trained, stays fixed while you use it. "It understands what it sees." It finds patterns in numbers, and it can fail on a photo only slightly different from the ones it saw. "You can read why it decided." What it learned is spread across millions of weights, with no written rule anyone can read.