Engineering and Technology
How machine learning can help select capping layers to suppress perovskite degradation
N. T. P. Hartono, J. Thapa, et al.
Perovskite solar cell (PSC) stability remains far below the ~25 years needed for mainstream photovoltaic deployment despite high power-conversion efficiencies (~25%). Enhancing environmental stability is therefore critical. While mixing low-dimensional (LD) perovskites with the 3D absorber can improve stability, this often degrades device performance due to reduced carrier transport in LD phases. In contrast, forming an LD capping layer atop the 3D perovskite can passivate surfaces while preserving transport by intercalating conductive organic materials, improving both Jsc and Voc, as well as stability at elevated relative humidity. However, the relationship between organic capping-layer molecular structure and device stability has not been systematically established due to the vast materials space. Building on inverse-design and machine-learning approaches in materials science, this work develops a machine-learning framework to identify molecular features of organic halide cations that govern stability when used as capping layers on MAPbI3, and to derive design rules enabling targeted selection of capping-layer chemistries.
Study design: 21 organic halide salts (various A-site organic cations paired with iodide or bromide) were evaluated as capping layers on 300 nm MAPbI3 films. For each salt, 12 processing conditions were explored by varying capping-layer precursor concentration (5, 10, 15 mM) and annealing temperature (50, 75, 100, 125 °C for 10 min). Films were unencapsulated and subjected to accelerated aging (85% RH, 85 °C, 0.16 Sun visible illumination). Time-lapse images were captured every 3 min and color-calibrated via 3D thin-plate spline warping to extract RGB time series. The degradation onset was defined as the time-intercept of the rapid red/green channel increase corresponding to black-to-yellow transition (perovskite to PbI2).
Featurization: Molecular properties for each organic salt were obtained from PubChem (2019) and included molecular weight, partition coefficient (x log P), number of rotatable bonds, molecular complexity, topological polar surface area (TPSA), number of hydrogen-bond donors, and counts of C, H, N, Br, I, heavy atoms. Processing parameters (precursor concentration, annealing temperature) were also included. All features were numeric and treated as continuous variables; material names were not used directly.
Machine learning: Six regression models (linear regression, K-nearest neighbors, random forest regression, gradient boosting regression with decision trees, multilayer perceptron neural network, and support vector regression) were implemented in scikit-learn. Hyperparameters were optimized via GridSearchCV with at least fivefold cross-validated RMSE, comparing normalized and non-normalized inputs (tree-based models did not require normalization). The target variable was the red-channel degradation onset time (minutes). Model interpretability and feature attribution were assessed using SHAP (Shapley Additive exPlanations) values applied to the best-performing fitted model.
Synthesis: MAPbI3 precursor: 1.5 M PbI2 (in 9:1 DMF:DMSO) mixed with MAI to yield MAI:PbI2 ratio of 1:1.09. Films were spin-coated: 1000 rpm 10 s (200 rpm/s), then 6000 rpm 30 s (2000 rpm/s) with 150 µL chlorobenzene dropped 5 s after start of the second step; annealed at 100 °C for 10 min. Capping-layer solutions (iodide or bromide salts of selected cations in isopropyl alcohol) were spin-coated at 3000 rpm for 30 s, then annealed at the specified temperature for 10 min. Excess PbI2 was present in the underlying MAPbI3 layer.
Accelerated aging and imaging: Samples (batches of 28) were tested at 85 ± 3% RH, 85 ± 2 °C with 0.16 Sun visible-only illumination. A Thorlabs DCC1645C CMOS camera acquired JPEG images every 3 min; color calibration used an X-Rite ColorChecker and transformation to and from Lab/RGB spaces. Onset times and slopes were extracted from calibrated RGB data; JPEG vs BMP yielded negligible differences.
Characterization: XRD (Rigaku SmartLab, Cu Kα) tracked phase evolution during degradation. FESEM (ZEISS Ultra-55) imaged morphology. XPS (Thermo K-Alpha+, Al Kα) quantified surface composition and chemistry during aging. FTIR (Perkin-Elmer Spectrum 400, ATR with ZnSe/Ge) probed bonding. GIWAXS was performed at NSLS-II 11-BM (CMS) with 13.5 keV beam, incident angles of 0.12° (surface) and 0.2° (bulk), detector at 257 mm; data analyzed with SciAnalysis. Samples were handled in a nitrogen glovebox between steps.
Data handling: Synthesis conditions were recorded in lab notebooks and transcribed to Google Sheets. Imaging data were uploaded to Dropbox and processed via the color-warping pipeline. Feature extraction from RGB series was performed in Python/MATLAB. Raw GIWAXS, XPS, FTIR were processed with their respective software. Metadata linking datasets were created ad hoc for significant samples.
Statistical analyses: Fivefold cross-validation used random 80%:20% train:test splits. Performance was reported as cross-validated RMSE. ANCOVA assessed statistical significance of onset differences for top materials. SHAP analyses ranked feature contributions; potential multicollinearity effects were evaluated by comparing feature ranks across different models.
- Random forest regression achieved the lowest fivefold cross-validated RMSE (~104 min) on non-normalized inputs; gradient boosting regression RMSE ~112 min. Linear regression exhibited high RMSE and unstable weights; neural network RMSE was large due to small dataset size. The degradation onset range was 0–700 min; bare MAPbI3 onset standard deviation across 35 samples was 45 min.
- SHAP feature importance indicated the most influential factors increasing stability (delaying onset) were: (i) low number of hydrogen-bond donors and (ii) small topological polar surface area (TPSA). These features are strongly correlated (Pearson r ≈ 0.81). Next important features included molecular weight and precursor concentration. Partition coefficient (x log P), molecular complexity, and elemental counts (C, I, Br) were lower-ranked.
- Material trends: Quaternary ammonium cations (no N–H bonds) outperformed primary/secondary/tertiary amines. Longer alkyl chains, branched, and phenyl-containing cations improved stability relative to short linear chains. Among tested materials, tetrapropylammonium (TPAI/TPABr), tetrabutylammonium (TBAI/TBABr), and phenyltriethylammonium iodide (PTEAI) retained dark color 4 ± 2 times longer than bare MAPbI3 under 85% RH, 85 °C, 0.16 Sun.
- Best performer: PTEAI (H-bond donors = 0; TPSA = 0 Ų) extended MAPbI3 stability lifetime by 4 ± 2× versus bare MAPbI3 and 1.3 ± 0.3× versus state-of-the-art OABr capping. Bare MAPbI3 average red-channel onset was 107 min; PTEAI onset was 462 ± 115 min.
- Predictions for literature molecules (assuming identical processing/aging): theophylline ~103.2 min, caffeine ~264.2 min, theobromine ~121.5 min; caffeine predicted most stable among these due to fewer H-bond donors and smaller TPSA.
- Mechanistic insights: Synchrotron GIWAXS/XRD revealed formation of a Ruddlesden–Popper capping phase, (PTEA)2(MA)3Pb4I13, atop MAPbI3. XPS/FTIR indicated that PTEAI-capped films suppress methylammonium loss and formation of PbI2 and oxygen-containing species during aging. O 1s atomic percentage in bare MAPbI3 increased from ~5% to ~20% after 460 min, while remaining below 1% in PTEAI-capped films; capped films maintained distinctive Pb 4f doublets associated with RP phases even after extended aging, correlating with improved stability.
The machine-learning analysis identifies low hydrogen-bond donor count and small TPSA in the organic cation as primary correlates with delayed degradation onset in humid, hot, illuminated conditions. These properties reduce hydrogen-bonding interactions and associated water-mediated degradation pathways at the perovskite surface. Quaternary ammonium cations, lacking N–H bonds, fulfill these criteria and perform best. PTEAI exemplifies this trend, forming a robust RP capping phase that passivates surface defects, modifies surface chemistry, and limits methylammonium and iodine loss as well as oxygen uptake, thereby stabilizing the underlying MAPbI3. The consistency of SHAP-derived ranks across models and alignment with physical characterization supports the proposed mechanism. These insights translate into practical design guidelines for selecting capping-layer molecules that enhance environmental stability without sacrificing charge transport by confining LD phases to the surface.
This work demonstrates a machine-learning framework to guide selection of organic cations for LD perovskite capping layers that improve MAPbI3 stability. By featurizing 21 organic salts and training regression models on accelerated-aging data, we identify low hydrogen-bond donor count and small TPSA as dominant stabilizing features. Implementing phenyltriethylammonium iodide (PTEAI) achieves 4 ± 2× longer lifetime than bare MAPbI3 and 1.3 ± 0.3× longer than OABr-capped films. Structural and surface analyses reveal an RP capping phase and suppressed methylammonium/oxygen-related degradation, elucidating the protection mechanism. Future work should explore broader families of quaternary ammonium cations (NR4+; e.g., aryl-substituted variants), extend screening to mixed-cation/anion perovskites and device stacks, and employ causal experimental designs to validate feature causality and optimize processing-condition interactions.
- Dataset size and variability: Only 21 organic salts with 12 processing conditions (260 tests). High intrinsic variability in MAPbI3 degradation and processing differences led to relatively high RMSE (~104 min) versus the 0–700 min onset range.
- Model limitations: Potential multicollinearity among features (e.g., molecular weight and carbon count) can confound feature attributions; small dataset hindered neural network performance. SHAP mitigates but does not eliminate correlated-feature attribution issues.
- Proxy metric: Stability was inferred from color-change onset (RGB), which is a proxy for phase degradation and may not capture all failure modes relevant to device performance.
- Test conditions and generalizability: Results are specific to unencapsulated MAPbI3 thin films aged at 85% RH, 85 °C, 0.16 Sun illumination; transferability to different absorber compositions, encapsulated devices, or other stressors requires validation.
- Scope: Limited chemical space (21 salts) and two halides (I−, Br−); not all generated data are reported; metadata linking across characterization datasets were ad hoc.
Related Publications
Explore these studies to deepen your understanding of the subject.

