Improving the reliability of molecular string representations for generative chemistry
preprint
OA: closed
Abstract
Generative modeling for chemistry has advanced rapidly in recent years, but this surge in popularity raises a foundational question: which molecular representation is best suited for modern machine learning models? Despite not being designed for generative tasks, SMILES remain the most commonly used string-based representation. However, while SMILES follow strict syntactic rules, grammatically correct SMILES strings do not always correspond to valid molecules. SELFIES were introduced as an alternative that addresses this limitation by ensuring that every string of SELFIES tokens represents to a valid molecule. In this study, we comprehensively evaluate the limitations of both SMILES and SELFIES as representations for generative models. We define two key criteria for robust molecular generation: viability, generated strings represent novel, unique molecules with correct valence, and fidelity, the distribution of physicochemical properties from sampled molecules resembles that of the training data. We find that approximately one-fifth of molecules generated using canonical SMILES are invalid, failing the viability criterion. In contrast, all SELFIES-generated molecules are viable, but they deviate significantly from the training distribution, indicating low fidelity. To address these limitations, we develop data augmentation procedures for both representations. While simplifying the SELFIES grammar yields only modest gains in fidelity, our stochastic augmentation method for SMILES, ClearSMILES, significantly improves both viability and fidelity. ClearSMILES simplifies syntax by reducing the vocabulary size and explicitly encoding aromaticity via Kekulé SMILES, making it easier string representations for models to process. Using ClearSMILES, the rate of invalid samples decreases by an order of magnitude, from 20% to 2.2%, and fidelity to the training distribution is also moderately improved. Generative chemistry has seen rapid development recently. However, models based on string representations of molecules still rely largely on SMILES 1 that have not been developed for this context and SELFIES 2 who were introduced to reduce those problems. The goal of this study is to first analyze the difficulty encountered by a small generative model when using SMILES and SELFIES. Our study found that SELFIES and canonical SMILES 3 are not fully reliable representations for a small generative model, i.e. do not ensure concurrently the viability and fidelity of samples. Viable samples represent novel, unique molecules with correct valence, while fidelity is efficient distribution learning of key physico-chemical properties. 4 In fact, 20% of the samples generated using canonical SMILES input representation do not correspond to valid molecules. In contrast, samples generated using SELFIES were all viable but where not able to reproduce as well the distribution of physico-chemical properties as SMILES. As a mitigation strategy for the previously identified problems, we have developed data augmentation procedures for both SELFIES and SMILES. Simplifying the complex syntax of SELFIES yielded only marginal improvements in string stability and overall fidelity to the training set. For SMILES, we developed a stochastic data augmentation procedure called ClearSMILES, which reduces the vocabulary size needed to represent a SMILES dataset, explicitly represents aromaticity via Kekulé SMILES, 3 and reduces the effort required by deep learning models to process SMILES. ClearSMILES reduced the rate of invalid samples by an order of magnitude, from 20% to 2.2%, and improved the fidelity of samples to the training set.
My notes (saved in your browser only)
Citation neighborhood (no data yet)
We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2024) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.
Source provenance
- europepmc
- last seen: 2026-05-20T01:45:00.602351+00:00