Back to Discover
Spark

How Examples Teach Computers

A computer learns from examples by turning each mismatch between its prediction and the correct answer into a small parameter adjustment; after many adjustments, it captures a pattern that transfers to new cases.

Before you enter

A complete interactive classroom, not just a preview.

Start when you are ready to enter this Stage's 4 scenes and explore, respond, and learn as you go.

4
Scenes
8 min
Estimated
Content language: en-US
Start this Stage
Sign-in may be required to play
What happens inside
  1. 01The Name That Photo Trickslide
    Slot 1Hook

    Start with a familiar surprise: after seeing only a handful of tagged photos, the app begins labeling brand-new pictures correctly.

    • Only a few examples are used
    • The photos are new, not exact copies
    • The computer must be doing something more than memorizing
    Phenomenon

    A photo app labels new pictures of a person after seeing only a handful of tagged examples.

    Question

    What could the computer be doing with those examples to recognize a face it has never perfectly seen?

  2. 02Is It Just a Giant Memory?slide
    Slot 2Tension

    Consider the tempting idea that the computer stores every example and matches new inputs against them.

    • Computers are good at storing data
    • Exact matching would fail with new lighting and angles
    • Something deeper must create the ability to generalize
    Prediction

    Perhaps the computer compares each new input to stored examples and returns the closest match.

    Tempting intuition

    Since computers store data so well, learning seems like saving examples and then doing a lookup — no real pattern-making needed.

  3. 03Error-Adjust Simulatorinteractive
    Slot 3Reveal

    Move the slope and intercept knobs to fit a set of example points and watch the total error change. The knobs are the computer's parameters.

    • Each example gives a prediction and an error
    • Turning the knobs changes the pattern
    • Small error-driven corrections are what learning looks like
    Evidence

    When the line misses the example points, the error number is high; moving the knobs in the right direction makes the error shrink on the examples.

    Conclusion

    Learning from examples is not copying them; it is repeatedly turning mistakes into parameter corrections.

    Mechanism
    1. 1Each example produces a prediction and an error: predicted answer minus actual answer.
    2. 2The computer nudges its parameters in the direction that reduces that error.
    3. 3Repeating many small nudges across examples shapes a pattern that captures the underlying relationship.
  4. 04The Real Sign of Learningslide
    Slot 4Takeaway

    Test the idea in a nearby situation: after learning from a few tagged photos, a spam filter can sort new emails it has never seen before.

    • New data is the real test
    • Small corrections create transferable patterns
    • Error on unseen examples matters more than memory
    Transfer

    After seeing tagged photos, the same error-adjustment rule explains how a spam filter learns to sort messages it has never met.

    Expected inference

    If a model only memorized training examples, it would fail on new inputs; success on unseen input is the real sign it has learned a pattern.

Discussion

Discussion threads for a Stage aren't available yet.

Where this leads
Explore more

More in Technology & Computing

See all