Context-Aware Automated NMR Structure Elucidation
Organizations: Department of Chemistry, Stanford University, Stanford, California, 94305, USA
Abstract
Machine learning approaches are rapidly revolutionizing the ability to analyze and extract structural insights from chemical data, enabling high-throughput chemical discovery. While existing data-driven approaches have shown remarkable promise for predicting chemical structures in the de novo setting, incorporating additional chemically informed context offers the opportunity to further improve these models' performance and extend their real-world utility. Here we provide a straightforward protocol to combine artificial-intelligence-based spectroscopic elucidation pipelines with contextual chemical data, e.g., known reactants or a desired product, by using automated retrosynthetic analysis to generate large training sets of molecules and contextual data in the form of synthetic precursors. We demonstrate our approach by showing that our recently introduced NMR structure elucidation framework can be trained to effectively leverage molecular precursor context. We show that when the chemical context provides useful information on the target molecule we obtain dramatically improved accuracy over using NMR spectra alone, obtaining Top-15 accuracies of up to 95.4% for molecules up to 40 heavy atoms spanning the full elemental range of organic chemistry. Furthermore, we demonstrate that our approach is highly robust, such that even when the context provided is uncorrelated with the target, one still obtains accuracies commensurate with those of the original NMR structure elucidation framework. This approach provides an efficient route to improve a wide range of spectroscopic structure elucidation platforms using contextual data.
Figures & tables
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Setting | Value |
|---|---|
| Software | AiZynthFinder 4.4.1 ( AiZynthExpander ) |
| Expansion policy | USPTO template-based neural network ( uspto_model.onnx , uspto_templates.csv.gz ) |
| Template cutoffs | cumulative probability 0.995, at most 50 templates ( cutoff_cumulative , cutoff_number ) |
| Reactant sets returned per expansion ( return_n ) | 50 |
| Feasibility (filter) model | USPTO ( uspto_filter_model.onnx ); scores recorded only, no reactions removed |
| Selection at each node | uniformly at random among the returned reactant sets |
| Molecules with a prompt | Target among precursors | Prompts used | % of test set | |
|---|---|---|---|---|
| 1 | 201,376 | 55 (0.03%) | 201,321 | 99.69 |
| 2 | 201,302 | 8,057 (4.00%) | 193,245 | 95.69 |
| 3 | 201,280 | 708 (0.35%) | 200,572 | 99.32 |
| 4 | 201,271 | 976 (0.48%) | 200,295 | 99.18 |
| 5 | 201,266 | 183 (0.09%) | 201,083 | 99.57 |
| Total | 1,006,495 | 9,979 (0.99%) | 996,516 |
| Model | Optimizer | Precision | Gradient clipping | Epochs trained | Best epoch | |
|---|---|---|---|---|---|---|
| NMR+Precursor | AdamW | FP32 | norm 1.0 | 0.25 | 84 | 50 |
| Precursor-only, encoder-decoder | Adam | bf16 mixed | none | 0 | 112 | 112 |
| Precursor-only, decoder-only | Adam | bf16 mixed | none | 0.25 | 180 | 147 |
| Precursor-only, decoder-only | Adam | bf16 mixed | none | 0 | 180 | 171 |