[Paper Review] BARTSmiles: Generative Masked Language Models for Molecular Representations
BARTSmiles introduces a large-scale, self-supervised generative masked language model for molecular representations, pre-trained on 1.7 billion molecules from the ZINC20 dataset using an order of magnitude more compute than prior methods. It achieves state-of-the-art performance across 11 classification, regression, and generation tasks, while interpretability analyses show that integrated gradients highlight known toxicophoric substructures and key neurons correlate strongly with downstream tasks.
We discover a robust self-supervised strategy tailored towards molecular representations for generative masked language models through a series of tailored, in-depth ablations. Using this pre-training strategy, we train BARTSmiles, a BART-like model with an order of magnitude more compute than previous self-supervised molecular representations. In-depth evaluations show that BARTSmiles consistently outperforms other self-supervised representations across classification, regression, and generation tasks setting a new state-of-the-art on 11 tasks. We then quantitatively show that when applied to the molecular domain, the BART objective learns representations that implicitly encode our downstream tasks of interest. For example, by selecting seven neurons from a frozen BARTSmiles, we can obtain a model having performance within two percentage points of the full fine-tuned model on task Clintox. Lastly, we show that standard attribution interpretability methods, when applied to BARTSmiles, highlight certain substructures that chemists use to explain specific properties of molecules. The code and the pretrained model are publicly available.
Motivation & Objective
- To develop a robust, scalable self-supervised pre-training strategy tailored for molecular representations using masked language modeling.
- To train a large-scale generative language model for molecules—BARTSmiles—using significantly more compute than previous models.
- To evaluate BARTSmiles across diverse downstream tasks, including classification, regression, and generation, to establish state-of-the-art performance.
- To investigate whether pre-trained representations implicitly encode task-relevant information through neuron-level analysis and interpretability methods.
- To validate model interpretability by comparing attribution maps (e.g., Integrated Gradients) with chemically known structural alerts.
Proposed method
- Pre-trains a BART-like transformer model on SMILES strings using a masked language modeling objective on the full ZINC20 dataset (1.7B molecules).
- Employs a robust, ablation-driven pre-training strategy to optimize hyperparameters and architectural choices for molecular representation learning.
- Fine-tunes the frozen BARTSmiles model on 11 diverse downstream tasks, including toxicity prediction (ClinTox), solubility (ESOL), and reaction prediction.
- Applies Integrated Gradients for feature attribution to identify atoms/substructures contributing to model predictions.
- Performs neuron-level analysis by identifying individual neurons whose activations correlate highly with downstream task performance.
- Uses a linear probe of frozen neurons (7–15 neurons) to achieve >90% of full fine-tuning performance on ClinTox, demonstrating task-specific representation learning.
Experimental results
Research questions
- RQ1Can a large-scale, self-supervised masked language model trained on SMILES strings learn generalizable molecular representations that outperform prior methods across diverse tasks?
- RQ2To what extent do pre-trained representations in BARTSmiles implicitly encode information relevant to downstream tasks like toxicity or solubility?
- RQ3Do interpretability methods such as Integrated Gradients highlight chemically meaningful substructures (e.g., structural alerts) known to correlate with molecular properties?
- RQ4Can a small subset of frozen neurons from BARTSmiles achieve near-state-of-the-art performance on downstream tasks, indicating efficient representation learning?
- RQ5How does the model’s attention and attribution behavior align with expert knowledge in medicinal chemistry, such as structural alerts for mutagenicity?
Key findings
- BARTSmiles achieves state-of-the-art performance on 11 out of 11 evaluated molecular property prediction, generation, and regression tasks.
- The model outperforms prior self-supervised molecular representations by a significant margin, especially in low-data regimes, due to its scale and robust pre-training strategy.
- Integrated Gradients attribution maps consistently highlight known structural alerts—such as nitro groups and epoxides—associated with mutagenicity, confirming alignment with expert knowledge.
- For the ClinTox task, a linear combination of just 7–15 frozen neurons achieves over 90% of the performance of the full fine-tuned model, indicating strong task-specific representation learning.
- The model identifies polar functional groups (e.g., -OH, C=O) as key contributors to solubility in the ESOL regression task, with negative attributions on hydrocarbon chains, aligning with chemical intuition.
- A systematic bias in Integrated Gradients scores was observed—first tokens received consistently higher attributions—resolved by mean subtraction, improving interpretability fidelity.
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.