Transformer-Based Approach for Automated Functional Group Replacement in Chemical Compounds
Bo Pan, Zhiping Zhang, Kevin Spiekermann, Tianchi Chen, Xiang Yu, Liying Zhang, Liang Zhao
TL;DR
This work tackles the problem of automated functional group replacement while preserving overall molecular structure by introducing a two-stage transformer framework that first removes a target functional group and then appends a replacement, all encoded as SMIRKS transformations. Trained on 2 million MMPs derived from ChEMBL via MMPDB, the encoder–decoder model enforces substructure-level modifications and supports both model-suggested and user-specified transformations, achieving high chemical validity and broad exploration of chemical space. Empirical results show strong validity across large beam sizes, with Mol2Trans balancing novelty and similarity better than Mol2Mol as the candidate pool grows, and robust coverage across source-molecule frequencies. The approach demonstrates scalability, flexibility, and practical potential for drug design and materials science, while highlighting limitations in data scale and lack of explicit property optimization, pointing to future work in scaling data, conditioning on properties, and exploring alternative molecular representations.
Abstract
Functional group replacement is a pivotal approach in cheminformatics to enable the design of novel chemical compounds with tailored properties. Traditional methods for functional group removal and replacement often rely on rule-based heuristics, which can be limited in their ability to generate diverse and novel chemical structures. Recently, transformer-based models have shown promise in improving the accuracy and efficiency of molecular transformations, but existing approaches typically focus on single-step modeling, lacking the guarantee of structural similarity. In this work, we seek to advance the state of the art by developing a novel two-stage transformer model for functional group removal and replacement. Unlike one-shot approaches that generate entire molecules in a single pass, our method generates the functional group to be removed and appended sequentially, ensuring strict substructure-level modifications. Using a matched molecular pairs (MMPs) dataset derived from ChEMBL, we trained an encoder-decoder transformer model with SMIRKS-based representations to capture transformation rules effectively. Extensive evaluations demonstrate our method's ability to generate chemically valid transformations, explore diverse chemical spaces, and maintain scalability across varying search sizes.
