Molecular Fragments are extracted from molecules in the ChEMBL database . For each molecule, we randomly sample fragments by extracting subgraphs that contain In the first step, we train a VQ-VAE that embeds molecular fragments. In the second step, we train a search policy that uses the learned latent space as an action space. The search policy starts an episode by sampling a molecule from the frontier set F , which consists of an initial set of good molecules (I), and good molecules discovered by the policy (C). The molecule is encoded by an MPNN, which is then used to predict either an Add or Delete action. When the Add action is selected, the model predicts and samples an atom as the attachment point and subsequently predicts a fragment to attach to that atom. When the Delete action is selected, the model samples a directed edge, indicating the molecular fragment to be deleted.