π Learning: A Performance‐Informed Framework for Microstructural Electrode Design

Designing high‐performance porous electrodes is the key to next‐generation electrochemical energy devices. Current machine‐learning‐based electrode design strategies are mainly orientated toward physical properties; however, the electrochemical performance is the ultimate design objective. Performance‐orientated electrode design is challenging because the current data driven approaches do not accurately extract high‐dimensional features in complex multiphase microstructures. Herein, this work reports a novel performance‐informed deep learning framework, termed π learning, which enables performance‐informed microstructure generation, toward overall performance prediction of candidate electrodes by adding most relevant physical features into the learning process. This is achieved by integrating physics‐informed generative adversarial neural networks (GANs) with convolutional neural networks (CNNs) and with advanced multi‐physics, multi‐scale modeling of 3D porous electrodes. This work demonstrates the advantages of π learning by employing two popular design philosophies: forward and inverse designs, for the design of solid oxide fuel cells electrodes. π learning thus has the potential to unlock performance‐driven learning in the design of next generation porous electrodes for advanced electrochemical energy devices such as fuel cells and batteries.

accelerating high-throughput discovery of battery electrolyte. In addition, data-driven methodologies have also been employed to design various electrode microstructures by combining traditional physical models with ML. [16][17][18][19] Despite impressive preliminary success, most ML-based designs are purely data-driven and unable to extract interpretable knowledge from the provided data, leading to physically inconsistent predictions. [20] Besides, the state-of-the-art datadriven electrode microstructure design is mainly focused on the evaluation of microstructure properties, for example, permeability of gas diffusion electrodes, [16] calculated total energy and Bader charge for the cathode of lithium-sulphur batteries, [18] and adsorption energy for alloy-based CO 2 reduction catalyst. [21] Notably, assessing these structural and material properties is insufficient to reflect the overall electrochemical performance of the electrode in service, such as the curve of current density J and overpotential η, which is an ultimate objective of electrode design.
To date, performance-driven multiphase electrode microstructure design has not been achieved. This is because current ML tools are still not sufficiently advanced to extract independently all interpretable physical features from the high-dimensional training data which involves highly complex multi-dimensional multi-phase morphologies and strong multi-physics coupling. [22][23][24][25] For instance, generative adversarial neural networks (GANs) have recently been employed to generate new realistic electrode microstructures based on an input of a more limited set of real digital samples. [26][27][28][29][30][31] Compared with traditional stochastically digital synthesis methods, GANs can generate more realistic and complex morphologies. A very recent practical application of GANs in materials science is to generate super-resolution 3D porous material microstructures. [32] GANs have also been demonstrated as a powerful tool in digitally generative design of 2D metamaterials [33] and nanoscale crystal structures. [34] Digitally synthetic 3D microstructures have statistically similar structural characteristics to those that have been reconstructed from micro/nano X-ray computed tomography (XCT) and focused-ion beam scanning electron microscopy (FIB-SEM). [4] Nevertheless, their physical properties, for example, permeability, effective diffusivity, are challenging to tune, let alone their performance, for example, the dependence of current density on electrode overpotential (J-η curves). Moreover, data-driven surrogate models for property evaluation, for example, convolutional neural networks (CNNs), often directly take input electrode microstructures without any physical feature engineering and can only predict low-dimensional structural properties such as elastic properties and effective diffusivities. [35][36][37][38] Generally, the physical nature of electrochemical processes involves multiple underlying phenomena that critically determine the electrochemical performance. Therefore, it is vital to feed identified electrochemical knowledge into ML techniques as prior information for electrode candidate generation and performance evaluation to finally achieve rational data-driven electrode microstructure design.
To fill the gap, we developed a new performance-informed deep learning framework, termed π learning, as shown in Figure 1, for the performance-driven electrode design; focusing on the J-η curves which characterize the electrode electrochemical kinetics via the relationship between the overpo-tential η and operating current density J. This is achieved by integrating performance-informed GANs, physics-informed CNNs and deep neural networks (phys-CNNs and phys-DNNs), and a meso-scale multi-physics electrode model in the computational fluid dynamic (CFD) platform OpenFOAM (see Figure 1). We inform the GAN with the predicted performance through a physically meaningful loss function calculated from the feedback from phys-DNN and phys-CNN. The phys-CNN and phys-DNN explicitly consider the most relevant physical features, that is, structural connectivity and active triple-phase boundary (TPB) sites inside the input microstructures for the neural networks, allowing for the accurate prediction of electrode current density. The supervised learning in the phys-CNN and phys-DNN are underpinned by the calculated J-η curves from a pore-scale multi-physics electrode model which is validated against experimental data in Figure S1, Supporting Information. The purpose of the implementation of two surrogate models for current density prediction is to provide users with options to choose accuracy-leading and efficiency-leading algorithms in different design strategies. It is noted that π learning is based on real electrode microstructures reconstructed by a high-resolution Xe plasma focused ion beam combined with scanning electron microscopy (Xe PFIB-SEM). [39] The performance of π learning is demonstrated for the digital design of SOFC electrodes in two popular design strategies, that is, forward and inverse design. We show that π learning can successfully generate realistic and statistically similar 3D electrode microstructures with targeted performance in inverse design. In addition, we show that π learning can identify the global optimal electrode microstructure with the highest operating current density at given overpotentials. The π learning structure is generic which provides a capability to turn the physicochemical insights of the linkage between microstructure and performance into the actions of rational and costeffective electrode design, thereby advancing cross-paradigm electrode design via physics-informed deep learning for a broad range of electrochemical energy applications.

Performance-Informed GAN
The performance-informed GAN increases the probability of generating microstructures with representative performance in the training dataset. During training, the generated current density, J, of synthetic microstructures is predicted by a pretrained phys-DNN and phys-CNN, respectively. The physical loss function in the GAN generator will take in the predicted J to measure the difference between two current densities of real samples and generated microstructures in a training batch. The reason for choosing phys-DNN and phys-CNN as two surrogate models is to highlight their different advantages in predicting the performance, that is, current density, J. Phys-DNN is more accurate than phys-CNN but it requires logic loops to calculate active TPB length as input, resulting in lower computational efficiency than phys-CNN. Phys-CNN, in contrast, is of lower accuracy but is efficient by directly taking 3D microstructures without computationally intensive pre-processing.
The distribution of J for 1000 generated samples was fitted with a normal distribution. It is observed that the performance-informed GAN tightens the spread of J for generated microstructures, as shown in Figure 2a. For the performanceinformed GAN with phys-DNN as J surrogate model, the generated J distribution has nearly same mean µ = 187 mA cm −2 as the training dataset (µ = 181 mA cm −2 ) but a much lower deviation σ = 11 mA cm −2 than σ = 18 mA cm −2 . While for normal GAN, the generated distribution (µ = 183 and σ = 17 mA cm −2 ) is nearly the same as the training dataset (µ = 181 and σ = 18 mA cm −2 ). The comparison between the normal GAN and performanceinformed GAN indicates that the performance-informed GAN focuses on the learning of features that enable it to produce representative microstructures similar to those which occur with high frequency in the training dataset. We further analyzed the generated microstructures by the performanceinformed GAN with the phys-CNN as a surrogate model for J. Figure 2a indicates that the generated J distribution has nearly the same standard deviation as the performance-informed GAN with phys-DNN but the mean deviates. This is because of the different J error predicted by two surrogate models, which will be discussed in the next section.
In addition, here we found that assessing the quality of generated electrode microstructures via two-point correlation coefficient insufficient. Two-point correlation coefficient is a statistical indicator to describe the degree of spatial correlation between two points in porous microstructures. It can quantify the likelihood of finding a second point at a certain distance and direction from a chosen point. The finding is significant as two-point correlation has been heavily employed as a criterion for assessing the similarity between generated and real samples in previous GAN research, [26,28,31] especially for multiphase electrodes. Though there is significant J deviation between performance-informed GAN and normal GAN, the two-point correlation curves in Figure 2b show very minor deviation in three individual pore phase, Nickel (Ni) phase and Yttria stabilized zirconia (YSZ) phase. Note that, active TPB sites are extremely important to determine the ultimate J of electrodes, and the sole calculation of the two-point correlation coefficient is insufficient to reveal the effects of active TPB sites in SOFC electrode microstructures on the overall electrode performance. Figure 2c,d show a comparison of the performance-informed GAN and normal GAN using the Wasserstein distance, which estimates the "distance" (or dissimilarity) between the data distributions for the generated and real samples and acts as a criterion to determine the convergence of the training. The observed fast-declining Wasserstein distances indicate that the GAN is learning the features from training dataset quickly. A series of snapshots at different learning stages also shows how a fixed Gaussian noise space is transformed into a steady 3D digital electrode sample and then how the performanceinformed GAN accelerates the fine-tuning process based on the pre-trained normal GAN.
The transferability of π learning for property-informed microstructure generation is also demonstrated for a physical property, active TPB length, which refers to the total length of the locations at which three different phases are adjacent. This is a critical determinant of the electrode operational performance in the form of current density. Further information can be found in Supporting Information S2. In summary, the performance-informed GAN enables the generation of microstructures with similar structure and performance to the training structures. This π learning system forms the kernel of a forward and inverse design system as described below.

Physics-Informed DNNs as Surrogate Models
Due to the 3D multiphase nature of fabricated SOFC electrodes, some areas are disconnected from the others, resulting in inactive TPB sites. However, the structural connectivity and inactive TPB sites are relevant but implicit electrochemical features for the CNN to learn. We stress that these isolated locations are inactive in electrochemical reactions, which will distract the CNN during the training because they have the same voxel value with the active regions. A series of studies have already demonstrated the co-existence of the active and inactive phases in SOFC electrodes. [40,41] Therefore, we extract the structural connectivity and active TPB length from training microstructures into different DNNs to investigate their accuracy in predicting J-η curves. The feature extraction is implemented by a logic loop through the whole microstructure.
First, we predicted J-η curves by using a physics-informed DNN (phys-DNN) which directly takes as input the value of active TPB length. Figure 3a shows the predicted J-η curve of phys-DNN, and the validation against the real current density obtained from the multi-scale model in OpenFOAM, as well as the error distribution across all calculated overpotentials η. It shows that the error of phys-DNN is less than ±5%. As seen in the predicted J-η curves, phys-DNN can also accurately predict outliers in the training dataset. Generally, the outliers need to be removed by extra data cleaning to improve the dataset quality. However, the cleaning may reduce the training data and prediction generalizability for complex microstructures. Phys-DNN allows for the keeping of outliers in the dataset and increases the utilization efficiency of the training dataset. In addition, the reason that the phys-DNN was developed is because it has simpler architecture than CNN or other complex DNNs and has been commonly employed as the leading method for various data-driven models. The low prediction error in the phys-DNN is attributed to the consideration of the explicit active TPB length which has significant physical meaning to inform the phys-DNN learning.
However, the preparation of training data for phys-DNN is of high cost because intensive logic looping over the voxel-based microstructures is necessary to identify active TPB sites. This will severely slow down the learning of performance-informed GAN as tens of thousands of synthetic microstructures have to go through the looping process. Therefore, we further analyzed the prediction accuracy of phys-CNN which takes input the microstructures engineered by a physical feature structural connectivity which highlights the connected phases in input microstructures, as shown in Figure 4. Figure 3b shows the performance of phys-CNN. Although phys-CNN can still perform in predicting outliers, the prediction deviates more from the ground truth than phys-DNN, which is further confirmed by the error analysis which shows the error is ≈ ±10%. However, phys-CNN runs more quickly than phys-DNN when assessing massive microstructures because no logic calculation for active TPB sites is required. This provides an opportunity to trade-off between the accuracy and efficiency for physics-informed datadriven surrogate models.
The accuracy and efficiency are not the only two concerns when training a DNN. Additionally, the size of the training dataset matters in most ML applications, as big data is not always available for users. Therefore, the ability to use small data sets to achieve nearly equivalent accuracy and efficiency as big data will enable practical applications of ML. In this section, we address the advantage of phys-DNN and phys-CNN using small data by training them with 2000 samples (less than 5400 samples previously used). The comparison in Figure S3, Supporting Information, shows that phys-DNN and phys-CNN retain nearly the same accuracy as for the larger dataset, while the purely data-driven method deteriorates significantly. The comparison confirms the significance of physics-informed deep learning in reducing the dependence of ML on big data.

Inverse Design Using π Learning
So far, the synthetic microstructures generated from π learning have not produced a user-specified current density (the performance variable). The generation of microstructures with userspecified target performance is relevant to the acceleration of the development of porous energy materials. In this section, we therefore focus on the inverse design of electrode microstructures with different specific J values. We discretize the continuous current density values and group them into multiple classes labeled by a series of integers, for example, 0, 1, 2, and so on. By feeding multiple groups of microstructures simultaneously into the conditional performance-informed GAN along with their class label, we can successfully train the GAN to generate targeted microstructures according to a requested J value. All training current densities were calculated under a given representative overpotential η = 0.12 V in this section. To ensure the accurate prediction of J for the generated microstructures during training, we employed phys-DNN whose predictive performance was shown in Figure 3a, as the high-fidelity surrogate model for J. The training dataset consists of three representative classes of training microstructure that were sampled from the Xe PFIB-SEM database based on different targeted J, that is, 145-155, 173-183, and 200-210 mA cm −2 .
The expected generated J distributions are narrow and closely clustered around three targeted J ranges. As seen from Figure 5a, the newly generated samples from π learning without a physical J loss function follow a wide normal distribution (σ = 20, 17, 15 mA cm −2 for three groups) which means the majority of samples fall out of the targeted range. This deviation is especially significant for the low targeted range J = 145-155 mA cm −2 , indicated by the highest σ = 20 mA cm −2 .
Furthermore, the generated samples without J loss function have much lower µ = 191 mA cm −2 than the high targeted range 200-210 mA cm −2 . These two deviations were largely improved by the fine-tuning of π learning informed by the J loss function, evidenced by the sharper normal distribution close to the targeted ranges. The detailed current density distributions of the new generated samples by π learning are also shown in Figure 5a. It is concluded that performance-informed GAN can narrow the normal distribution of generated current density toward the specific ranges.
We further analyzed the distributions of the active TPB length and two-point correlation coefficient of above generated samples, as shown in Figure 5b,c. Figure 5b shows that the generated active TPB length also follows a similar tendency to the current density, which can be understood by the tight correlation between J and active TPB length proved by the porescale multi-physics model and phys-DNN in Figure 3b. The good agreement in terms of two-point correlation coefficient between real and generated samples shown in Figure 5c, along with the 3D representative generated microstructures for the three classes demonstrate that the inverse design module in π learning can generate reasonable electrode microstructures with user-specified current density. A variety of specific J values can be generated by training the performance-informed GAN using a broader range of training J.
The inverse design module enables the concurrent generation and characterization of electrode microstructures with their electrochemical performance. It allows scientists to start from the desired electrode performance and end up in microstructure space. Inverse design is challenging for traditional design methods which normally depend on high-throughput virtual screening and random search. In contrast to very recent progress for inverse design in molecular engineering, [42,43] meta surfaces [44] and new solid-state materials, [45] the proposed inverse design module efficiently and directly bridges the electrochemical performance and high-dimensional design parameters of multiphase microstructures, which are significantly distinguished and more challenging than periodic and planar material structures.

Forward Design Using π Learning
The other fundamental ability of π learning is to search for the optimal SOFC electrode microstructure. Here, for a given experimental microstructural dataset, we might ask which has the highest performance, and whether a better performing  b) The distribution of active TPB length for the three classes of generated microstructure. c) The validation of two-point correlation coefficients for training dataset, π learning without normal GAN (base case) and π learning with performance-informed GAN. d) Representative snapshots of generated samples for three targeted J ranges. microstructure can be found that is not in the dataset. Two big challenges need to be tackled to answer the two questions. The first is to downsize the original high-dimensional design space 64 3 of a digital SOFC electrode through the generator in GAN by transforming a latent vector with the size of 1 × 16 × 4 × 4 × 4 into a standard 3D electrode after a series of transpose convolutions. The second is to efficiently search the downsized latent space orientated by the physical property of the corresponding microstructure, which is addressed by the integration of an evolutionary particle swarm optimization (PSO) algorithm and a data-driven CNN. The interaction between these two procedures is shown in Figure 1 (bottom graph).
Here, we retain our focus on the current density at a given overpotential η = 0.12 V. First, we checked the prior J distribution of the pre-trained generator by randomly generating 10 000 samples. It is seen from Figure 6a. that the maximum J of the prior distribution is 210.3 mA cm −2 and was only one out of 10 000 samples. This prior distribution informs us of the approximate range for the global optimal J. We then conducted PSO simulations to search for the global optimum using the pretrained generator in the performance-informed GAN with phys-CNN as the J surrogate model. It turns out that the optima obtained from ten PSO simulations are similar, in the range 222-228 mA cm −2 . The optimal microstructure is further checked by simulating its current density using the porescale multi-physics SOFC electrode model to assess the accu-racy of the optimization (which relies on the surrogate model for its current density prediction). As shown in Figure 6b, the optimal J from PSO with the surrogate phys-CNN predictor is 224.5 mA cm −2 , higher than the 199.6 mA cm −2 calculated by the pore-scale multi-physics model for the optimal structure obtained from PSO. The 12.5% error between PSO and physical model is caused by the intrinsic prediction error in the phys-CNN. Figure 6c,d also shows the optimal electrode structure, as well as the corresponding latent vector. The accuracy of PSO simulation is also verified by conducting 10 PSO simulations, as shown in Figure S5, Supporting Information.
We further employed the phys-DNN as the surrogate model for J in the forward design. The global optimum was then found to be 212.1 and 209.9 mA cm −2 for PSO and the physical model, respectively. The error of 1% is significantly lower than the PSO with phys-CNN as surrogate model because the phys-DNN takes as input active TPB length calculated by a logic algorithm. Notably, though the computational cost of the phys-DNN (12 min) is nearly sixfold the phys-CNN (1.6 min), the difference between the optimum obtained from the PSO with two different surrogate models is less than 5%. Therefore, we suggest phys-CNN as surrogate model to compromise the efficiency and accuracy in forward design. In real applications, the synergy between phys-CNN and phys-DNN can accelerate efficient and accurate optimization in high-cost computational optimization by using phys-CNN to narrow the design space close to the optimum and then switch to phys-DNN for the greater accuracy of the optimum. Moreover, forward design can only identify a single latent space that can be converted into the electrode microstructure with highest J. In contrast, for inverse design, the system can present various latent spaces which lead to the same highest J. We also would like to address that the forward design module allows the exploration of the design space beyond the training dataset by generating diverse samples.
Beyond the accurate identification of a global optimal electrode microstructure, another merit of this forward module is that the whole optimization is completely based on digitalization of the realistic electrode microstructures. Traditional global electrode optimizations requiring exploration of tens of thousands of realistic electrode microstructures are prohibitive, due to high fabrication cost [46,47] and the time taken for digital microstructure reconstruction. [48,49] Therefore, virtual design and optimization of electrodes can only depend on synthetic microstructures generated by various stochastic algorithms and physical models. [50][51][52] Though stochastically synthetic microstructures have similar essential structural parameters, the intrinsic assumption in the algorithms limits the ability to generate realistic microstructures and therefore possibly leads to less realistic optimization results. Besides, the variables to be optimized are also limited, for example, grain size, positions and numbers, and are therefore unable to fully reflect the high complexity of real morphologies. In contrast, the GAN used in our forward module enables the direct linkage of the real electrode samples and a latent space consisting of more than 1000 design variables. The direct linkage allows users to directly explore the design space that can be converted into realistic electrode microstructures without the high cost of fabrication and imaging.

Physical and Electrochemical Insights into the Digital Electrode Design
To further analyze the globally optimized SOFC electrode microstructure, Figure 7a shows the J-η curves of globally optimized and two representative training microstructures from the low and intermediate J groups in Figure 5, respectively. It is seen that the optimized electrode microstructure performs better than the others across the whole η range. As well known, ionic conductivity is the key bottleneck for the SOFC electrode design. The optimized electrode shows a higher effective ionic conductivity which is verified by the 2D and 3D visualization of ionic potential in the YSZ phase in Figure 7d,e, where the ionic potential gradient through the optimized electrode is larger than the others.
Through the comparative analysis between the optimized electrode microstructure and the other samples, π learning proves to be able to identify two key issues for the high-performance SOFC electrode design: 1) The pore and YSZ fractions are more important than Ni fraction when tuning phase fraction to design high-performance SOFC electrodes; 2) Isolated phases should be minimized to improve the utilization of the formed TPB sites, which can be quantified by the ratio of active/all TPB. It is noted that the relevance of the second key insight has been verified by the performance of phys-CNN and phys-DNN in π Learning, as shown in Figure 3.
At first, the statistical analysis of the phase fraction of three phases, that is, pore, Ni and YSZ are also conducted to reveal the structural improvement in Figure 7b. Figure 7b shows that the globally optimized electrode consists of the highest pore fraction (0.2224) and lowest Ni fraction (0.3113) compared with the low-J (pore: 0.1830 and Ni: 0.3418) and intermediate-J electrode (pore:0.2006 and Ni: 0.3442). This phase fraction distribution aligns with the nature of SOFC electrodes, that is, the electronic conductivity of Ni is normally several orders higher than the ionic conductivity of YSZ. The slight variation of Ni phase fraction has little effect on the electronic resistance. Thus, assigning Ni phase fraction to other phases, especially to pore phase which is significantly lower than the others, can increase the formation of TPB sites.
In addition, another reason for the good performance is the high connectivity of the globally optimized electrode microstructure, which is verified by the density of the isolated phases in each microstructure in Figure 7f. To calculate the density of the isolated phases along the thickness direction, the isolated voxels in the digital electrode are assigned as value 1 and the rest is value 0. Then, all 64 slices are summed along the thickness direction. In Figure 7f, light areas indicate more isolated phases which result in inactive TPB sites and decrease the utilization of all TPB sites. We can see from Figure 7f that there are many isolated phases in low-J and intermediate-J microstructures. While very few isolated phases can be observed in the globally optimized microstructure.
Meanwhile, increasing the pore fraction can increase TPB sites in the electrode. Here, the ratio of active TPB and all TPB sites is plotted in Figure 7c to reveal the effects of a high active/all TPB ratio in the optimized electrode microstructure. It is seen from Figure 7c that the performance of electrodes is positively correlated with the active/all TPB ratio. The values of the averaged active/all TPB ratio for low-J, intermediate-J, and high-J microstructures are 0.6036, 0.6500, and 0.6821, respectively. All ratios are obviously lower than the 0.8451 of the globally optimized microstructure.

Outlook for the Fabrication of the Electrode Design
There is still a gap between the digital electrode design and real electrode manufacturing due to the complexity of SOFC electrode morphology and components. Here, we envisage two promising strategies for fabrication of the optimized electrode. The first is employing slurry-based 3D printing technology. Very recently, Fashalameh et al. [53] fabricated a planar multi-layer anode-supported SOFC through slurry-based 3D printing. In their printed electrode, the uniform hierarchical porous microstructures were achieved and successfully resolved pores of 100 nm, which is close to the voxel resolution of 65 nm of the digital electrode designs. Another strategy is to derive the manufacturing parameters of a given representative electrode microstructure in the traditional SOFC electrode fabrication technique (e.g., tape-casting technology), underpinned by the advanced ML regression models, for example, the CNN employed in the study. Based on a series of training datasets which include various manufacturing parameters and fabricated 3D electrode microstructures reconstructed by FIB-SEM, this developed ML can approximately identify corresponding manufacturing parameters of a given microstructure sample. The cost and efficiency of training the ML model can be improved by employing few-shot learning which can learn from a small dataset with supervised information. [54] Although we focus on the steady-state operation in this paper, π learning is readily extendable for considering dynamic effects. SOFC electrodes are fabricated by sintering powders under high temperatures. During sintering, electrode microstructures can evolve because of coarsening and densification, leading to morphological variations and changes in transport properties. π learning can be further extended to consider the evolution of electrode microstructures by integrating a physical phase field sintering model (PFM) and a data-driven temporal prediction neural network. PFM has been popular to predict the structural dynamics during the sintering process by resolving Cahn-Hilliard or Allen-Cahn equations. [55] Recently, Zapiain et al. [56] integrated a PFM model and a long short-term memory (LSTM) neural network to efficiently predict the evolution of solid microstructures. Through the deep fusion of PFM, LSTM, and multi-physics pore-scale electrode models, π learning will be able to identify the optimal powder mixture ratio and sintering conditions and digitally assist the high-performance electrode fabrication.
π learning is also transferrable to assist the electrode design of Li-ion batteries. As addressed by Liu et al., [57] the fusion of multiscale modeling and characterization technologies is relevant to comprehensively predict battery performance such as degradation and lifetime. The key step to achieve the transferability of π learning is to replace the pore-scale SOFC electrode model with a multiscale and multi-physics Li-ion battery electrode model. A comprehensive review by Chen et al. [58] has summarized the recent progress of porous electrode modeling for Li-ion batteries. There are also other advanced frameworks that can be considered in the development of surrogate models for Li-ion batteries, such as Python Battery Mathematical Modeling (PyBaMM) [59] and Cyber Hierarchy and Interactional Network (CHAIN). [60]

Conclusions
In this study, we have proposed a performance-informed learning framework termed π learning to generate various electrode microstructures informed by their electrochemical performance in terms of current density output as a function of overpotential (J-η). π learning was applied to the generation of realistic 3D electrode microstructures for solid oxide fuel cell (SOFC) anodes. In π learning, a performance-informed conditional Wasserstein generative adversarial neural network with gradient penalty was employed as the main generator to generate new realistic 3D microstructures. The required current density of synthetic microstructures was accurately predicted by two different deep neural networks (DNNs), that is, physics-informed DNN (phys-DNN) and CNN (phys-CNN), by leveraging relevant physical knowledge of structural connectivity and active three-phase-boundary (TPB) length in porous SOFC electrodes. The implementation of π learning was also supported by a set of advanced real electrode microstructures reconstructed by Xe plasma focused ion beam combined with scanning electron microscopy, as well as a multi-physics porescale electrode model to label the performance of electrode microstructures. π learning was further demonstrated in two popular design philosophies. It proved that π learning could successfully generate narrow current density distributions that are around the specific target for different J ranges in the inverse design module. This enables the large-scale generation of electrode microstructures with the same performance. Beyond inverse design, π learning is also able to identify the global optimal electrode microstructure with highest current density, underpinned by the seamless integration of the generative model, phys-DNN, and particle swarm optimization algorithm. The latent space identified by the forward design module is meaningful to replicate the optimal electrode microstructure for users. Physical and electrochemical insights were shed onto the globally optimized electrode microstructure by comparing different microstructures from inverse and forward design regarding their J-η curves, statistical phase fractions and the density of isolated phases. It is concluded that pore and YSZ phase fraction should be concerned more than Ni phase because the two contributes more to the formation of TPB and improvement of the ionic conductivity. The ratio of active TPB sites to all TPB sites is concluded to be a relevant indicator to guide the rational SOFC electrode design. Moreover, π learning with physical knowledge constraints based on operational performance beyond simple physical properties, could be easily transferred to the inverse and forward design of a wide range of porous electrodes in various electrochemical devices to achieve target or optimal performance. Evidently, the proposed π learning can be further enhanced to increase the rationality of ultimate designs by involving high-dimensional multi-physics models and mechanisms to inform the generative model.

Experimental Section
Generator and Critic in GAN: This section presents the description and training of the generator and critic in π learning informed by a physical loss function relating to the electrode performance variable (current density). This work employed the generator and critic in the conditional Wasserstein GAN with gradient penalty (cWGAN-GP) to generate synthetic samples and learn the features of the real microstructures, [61,62] as shown in Figure 1. The model converged when the adversarial learning of generator and critic came to an equilibrium. The convergence of π learning was quantified by the Wasserstein distance which was calculated by the difference between the standard generator and critic loss. Moreover, this work achieved π learning by employing a combination of the standard loss function of the cWGAN-GP and the physically meaningful loss in terms of the difference between the predicted and real physical properties for the generator, expressed as: where L G,org indicates the standard generator loss function in cWGAN-GP, z refers to a random space sampled from Gaussian distribution, which consists of a size of 16 × 4 × 4 × 4 design parameters for a single generated 3D microstructure. The random noise in z will be transposed into a 3D 64 × 64 × 64 electrode microstructure after a series of transposed convolutions. γ is a scale factor to tune the contribution of the physical loss function to the whole loss of the generator. This study concluded that γ = 1 was a suitable scale factor for the physical loss function for current density J after a series of parametric studies. G indicates the transformation of the latent vector by the generator, and S denotes the transform executed by the trained surrogate model to predict the performance (here, the current density J), that is, phys-CNN or phys-DNN. P refers to the performance of electrodes, which here is the current density J. During the training, the weight parameters of the phys-CNN and phys-DNN remained unchanged. The weights of generator and critic were updated depending on the calculated standard loss and physical loss of each batch. The generator accepts an array of random noise with a size of N × 16 × 4 × 4 × 4 and outputs N digital synthetic microstructures, each with a size of 64 × 64 × 64. The critic learned important features from the real data at first and then assessed the similarity of these generated samples by outputting a single scalar. It was noted that the architecture of the critic consisted of a series of 2D critics to assess the 3D microstructure from three directions slice by slice. It was proven that this architecture allows the critic to learn deep into the local microstructure of homogeneous and heterogeneous microstructures. [26] For the 3D training microstructures, here, this work used a digital SOFC electrode database which was reconstructed by an advanced Xe plasma focused ion beam combined with scanning electron microscopy (Xe PFIB-SEM) with a high resolution of 50 nm. The three phases, pore, nickel (Ni), and yttria stabilized zirconia (YSZ) were marked as different voxel values of 0, 128, and 255. The training datasets used for π learning were the same as those real PFIB-SEM samples used in the phys-CNN and phys-DNN. The training microstructures here will be further utilized in the training of phys-DNN and phys-CNN. The input 3D grayscale images were converted into a one-hot encoded image which used three channels to store the voxel information of three phases separately. The input images also had to include a class label list to inform generator and critic of their physical classification. For example, three class labels of 0, 1, and 2 referred to three different ranges of J. The class label was embedded into a new matrix which merges the class label and training image. This class label was relevant to inform the inverse design module of π learning. For the module forward design, the specific class was considered which means only class label 0 was used as all samples in the training dataset are regarded the same type. The training of generator and critic were implemented based on a learning rate of 1 × 10 −4 and their weights were optimized by Adam optimizer. The strategy for determining the end point of the training of the π learning system was different in the various implementations. For the pre-trained normal GAN, training was stopped in 1000 epochs when the Wasserstein distance became steady and visual inspection of the morphology was acceptable. For the fine-tuning of physics-informed π learning, the training started with the weights of pretrained normal GAN and stopped in 300 epochs when both Wasserstein distance and visual inspection were satisfied. The detailed architecture and hyperparameters of generator and critic are provided in Tables S4-S6, Supporting Information.
Data-Driven Surrogate Models: CNNs were powerful deep neural networks which handle tasks including classification and regression normally by taking 2D images as inputs. In this study, two types of 3D CNNs were trained, that is, purely data-driven CNN and physicsinformed phys-CNN. They shared the same architecture but taken as input different 3D images. For purely data-driven CNN, no physical features were added to the input images, while for phys-CNN, an additional physical feature, that is, connectivity, was engineered into the input images by distinguishing the active sites and inactive sites through different voxel labels, as shown in Figure 4. The main function of the phys-CNN was to predict efficiently the overall performance (current density J) that was used for the calculation of physical loss in GAN, as shown in Figure 1 (middle graph).
To enable phys-CNN to predict J, several steps were performed. The first was to prepare training microstructures. Here, this work combined the real samples used for the GAN training and synthetic microstructures from GAN as a hybrid training dataset. This is because the predictor was mainly used to assess synthetic microstructures from GAN. The second was to determine their performance by using a porescale multi-physics SOFC electrode model which was implemented in an open source CFD platform OpenFOAM by solving a set of three tightly coupled partial differential equations that model mass and charge transfer of electrochemical reactions in SOFC electrodes. In total, the current densities under seven overpotentials η = 20, 40, 60, 80, 120, and 140 mV were considered. The model description and validation can be found in Section S1, Supporting Information. The simulated predictions of current density were then used as labels for the training dataset for supervised learning of the CNN models.
In total, 2400 3D microstructures with a size of 64 × 64 × 64 voxels were extracted as training datasets from the PFIB-SEM database. This large SOFC electrode microstructure was heterogeneous due to the large area. During the sampling process, a cubic volume of 64 × 64 × 64 will randomly shift across the whole large electrode reconstructed by the FIB-SEM to extract various 3D electrode samples. The sampling process and the cross-section of the large electrode are shown in Figure S6, Supporting Information. The employed sampling method was proven feasible in previous studies. [29,30] In addition, 3000 generated microstructures from GAN were also included to enhance the diversity of the training dataset. The reason for combining real and generated samples as the final training dataset was because the mixture can enhance the diversity of the training dataset and improve the prediction accuracy of the surrogate model. The trained CNNs then served as an efficient evaluator for property and performance prediction in the physics-informed GAN.
To improve the stability of the training, the voxel values of image inputs were normalized to the range (−1, 1). Following the standard practice, the whole real dataset was split into one training dataset (80%) and the other test dataset (20%). The fitness of the ground and predicted values is measured by L1 loss function formulated as where P denotes real and predicted physical performance properties, where "real" implies those obtained by simulation from physical models and "predicted" is obtained from the CNN model under training. N is the batch size. The CNN was trained using an Adam optimizer with a learning rate 1 × 10 −3 . Steady convergence was achieved with sufficient accuracy obtained within 70 epochs against the mean of absolute error (MAE). The two CNNs share similar architecture with the critic in the WGAN-GP. The detailed architecture and hyperparameters of purely data-driven CNN and phys-CNN are described in Tables S7 and S8, Supporting Information. The phys-DNN consisted of a physical logic model to calculate the active TPB length for each of the microstructures in the training dataset and a 2-layer DNN to predict current density, J, which is trained using calculated active TPB length as input and the outputs (current density) of the physical SOFC model. Note that phys-DNN did not directly use 3D microstructures. The phys-DNN was advantageous in accurately predicting J because it was informed by a relevant structural and electrochemical property. A good compromise was achieved by the phys-DNN between the high cost of physical models and relatively low accuracy of data-driven surrogate models. The number of neurons was 50 for two hidden layers. Phys-DNNs were tested with different numbers of neurons, for example, 500 neurons in hidden layers. It turned out that increasing neuron number makes little improvement in prediction accuracy. The learning rate 1 × 10 −3 , L1 loss function and the optimizer were the same as for the phys-CNN. The training was efficient, reaching convergence steadily, completing in 100 epochs and taking only several minutes to reach a MAE less than 1. The hyperparameters of the phys-DNN are listed in Table S9, Supporting Information.
In addition to predicting the performance, the same phys-CNN was also used to accelerate the prediction of physical property active TPB length. The reason was to demonstrate the transferability of π learning not only to deliver high-dimensional performance-informed electrode generation but also property-informed electrode generation. For the demonstration of property-informed microstructure generation, shown in Figure S2, Supporting Information, the physical property active TPB length was calculated following two steps: The first was a connectivity function which will highlight the connected regions in each phase. The second was to identify the active TPB length by a physical logic model which goes through every connected voxel and counts active TPB sites based on the types of neighbor cells. [63,64] This logic algorithm was implemented in Python. All architecture and training of the neural networks in the study were implemented in Pytorch 1.11 based on a graphics processing unit (GPU) of NVIDIA GeForce RTX 3090.
Optimization of the Design Space: In the forward design module of π learning, it was expected to identify the design configuration of the optimal electrode microstructure. However, the relationship between design parameters and electrode performance J is highly nonlinear. The commonly used gradient-based optimization algorithms were poorly suited for finding the global optimum for non-convex functions. Among the various optimization algorithms, one of the evolutionary algorithms, particle swarm optimization (PSO) was chosen because of the strong design space exploitation ability, simplicity, high repeatability, and especially its robustness in various applications with different mathematical restrictions. [65] It was noted that deep reinforcement learning (RL) is a popular optimization approach and had drawn significant attention in various areas such as robotics and autonomous vehicles. However, deep RL had more complex architecture and required more intensive computations than PSO. Thus, PSO was chosen as the global optimization algorithm in the study. The interaction of the PSO algorithm with the generator of π learning was sketched in Figure 1 (bottom graph). The location of particles was determined by a series of design parameters which corresponds to the latent space of each generated electrode. At the beginning, the locations of hundreds of particles were randomly initialized. Then, the corresponding 3D synthetic microstructures were generated by the pre-trained generator. The performance of these microstructure was subsequently evaluated by the phys-CNN and the phys-DNN to determine the velocity factor of the particles in the next iteration. The updated particles will lead to the new microstructures and physical property which gradually moves toward the optimal. The cognitive and social parameters were chosen as c 1 = 2, c 2 = 2, respectively. The constant inertia weight w was 0.8. The initialized random numbers were sampled from 0 to 1. The workflow of PSO is shown in Figure S4, Supporting Information. As the dimension of the design space was 1024, the number of particles was determined by conducting an optimization of a standard test Styblinski-Tang function with the dimension 1024. It proved that 1000 particles were necessary to output the theoretical global optimization. Therefore, 1000 particles were chosen for the forward optimization of the design parameters for the rest of the cases. Generally, the PSO reaches steady convergence in 200-300 iterations whatever the initial particle locations are. The convergence was concluded when the optimal J remains the same in 200 iterations. Note that, the weights of generator, phys-CNN and the phys-DNN remain unchanged during the PSO iteration.

Supporting Information
Supporting Information is available from the Wiley Online Library or from the author.