liveBook · Manning

Chapter 10: Generative Models for De Novo Design

What you will learn in chapter 10 of Build AI Drug Discovery Pipelines

The introduction frames drug discovery as a molecular design challenge and explains how a learned latent space could focus the search for new molecules.

After this chapter you will be able to

What it builds on

Section by section

Introduction

The introduction frames drug discovery as a molecular design challenge and explains how a learned latent space could focus the search for new molecules.

Key terms: molecular design, desired characteristics, generative model, latent space, chemical universe

10.1 The Quest for Designer Molecules

This section frames molecular design as a search across too many possible molecules and introduces latent space as a way to make that search more tractable.

Key terms: drug-like molecules, high-throughput screening, rational design, generative models, latent space, compressed representation

10.1.1 The Challenge of Chemical Space

This section explains why the size of chemical space and the limits of existing discovery methods motivate de novo molecular design.

Key terms: chemical space, drug-like molecules, high-throughput screening (HTS), rational design, SBDD, design-make-test-analyze (DMTA), hit, solubility, toxicity, pharmacokinetics

10.1.2 Generative Models: A New Paradigm for Molecular Design

Introduces molecular generative models and explains how a well-structured latent space can support novel molecule generation and property optimization without replacing candidate evaluation.

Key terms: generative models, de novo design, property optimization, chemical scaffolds, latent space, lower-dimensional, continuous representation, decode, latent space navigation, molecular graph

10.1.3 Reinforcement Learning for Targeted Generation

This section explains how reinforcement learning steers a generative model toward desired molecular properties, and why its outputs need safeguards and experimental validation.

Key terms: Reinforcement Learning (RL), agent, latent space, reward function, reward hacking, learned property predictor, reward model, proxy, multi-objective, hard constraints

10.2 Building the World: Generative Models for Molecules

This section explains why molecular optimization needs a reliable latent space and identifies the basic SMILES-to-vector-and-back transformation used by VAE-CYC.

Key terms: latent space, molecular optimization, VAE-CYC, SMILES strings, continuous latent vectors

10.2.1 Essential Properties of a Good Molecular Latent Space

This section explains why a molecular latent space needs validity, reconstruction, and continuity to serve as a useful map for an RL agent designing molecules.

Key terms: validity, latent vector, decoder, SMILES, RDKit, reconstruction, encoding, decoding, latent representation, structural similarity

10.2.2 Learning to Compress and Recreate: The Autoencoder

This section explains how an autoencoder compresses and reconstructs molecules and how character-level tokenization prepares SMILES strings for it.

Key terms: autoencoder, encoder, decoder, latent vector, reconstruction error, information bottleneck, SMILES, tokenization, tokens, vocabulary

10.2.3 The Autoencoder Architecture

This section explains how a molecular autoencoder embeds SMILES tokens, compresses and reconstructs their sequences, and is initialized and trained.

Key terms: embedding layer, token index, dense vector, embed_dim, one-hot encoding, encoder, bottleneck, latent vector, latent_dim, flattened

10.2.4 Experiment on the MOSES Benchmark

The section uses the MOSES benchmark to evaluate a BasicAutoencoder’s reconstruction, latent space, and molecule generation, showing why strong reconstruction alone does not make it a useful generative model.

Key terms: MOSES, canonical SMILES, train/test/scaffold splits, Token-level Accuracy, Valid Reconstruction Rate, Exact Match Rate, Tanimoto Similarity, latent space, Continuity Under Perturbation, Interpolation Smoothness

10.3 Creating a Continuous Chemical Universe: Variational Autoencoders

This section explains how variational autoencoders make molecular latent spaces samplable, how they train, and how to recognize and mitigate posterior collapse.

Key terms: Variational Autoencoder, latent space, probability cloud, mean, variance, reconstruction loss, KL divergence, prior, standard normal, β

10.4 Understanding Sequential Molecular Structure: Recurrent Neural Networks

This section explains why SMILES needs sequence-aware modeling and introduces RNNs as a way to encode and decode it.

Key terms: SMILES, sequential inductive bias, feedforward network, long-range dependencies, Recurrent Neural Networks (RNNs), sequential data, memory, encoding, decoding

10.4.1 How RNNs Process Sequences

This section explains how an RNN processes SMILES tokens through a recurring hidden state and how that sequence processing supports molecular encoding and generation.

Key terms: RNN, token, hidden state, SMILES, time step, RNN cell, tanh, unrolled, shared weights, encoder

10.4.2 Resolving Vanishing Gradients with Gated Recurrent Units

This section explains why simple RNNs struggle with long-range dependencies in molecular sequences and how GRU gates improve memory at additional computational cost.

Key terms: vanishing gradient problem, backpropagating through time, long-range dependencies, SMILES, Gated Recurrent Units, reset gate, update gate, candidate hidden state, hidden state, weight matrices

10.4.3 Seq2Seq Architecture: Encoding and Decoding Molecules

This section explains how a molecular VAE encodes SMILES into a latent vector, decodes that vector into SMILES, and handles the differences between training and generation.

Key terms: bidirectional GRU, SMILES, latent distribution, reparameterization trick, unidirectional GRU, latent vector, SOS, EOS, logits, softmax

10.4.4 Revisiting Tokenization: Byte-Pair Encoding for Molecules

This section explains how Smiles Pair Encoding gives a molecular VAE shorter, more chemically meaningful input sequences and a stronger inductive bias than character-level tokenization.

Key terms: inductive bias, character-level tokenization, latent representation, posterior collapse, Byte-Pair Encoding (BPE), Smiles Pair Encoding (SPE), atom-level tokenization, vocabulary, iterative merging, pre-trained SmilesPE tokenizer

10.4.5 Putting It All Together: VAE-CYC

This section assembles the VAE-CYC molecular generator from a SmilesPE tokenizer, a variational GRU encoder, an autoregressive GRU decoder, and training settings designed to preserve a useful latent space.

Key terms: SMILES, bidirectional GRU, latent distribution, mean, log-variance, reparameterization trick, unidirectional GRU, autoregressive, latent vector, token embeddings

10.5 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 9: Structure-based Drug Design with Active Learning Chapter 11: Graph Neural Networks for Predicting Drug-Target Affinity →

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.