How AI Learns

Train a neural network yourself

1

What is a Neuron?

AI is inspired by your brain! Both biological neurons and artificial neurons receive inputs, process them, and produce an output. Let's compare them.

🧠 Biological Neuron

  • Receives signals from other neurons
  • If signals are strong enough, it "fires"
  • Sends signal to connected neurons
  • ~86 billion in your brain!

🤖 Artificial Neuron

  • Receives numbers as inputs
  • Multiplies each by a "weight"
  • Adds them up and applies a function
  • Outputs a new number
Fun Fact

The first artificial neuron was created in 1943! Called the "McCulloch-Pitts neuron," it was inspired by how brain cells work.

2

Weights: The Secret Sauce

Each input to a neuron has a weight - a number that says how important that input is. Adjust the weights below to see how they affect the output!

Input 1
0.8
Input 2
0.5
Input 3
0.3
Weight 1 0.5
Weight 2 0.5
Weight 3 0.5
Neuron Output
0.73
Activated! (above 0.5)

How it works

Output = sigmoid(input1 × weight1 + input2 × weight2 + input3 × weight3)

The sigmoid function squashes any number to between 0 and 1.

Fun Fact

GPT-4 has about 1.76 TRILLION weights! Training means finding the right value for each one.

3

Teaching the Network

AI learns by seeing examples! Below are simple 5×5 patterns. Click "Train" to teach the network to recognize each shape, then test it by clicking on patterns.

0
Patterns Learned
0
Training Epochs
0
Tests Correct
Fun Fact

Training GPT-4 took months on thousands of expensive GPUs and cost over $100 million!

4

When AI Gets It Wrong

AI isn't perfect! Here are common ways neural networks fail. Understanding these helps us build better, safer AI systems.

🎭
Adversarial Examples
Tiny, invisible changes to an image can completely fool AI. A sticker on a stop sign made cars think it was a speed limit sign!
📊
Overfitting
AI memorizes training examples instead of learning patterns. Like studying only past tests and failing on new questions.
🔮
Hallucination
AI confidently states false information. ChatGPT once invented fake court cases that lawyers cited!
⚖️
Bias
If training data is biased, the AI learns those biases. Facial recognition has struggled with diverse skin tones.

Why does this matter?

AI is used in healthcare, hiring, and criminal justice. Understanding its limitations helps us use it responsibly and know when human judgment is needed.

5

The Training Data Problem

AI learns from data - but what if the data is limited or biased? See how training data affects what the AI learns.

Scenario: Train an AI to recognize "fruit"

If we only show it apples...

🍎
🍎
🍎
🍎
🍎

Then we test it on other fruits...

🍌
🍇
🍊
🥝
❌ "Not fruit"
The AI only learned that fruit = red and round. It fails on bananas, grapes, and oranges!
Fun Fact

ImageNet, a famous AI training dataset, contains 14 million images labeled by humans. It took years to create!

6

Draw a Shape!

Draw a simple shape and watch the AI try to recognize it! The AI measures the distance from the center to each part of your drawing to figure out what shape it is.

I'll draw a:
AI thinks this is a...
?
0
Drawings
0
Correct Guesses

🔍 How the AI "sees" shapes

The AI divides your drawing into 36 slices (like a pizza!) and measures how far each slice extends from the center:

  • ⭕ Circle: All slices are the same length (consistent radius)
  • ⬛ Square: 4 longer slices at the corners (diagonal peaks)
  • ⭐ Star: 5 long slices (points) alternating with 5 short ones (valleys)
  • 🔺 Triangle: 3 longer slices at the corners, often bottom-heavy

Tip: Draw shapes with clear, distinct features for better recognition!

7

See the Network in Action

Here's a complete neural network! Watch data flow through layers as it processes inputs and produces outputs. Click neurons to see their values.

4
Layers
15
Neurons
56
Connections
Fun Fact

The human brain has about 100 trillion connections between neurons - far more than any AI! But AI can process numbers much faster.

You've Learned How AI Learns!

From neurons to networks

0
Shapes Drawn
0
Training Epochs
0
% Best Accuracy

Neurons

AI is inspired by the brain. Artificial neurons take inputs, apply weights, and produce outputs.

Weights

The "knowledge" of a neural network is stored in millions or billions of weights that are adjusted during training.

Training

AI learns by seeing many examples and adjusting weights to reduce errors.

Limitations

AI can be fooled, biased, or overconfident. Understanding limits helps us use AI responsibly.

Ready to Create?

Put your new knowledge into practice!

Suggest a Correction