liveBook · Manning

Latent space

Also called representation space, Z

A latent space is a learned representational space in which numerical coordinates encode information or features inferred from observed data.

How 22 Manning books explain it

Build AI Drug Discovery Pipelines

A latent representation is a learned internal encoding of input data in a continuous or structured representation space.

How it is used
Uses latent space to navigate compressed molecular representations for de novo design and property optimization.
How deep it goes
Develops autoencoder and VAE implementations, evaluation criteria, and training trade-offs; defers longer probabilistic derivations and complete training code.
Examples
Uses SMILES reconstruction, the MOSES benchmark, and the GENTRL molecular generation system to illustrate learned representations.
What you can do after
Builds molecular autoencoders and a VAE-CYC model from scratch, then evaluates reconstruction and generated molecules.

Read how Build AI Drug Discovery Pipelines explains latent space →

Build a Text-to-Image Generator (from Scratch)

A latent space is a lower-dimensional representation space in which encoded data is represented before decoding or further generation.

How it is used
Moves image generation into compact representations and supports image–text comparison or image-token prediction, depending on the model.
How deep it goes
Traces VAE encoding, latent denoising, decoding, and VQGAN quantization through tensor shapes and examples; defers a more formal VAE introduction.
Examples
Compares compressed and reconstructed beaver and dolphin images, then traces prompt-conditioned denoising of a 4 × 64 × 64 latent.
What you can do after
Apply it via a pretrained VAE and diffusion model to encode, inspect, denoise, and decode latent images.

Read how Build a Text-to-Image Generator (from Scratch) explains latent space →

Learn Generative AI with PyTorch

A latent representation produced by the encoder and passed to the decoder for reconstruction or generation.

How it is used
Uses latent representations as compressed inputs for reconstruction and sampled inputs for generating varied data.
How deep it goes
Works through latent dimensions, sampling, reconstruction loss, conditional inputs, and interpolation in generative models.
Examples
Demonstrates handwritten-digit reconstruction, face generation and interpolation, and music generation with four noise inputs.
What you can do after
Builds autoencoders and GAN generators and applies trained models to reconstruct images, sample new ones, and interpolate between outputs.

Read how Learn Generative AI with PyTorch explains latent space →

Math and Architectures of Deep Learning

A learned lower-dimensional representation of an input.

How it is used
Frames representation learning, generative modeling, classification, similarity estimation, and dimensionality reduction around compact embeddings.
How deep it goes
Derives manifold projection and VAE probabilistic regularization, then connects reconstruction and KL losses to PyTorch implementations.
Examples
Uses giraffe images, mugshots, polar-coordinate circles, MNIST digits, and smooth-versus-zigzag manifolds.
What you can do after
Build it from scratch with encoder-decoder networks and reconstruction plus KL-divergence losses for regularized VAEs.

Read how Math and Architectures of Deep Learning explains latent space →

Deep Learning with R, Third Edition

A latent space is a vector representation space in which tokens are positioned so that geometric relationships encode learned semantic or contextual relationships.

How it is used
Uses latent spaces to explain learned representations for text classification and image generation.
How deep it goes
Explains embedding geometry and training, then implements sampling and decoding in a two-dimensional variational autoencoder.
Examples
Illustrates animal-word directions, an LSTM sentiment classifier, and a grid of decoded MNIST digits.
What you can do after
Applies latent spaces via R/Keras to learn token embeddings and decode sampled points into digit images.

Read how Deep Learning with R, Third Edition explains latent space →

Inside Deep Learning: Math, Algorithms, Models

A learned internal encoding of input data intended to preserve information useful for later use or understanding.

How it is used
Uses latent vectors to encode inputs for later tasks and to generate or manipulate images.
How deep it goes
Defines encoder and generator mappings, then works through dimension choices, interpolation, and semantic edits without guaranteeing representation quality.
Examples
Compares reconstructed handwritten digits, generates digits from sampled vectors, and interpolates or edits generated faces.
What you can do after
Apply it via PyTorch to sample GAN inputs, compare conditional outputs, interpolate vectors, and try labeled semantic edits.

Read how Inside Deep Learning: Math, Algorithms, Models explains latent space →

Deep Learning with Python, Third Edition

An encoded internal representation in latent space that preserves the structure needed for generation or manipulation.

How it is used
Uses latent spaces to explain sampling, image generation, editing, and the role of learned representations in language models.
How deep it goes
Explains encoding, sampling, decoding, and interpolation through worked implementations without emphasizing mathematical derivations.
Examples
Demonstrates a two-dimensional MNIST digit grid and interpolation between text prompts to generate images.
What you can do after
Build a VAE with Keras and sample its latent space; interpolate text embeddings to explore generated images.

Read how Deep Learning with Python, Third Edition explains latent space →

Graph Neural Networks in Action

The space of lower-dimensional representations produced by an encoder, with each point representing encoded information about an input.

How it is used
Supports graph reconstruction, missing-link prediction, and sampling candidate molecules from encoded representations.
How deep it goes
Defines encoder–decoder compression, then works through fixed versus sampled representations, regularization, and graph-model training.
Examples
Uses product-graph edge prediction, QED-guided molecule generation, and latent edge-type probabilities for trajectory prediction.
What you can do after
Apply it via PyTorch Geometric to encode graphs, decode candidate edges, and train a variational model with KL loss.

Read how Graph Neural Networks in Action explains latent space →

AI-Powered Search

A latent factor is a learned, lower-dimensional attribute inferred from data to represent an underlying pattern associated with users or items.

How it is used
Uses latent features to support collaborative recommendations and personalized search boosts from user signals and document content.
How deep it goes
Explains factorization, preference prediction, and embedding dimensions while deferring language-model training mechanics.
Examples
Illustrates inferred preferences with movie purchases and appliance colors, and generates product-name embeddings.
What you can do after
Evaluate and understand how latent features predict preferences and where signal-dependent recommendations face cold start.

Read how AI-Powered Search explains latent space →

Evolutionary Deep Learning: Genetic algorithms and neural networks

A latent space is the multidimensional representation space in which an encoder places input data for decoding or generation.

How it is used
Supports image reconstruction and generation in VAEs, and supplies random-noise inputs to GAN generators.
How deep it goes
Works through VAE sampling, decoder wiring, loss terms, and two-dimensional traversal without deriving the underlying mathematics.
Examples
Uses 28×28 decoded image grids from two-dimensional VAE coordinates and a GAN generator receiving 100-dimensional noise.
What you can do after
Build it from scratch by wiring VAE sampling and decoder inputs, or by feeding random latent vectors into a GAN generator.

Read how Evolutionary Deep Learning: Genetic algorithms and neural networks explains latent space →

Optimization Algorithms: AI techniques for design, planning, and control problems

A latent space is a lower-dimensional representation space whose vectors encode information about observed data or structures.

How it is used
Uses graph structure and features to create compact vectors for downstream graph learning tasks.
How deep it goes
Explains the encoding objective, encoder-decoder variant, and transductive-inductive distinction, then demonstrates GCN training.
Examples
Demonstrates node embeddings with a two-layer GCN trained on the Cora dataset using PyTorch Geometric.
What you can do after
Builds node embeddings by implementing and training a GCN with PyTorch Geometric.

Read how Optimization Algorithms: AI techniques for design, planning, and control problems explains latent space →

Outlier Detection in Python

A latent space is a lower-level representation space whose coordinates encode hidden factors or inputs associated with observations.

How it is used
Supports dimensionality-reduced representation, visualization, and outlier detection within autoencoders, VAEs, and GANs.
How deep it goes
Explains middle-layer embeddings, probabilistic coordinates, and detector use, but stops short of making latent dimensions interpretable.
Examples
Uses two-neuron autoencoder scatterplots and GAN noise vectors to demonstrate visualization, generation, and inverse encoding.
What you can do after
Apply outlier detectors to encoded observations and inspect low-dimensional embeddings without treating their coordinates as inherently meaningful.

Read how Outlier Detection in Python explains latent space →

Generative AI in Action

A latent space is a lower-dimensional representation space in which data items are encoded by features that capture meaningful structure and similarity.

How it is used
Supports image generation, reconstruction, inpainting, style transfer, semantic manipulation, and text-image matching.
How deep it goes
Explains encoding, sampling, noise diffusion, and adversarial input roles, while deferring detailed Stable Diffusion setup, configuration, and deployment.
Examples
Uses reconstructed or inpainted images, panda generation, GAN noise inputs, and CLIP-based text-image matching.
What you can do after
Evaluate/understand how generative models encode, perturb, sample, and reconstruct data through latent representations.

Read how Generative AI in Action explains latent space →

Sutskever's List

An internal representation that encodes input information in a lower-dimensional or transformed latent space.

How it is used
Compresses input information into a code that supports reconstruction while preserving useful structure.
How deep it goes
Explains encoding, reconstruction, clustered regions, off-manifold sampling, and VLAE information allocation without formal derivation.
Examples
Uses handwritten digits to illustrate learned features, disconnected clusters, and lossy reconstructions.
What you can do after
Understand how latent codes preserve global structure while leaving local detail to a decoder.

Read how Sutskever's List explains latent space →

Machine Learning Algorithms in Depth

A latent space is the representational space of unobserved variables or encoded representations associated with observed data.

How it is used
Uses encoded variables for dimensionality reduction, feature extraction, generative reconstruction, and unsupervised time-series anomaly detection.
How deep it goes
Defines encoder, decoder, distributions, sampling, and ELBO regularization, then implements an LSTM-VAE anomaly detector from scratch.
Examples
Uses bottleneck representations, reconstructed images, Gaussian samples, sensor signals, square waves, and NAB time-series data.
What you can do after
Apply latent representations by implementing a Keras/TensorFlow LSTM-VAE and thresholding reconstruction log-likelihood drops.

Read how Machine Learning Algorithms in Depth explains latent space →

Local Image Generation

A lower-dimensional representation space in which encoded data is represented by numerical latent variables.

How it is used
Uses compact latents as the main working representation for Stable Diffusion image generation.
How deep it goes
Explains encoding, decoding, compression, scale reduction, and reconstruction limits without detailing VAE internals.
Examples
Uses a Metropolis frame, 512×512-to-64 latent reduction, imperfect reconstruction, and Keatsie-related dog changes.
What you can do after
Evaluate how image models trade pixel-level fidelity for compact representations and why LoRA changes can spill into related concepts.

Read how Local Image Generation explains latent space →

Build AI-Enhanced Web Apps

An embedding space is a continuous mathematical space in which embeddings are positioned so that distances or relationships represent properties of the underlying data.

How it is used
Supports similarity search by placing queries and known items in a shared vector space.
How deep it goes
Explains vectors, attributes, proximity, and ranking through an implementation-oriented analogy.
Examples
Uses restaurant dishes, a cat embedding, and projected word-embedding neighbors.
What you can do after
Apply via similarity search to rank known items against a query vector.

Read how Build AI-Enhanced Web Apps explains latent space →

Machines that Think

A latent space is an internal numerical space in which learned representations encode underlying factors of data and nearby points correspond to related outputs.

How it is used
Uses latent space to explain compressed representations, reconstruction, and the generation of new samples.
How deep it goes
Explains bottleneck compression and smooth latent spaces conceptually, without implementation or mathematical detail.
Examples
Illustrates compression with a chair description and generation with gradually changing neighboring climates.
What you can do after
Evaluate and understand how compressed representations support reconstruction, noise removal, anomaly detection, and generation.

Read how Machines that Think explains latent space →

Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

A latent space is a lower-dimensional representation space in which a model encodes condensed information about observed data.

How it is used
Explains how variational autoencoders compress tabular data before reconstructing it or generating synthetic rows.
How deep it goes
Defines encoder-decoder flow and distributional purpose, but stops short of latent-variable mathematics or detailed training mechanics.
Examples
Uses German Credit Risk data and SDV's TVAESynthesizer to generate 10,000 synthetic examples.
What you can do after
Apply it via SDV's TVAESynthesizer to fit tabular data and sample synthetic rows.

Read how Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI explains latent space →

Introduction to Generative AI, Second Edition

A latent representation is a compressed numerical representation that captures patterns or characteristics of the original data.

How it is used
Explains how image-generation systems compress visual characteristics before reconstructing or transforming images.
How deep it goes
Defines the representation and describes encoder-decoder behavior, without implementation-level detail.
Examples
Uses facial expressions, face angles, skin tones, and face-swapping as concrete examples.
What you can do after
Understand how compressed image characteristics can support reconstruction and face-swapping.

Read how Introduction to Generative AI, Second Edition explains latent space →

Build a DeepSeek Model (From Scratch)

A latent space is a lower-level representational space in which compressed or abstract features encode information from the original representations.

How it is used
Compresses key/value information into a compact cache for efficient inference in Multi-Head Latent Attention.
How deep it goes
Explains projection shapes, matrix rearrangement, and PyTorch construction, while deferring positional encodings and omitting RMSNorm from the simplified module.
Examples
Uses DeepSeek-V3 dimensions, toy matrix shapes, PyTorch projections, and associative formulas for reconstructing Values and context vectors.
What you can do after
Build it from scratch in PyTorch with down-projection, up-projection, and attention calculation, while handling caching and positional encoding separately.

Read how Build a DeepSeek Model (From Scratch) explains latent space →

Machine Learning Platform Engineering

A latent space is a learned lower-dimensional representation space in which entities are positioned according to underlying characteristics inferred by a model.

How it is used
Supports recommendation explainability and production monitoring by representing users and items as learned factors.
How deep it goes
Traces representation extraction, neighborhood explanations, and distribution monitoring, without deriving matrix-factorization mathematics.
Examples
Uses MovieLens ratings, user and item embeddings, similar-user neighborhoods, and Deepchecks factor-distribution comparisons.
What you can do after
Apply it via matrix-factorization recommenders and Deepchecks to explain recommendations and monitor latent-factor drift.

Read how Machine Learning Platform Engineering explains latent space →

Also covered in

What to know first

Related concepts

Questions about latent space

What is latent space?

A latent space is a learned representational space in which numerical coordinates encode information or features inferred from observed data.

Which Manning books explain latent space?

Build AI Drug Discovery Pipelines, Build a Text-to-Image Generator (from Scratch), Learn Generative AI with PyTorch, Math and Architectures of Deep Learning, Deep Learning with R, Third Edition, Inside Deep Learning: Math, Algorithms, Models, Deep Learning with Python, Third Edition, Graph Neural Networks in Action and 14 more.

What should I know before learning latent space?

Manning books that teach latent space usually introduce language model, normal distribution, generation and embedding first.

What is latent space also called?

Latent space is also called representation space or Z.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.