Hybrid Neural Network Model Based on CNN+Transformer for Predicting the Spectral Properties of Multilayer Structures
Abstract
Relevance. Predicting the spectral characteristics of multilayer materials is a key task in photonics, optoelectronics, and materials science, as the accuracy of modeling directly affects the efficiency of technological processes and the performance of functional coatings. Classical numerical methods ensure reliable calculations but become computationally demanding when many parameter variations are required. This motivates the development of hybrid architectures that combine physical modeling with the capabilities of modern neural networks.
Goal. The aim of this work is to develop and investigate a hybrid neural network model based on a CNN+Transformer architecture for predicting the spectral characteristics of multilayer structures, and to evaluate its effectiveness in comparison with classical and alternative neural network methods.
Research methods. Training data were generated using the TMM in the spectral range of 300–800 nm. PCA was applied to optimize spectral representation, reducing the number of spectral points while preserving 98% of the data variance. The neural model integrates convolutional layers for extracting local interference-related features and a transformer block for capturing global dependencies. The training process employed a loss function that combines prediction accuracy with regularization, while model validation was performed on an independent test dataset.
The results. The proposed model demonstrated high predictive accuracy, achieving a determination coefficient of R² = 0.99 and a mean squared error below 4%. A comparison with the CNN+LSTM architecture revealed the advantage of the transformer-based model, which more effectively captures long-range spectral correlations and provides faster inference. The model showed strong agreement with TMM-generated reference data and maintained robustness to noise variations in experimental spectra.
Conclusions. The developed hybrid CNN+Transformer model proved to be an effective tool for predicting the spectral characteristics of multilayer structures. Combining physical modeling with deep neural networks ensures high accuracy, computational speed, and generalization capability. The results highlight the promise of this architecture for fast optical analysis and thin-film structure optimization. Future work may include expanding the training dataset, accounting for nonlinear optical effects, and integrating the model into automated design systems for optical materials.
Downloads
References
/References
M. K. Mahani, M. Chaloosi, M. G. Maragheh, A. R. Khanchi and D. Afzali, “Comparison of artificial neural networks with partial least squares regression for simultaneous determinations by ICP-AES,” Chinese Journal of Chemistry, vol. 25, no. 11, pp. 1658–1662, 2007, DOI: 10.1002/cjoc.200790306.
L. Xuyang, A. Hongle, C. Wensheng and S. Xueguang, “Deep learning in spectral analysis: Modeling and imaging,” Trends in Analytical Chemistry, vol. 172, Art. 117612, 2024, DOI: 10.1016/j.trac.2024.117612.
M. S. Primrose, J. Giblin, C. Smith, M. R. Anguita and G. H. Weedon, “One-dimensional convolutional neural networks for spectral analysis,” Algorithms, Technologies, and Applications for Multispectral and Hyperspectral Imaging XXVIII, vol. 12094, Art. 120940C, 2022, DOI: 10.1117/12.2618487.
J. Schuetzke, N. J. Szymanski and M. Reischl, “Validating neural networks for spectroscopic classification on a universal synthetic dataset,” npj Computational Materials, vol. 9, Art. 100, 2023, DOI: 10.1038/s41524-023-01055-y.
J. Liu et al., “Deep convolutional neural networks for Raman spectrum recognition: A unified solution,” The Analyst, 2017, DOI: 10.1039/C7AN01371J.
F. Marini, R. Bucci, A. L. Magrì and A. D. Magrì, “Artificial neural networks in chemometrics: History, examples, and perspectives,” Microchemical Journal, vol. 88, no. 2, pp. 178–185, 2008, DOI: 10.1016/j.microc.2007.11.008.
K. T. Butler, D. W. Davies, H. Cartwright, O. Isayev and A. Walsh, “Machine learning for molecular and materials science,” Nature, vol. 559, pp. 547–555, 2018, DOI: 10.1038/s41586-018-0337-2.
P. Mishra et al., “Deep learning for near-infrared spectral data modelling: Hypes and benefits,” Trends in Analytical Chemistry, vol. 157, Art. 00690-2, 2022, DOI: 10.1016/j.trac.2022.116804.
S. Nithya and G. Manju, “Spectral analysis of cellular neural network: Unveiling network parameters and graph characteristics,” Research Square, Preprint, 2024, DOI: 10.21203/rs.3.rs-4338706/v1.
M. G. Madden and A. G. Ryder, “Machine learning methods for quantitative analysis of Raman spectroscopy data,” in Proc. SPIE 4876, Opto-Ireland 2002: Optics and Photonics Technologies and Applications, 2002, DOI: 10.1117/12.464039.
Y. Bilak, A. Reblian, R. Buchuk and P. Fedorka, “Development of a combined neural network model for effective spectroscopic analysis,” Eastern-European Journal of Enterprise Technologies, vol. 1, no. 4(133), pp. 41–51, 2025, DOI: 10.15587/1729-4061.2025.322627.
R. Rajagukguk, R. A. Ramadhan and H.-J. Lee, “A review on deep learning models for forecasting time series data of solar irradiance and photovoltaic power,” Energies, vol. 13, 2020, DOI: 10.3390/en13246623.
G. Muthukumar and J. Philip, “CNN-LSTM hybrid deep learning model for remaining useful life estimation,” International Journal for Innovative Research in Multidisciplinary Field, 2024, DOI: 10.48550/arXiv.2412.15998.
Halbouni et al., “CNN-LSTM: Hybrid deep neural network for network intrusion detection system,” IEEE Access, vol. 10, pp. 99837–99849, 2022, DOI: 10.1109/ACCESS.2022.3206425.
F. Yuan, Z. Zhang and Z. Fang, “An effective CNN and transformer complementary network for medical image segmentation,” Pattern Recognition, vol. 136, Art. 109228, 2023, DOI: 10.1016/j.patcog.2022.109228.
L. Wu et al., “CNN-transformer rectified collaborative learning for medical image segmentation,” Computer Vision and Pattern Recognition (cs.CV), 2024, DOI: 10.48550/arXiv.2408.13698.
S. Almotairi et al., “Hybrid transformer-CNN model for accurate prediction of peptide hemolytic potential,” Scientific Reports, vol. 14, Art. 14263, 2024, DOI: 10.1038/s41598-024-63446-5.
L. M. Brekhovskikh, “Plane waves in layers,” Applied Mathematics and Mechanics, vol. 6, pp. 1–134, 1960, DOI: 10.1016/B978-0-12-395777-1.50006-X.
M. Beitollahi and S. A. Hosseini, “Using Savitsky-Golay smoothing filter in hyperspectral data compression by curve fitting,” 2018, pp. 452–457, DOI: 10.1109/ICEE.2018.8472702.
Y. Wang et al., “Mark-Spectra: A convolutional neural network for quantitative spectral analysis overcoming spatial relationships,” Computers and Electronics in Agriculture, vol. 192, Art. 106624, 2022, DOI: 10.1016/j.compag.2021.106624.
L. Li et al., “A transformer-based model for quantitative analysis of near-infrared spectra,” SSRN Electronic Journal, 2024, DOI: 10.2139/ssrn.4770196.
J. Heaton, “Ian Goodfellow, Yoshua Bengio, and Aaron Courville: Deep learning,” Genetic Programming and Evolvable Machines, vol. 19, 2017, DOI: 10.1007/s10710-017-9314-z.
O. K. Shuaibov et al., “Conditions for pulsed gas-discharge synthesis of thin tungsten oxide films from a plasma mixture of air with tungsten vapors,” Physics and Chemistry of Solid State, vol. 25, no. 4, pp. 684–688, 2024, DOI: 10.15330/pcss.25.4.684-688.
O. K. Shuaibov et al., “Spectroscopic diagnostics of overstressed nanosecond discharge plasma between zinc electrodes in air and nitrogen,” Journal of Physical Studies, vol. 26, no. 2, Art. 2501, 2022, DOI: 10.30970/jps.26.2501.
I. Bondar et al., “Synthesis of surface structures during laser-stimulated evaporation of a copper sulfate solution in distilled water,” Ukrainian Journal of Physics, vol. 68, no. 2, p. 138, 2023, DOI: 10.15407/ujpe68.2.138.
V. R. Kozubovsky and Y. Y. Bilak, “Express analysis of gas mixtures using a spectral correlator based on the Fabry–Perot interferometer,” Journal of Applied Spectroscopy, vol. 89, no. 3, pp. 495–499, 2022, DOI: 10.1007/s10812-022-01385-7.
V. Kozubovsky and Y. Bilak, “Phase methods in absorption spectroscopy,” Ukrainian Journal of Physics, vol. 66, no. 8, p. 664, 2021, DOI: 10.15407/ujpe66.8.664.
M. K. Mahani, M. Chaloosi, M. G. Maragheh, A. R. Khanchi and D. Afzali, “Comparison of artificial neural networks with partial least squares regression for simultaneous determinations by ICP-AES,” Chinese Journal of Chemistry, vol. 25, no. 11, pp. 1658–1662, 2007, DOI: 10.1002/cjoc.200790306.
L. Xuyang, A. Hongle, C. Wensheng and S. Xueguang, “Deep learning in spectral analysis: Modeling and imaging,” Trends in Analytical Chemistry, vol. 172, Art. 117612, 2024, DOI: 10.1016/j.trac.2024.117612.
M. S. Primrose, J. Giblin, C. Smith, M. R. Anguita and G. H. Weedon, “One-dimensional convolutional neural networks for spectral analysis,” Algorithms, Technologies, and Applications for Multispectral and Hyperspectral Imaging XXVIII, vol. 12094, Art. 120940C, 2022, DOI: 10.1117/12.2618487.
J. Schuetzke, N. J. Szymanski and M. Reischl, “Validating neural networks for spectroscopic classification on a universal synthetic dataset,” npj Computational Materials, vol. 9, Art. 100, 2023, DOI: 10.1038/s41524-023-01055-y.
J. Liu et al., “Deep convolutional neural networks for Raman spectrum recognition: A unified solution,” The Analyst, 2017, DOI: 10.1039/C7AN01371J.
F. Marini, R. Bucci, A. L. Magrì and A. D. Magrì, “Artificial neural networks in chemometrics: History, examples, and perspectives,” Microchemical Journal, vol. 88, no. 2, pp. 178–185, 2008, DOI: 10.1016/j.microc.2007.11.008.
K. T. Butler, D. W. Davies, H. Cartwright, O. Isayev and A. Walsh, “Machine learning for molecular and materials science,” Nature, vol. 559, pp. 547–555, 2018, DOI: 10.1038/s41586-018-0337-2.
P. Mishra et al., “Deep learning for near-infrared spectral data modelling: Hypes and benefits,” Trends in Analytical Chemistry, vol. 157, Art. 00690-2, 2022, DOI: 10.1016/j.trac.2022.116804.
S. Nithya and G. Manju, “Spectral analysis of cellular neural network: Unveiling network parameters and graph characteristics,” Research Square, Preprint, 2024, DOI: 10.21203/rs.3.rs-4338706/v1.
M. G. Madden and A. G. Ryder, “Machine learning methods for quantitative analysis of Raman spectroscopy data,” in Proc. SPIE 4876, Opto-Ireland 2002: Optics and Photonics Technologies and Applications, 2002, DOI: 10.1117/12.464039.
Y. Bilak, A. Reblian, R. Buchuk and P. Fedorka, “Development of a combined neural network model for effective spectroscopic analysis,” Eastern-European Journal of Enterprise Technologies, vol. 1, no. 4(133), pp. 41–51, 2025, DOI: 10.15587/1729-4061.2025.322627.
R. Rajagukguk, R. A. Ramadhan and H.-J. Lee, “A review on deep learning models for forecasting time series data of solar irradiance and photovoltaic power,” Energies, vol. 13, 2020, DOI: 10.3390/en13246623.
G. Muthukumar and J. Philip, “CNN-LSTM hybrid deep learning model for remaining useful life estimation,” International Journal for Innovative Research in Multidisciplinary Field, 2024, DOI: 10.48550/arXiv.2412.15998.
Halbouni et al., “CNN-LSTM: Hybrid deep neural network for network intrusion detection system,” IEEE Access, vol. 10, pp. 99837–99849, 2022, DOI: 10.1109/ACCESS.2022.3206425.
F. Yuan, Z. Zhang and Z. Fang, “An effective CNN and transformer complementary network for medical image segmentation,” Pattern Recognition, vol. 136, Art. 109228, 2023, DOI: 10.1016/j.patcog.2022.109228.
L. Wu et al., “CNN-transformer rectified collaborative learning for medical image segmentation,” Computer Vision and Pattern Recognition (cs.CV), 2024, DOI: 10.48550/arXiv.2408.13698.
S. Almotairi et al., “Hybrid transformer-CNN model for accurate prediction of peptide hemolytic potential,” Scientific Reports, vol. 14, Art. 14263, 2024, DOI: 10.1038/s41598-024-63446-5.
L. M. Brekhovskikh, “Plane waves in layers,” Applied Mathematics and Mechanics, vol. 6, pp. 1–134, 1960, DOI: 10.1016/B978-0-12-395777-1.50006-X.
M. Beitollahi and S. A. Hosseini, “Using Savitsky-Golay smoothing filter in hyperspectral data compression by curve fitting,” 2018, pp. 452–457, DOI: 10.1109/ICEE.2018.8472702.
Y. Wang et al., “Mark-Spectra: A convolutional neural network for quantitative spectral analysis overcoming spatial relationships,” Computers and Electronics in Agriculture, vol. 192, Art. 106624, 2022, DOI: 10.1016/j.compag.2021.106624.
L. Li et al., “A transformer-based model for quantitative analysis of near-infrared spectra,” SSRN Electronic Journal, 2024, DOI: 10.2139/ssrn.4770196.
J. Heaton, “Ian Goodfellow, Yoshua Bengio, and Aaron Courville: Deep learning,” Genetic Programming and Evolvable Machines, vol. 19, 2017, DOI: 10.1007/s10710-017-9314-z.
O. K. Shuaibov et al., “Conditions for pulsed gas-discharge synthesis of thin tungsten oxide films from a plasma mixture of air with tungsten vapors,” Physics and Chemistry of Solid State, vol. 25, no. 4, pp. 684–688, 2024, DOI: 10.15330/pcss.25.4.684-688.
O. K. Shuaibov et al., “Spectroscopic diagnostics of overstressed nanosecond discharge plasma between zinc electrodes in air and nitrogen,” Journal of Physical Studies, vol. 26, no. 2, Art. 2501, 2022, DOI: 10.30970/jps.26.2501.
I. Bondar et al., “Synthesis of surface structures during laser-stimulated evaporation of a copper sulfate solution in distilled water,” Ukrainian Journal of Physics, vol. 68, no. 2, p. 138, 2023, DOI: 10.15407/ujpe68.2.138.
V. R. Kozubovsky and Y. Y. Bilak, “Express analysis of gas mixtures using a spectral correlator based on the Fabry–Perot interferometer,” Journal of Applied Spectroscopy, vol. 89, no. 3, pp. 495–499, 2022, DOI: 10.1007/s10812-022-01385-7.
V. Kozubovsky and Y. Bilak, “Phase methods in absorption spectroscopy,” Ukrainian Journal of Physics, vol. 66, no. 8, p. 664, 2021, DOI: 10.15407/ujpe66.8.664.