The electrocaloric (EC) effect is the coupled temperature and entropy change of a dielectric material due to the polarization change that results from the application or removal of an electric field1. Electrocaloric cooling offers great potential to build efficient solid-state cooling devices that are quiet, low weight, and compact, making it a promising replacement for noisy, less-efficient vapor compression systems and a candidate for on-chip cooling and wearable cooling devices2,3. With the potential to reach 60–70% of the Carnot coefficient of performance4, EC cooling devices are more efficient than thermoelectric devices5. The large electric fields required to operate EC cooling devices are easy to generate compared to the large magnetic fields required in magnetocaloric cooling devices6.

The EC temperature change (ΔTEC) is a function of material, characterization temperature, and applied electric field. Its magnitude is generally larger around phase transition temperatures and it increases with increasing applied electric field. The key to building an EC cooling device is to find a material with a large ΔTEC, which drives the heat flow, over a wide temperature range near the operating conditions, which are usually around room temperature. The EC effect was first observed in the Rochelle salt in 19307 and was intensively studied in the 1960s and 1970s in bulk materials. The resulting ΔTECs were not practically useful (below 1 K), however, and research interests waned. In 2006, the field was revitalized by the discovery of a large EC temperature change in a PbZr0.95Ti0.05O3 ceramic (12 K at a characterization condition of 499 K and 480 kV/cm)8. In 2008, the discovery of large EC temperature changes in PVDF-based polymers9 (over 12 K at 353 K and 2090 kV/cm for a P(VDF–TrFE) copolymer and at 328 K and 3070 kV/cm for a P(VDF-TrFE-CFE) terpolymer] suggested a path towards economical and environment-friendly fabrication and integration in flexible systems. Significant progress in EC materials development10,11,12 and EC device designs13,14,15,16 has been achieved since then. In 2013, Peng et al.17 reported a giant ΔTEC of 45 K in a Pb0.8Ba0.2ZrO3 thin film at 290 K and 598 kV/cm. In 2017, Ma et al.18 built a EC cooling device with a flexible P(VDF–TrFE–CFE) polymer and electrostatic actuation that produced a specific cooling power of 2.8 W/g and a coefficient of performance of 13.

Identifying an effective EC material is a non-trivial task. The synthesis of new EC materials relies on the instincts of experts and extensive experimental synthesis of ceramics, polymers, and/or composite materials. Effort has been devoted to theoretical understanding of the EC effect by conducting ab initio simulations19,20, classical simulations21,22, and phenomenological theory-based (i.e., Landau–Ginzburg–Devonshire type theory) studies23,24, but elucidating the physics of the EC effect remains challenging. One major reason is the complex nature of the EC effect, which involves polarization hysteresis, phase transition, sample crystallinity and crystallite size, and interactions between crystalline and amorphous regions1,3,25.

To aid the search for effective EC materials, we herein apply a data-driven approach to build a machine learning (ML) model to predict the ΔTEC for ceramics based on the material composition, dielectric constant, Curie temperature, and characterization conditions. While a large EC entropy change is equally important, we did not include it as a label because the isothermal entropy change can be directly calculated from the adiabatic temperature change, density, specific heat, and temperature1.

Machine learning is the field of study where computer programs learn some class of tasks and improve by performance measures from examples or experience26. The application of ML methods in materials science dates back to the 1990s27,28. Although ML methods were initially used as assistance tools for tasks such as spectral analysis29, biomolecule binding site prediction30, and the derivation of quantitative structure–activity relationships31, they have since become an essential part of the materials research portfolio32. Materials databases such as the Materials Project33, the Inorganic Crystallographic Structure Database (ICSD)34, Automatic Flow for Materials Discovery (AFLOW)35, and the Open Quantum Materials Database (OQMD)36 provide curated and reliable data that can be mined to identify the underlying physics of observed material properties and phenomena. Open access to ML packages and libraries (e.g., Scikit-learn37, PyTorch38, and Tensorflow39) facilitates the application of data-driven approaches to materials challenges.

Materials property prediction with data-driven methods typically uses the material compositions and/or basic material properties as input and the property (or properties) of interest as output. The learning problem is to find the best estimate of the property of a material not in the original dataset. The resulting well-trained ML model can reduce human effort that would otherwise be required to synthesize and characterize materials, accelerating the discovery of new materials and uncovering previously unknown correlations between properties32.

The application of ML methods in the field of materials science is extensive, and we provide four examples that are related to the current study. To support magnetocaloric refrigeration applications, Holleis et al. 40 built neural network, random forest, least absolute shrinkage and selection operator, and support vector regression models to predict the entropy change of single-molecule magnets (SMMs) at a magnetic field of 5 T. They assembled a dataset of more than 60 experimentally synthesized SMMs and designed 16 descriptors that described their structure, dimensionality, and chemical features. They identified four key descriptors that have the largest impact on the entropy change: number of d-ions, number of f-ions, molecular mass, and ideal spin per ion. Their ML models predicted three hypothetical SMMs for future synthesis.

Stanev et al. used random forest and neural network models to predict the critical temperature of superconducting materials41. The features were a combination of Materials Agnostic Platform for Informatics and Exploration (Magpie)42 features generated from the elemental composition of each material and AFLOW35 features based on crystallographic and electronic information. The tree-based model reached a coefficient of determination (R2 score) of 0.88 on the test data for critical temperatures >10 K. Their models offered insight into the mechanisms behind superconductivity in different families of materials and identified over 30 candidate materials from the ICSD. We will use tree-based models because of their interpretability and Magpie for feature generation due to its effectiveness in the absence of structural information43.

The dielectric constant, a property related to the EC effect, can also be predicted via ML methods. Mannodi-Kanakkithodi et al. used the kernel ridge regression model to predict the dielectric constant of polymers44. They represented the polymer structure based on its building blocks and trained the model on density functional (DFT) calculations. Their model showed moderate transferability and can predict the dielectric constant of 6-block and 8-block polymers after training on only 4-block polymer data. They also used a genetic algorithm to optimize the blocks in an evolutionary manner to design polymers with desired dielectric properties.

Su et al.45 recently developed support vector regression and random forest regression models to predict the ΔTEC of BaTiO3-based ceramics represented by chemical composition (i.e., elemental descriptors of the A-site and B-site elements), temperature, and applied electric field. Two separate regression-based ML models were developed for indirect and direct measurements. A classification model that predicts the expected phase as a function of chemical composition and temperature46 was introduced to complement the regression models. The combined regression and classification ML models are able to predict a global maximum in ΔTEC near the rhombohedral-to-cubic and tetragonal-to-cubic phase transitions.

Here, we build an eXtreme Gradient Boosting (XGBoost)47 model to predict the ΔTEC of a ceramic ferroelectric material given its composition, dielectric constant, Curie temperature, and characterization conditions. The dataset is assembled from available experimental ΔTEC measurements. We include the measurement method (i.e., direct or indirect) and polarization stage (i.e., polarization or depolarization) as categorical variables to better describe the data. The XGBoost model is able to predict ΔTEC with an R2 score of 0.90 and 0.77 on train and test data, corresponding to root-mean-square errors (RMSEs) of 0.38 K for both. The model correctly identifies the known physics that contribute to a large EC temperature change (i.e., applied electric field and the difference between the characterization and Curie temperatures). We apply the model to search for effective EC materials from 66 ferroelectrics whose EC performance has not been characterized and suggest candidate materials for future experimental verification.


Materials dataset

There are three major categories of EC materials: polymers, ceramics, and polymer–ceramic composites. We built a dataset for EC ceramics due to their wide compositional variety. We extracted information from available literature as most of the material compositions do not appear in well-known materials databases 33,34,35,36. The dataset consists of 97 materials from 45 papers and is available at GitHub48 in a csv format. Snapshots from the dataset and a flow chart of the data gathering and model construction steps are shown in Fig. 1. More detailed information can be found in the “Methods—Materials dataset preparation” section and Supplementary Note 1.

Fig. 1: Flow chart of data gathering and EC temperature change model construction.
figure 1

The five steps are: 1. Data gathering from the EC ceramics literature. 2. Encoding material compositions with Magpie. 3. Handling the missing dielectric constant values with a built-in method in XGBoost. 4. Building the XGBoost model for the EC temperature change prediction. 5. Predicting the EC temperature change for ferroelectric ceramics from the non-EC literature.

We extract 7 features for each material: the material composition, temperature (T) and electric field (E) at which the ΔTEC is measured, the phase transition temperature (TCurie), the dielectric constant ϵ at T, and the measurement condition pol (for measurement during polarization or depolarization) and method (for direct or indirect measurements). We encode each material composition with the Magpie package42. Compared to direct encoding methods, encoding with Magpie keeps more chemical information from the materials by converting elemental chemical properties of the composition into 145 continuous or discrete numerical features. We then conducted feature selection by dropping features with zero variance, dropping features that have a Pearson correlation coefficient higher than 0.95 with an existing feature, and conducting a backward feature elimination process on these Magpie features. More detailed information on can be found in the “Methods—Feature selection” section and Supplementary Notes 2 and 3.

After these preprocessing steps, we have 4406 data points, each containing the 21 features listed in Table 1 (7 experimental condition/material property features and 14 Magpie features). The label to predict is the ΔTEC at the given conditions (i.e., T and E).

Table 1 Features used for ΔTEC prediction.

The collected data are plotted as a function of characterization temperature for the full scale in Fig. 2a. Data points with ΔTEC in the range of 0–2 K are plotted as a function of TTCurie in Fig. 2b. Different colors represent different material compositions and the marker sizes are proportional to the applied electric field. Most of these EC materials have a relatively small temperature change, with a median of 0.36 K and a mean of 1.07 K. Three of the 97 materials have a maximum ΔTEC > 30 K [Pb0.88La0.08Zr0.65Ti0.35O349, Pb0.8Ba0.2ZrO317, and Pb3Mg0.65Nb1.3Ti1.05O950], which far exceeds the next largest maximum value of 13 K. These three materials are marked as outliers and are excluded when building the model unless otherwise specified.

Fig. 2: Experimentally measured EC temperature change (ΔTEC).
figure 2

a Full scale of ΔTEC versus temperature. b Data points with ΔTEC between 0 and 2 K versus TTCurie. Different colors are used to distinguish different material compositions. The marker sizes are proportional to the applied electric field.

Model performance

The XGBoost regression models (more details in the “Methods—XGBoost regression” section) for ΔTEC prediction are built with the best hyperparameter set from a grid search of 6912 combinations (Table 2). Given that XGBoost is unable to extrapolate and can only make reasonable predictions for situations previously encountered in the training history, the materials with the lowest and highest ΔTEC are forced to be in the training set, unless noted. These materials are PbZr0.95Ti0.05O38, whose maximum ΔTEC is above 12 K, and Bi0.5Na0.5TiO351, which has the largest negative ΔTEC. To examine the extrapolation capabilities, we forced PbZr0.95Ti0.05O3 to be in the test set and built three models, differentiated by their random seeds, whose results are presented in Supplementary Fig. 3. Although, as expected, the XGBoost models cannot predict a ΔTEC higher than the maximum seen in the training set [8.5 K of PbZr0.97La0.02(Zr0.95Ti0.05)O352], they all predict a ΔTEC high in their capability range for PbZr0.95Ti0.05O3. This observation demonstrates that the XGBoost models learned from the underlying physics and can be a useful tool for qualitative prediction and refining the search for new materials.

Table 2 XGBoost hyperparameters from grid search.

The 94 EC ceramics are split into train and test data sets based on their distance in the Magpie feature space53,54. The Magpie features of the EC materials are first projected onto a two-dimensional t-distributed stochastic neighbor embedding (t-SNE) space. A k-means clustering of the projection of the 94 materials was then conducted. An optimal k value of 3 was determined from the Elbow Method by plotting the within-cluster sum of squares as a function of k and identifying the “Elbow" as k. A cluster label is assigned to all data. From each cluster, 75% of the materials are picked as the training data and the remaining 25% are picked as the test data. Different numbers of features are used to build the models. We went from all 21 features in Table 1, to 20 features by removing the dielectric constant, to 7 features by removing all Magpie features, and to 6 features by removing the dielectric constant and all Magpie features. For each feature set, we trained 100 XGBoost models with the same hyperparameters but different random seeds and train/test splits. The R2 and RMSE results (mean and standard deviation) are summarized in Table 3, where the data in each of the rows corresponds to 100 models. The statistics of the model performance when training with the three outlier materials using different feature sets are provided in Supplementary Table 5. Box plots of the results are provided in Supplementary Fig. 4. The standard deviation is due to randomness in (i) the construction of the XGBoost model and (ii) splitting the materials into the training and testing sets.

Table 3 XGBoost model statistics (mean and standard deviation) using different features.

In all cases, models trained without the outlier materials have significantly better performance in both the train and test scores. This observation suggests that there are features contributing to a large ΔTEC that are not included in our model. This point is further addressed in the “Discussion”.

Training with or without the dielectric constant gives a comparable performance. Models trained with all 21 features have a 0.01 lower R2 score and 0.01 K higher RMSE on the test set. When training on 7 features (i.e., the Magpie features removed), there is a large decrease in the test performance (−0.2 in R2 and +0.1 K in RMSE) and an increase in the standard deviations because XGBoost is losing all information about the material composition. Further removal of the dielectric constant (6 features remain) leads to a slight improvement (+0.04 in R2 and −0.02 K in RMSE) in the test performance compared to using 7 features. This improvement is because the model is introducing noise when imputing the missing dielectric constants without information from the Magpie features. In all cases, the standard deviations of the test sets are an order of magnitude higher than those of the training sets. The main contributor to the large standard deviations in the test sets is poor train/test splits where a large difference exits in the distributions of labels between these two groups. Even though all three outlier materials are removed and PbZr0.95Ti0.05O3 is placed in the training set when building models, there are other materials with larger ΔTECs than the majority of the data (e.g., 8.5 K in Pb0.97La0.02Zr0.95Ti0.05O352, 7.2 K in BaZr0.2Ti0.8O355, and 6.9 K in PbSc0.5Ta0.5O356) that may not be placed in the training set. In contrast, training and testing on the same split with 100 random seeds only leads to a standard deviation of 0.04 (0.03 K) in the R2 (RMSE) of the test set.

The parity plot for the predicted ΔTEC versus the experimental values for one of the high-performing models trained with the full 21 features is shown in Fig. 3. This model will also be used for feature analysis and predictions. For this model, the R2 (RMSE) scores for the train and test data are 0.90 (0.38 K) and 0.77 (0.38 K). In the high ΔTEC range (above 7 K), the model underpredicts ΔTEC due to the scarcity of materials that show a giant EC effect (3 out of 94 materials and 27 out of 4227 data points have ΔTEC > 7 K).

Fig. 3: Parity plot of the predicted EC temperature change from one of the high-performing XGBoost models versus the experimental values.
figure 3

The gray crosses denote the training materials and the colored dots denote the test materials (different colors are used to distinguish different material compositions).

A test R2 value of 0.77 for a model without material microstructural information, as we have built, is comparable to results from previous studies where tree-based models were used for dielectric constant prediction. For example, Qin et al. 57 trained five commonly used ML models with 32 intrinsic chemical, structural, and thermodynamic features to predict the dielectric constants of ceramics. They gathered 254 single-phase materials from the experimental literature and their random forest model achieved an R2 score of 0.76 on the test set. Takahashi et al. 58 built random forest models to predict the electronic and ionic contributions to the static dielectric constant. Their dataset consisted of approximately 1200 metal oxides from density functional perturbation theory calculations. The introduction of structural descriptors to the original compositional descriptors improved the model performance. The test R2 score increased from 0.87 to 0.89 for the electronic contribution and from 0.65 to 0.73 for the ionic contribution.

Feature analysis

We conducted feature analysis on the XGBoost ΔTEC model whose parity plot is shown in Fig. 3. The impurity-based feature importance is calculated by XGBoost by measuring the total gain (i.e., improvement in accuracy) across all splits where the feature is used. The higher the feature importance value, the more important that feature is. Impurity-based feature analysis tends to favor features with high cardinality (i.e., more unique values). As such, permutation-based feature importance, which measures the decrease of the model score when the values in a single feature are randomly shuffled, is also reported in Supplementary Fig. 5. In both methods, the six most important features are the same.

The impurity-based feature importance is presented in Fig. 4. The applied electric field E ranks first, followed by T − TCurie. These observations are in agreement with the known physics: ΔTEC of an EC material increases with the applied electric field (before electrical breakdown) and is usually the largest around its Curie temperature as the material goes through a phase transition. We further analyzed the features by setting E = 100 kV/cm and T = TCurie for ΔTEC predictions, thus ruling out their influence, and then calculating the Pearson correlation coefficient of the remaining features with the predicted ΔTEC. As shown in the color map in Fig. 4, the predicted ΔTEC shows mildly positive correlations to T (Pearson correlation coefficient of 0.28) and ϵ (Pearson correlation coefficient of 0.42). A Pearson correlation coefficient heat map among all features is reported in Supplementary Fig. 6.

Fig. 4: Impurity-based feature importance analysis.
figure 4

The error bar comes from the standard deviation of 100 random seeds. The color map shows the Pearson correlation coefficient of each feature with the predicted ΔTEC in the model shown in Fig. 3 after ruling out the influence of E and T − TCurie by setting E = 100 kV/cm and T = TCurie.

The 16 Magpie features synergistically help the model distinguish between different materials. As such, the direct interpretation of an individual feature can be difficult. The predicted ΔTEC shows moderately positive correlations to mean_Row (Pearson correlation coefficient of 0.50) after ruling out the influence of E and TTCurie. This result is consistent with the observation that the ceramics in our dataset with a negative EC effect usually contain sodium, while 9 of the top 10 materials with largest experimental ΔTEC contain lead.

maxdiff_MendeleevNumber is ranked as the most important Magpie feature in Fig. 4. Recall that in the feature selection, we dropped Magpie features with a Pearson correlation coefficient >0.95 with existing features. In this case, MaxIonicChar, maxdiff_Electronegativity, and min_Electronegativity show a Pearson correlation coefficient of 0.96, 0.96, and −0.96 with maxdiff_MendeleevNumber. It is interesting that this set of four features is picked up by the XGBoost model among all 145 Magpie features (or 110 features of non-zero variance). As shown in Fig. 4, the predicted ΔTEC has a moderately negative correlation to maxdiff_MendeleevNumber (−0.45). This feature set could be related to the electronic and ionic polarization in EC ceramics, but microstructural information (e.g., phases and grain size) for these materials is required before making firm conclusions.

Although the measurement condition pol is ranked as the third highest in the impurity-based feature importance, it is ranked fifth in the permutation-based feature importance. The model tends to predict a 0.3 K higher ΔTEC if pol indicates polarization instead of depolarization. The measurement method does not stand out, as might have been expected. We also note that the differences in the measured ΔTEC from pol and method in literature are generally below 0.2 K, smaller than the model RMSE (0.38 K).

The observed low impurity- and/or permutation-based importance of some Magpie features (e.g., maxdiff_NdUnfilled, mean_GSbandgap, and min_number) suggest that they can be removed. Given that our XGBoost model is rigorously regularized (i.e., with tree pruning and restrictions in the splitting of nodes), the model is not sensitive to the inclusion of less relevant features.

Prediction on ferroelectric materials

We now examine the predicted ΔTEC for 66 ferroelectric ceramics whose EC performance has not been reported. We use the XGBoost ΔTEC model whose parity plot is shown in Fig. 3 for the predictions. The electric field is set to 100 kV/cm. The features for the characterization conditions are set as direct measurement (method) and polarization (pol). The predicted ΔTEC as a function of temperature (for the temperatures at which the dielectric constant is reported) are plotted in Fig. 5a for the 66 ferroelectric ceramics and in Fig. 5b for the original EC dataset. To simplify the plots, we grouped materials into families based on compositional similarities. For example, (1−x)PbMg1/3Nb2/3O3−xPbTiO3 is denoted as PMN-PT and BaZrxTi1−xO3 is denoted as BZT. A full list of material compositions with their family group is provided in a separate csv file48, as described in Supplementary Note 1.

Fig. 5: Predicted ΔTEC at 100 kV/cm and varying temperature for ferroelectric ceramics.
figure 5

a Predictions on the non-EC literature. b Predictions on the EC dataset.

For the ferroelectric ceramics from the non-EC literature, PbZr0.57Ti0.43O3 has the highest predicted ΔTEC of 3.6 K at 100 kV/cm and 600 K. The EC material PbZr0.3Ti0.7O359 exhibits the largest ΔTEC of 4.1 K at 100 kV/cm and 753 K. We identify good candidates in Table 4: Pb0.89La0.11Zr0.68075Ti0.29175O360 is predicted to have a ΔTEC of 2.9 K at 328 K and the lead-free Ba0.91Ca0.09Ti0.86Zr0.14O361 is predicted to have a ΔTEC of 2.6 K at 318 K.

Table 4 Potential EC candidates from the ferroelectric dataset predicted at 100 kV/cm.

Although no material from the non-EC literature exceeds the performance of the state-of-the art EC materials, the top lead-free candidates in Table 4 are worth exploring. By adding new measurements of promising materials to the existing dataset, active learning techniques can be used to iteratively train new models and search for promising materials53. Active learning approaches, such as Bayes’ theorem on materials discovery62 and uncertainty-driven active learning for neural network potential development63, have demonstrated success in reducing experimental trials and/or computational cost.


The predictive ability of our XGBoost model demonstrates that a physics-informed data-driven approach is a promising avenue to studying EC materials. Moving forward, an organized database dedicated for ferroelectrics and/or EC materials would be useful to the community. To further improve the model’s predictive capability and ability to elucidate underlying physical meaning, more detailed information on the EC materials is required. Many of the factors that influence ΔTEC, such as sample size, morphology, and crystallinity, are not reported in the literature and are therefore not accessible to our model. Representative examples are provided below.

Going from a thick film to a thin film leads to an increased ΔTEC at a moderate voltage3,25 and at the same time changes the dielectric properties of a material. For example, the maximum dielectric constant in Pb0.8Ba0.2ZrO3 is around 12,000 in a sintered bulk sample64 while it has a value of 1200 in a 320 nm thin film17. Gao et al.65 demonstrated the effect of film thickness with antiferroelectric Pb0.82Ba0.08La0.10(Zr0.90Ti0.10)O3 (PBLZT) thick films. ΔTEC values of 25.1, 19.8, and 13.9 K were measured for film thicknesses of 1.0, 1.5, and 2.0 mm at 700 kV/cm and room temperature. They attributed the decrease of ΔTEC as film thickness increases to the reduction of the preferred orientation. The PBLZT thick films changed from a \(\left\langle 100\right\rangle\)-preferred orientation to random orientation with increased film thickness.

Phase coexistence can contribute to a large ΔTEC and many EC ceramics are synthesized with compositions from the morphotropic phase boundary17,50,66. For example, thin film Pb0.8Ba0.2ZrO3 has a giant ΔTEC of 45 K at room temperature as it goes through an electric field-induced transition from an orthorhombic antiferroelectric phase to a rhombohedral ferroelectric phase17. The large entropy change from random nanoregions to ordered nanoregions in thin film Pb0.8Ba0.2ZrO3 under an electric field may also contribute to the giant EC effect17.

Crystal orientation and phase can lead to a different polarization response and hence a different ΔTEC50,67,68,69,70. Luo et al.68 found the maximum ΔTEC for \(\left\langle 111\right\rangle\)- and \(\left\langle 001\right\rangle\)-oriented 0.71PbMg1/3Nb2/3O3-0.29PbTiO3 single crystals to be 2.0 and 2.3 K at 50 kV/cm. Bai et al.66 demonstrated with (1−x)PbMg1/3Nb2/3O3−xPbTiO3 (x = 0.3–0.35) that the tetragonal-cubic phase transition induced a much larger ΔTEC (0.69 K) than the rhombohedral-cubic and rhombohedral-tetragonal transitions. The tetragonal phase has the largest polarization vector and the complete disappearance of dipoles in the cubic phase induces a much larger polarization change than their rearrangement in the rhombohedral phase. A difference of 0.4 K in ΔTEC is also observed among their \(\left\langle 001\right\rangle\), \(\left\langle 110\right\rangle\), and \(\left\langle 111\right\rangle\) crystals.

High crystallinity, a smaller grain size, and isometric grain shape are beneficial to the EC performance25,71. By introducing Pr to SrBi2(Nb0.2Ta0.2)2O9, Axelsson et al.71 synthesized dense samples with no secondary phase. The highly isometric grain shape of the Aurivillius phases in combination with a small grain size increased the grain boundary density, leading to an increase in the dielectric strength. The dopant Pr3+ without lone pair electrons also leads to a diffuse relaxor-ferroelectric phase transition and shifted the phase transition temperature to a lower value. Other factors such as the substrate material and orientation, as well as the sample growth temperature can also influence ΔTEC by introducing clamping, misfit strain, and/or thermal stresses72. The order of the phase transition in an EC material impacts the shape of ΔTEC versus T and is also worth considering3.

Enforcing physical laws in ML models (e.g., tailoring neural network architectures, designing kernel-based regression models, encoding simple symmetries, or choosing appropriate loss functions) provides another avenue for fast and accurate training and improved generalization ability73. In the field of EC cooling, ML architectures that associate ΔTEC with the polarization at a given E and T, or that incorporate mathematical constraints from the Maxwell relations are potential approaches. Parallel efforts for EC polymers would also be of great interest.


Materials dataset preparation

We collected 97 materials from 45 papers. For each of these materials, we extracted ΔTEC at different characterization temperatures T and applied electric fields E and then included these quantities as features for the predictive model. As another feature, we extracted the dielectric constant ϵ at different temperatures (and at the lowest reported frequency if measured at multiple frequencies) and conducted linear interpolation to obtain values at the temperatures where the ΔTEC is measured. 34 of the 97 materials do not have a dielectric constant reported with their ΔTEC. We used the built-in algorithm from the XGBoost47 model to handle the missing values. The phase transition (e.g., ferroelectric to paraelectric) temperature is recorded as the feature TCurie. When the Curie temperature or phase transition temperature is not explicitly reported, we extracted the temperature where the peak of ΔTEC occurs as TCurie. A precalculated feature TTCurie is also included. The categorical feature method is used to denote how ΔTEC is measured. The direct measurement (where ΔTEC is measured directly using thermometers or by recording the heat flow using calorimeters3) and the indirect measurement (where ΔTEC is obtained from polarization change via the Maxwell relations1,74) may provide different values and/or trends for ΔTEC for the same material and conditions55,71,75,76,77. The categorical feature pol records whether ΔTEC is measured in the polarization or depolarization stage. Due to small losses associated with the polarization hysteresis and Joule heating, the measured EC temperature increase in polarization can be ~0.2 K larger than the EC temperature decrease in depolarization76,77. Although the phenomenon of the EC effect should be nominally reversible and independent of measurement conditions78, we use pol and method to help distinguish the source of the experimentally measured ΔTEC.

Each of the 97 materials has a different number of entries in the dataset based on how many electric fields and/or temperatures they were measured at. We trimmed data points when a material had over 100 entries, as these ΔTECs are recorded at small electric field and/or temperature intervals.

Three of the 97 materials are marked as outliers: Pb0.88La0.08Zr0.65Ti0.35O349, Pb0.8Ba0.2ZrO317, and Pb3Mg0.65Nb1.3Ti1.05O950. These materials have a giant EC effect, with a maximum ΔTEC above 30 K, while the maximum ΔTEC of the rest of the materials does not exceed 13 K. There may be microstructural effects contributing to the giant EC effect in these three outlier materials that cannot be captured by the descriptors generated from material compositions and commonly reported properties. Bi0.5Na0.5TiO3 (BNT)51 has the smallest ΔTEC of −1.6 K. A negative ΔTEC is known as the negative EC effect, where the isofield polarization of a material increases with increasing temperature (e.g., an antiferroelectric–ferroelectric transition with increasing temperature)78. In total, 16 materials have one or more data points where ΔTEC is smaller than zero. Of these, the magnitude of ΔTEC is <0.5 K except for three BNT-based materials.

Feature selection

Each material composition was converted into 145 features with the Magpie package42. The Magpie features are obtained using the minimum, maximum, and mean of elemental chemical properties and their positions in the periodic table. Given the large quantity of generated features, not all are relevant in our study. We conducted feature selection to remove redundant features, which could add noise to the model. First, we removed Magpie features that have zero variance in our dataset, which leads to 111 remaining Magpie features. For example, as all the collected EC ceramics contain oxygen, the minimum atomic weight and the minimum melting temperature of the individual elements have the same value. We then reduced the feature collinearity by dropping features that have a Pearson correlation coefficient higher than 0.95 with an existing feature, leading to 38 Magpie features (listed in Supplementary Table 1). A list of features dropped due to a large Pearson correlation coefficient with existing features is listed in Supplementary Table 2. The choice of the feature to keep from a set of highly correlated features has a negligible influence on the model performance (see Supplementary Fig. 1 and Supplementary Table 3).

Next, we conducted a backward feature elimination process on these Magpie features. The three outlier points with giant ΔTEC are temporarily removed in this step to avoid high variance in the cross-validation R2 score. We started with 45 features (38 Magpie features plus 7 features extracted from literature), computed the performance of the XGBoost model after eliminating each Magpie feature, and then removed the least-significant feature until no improvement was observed. 14 Magpie features (feature IDs 8–21 in Table 1) remained after this process. The number of features kept versus the cross-validation R2 score is plotted in Supplementary Fig. 2. The order of features being dropped in this process is listed in Supplementary Table 4.

XGBoost regression

XGBoost47 is an open-source library with an efficient and scalable implementation of the gradient boosting framework79. Gradient boosting minimizes the prediction error with a gradient descent algorithm and produces a model in the form of a set of weak prediction models (decision trees in this case). During the training, gradient boosting adds new regression trees one at a time to reduce the residual (i.e., the difference between the model predictions and the label values). Existing trees in the model remain untouched, which slows down the rate of overfitting. The output of the new tree is combined with the output of existing trees until the loss is minimized below a threshold or the specified limit of trees (e.g., maximum depth) is reached. After the trees are built, XGBoost can apply tree pruning, where the size of the trees is reduced by pruning nodes from bottom (leaves) to top (root) if the loss reduction of having that node is smaller than the regularization parameter gamma.

We applied XGBoost with the Scikit-learn package37. The hyperparameters were tuned with a grid search using training data. A five-fold cross-validation resampling technique was used. When examining each hyperparameter set, the training data was randomly split into five groups of approximately equal size. Four groups of the data were used for the training set and the remaining group was used as the validation set. This procedure was repeated five times, leading to five validation R2 scores for each hyperparameter set. The set with the highest averaged validation R2 score was selected.

The dielectric constant is a relevant property for the EC performance of a material. A linear interpolation of the dielectric constant at the temperatures where ΔTEC was measured provided data for 63 of the materials in the dataset. The missing dielectric constant values in the other 34 materials were handled by the default built-in method in the XGBoost algorithm47. Essentially, each of the decision nodes in XGBoost has a default direction, such that when a missing value is encountered during splitting in the tree branch, the instance is classified in that default direction.