Learn how AI actually works.

iiNNoo is a free set of hands-on, interactive lessons that teach how neural networks learn. Every node shows its value and every connection shows its weight, so you can follow each number through the network and see the math, all of it elementary. No experience required.

Unit 02 · 30 lessons

Back Propagation

Back propagation is how a neural network works out what went wrong, comparing its output values with the target values and sending the error back through the network. These lessons show how a neural network measures its error and traces it backward to find which weights caused it.

Open the Back Propagation lessons

Section 1 · 5 lessons

Targets and Error

The error is the output value minus the target value, so a positive error means the network guessed too high.

  1. Observe

    The Bean Plant Predictor

    This network predicts how tall a bean plant grows. The input value is the days since it sprouted. The output value is the height in cm. It also calculates the error: the output value minus the target value. Observe the error calculated for all 4 input values.

    Open lesson
  2. Predict

    The Arcade Ticket Predictor

    This network predicts the tickets an arcade game pays out. The input value is the coins played. The output value is the tickets won. Luck decides the rest. Right now, every output value is too high, so every error is positive. Before each error is calculated, predict what it will be. Type your answer when asked.

    Open lesson
  3. Predict

    The Rainy Day Museum Predictor

    This network predicts a museum's visitors based on the amount of rain. The input value is the rain in mm. The output value is the visitors. When it starts raining, people head into the museum. This time the output values are too low, so the errors are negative. Before each error is calculated, predict what it will be. Watch the sign.

    Open lesson
  4. Edit

    The Bird Feeder Predictor

    This network predicts the birds that visit a yard. The input value is the cups of seed put out. The output value is the birds that come. The connection weight is the birds each cup brings and the bias is the birds that come anyway. Both are too low. Edit the weight and the bias to bring every error within 1 of zero.

    Open lesson
  5. Edit

    The Mushroom Predictor

    This network predicts the mushrooms in a forest. The input value is the rain in cm. The output value is the mushrooms counted. Every error is positive. Each output value is about 1.5 times its target value. Edit the connection weight to bring every error within 4 of zero. They can never all be zero.

    Open lesson

Section 2 · 10 lessons

The Error Crosses a Weight

The error travels backward along the connection and is multiplied by its weight, so a bigger weight sends back more of the error.

  1. Observe

    The Pool Drinks Predictor

    This network predicts the cold drinks sold at a swimming pool. The input value is the number of swimmers. The output value is the drinks sold. The error now travels backward. It is multiplied by the weight it crosses, and lands on the middle node. Observe the error travel back as you step through all 4 days.

    Open lesson
  2. Observe

    The Vegetable Patch Predictor

    This network predicts the lettuce leaves eaten by slugs in a garden overnight. The input value is the rain in centimeters. The output value is the leaves eaten. The bigger the weight, the bigger its share of the error. Observe how much of the error reaches each middle node.

    Open lesson
  3. Predict

    The Apple Orchard Predictor

    This network predicts an apple tree's crop based on the spring rain. The input value is the rain in centimeters. The output value is the apples. This time the output values are too low, so the errors are negative. Predict the error that reaches the middle node in each round. Type your answer when asked.

    Open lesson
  4. Predict

    The Sledding Hill Predictor

    This network predicts the sleds rented at a sledding hill. The input value is the fresh snow in cm. The output value is the sleds rented. When an output value matches its target value, the error is zero, and nothing travels back. Predict the error that reaches the middle node in each round.

    Open lesson
  5. Predict

    The Street Musician Predictor

    This network predicts what a street musician collects. The input values are the hours played in the morning and in the evening. The output value is the money in the hat. The input values never receive an error, because nothing can change them. Predict the error that reaches the middle node, where it stops.

    Open lesson
  6. Predict

    The Wildflower Meadow Predictor

    This network predicts how many flowers get pollinated in a meadow. The input value is the days it has been in bloom. The output value is the flowers pollinated. Each middle node receives the error multiplied by its own weight. Predict the error that reaches each middle node in the first two rounds.

    Open lesson
  7. Predict

    The Beehive Predictor

    This network predicts a hive's honey. The input value is the number of trees in bloom nearby. The output value is the honey, in grams. The weight on the bottom right connection is zero. Predict the error that reaches each middle node in the first two rounds.

    Open lesson
  8. Predict

    The Bowling Alley Predictor

    This network predicts the games played at a bowling alley. The input value is the birthday parties booked. The output value is the games played. The weight on the bottom right connection is negative. Predict the error that reaches each middle node in the first two rounds. Watch the sign on the bottom one.

    Open lesson
  9. Predict

    The Riverside Kiosk Predictor

    This network predicts a riverside kiosk's water sales. The input value is the joggers passing. The output value is the bottles sold. The error is split between the middle nodes. The larger weight sends back more. Predict both middle errors in the first two rounds. Then set the bottom right weight to 3. Which node gets more now?

    Open lesson
  10. Edit

    The Mosquito Bite Predictor

    This network predicts mosquito bites at a campsite. The input value is the rain in cm. The output value is the bites per camper. Every output value is about twice its target value, because the second weight is too high. Edit the second weight to bring every error within 0.5 of zero, then watch the middle node.

    Open lesson

Section 3 · 5 lessons

Errors Add Up

A node that feeds more than one output value gets an error back from each, every one multiplied by its weight, and adds them together.

  1. Observe

    The Movie Snack Predictor

    This network predicts a movie theater's snack sales. The input value is the tickets sold. The output values are the popcorn and drinks sold. Two errors come back to the middle node. Each is multiplied by its own weight, and then they are added together. Observe the errors from both output values meet at the middle node.

    Open lesson
  2. Predict

    The Seaside Shop Predictor

    This network predicts a seaside shop's sales. The input value is the ferries arriving. The output values are the postcards and sunscreens. Both errors travel back to the same middle node, and they are added together there. Predict the error that reaches the middle node. One output error is negative, one positive.

    Open lesson
  3. Predict

    The Sleepover Predictor

    This network predicts the snacks at a sleepover. The input value is the friends staying over. The output values are the pizza slices eaten and the boxes of juice drunk. Every middle node feeds both output values, so each one collects 2 errors. Predict the error that reaches the top 2 middle nodes in the first two rounds.

    Open lesson
  4. Predict

    The City Park Predictor

    This network predicts the litter left in a city park. The input values are the food trucks and snack carts. The output values are the wrappers and bottles left behind. Each middle node collects the errors from both output values. Predict the error that reaches each middle node in the first two rounds.

    Open lesson
  5. Edit

    The Bake Sale Predictor

    This network predicts a school bake sale. The input value is the families visiting. The output values are the cookies and brownies sold. Each output value for brownies is about 3 times its target value. Edit the weight to brownies to bring every error within 10 of zero, and watch the error at the middle node shrink.

    Open lesson

Section 4 · 5 lessons

Errors & Activation Functions

If the activation function turned a node's value into zero, that node did nothing to the output value, so its error is turned into zero too.

  1. Observe

    The Snowman Predictor

    This network predicts snowmen in a park. The input value is the snow in cm. The output value is the number of snowmen. It thinks nobody builds one with less than 4 cm of snow. On the third day it predicts 0, but 1 was actually built, so its error starts at -1. Observe it turn to zero, since the output value was held at zero.

    Open lesson
  2. Observe

    The Fan Sales Predictor

    This network predicts the electric fans a shop sells. The input value is the temperature. The output value is the fans sold. The middle node only receives an error when it is above zero. Observe how the error for the middle node is set to zero by the activation function, when the original middle node is zero.

    Open lesson
  3. Predict

    The Soup Stand Predictor

    This network predicts a soup stand's sales. The input value is the temperature. The output value is the bowls sold. On warm days the middle node is held at zero, so no error reaches it. Predict the error that reaches the middle node in each round.

    Open lesson
  4. Predict

    The Shopping Mall Predictor

    This network predicts a mall's shoppers. The input value is the temperature. The output value is the extra shoppers. On cold days only the top middle node is above zero, and on hot days only the bottom one, so only that node receives an error. Predict the error that reaches each middle node in the first two rounds.

    Open lesson
  5. Predict

    The Yawn Predictor

    This network predicts a student's yawns in class. The input values are the hours slept and the hours needed. Too much sleep or too little brings yawns. At most one middle node is above zero each round, and only that one can receive an error. Predict the error that reaches each middle node in the first two rounds.

    Open lesson

Section 5 · 5 lessons

Larger Networks

A larger network uses the same rules at every node: multiply by the weight, add up what arrives, and stop at a node held at zero.

  1. Predict

    The Corn Patch Predictor

    This network predicts a corn harvest. The input value is the seed packets planted. The output value is the cobs picked. A packet holds about 10 seeds, about half grow into plants, and each plant gives about 3 cobs. These are the weights. Predict the error at the second middle layer, then the first, in the first two rounds.

    Open lesson
  2. Predict

    The Pet Rescue Predictor

    This network predicts a day at a pet rescue. The input values are the dogs and the cats waiting for homes. The output values are the visitors and the adoptions. The bottom middle node's bias holds it at zero every day. Predict the error that reaches the top and bottom middle nodes in the first two rounds.

    Open lesson
  3. Predict

    The Farmers Market Predictor

    This network predicts a Saturday at a farmers market, with 2 middle layers. The input values are the craft stalls and fruit stalls. The output values are the crafts and fruit bags sold. The errors now have 2 middle layers to cross. Predict the error at the second middle layer, then at the first, in the first round.

    Open lesson
  4. Observe

    The Weather Forecaster 01

    This network forecasts sun, cloud, rain or storm. The input values are today's temperature, humidity, pressure and wind. The output values are the four kinds of weather. Four errors travel back to six middle nodes. Observe how the errors reach all six middle nodes. Try stage mode with this one.

    Open lesson
  5. Observe

    The Weather Forecaster 02

    This network forecasts sun, cloud, rain or storm through three middle layers of six. The input values are the temperature, humidity, pressure and wind. Sending the errors back through three middle layers takes a lot of work. Observe the errors in every column. Try swift mode with this one.

    Open lesson

Ready to learn how AI learns?

Start Learning How AI Learns