Guolin Li, Jinxu Yang, Yubing Yang, Jianyu Gu, Wenxuan Zhao, Weizhun Dong, Kai Liu, Yuchen Yuan, Zhihao Lu
Retrieval of CO and NH3 from adjacent absorption features is complicated by pressure broadening under variable-pressure conditions, which increases spectral overlap and alters the measured spectral response. A CNN-FiLM-Transformer (CFT) framework was developed to estimate CO and NH3 concentrations from measured wavelength-modulation second-harmonic (WMS-2f) spectra. The model combines convolutional neural networks for local spectral-feature extraction, a Transformer encoder for modeling dependencies within overlapped spectra, and a FiLM-inspired pressure-conditioned residual feature-scaling mechanism. The method was evaluated using controlled CO/NH3/N₂ mixtures at pressures from 1.0 to 3.0 atm. Under condition-wise grouped evaluation, the scan-level RMSE values were 21.43 ± 5.44 ppm for NH3 and 14.70 ± 5.18 ppm for CO. For reference, the regression-stratified scan-level test yielded RMSE values of 5.83 ppm for NH3 and 4.91 ppm for CO, respectively, and these values are reported as secondary indicators of within-distribution performance. Among the evaluated chemometric and neural-network methods, the CFT model yielded the lowest within-distribution retrieval errors. These results indicate the feasibility of CO/NH3 retrieval under the investigated controlled laboratory conditions. Application to flue-gas measurements requires further performance evaluation.