Nestor G Pestelos Jr · ELI5

Machine Learning · Picture Book

Neural Networks

A computer program that learns to recognize patterns by connecting thousands of tiny decision-makers and turning volume dials until guesses become answers.

1. The Artificial Neuron: A tiny math vote

A single neuron takes in numbers, multiplies each by an importance dial, adds them up, and decides whether to shout its own number forward.

Has fur? (1) Barks? (1) Has fins? (0) × 0.4 × 0.8 × -0.9 Sum + Bias Total = 1.1 Activation Is sum > 0? YES
Why each piece exists
  • Inputs: Raw clues, such as pixel brightness or answers to simple questions.
  • Weights: Importance dials. Positive weights vote yes; negative weights vote no.
  • Bias: A baseline preference that makes the neuron trigger easily or stay quiet.
  • Activation function: A filter that introduces non-linearity, keeping the network from collapsing into a flat addition sum.

2. Layers: Passing notes from simple to complex

One neuron can only separate things with a straight cut. Stacking them in layers lets early neurons spot lines, while deep neurons combine those lines into eyes, wheels, or letters.

Input Layer Raw Pixels Hidden Layer Edges & Textures Output Layer Final Decision Dog (92%) Cat (8%)
How information builds up
  • Layer 1 (Input): Directly reads the world, such as 28×28 image pixels.
  • Middle Layers (Hidden): Find combinations. Two simple lines make a corner; three corners make an ear.
  • Final Layer (Output): Weighs all high-level evidence to pick a category or output a value.

3. Training: Guessing, measuring, and nudging the dials

The network begins with random dials. With every practice example, it measures how far off its guess was and nudges each dial slightly in the direction that reduces error.

1. Forward Pass Input: picture of a cat Signals propagate through network 2. Network Prediction Guess: "Dog" (92% confidence) Raw output before verification 3. Measure Error (Loss) Compare with true label ("Cat") Error Score = 0.85 (High mistake) 4. Backpropagation Trace error back through layers Nudge dials toward correct guess
Why small nudges matter
  • Gradient Descent: Calculates the steepest downhill direction toward zero error.
  • Learning Rate: Controls how far to turn the dials after each mistake. A step too large overshoots; a step too small takes forever.
  • Millions of repetitions: After looking at millions of examples, the network converges on a set of dials that generalizes well to new data.