Learning Molecular Representations from SMILES for Acute Toxicity Prediction

Simona Cholakova, Domen Vake, Aleksandar Tošić

Simona Cholakova: University of Primorska, Faculty of Mathematics, Natural Sciences and Information Technologies (UP FAMNIT), Koper, Slovenia · Domen Vake: University of Primorska, Faculty of Mathematics, Natural Sciences and Information Technologies (UP FAMNIT), Koper, Slovenia · Aleksandar Tošić: University of Primorska, Faculty of Mathematics, Natural Sciences and Information Technologies (UP FAMNIT), Koper, Slovenia

Predicting molecular toxicity from structure can reduce the cost and risk of experimental screening, but performance depends strongly on the molecular representation supplied to the predictor. We study whether embedding representations learned directly from SMILES strings, text-based descriptions of a molecule’s chemical structure, can support acute toxicity prediction. A custom byte-pair tokenizer and six-layer Transformer encoder were pretrained by masked language modelling on five million unlabeled PubChem molecules, then fine-tuned independently on seven rat and mouse LD50 endpoints from TOXRIC. The resulting molecule-level embeddings were evaluated with the encoder’s own regression head, and separately with an XGBoost regressor trained on the embeddings alone or concatenated with Morgan fingerprints. XGBoost achieved lower RMSE than the neural regression head on all seven endpoints, with reductions of 4.4–7.5%. Morgan fingerprints improved 𝑅 2 on six endpoints, although only modestly, and randomized SMILES augmentation improved validation loss in every task. The results show that self-supervised SMILES embeddings are useful features for toxicity modelling. Qualitative error analysis further suggests potential limitations for rare atoms, complex ring systems, and long sequences.

Keywords: acute toxicity, molecular representation, SMILES, self-supervised learning, Transformer, XGBoost

Pages: 289–292

DOI: 10.70314/is.2026.sikdd.88

Download PDF