Chadawan
Khamdang
a and
Mengen
Wang
*ab
aDepartment of Electrical and Computer Engineering, State University of New York at Binghamton, Binghamton, New York 13902, USA. E-mail: mengenwang@binghamton.edu
bMaterials Science and Engineering Program, State University of New York at Binghamton, Binghamton, New York 13902, USA
First published on 3rd March 2025
Sn-based perovskites as low-toxicity materials are actively studied for optoelectronic applications. However, their performance is limited by p-type self-doping, which can be suppressed by substitutional doping on the cation sites. In this study, we combine density functional theory (DFT) calculations with machine learning (ML) to develop a predictive model and identify the key descriptors affecting formation energy and charge transition levels of the substitutional dopants in CsSnI3. Our DFT calculations create a dataset of formation energies and charge transition levels and show that Y, Sc, Al, Zr, Nb, Ba, and Sr are effective dopants that pin the Fermi level higher in the band gap, suppressing the p-type self-doping. We explore ML algorithms and propose training a random forest regression model to predict the defect formation properties. This work shows the predictive capability of combining DFT with machine learning and provides insights into the important features that determine the defect formation energetics.
To address these limitations, defect engineering through doping has been investigated as a potential solution to improve Sn-based perovskite properties. Experimental studies on Ba-doped Sn–Pb perovskites indicate that Ba incorporation can reduce hole concentration, thereby reducing the effects of p-type doping.15 Density functional theory (DFT) calculations provide a theoretical understanding of the mechanism, showing that Ba acts as an energetically favorable donor in CsSnI3 that shifts the Fermi level upward and decreases the background hole concentration.16 DFT studies also propose that trivalent cation doping on the Sn site in MASnI3 including Sc, La, and Ce can also raise the Fermi level, which is supported by experimental validation that La doping in MASnI3 results in an increase in photocurrent and open circuit voltage.17 Another DFT study on MASnI3/MASnI2Br proposes that Sc, Y, and La doping can shift the Fermi level upward, thereby reducing hole concentration compared to pristine perovskites.18
DFT is widely used to predict defect formation energies under various chemical potentials and has reliably predicted intrinsic defect and dopant formation energies and charge transition levels in semiconductors.13,19–21 Defect calculations require large supercells and hybrid functionals with spin–orbit coupling (SOC) to correctly describe the electronic structure and charge localization, which are computationally demanding.19,22–24 To overcome these limitations, machine learning (ML) algorithms offer a promising approach to predict and understand defect properties efficiently. Recent studies have demonstrated that DFT can be combined with ML algorithms to predict formation energies and charge transition levels for both dopants and intrinsic defects.25–28 Specifically for dopant incorporation energetics, data generated from DFT calculations using the PBE functional has been used to train ML algorithms to predict defect formation energies in perovskite oxides (ABO3) and halide perovskites (MAPbX3).25,26 There is also a growing interest in applying ML algorithms to predict defect energetics at the hybrid functional accuracy.27,28 These studies reveal opportunities and the need to improve the prediction of defect formation energetics by combining DFT calculations with hybrid functionals and machine learning methods, which is also promising to provide insights into the physical and chemical descriptors underlying these properties.
This work combines DFT using HSE06 + SOC with ML to predict formation energies and charge transition levels for substitutional dopants in CsSnI3. We explore elements from group II-A (e.g., Mg, Ca), transition metals (e.g., Sc, Y), post-transition metals (e.g., Al, Ga, In), and metalloids (e.g., Ge, As, Sb). DFT calculations are performed to generate a dataset for formation energies in the neutral (q = 0) and q = +1 charge states as well as the +1/0 charge transition level. We then identify key descriptors affecting formation energy and develop predictive models for the formation energies and charge transition levels of dopants in CsSnI3. Linear and nonlinear regression models including linear regression, Gaussian process regression, kernel ridge regression, and random forest regression are trained. We also analyze the feature correlations and feature importance and extend predictions to other out-of-sample dopants in CsSnI3.
The formation energy of a substitutional dopant X on the Sn-site (XSn) with the charge state of q is calculated by
| Ef[XqSn] = Etot[XqSn] − Etot[bulk] + μSn − μX + q(EF + Evbm) + Ecorr | (1) |
| ΔμCs + ΔμSn + 3ΔμI = ΔHCsSnI3 (−5.51 eV), |
| ΔμCs + ΔμI < ΔHCsI (−3.72 eV), |
| ΔμSn + 2ΔμI < ΔHSnI2 (−1.65 eV), |
| ΔμSn + 4ΔμI < ΔHSnI4 (−2.92 eV), |
| 2ΔμCs + ΔμSn + 6ΔμI < ΔHCs2SnI6 (−10.52 eV), | (2) |
The numbers in parentheses are the calculated formation enthalpy of the secondary phases using HSE06 + SOC, which show good agreement with the experimental values for CsSnI3 (−5.35 eV), CsI (−3.29 eV), SnI2 (−1.99 eV), SnI4 (−2.54 eV), and Cs2SnI6 (−9.31 eV).34 This thermodynamically stable domain of CsSnI3 is illustrated in orange in Fig. 1(b), which is consistent with previous reports.24 The chemical potentials for I, Sn, and Cs are −0.605 eV, −0.50 eV, and −3.20 eV under I-rich (Sn-poor) condition (point A) and −0.89 eV, 0 eV, and −2.84 eV under I-poor (Sn-rich) condition (point B). We note that ΔμX's are also determined by the formation of the competing phases XIn's, where n depends on the oxidation state of the dopant. The data for the formation enthalpy of the XIn's are made available in the section Data and Code Availability. The charge transition level (CT) from one charged state (q1) to another (q2) is defined as
![]() | (3) |
and
are the formation energies calculated at EF = 0 for the defect in different charge states. The same approach is applied to calculate the formation energy and charge transition level of intrinsic defects in CsSnI3.
Fig. 2 includes the intrinsic defects and the dopants with relatively low formation energies under both I-rich [Fig. 2(a)] and I-poor [Fig. 2(b)] conditions. Under the I-rich condition, the EF determined by the native defects in CsSnI3 is pinned within the valence band (VB). At VBM, the Cs vacancy (VCs) at q = −1 has the lowest formation energy, indicating the origin of the p-type self-doping is primarily driven by VCs, consistent with previous studies.24 Our DFT study of the CsSnI3 surface phase diagram also shows that surfaces with Cs vacancies are stable under I-rich conditions.36 Among the calculated dopants, YSn at q = +1 has the lowest formation energy at VBM. However, under the I-rich condition, the formation energy of YSn at q = +1 is still higher than VCs at q = −1. Therefore, the Fermi level cannot be shifted to a higher energy under I-rich conditions.
The I-poor condition is preferred to suppress the p-type self-doping. The EF determined by the native defects is pinned at 0.11 eV above the VBM under the I-poor condition: VCs with q = −1 is compensated by the I vacancy, which prefers q = +1 near VBM. We note that the low cation vacancy formation energies indicate the low stability of the host material. The cation vacancy formation energies are higher under I-poor and Sn-rich conditions, which benefit the phase stability of CsSnI3. This can be achieved by adding SnF2 or SnCl2 during the synthesis of the perovskite material, which has been found to slow down the phase transformation to double perovskite and increase the Fermi level.37 We identified three trivalent elements Al, Sc, and Y that can pin the EF to higher energies, which are 0.27, 0.32, and 0.33 eV above VBM. YSn is only stable at q = +1 in the band gap while AlSn and ScSn have a shallow CT(+1/0) near CBM. We confirmed electron localization20 at the neutral charge state (Fig. S1, ESI†). For example, Fig. S1(a) (ESI†) corresponds to the ground state of AlSn with the charge localized near the defect while Fig. S1(b) (ESI†) represents a metastable state that is 0.40 eV higher in energy, where the charge is delocalized. When Sn is substituted by bivalent elements including Mg and Zn, the defect is only stable in the neutral charge state and has relatively low formation energies. We also identified two dopants with higher oxidation states (ZrSn and NbSn) that pin the Fermi level above the VBM (∼0.2–0.3 eV).
ZrSn and NbSn are stable in the +1 charge state near the VBM, while NbSn prefers the neutral charge state across a wide range of the Fermi level. This results in a relatively deeper charge transition level (0.30 eV) within the gap compared to dopants with an oxidation state of 2 or 3. However, we note that deep defects may lead to slow nonradiative recombination rates due to the anharmonicity in perovskite materials.38 As shown in the density of states (Fig. S2, ESI†), AlSn and ScSn in the q = 0 charge state have localized occupied states near the Fermi level. At q = +1, only delocalized states are observed for the dopants with shallow charge transition levels. Dopants with deep transition levels tend to have a localized unoccupied state in the band gap. For example, NbSn and BiSn in the q = +1 charge state have an unoccupied state below the CBM, indicating that NbSn+ and BiSn+ can potentially gain an electron to become the neutral charge state.
We now analyze the elemental descriptors of the substitutional dopants that correlate with the target properties including Ef (q = 0), Ef (q = +1), and CT(+1/0) of XSn, aiming to identify key features to predict these properties. The oxidation state (OS) is an important feature that determines both Ef and CT(+1/0). For elements with OS = 3, the formation energy at q = 0 is higher than the bivalent elements like Zn, Mg, and Ca. The (+1/0) charge transition levels are located near or above CBM for trivalent elements and located below VBM for bivalent elements.
For certain elements with the same OS, there is a direct trend between the atomic radius (AR) of the elements and Ef at both charge states. For example, for Zn, Mg, and Ca with OS = 2, the Ef at q = 0 under the I-rich condition increases [ZnSn (−0.16 eV) < MgSn (−0.06 eV) < CaSn (0.04 eV)] while the atomic radius increases from Zn (1.42 Å), Mg (1.45 Å) to Ca (1.94 Å). The trend is consistent for the elements with OS greater than +2. For example, Al has a smaller atomic radius (1.18 Å) than Zr (2.06 Å) and Al has a lower formation energy than Zr in both charge states under I-rich conditions.
The Goldschmidt tolerance factor (t)39 can be calculated using AR as
![]() | (4) |
Electron negativity (EN), ionization energy (IE), and electron affinity (EA) of the dopants play important roles in determining CT(+1/0). For Ca, Mg, and Cu with OS = +2, CT(+1/0) of these dopants are below the VBM following the trend CuSn (−0.70 eV) < MgSn (−0.30 eV) < CaSn (−0.27 eV) and negatively correlated with EN of Cu (0.97) > Mg (0.67) > Ca (0.51). For TMs, CT(+1/0) decreases while the first, second, and third IE increase. For example, CT(+1/0) of ZrSn, NbSn, and ZnSn are 1.31 eV, 0.30 eV, and −0.27 eV respectively, with 1st, 2nd, and 3rd IE increases from Zr, Nb, to Zn. A similar trend is observed in electron affinity (EA). For instance, the CT(+1/0) levels of CuSn, CrSn, and ZrSn are −0.70 eV, −0.29 eV, and 1.31 eV, respectively, with EA decreasing accordingly. The observed correlations of EN, IE, and EA with the charge transition levels are plotted in Fig. S4 (ESI†). The calculated dopants with OS = +4 are not stable in the q = +2 charge state. For example, removing an electron from ZrSn at q = +1 is energetically unfavorable due to the low energy level of the corresponding occupied state.
In summary, we propose that trivalent dopants including Al, Sc, and Y can raise the Fermi level and suppress the p-type doping of CsSnI3, with YSn exhibiting the lowest formation energy under I-poor conditions. Dopants with higher oxidation states, such as Zr and Nb are energetically favorable at q = +1 near the VBM, which also raise EF to higher values. We also find that formation energies are correlated with properties including the oxidation state, tolerance factor, octahedral factor, and density. Charge transition levels are more correlated with elemental properties including oxidation state, electronegativity, ionization energy, and electron affinity. These observations will guide us in determining features for property predictions using machine learning algorithms.
We used the Pearson correlation coefficient (p) to identify the features with strong linear correlations with properties and the highly correlated features.42 If two features have a high absolute Pearson correlation coefficient (|p| > 0.8), the one with a low correlation with the property is eliminated from the feature list. In total, 11 features were selected for the ML model training. The correlations between these features and the target properties are shown in Fig. 3. The heatmaps illustrate the relationships between the down-selected features and target properties including Ef (q = 0) [Fig. 3(a)], Ef (q = +1) [Fig. 3(b)], and CT(+1/0) [Fig. 3(c)] under the I-rich condition.
For Ef at q = 0, HV has a positive Pearson correlation coefficient (p = 0.60) with the target property while t(AR) has a negative value of p = −0.31, which is consistent with our observation in Section 3.1. Additionally, the 3rd IE has a strong negative correlation (p = −0.56) and the OS has a strong positive correlation (p = 0.70) with Ef at q = 0. For Ef at q = +1, stronger correlations were observed across most features compared to the other two target properties. Specifically, the HF (exp) exhibited a strong negative correlation (p = −0.55), while D showed a strong positive correlation (p = 0.61). t(AR) has a correlation of −0.20, which is close to the correlation observed in Ef at q = 0 (−0.31). These results indicate that structural stability and physical properties of the dopants are important descriptors to predict Ef.
For CT(+1/0), the features with the strongest negative and positive correlations align with those observed in Ef at q = 0, as indicated by 3rd IE with p = −0.50 and OS with p = 0.55 As noted in Section 3.1, the EN is negatively correlated with CT(+1/0) for dopants with an oxidation state of +2. In the selected feature list, EN was excluded due to its high correlation with D (p = 0.79) and the HF (exp) (p = −0.87) and its relatively small variance compared to other elemental properties.
After down-selecting the key features, we trained four machine learning (ML) algorithms including linear regression (LR), Gaussian process regression (GPR), kernel ridge regression (KRR), and random forest regression (RFR) on our DFT dataset to explore their predictive capabilities. In our study, we used the scikit-learn package43 to train the ML models. We followed standard practices to split the data into training (80%) and testing (20%), apply grid-based hyperparameter search, and employ five-fold cross-validation to reduce overfitting.25,26 Model performance was evaluated using root mean square error (RMSE) as the key metric. Additionally, we also evaluate feature importance and compare it with the Pearson correlation coefficients.
Gaussian process regression (GPR) is known for modeling complex nonlinear correlations, employing the kernels to define a function based on the covariance of the prior distribution over the target functions.44,45 We explored five types of kernels and the corresponding hyperparameters, alpha (the regularization parameter), and length to optimize model performance. The kernel functions include Radial Basis Function, ExpSineSquared, Rational Quadratic, DotProduct, and Matern.46 Hyperparameter optimization was performed using the randomized search method. The optimized hyperparameters are listed in Table S1 (ESI†). The parity plots using GPR are presented in Fig. 4(a), yielding training/testing RMSE values of 0.21/0.32 eV for Ef(q = 0), 0.18/0.23 eV for Ef(q = +1), and 0.16/0.31 eV for CT. GPR outperformed LR for all three target properties, indicating its effectiveness in capturing the underlying relationships in the data.
Kernel ridge regression (KRR) is also a nonlinear regression model integrating ridge regression with kernel functions.47 The same kernel functions were tested as in GPR. The best estimators for KRR result in RMSE values of 0.15/0.25 eV for Ef(q = 0), 0.16/0.19 eV for Ef(q = +1), and 0.15/0.27 eV for CT, as shown in Fig. 4(b).
Random forest regression (RFR) is a widely used machine learning technique that combines multiple decision trees into an ensemble of predictors.48 Training the RFR model involves optimizing hyperparameters including the number of trees (or estimators), maximum tree depth, number of leaf nodes, and the maximum number of features used to split a tree. The best hyperparameters that yielded the best predictions for all regressions are listed in Table S1 (ESI†). The parity plots from the RFR model are shown in Fig. 4(c). The RMSE for the training/testing datasets are 0.17/0.20 eV for Ef(q = 0), 0.11/0.15 eV for Ef(q = +1), and 0.17/0.22 eV for CT, respectively. These results demonstrate improved predictions for both Ef and CT(+1/0) compared to those achieved by using LR, GPR, and KRR.
During the training of the RFR model, we also assessed the feature importance for the three target properties [Fig. 4(d)–(f)]. For Ef(q = 0) [Fig. 4(d)], the top five most important features from the RFR training are 3rd IE, t(AR), HV, OS, and EA. For Ef(q = +1) [Fig. 4(e)], the top five most important features include HF(exp), D, 3rd IE, t(AR), and EA. The feature importance for predicting formation energy for both charge states highlights three important features: 3rd IE, t(AR), and EA. These features exhibit relatively strong positive or negative Pearson correlations in Fig. 3 and partially overlap with the top important features predicting Ef of neutral defects in ABO3.25 For CT(+1/0) [Fig. 4(f)], the top import features include 3rd IE, t(AR), 1st IE, OS, and HF(exp). These features are also consistent with the highly correlated features shown in Fig. 3(c).
We also applied RFR to predict the formation energy at q = +1 under I-rich conditions for substitutional dopants on both the Cs site (XCs) and the Sn site (XSn). Fig. 5(a) shows the parity plot of DFT calculated versus the RFR predicted values for Ef (q = +1) with a train/test RMSE of 0.17/0.26 eV. This RMSE is higher than that of the XSn system as the features need to describe the interaction between dopants with two cation sites. The top five features from the RFR training are shown in Fig. 5(b), including HV, OS, D, EA, and 1st IE. Two of these features [D and EA] are consistent with the top features from RFR training using only the XSn data points [Fig. 4(e)], indicating the consistency in feature correlations on both sites.
![]() | ||
| Fig. 5 (a) Parity plot obtained from random forest regression and (b) highlights the top five most important features for the formation energy (q = +1) of XCs and XSn. | ||
We explore machine learning regression algorithms and determine that the random forest regression can be used to develop a predictive model for the formation energy and charge transition levels of substitutional defects at the cation sites in CsSnI3. By analyzing the feature correlation and feature importance from the random forest regression training, we identified key features including oxidation state, the heat of formation, density, and ionization energy as key descriptors that determine the defect formation energetics. The trained model is also applied to predict out-of-sample dopants and predicts three dopants including La, Ce, and Pr that have low formation energies at the q = +1 charge state. From a theoretical perspective, this study identifies key features that predict formation energy and charge transition levels. We believe that this predictive model will be valuable for investigating defects that suppress p-type behavior in other Sn-based perovskite materials, and provide insights into the key elemental descriptors that determine the energetics in defect formation.
Footnote |
| † Electronic supplementary information (ESI) available. See DOI: https://doi.org/10.1039/d4tc05215c |
| This journal is © The Royal Society of Chemistry 2025 |