Tracking the Evolution of Single-Atom Catalysts for the CO2 Electrocatalytic Reduction Using Operando X-ray Absorption Spectroscopy and Machine Learning

Transition metal-nitrogen-doped carbons (TMNCs) are a promising class of catalysts for the CO2 electrochemical reduction reaction. In particular, high CO2-to-CO conversion activities and selectivities were demonstrated for Ni-based TMNCs. Nonetheless, open questions remain about the nature, stability, and evolution of the Ni active sites during the reaction. In this work, we address this issue by combining operando X-ray absorption spectroscopy with advanced data analysis. In particular, we show that the combination of unsupervised and supervised machine learning approaches is able to decipher the X-ray absorption near edge structure (XANES) of the TMNCs, disentangling the contributions of different metal sites coexisting in the working TMNC catalyst. Moreover, quantitative structural information about the local environment of active species, including their interaction with adsorbates, has been obtained, shedding light on the complex dynamic mechanism of the CO2 electroreduction.


Cells used for the electrocatalytic activity and operando XAS measurements
: H-type cell scheme. RE: reference electrode, CE: counter electrode, WE: working electrode. Figure S1 shows a schematic depiction of the H-type cell used for the catalytic activity measurements. This cell design allows CO2RR product detection, while the semipermeable membrane (Selemion, AMV, AGC Inc.) that separates anode and cathode compartments and prohibits poisoning ions to pass towards the investigated electrode. The cathode compartment contains the WE and the RE while an inlet allows the CO2 bubbling and an outlet leads the excess CO2 and the gas products to the Gas Chromatograph. The anode compartment contains a counter-electrode (Pt gauze (MaTecK, 3600 mesh cm -2 )) and an inlet for CO2 bubbling. The used electrolyte was 0.1M KHCO3, purified with a cation exchange resin (Chelex 100 Resin, Bio-Rad) and pre-saturated with CO2. Figure S2: Operando electrochemical cell used to collect the XAS spectra during the CO2RR conditions. Adapted with permission from Ref. 1 Copyright 2021 American Chemical Society.
The cell used for the operando XAS measurements is a single compartment cell with a typical three electrode setup featuring a reference electrode, counter electrode and, finally, a working electrode (our sample). The XAS measurements were performed in fluorescence mode mounting the sample on the front panel of the cell facing the electrolyte and acting as an X-ray window. Figure S2 shows the schematic depiction of the operando XAS cell.    In panels c and d the main line positions for reference Ni-compounds are shown which were taken from Refs. 2,3 The N 1s spectra were fitted with components in accordance with previous reports on transition metal nitrogen doped carbon (TMNC) materials. [4][5][6][7][8][9] The peak at 398.3 eV is assigned to pyridinic N (i.e., N bound to two carbon atoms in a six-member ring). The peak located at 399.5 eV can be attributed to amine-type N or

Ex situ characterization and electrocatalytic activity measurements
Nitrogen coordinated to Ni. The next peak at 400.8 eV is related to hydrogenated N-functional groups, which is either a pyrrolic-type N (i.e., N bound to two C and one H in a five-member ring) or a hydrogenated pyridinic N. We assign the peak centered at 402.1 eV to quaternary N (bearing a positive charge), and the peak at 403.5 eV to graphitic N. We also note that the latter two peaks may have contribution from protonated N-species as well, such as pyridinium ion. Finally, the two peaks between 405 and 407 eV are attributed to different oxidized N-moieties . 8

Wavelet Transform analysis of the EXAFS spectra belonging to the initial and final state
To exclude the presence of possible Ni-Ni contributions, we relied on the wavelet transform (WT) analysis 10 of the EXAFS spectra involving the initial and final state of the reaction process. WTs of the EXAFS spectra for the initial and final catalyst state are compared with those for Ni metal and NiO XAS references spectra in Figure S12(a-d). The WTs were carried out using the Morlet mother wavelet function with = 1 (value for the width of the Gaussian envelope), and = 7 (frequency of the harmonic function), allowing the optimal resolution in k-and R-spaces for the WT-EXAFS features located at R-values around 3.5 Å. One can note that the intensity of the contribution of particular scattering path to the WT-EXAFS map depends on the atomic number of the scattering element. Lighter elements typically show a maximum WT-EXAFS intensity at lower k-values than the heavy metals. Theoretical calculations show that the maximum of the Ni-Ni scattering amplitude function is expected to be at ca. 7Å -1 (Figure S12(f)). The WTs of the experimental Ni K-edge EXAFS spectra for metallic Ni and for Ni-Ni bond in NiO reference indeed exhibit a pronounced maximum in this region of k-space ( Figure S12(a, b, e)). On the other hand, the maximum contribution of low-Z elements (N, C, O) is expected at ca. 3 Å -1 (Figure S12(f)), as exemplified by the Ni-O bond contribution of the WT-EXAFS map belonging to the NiO reference ( Figure S12(b, e)). Here, to show it more clearly, in Figure   S12  The PCA was carried out based on the singular value decomposition (SVD) of matrix X formed by experimentally collected XANES spectra. 14,15 The first four extracted components are displayed in Figure   S13.
To estimate the number of independent components, several statistical approaches could be used. In the Scree test ( Figure S14 Finally, the same result can be obtained also by finding the largest PC having a significance level (from the Fisher distribution) lower than 5% (Figure S14(c)) from the so called Malinowski's test plot.
As one can see, all these tests point to the same conclusion: three components are sufficient to describe the variations between XANES spectra in our dataset. operator. 16 The % LOF trends are depicted in Figure S15(a). One can see that using only two PCs the reconstruction error is the highest for the second/third XANES scan (corresponding to the state of the catalyst after ca. 9-18 minutes under CO2RR). By employing three PCs in the XANES reconstruction, the lack of fit is decreased for these XANES spectra, Figure S15

FDMNES simulation and convolution parameters
For the Ni K-edge XANES simulations we relied on the finite difference approach (FDM), implemented in the FDMNES code. 17 The energy mesh used for spectra simulations featured an energy step of 0.02 eV near the Fermi level, while 2 eV and 30 eV above it. We performed the calculations using the real Hedin-Lundqvist 18 and von Barth local exchange correlation potential. 19 In the spherical region around the atoms and in the outer sphere, the electrostatic potential and the electron wave function were expanded in a series of spherical harmonics choosing the maximum value of the angular momentum as = √ ( + 1) , where is the photoelectron wave vector and is the radius of the sphere. The parameters reported in Table S4 were selected for the convolution of the calculated spectra employing an energy dependent arctangent shape of the Lorentzian profile (details can be found in the manual for the FDMNES program 20 ), see Figure   S16(a).
The simulated spectra were aligned by correcting each energy grid by their related EPSII parameter (corresponding to the energy required to bring one 1s core electron to the continuum for each structure). 20 At the same time, we applied a common shift of 148 eV to all the simulated spectra. The latter was estimated following an approach introduced in Ref. 21 We performed FDMNES calculations for the Ni-phthalocyanine  . The latter was calculated in the energy range between 8342 and 8430 eV, excluding part of the XANES pre-edge region that is not perfectly reproduced using the FDM approach. 20 The lowest achieved F-value (denoted as Fmin), can be used to characterize the goodness of fit and is reported in Table 2 in the main text.
Since our experimental XANES spectra have a very good signal to noise ratio (~ 10 4 ) the uncertainty associated with the obtained best-fit values for different structural parameters, is mostly associated with the correlations between different fitting parameters (as well as with the systematic e limitations of the theory or systematic errors in the experiment 23 ). To estimate the uncertainties due to the correlations, we calculated the degree of variations in the corresponding parameter value, which would result in an increase of the best fitvalue by 10%. More precisely, for each structural parameter , we evaluated the -value curve by changing value within the range, specified in Table 1 in the main text, and optimising the values of remaining structural parameters. For example, Figure S17 shows -value curve for parameter 5   Figure S18: Set of deformations characterizing the four and five coordinated models used to fit additionally the second and third XANES components retrieved from the transformation matrix approach shown in Figure 5 of the main text. The description of each parameter represented in this picture is summarized in Table S5.  Figure S18 and employed in the additional fit of the second and third XANES components of Figure 6 of the main text.

Parameter Description Range of variation Model 4 (Component 3)
p1 Contraction/extension of the pyridine ring.
[-0. We employed the same normalization parameters adopted to weight the theoretical XANES spectra, deriving from the models shown in Figure 6 of the main text, for the fit of the second and third component and of the precursor. In the following, we display the best-fit plots and the tables containing the refined parameters. Figure S19: Comparison of the third XANES component ( Figure 5 of the main text) and its best-fit result obtained using the model 4 depicted in Figure S18. The inset shows the refined geometry. The refined structural parameters are reported in Table S6 and Table S7. Figure S20: Comparison of the a) second and third b) XANES component ( Figure 5 of the main text) and the best-fit results obtained using the model 5 depicted in Figure S18. The insets show the refined geometries. The refined structural parameters are reported in Table S6 and Table S7. Table S6: Refined structural parameters obtained through the XANES fits shown in Figure S19 and Figure S20.   Figure S19 and Figure S20. The distances uncertainties are derived from the ones showed in Table  S6. For the details of the misfit quantity (Fmin) calculations see Section S6.  Table S8.  Figure S21: XANES changes associated to the linear variation of each single structural parameter belonging to model 1 within the ranges defined in Table 1 and in Figure 6 of the main text.  Table 1 and Figure 6 of the main text and in Figure S24(b).

Distances (average)/Angle XANES Best Fit value Model 4 (Component 3). Misfit (Fmin
10 Effect of the CO-group rotation around the Ni-C axis Figure S24: Graphical representation of the rotation of the CO group(s) around the Ni-C bond direction for the models associated to the second a) and third b) pure XANES spectra, respectively. Ten XANES spectra associated to these models assuming a fixed Ni-C-O angle of 45 ° are shown in Figure S22 and Figure S23, respectively.   Table S8, it is possible to see that their magnitudes are almost one order lower. This fact leads us to neglect this parameter in the XANES fitting. Figure S25: Comparison between the ML-predicted XANES spectra exact FDM calculations for the sets of structural parameters giving the best agreement with the XANES spectra for pure components.

Comparison between the ML-derived approximations and the exact FDM calculations
12 XANES best-fit results using models from Figure 8 of the main text  15 Machine learning-assisted XANES fit of the initial and final states of Ni-

TMNC sample
Despite the large difference in XANES features for HT Ni-TMNC and Ni-TMNC samples (Figure S28), we have found that for the both catalysts the final structure under CO2RR conditions can be well described by model 3 (Figure 6 in the main text).
On the other hand, interestingly, we found that model 1, which could successfully describe the as-prepared state of the HT Ni-TMNC catalyst, could not fit well the initial state of the Ni TMNC initial state (see Figure   S29 and Table S11), In particular, model 1 could not reproduce the very intense white line feature, characteristic for the as-prepared Ni-TMNC. We note that such a white line is characteristic for the octahedrally coordinated Ni(II)-O6 species. It is plausible that, in presence of air, the Ni site in Ni-TMNC could be partially detached from the pyridines ring due to strong interaction with oxygen or adsorbed water species. Indeed, by removing the pyridines group from the structure model used to fit XANES spectrum for the as-prepared Ni-TMCN, the fit quality is improved. Figure S29: Comparison between the initial state XANES (beginning of the CO2RR reaction) of the Ni-TMNC and its best-fit result obtained using Model 1 depicted in Figure 6 of the main text. The inset shows the refined geometry. The refined structural parameters are reported in Table S11.  Figure S30 and Table S12.
The results of XANES fitting, and the values of structure parameters obtained in XANES fits for Ni-TMNC sample are summarized in Figure S31, Table S13 and Table S14.  Figure S30: Set of possible structure model deformations considered in the fit of XANES spectra for the as-prepared Ni-TMNC sample. Figure S31: Comparison between the XANES Ni-TMNC spectra of the Ni-TMNC initial a) and final state after 1h of CO2RR b) and their best-fit results. The insets display the refined geometries. The refined structural parameters are reported in Table S13 and in Table S14.
For the as-prepared Ni-TMNC sample, the XANES best-fit results suggest that the axial Ni   Table S14: Interatomic distances and Ni-CO ligand angle, calculated for the final structure models, obtained through the XANES fitting ( Figure S31). The distances uncertainties derive from the ones showed in Table S13. For the details of the misfit quantity (Fmin) calculations see Section S7.