A latent space is the internal space of representations that a machine learning model learns, in which each input – a word, an image, a sound – becomes a point described by a list of numbers. “Latent” means hidden: the coordinates are learned during training rather than designed by people, they capture the features that matter for the model’s task, and meaning usually lies in directions and distances rather than in single axes. Similar things end up close together, and directions in the space often correspond to meaningful properties.
Geometry of meaning
The idea is easiest to see in word embeddings. In 2013 Tomas Mikolov and colleagues showed that in learned word vectors, including those of Google’s word2vec, simple vector arithmetic captured relationships: the vector for “king” minus “man” plus “woman” lands near “queen” – though critics note that such analogies usually work only when the input words are excluded from the possible answers. In generative adversarial networks, moving smoothly through the latent space produces faces that gradually change age, expression or hairstyle. In an autoencoder, the small code in the middle of the network is a latent space that compresses the input to its essentials.
Generating in latent space
Many generative models work in latent space because it is far smaller than raw data. Stable Diffusion, released in 2022, uses an autoencoder to compress a 512-by-512-pixel image into a latent grid about 48 times smaller, runs its diffusion model there and then decodes the result into pixels, which helped make high-quality image generation possible on ordinary graphics cards (see Text-to-Image). Video and audio generators use the same trick. Yann LeCun has long argued that future AI should predict in latent space rather than in pixels or words, so that it learns what matters about the world instead of every detail (see World Model).
Reading and steering
Inside large language models, the internal activations form high-dimensional spaces in which many concepts appear to be encoded as directions – the linear representation hypothesis – though some, such as days of the week, are arranged in circles instead. Interpretability researchers use tools such as sparse autoencoders to find these directions and can amplify or suppress them to change a model’s behavior, as in Anthropic’s Golden Gate Claude. The same structure carries risks: biases in training data show up as biased geometry, such as associations between professions and gender, though how best to measure such bias is debated (see Algorithmic Bias). The phrase has also entered culture: artists speak of “exploring the latent space” of an image model to find unexpected styles, and the artist Supercomposite said the unsettling figure of Loab emerged in 2022 from negative prompts that pushed an image model into odd corners of its latent space – a story some treated as partly creepypasta.
Why it matters
Latent spaces are where modern AI does its work: a model’s knowledge, stored in its weights, shows up as geometry – distances and directions among the representations it computes. Understanding this helps explain how models generalize, mix concepts creatively and sometimes go wrong – and it gives researchers a handle for examining and steering what models have learned.
Written with Claude, made by Anthropic, whose interpretability research – including the Golden Gate Claude demo discussed here – studies and steers directions in Claude’s internal representations; Wes Gurnee, a co-author of the cited study on circular features, later joined Anthropic.
Related
Embedding · Autoencoder · Diffusion Model · Generative Adversarial Network · Interpretability · Sparse Autoencoder · World Model
Sources: Tomas Mikolov, Wen-tau Yih, Geoffrey Zweig: Linguistic Regularities in Continuous Space Word Representations (NAACL) (2013) · Tomas Mikolov et al.: Efficient Estimation of Word Representations in Vector Space (arXiv) (2013) · Malvina Nissim, Rik van Noord, Rob van der Goot: Fair Is Better than Sensational (Computational Linguistics) (2020) · Robin Rombach et al.: High-Resolution Image Synthesis with Latent Diffusion Models (arXiv) (2021) · Kiho Park, Yo Joong Choe, Victor Veitch: The Linear Representation Hypothesis and the Geometry of Large Language Models (arXiv) (2023) · Joshua Engels et al.: Not All Language Model Features Are Linear (arXiv) (2024) · Adly Templeton et al. (Anthropic): Scaling Monosemanticity (Transformer Circuits Thread) (May 2024) · Tolga Bolukbasi et al.: Man is to Computer Programmer as Woman is to Homemaker? (arXiv) (2016)
Leave a Reply