The correlation between the NLL and molecular similarity implies that sampling to a specific NLL threshold corresponds to exhaustively sampling of the near-neighborhood chemical space around a given source molecule. That is, given a source molecule of interest, the proposed training method for the transformer model creates a controlled and approximately complete enumeration of the local, precedented nearneighborhood chemical space for a given source molecule. The user can decide how large the chemical space should be sampled by varying the beam size. To demonstrate this results, we exhaustively sampled the near-neighborhood of all molecules in the TTD database with a large beam size of B = 30, 000. All of the resulting generated target molecules with Tanimoto similarity greater or equal than 0.8 were extracted. We denote this set the near-neighborhood. Larger molecules have a larger near-neighborhood chemical space for a for a fixed Tanimoto similarity, and therefore source molecules were grouped based on their heavy atom count (HAC). Between O and O(10 4 ) on average near-neighbors for source molecules between 13 and 36 heavy atoms, respectively (Figure ) were identified. A similarity threshold of 0.8 is chosen for illustrative purposes and represents a reasonable choice for a near-neighborhood chemical space.Figure depicts the estimated near-Table : Combined results for all compounds in the TTD database for beam size B = 1, 000 and the different transformer models. A higher value is the better for all the columns, and the best results are highlighted in bold. D and D c represent the training sets generated with ECFP4 fingerprints without and with counts, respectively. The sub-columns P, C, and NS under Uniqueness and Top Identical denotes different type of post-processing applied to the generated target compounds. The sub-columns are fraction unique SMILES strings (P), fraction unique SMILES strings after canonicalization (C), and fraction unique SMILES strings after removing stereo-chemical information and canonicalization (NS). λ = 0 denotes the absence and λ = 10 the presence of the regularization term when training the transformer models. To understand how close the results are to a truly exhaustive sampling of the local chemical space, we created the GDB-12 database, which was extracted from the GDB-13 database. The GDB-12 database enumerates all possible compounds based on a set of rules up to 12 heavy atoms. The heavy atoms used are C, N, O, S and Cl. This is, to our knowledge, the most complete lower bound of the possible density of organic chemical space available. For each compound in GDB-12, we computed the number of neighbors inside GDB-12 up to the same similarity threshold, and grouped them by the HAC.