[Paper Review] Keeping it Simple: Language Models can learn Complex Molecular Distributions
This paper demonstrates that simple language models, especially when using the SELFIES molecular representation, can effectively learn complex molecular distributions—outperforming state-of-the-art graph-based generative models on challenging tasks such as generating high-penalized LogP molecules, multi-modal distributions, and large molecules from PubChem. The results show that language models achieve superior validity, uniqueness, and novelty, even in low-data regimes.
Deep generative models of molecules have grown immensely in popularity, trained on relevant datasets, these models are used to search through chemical space. The downstream utility of generative models for the inverse design of novel functional compounds depends on their ability to learn a training distribution of molecules. The most simple example is a language model that takes the form of a recurrent neural network and generates molecules using a string representation. More sophisticated are graph generative models, which sequentially construct molecular graphs and typically achieve state of the art results. However, recent work has shown that language models are more capable than once thought, particularly in the low data regime. In this work, we investigate the capacity of simple language models to learn distributions of molecules. For this purpose, we introduce several challenging generative modeling tasks by compiling especially complex distributions of molecules. On each task, we evaluate the ability of language models as compared with two widely used graph generative models. The results demonstrate that language models are powerful generative models, capable of adeptly learning complex molecular distributions -- and yield better performance than the graph models. Language models can accurately generate: distributions of the highest scoring penalized LogP molecules in ZINC15, multi-modal molecular distributions as well as the largest molecules in PubChem.
Motivation & Objective
- To evaluate the capacity of simple language models to learn complex molecular distributions that are difficult for existing generative models.
- To compare language models using SMILES and SELFIES representations against state-of-the-art graph-based generative models (JTVAE and CGVAE).
- To investigate whether language models can generalize to complex, multi-modal, and large-scale molecular distributions where graph models fail.
- To assess the impact of molecular representation (SMILES vs SELFIES) on model performance and generalization.
- To provide benchmark tasks and datasets to stimulate future research in molecular generative modeling.
Proposed method
- Constructed three challenging generative modeling tasks: (1) penalized LogP distribution from ZINC15, (2) multi-modal distribution combining diverse molecular types (GDB13, CEP, POLYMERS), and (3) large molecules from PubChem.
- Trained recurrent neural network (RNN) language models on SMILES and SELFIES string representations using LSTM architectures with dropout and learning rate optimization.
- Used two standard graph-based generative models: JTVAE and CGVAE, trained on the same tasks for direct comparison.
- Applied hyper-parameter search via random search over 100 configurations to optimize each model’s performance.
- Evaluated models using standard metrics: validity, uniqueness, novelty, and Wasserstein distance to the training data distribution.
- Employed SELFIES, a grammar-compliant molecular string representation ensuring all generated strings are chemically valid a priori.
Experimental results
Research questions
- RQ1Can simple language models learn complex molecular distributions that are difficult for state-of-the-art graph-based models?
- RQ2How does the choice of molecular representation (SMILES vs SELFIES) affect the performance and generalization of language models in molecular generation?
- RQ3Do language models outperform graph-based models in generating molecules from multi-modal or high-molecular-weight distributions?
- RQ4To what extent do language models memorize training data versus generalize to unseen, valid molecules?
- RQ5Can language models effectively learn distributions with subtle energy/property differences, such as penalized LogP scores?
Key findings
- Language models trained on SELFIES outperformed those on SMILES in all tasks, particularly in the large-scale task, showing higher validity, uniqueness, and novelty.
- The SMILES-based RNN achieved high Wasserstein distance to the training data, suggesting significant memorization, while the SELFIES RNN showed better generalization despite slightly worse Wasserstein metrics.
- Graph-based models (JTVAE and CGVAE) failed to learn the main mode in the penalized LogP task and could not train on the largest molecules in PubChem.
- JTVAE struggled with the multi-distribution task due to the need to learn diverse tree structures, including ring-only and acyclic molecules.
- CGVAE failed on the multi-distribution task due to the difficulty of learning diverse generation traces with a single sampled trace during training.
- Language models successfully generated molecules from all three complex distributions, including the highest-scoring penalized LogP molecules and the largest PubChem molecules, demonstrating robust generalization.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.