Hidden Layers and Representations

3 min
Audience
ages 10–15
Duration
30 to 40 min
Adventure
2/8
Badge to earn
Shape Architect

Today's mission

Track the shapes flowing through an MLP and describe a hidden representation without inventing a meaning for it.

Proof of success: explain "Hidden layers and representations", complete "Shape Passport" and name the limit of the analogy.

The story

Chloé has four measurements per card and wants to choose between three categories. She sketches four inputs, five hidden units, then three outputs: an MLP 4–5–3. Each card first becomes five numbers, then three scores. The five numbers are not secret labels like "round" or "fast" unless an experiment proves it. They form a learned representation useful for the task.

What is technically true

The right reflex is to tell apart observation, calculation and decision. The items below serve as beacons. Here, your anchor is "Hidden layers and representations".

  • A dense layer connects each output to all the inputs of the previous layer through weights and bias.
  • A batch shape of B × 4 becomes B × 5 then B × 3; the batch axis is preserved.
  • A hidden representation is an intermediate vector optimized for the loss, not an automatic explanation of the reasoning.

The vertical map

The map follows both the calculation and the dimensions, which makes a shape mismatch detectable. Read the diagram from top to bottom: each arrow announces a transformation or a check, never a thought inside the machine.

A useful analogy — and where it breaks

The analogy: A hidden layer is like a team that rewrites four clues from five new angles.

Where it breaks: The imaginary team members would have understandable roles; the learned units can be distributed and don't necessarily match a single word. An analogy helps you get started; it never replaces the data, the calculations or a test.

Screen-free activity — Shape Passport

Materials: twelve number cards, three envelopes labelled 4, 5 and 3, and a batch sheet
Suggested time: 10 to 20 minutes.

  1. Form a batch of two cards, each holding four values, and write its shape 2 × 4.
  2. Send each card through the hidden envelope and replace it with five fictional values.
  3. Then turn each group of five into three output logits.
  4. At each step, check that the number of cards stays at two and only the width changes.

What you should notice: an MLP transforms the representation of each example without mixing the identity of the examples in the batch.

Optional challenge

Count the parameters of a 4→5 layer: weights and bias. Then do the same calculation for 5→3.

Safety, fairness and human choice

A hidden unit shouldn't receive a flattering human name without proof. Explanations exist to test a hypothesis, not to tell a convincing story.

Responsible question: What experiment would let you check that a representation keeps an important clue for every category?

Mini-quiz with answers

  1. What does MLP 4–5–3 mean?

    Answer: Four inputs, five units in one hidden layer and three outputs.

  2. What shape comes out for a batch B?

    Answer: B × 3 after going through B × 5.

  3. Does a hidden unit necessarily represent a human concept?

    Answer: No. It takes an experimental analysis; the information can be spread across several units.

Competency badge

Shape Architect — You earn this badge if you can explain the diagram without reading, show the result of the activity and kindly correct a wrong answer.