To better understand the invalid SMILES, the parsing errors captured by the RDKit were classified into 6 different error types (Figure ). It should be noted that in the case of sequences with multiple types of errors only the first error is reported and that the chemical validity of sequences with grammar errors cannot be assessed. Interestingly, while the RNN-based models and GAN mainly produced chemistry-related errors, the VAE outputs contain more SMILES grammar errors. Qualitative analysis of invalid SMILES produced by a similar VAE has previously shown that this type of generator often has problems matching pairs of parenthesis and ring symbols . Regarding the chemistry-related errors, aromaticity mistakes were the most prevalent for the RNN-based generators whereas valence errors were most prevalent for the GAN models. This lower prevalence of other errors suggests that RNN and GAN models are better able to learn the SMILES grammar. De novo generators that evade the problem of SMILES validity by using SELFIES or graph representations have also been developed, but are currently less widely-used than SMILES-based generators [12, 14, 51, 52]. Overall, these results demonstrate that the prevalence and nature of invalid outputs of different SMILES-based generative models vary and that a variety of different errors have to be rectified in order to correct them. The SMILES corrector was trained on the task of fixing invalid SMILES and evaluated on a test set with synthetic errors, their corresponding valid SMILES, and on the invalid outputs generated by the de novo generators (Figure ). Evaluation using the synthetic test set showed that 93 % of these invalid SMILES could be fixed. The molecule reconstruction rate of the translator was 78 %. This is in line with the findings of Bjerrum et al. which showed that the reconstruction rate is lower for translation between differently represented molecules, meaning that fixed molecules do not necessarily represent the original molecule .