Home › Lectures › 3Blue1Brown — Neural networks

But what is a neural network?

An introduction to neural networks through handwritten digit recognition, explaining layers, activations, weights, biases, and the role of learning.

3Blue1Brown⏱ 19 minOpen on YouTube ↗
Take the full quiz — 6 questions →

Free, sign in with Google. A ready quiz does not use your hourly limit.

What the lecture covers

The lecture introduces a neural network by asking how a computer could recognize handwritten digits from small grayscale images. In the example, 784 input neurons represent pixel brightness, hidden layers process the image, and 10 output neurons represent the digits. The most active output indicates the network’s prediction. The layered structure is motivated by the possibility that neurons could detect increasingly complex features, such as edges, loops, and digit shapes.

To describe how one layer affects the next, the lecture assigns weights to connections and a bias to each neuron. A neuron takes a weighted sum of the previous layer’s activations, adds its bias, and applies an activation function such as the sigmoid. Weights and biases determine which patterns a neuron responds to; across the example network, there are nearly 13,000 such parameters. The same calculation can be written compactly with matrix-vector multiplication, making the network easier to express and compute. The network is therefore a function from 784 input values to 10 output values, and learning means finding parameter values that let it recognize digits. A brief closing discussion notes that many modern networks use ReLU rather than sigmoid, in part because it can be easier to train.

Key ideas

Sample questions

In a neural network for handwritten-digit recognition, image information enters through an input layer, passes through two hidden layers, and reaches an output layer that represents the recognized digit. Which description correctly identifies the hidden layers in this setup?

  1. AThey are unnecessary whenever the output layer represents digits.
  2. BThey lie between the input and output layers; their presence does not by itself specify how digit recognition is carried out.
  3. CThey are the input and output layers combined into a single stage.
  4. DThey receive the final digit label and send it back to the input layer.
Show answer

Correct answer: B. The two hidden layers are intermediate stages between the image input and digit output. Knowing their position does not reveal the specific recognition process.

When recognizing handwritten digits, a neural network can build complex digit representations from simpler visual parts. If two digits share one curved component but differ in how that component is arranged with other parts, what should a higher-level representation capture?

  1. AThe arrangement of the simpler parts that distinguishes one digit from the other
  2. BA separate representation for every possible handwriting style
  3. COnly the shared curved component, regardless of the other parts
  4. DThe total number of pixels in the image, without considering their arrangement
Show answer

Correct answer: A. Higher-level recognition depends on how simpler visual components are combined, so shared parts alone may not distinguish the digits.

Take the full quiz — 6 questions →

A quiz for any lecture

Paste a video link — LearnReplay builds a comprehension quiz.

Create a quiz →