SMILES-based chemical language models perform well at property prediction, but equivalent SMILES can yield different predictions. Stable predictions alone do not show which fragments contribute to a property or whether their contributions agree with measured changes. We propose Structure-Aligned Tokenization (SAT) to combine notation invariance with fragment information, supported by Lattice-Aligned Pretraining (LAP) to learn from this information. SAT defines atom representations, explanation fragments, and a removal operator from the molecular graph. LAP uses this operator to learn partial-molecule descriptors and fragment contributions. SAT produced identical inputs across all tested notations, with no unknown tokens in any of six molecule sets. Using the same six-layer MoLFormer architecture, SAT + LAP achieved the highest correlation with measured substitution effects on six of eight fragment-aligned tasks compared with masked language modeling baselines. It also maintained or improved on the strongest competing tokenizer's predictive performance on 11 of 18 tasks. Gains varied by task, but the method provided invariant predictions and fragment-level evidence while retaining competitive performance on several tasks.
翻译:暂无翻译