Grain-level micromechanical modeling and assessment of fatigue-critical pores using graph neural networks Authors: Luca Loiodice, Krzysztof S Stopka, Yixuan Sun, Guang Lin, Michael D Sangid Published: 2026 ABSTRACT AbstractFatigue assessment is essential for the insertion of new materials and manufacturing processes into engineering applications, yet experimental testing is costly and time-consuming, and while crystal plasticity (CP) captures microstructure-sensitive fatigue mechanisms, it remains computationally expensive. This work presents GFF-MAP (Grain-level Fatigue Failure - Micromechanical Assessment of Pores), a framework that leverages graph neural network (GNN) surrogate models trained on CP data to predict grain-level micromechanical fields in additively manufactured (AM) IN718 microstructures containing representative pore defects. The models predict grain-average and grain-maximum stress and accumulated plastic strain energy density, wP, a fatigue damage indicator linked to crack initiation. Although prediction accuracy decreases for extreme and plasticity-driven quantities, the predicted grain-maximum wP enables rapid assessment of pore criticality by determining whether fatigue hotspots occur in pore-adjacent grains. This approach advances GNN-based surrogate modeling of polycrystalline response by extending predictions to plasticity-driven localized fatigue metrics and enabling fast screening of fatigue-critical pores in AM components.Subject terms: Engineering, Materials science Introduction Fatigue analysis plays a central role in the insertion of new materials and their manufacturing processes into engineering applications. Fatigue behavior is governed by a combination of factors, including loading history, microstructure, residual stresses, and microstructural defects such as porosity or surface roughness. While experimental testing remains the foundation of fatigue characterization, crystal plasticity modeling has demonstrated value in reducing the time and cost needed for the qualification of materials when used to complement experimental testing1,2. In particular, crystal plasticity models have been shown to reliably capture the microstructure rationale for the onset of crack initiation3–11 and crack growth8,12–19, and have been employed to predict fatigue life20–25, through the use of fatigue damage indicator parameters. Among these, the accumulated plastic strain energy density, wP, which has been experimentally validated as a predictor of fatigue crack initiation sites relative to microstructural features26,27, is employed in this study together with the stress along the loading direction, σZZ, to characterize micromechanical response and fatigue crack initiation behavior. Full crystal plasticity analyses, from study conception to completion, often require months of computation and data processing. These limitations have motivated the development of surrogate modeling strategies capable of reproducing crystal plasticity predictions with a significantly reduced computational cost. Recent efforts have explored the use of machine learning for predicting both macroscopic material properties and microscale fields. Convolutional neural networks (CNNs) have been employed to predict stress-strain responses or field quantities based on voxelized or image-like representations of microstructures28–36. Additional work has leveraged feed-forward neural networks (FFNNs) with variational Bayesian inference37 or recurrent neural networks (RNNs)38 for history-dependent micromechanical predictions. While these models have shown promise, they generally require structured grid representations and are less suited to capturing the grain interactions that govern the micromechanical response of a material. Graph neural networks (GNNs) are naturally suited for microstructure-sensitive modeling as a polycrystalline microstructure can be represented as a graph in which grains correspond to nodes and adjacency relationships define edges. Both nodes and edges carry feature vectors that encode grain properties and intergranular interactions, respectively. This is particularly valuable because the micromechanical response of a grain is influenced not only by its own properties but also by the morphology, crystallography, and deformation behavior of its neighbors. In recent years, GNNs have been applied to a range of microstructure-sensitive problems for the prediction of macroscopic quantities, including magnetostriction 39, effective ion conductivities and elastic stiffness40, yield strength41, and anisotropic elastic modulus and yield strength42. At the grain scale, GNNs have been used to predict elastic grain-average stresses43 and the grain-average Fatemi-Socie fatigue damage indicator parameter44, demonstrating the potential of graph-based models to capture the physics of micromechanical response. While Sim et al.44 demonstrated the capabilities of GNNs for predicting grain-averaged Fatemi-Socie values, the use of grain-averaged metrics and coarse microstructural resolution limits applicability to fatigue analyses, which are controlled by localized extreme responses. Therefore, the present study ultimately targets grain-level extreme predictions of wP, an experimentally validated indicator of crack initiation, and explicitly incorporates porosity within high-fidelity microstructures to more accurately represent grain- and defect-level features. Building on these developments, the objective of this work is to develop GNN-based surrogate models capable of predicting grain-level micromechanical fields to support a fatigue analysis at a fraction of the computational cost of full crystal plasticity simulations. To this end, the GFF-MAP (Grain-level Fatigue Failure - Micromechanical Assessment of Pores) framework is introduced, integrating crystal plasticity-informed data generation with graph neural network modeling. The surrogate models predict grain-average and grain-maximum values of the stress along the loading direction, σZZ, and the accumulated plastic strain energy density, wP. These predictions are subsequently used to assess whether a given pore serves as the first site of crack initiation, therefore making it critical for fatigue performance. The methodology is designed to be applicable to any polycrystalline metal or alloy, but additively manufactured (AM) IN718 is selected as a case study. To represent realistic porosity and microstructural features, lack of fusion and keyhole defects extracted from X-ray computed tomography scans were inserted into statistically equivalent virtual microstructures (SEVMs). The resulting microstructures were used as input graphs for the GNNs, with crystal plasticity simulations performed using the computationally efficient elasto-visco-plastic fast Fourier transforms (EVP-FFT) solver serving as ground truth. Two parallel approaches are explored for identifying critical pores, defined as pores that act as the fatigue hotspot in the material. The first approach involves (i) using a regression GNN model to predict the distribution of maximum wP across every grain in the microstructure, (ii) post-processing the predictions to identify the grain with the highest grain-maximum wP value overall in the microstructure (the fatigue hotspot), and (iii) determining whether this hotspot grain is a neighbor of the pore. The second approach uses a dedicated classification GNN model trained to directly label SEVMs as having either a critical or non-critical pore, without any intermediate micromechanical field prediction. These predictions enable rapid screening of pores relative to microstructural features generated during additive manufacturing to identify those that are potentially detrimental to fatigue performance, allowing practitioners to take targeted actions to mitigate their presence. A schematic representation of the full GFF-MAP workflow is provided in Fig. 1. GFF-MAP workflow for GNN-based analysis of grain-level fatigue failure and micromechanical assessment of pores. Schematic overview of the proposed framework in which graph neural network (GNN) models receive microstructural descriptors as input and are trained on crystal plasticity simulation data. Depending on the task, the GNNs are configured to perform either regression, predicting grain-level micromechanical fields, or classification, directly identifying fatigue critical pores. The network architecture and output layers are adapted according to the prediction objective. Results The results are organized into two subsections. The first subsection presents the performance of regression GNN models for the prediction of grain-level micromechanical fields. The second subsection evaluates how these micromechanical fields can be leveraged to identify which pores are critical, being the site of crack initiation, and compares these results with a parallel approach in which a classification GNN model is trained to directly identify critical pores, without any intermediate micromechanical field prediction. Prediction of grain-level micromechanical fields Four parallel GNN models were developed and trained to predict the following grain-level micromechanical fields: (i) the grain-average stress along the loading direction, σZZ,avg, (ii) the grain-maximum stress along the loading direction, σZZ,max, (iii) the grain-average accumulated plastic strain energy density, wP,avg, and (iv) the grain-maximum accumulated plastic strain energy density, wP,max. The definition and a detailed description of the applicability of wP for fatigue analysis is provided in the “Methods” section. The GNN models were trained on micromechanical fields obtained from 2480 crystal plasticity simulations (for a total of approximately 2 million grains) on AM IN718 SEVMs, split such that 1984 were employed for training (80%), 248 for validation (10%), and 248 for testing (10%). For each target micromechanical field, the GNN architecture, input feature set, and training hyperparameters were independently optimized, resulting in the configurations presented in the Supplementary Information. The prediction accuracy was quantified using the relative L2 error, e¯, the coefficient of determination, R2, and the Spearman rank correlation coefficient, ρ. Additional details on microstructure generation, crystal plasticity simulations, GNN modeling, and performance evaluation are provided in the “Methods” section. Figure 2 presents parity plots comparing GNN predictions with crystal plasticity ground truth for all grains in the testing dataset (top row) and for the subset of grains neighboring a pore (bottom row). The latter results provide insight into the model performance for grains experiencing stronger stress concentrations and plasticity perturbations due to the pore vicinity, which makes the prediction tasks more challenging. Examining the progression in prediction accuracy across σZZ,avg, σZZ,max, wP,avg, and wP,max illustrates how the performance of regression GNN models evolve when transitioning from stress to fatigue damage indicator parameters, and from grain-average to grain-maximum quantities. Comparison of GNN predictions against crystal plasticity ground truth over the testing dataset for all four targeted micromechanical fields. a, b report the results for σZZ,avg; c, d for σZZ,max; e, f for wP,avg; and g, h for wP,max. The parity plots on the top row report data from all grains in the testing dataset, while the data in the bottom row is restricted only to the pore-adjacent grains. The color scale indicates the number of data points falling within each bin of the parity plot, with warmer colors corresponding to higher point density. The grain-average stress along the loading direction, σZZ,avg, is accurately predicted, as shown by the strong diagonal alignment in Fig. 2a, the low mean relative error (e¯=4.1%), high coefficient of determination (R2 = 0.909) and high Spearman rank correlation coefficient, (ρ = 0.951). Predictive performance decreases slightly for pore-adjacent grains (Fig. 2b), with R2 decreasing to 0.862, ρ dropping to 0.932, and e¯ increasing to 5.1%. Nonetheless, it maintains strong accuracy and continues to capture most of the variance in the stress response, even in these mechanically complex regions. Model performance can also be examined visually by comparing the GNN predictions to crystal plasticity results on a representative microstructure from the testing dataset. For this scope, Fig. 3a shows a σZZ,avg computed by crystal plasticity, 3b the corresponding GNN predictions, and 3c the grain-wise difference between the two. For each of these, a three-dimensional view of the SEVM is presented in the top row, and a two-dimensional slice of the mid-plane normal to the Z-direction, highlighting the region surrounding the pore, is shown in the bottom row. This example demonstrates that the GNN successfully captures both the high-stress and low-stress regions throughout the microstructure, reproducing the variability observed in the ground truth field, consistent with the strong coefficient of determination (R2 = 0.909). The difference field highlights that the largest prediction errors typically occur in grains adjacent to the pore and near the free surfaces, where steep stress gradients make the prediction more challenging. Visualization of the σZZ,avg field predicted by crystal plasticity and by the GNN, and the corresponding grain-wise difference, for a representative microstructure from the testing dataset. a Crystal plasticity simulation, b GNN model predictions, and c Difference between the prediction and simulation. Three-dimensional views of the SEVM are presented in the top row, and two-dimensional slices of the mid-plane normal to the Z-direction, highlighting the region surrounding the pore, are shown in the bottom row. Transitioning to the other end of the spectrum, the GNN performance for predicting the grain-maximum accumulated plastic strain energy density, wP,max, is noticeably poorer, with e¯=57.9%, R2 = 0.471, and ρ = 0.749, as shown in Fig. 2g. This reduced accuracy can be attributed to the highly localized and heterogeneous nature of the wP field, which spans over several orders of magnitude. Because the applied macroscopic strain is within the elastic regime, most grains undergo negligible plastic deformation, resulting in many values close to zero. In fact, the large e¯ value arises primarily from the extremely small ground truth values, as when the denominator ∥y∥2 is dominated by near-zero values, even moderate absolute errors translate into very high relative errors. The lower coefficient of determination, R2, further reflects the challenge of modeling a field that is both sparse and strongly localized, making it difficult for the GNN to reproduce its full variability. However, the relatively high Spearman rank correlation coefficient, ρ, indicates that, despite the reduced numerical accuracy, the model preserves the ability to reproduce the ordering of grains based on wP,max values. Thus, grains predicted to exhibit high wP,max values generally correspond to those with high values in the crystal plasticity simulations, and similarly for low-value grains. This ability to correctly capture the relative ranking of grains is particularly important in fatigue analysis to identify the fatigue hotspot location within a microstructure. This behavior is reflected in the parity plot: the model performs poorly for grains with low wP,max, particularly those below 10−2MJ/m3, where predictions consistently overshoot the ground truth. In contrast, grains with the largest wP,max values, which are the most relevant for fatigue analysis, since fatigue damage is driven by the extreme wP,max response, lie much closer to the ideal 45∘ line. Overall, despite these limitations, the model remains useful for fatigue analysis due to its ability to identify and rank the most critical grains, as discussed in the next subsection. The spatial performance of the GNN for the prediction of wP,max is evaluated in Fig. 4 on the same representative microstructure used in Fig. 3. As before, 4a shows the crystal plasticity values of the grain-level maximum wP, 4b presents the GNN predictions, and 4c provides the grain-wise absolute difference map. This example demonstrates that the GNN captures the overall variability of wP reasonably well and successfully identifies grains that tend to have higher values. However, prediction quality degrades in grains with negligible plastic deformation (below 10−2MJ/m3), where deviations from the ground truth become more pronounced. The difference map again reveals the largest discrepancies near the pore and along free surfaces, regions characterized by steep stress and plasticity gradients that pose significant challenges for the model. Visualization of the wP,max field predicted by crystal plasticity and by the GNN, and the corresponding grain-wise difference, for a representative microstructure from the testing dataset. a Crystal plasticity simulation, b GNN model predictions, c Difference between the prediction and simulation. Three-dimensional views of the SEVM are presented in the top row, and two-dimensional slices of the mid-plane normal to the Z-direction, highlighting the region surrounding the pore, are shown in the bottom row. The progression of e¯,R2, and ρ values across the four predicted micromechanical fields (σZZ,avg, σZZ,max, wP,avg, and wP,max), shown in Fig. 2, reveals a clear and systematic decrease in model performance. A more detailed set of parity plots for all four quantities, together with spatial visualizations of σZZ,max and wP,avg, are provided in the Supplementary Information for deeper analysis. An overview of the GNN capabilities across these four target variables is summarized in Fig. 5, offering a broader perspective on the performance of regression GNNs for grain-level micromechanical field prediction. The decline in R2 values highlights two distinct trends. First, performance decreases when moving from grain-average to grain-maximum quantities. This reduction is expected, as extreme values are driven by highly localized mechanical conditions, often concentrated at grain boundaries or near the pore, which are more challenging to infer solely from grain-level descriptors. A further drop in performance occurs when transitioning from stress-based quantities to wP. Fatigue damage indicator parameters tend to be even more spatially localized and are less directly correlated with grain descriptors, such as crystallographic orientation, size, or shape, making them inherently more challenging to predict. Together, these two factors explain the sharp performance reduction observed between σZZ,avg and wP,max. Nonetheless, the relatively high ρ value associated with wP,max indicates that, although the exact magnitudes are not predicted with high precision, the model still captures the relative ranking of grains. As a result, the predictions remain useful for identifying the fatigue hotspot location within the microstructure and for assessing whether a pore is critical, as outlined in Fig. 5. The figure also presents an alternative strategy to identify critical pores based on a classification GNN model. Both approaches were explored and are discussed and compared in detail in the next subsection. Overview on the evolution in the performance of the GNN regression models for the prediction of grain-level σZZ,avg, σZZ,max, wP,avg, and wP,max, and potential strategies to identify critical pores. The loss in performance going from grain-average to extreme values and from stress to fatigue damage indicator parameters is highlighted. The predicted wP,max was used to determine which pores are critical, then comparing these results against the predictions of the GNN model for the direct classification of the critical pores. Identification of critical pores Fatigue crack initiation is designated to occur at the location within the microstructure, defined as the fatigue hotspot, that exhibits the highest value of wP,max. The pore at the center of each SEVM is classified as critical if this hotspot lies at a grain immediately neighboring the pore, or as non-critical otherwise. The grain-level wP,max values predicted by the regression GNN model for the SEVMs in the testing dataset were post-processed to determine which pores were critical, i.e., acting as the first site of fatigue crack initiation. The predictions resulting from this analysis are presented in Fig. 6a in the form of a confusion matrix and evaluated using the performance metrics described in the “Methods" section. The results demonstrate that although the overall values of the accuracy (79.8%) and recall (81.1%) are promising, this approach tends to over-predict critical pores. This leads to a substantial number of non-critical pores being misclassified, which reduces the precision (51.8%) and consequently the F1-score (63.2%). This behavior can be attributed to the tendency of the regression GNN model to learn that grains adjacent to the pore often exhibit elevated values of wP,max. As a result, the model frequently overestimates the likelihood that these pore-adjacent grains correspond to the fatigue hotspot, even in cases where higher wP,max values occur elsewhere in the microstructure. Confusion matrices for the identification of critical pores and corresponding performance metrics. a Reports the predictions of the regression GNN-based approach, while b reports the predictions of the classification GNN-based approach. A parallel approach for the determination of critical pores was explored, consisting of a classification GNN model trained to directly identify whether a given SEVM contains a critical pore. A detailed description of this GNN architecture is provided in the “Methods" section. The overall logic is similar to the regression models, with the key difference that the output of the GNN is now a single binary label for the entire SEVM (1 if the pore is critical or 0 if non-critical), rather than one value for each grain. The same crystal plasticity dataset and the same training/validation/testing splits used for the regression tasks were adopted here, with each SEVM assigned a ground-truth label based on whether the pore is the site of fatigue crack initiation from crystal plasticity. The resulting predictions are shown in the confusion matrix in Fig. 6b following the same format and evaluated using the same performance metrics as in the regression-based approach. These results indicate that this direct classification strategy performs worse than the approach that uses the regression GNN predictions of wP,max. While the number of correctly identified critical pores remains comparable, resulting in a similar value of recall (80%), the model incorrectly classifies an even larger number of non-critical pores as critical. This leads to a substantial decrease in the values of precision (40%), accuracy (69%), and consequently in the F1-score (53.3%). This performance suggests that the GNN struggles to capture the relevant patterns needed to directly infer whether the pore is the site of fatigue crack initiation, without relying on intermediate micromechanical field predictions such as wP,max. This difficulty is attributed to the complexity of the underlying physics, as the pore behavior depends on multiple interacting factors, including the morphology of the pore and its neighboring grains, the redistribution of stress and localization of plasticity around the pore, and the presence of other stress concentrators elsewhere in the microstructure. Discussion The performance of the regression and classification approaches for identifying critical pores can be examined in more detail by analyzing which pores, in the space of equivalent diameter and sphericity, are accurately classified, as shown in Fig. 7. As described in the “Methods" section, for each inserted pore, four different crystal plasticity simulations were conducted, representing different neighboring grain configurations (four different SEVMs). Each marker in Fig. 7a represents one pore and is colored according to the fraction of the four SEVMs in which the pore was identified as the fatigue hotspot from crystal plasticity, i.e., the fraction of SEVMs in which the pore is deemed critical. This data is restricted here to only the 62 pores from the testing dataset, while an extended view of all 620 pores from all subsets is shown in the “Methods” section, for a better characterization of the crystal plasticity results. Figure 7b and 7c show, for the same pores, the fraction of the four SEVMs in which the determination of pore criticality made by the regression and classification-based approaches is correct, respectively. These plots provide a direct comparison of the predictive capabilities of the two GNN strategies. Examining these distributions reveals consistent patterns in the model performance, highlighting which pores tend to be predicted reliably and which exhibit lower classification accuracy. Pores represented by a triangular marker correspond to those that behave consistently across all four SEVMs, being either always critical or always non-critical. This supports the potential claim that their behavior is primarily governed by the pore geometry rather than the surrounding microstructure. Thus, these pores are expected to be easier to classify, and indeed, the vast majority of them are predicted correctly in all four SEVMs, with only a small number dropping to less than 2/4 correct predictions. In contrast, pores whose behavior changes depending on the SEVM are classified less accurately by both approaches. This is expected as, when the pore behavior depends strongly on the surrounding microstructure, the GNN is required to learn and capture higher-order correlations between the pore geometry and grain-level micromechanics. A detailed examination of the ten false negative cases produced by the regression approach (Fig. 6a) was conducted, since false negatives (missing a truly critical pore) represent the safety-critical failure mode in fatigue screening applications. In these cases, the GNN model tends to under-predict wP,max in the pore-adjacent grains. As a consequence, grains located at the free surface of the SEVM, where the regression of the magnitude of wP,max is more accurate, are instead identified as the fatigue hotspot. This leads to an incorrect classification of the pore as non-critical, despite it being critical in the ground truth. With further analysis amongst these ten false negative cases, there was no observable pattern with the type of pore defect or surrounding microstructural features, suggesting a more complicated relationship that neither the GNN nor scientific inspection could identify. Moreover, Fig. 7c shows a higher number of incorrect classifications than Fig. 7b, reinforcing the trends observed in Fig. 6, with the regression-based approach outperforming the classification-based approach. The classification GNN model performs reasonably well for pores at the extreme ends of the spectrum, either large equivalent diameter with low sphericity or small equivalent diameter with high sphericity, where pore geometry predominantly governs fatigue behavior and a simpler continuum finite element approach could be sufficient (accounting for the shape of a pore in a homogeneous medium) without the need for crystal plasticity (accounting for the anisotropic response of each grain in the microstructure). However, for pores whose criticality strongly depends on the surrounding microstructure, situations that would normally require full crystal plasticity simulations, the regression GNN model, leveraging grain-level wP,max predictions, is more effective at capturing these complex interactions, providing more accurate assessments. Relation between pore morphological properties (equivalent diameter and sphericity) and the fraction of the four SEVMs simulations for the same pore defect that are correctly predicted by the GNN-based surrogate models, for the 62 pores in the testing dataset. a Reports the fraction of SEVMs where the fatigue hotspot predicted by crystal plasticity is located at the pore, as the ground-truth reference. b Reports the fraction of SEVMs correctly predicted by the regression-based approach, while c reports the same but for the predictions by the classification-based approach. The correctness of a prediction is evaluated independently on each SEVM, which is considered to be correctly predicted if the classification of the pore it contains as either critical or non-critical matches the results of crystal plasticity. The triangular markers refer to the pores that behave consistently across all four SEVMs, being either always critical or always non-critical. The node and edge features that resulted in the best GNN performance, identified through the feature engineering workflow described in the “Methods” section, provide valuable insights into which microstructural variables govern the grain-level distribution of each analyzed micromechanical field (σZZ,avg, σZZ,max, wP,avg, and wP,max). To quantify the contribution of each input feature to the GNN predictions, the Input × Gradient attribution method45–48 was employed. In this approach, each input feature is multiplied by the gradient of the model output with respect to that feature. Unlike sensitivity-based methods, which quantify how small perturbations affect the output, Input × Gradient is an attribution method that estimates the marginal contribution of each feature to the final prediction. Its simplicity and interpretability make it one of the most widely used explainability techniques in neural networks. The resulting feature importance values for all node and edge features are shown in Fig. 8. As evidenced by the absence of certain histogram bars in some feature bins, not all node features were used for all four prediction tasks. An overview of the selected features and the final GNN configurations for each prediction task, obtained from feature engineering and hyperparameter tuning, is provided in the Supplementary Information. The crystallographic orientation, represented via quaternions, is the dominant node feature across all targeted micromechanical fields. This is expected, as orientation strongly influences slip activation, stress redistribution, and the localization of plastic deformation, making it the main driver of grain-level micromechanical response. Geometrical descriptors of the grains and the pore, such as equivalent diameter, sphericity, and surface-to-volume ratio, also contribute, but to a smaller extent. These features also influence how likely a grain is to concentrate stress or localize plasticity, but their effects are secondary compared to crystallographic orientation. Among the edge features, the relative distance vector is the most important. This feature is defined as the three-component vector connecting the centroids of two neighboring grains or of a grain and the pore. In particular, the z-component of the distance vector plays an even higher role for three out of the four target quantities. Since the global loading is applied along the Z-direction, knowing the relative positioning of grains along this axis is crucial for capturing load redistribution paths that influence σZZ and wP. For instance, a grain at the equator of a pore feature (z value of the distance vector being near zero) would experience a larger stress concentration, compared to a grain directly above or below the pore feature (large magnitude of z), given the Z-direction loading path. The shared surface area between neighboring grains also contributes to the predictions, as larger interfaces increase the likelihood of stress concentration or localized plastic deformation across the boundary. It is interesting to note that crystallographic misorientation is part of the optimal edge feature set only for predicting σZZ,avg. While misorientation is physically important, governing compatibility of deformation and stress and plasticity localization, the information it carries is redundant with the crystallographic orientation node feature. Since the GNN already receives the orientation of each grain, it can internally infer misorientation without it being explicitly provided. However, when included, misorientation can provide an easier-to-learn correlation for specific predictions, as for σZZ,avg. Relative importance of node and edge features for the regression GNN models. Relative feature importance of a node features and b edge features. Histogram bars are colored based on the target micromechanical field (σZZ,avg, σZZ,max, wP,avg, and wP,max) they refer to. The absence of a bar for a specific micromechanical field indicates that that feature was excluded based on the results of feature engineering. The feature importance for the direct classification of critical pores using the classification GNN model tells a significantly different story compared to the regression models. The same procedure was employed to compute the feature importance, with the results shown in Fig. 9. Crystallographic orientation, the dominant node feature for all regression predictions, does not appear at all among the selected features for the classification task. As identified through feature engineering, this model does not benefit from grain-level orientation information, as the classification GNN outputs a single binary label for the entire SEVM (critical or non-critical pore), rather than grain-level micromechanical fields. Thus, crystallographic information at the grain level does not directly contribute to the global classification. Instead, the features most relevant for classifying critical pores are exclusively geometrical, both at the node and edge level. These features capture the configuration of grains surrounding the pore and the effect on their grain morphology by inserting the pore into the microstructure. Among the node features, volume change, concavity change, and compactness change apply only to grains in direct contact with the pore and quantify how their morphology is altered when the pore is inserted. In fact, as the pore is inserted at the center of the SEVMs, the grains that were previously occupying that region lose voxels, and their geometry is modified. This modification strongly affects local stress concentration and plasticity localization, thereby influencing the likelihood that fatigue crack initiation occurs at the pore. For the edge features, the distance vector and shared surface area have comparable importance. The shared surface area plays a more prominent role in the classification model compared to the regression models. This is the case as the area of contact between the pore and its neighbor grains affects the local micromechanical response, influencing the probability of having localization of stress and plasticity that ultimately determines whether the pore is critical. Relative importance of node and edge features for the classification GNN model. Relative feature importance of a node features and b edge features. The features identified by * are applicable only to the grains neighboring the pore and refer to the change in that property due to pore insertion. Based on the results presented in this work, several considerations can be made regarding the potential uses and implications of the GFF-MAP framework for microstructure-sensitive analyses and fatigue predictions. The evaluation of GNN performance for predicting micromechanical fields such as σZZ,avg, σZZ,max, wP,avg, and wP,max illustrates both the capabilities and the limitations of applying GNNs to micromechanical response problems. While σZZ,avg can be predicted with very high accuracy (e¯=4.1%,R2=0.909, and ρ = 0.951), the prediction of wP,max proves significantly more challenging (e¯=57.9%, R2 = 0.471, and ρ = 0.749)). The intermediate performance metrics for σZZ,max and wP,avg highlight how accuracy decreases when transitioning the prediction target from stress to a fatigue damage indicator parameter and from grain-average to grain-maximum quantities. These insights can help guide future GNN studies, where the reported model configurations, input features, and hyperparameters used for the different prediction tasks can inform the selection of optimal model architectures and strategies. Once trained, GNN models can generate grain-level distributions of stress and plasticity metrics across complex microstructures within seconds, which can be used to identify high-stress or highly-plasticized regions that are prone to crack initiation at a negligible computational cost. By contrast, crystal plasticity simulations, while providing more accurate results, are computationally intensive and require hours to days of runtime for a single microstructure, in addition to significant pre-processing and post-processing efforts. Additionally, fatigue analyses require a large number of simulations and sensitivity studies, further increasing the computational cost. As a direct metric of computational efficiency, simulating a single SEVM using crystal plasticity required approximately 6 hours, while evaluating the same microstructure with the trained GNN models took less than 1 minute. GNN surrogate models, therefore, offer a practical and scalable alternative for rapid assessment, complementing high-fidelity crystal plasticity when detailed analysis is required. The methodology presented for identifying pores that constitute the first site of crack initiation provides a path toward fast microstructure-sensitive assessment of the impact of pore defects arising from additive manufacturing on the fatigue behavior of materials. Even if predictions are not perfect, the workflow can serve as a fast scanning strategy to identify critical pores in additively manufactured components whose defects are characterized through non-destructive evaluation techniques, such as X-ray computed tomography. This enables the detection of pores that should be avoided for part acceptance or potentially mitigated via post-processing treatments. The inclusion of each pore in multiple SEVMs strengthens the predictive capability of this approach. As demonstrated in Fig. 7, pores that consistently behave as either critical or non-critical across all analyzed microstructures can be classified with high confidence. Conversely, pores whose behavior varies across different SEVMs present strong microstructural influence and therefore lower predictability. This highlights the value of analyzing each pore in multiple microstructures to obtain a robust and probabilistic assessment of the potential of a pore to be critical. Finally, the GFF-MAP framework can be extended to other grain-level descriptors relevant for mechanical behavior, potentially informing studies on deformation mechanisms, damage evolution, or other material responses beyond fatigue. The methodology can also be adapted to consider more complex pore configurations, such as pore ensembles or surface porosity, by appropriately modifying the graph construction and feature definitions. While the trained GNN models presented in this work are specific to the material system, microstructure, and Z-axis uniaxial loading at 0.4% strain considered here, the overall GFF-MAP workflow is intended to be transferable to other studies, including the graph-based representation of microstructural and pore information, the use of regression models to predict grain-level micromechanical fields, and the subsequent classification strategy to identify fatigue-critical pores. Application of the framework to different materials, loading directions, or strain amplitudes would require the generation of new crystal plasticity datasets, reconstruction of the graph representations, retraining, and potentially a reconfiguration of the GNN models. Extending the framework to additional material systems and loading scenarios would enable the development of a more robust pipeline able to support a wide range of applications. In conclusion, GNN surrogate models were developed within the GFF-MAP framework and trained with crystal plasticity data to predict the grain-level mechanical response of virtual AM IN718 samples with representative pores inserted at their center. This enabled a rapid assessment of the pore’s criticality for the fatigue performance of the material, leading to the following key findings. GNNs predict grain-average stress with high accuracy at a fraction of the computational cost of full crystal plasticity simulations. However, their predictive capability decreases progressively when transitioning from grain-average stress to grain-maximum stress, then to grain-average accumulated plastic strain energy density, wP,avg, and finally to grain-maximum accumulated plastic strain energy density, wP,max. Although predictions of wP,max at the grain level exhibit lower accuracy, the GNN remains effective at capturing the spatial localization of high wP,max values within the microstructure. This enables the identification of whether the highest wP,max occurs in a pore-adjacent grain, indicating that the pore is critical for fatigue performance. Critical pores are detected with high recall, despite a considerable number of misclassified non-critical pores, making this method suitable as a fast scanning tool for AM components to flag pores that are prone to affect fatigue performance. Using a GNN model to predict the spatial distribution of wP,max and then determine whether the fatigue hotspot lies at the pore outperforms a parallel strategy, in which a GNN is trained to directly classify pores as critical or non-critical without the intermediate wP,max prediction. For all micromechanical field predictions, the crystallographic orientation of each grain is the most informative feature and the main driver of grain-level micromechanical response, followed by the morphological properties of the grains and the pore. For the direct classification of critical pores, crystallographic orientation does not contribute to the output, as the prediction is a single label for the entire SEVM (the pore inserted in the SEVM is either critical or non-critical), rather than a micromechanical field value for each grain in the microstructure. Instead, morphological features of the grains and the pore, including geometrical changes caused by pore insertion, drive the classification prediction. Overall, this work extends GNN-based modeling of polycrystalline materials by targeting grain-level extreme responses using wP as a fatigue damage indicator parameter and explicitly including pore defect features in high-fidelity microstructures. While predictions of wP,max values are challenging, they provide meaningful assessments of pore criticality for fatigue crack initiation, offering a practical tool for rapid evaluation of AM components. This demonstrates the strong potential of the GFF-MAP framework and GNN surrogate models to capture complex material behavior relevant to fatigue and damage analysis. Methods In this section, a description of the methods employed to develop the GFF-MAP framework is provided, including (i) the generation of virtual microstructure models, (ii) the production of crystal plasticity data used to train the GNN surrogate models, (iii) the GNN surrogate models, encompassing feature engineering, model configuration, and hyperparameter tuning, and (iv) the metrics for performance evaluation. Virtual microstructure model generation Statistically equivalent virtual microstructures (SEVMs) were generated to replicate the morphological and crystallographic characteristics of AM IN718 grain structures. Based on the electron backscatter diffraction (EBSD) scans reported by Stopka et al.49, AM IN718 exhibits equiaxed grains and a random crystallographic texture. Therefore, SEVMs were generated in DREAM.3D50 using solely the log-normal grain size distribution derived from EBSD scans (50.5 ± 58.9 μm). Twin boundaries were omitted for simplicity in the present study. A sensitivity study was performed to identify the optimal SEVM size and voxel resolution, following the methodologies presented by Loiodice et al.51. This resulted in a cubic volume with 112 voxels per side and a voxel resolution of 3.516 μm/voxel, corresponding to approximately (394 μm)3 and including about 900 grains. These choices ensured high computational efficiency while preserving accurate macroscopic stress-strain response and micromechanical field redistribution around the pore. To analyze realistic pore morphologies, a set of 620 pores was sampled from a catalog of approximately 7000 pores extracted from three AM IN718 specimens scanned via X-ray computed tomography49,52. By varying the AM process parameters, two of the specimens were seeded with lack of fusion (LOF) defects, for a total of 2044 pores, while one was seeded with keyhole defects, for a total of 5689 pores. Although the samples were seeded with pores, the microstructure surrounding the pores and the strength properties of the material remained unperturbed49. Distributions of the equivalent diameter and sphericity for the complete catalog of pores are provided in the Supplementary Information. The selected 620 pores include both LOF and keyhole defects and the sampling aimed to (i) span a wide range of equivalent diameters (15-45 μm) and sphericities (0.325–0.650), enabling the analysis of different pore morphologies, and (ii) produce an approximately uniform distribution in both quantities to obtain a balanced dataset. The sampled pores were then partitioned into training, validation, and testing datasets, maintaining balanced distributions of equivalent diameters and sphericities in each subset. The distributions of equivalent diameters and sphericities for the 620 sampled pores, stratified by subset, are presented in the Supplementary Information. Pores were modeled as voxels with near-zero stiffness and were always positioned at the center of the SEVMs, ensuring that their micromechanical response was not influenced by free surfaces and thus representative of pores located in the bulk of AM components. For simplicity, surface pores were not considered in this study. Each pore was inserted in four distinct SEVMs to analyze how its behavior varies across different microstructures. Inserting each of the 620 pores in 4 SEVMs resulted in 2480 total SEVM-pore combinations, where all 2480 SEVMs were uniquely generated and mutually distinct. Under an 80-10-10 dataset split, 496 pores (representing 1984 simulations) were used for training, 62 pores (representing 248 simulations) for validation, and 62 pores (representing 248 simulations) for testing. Each pore was assigned exclusively to one of the training, validation, or testing datasets, such that all four SEVMs associated with a given pore were always included in the same split. This strategy reflects a realistic application scenario, in which a GNN is trained on pores extracted from training specimens and then employed to evaluate unseen pores appearing in subsequent components. Crystal plasticity modeling Crystal plasticity simulations were employed to compute the micromechanical fields used as training data for the GNN models. Given the large number of simulations required, the elasto-viscoplastic fast Fourier transform (EVP-FFT) solver for crystal plasticity presented by Lebensohn et al. 53, based on the approach outlined by Moulinec and Suquet 54, and with the parallel implementation introduced by Rovinelli et al.55, was employed due to its high computational efficiency. The reader is referred to the Supplementary Information for a detailed description of the crystal plasticity model employed for this study and its calibration against AM IN718 experimental data. Each SEVM was subjected to 12 loading cycles, sufficient for cyclic saturation of the micromechanical fields, with an applied uniaxial strain of 0.4% and R = 0, which is indicative of high-cycle fatigue loading. The EVP-FFT solver operates directly on voxelized three-dimensional microstructures and therefore does not require meshing. However, it enforces periodic boundary conditions on all external surfaces. To mitigate artifacts introduced by this assumption, the SEVMs were padded with eight layers of voxels representing a gas phase with near-zero stiffness along the X and Y directions, effectively modeling these as free surfaces. Padding with a gas phase was not applied along the Z direction, which is the loading axis and requires continuous load transfer. Instead, the grains at the top and bottom boundaries were extruded for eight voxels to ensure that inaccuracies did not propagate into the interior of the microstructure. These boundary grains were then excluded from all subsequent analyses. The choice of an 8-voxel padding thickness was supported by Rovinelli et al.56, who demonstrated that periodicity effects vanish in less than 10 voxels from the boundary of the microstructures. This selection was further validated through a dedicated sensitivity study discussed in detail in the Supplementary Information. Two micromechanical fields evaluated at the peak of the last applied loading cycle, specifically the stress along the loading direction, σZZ, and the accumulated plastic strain energy density, wP, were used for GNN training. The accumulated plastic strain energy density, wP, originally introduced by Bandyopadhyay et al.25 and extensively validated against direct experimental data 17,26,27, was used as a predictive metric for the onset of crack initiation. The increment in wP over the yth loading cycle is computed as in Eq. (1) and the total accumulated value over k cycles is given by Eq. (2), where Q is the number of modeled slip systems, τλ is the shear stress resolved onto the slip system λ, and γ˙λ is the shear strain rate resolved onto the slip system λ. The non-local averaging (NLA) technique presented by Prithivirajan and Sangid 57 was employed to mitigate spurious and noisy values in the micromechanical fields computed from the crystal plasticity simulations before using them as targets for the GNN models. Additional details on the NLA methodology are provided in the Supplementary Information. The size of the NLA domain influences the averaged field values and can therefore affect stress concentrations, plasticity localization, and the resulting fatigue hotspot location58. As a result, the NLA domain size is usually subject to sensitivity studies to ensure an appropriate balance between effective regularization and preservation of localized features relevant to fatigue analysis. Based on the sensitivity study conducted by Loiodice et al.59, an NLA domain size of 5x3x3 voxels was adopted in this work. The site of crack initiation, defined as the fatigue hotspot, was identified as the location with the highest non-local averaged wP value within the SEVM. wP can be employed to predict fatigue life5,60–62 as the number of loading cycles needed to reach a critical value, wcrP, calibrated against experimental data, but in the context of this study, wP is solely used to identify the fatigue hotspot location within the microstructure and whether this is immediately adjacent to a pore, in which case the pore is defined as critical. The evolution of the non-local averaged wP at the fatigue hotspot over the 12 applied loading cycles for one representative SEVM is provided in Supplementary Information, demonstrating cyclic saturation of the value well within the 12 cycles. Analysis of the crystal plasticity predictions reveals trends and correlations between the geometrical properties of the pores (equivalent diameter and sphericity) and the likelihood of the pore to act as a site of first crack initiation (Fig. 10). As previously stated, each of the 620 pores selected for analysis was inserted in four unique SEVMs to investigate whether the mechanical response of the same pore changes in different microstructures. The colormap in Fig. 10 represents the fraction of the four SEVMs in which the fatigue hotspot from the crystal plasticity simulations is immediately adjacent to the pore, i.e., such that the pore is defined as critical. From these results, several trends and correlations between pore geometry and the probability of being critical emerge. 88% of pores with an equivalent diameter below 25 μm are non-critical in all four SEVMs. These pores are unlikely to act as crack initiation sites regardless of the surrounding microstructure. For pores with an equivalent diameter above 25 μm, their behavior varies depending on the microstructure: they may be critical in some SEVMs and non-critical in others. This indicates a significant influence of the surrounding microstructure on crack initiation location. As the equivalent diameter increases and sphericity decreases, the percentage of SEVMs in which the pore is critical increases, with the bottom-right portion of the graph showing the highest prevalence of critical pores. Nonetheless, pores with similar equivalent diameters and sphericities can exhibit significantly different probabilities of being critical, as evident from the different colors of closely positioned pores. This highlights the limitations of using geometry alone to predict whether a pore is prone to cause crack initiation and justifies the use of crystal plasticity simulations for more accurate predictions, considering the effects of the microstructure. Relationship between pore morphological properties (equivalent diameter and sphericity) and the fraction of the four SEVMs simulations for the same pore defect, where the fatigue hotspot, predicted by crystal plasticity, is located immediately adjacent to the pore. Trends and correlations between pore geometry and the probability of being critical emerge, but it is evident that geometry alone is not sufficient to reliably predict whether a pore is prone to cause crack initiation, except in extreme cases. Graph neural network modeling Graph neural networks (GNNs) were selected as the surrogate model for this GFF-MAP framework study due to their ability to naturally model microstructures as graphs. In this formulation, each SEVM, including the pore, is discretized into nodes and edges, and the GNN learns to map this representation to the target quantities by comparing its predictions against crystal plasticity simulation data during training. Each SEVM containing a pore is converted into a graph, in which individual grains correspond to nodes, and edges represent their physical adjacency. Node features encode grain properties such as crystallographic orientation, size, and shape. The pore is also represented as a node with the same feature structure but identified by a binary flag, and the properties not applicable to the pore (e.g., crystallographic orientation) are set to zero. Edge features describe the interactions between neighboring grains, including relative position, shared surface area, and crystallographic misorientation. These features allow the GNN to incorporate local topology and geometric relationships during message passing. The GNN architecture consists of a sequence of graph convolution layers, where the features of each node are updated by aggregating information from its neighbors. The Gaussian Mixture Model Convolution operator (GMMConv) proposed by Monti et al.63 was implemented because of its ability to encode neighbor influence through Gaussian kernels applied to the edge features. In this formulation, the learned convolution weights depend directly on the edge attributes, enabling a better representation of microstructure-dependent interactions. Alternative operators such as GraphConv64, SAGEConv65, GATConv66, and NNConv67,68 were also evaluated, but GMMConv proved to be the most suitable for this application. In Eq. (3), xi′ denotes the updated feature vector of node i, computed by aggregating information from its neighboring nodes j∈N(i). xj is the feature vector of neighbor j,∣N(i)∣ is the number of neighbors of node i, and K is the number of Gaussian kernels used in the GMMConv layer. The learnable matrix Θk represents the convolution weight associated with the k-th Gaussian kernel, while wk(ei,j) is the kernel weight computed from the edge attribute vector eij connecting nodes i and j. Equation (4) defines the Gaussian kernel weights wk(ei,j), where μk and Σk are the learnable mean vector and covariance matrix of the k-th Gaussian component, respectively. This formulation enables the convolution operation to adaptively weight neighbor contributions based on microstructure-dependent edge features. Five GNN models were developed: four regression models for predicting distinct grain-level micromechanical fields, and one classification model for directly identifying whether a given pore is critical, i.e., whether it is the first site of crack initiation in the SEVM. In the regression models, the sequence of convolutional layers is followed by a linear layer applied node-wise to generate the predicted field for each grain. In contrast, the classification model applies an attentional aggregation layer after the convolutional layers to condense the information from all nodes into a single graph-level representation. This aggregation computes a weighted sum of node embeddings, where the weights are learned through an attention mechanism that assigns higher importance to nodes that are most relevant to the classification task69. A final linear layer maps this representation to a binary class label indicating whether the fatigue hotspot is at the pore. A systematic study was conducted to identify the optimal combination of node and edge features for each of the regression and classification models. This process was conducted using the Weights & Biases (wandb)70 experiment-tracking platform to ensure consistent and complete comparison across hundreds of model configurations. The candidate node features included descriptors of crystallographic orientation (Euler angles, quaternions, directional stiffness), grain/pore size (equivalent diameter, volume, number of voxels), and grain/pore morphology (sphericity, surface-to-volume). Additional features were considered to capture the local morphological changes induced by the insertion of a pore, such as the change in volume, compactness, and concavity of grains in the pore’s neighborhood. The explored edge features quantified the interactions between adjacent grains, including relative position (either Eulerian distance or the full distance vector), crystallographic misorientation, and shared surface area. Once the combination of node and edge features that resulted in the best performance was identified by evaluating the performance metrics described in the next section, a second systematic study focused on hyperparameter optimization. This process first determined the most suitable loss function, optimizer, and learning-rate scheduler. After fixing these choices, additional hyperparameters were explored, including the learning rate, batch size, number of hidden layers, dimensionality of hidden features, and dropout rate. It is worth noting that, due to the fundamentally different objectives and statistical distributions of the target variables across the five GNN models, different loss functions from PyTorch were employed. Mean squared error (MSE) loss was used for stress predictions, Smooth L1 loss was adopted for the prediction of wP, and focal loss was employed for the classification of critical pores. An overview of the selected feature sets and the optimal configurations and hyperparameters for each regression and classification task is provided in tabular form in the Supplementary Information. Performance evaluation The accuracy of the grain-level micromechanical predictions of the regression GNN model against the crystal plasticity ground truth data was quantified using the relative L2 error, e¯, the coefficient of determination, R2, and the Spearman rank correlation coefficient, ρ. While e¯ and R2 assess the magnitude of the prediction error and the variance captured by the predicted values, respectively, ρ evaluates the ability of the model to correctly reproduce the relative ordering of grains according to their micromechanical response. Here, yi denotes the ground truth value for grain i,y^i is the corresponding predicted value, n is the total number of grains, and y¯ is the mean of the ground truth values. The vector y collects all yi, while y^ collects all y^i. The l2-norm ∥ ⋅ ∥2 measures the Euclidean magnitude of a vector. In Eq. (7), di represents the difference between the ranks of yi and y^i, and n is the number of ranked grains. Accuracy, recall, precision, and the F1-score were instead employed to evaluate the accuracy of the classification task for identifying critical pores. Accuracy describes the overall fraction of correct predictions. Precision measures how many pores predicted as critical are truly critical. Recall quantifies how many of the truly critical pores were successfully identified by the model. The F1-score is the harmonic mean of precision and recall and provides a balanced measure of model performance. where TP are true positives, the number of pores correctly classified as critical, TN are true negatives, the number of pores correctly classified as non-critical, FP are false positives, the number of pores incorrectly classified as critical when they are non-critical, and FN are false negatives, the number of pores incorrectly classified as non-critical when they are actually critical. Supplementary information Supplementary Information Acknowledgements Funding for this work was provided by STTR N20A-T002 from NAVAIR (contract number N68335-22-C-0064) with MRL as prime. M.D. Sangid, L. Loiodice, and K.S. Stopka are grateful for additional support from the National Institute of Standards and Technology (NIST) under grant number 70NANB21HOO5 and the National Science Foundation (NSF) under grant number CDS&E 21-52938. G. Lin is grateful for additional support from the U.S. Department of Energy (DOE) Office of Science Advanced Scientific Computing Research program DE-SC0023161, DE-SC0024583, and the SciDAC LEADS Institute. Author contributions Luca Loiodice performed the crystal plasticity simulations, developed and optimized the GNN predictions, assessed the reliability of the GNN predictions, and wrote the first draft of the manuscript. Krzysztof S. Stopka analyzed the material characterization, set up the initial set of crystal plasticity simulations, and provided insights into the interpretability of the GNN predictions. Yixuan Sun provided suggestions for machine learning, including the use of a GNN, and developed the initial GNN architecture. Guang Lin provided helpful suggestions on machine learning, acquired funding support, and provided supervision. Michael D. Sangid initially conceived this project idea, acquired funding support, and provided supervision. All authors supported the editing of the manuscript. Data availability The characterization data analyzed during the current study are available in a public database from the authors, which is cited in Ref. [52]. The datasets generated during the current study are not publicly available, since this is the subject of another ongoing study by the authors, but are available from the corresponding author on reasonable request. Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Supplementary information The online version contains supplementary material available at 10.1038/s41524-026-02148-0. References Associated Data Supplementary Materials Supplementary Information Data Availability Statement The characterization data analyzed during the current study are available in a public database from the authors, which is cited in Ref. [52]. The datasets generated during the current study are not publicly available, since this is the subject of another ongoing study by the authors, but are available from the corresponding author on reasonable request.