Transformers In addition to the token-based RNNs, DrugEx includes two fragment-based models that are variants of the transformer model using either graphs or sequences as molecular representations. For the fragment-based modelling, molecules are constructed from building blocks (detailed in section 2.1.2). These fragments are combined to create fragmented scaffolds, which form the input for the model and are grown into novel molecules.