journal article·2025-10-27Open access

Single-Pass CNN–Transformer for Multi-Label 1H NMR Flavor Mixture Identification

Jiangsan Zhao, Krzysztof Kusnierek

Applied Sciences· Volume 15· Issue 21

Abstract

Interpreting multi-component 1H NMR spectra is difficult due to peak overlap, concentration variability, and low-abundance signals. We cast mixture identification as a single-pass multi-label task. A compact CNN–Transformer (“Hybrid”) model was trained end-to-end on domain-informed and realistically simulated spectra derived from a 13-component flavor library; the model requires no real mixtures for training. On 16 real formulations, the Hybrid attains micro-F1 = 0.990 and exact-match (subset) accuracy = 0.875, outperforming CNN-only and Transformer-only ablations, while remaining efficient (~0.47 M parameters; ~0.68 ms on GPU, V100). The approach supports abstention and shows robustness to simulated outsiders. Although the evaluation set was small, and the macro-ECE (per-class, 15 bins) was inflated by sparse classes (≈0.70), the micro-averaged Brier is low (0.0179), and temperature scaling had negligible effect (T ≈ 1.0), indicating the good overall probability quality. The pipeline is readily extensible to larger libraries and adjacent applications in food authenticity and targeted metabolomics. Classical chemometric baselines trained on simulation failed to transfer to real measurements (subset accuracy 0.00), while the Hybrid model maintained strong performance.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Advanced Chemical Sensor Technologies · Metabolomics and Mass Spectrometry Studies · Biochemical Analysis and Sensing Techniques

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Agricultural Technology, Center for Precision Agriculture, Norwegian Institute of Bioeconomy Research (NIBIO), Nylinna 226, NO-2849 Kapp, Norway

Funding

Research Council of Norway

References (20)

Show source-provided references
1. Algorithm for Automatic Image Dodging of Unmanned Aerial Vehicle Images Using Two-Dimensional Radiometric Spatial Attributes10.1117/1.JRS.10.036023 ↗
2. NMR Metabolomics Methods for Investigating Disease10.1021/acs.analchem.2c04606 ↗
3. Quantitative Metabolomics Using NMR10.1016/j.trac.2007.12.001 ↗
4. Solid-State NMR Spectroscopy in Pharmaceutical Sciences10.1016/j.trac.2020.116152 ↗
5. Quantitative NMR Spectroscopy in Pharmaceutical Applications10.1016/j.pnmrs.2010.05.001 ↗
6. Analytical Metabolomics and Applications in Health, Environmental and Food Science10.1080/10408347.2020.1823811 ↗
7. Independent Components Analysis to Increase Efficiency of Discriminant Analysis Methods (FDA and LDA): Application to NMR Fingerprinting of Wine10.1016/j.talanta.2015.03.037 ↗
8. 1H NMR Metabolite Fingerprinting and Metabolomic Analysis of Perchloric Acid Extracts from Plant Tissues10.1038/nprot.2008.64 ↗
9. Wang, Y., Wei, W., Du, W., Cai, J., Liao, Y., Lu, H., Kong, B., and Zhang, Z. (2023). Deep-Learning-Based Mixture Identification for Nuclear Magnetic Resonance Spectroscopy Applied to Plant Flavors. Molecules, 28.10.3390/molecules28217380 ↗
10. FlavorFormer: Hybrid Deep Learning for Identifying Compounds in Flavor Mixtures Based on NMR Spectroscopy10.1016/j.microc.2025.115372 ↗
11. Salivary Metabolite Signatures of Children with and without Dental Caries Lesions10.1007/s11306-012-0484-7 ↗
12. Discriminating Extra Virgin Olive Oils from Common Edible Oils: Comparable Performance of PLS-DA Models Trained on Low-field and High-field 1H NMR Data10.1002/pca.3348 ↗
13. Pembury Smith, M.Q.R., and Ruxton, G.D. (2020). Effective Use of the McNemar Test. Behav. Ecol. Sociobiol., 74.10.1007/s00265-020-02916-y ↗
14. A Universal and Accurate Method for Easily Identifying Components in Raman Spectroscopy Based on Deep Learning10.1021/acs.analchem.2c03853 ↗
15. Zhang, P., Yu, H., Li, P., and Wang, R. (2023). TransHSI: A Hybrid CNN-Transformer Method for Disjoint Sample-Based Hyperspectral Image Classification. Remote Sens., 15.10.3390/rs15225331 ↗
16. A Survey: Object Detection Methods from CNN to Transformer10.1007/s11042-022-13801-3 ↗
17. A CNN-Transformer Hybrid Approach for Crop Classification Using Multitemporal Multisensor Images10.1109/JSTARS.2020.2971763 ↗
18. Guo, C., Pleiss, G., Sun, Y., and Weinberger, K.Q. (2017, January 6–11). On Calibration of Modern Neural Networks. Proceedings of the International Conference on machine Learning, Sydney, Australia.
19. Zhao, J., and Kusnierek, K. (2024). A Fully Connected Network (FCN) Trained on a Custom Library of Raman Spectra for Simultaneous Identification and Quantification of Components in Multi-Component Mixtures. Coatings, 14.10.3390/coatings14091225 ↗
20. Hendrycks, D., and Gimpel, K. (2016). A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networks. arXiv.