Glossary

Latent Space

The compressed, continuous representation space a generative AI model uses internally — where similar molecules, proteins, or data points cluster together, and where interpolation and search can discover new candidates.


What it means

A latent space is the internal compressed representation that a generative model learns to map its inputs into. Rather than working with raw data directly (thousands of atoms, millions of pixels, hundreds of amino acids), generative models compress inputs into a much lower-dimensional “latent” representation that captures the essential structure of the data.

The term “latent” means hidden or underlying — the latent space encodes the abstract properties of the data that the model has learned, not the raw data itself.

Why it matters for scientific discovery

The latent space concept is central to how AI-driven molecular and protein design works:

Smooth interpolation: In the original data space, two different molecules are just different sequences of atoms. In a well-trained latent space, the “path” between two molecules corresponds to a continuous transition, and points along that path represent plausible intermediate molecules. This enables:

  • Molecular optimization: Start from a known active compound, move in the direction of better properties in latent space, decode back to a molecule
  • Generating analogues: Explore the neighborhood around a known compound to find structurally similar candidates with varying properties

Property gradients: If a model has learned a good latent space, related properties should vary smoothly. This makes it possible to optimize toward a target (higher potency, lower toxicity) by searching the latent space rather than exhaustively enumerating chemical structures.

Concrete examples

  • Variational autoencoders (VAEs) for molecules: Tools like REINVENT use VAE-based latent spaces where molecules are encoded to points, and new molecules are generated by decoding points in that space. Sampling nearby points gives structurally similar molecules.
  • Diffusion models: GenCast and RFdiffusion work in latent space — the diffusion process adds and removes noise in the latent representation, not in raw data space
  • BioNeMo’s MolMIM: Uses a latent space to enable constrained molecular generation and optimization

Limitations

  • The latent space learned by a model is only as good as its training data — it can’t represent molecules or proteins unlike anything in the training distribution
  • “Moving in latent space” doesn’t guarantee the decoded output is synthesizable, stable, or functional — experimental validation is always required
  • Latent spaces are high-dimensional and abstract; they’re not directly interpretable without additional analysis