Codiqo

Understanding AI · lesson 32 of 60 · about 5 minutes

What Each Layer Notices

Early layers spot simple things; later layers combine them into bigger ideas. See how a network builds understanding.

What you'll learn

  • Describe what early and later layers tend to find
  • Explain how simple features combine into complex ones
  • Explain why nobody tells the layers what to look for

Simple to complex

When researchers looked inside networks that recognise photos, they found a striking pattern. The first layers react to simple things: edges, lines, patches of colour. Middle layers react to shapes made from those: circles, corners, stripes. Later layers react to whole parts: eyes, wheels, fur.

The last layer combines those parts into an answer: cat, car, face.

Nobody told them

No one programmed a layer to look for eyes. The network discovered, through training, that finding eyes helps it get faces right. The features are learned, not designed.

A pretend picture of the idea: each layer's findings feed the next.

layer_1 = ["edges", "colours"]
layer_2 = ["circles", "corners"]
layer_3 = ["eyes", "ears"]
answer = "cat"
for found in [layer_1, layer_2, layer_3]:
    print(found)
print("so:", answer)

Output

['edges', 'colours']
['circles', 'corners']
['eyes', 'ears']
so: cat

Tip

Nobody tells a network what to look for. It finds whatever helps.

Now try it yourself

This lesson is free in Codiqo, with 6 questions on what you just read. You can only learn to code by writing code, so it ends with a short program you write yourself, which we run and check straight away.