Accelerate microstructure evolution simulation using graph neural networks with adaptive spatiotemporal resolution

Surrogate models driven by sizeable datasets and scientific machine-learning methods have emerged as an attractive microstructure simulation tool with the potential to deliver predictive microstructure evolution dynamics with huge savings in computational costs. Taking 2D and 3D grain growth simulations as an example, we present a completely overhauled computational framework based on graph neural networks with not only excellent agreement to both the ground truth phase-field methods and theoretical predictions, but enhanced accuracy and efficiency compared to previous works based on convolutional neural networks. These improvements can be attributed to the graph representation, both improved predictive power and a more flexible data structure amenable to adaptive mesh refinement. As the simulated microstructures coarsen, our method can adaptively adopt remeshed grids and larger timesteps to achieve further speedup. The data-to-model pipeline with training procedures together with the source codes are provided.


INTRODUCTION
Macroscopic properties of materials are not solely determined by their atomic structures but also by their microstructures, or the arrangement of material constituents, such as grains and phases, at the mesoscopic level.A key achievement of modern materials science is the tailoring of materials properties by modifying microstructure through various processing techniques such as casting, annealing and forging to meet specific requirements.To this end, the ability to predict how microstructure evolves dynamically under different processing conditions is crucial to the rational design and development of advanced materials.
Simulating microstructure evolution typically relies on continuum models that employ partial differential equations (PDE) to describe the evolution rules of the systems.For instance, mesoscale modeling methods such as phase-field models (PFM) are widely applied in the studies of solidification, solid phase transformations, grain growth, etc. [1][2][3][4] However, such simulations are computationally expensive to perform even with the use of the state-of-the-art computer hardware.This restricts the time and length scales that could be achieved in simulations and limits their usefulness in predicting the processing-structure-property relation at the macroscopic level.As such, extensive efforts have been devoted to the development of acceleration techniques for microstructure simulations such as parallel computing and adaptive mesh refinement (AMR) [5][6][7] , but the gap remains significant.Notably the Markov Random Fields (MRF) method, a powerful and scalable computational approach, has been recently developed for accurate 2/3D polycrystalline reconstruction and spatiotemporal grain-growth predictions based on experimental inputs 8,9 and can be integrated into component-sized design workflow 10 .Scientific machine learning (ML), including deep learning methods, has emerged in recent years as a powerful family of computational tools that complement and extend the capabilities of traditional computational materials science toolkit 11,12 .In the domain of microstructure characterization, convolutional neural networks (CNN) and related methods have been successfully applied to various image analysis tasks such as feature (grain size, aspect ratio, spacing, etc) extraction and quantification, microstructure classification, image denoising and super-resolution, defect detection, semantic image segmentation, and even 2D and 3D microstructure generation [13][14][15][16][17][18][19][20] .As such, CNN-based deep learning methods are becoming part of the standard toolkit for static image processing for microscopy experiments.Very recently, CNNs combined with recurrent neural networks (RNN) have been proposed to emulate the PDEs underlying PFM models to improve the computational efficiency of microstructure evolution simulations [21][22][23][24] .In Ref. 21  This work aims to improve both the accuracy and efficiency over our previous CNN-based ML surrogate models 21 for microstructure evolution.This is achieved with an overhaul of the basic model architecture: instead of ConvRNN, we propose a graph neural network (GNN) model to fulfill the goal of performing longer and larger mesoscale simulations using grain growth as an example.Graph is a basic data structure that contains two components: vertices and edges.GNN is a type of emerging neural network that aims to process data in the form of graphs and became popular in the last decade 26,27 .When it comes to the fields of chemistry and materials science, GNN is a natural choice for atomic level studies, as atoms and chemical bonds can be directly interpreted as vertices and edges, and variants of GNN were developed for predicting properties of crystals, molecules and polycrystalline materials [28][29][30] .A multitude of GNN-based interatomic potential models have emerged that can be trained from accurate but expensive quantum-mechanical calculations to predict quantum-accurate forces/energies and enable highly accurate molecular dynamics simulations [31][32][33] .
Simulating complex physics with GNNs is becoming an attractive alternative to CNN-based surrogate models in mesh-based fluid simulations 27,34 .MeshGraphNet (MGN) 34 , a recent GNN variant, has proved well suited for representation of complex physics 35,36 .In an MGN, the values of each vertex is passed to its nearest connected neighbors through some learned function in the message passing layer (MPL), with multiple MPLs creating a local spatial awareness.The graphbased architecture allows for more flexible geometric representations when compared to CNNs 21 .
Very recently, Xue et al adopted a graph-based representations to solve multi-physics PFM of microstructure evolution in additive manufacturing with 50x speedup 37 .Qin et al developed a longshort-term-memory based surrogate model of 2D epitaxial grain growth in additive manufacturing conditions 38 .
As discussed previously 21 , the history-dependence of grain growth problems is weak and can be ignored without impact on accuracy.We also limit the scope of this paper to isotropic grain growth to make direct comparison to Ref. 21 .In this work, we adopt a feedforward MGN for time series prediction without recurrency.Hereafter we will refer to our previous ConvRNN as simply CNN to emphasize the main difference in model architecture.The rest of the paper is organized as follows.The main results on the accuracy of the GNN model are presented and compared to the baseline CNN model for 2D and 3D, respectively.We then make a deep dive into the computational efficiency, including direct speed comparison, and strategies to accelerate GNN-based simulation in the spatial and temporal dimensions.More specifically, we present design and use of a simple adaptive mesh refinement algorithm enabled by the flexible graph data structure, and an adaptive time stepping algorithm suitable for coarser grains in the later stages of growth.The computational details are presented in the methods section.

Grain growth in 2D: GNN vs CNN
Grain growth (GG) is a classic example of microstructure evolution during high-temperature processing of polycrystals.It refers to the phenomenon of the average grain size continuously increasing with time due to the growth of some grains at the expense of others.Grain boundary (GB) movement during GG is driven by the reduction of GB energy, and the local GB velocity could be expressed as gb = (1) where is the GB mobility, is the GB energy and is the local boundary curvature.For GG in 2D systems, Smith and von Neumann 39 and Mullins 40 showed that the rate of area change of an individual grain obeys a remarkably simple "N-6" rule: where is the number of neighboring grains sharing a GB.In 2D the growth rate depends only on topology and not on grain size.A grain grows when it has more than six edges ( > 6) or shrinks if < 6.Another important aspect of grain growth is that it could attain statistical self-similarity, i.e. the normalized grain size distribution and grain shape distribution remain constant during growth.
Grain growth has been simulated with various approaches such as the phase-field method [41][42][43][44] , Monte-Carlo Potts model [45][46][47] , surface evolver 48,49 , etc. Previously, we demonstrate that CNN could learn from phase-field simulation data to predict GG in 2D 21  As our focus is on the long-time prediction accuracy of ML, the trained GNN model was tasked to predict 200 frames of grain structure evolution based on different initial configurations.The predicted trajectories are thus 10 times longer than the training data, i.e. 90 precent of the polycrystalline states were never seen by GNN during training.Figure 1 shows three examples of the GNN predictions along with the ground truth from phase-field simulations.In addition, the CNN model studied in our previous work was trained with the same data and its prediction is also compared against GNN.The first two prediction examples starts from initial polycrystalline configurations that were generated by Voronoi tessellation.In these trajectories, while visible difference appears between the CNN prediction and ground truth at about the 30th frame, grain structure generated by GNN is visually indistinguishable from the ground truth even at the last (200th) frame.In the third example, the GNN model was tested by inputing an artificial configuration which consists of four small 4-sided grains and four larger 8-sided grains.While the input configuration is different from grain structures in the training data, its evolution was still predicted accurately.Figure 2a and b compare the RMSE and SSIM (as explained in section Computional method F) averaged over the 1000 test cases predicted by GNN and CNN.RMSE of GNN predictions remains below 0.07 after 200 frames, which is significantly smaller than CNN's error (∼0.2).Similarly, GNN achieves a much higher SSIM than CNN (0.87 vs. 0.45) after 200 frames.In addition to pixel-wise measurements, we evaluated the model accuracy using two classification-related metrics, precision and recall, which quantify how well the models perform in terms of predicting which grains survive or disappear.To this end, individual grains were labeled and tracked through an image sequence to determine whether a specific grain in the initial configuration remains in the system in a given frame.Precision is defined as TP∕(TP + FP), and recall is TP∕(TP + FN), where T(F)P(N) designates counts of true (false) positive (negative) classifications.For 1000 GNN test cases, the average precision and recall start at 1 and slowly decrease to 0.97-0.98 at the end of the trajectories as shown in Figure 2c and d.Given that there are approximately 10 grains left in the last (200th) frame, this suggests that GNN correctly predicts all the surviving grains in the vast majority of the trajectories.In contrast, CNN incorrectly forecasts 20% of the grains in the final grain structure.The above comparisons convincingly establish that GNN outperforms CNN in grain growth predictions and has significantly better long-term accuracy.
Beyond pixel-and grain-based measures, GNN also precisely captures the statistical features of the grain growth process.It can be seen from Figure 3  The GNN architecture is naturally extendable over space, e.g. a GNN model trained on 64×64 grids could be applied to 1024×1024 without retraining.The spatiotemporal extrapolation capability of GNN means that it could be efficiently trained on a relatively small dataset and then used for large scale simulations that are computationally expensive for the phase-field method.As a demonstration, Figure 4a shows the evolution of a polycrystal structure of 1024×1024 pixels from GNN predictions.The configuration is 256 times larger in area than the train data, and the prediction time span (1000 frames) is 50 times longer.The initial structure contains approximately 50000 grains.We find that the grain size and number of sides distributions calculated from the GNN predictions (Figure 4b and c) agree very well with results from phase-field simulations reported in literature 42,50,51 .Nevertheless, the computation cost of GNN is substantially lower than phase-field simulations, which will be compared in a later section.

Grain growth in 3D
Next we apply GNN to learn and predict grain growth in 3D.An advantage of GNN is that the same architecture could be used for both 2D and 3D simulations since the input mesh data are with 300 trajectories of phase-field simulations performed on a 128 3 mesh and downsampled to 32 3 voxels.Each trajectory contains 31 frames and has 350 grains in the initial configurations.As the 3D requires more memory usage than the 2D counterpart, the GNN architecture is simplified to contain 10 message passing layers, each with 64 features, to reduce memory consumption.
After training, the 3D model was tested to predict 200 frames.Two exemples of predicted trajectories with different initial grain configurations are compared with the ground truth in Figure 5.The predictions are found to bear close resemblance to the ground truth in the first 50 frames.
Though visible difference starts to emerge at the later stage, the predicted grain structures are free of any noticeable artifacts.Figure 6a shows that the average RMSE of 49 test trajectories increases to 0.22 at the 200th frame while the average SSIM decreases to 0.50.However, the corresponding precision and recall metrics (Figure 6b) remain higher than 85% up to 170th frame, suggesting that the GNN correctly predicts the majority of surviving grains after long-time evolution.On the contrary, CNN fails to make 3D predictions, as shown by the dashed lines in Figure 6a.Extensive attempts were made to adjust various hyperparameters of the 3D CNN model with none turning out to be predictive, even though comparable hyperparameters wherever applicable were adopted in 2D CNN and GNN training.The origin of the failure of CNN in 3D was not completely clear.
Henceforth we will focus on the GNN results only.The precision value exhibits an accelerated drop around 170th frame in Figure 6b.Such a seemingly abnormal behavior results from an artifact of the phase-field model and is not an indicator of GNN's poor performance.As illustrated by the grains highlighted by the red circle at = 200 in Figure 5, a grain could "meet" itself during growth in a PDE solver because of the periodic boundary condition when there are only a small number of grains left in the system.In phase-field simulation, such an event causes the two regions of the same grain to merge into a contiguous domain, which was caused by the nature of periodic boundary condition used in simulations.This grain self-coalescence , essentially a finite-size effect of PDE simulations when there are too few grains left, is nonetheless absent in GNN predictions because the GNN model has no knowledge about grain identities and always assumes that any two separated regions are different.Instead, a grain boundary persists between the two regions as highlighted in Figure 5.Such disagreement between GNN and ground truth PDE is therefore a finite-size artifact present only in the late stage of grain growth simulations with very few grains left.
Similar to 2D grain growth, the agreement between the 3D predictions and ground truth at the statistical level is excellent.Figure 6c-f shows that the predicted average grain volume and grain size distribution are almost identical to the phase-field simulations with the exception of the aforementioned artifact after about 170 steps in Figure 6c and slight discrepancy of the grain size distribution at 100th frame in Figure 6f.Compared to 2D predictions, GNN exhibits slightly lower long-term accuracy in predicting 3D grain growth.This could be attributed to a simpler neural net structure and a smaller training set used in 3D predictions, which could be improved at the expense of more memory usage.
Large scale 3D simulations could be carried out using GNN with both precision and efficiency.
As a demonstration, we apply the trained GNN model to a polycrystalline configuration containing 96 3 voxels, which corresponds to phase-field simulation on a 384 3 mesh due to downsampling.
Snapshots of the grain structure at = 0, 100, 300 are shown in Figure 7a-c.The steady-state grain size distribution is shown in Figure 7d, in excellent agreement with large-scale simulations of isotropic grain growth using the phase-field or front-tracking method 42,51-53 as well as the meanfield theory prediction 54 .Furthermore, there are three types of topological evolution events in 3D grain growth 55 : tetrahedral elimination, grain encounter and grain separation as illustrated in Figure 8.We found that all of these events are correctly captured by GNN in the trajectories.
We conclude that GNN's excellent predictive power derives from its ability to reliably predict the curvature-driven boundary movement and the 3D topological changes to the GB network.

COMPUTATION EFFICIENCY
As a major advantage of GNN, it is considerably faster than the phase-field model in simulating grain growth.GNN has several origins.First, GNN allows for more efficient time stepping.While the time step size used by the PDE solvers is limited by the stability of numerical schemes, GNN is not subject to the same restriction and could employ larger time steps.Through testing, we found that the time interval between the two output frames in GNN prediction could be increased to 80 times of the step size in phase-field simulations without affecting the accuracy.Second, microstructure could be represented on a coarser grid in GNN.In phase-field simulations, an interface typically needs to FIG. 8. Three topological evolution events during grain growth in 3D (as described in 55 ).The schematics of each event are shown in the second column (solid lines -triple lines, dashed lines -triple lines obscured by the front grains, and dots -quadruple points).The third column shows the 3D rendering of an example of each event from GNN prediction in agreement with the ground truth.
be discretized by at least 5-6 pixels to ensure the numerical accuracy of the difference equations.
In contrast, our test shows that 1-2 pixels is sufficient for GNN, which reduces the number of graph nodes required to resolve microstructure by 16 times in 2D and 64 times in 3D compared to phasefield discretization.Such spatial coarsening also significantly decreases the computation load.In addition, GNN directly benefits from GPU acceleration.

ACCELERATION WITH ADAPTIVE REMESHING
In Ref. 34 Pfaff and coworkers adopted unstructured triangular cells that are commonly used in finite element methods.Here we adopted square (2D) or cubic (3D) grid with nearest-neighbor edges (□), as such structured meshes allow for straightforward coding and parallelization.Alternatively, we have tried structured triangles on square grids (⧄) but found little difference in accuracy at increased computational costs to treat more edges.
In all previous results, the mesh was kept constant.However, the initial fine mesh required for small grains becomes excessive for late-stage large grains.To reduce the computational load, we implement adaptive mesh refinement (AMR) within the GNN model.The computational details can be found in Section E. To test the efficiency gain of AMR, a grain configuration defined on a 512×512 fine mesh was used as the initial configuration, which was evolved by two GNN models trained separately with or without AMR.The predictions by the two models are almost identical, which shows that adaptive remeshing has little effect on accuracy (Figure 10a).As shown in Fig- ure 10b, it takes longer time for the AMR-GNN model (blue curve) to make predictions than the GNN-only model (blue dashed line) at the early stage due to the computational overhead of AMR.
However, the AMR-GNN model becomes increasingly more efficient when the grain structure gradually coarsens and more and more fine grains are replaced by coarser ones, which is demonstrated by the decrease in the number of vertices (thick red curve) in the AMR-GNN prediction.A crossover in the average wall time per step between the two models occurs around 80 time steps, and the AMR-GNN model becomes twice faster after 1200 steps.We find that the computation cost of the AMR-GNN model scales linearly with the number of graph nodes (Figure 10b).Similar behavior is also found in 3D AMR-GNN though with a higher remeshing overhead.This shows that combining AMR with GNN is especially useful for accelerating long-time predictions of microstructure coarsening processes such as grain growth that involves large change in the structural feature size.We note that the current AMR implementation is relatively simple and speedup could be further increased by fine-tuning hyperparameters or employing multilevel grids to represent the graph with coarser cells.

ACCELERATION WITH ADAPTIVE TIME STEPPING
Like adaptive mesh resolution, adaptive time stepping (ATS) is a commonly employed strategy in accelerating the numerical solution of PDEs.Here we applied the ATS approach to further improving GNN's prediction efficiency by using increasingly large intervals between output frames.
When microstructures undergoe coarsening processes such as grain growth and phase separation, the interface movement becomes progressively slower due to the diminished driving force, which naturally allows for larger step size to be used in prediction.Our approach involves training several GNN models with different time intervals between adjacent frames in the input data.The interval for the baseline model is equal to a simulation time of Δ = 32.Models with larger intervals (2Δ , 4Δ ) between the adjacent frames were also trained.When predicting the evolution sequence, the ATS algorithm switches between models of different Δ by using the step-doubling method 56 to dynamically control step size.Specifically, after every 20 steps, the algorithm compares the predictions using two steps of the current step size versus one step of the doubled step size.If their difference measured by RMSE per pixel is smaller than a preset threshold (4 × 10 −6 was used in this work), the used step size will be doubled in subsequent predictions.Figure 11a

CONCLUSION
In summary, we showcase the application of GNN as a surrogate model of computationally intensive PDE-based phase-field methods in simulating materials microstructure evolution by using grain growth as an example.Trained with ground-truth microstructure evolution trajectories from the phase-field model, the GNN model can faithfully predict grain structure evolution in 2D and 3D with both local and statistical accuracy and excellent extrapolation capability in the spatiotemporal domain and configurational space.It substantially improves the quantitative prediction accuracy compared to the 2D CNN model reported in our previous work 21 while maintaining a similar computation speed, and provides far superior predictive power in 3D for which CNN qualitatively fails.
We also demonstrate that further speedup could be achieved by combining adaptive temporal resolution schemes and especially adaptive mesh refinement, which represents a unique advantage of the graph-based approach with flexible data structures in simulating a wide range of microstructure coarsening phenomena in which the characteristic feature size and time scale continue to increase during the evolution processes.
The present work is limited to the relatively simple case of isotropic grain growth at constant temperature.Future work will attempt to extend the GNN models to the more general situation, where grain growth is anisotropic because of the orientation-dependent grain boundary energy and mobility and also experiences time-dependent and non-uniform temperature during material pro-cessing.Such extension could be implemented by incorporating grain orientation and temperature field as additional input channels onto the graph nodes.The training and testing of such models will be reported elsewhere.

A. Phase field method
Phase-field simulations are employed to generate the ground truth for grain growth.The phasefield method is a powerful computational technique for modeling microstructure evolution in diverse materials systems 43,57,58 .In a phase-field model, different phases are represented by one or multiple order parameters, and their interfaces are tracked by the level sets of the order parameters.Spatiotemperoal evolution of the microstructure is described by the governing equations of the order parameters derived from thermodynamic and kinetic principles.
In accordance with our previous work 21 , isotropic grain growth in polycrystalline structure is simulated by a multi-order-parameter phase-field model 59 .In the model, a set of order parameters { 1 ( ), 2 ( ), ..., ( )} are used to represent distinct grain orientations.The free energy of the system is expressed as where the homogeneous free energy density is given by which has local minima located at ( 1 , 2 , ..., ) = (1, 0, ..., 0), (0, 1, ..., 0), ..., (0, 0, ..., 1).The In 3D, the down sampling ratio was 4 3 spatially and 1000 temporally.Therefore, the data consist of time series of coarse-grained arrays for the field ∈ ℝ × (× )× where ∕ ∕ =64 (2D) or 32 (3D) is the spatial grid size and = 1 is the number of channels.The grid size is chosen to be large enough to accommodate sufficient variation in microstructure configurations and also provides adequate resolution to resolve interfaces in microstructure with at least 1-2 pixels.
The model is implemented in TensorFlow 63 and trained on 2 NVidia V100 or 4 1080-Ti GPUs with single (32-bit) floating-point precision.Typical training time is 10 hours, with an initial learning rate of 10 −3 that gradually decays to 10 −6 .
In this work, we presume no explicit history dependence, assuming that the next time step is only dependent on the current, not previous steps.Given current , the next frame ̂ +1 is predicted by: The time evolution prediction are then performed autoregressively.

C. Message-passing Graph Neural Network
We largely adopt the MeshGraphNet of Refs.34 and 35, a type of message-passing graph neural network.We used 48 hidden features in 2D and 64 in 3D.
The phase field configuration can be represented by a graph = ( , ), where = { } is the collection of nodes (or vertices, used interchangeably in this work) with nodal positions and field values ( ), and = {( , )} represents edges or connectivity map. is directed: if ( ) ∈ , so is ( ).A GNN is an algorithm that naturally operates on such graph-structured data.Specifically, let the input features for each node be where is a flag that can be used to specify the type of node .In this work, we the adopted periodic boundary condition such that all nodes are equal (internal): ≡ 0. The input edge features on edge Following Ref. 34 and 35, our GNN starts with vertex and edge encoders ENC V , ENC E transforming concatenated input features into a latent space: Then, stacked message passing layers E( ) , V( ) (1 ≤ ≤ ) operate sequentially on the latent edge and vertex features: Finally, a node decoder DEC translates the latent node representations ( ) into phase field predictions: Together, Eqs.(7-11) constitute a GNN implementation of the surrogate model in Eq. (6).All neural network operators were built from multi-layer perceptrons with two hidden layers and layer normalization 64 between them.Skip connections 65 of the form ← + ( ) were adopted in the message-passing layers in addition to Eq. (10).The critical message-passing steps in Eq. (10) allow the GNN to transmit and aggregate information along connected edges, and each additional message-passing layer builds up a more complex dependence on vertices farther away.The number of message-passing layers required to obtain accurate predictions is then related to a few factors, including the effective instantaneous interaction distance, and the levels of spatial and temporal downs-sampling.

D. Symmetry and data augmentation
The data processing and augmentation procedures follow our previous work 21

E. Adaptive mesh refinement
We assume a fine level 1 ×⋯× -dimensional grid.A fine configuration ( = { 1 , … }) can be specified on this grid, where = 1, … is the input channel index, and 1 ≤ ≤ .With a coarsening length of , the grid is divided into 1 ×… subdivisions , each of which contains ( +1) fine grid points (including both interior and surface points on the subdivision) and overlaps with its neighbors at their boundary.is split into a fine subset for which all the grid points should be tracked (designated as ( )), as well as a coarse subset ℂ = ⧵ = ̄ for which only the 2 grid points at the corners are tracked.4 The updated coarse subset is ℂ = ̄ .
5 For each ∈ ⧵ −1 , interpolate on all ( + 1) grid points based on the value of on the corners.In this work, we adopted bilinear (trilinear) interpolation in 2(3)-D.
6 The update nodes are ⋃ ∈ ( ), or all tracked grid points.
(0.01 ) 2 and 2 = (0.03 ) 2 , where is the range of pixel values.The Euclidean distance between the distributions of quantity from RNN predictions and ground truth is defined as where is the number of bins within the interval between the minimum and maximum of , and g and p are normalized counts in the -th bin of the ground truth and predictions, respectively.= 20 is used for all the calculations.enhanced crystal graph network for predicting properties of materials," , Yang et al. demonstrated that a convolutional RNN model (ConvRNN) based on the E3D LSTM architecture 25 is able to learn the underlying evolution rules from 2D PFM simulation data and quantitatively reproduce PFM predictions.The trained CNN model accurately captures short-term local dynamics and longterm statistical properties in several common microstructure evolution processes including grain growth, spinodal decomposition and dendrititic crystal growth.Furthermore, the model exhibits excellent capability in extrapolating with robust and transferable accuracy to new configurations beyond the training datasets.Compared to PFM, ConvRNN-based simulations are faster by 1 to 3 orders of magnitude, which derives from the use of larger time steps and coarser mesh grid without sacrificing the prediction accuracy.

FIG. 1 .
FIG. 1. Examples of GNN prediction (P) based on 1 input frame in comparison with the ground truth (G) and previous CNN predictions 21 .
FIG. 2. Comparison of the prediction accuracy of GNN vs CNN models for 2D grain growth: (a) RMSE, (b) SSIM, (c) Precision and (d) Recall.See main text for definitions of precision and recall.

FIG. 4
FIG. 4. (a) 2D grain structure on a 1024 2 mesh at different times from GNN simulation; (b,c) Steady-state distribution of normalized grain size (b) and number of faces (c) predicted by GNN in comparison with phase-field simulation results in literature 42,50,51

FIG. 5 .
FIG. 5. Examples of GNN prediction (P) of 3D grain growth on a 32 3 mesh in comparison with the ground truth (G) FIG. 6. Accuracy of the GNN prediction of 3D grain growth: (a) RMSE and SSIM of predictions by GNN (solid lines) vs CNN (dashed lines); (b) Precision and recall of the surviving grains predicted by GNN; (c) Average grain area vs time predicted by GNN vs ground truth; Steady-state distribution of normalized grain size from the ground truth and GNN prediction computed from (d) all the frames, (e) 50th frame and (f) 100th frame.

FIG. 9 .
FIG. 9. Average wall time per GNN step over 500 trials as a function of the computation domain size (downsampled) of (a) 2D and (b) 3D simulations.

FIG. 10 .
FIG. 10.Effects of AMR on GNN simulations on a 512 2 lattice by remeshing the graph every 5 time steps.(a) Accuracy of the GNN-AMR model compared with the GNN-only model.(b) Average wall time per step (blue solid) and number of vertices vert (thick red solid) versus time step.The number of vertices and average wall time per step for the GNN-only simulation are shown as dashed lines for comparison.
FIG. 11.(a) RMSE of the ATS model vs GNN models with different time step size Δ .(b) Step size averaged over 100 runs vs time steps.
evolution of ( ) ( = 1 … ) follows the time-dependent Ginzburg-Landau or Allen-Cahn 60all the simulations, dimensionless parameters = 100, = 1, = 1 and = 1 are used.The initial polycrystalline structure is generated by Voronoi tessellation62 with 100 grains in 2d and 350 in 3d.Eq. 5 is solved by the forward Euler finite difference scheme with periodic boundary conditions and grid spacing Δ = 1 and time step size Δ = 0.2.B.Data and model setupFollowing Ref.21, single-channel snapshots of the polycrystalline structure are generated by defining ( ) = ∑ =1 3 ( ) as the order parameter so that is close to 0 in the grain boundary region and 1 inside grains.The spatial grid of was down sampled spatially by a factor of 4 2 times from 256 2 to 64 2 and temporally 80 times, i.e. 80 PDE time steps correspond to one GNN time step.
. Each dataset intended for training was randomly partitioned into three subsets: training, validation and testing/prediction (e.g. at a ratio of 70:15:15).The validation set was used to monitor the convergence during training, while the testing or prediction set was completely withheld from training.The latter may also include customized sequences with different spatial/temporal dimensions and/or initial configurations.2D data are augmented by performing symmetry operations of the 2D point group 4 on the original configuration.Similarly, 3D data are augmented by the cubic ℎ point group.