In total, the dataset had 21065 molecules with measured pIC50 values. Once trained, we passed each molecule in the training set through the model and recorded their latent vectors in tree and graph space. To ascertain that the model had learned chemically relevant information, we performed PCA on these vector collections and correlated the resulting principal components projections with known chemical properties, such as molecular weight and the calculated logarithm of the octanol / water partition coefficient (cLogP). Significant correlations were observed especially in the tree space (Supplementary Figures and), indicating linear exploration of that latent space would yield molecules with varying properties. Correlations between assay activity and individual principal components are weaker, as activity is modeled as function of the entire joint latent space through a residual neural network. Accordingly, activity gradients emerge only over multiple principal components (Supplementary Figure ). Through a random split cross-validation regime (see Methods), we also ensured that the learned features supported both tree and graph reconstruction as well as activity prediction. The average tree and graph reconstruction errors for the model were 6% and 8%, respectively, while the correlation of prediction with the experimental pIC50 for the latent space activity model was r 2 = 0.46. We also ascertained that the model was able to generate valid molecules. We sampled 1000 latent random vectors and decoded them.