>_TheQuery
← Glossary

Latent Space

Deep Learning

A lower-dimensional representation space learned by a model where similar inputs are mapped to nearby points, capturing the essential structure of the data.

A latent space is the internal representation space that a model uses to encode input data. When a neural network processes an image of a face, the intermediate layers transform the raw pixel values into a compact vector in latent space that captures essential attributes like pose, expression, lighting, and identity. Similar faces map to nearby points in this space, while dissimilar faces are far apart.

Latent spaces are central to many AI architectures. Autoencoders compress inputs into a latent bottleneck and reconstruct them, learning efficient representations. Variational Autoencoders (VAEs) impose structure on the latent space (typically a Gaussian distribution), enabling smooth interpolation and generation of new examples. Generative Adversarial Networks learn latent spaces where different directions correspond to interpretable attributes (e.g., adding glasses, changing hair color).

The power of latent spaces is that they capture the intrinsic dimensionality of data, which is typically much lower than the raw input dimension. A 256x256 RGB image has 196,608 dimensions, but the space of meaningful face images can be represented in a few hundred dimensions. Word embeddings are another example: the latent space of word vectors captures semantic relationships (king - man + woman = queen), enabling arithmetic on meaning.

Last updated: February 22, 2026