Data Preparation -For training of the transformer model, molecules from ChEMBL 15 (version 28, dated back to January 15, 2021) were used. ChEMBL is a public dataset of biologically active molecules. We selected molecules with the following criteria: molecule type was "small molecule", and molecule record had an IC50, EC50 or Ki value. All disconnected structures (defined as '.' in the SMILES structural representation; typically, these are salts) were excluded, and all stereochemistry was removed. This selection resulted in 940 640 molecules. SMILES representations of the molecules were inputted into MMPDB (Matched Molecular Pair Database Generation) software to pair structurally similar molecules. For each pair, MMPDB outputs the two SMILES, the constant group, and the SMIRK, defined as the transformation rule between the two molecules. From the above-mentioned 940 640 molecules, ~57 million pairs of similar molecules were generated.