Analysis of Gas Mixtures with Broadband Dual Frequency Comb Spectroscopy and Unsupervised Learning Neural Network

Broadband mid‐infrared spectroscopy not only offers supreme sensitivity for the massively parallel detection of trace gases but also presents many challenges. Herein, a new platform combining the advantages of a mid‐infrared dual‐comb spectrometer based on two difference‐frequency generation combs pumped by femtosecond Er‐doped fiber comb oscillators and an unsupervised deep learning neural network consisting of information extraction and information mapping blocks is presented. The scarce data problem, the uncertainties of apparatus, and manual operations intrinsic to multicomponent gas mixture analysis are overcome by coupling an unsupervised leaning approach with a model‐agnostic, physics‐informed data augmentation strategy using simulated data from spectral databases. The system provides reliable simultaneous identification of gas species, concentration retrieval, as well as ambient pressure prediction and eliminates the negative impacts on the measurement, such as model error, baseline fluctuation, and unknown absorbers. Parallel optical detection of 31 different mixtures of 5 gas species over a 2900–3100 cm−1 spectral range with a sub part‐per‐billion sensitivity is demonstrated showing the potential in various applications such as atmospheric monitoring, diagnostics with breath biomarkers, and capturing rapid chemical reaction kinetics.


Introduction
Frequency combs realized by the phase stabilization of a mode-locked femtosecond laser and combining properties of broadband and high-resolution light sources were introduced in the late 1990s and have revolutionized accurate measurements of frequency and time. [1]Such coherent laser beams provide a unique approach for sensing molecules through their resonant absorption features.The mid-infrared (MIR) wavelength range exhibits many vibrational transitions of chemically important functional groups presenting the "fingerprint region" of the spectrum and enabling detection either remotely or locally via multipass cells (MPC). [2]Due to the large absorption cross sections in this spectral range, a potentially high detection sensitivity in direct absorption spectroscopy measurements can be reached, allowing the technology to progress further into trace gas detection.Various spectroscopic applications of optical frequency combs have been developed such as cavity enhanced Fourier transform spectroscopy, [3] MIR up-conversion spectroscopy, [4] MIR virtually imaged phase array spectroscopy, [5] and dual comb spectroscopy Broadband mid-infrared spectroscopy not only offers supreme sensitivity for the massively parallel detection of trace gases but also presents many challenges.Herein, a new platform combining the advantages of a mid-infrared dual-comb spectrometer based on two difference-frequency generation combs pumped by femtosecond Er-doped fiber comb oscillators and an unsupervised deep learning neural network consisting of information extraction and information mapping blocks is presented.The scarce data problem, the uncertainties of apparatus, and manual operations intrinsic to multicomponent gas mixture analysis are overcome by coupling an unsupervised leaning approach with a model-agnostic, physics-informed data augmentation strategy using simulated data from spectral databases.The system provides reliable simultaneous identification of gas species, concentration retrieval, as well as ambient pressure prediction and eliminates the negative impacts on the measurement, such as model error, baseline fluctuation, and unknown absorbers.Parallel optical detection of 31 different mixtures of 5 gas species over a 2900-3100 cm À1 spectral range with a sub part-per-billion sensitivity is demonstrated showing the potential in various applications such as atmospheric monitoring, diagnostics with breath biomarkers, and capturing rapid chemical reaction kinetics.
(DCS), [6] which is based on superimposing two mutually coherent frequency combs.The DCS technique allowing fast measurements is especially well suited for monitoring of transient chemical phenomena. [7,8]roof-of-principle demonstrations and high impact experiments have been carried out in the MIR region with DCS approach, confirming its efficiency in trace gas detection, [6] high resolution molecular spectroscopy, [9] and studies of chemical reaction kinetics. [7]The combination of a high resolution and broad spectral coverage proves very useful in atmospheric [10] and combustion monitoring. [11,12]The detection sensitivity can be further improved by employing an MPC or a high finesse cavity to increase the interaction length. [13,14]Another key advantage is the high temporal resolution of a DFC spectrometer, which enables studies of fast processes, such as studying chemical reaction kinetics. [5,7]However, the massive density of spectral features carrying molecular-specific information poses a serious complexity in data processing to establish robust predictive modeling for multicomponent gas mixture analysis.The overlapping of spectral features makes it difficult to retrieve the gas concentrations by just interrogating the absorption peaks because the absorption specificity of molecules is compromised by the cross-talk between different species.Although DCS decreases the measurement time and thus reduces the impact of long timescale drifts or fluctuations, such as of the output laser power or temperature on the overall data collection, the challenges of baseline variations, due for instance, to unknown absorbers and background noise can still degrade the accuracy of simultaneous detection of multiple molecules over a broad spectral range. [15]odeling and fitting of the blended spectra is a feasible way to overcome such challenges.To determine the concentrations of gases of interest, fitting algorithms based on nonlinear least squares, such as partial least squares (PLS), are often employed, [16,17] relying on absorption profiles provided by spectroscopic databases such as HITRAN [18] or PNNL. [19]The extended spectral bandwidth leads, however, to an increased number of absorption profiles, which have to be computed for every iteration during the fitting.Furthermore, the inherent problem of such methods is that they cannot accurately identify the gas mixture composition associated with the blended spectrum. [20]Unleashing the full potential of trace gas sensing of multicomponent gas mixtures requires the identification of the whole panel of the involved gas species.Without the capability of component identification, the regression error will definitely misjudge their presence or absence at trace concentration levels. [21]The usual way to judge about the presence of a certain component is by setting a concentration threshold; however, the model error may lead to a false conclusion about the presence of specific target gas species.The inability to identify the composition of the target gases will further exacerbate the model error due to baseline fluctuations stemming from background noise or absorption of unknown species.
[24][25][26][27] There have been many valuable studies on component identification or concentration retrieval of gas mixtures by constructing artificial neural networks in various application scenarios.However, few studies have realized the importance of integrating the two abilities into one model. [21,28]Another problem with deep neural networks is that they are not friendly to research areas where data acquisition is difficult, such as studies of rapid chemical reaction kinetics, which rely on precise control of temperature and pressure. [7,17]Although it has been confirmed that the model which is pretrained on the simulated dataset can also perform well on the real data, [29] there still can be significant discrepancy between the initial input data distributions and final outcomes, which requires a specific training to mitigate. [26]ollecting a large amount of experimental data that meets the needs of model training entirely by manual means is not only time consuming and laborious but also leads to model error due to a deviation between the expected preset values and the actual preset concentrations as consequence of experimental uncertainties. [26]The generalization performance of models trained over such datasets with label bias is also often overestimated. [25]ere we introduce a sensor that combines an MIR DCS spectrometer and a deep neural network for parallel sensing of trace molecules and their mixtures.The MIR DCS spectrometer as the front end of spectral data acquisition consists of two DFG MIR high-power frequency comb sources, which are based on femtosecond Er:fiber oscillators with a stabilized repetition rate at %250 MHz, and an MPC of %580 m interaction length.The high-quality comb data have allowed the use of a pattern-based analysis method to establish recognizable digital spectral fingerprints for multicomponent gas mixture identification.In addition, we developed a novel model, referred to as Spectral Analysis Module version 2 (SAMv2), as the back end of spectral data analysis.SAMv2 was developed on the basis of the architecture of SAMv1. [21]An information extraction module was added to simultaneously realize the reliable species identification, concentration retrieval, as well as the gas pressure determination with a regression analysis.Also, a physics-informed data augmentation strategy to generate simulated spectral data thus overcoming the scarcity problem of gas mixture spectra problem was implemented.By means of unsupervised learning, SAMv2 was forced to learn by itself the spectral patterns by perceiving the key regions to fit the predicted spectra to the measured ones, rather than through the labeled data that contain experimentally obtained information, thus avoiding the prediction deviation caused by uncertainty of apparatus and experimental operation.We have extensively evaluated the performance of our sensor for parallel detection of numerous molecular species in gas mixtures and demonstrated the robustness of the capability of component identification under a variety of challenges that affect the predicted results.The realized accurate pressure regression also makes our sensor useful for potential applications that require precise control and monitoring of ambient pressure, motivating studies for accurate determination of the reaction rate coefficients and their pressure and temperature dependencies at reaction conditions.To the best of our knowledge, this is the first unsupervised learning deep neural network model to achieve simultaneous and accurate component identification, concentration retrieval, and pressure regression through overlapping broad spectra obtained by MIR DCS.

Experimental Section 2.1. Dual-Comb Mid-IR Source Characterization and System Validation
The Mid-IR DCS setup and system characterization is shown in Figure 1.The dual-comb spectrometer setup is shown in Figure 1a.Two MIR difference-frequency generation (DFG) combs (Menlo Systems, MIR Comb) based on femtosecond Er-doped fiber oscillators were used.The repetition rates were locked at the frequency of %250 MHz and referred to the Rb frequency standard (Stanford Research, PSR10).The MIR comb1 had %120 mW output power, covering a spectral range from 2.8 to 3.6 μm (2700-3600 cm À1 ).The pulse duration was %80 fs.The MIR comb2 employed a higher output power Yb-doped fiber amplifier and generated an MIR comb of %300 mW with a similar spectrum and pulse duration.We had characterized the DFG MIR combs by measuring their spectra and interferometric autocorrelation traces.The coherence of the MIR combs had been verified by heterodyne beat experiments.The absorption features in the spectra observed in the spectra were mostly due to the water vapor in the laboratory ambient air.
After mode matching lenses, the MIR comb2 was split by a 50:50 beam splitter.The transmitted signal beam was coupled into a multipass gas cell (MPC, 2.5 L, 580 m effective path f ) The transmitted spectral power density signal retrieved from a single coherently averaged interferogram (N ave = 500) when the gas cell was evacuated and that of the cell filled with 800 ppm water vapor in N2 buffer gas at 1 atm total pressure.g) The corresponding absorbance spectrum for water obtained by normalizing the sample spectrum to the baseline.length), while the reflected beam was guided back with a mirror and serves as a reference.The signal pulses exiting from the MPC were recombined with the reference pulses on the same 50:50 beam splitter and overlapped with pulses from the local oscillator (LO) MIR comb1 on a 92:8 beam splitter.The combined pulses are aligned and focused on a liquid nitrogen cooled HgCdTe (MCT) detector with a 100 MHz bandwidth (Kolmar Technology, KMPV11-0.1-J1/AC100).By using neutral density filters and beam splitters, the total incident power on the detector was adjusted to be less than 2 mW, above which the detector started to show signs of saturation, and the powers of signal and reference beams from the MIR comb2 and the LO MIR comb1 were roughly equal.The two femtosecond combs were locked with slightly different repetition rates at f r1 = 249 998 633 Hz and f r2 = 250 000 122 Hz, thus the difference was δf r = 1489 Hz.An interferogram formed by many pulse pairs with different delays was recorded on the oscilloscope (Tektronix, MDO4104B-3, sampling rate of 250 MPSPS).The maximum record length was 20 Mega points, corresponding to 80 ms, or %118 complete interferograms.The recorded 80 ms signal (Figure 1c) was converted from the time domain into the frequency domain by Fourier transform with a simple software phase correction.The zoomed plots in Figure 1b show the typical interferograms of reference and signal, respectively.The magnitude and phase of the resulting radiofrequency (RF) spectrum are depicted in Figure 1d, where also the pressure-broadened water absorption dips can be seen.The discrete comb lines with a spacing of δf r = 1489 Hz are shown in Figure 1e.The baseline recorded with the gas cell that was filled with pure nitrogen (N 2 ) buffer gas and the signal of water vapor of 800 ppm recorded at a total pressure of 1 atm are shown in Figure 1f.The corresponding absorbance spectrum (-ln(T/T 0 )), where T is the transmission of the gas sample and T 0 is the baseline transmission, together with the simulated spectrum, is shown in Figure 1g.The good agreement between the normalized spectra of the absorbance and the simulation demonstrated the high precision of the frequency calibration.

Physics-Informed Data Augmentation with Unsupervised SAMv2
The development of SAMv2 included three functional steps: dataset construction, model architecture tuning, and model training as shown in Figure 2.
We focussed on 5 typical molecules, as the target gases to establish the dataset: methane (CH 4 ), acetone (CH 3 COCH 3 ), water (H 2 O), ethylene (C 2 H 4 ), and formaldehyde (H 2 CO).The variables of the dataset were presence/absence of molecular species in the mixture, component concentrations, and gas pressure.In addition to small number of experimental spectra, the dataset was augmented by simulated spectra, calculated with the Beer-Lambert law, as shown in Figure 2a.The concentration range of simulated absorbance spectra of CH 4 , C 2 H 4 , and H 2 CO was 0-50 ppm, and the range for the gas pressure was 100-1013 mbar, while the concentration range of water was 1000-2000 ppm, corresponding to %4% indoor humidity.Similarly, we downloaded the absorption coefficient of CH 3 COCH 3 at 1 ppm with a path length of 1 m at room temperature and pressure of 1 atm from the PNNL database, and thereby calculated the absorption spectra of acetone in the concentration range of 0-50 ppm.In addition, in order to make distribution of simulated spectra closer to that of the experimental ones and to increase the robustness of the model to unexpected disturbances, the variations of the output power fluctuation, unknown gas absorption, background noise, and nonstandard baseline normalization to the absorption dataset were added.Through such data augmentation method based on physical domain knowledge, we established the dataset containing 2500 spectra for each of 31 gas mixtures corresponding to 5 mixing conditions (single-component, dual-component, triple-component, four-component, and five-component gas mixtures).The details of data augmentation strategy and the absorption spectra simulation are provided in the Supporting Information.We noted that pure gases were also counted as particular cases of gas mixtures.Unlike the previous work, in a dataset for unsupervised learning training, the corresponding labels that contain the specific information for species, concentration, and pressure were no longer needed.
The blended spectra dataset was then randomly divided into a training set and a test set according to the ratio of 9:1 following the hold out (HO) method, which ensured the independent and identical distribution (IID) principle for the test and training set.Subsequently, the training set was again randomly divided into 10 parts, nine of which were taken as the new training set and the remaining one as the validation set.The averaged results of the metrics from performing 10 times the training and validation were used as the estimation of the model performance under a specific architecture.This step is illustrated in Figure 2b.The hyperparameters were tuned by Bayesian optimization which was used to carry out an extensive search of the training and model architecture.The batch size, training epochs, and learning rate were fixed to be 1024, 3000, and 0.0001, respectively, while the model architecture, such as the size of convolutional kernel, the number of channels, the number of convolutional layers, was also optimized.We named this model SAMv2 and it included an information extraction module composed of one-dimensional convolutional layers and an information mapping module composed of fully connected layers.The information extraction module contained contracting blocks (CB) that reduced the tensor dimension, but increased the number of channels and feature mapping (FM) blocks that keep the size and reduced the number of channels.As for the information mapping module, it completely inherited the architecture of SAMv1.The number of neurons in this specially designed structure was suitable for mapping the extracted spectral information into the gas component information.The final output layer was designed as a fully connected layer containing 11 neurons, including 5 component identifiers (CI), 5 component concentration regressors (CR), and a pressure regressor (PR) for predicting ambient gas pressure.The schematic diagram of SAMv2 is shown in Figure 8c.The source codes and details of the implementation, such as features of FM, CB were provided in the Supporting Information.We had provided the methods of how to calculate such spectral loss function based on the spectral CAMs in the Supporting Information.
After determining the optimal architecture, we used the training and validation sets to form a new training set to retrain the model.As shown in Figure 2c, for the input absorption spectrum fed into the model, the end of SAMv2 will output the judgment on the presence of each gas and predict the corresponding concentration and pressure.The predicted results will first pass through a prediction function, which assures that only when the output of the CI corresponding to a molecular species is greater than a set threshold, the prediction function will assume that such molecule is present and allow its concentration to be predicted by the CR.Otherwise the concentration value for this species will be set to zero.The threshold of the CI was also optimized as a hyperparameter during training.We tested the effect of different concentrations of training spectra on the optimal threshold value.The results showed that although the lower threshold is sensitive to the presence of lower concentrations for trace gas detection, it also reduced the robustness of the model to unexpected noise.The threshold value of 0.5 was chosen as a good compromise.Subsequently, the predicted spectrum was calculated based on the concentration and ambient pressure that take into account the output of the prediction function.Contrary to the loss function of supervised learning, which received the predicted results and labels for loss calculation, our unsupervised model used the class activation maps (CAMs) [30,31] of the information extraction module as the weights to calculate the spectral loss by weighted summation of the element-wise difference between the predicted and input spectra.The model was trained to mitigate this difference by finding the optimal set of gases.The gradients based on the loss were then backward propagated to each layer of the model to optimize the trainable parameters.The CAMs used weights assigning importance to spectral differences, forcing the model to pay more attention to certain regions of spectra.Further, we visually illustrated the role of the CAMs.In addition to reducing the difficulty of establishing datasets, the unsupervised learning also allowed SAMv2 to avoid label errors caused by incorrect set points, which was demonstrated in subsequent sections.We had provided the methods of how to calculate such spectral loss function based on the spectral CAMs in the Supporting Information.) and information mapping module (using SAMv1 architecture).As an unsupervised learning algorithm, the predicted spectrum is obtained by the SAMv2 calculation based on the Beer-Lambert law.A presupposed prediction function is used to screen the predicted results.The spectral loss is determined by element-wise weighted difference of the input spectrum and the predicted one, where the weights are obtained from the last convolutional layer to directly indicate the importance for the predictions of species identification of different regions with specific spectral patterns for different gas species, forcing the model to pay more attention to certain regions of spectra.The gradients are based on deviation of this loss to with respect to the trainable parameters to backward propagate through each layer of SAMv2.

Measurements with Gas Mixture
To demonstrate parallel spectroscopic detection of multiple species, the MPC was filled with a mixture of all five preset molecular gases: CH 4 (methane) at a concentration of 10 ppm, CH 3 COCH 3 (acetone) at 50 ppm, H 2 O (water vapor) at 1200 ppm, C 2 H 4 (ethylene) at 20 ppm, and H 2 CO (formaldehyde) at 40 ppm.The standard gases were buffered by N 2 using the MFC-based gas dividing system.The total pressure was maintained at 1 atm and the temperature at 296 K.The MFCs are also introduced in the Supporting Information.
The parallel measurements of gas mixtures with all five preset molecular gases and evaluation of concentration retrieval capability are shown in Figure 3. Excellent matching of the predicted spectrum to the measured spectrum for the sample gas mixture was observed, as shown in Figure 3a, where the characteristic absorption features of different molecules are labeled.The predicted concentration values are also presented.The rather featureless residual shown in the bottom panel demonstrates the good quality of the predictions by SAMv2 (mean = 0.01003, std = 0.40439).The observed small deviations of the measured and predicted spectra, we mostly attribute to residual phase error, which is caused by the time jitter in the data acquisition triggering and can be eliminated by means of active real-time phase correction.The predicted individual spectral contributions of different molecular species as well as the measured spectrum are shown in Figure . 3c.
Compared with the predicted results, the absorbance of the MFC preset spectrum is higher and the deviation is larger (mean = 0.37933, std = 0.51245) than the measured values, indicating that the actual concentrations are lower than the expected MFC preset due to the experimental uncertainty in setting these concentration values (Figure 3b).We intentionally point out this discrepancy, since the uncertainty of 2% on the concentrations of the premixtures and of 0.5% for the MFC flows (according to the manufacturers) are typical for such experiments.Therefore, it is not reliable to simply train the model through preset values or evaluate the system performance by comparing the predicted and preset concentrations.In contrast, unsupervised training forces SAMv2 to learn the required physical information from the measured spectra rather than from preset information, thus avoiding the negative impact of the uncertainty of set points on the predicted results.
In a separate experiment, a real-time measurement was carried out to verify the feasibility of concentration retrieval of parallel multicomponent sensing for our sensor in a wide concentration range.Figure 3d shows the measurement results at concentration steps for each measured gas.The flow of the MFCs was controlled according to the expected configuration concentrations.In the one-hour experiment, the concentrations were changed stepwise with 5 min intervals.The plot of the predicted concentrations was simplified by 1 min interval for clarity.Each interval contains 500 scans, %0.13 s scan À1 (80 ms for data acquisition and 50 ms for prediction).The predicted concentrations basically matched the preset concentrations except for slight fluctuations.SAMv2 shows good fitting linearity for every gas species, with the coefficients of determination exceeding 0.999 (see Figure 3d-i).The relative errors are generally less than 2%, and for water the error is less than 0.6%.In addition to the five-component gas mixture measurement, the predicted results of other mixing conditions (dual-component, triple-component, and four component) of gas mixtures also show good agreement with the measured spectra, demonstrating that our sensor can accurately identify the specific component species that contribute to the absorbance of the blended spectral absorbance and simultaneously retrieve the individual component concentrations.The results are shown in Figure 4-6, respectively.The noise-equivalent absorbance is defined as 3σ, and the limit of detection (LOD) of the system was estimated to be for different components as follows: methane-60, acetone-110, water vapor-450, ethylene-90, and formaldehyde-200 ppb concentration.The LODs can be further improved by increasing the number of averaged scans, but it will increase the measurement time (for 100 000 averages, the measurement time > 12 min) and maybe not suitable for real-time monitoring scenarios.

Assessment of the Component Identifier
In this new experiment, we show the importance of the CI for the whole system by comparing the measured spectra and predicted spectra of single-component gases and the CAMs for gas component identification as shown in Figure 7.We introduced individual gases into the MPC and the good agreement between the measured and predicted spectra of each single-component gas, as shown in the middle and bottom panels in Figure 7a-f, respectively, indicates that the sensor could correctly identify the gas composition and determine that the concentrations for the absent target gases were zero.The results of SAMv2 and SAMv2 modified by removing CIs from the output layer as well as PLS were compared for single-component gas detection.Taking the methane measurement as an example, the predicted concentrations of other gases by SAMv2 were 0 ppm, while the models without CI made regression errors assigning nonzero concentrations to nonexistent components.Relatively large predictions for water vapor can be noticed for all models, which is due to incomplete drying caused by residual water in the inner wall of the MPC cavity.The results summarized in Table 1 demonstrate that the component identification capability can effectively help to eliminate the impact of model regression errors, especially for trace concentrations.The results for other target species are summarized in the Supporting Information.The top panels in Figure 7a-f show the corresponding CAMs of each gas species.The CAMs directly indicate the importance for the predictions of species identification of different regions with specific spectral patterns for different gas species.The recognition by the model of spectral patterns in the regions of interest, which is the basis for accurate gas identification, reminds the spectrum recognition performed by a human spectroscopist.Unfortunately, the inference process of a model with CAM cannot be directly controlled or encoded manually.CAM is a post hoc visualization technique that visualizes the reasoning process of a pretrained model.It utilizes the learned weights of the model's fully connected layers and combines them with feature maps to generate class-specific activation maps.The generation of CAMs relies on the model's learned representations and parameters, which are determined during the training The preset spectrum is calculated from the concentrations preset by MFC.The uncertainty of set points leads to a larger deviation between the preset spectrum and the measured one compared to that of the predicted spectrum.c) Spectral contributions of individual components to the measured spectrum.d) Real-time measurements of multicomponent gas mixture with stepwise-changed concentrations of gases.The right axis corresponds to the concentrations of water vapor, while the left axis corresponds to the other species.e-i) Assessment of the concentration regression capability.The coefficients of determination are higher than 0.999 for all molecules.The confidence intervals are narrow enough within the full concentration coverage, and the relative errors are lower than 2% for all cases.The preset concentrations as well as predicted concentrations were normalized for clarity.
process.The inference process, on the other hand, involves feeding an input image to the model and obtaining the model's prediction based on its learned weights and biases.The model's inference process itself does not involve manual control or encoding.The CAMs are also involved in the evaluation of the spectral loss, which is used to calculate importance weights, enhancing the ability of SAMv2 to analyze specific spectral regions of different gases.Furthermore, to validate the robustness of the component identification capability to the unknown spectral contribution, in addition to the mixture of all five preset molecular gases, described in the Section 3.1, we further added 10 ppm of ethane (C 2 H 4 ), which is an unknown gas species for the model beyond the preselected gas set.Due to the contribution of C 2 H 4 , the absorbance of the measured spectrum is increased, so is the predicted concentration of the five target gases for the models without identification capability.In contrast, the predicted results of SAMv2 remain within the tolerance range compared to the preset concentrations.The results are summarized in Table 2.

Conclusion
We present a novel approach to parallel multicomponent gas mixture detection and analysis.With respect to the hardware front end, a broadband dual frequency comb laser source in conjunction with a multipass cell were used to realize high sensitivity and robust optical spectrometer for measuring high precision and resolution broadband absorption spectra.A novel unsupervised learning algorithm SAMv2, as a data processing back end, consisting of one-dimensional convolutional layers forming the information extraction module and SAMv1-based information mapping module was proposed and trained on a physics-informed augmented dataset.The system features simultaneous identification of gas species, their concentration retrieval, as well as the ambient pressure determination with good robustness to model errors in trace gas detection and baseline variations caused by unknown gas absorption.This is the first time for a DCS spectrometer system to simultaneously realize such functions.The performance of the whole system was demonstrated by concurrent detection and quantification of 31 different gas mixtures of 5 typical molecular species, with up to sub-ppb level sensitivity.
We have demonstrated the benefits of combining the MIR DCS and deep learning techniques, including rapid scans, broad spectral coverage, comb-tooth resolved spectra, superior detection capability of multiple molecular species, and determining their concentrations.The accurate detection of mixtures, presently demonstrated with five gases, can find applications in various fields, such as medical diagnostics with breath biomarkers and atmospheric monitoring of trace gasses.Different devices may require specific preprocessing steps or calibration procedures to transform the raw spectral data into a suitable format for the SAMv2 model.If the preprocessing or calibration steps differ significantly between devices, the model might need to be adapted or retrained to accommodate these changes.Even so, SAMv2 is a scalable approach to achieve more generalized massively parallel sensing of numerous trace molecules, including their isotopologues, by means of augmentation of more gas species to dataset and more sophisticated model architecture.Although limited by the current experimental conditions (i.e., we could not create controlled high temperature and pressure conditions), the reliable pressure regression results look promising.It is feasible to further realize the accurate temperature determination (in addition to pressure) for applying such platform in studies of chemical reaction dynamics.

Figure 1 .
Figure 1.Mid-IR DCS setup and system characterization.a) Schematic of the DCS setup.The experimental setup includes two MIR comb sources, mirrors, and lenses allowing to couple the MIR comb2 into the multipass cell (MPC), one 50:50 beam splitter (BS) to split the reference and signal pulses, one 92:8 BS to combine the pulses from the two combs, and an MCT photodetector with a computer for data acquisition and blended spectra analysis.Membrane pumps, a pressure controller, and mass flow controllers (MFC) were employed to maintain stability of measurement conditions.b) Zoomed time domain interferograms of reference and signal within 2 μs time window.c) Typical detector signal with multiple DCS interferograms recorded within an 80 ms time window.d) Fourier transformed magnitude (black) and unwrapped phase (green) RF spectra (log scale) from the 80-ms-long recording; the absorption dips of water can be observed.e) Zoomed narrow range from 40.25 to 40.45 MHz and the discrete comb lines with a spacing of δf r = 1489 Hz can be observed.f) The transmitted spectral power density signal retrieved from a single coherently averaged interferogram (N ave = 500) when the gas cell was evacuated and that of the cell filled with 800 ppm water vapor in N2 buffer gas at 1 atm total pressure.g) The corresponding absorbance spectrum for water obtained by normalizing the sample spectrum to the baseline.

Figure 2 .
Figure 2. Flow charts of development of physics-informed data augmentation unsupervised SAMv2.a) Dataset construction.The dataset consists of simulated absorption spectra of 31 gas mixtures composed of 5 molecular species.Background noise and spectral perturbations have been added to make the simulated data close to the practical situations.b) Model architecture tuning.The dataset is divided into training, validation, and test sets according to hold on and cross-validation principle, and the hyperparameters of training and model architecture are optimized through this step.c) Model training.The model consists of information extraction module (formed by feature mapping (FM) blocks as well as contracting blocks (CB)) and information mapping module (using SAMv1 architecture).As an unsupervised learning algorithm, the predicted spectrum is obtained by the SAMv2 calculation based on the Beer-Lambert law.A presupposed prediction function is used to screen the predicted results.The spectral loss is determined by element-wise weighted difference of the input spectrum and the predicted one, where the weights are obtained from the last convolutional layer to directly indicate the importance for the predictions of species identification of different regions with specific spectral patterns for different gas species, forcing the model to pay more attention to certain regions of spectra.The gradients are based on deviation of this loss to with respect to the trainable parameters to backward propagate through each layer of SAMv2.

Figure 3 .
Figure 3. Parallel measurements of gas mixtures with all five preset molecular gases and evaluation of concentration retrieval capability.a) Comparison of the measured and predicted spectra of the gas mixture.Prominent absorption features for specific gas molecules are indicated.The good agreement and featureless residuals demonstrate the precision of prediction.b) Comparison of the measured spectrum and MFC preset spectrum of the gas mixture.The preset spectrum is calculated from the concentrations preset by MFC.The uncertainty of set points leads to a larger deviation between the preset spectrum and the measured one compared to that of the predicted spectrum.c) Spectral contributions of individual components to the measured spectrum.d) Real-time measurements of multicomponent gas mixture with stepwise-changed concentrations of gases.The right axis corresponds to the concentrations of water vapor, while the left axis corresponds to the other species.e-i) Assessment of the concentration regression capability.The coefficients of determination are higher than 0.999 for all molecules.The confidence intervals are narrow enough within the full concentration coverage, and the relative errors are lower than 2% for all cases.The preset concentrations as well as predicted concentrations were normalized for clarity.

Figure 4 .
Figure 4. Comparison of measured and predicted spectra for dual-component gas mixtures.a) Results for methane and acetone mixture.b) Results for methane and ethylene mixture.c) Results for ethylene and water vapor mixture.d) Results for water vapor and formaldehyde mixture.The measured (black) and predicted (red) spectra are shown in the upper plots, and the individual contributions are indicated in the lower plots with the corresponding colors.

Figure 5 .
Figure 5.Comparison of measured and predicted spectra for triple-component gas mixtures.a) Results for methane, water vapor, and acetone mixture.b) Results for acetone, water vapor, and ethylene mixture.c) Results for ethylene, water vapor, and formaldehyde mixture.The measured (black) and predicted (red) spectra are shown in the upper plots, and the individual contributions are shown in lower plots with the corresponding colors.

Figure 6 .
Figure 6.Comparison of measured and predicted spectra for four-component gas mixture.a, Results for methane, ethylene, formaldehyde, and acetone mixture.The measured (black) and predicted (red) spectra are shown in the upper plot.The individual contributions are indicated in the upper plots (CH 3 COCH 3 and C 2 H 4 ) and the lower plots (H 2 CO and CH 4 , inverted for better viewing) with the corresponding colors.

Figure 7 .
Figure 7.Comparison of measured spectra and predicted spectra of single-component gases and the class activation maps (CAMs) for gas component identification.a-f ) Absorbance spectra (lower plots) and CAMs (upper plots) for all 5 individual species.The predicted spectra are inverted for clarity of comparison.The CAMs show the importance of specific spectral patterns of different individual gas species for their identification.

Finally, in this
study, we explore the influence of pressure changes on the model predictions.We introduced alternatively 20 ppm of C 2 H 4 or 1000 ppm of H 2 O into the MPC and recorded the measured spectra at 100, 500, and 1013 mbar (1 atm) of ambient pressure.The measured and predicted spectra are shown in Figure8for comparison.The predicted spectra are basically consistent with the measured spectra, indicating that the model can perceive the spectral profile change caused by the pressure variations under the conditions of measuring the same gas at the same concentration.The error is kept under 10% within the full range of the pressure changes.

Figure 8 .
Figure 8.Comparison of measured and predicted spectra of fixed concentration gases under different pressure conditions.a) The absorbance of 20 ppm ethylene under 100, 500, and 1013 mbar.b) The absorbance of 1000 ppm water vapor under 100, 500, and 1013 mbar.The predicted plots are inverted in sign for clarity.The zoomed plots reveal details of the profile changes caused by the pressure variations, which are used by the pressure regressor to accurately predict the current pressure status.

Table 1 .
Comparison of retrieved concentrations of gas samples by models with and without component identification capability when the MPC was filled only with methane.Component identification capability helps the model to eliminate the error due to the misjudgment of the presence of trace gases.

Table 2 .
Comparison of retrieved concentrations of gas samples after adding unknown gas (ethane).Component identification capability enables the model to distinguish the difference between the target gases and the unknown absorber, ignoring the absorption of ethane and avoiding the improper deviations of the target species predictions.