CoursesAIMathCodePhysicsAbout and FAQ

TwiddleLab / Artificial Intelligence / Generative AI: Making New Things

Latent Space Walks

Lesson 3 of 11 · 7 min · Free, no account needed

What you will learn

  • Every code is a point in the latent space, and the decoder turns every point into a critter.
  • Interpolation walks from code A to code B: (1 − t) · A + t · B gives a real in-between critter, not a blend of two pictures.
  • A latent direction is an arrow that changes one feature, like fur, for any critter.
  • Far outside the cloud of training codes the decoder draws junk.

Start the lesson

How the lesson goes

  1. Start with a spiky critter. End with a fluffy one. What's halfway?

    Tap the picture you expect.

  2. Walk from A to B on the code map. Stop when the fur is exactly halfway.

    The decoder draws the point you are on. Next to it: the two pictures simply blended.

  3. The yellow arrow means more fur. Use it to make C fluffy.

    Drag the arrow's round tail onto a critter. Its ears should stay the same.

  4. The map of codes is the latent space.

    Walks and arrows in it change critters smoothly.

  5. Find a critter with long ears and spiky fur.

    Drag the blue point. Stay inside the dashed cloud.

  6. Which pins will decode to junk?

    Tap all of them, then Check.

    A decoder is trained only on codes of real critters. Codes far outside that cloud are places it never practised, so what it draws there is junk.

  7. Math: put the dot a quarter of the way from a to b.

    The point at t is (1 − t) · a + t · b, with t = 0.25.

  8. Where does A + fur arrow land?

    Tap P1, P2 or P3.

    Adding an arrow to a code moves the point by the arrow: (−1 + 1.6, −1.5 + 1.2) = (0.6, −0.3). That is A with more fur.

  9. Arrow golf: turn your critter into the target in as few moves as you can.

    You start at the long-eared spiky critter you found. Each button moves 0.5 along one arrow.

Previous lesson: Autoencoders: Squeeze and Rebuild · Next lesson: GANs: Forger vs Detective · Part of the course: Generative AI: Making New Things

Lessons are interactive and need JavaScript. Turn it on to play them.

Loading TwiddleLab