Do LLMs Truly Generalize in the Molecular Domain? A Perturbation-Based Analysis
1 Molecular LLMs can look strong on standard random-split benchmarks, yet this paper shows a fragile “local trust region”: even a single chemistry-valid structural edit (Graph Edit Distance, GED=1) can trigger large performance drops across common molecular tasks.
2 The core contribution is a Molecular Perturbation framework that generates syntax-valid structural variants of training molecules under controlled GED, enabling a manifold-regularity test rather than a static in-distribution evaluation.
3 Perturbations are designed to mimic realistic medicinal chemistry moves and are split into two granular types: atom perturbations (heteroatom substitutions with valence-preserving constraints) and bond perturbations (bond order changes with sanitization checks and implicit valence constraints).
4 Validity is enforced during generation (not just post-hoc): RDKit sanitization plus an incremental rejection mechanism, and an additional filter that keeps only molecules with valid IUPAC names (chosen as a standardized, unambiguous textual representation).
5 GED is used as a controlled axis of “distance from the training manifold” (levels 1–5). Increasing GED monotonically decreases chemical similarity (Morgan fingerprint Tanimoto) and increases token-space distance (SMILES Levenshtein), but the paper highlights a key mismatch: sequence closeness is not a reliable proxy for chemical/topological closeness.
6 Across three representative tasks—QED regression (RMSE), IUPAC→molecule generation (Morgan fingerprint similarity), and molecule→IUPAC generation (BLEU-4)—models show steep early degradation (often GED 1–3) followed by a slower decline/plateau, indicating limited local smoothness around training molecules.
7 Robustness depends on model family: domain-pretrained encoder–decoder molecular LLMs (MolT5, BioT5/SELFIES) degrade less at high GED than general LLMs (Qwen3) on understanding-style tasks, while decoder-only models can have stronger clean generative performance yet suffer sharper relative drops under perturbation.
8 Perturbation type matters by task: for understanding tasks (QED, Mol2IUPAC), bond edits often hurt less than atom substitutions at matched GED, consistent with these targets being more sensitive to atomic composition/functional groups than to certain bond-order changes; for IUPAC2Mol generation, atom vs bond perturbations cause similar degradation because exact connectivity and identities must be recovered.
9 The paper then tests In-Context Tuning (ICT) as a robustness lever grounded in the molecular similarity principle. It provides an idealized analysis viewing ICT as kernel smoothing over retrieved neighbors, yielding an error bound governed by retrieval radius R (nearest-neighbor distance), suggesting robustness should track retrieval quality.
10 Empirically (shown on Galactica-125M), nearest-neighbor ICT improves robustness in most perturbed settings (15/18 task–GED cells), while Random ICT largely removes benefits and can be catastrophic for IUPAC2Mol—supporting the claim that structural similarity in retrieval, not just “having context,” drives gains. However, ICT benefits shrink as GED grows because nearest neighbors become less relevant off-manifold, so anchoring remains inherently local.
📜Paper: arxiv.org/abs/2607.01800
#ComputationalBiology #Cheminformatics #MolecularAI #LLM #Robustness #DrugDiscovery #MachineLearning #GraphEditDistance #InContextLearning #RetrievalAugmentedGeneration
3
21
1,553

























