Impact of surface and pore characteristics on fatigue life of laser powder bed fusion Ti–6Al–4V alloy described by neural network models

In this study, the effects of surface roughness and pore characteristics on fatigue lives of laser powder bed fusion (LPBF) Ti–6Al–4V parts were investigated. The 197 fatigue bars were printed using the same laser power but with varied scanning speeds. These actions led to variations in the geometries of microscale pores, and such variations were characterized using micro-computed tomography. To generate differences in surface roughness in fatigue bars, half of the samples were grit-blasted and the other half were machined. Fatigue behaviors were analyzed with respect to surface roughness and statistics of the pores. For the grit-blasted samples, the contour laser scan in the LPBF strategy led to a pore-depletion zone isolating surface and internal pores with different features. For the machined samples, where surface pores resemble internal pores, the fatigue life was highly correlated with the average pore size and projected pore area in the plane perpendicular to the stress direction. Finally, a machine learning model using a drop-out neural network (DONN) was employed to establish a link between surface and pore features to the fatigue data (logN), and good prediction accuracy was demonstrated. Besides predicting fatigue lives, the DONN can also estimate the prediction uncertainty.

www.nature.com/scientificreports/ of surface roughness on the fatigue life by comparing LPBF and electron beam melting (EBM) technologies. Vrancken et al. 13 have found that the transformation of martensitic microstructure and variations of mechanical properties of Ti64 depend on post heat treatment. The fundamental findings from these studies still remain to be translated to optimization strategies for the LPBF processes to achieve better material properties. It would be ideal to have the capability to control the LPBF-printed material properties by controlling machine process parameters in the printing process. However, with the diversity of LPBF machines and raw material powders available and the uncertainties related to the operating conditions (e.g., laser stability and powder contamination), it is virtually impossible to establish a universal correlation between process parameters and material properties. In addition, it is difficult to benchmark a process with respect to certain properties, such as fatigue tests, since the relevant tests require a large number of samples and are time-consuming. On the other hand, non-intrusive characterization of porous structures can be done in a much faster manner and consumes much less resources. If one can establish a robust correlation between the porosity of the LPBF-printed materials and their mechanical properties, it is then possible to use non-intrusive characterizations, such as a computer tomography (CT) scan, to evaluate if the part is acceptable. Such correlations have been studied in the literature using physics-based modeling techniques 9,14,15 . However, such models also demand high computational resources and their accuracy depends on input parameters (e.g., melt pool size, crystalline orientation), which usually require extensive experiments to determine. Moreover, the integration of pores into such simulations is not trivial as this is limited by the finite domain size the model can handle. It is thus desirable to have simple surrogate models to avoid the above-mentioned challenges, and data-driven models can be a potential solution.
To address some of the above-mentioned challenges, in this study, we investigated the effects of surface roughness and pore characteristics of LPBF-printed Ti64 parts on their fatigue lives and established data-driven surrogate models for their relationships as briefly outlined in Fig. 1. 197 fatigue bars were printed using a metal AM system (3D Systems ProX 320) with varying the laser scanning speed, which altered the local melting and fusion process of the powder and in turn led to variable porous structures. The pores were then characterized using micro-CT. To investigate the surface roughness effect, half of the samples were grit-blasted, and the other half were machine-finished, which are characterized using optical surface profilometry. The statistics of the micro-pore density, location, size and shape, as well as surface roughness were systematically analyzed. Selected samples were then mechanically tested for their fatigue properties. The correlations between surface and pore features and fatigue properties were analyzed. Finally, a machine learning model using a drop-out neural network (DONN) was trained to link the porosity and surface roughness to the fatigue data. Besides predicting fatigue life, the DONN also has the unique capability of estimating the prediction uncertainty. The evaluation of fatigue life given pore and surface input data only take a few seconds using this DONN model. Practically, such efficient surrogate models may serve to reduce the amount of physical testing needed for LPBF-generated components by informing the user if the property of a printed component is within acceptance limits.

Methods
Sample printing. As described above 197 fatigue bars (21.08 mm × 2.54 mm × 84.58 mm) compliant with ASTM test methods were printed using a ProX DMP 320 AM system. 72 samples were used for fatigue life tests, 12 samples were utilized for CT scans, and 113 samples were scarified for preliminary tests (e.g., repeatability, laser power, speed and hatch distance tests). Ti64 metal powder (3D Systems LaserForm Ti Gr23 (A) powder), which is of critical importance to a wide range of applications, like many aerospace and orthopedic components, was the material used. Different processing parameters including laser power, scanning speed, hatch distance and surface finish were varied so that the porous structures could be tuned in the preliminary porosity investigation (see Supplementary Material, Fig. S1). All parameters were varied by up to ± 20% of the machine recommended value. Optical micrographs of polished sample cross-sections were taken to examine the change in the  www.nature.com/scientificreports/ pore statistics. It was found that among all of the processing parameters that were varied, scanning speed had the greatest impact on pore density variation ( Fig. 2) 16,17 . This preliminary study helps us identify the most effective process parameter to tune the internal structures of the LPBF parts. Since the purpose of this study was to link porosity, instead of processing conditions, to fatigue life, scanning speed was selected as the independent variable to be systematically varied in the printing process since it offers a wide range of micro-pore variations. To this end, the laser scanning speed was varied from 750 to 2000 (mm/s) with a 250 increment, where the vendorrecommended speed was 1250 mm/s. The printed samples were then heat-treated to release residual stress 10,13 . The samples were enclosed in the vacuum chamber and the heat treatments were executed at 650 °C for 2 h. Then, the samples were divided into two groups, with one group machined (M) and the other as-built (AB) but grit-blasted. The abrasive grit blasting is a surface treatment process to remove the loose adhering powder. 120 grit aluminum oxide grains are accelerated through a blasting nozzle by means of compressed air. This yields different surface finishes and thus different surface roughness, another parameter that can potentially impact fatigue life besides internal micropore structures. We note that the machined samples were printed with a slightly larger thickness (0.5 mm) so that after machining, the dimension is the same as that of the grit-blasted sample. The printed samples were then machined into dog-bone geometry for fatigue failure testing.
The scan strategy in this experiment first used two contour scans offset from each other by 70 µm followed by the interior hatching scans 18 . The contour parameters were fixed for all samples produced. The rotation angle between layers was 245°. The surface roughness of the printed samples can potentially change due to the following three reasons. First, the melt pool changes depending on the laser speed, causing morphology changes 19 . The surface roughness reflects the rugged solidification of the melt pool as shown in Fig. 3. Secondly, the change in pore density and geometry is caused by the laser speed, as illustrated in Fig. 2. The change in porosity area ratio (PAR) by different laser speeds varies from 0.05% to 1.29%, and the relatively higher pore density can affect the surface roughness by showing open pores on the top of the printed surface 16,20 . Finally, the powder layer thickness can strongly impact the surface roughness that leads to unstable melt flow due to increased misalignment of the laser scanned tracks 16 . To avoid such variation, the thickness of the powder layer was fixed at 60 µm. These factors may impact the M or AB samples differently. Many researchers reported that surface roughness has a significant effect on fatigue crack initiation 7,8,12,21 . In addition, in terms of porosity, it is known that the location and size of pores greatly influence the mechanical properties of printed samples 9,[22][23][24] .
Technically, the raster hatch scanning method in LPBF will not make the inner and surface pore features different. In this study, we used two contour scans prior to the hatch scan to impose different heating histories of materials close to the border of the printed sample from that of the internal materials. In this way, the surface and internal pore features become different so that we have a way to study their impacts on fatigue life. Figure 4 shows the vertically built samples and the specific scanning path used. The two contour scans as shown in Fig. 4b were able to produce a depletion zone of pores so as to isolate the internal and surface pores (see Fig. S2).
Sample characterization. The printed samples were then shaped into fatigue bars (Fig. 5a,b) and subjected to various characterizations. Micro-CT (North Star Imaging X7000 system) was used to scan the internal www.nature.com/scientificreports/   www.nature.com/scientificreports/ pore features, and optical profilometry (Olympus LEXT OLS4100 confocal microscope) was used to characterize the surface roughness. Fractography using an optical microscope followed by scanning electron microscopy (SEM) was used to further understand the crack initiation of selected fatigue-tested samples.

Micro-CT.
A micro-CT machine (North Star Imaging X7000 system) was used to characterize the pore features non-destructively. The equipment is capable of detecting pores with voxel size above 14 µm. More accurate measurements are possible, but the higher nominal resolution is coupled with a longer scanning time and yields a larger amount of data. The pore size detection based on the current resolution would be 28-42 µm. The whole gauge region was scanned, and pore features were collected. The VGSTUDIO MAX 3.3 Cast & Mold Extended software recorded the total number of pores, and for each detected pore, the coordinate, diameter, compactness and sphericity were calculated. The statistics of these pore features were then analyzed and quantified, which were later used to analyze fatigue failure and as inputs for the DONN.
Surface profilometry. For each sample, an optical profilometer (Olympus LEXT OLS4100 confocal microscope) was used to measure the surface roughness. Samples with two different surface finish methods, AB and M samples, were characterized. For each roughness data point reported, it is calculated from 20 different line profiles with the error bar representing the standard deviation. Figure 6 shows the representative surface profiles. Surface roughness parameters including mean roughness (R a ), maximum peak-to-valley roughness (R t ), 10-point height roughness (R iso ) and average radius of curvature of the deepest valleys ( r ) were characterized from line scans along the raster scanning direction (Fig. 6b,c) 25 :  www.nature.com/scientificreports/ where y is the height of line profile, y max is the maximum peak, y min is the minimum valley and r i is the radius of the deepest valley.
Stress-controlled fatigue testing. The stress-controlled fatigue test per ASTM E466 was performed with an extensometer 26 . Stress-controlled fatigue is considered to be applicable in cases where the strains are predominately elastic. We monitored strain using an extensometer and observed very limited plasticity, even in the highest stress level tests. Thus, high-cycle fatigue (HCF) was characterized in terms of the stress range per ASTM E466-15 27 . The fatigue behaviors of the samples were measured using load-controlled axial fatigue testing at room temperature. Unidirectional stress (stress ratio = 0) tests were performed with the range from 414 to 1034 MPa. Trapezoidal loading waveform with a frequency of 15 cycles per minute (CPM) was used for the fatigue tests. The fatigue test at about maximum stress of 552 MPa that reached 10 6 cycles without failure was treated as runout. A complete fracture within the gauge section of the test sample was considered as a failure.

Fractography.
A fractography analysis was performed to characterize the fatigue failure. The fracture origins were visually examined by a low magnification of a stereo microscope (Meiji Techno) under white light illumination. The detailed evaluation was performed by a field emission SEM (Magellan 400, FEI). The entire fracture surfaces were examined in this evaluation and if the fracture origins were identified, the information of the origins such as pore locations and size were documented.

Dropout neural network (DONN)
. DONN 28 is a machine learning model that can be used as a surrogate model in regression tasks and at the same time capture model uncertainty. It has been proven to be equivalent to Bayesian neural network (BNN), which also produces model uncertainty besides predicting results, but DONN is much easier for implementation 28 . In addition, the main reason for choosing DONN over BNN is that the former is much less computationally expensive, especially as the data size scales up. Thus, the advantage of DONN will stand out more obviously when dealing with large amounts of information, which is expected to be the case as more data become available in the future. After training, evaluation using DONN only takes a few seconds. Figure 7 below shows both a standard neural network and a DONN. With dropout, binary variables for every input point and for every network unit in each layer (except the last one) are sampled, and each binary variable takes a value 1 or 0 with a predefined probability for each layer. A unit will be dropped (i.e., its value is set to zero) for a given input if its corresponding binary variable takes the value 0. We use the same values in the backward pass propagating the derivatives to the parameters. For example, if 40% binary variables take values 0 in the forward process, then 40% binary variables will take values 0 in the backward process so that only part of  www.nature.com/scientificreports/ the parameters will be updated in the backward process. When training a standard neural network with dropout techniques, it can be regarded as training an ensemble of neural networks at the same time. When the training is finished, we can perform stochastic forward passes through the network with dropout applied to obtain the prediction distribution, where the average prediction and standard deviation (uncertainty) can be calculated.

Results and discussion
Surface roughness. Figure 8 shows the surface roughness parameters as the laser speed increases. In the cases of AB samples, un-melted metal powders are attached to the surface parallel to the laser beam (see Fig. 3) 25 . These micro-sized powders tend to detach easily during the measurement of surface roughness. These features interfere with obtaining reliable measurement values. Thus, we examine the surface of the samples after the blasting process for the AB samples. As shown in Fig. 4b, the surface regions of all AB samples were built by the double contour scans with constant speed (3000 mm/s). Thus, the variations of the hatching speed do not affect the surface roughness. However, the internal porosity changes when the hatching speed changes. Thus, as shown in Fig. 8, there is no clear relationship between laser speed and roughness in the cases of AB samples. This is because the surface pores were controlled through the dual contour scans, and high laser speed of 3000 mm/s, which dramatically increases the porosity level (Fig. 2d), was excluded from our experiments. Qiu et al. also reported the uniform roughness of printed surfaces when the porosity level is relatively low 16 . Our surface inspection results of the blasted surfaces were consistent with their results at low porosity level.
The surface of each M sample was polished along the longitudinal axis (x-direction in Fig. S3) to have almost constant average surface roughness (R a = 0.4 ± 0.1 µm) so that the roughness effect on fatigue behavior can be restricted. However, the two groups, AB and M samples, have noticeably different surface conditions regardless of laser speed. We should note here that both groups have almost constant roughness parameter values, except one outlier at 1000 mm/s laser speed. The reason is as follows. Figure 8d represents the average radius of curvature at the deepest valleys. Thus, in the case of the AB samples which have relatively large R a values, the average radii of curvature are almost constant because the surfaces of the AB samples are uneven (i.e., deep valleys). Conversely, if the surface is flat, the radius of curvature at the deepest valleys we have designated will be very large and random. As a result, in the case of flat surfaces, it does not necessarily guarantee constant values of the www.nature.com/scientificreports/ radius of the curvature. Therefore, the values of M samples in Fig. 8d are relatively high and random, implying the feature of flat surfaces. In addition, in the case of R a , R t and R iso , the AB samples had much higher values than M samples, but the average radius of the curvatures at the lowest valleys showed the opposite trend. The reason is that a larger radius of curvature is calculated on a relatively slowly varying surface, where shallow micro-notches have larger radii of curvature. Consequently, when surface roughness indeed affects the initiation of the cracks during the fatigue tests, we should be able to see the distinguishable characteristics of both groups: having the same pore features but different surface conditions. Pore characteristics. In the case of the AB samples, the pores can be readily divided into two groups: internal and surface pores. The two groups are isolated by a depletion zone created by the contour scans (Fig. 4b), which re-melt the location to minimize pore formation. The destined hatch lines (Fig. 4b) are scanned by actually extending the hatch lines past where they are supposed to end, but turn off the laser at the end of each hatch line. In the same vein, when starting a new line scan, the actual starting point of the hatch scan is the outside of the part exposed with no power, but the laser turns on at the starting point of the destined hatch line. Thus, the contour 2 line gets melted twice; once by contour 2 and the other by hatch passes. Such re-melting should be the cause of the depletion zone. Figure 9 shows that the features of the surface and internal pores are distinguishable in terms of locations, shape and dimension. Usually, internal pores are formed due to the insoluble gas bubbles trapped during solidification, keyhole induced porosity and lack of fusion voids 15,[29][30][31] . The relation between the internal pore volume (measured in voxels) and diameter follows a power law of 2.1, while that of the surface pores is much smaller at 1.5 (Fig. 9b). This finding suggests that the surface pores are farther away from a spherical shape (i.e., more irregular) than the internal pores. This is also supported by Fig. 9c, which shows that the surface pores exhibit a different sphericity-compactness relation than internal pores. This is further supported by the much larger disparity in the projected areas on the XY-and YZ-planes of the surface pores than the internal pores. By carefully examining the CT scan, it is evident that the irregular shape is caused by the open pore structures exposed to the surface (Fig. 9e). In particular, among the many pore features, the projected pore area normal to the applied stress direction during the fatigue test is considered to be a key factor of crack initiation 9,32 . From that perspective, it is interesting the projected area of the surface pore on the XY-plane (parallel to the sample surface) is larger than the projected area on the YZ-plane (normal to applied stress direction) due to widely opened structures (Fig. 9d). www.nature.com/scientificreports/ As mentioned previously, the M samples were printed with a larger thickness in the z-direction (see Fig. S3) than AB samples, since the M samples are to be polished to the same dimension as the AB samples. About 200 µm in thickness was removed for planarization for these samples, meaning that the depletion zone was removed and internal pores exposed (representative micro-CT scanned M sample is shown in Fig. S3). The exposed surface pores by the polishing process were different from the surface pores of the AB samples. The features for the M samples are displayed in Fig. 10 and the surface pores for these samples are defined as those within ~ 80 μm from the sample's polished surface. Since the surface pores of the M samples can also be cut-off by the polishing process, they can show different features compared to the internal pores as shown in Fig. 10b-d, but the differences are much smaller than those in the AB samples (Fig. 9). In particular, Fig. 10b,d show that the volume and projected area are reduced by the cut-off effect, but Fig. 10c, which shows the same sphericity-compactness for the internal and surface pores, indicates they are of the same origin. Here, we note that the distribution of "cut-off surface pores" by polishing process (Fig. 13a) is different from "opened surface pores" as shown in Fig. 9d. We also note that the densities of the exposed pores are too small to influence surface roughness of the M samples, which is evident in Fig. 8. From Figs. 14 and 15 in "Correlation between CT data and fatigue life for M samples" and "Correlation between CT data and fatigue life for AB samples" sections of this manuscript, it can be seen that the average pore features are highly correlated for M samples while decoupled for AB samples. The detailed correlations will be discussed with fatigue behaviors in "Correlation between CT data and fatigue life for M samples" and "Correlation between CT data and fatigue life for AB samples" sections. Figure 11 shows the difference in fatigue life for the two groups of samples, AB and M samples, with varying printing speeds. Regardless of the laser speed, AB samples exhibit a relatively narrow distribution in the S-N (Wöhler) diagram (Fig. 11a), which is likely due to the large surface roughness (Fig. 8) 33 . The effect of the inner pore is comparatively small when the effect of surface roughness is dominant. On the other hand, the M samples, of which the surface roughness effect is expected to be small, show relatively wider distributions in the S-N plot (Fig. 11b) compared to the AB samples. This is because the internal pores are www.nature.com/scientificreports/ exposed to the surface during the polishing process, so the influence of the porosity effect or other parameters, especially that can be varied by the laser speed, on the fatigue life is more obvious than the AB samples. It is worth noting that the data of the M2000 sample (i.e., machined sample printed with a laser speed of 2000 mm/s) records the lowest fatigue life although these samples have significantly lower internal pore density than M750 or M1000 samples as shown in Table 1. Therefore, the most detrimental influence on the M samples is not the inner pore density, but according to Table 1, the pore size and the projected area of pores normal to the applied stress, which is consistent with findings from Ref. 9,32 . The detailed correlations will be discussed in "Correlation between CT data and fatigue life for M samples" section. Classically, the fatigue life prediction is based on the Basquin power law which is represented by the following equation 34,35 : where σ max is maximum stress, N is number of cycles to failure and c and m are the fitting parameters in the Basquin's model. However, often linear-logarithmic coordinate was adopted to describe the experimental S-N data 7,36-38 . The linear-log form in the finite life region is given by:

Fatigue test results.
where a and b are the fitting parameters of the linear-log form. The validity of this fatigue model was tested by taking into account the determination coefficient (R 2 ) of each fitting function. This validation is critical because proper data should be fed to the later machine learning for training. As shown in Fig. 11c, the linear-log model shows a high level of agreement (R 2 above 0.91) in the HCF regime selected at N < 10 5 . We note that the training data (partitioned by dotted lines in Fig. 11a,b) of the machine learning were selected at N < 10 5 since the M1500 sample includes the fatigue limit data. Therefore, the linear-log data was adopted in the preset work for fatigue analyses and the DONN model construction. The fitting lines in the log-log coordination were also presented in the Supplementary Information (Fig. S4, Table S1).  39 . The critical factors for the fracture phenomenon are associated with surface roughness 7,8 and porosity 9,39 . However, fracture is often a cross-correlated process, making it usually difficult to design a model that can draw simple and clear conclusions. Thus, we use SEM to identify some common features of the fractured surfaces. Since the AB samples, the surface roughness-dominant group, display a relatively narrow distribution in the S-N curve regardless of laser speed changes, we can speculate that cracks initiate from unfilled surface cavities 12 . Except for the AB0750 sample, the cracks of the other AB samples (Fig. 12b-d) all initiate from the surface, which is expected. One exception is the AB0750 sample (Fig. 12a), which is pore-rich, has the crack originated from a pore located just beneath the surface. It is necessary to focus on analyzing the crack initiation using the M samples, because the M samples are expected to be influenced by more convoluted pore features as the surface roughness is much smaller than the AB samples. For instance, crack initiation by fatigue test can be related to the properties of micro-pores in the fatigue bars such as the size, location, and shape 32 . Especially, it is generally true that an excessively porous fatigue bar must have many pores on the surface concentrating stress around them. These surface pores are more likely to be crack initiators. Therefore, finding the crack initiations after the fatigue failure in our study is a way to account for how closely the estimation of statistical data correlates with the actual results.
In the case of the M0750 sample, five identifiable fracture origins were found, and all of them were from pores. Four of them were surface pores like Fig. 13a and one of the crack origins was located on the subsurface (within ~ 100 µm from the surface). In the case of samples with a low porosity, crack initiated from the surface or a fine defect at the corner (Fig. 13b,c). For an M2000 sample, due to the fast scanning laser speed, relatively large pores were created and an irregular shape of the surface pore initiated a crack, which shows characteristics of lack-of-fusion (Fig. 13d) 20,40,41 .

Correlation between CT data and fatigue life for M samples.
According to other studies [6][7][8][9] , factors that can determine fatigue life include surface roughness and pore characteristics such as pore position, pore density and pore size. However, in our study, as mentioned in the Methods section, the M samples significantly reduced the surface roughness effect by the polishing process. Thus, it is necessary to take into account various parameters to examine fatigue life. For that reason, we conducted extensive statistical analysis of the CT data and fatigue data. Figure 14 shows the relationship among fatigue life, various pore parameters and laser speed for the M samples. As the laser speed increases, pore number density tends to drop sharply at low speeds, but slowly increases when the speed is higher than 1500 mm/s (Fig. 14b). On the other hand, the volume size of the pore (mean www.nature.com/scientificreports/ volume) also decreases first but increases rapidly after 1500 mm/s. The same trend can be seen in all other properties of the pores such as sum of voxels (i.e., total volume of pores, Fig. 14c) and projected area of pores (Fig. 14d). These suggest a transition from keyhole pores by locally excess power density due to long laser exposure time at low speed to lack-of-fusion pores due to insufficient heating/melting at high speed 41 . As can be seen from these analyses, it is important to note that for these pore features, the trends as a function of laser speed are the same for internal and surface pores, suggesting that they are of the same origin. In addition, what can be deduced from the results of the fatigue tests and the printing speed is that the optimal condition for the printing speed is 1500 mm/s, different from the printer vendor recommended 1250 mm/s. However, even if the surface roughness effect is excluded for these M samples, it is still ambiguous as to what factors have the most significant effect on fatigue life because many pore characteristics parameters are correlated. We again emphasize that the M samples have highly correlated internal pore and surface pore features. In other words, even if we distinguish between the surface pores and the internal pores, the trend of the surface pores is dependent on the internal pores (as shown in Fig. 14), because the internal pores are exposed to the surface during polishing. The AB sample analysis where the surface and internal pores are decoupled from each other will be covered in the next section. Pearson correlation coefficient (PCC) can present the quantified linear correlation between two variables. In Fig. 14e, the correlation coefficients for the M samples related to HCF cycles are displayed. For the log cycle to failure (logN) at the maximum stress 785 MPa, the average projected area of pores denoted as √ Area and the average size of pores, measured as mean volume, show the strong negative correlations (− 0.804 and − 0.849 for internal pores, respectively) with HCF (Fig. 14e). The same observations are made for the other two analyzed stress levels. Although the pore number density and the sum of pore volume inside the fatigue bar are related to mechanical strength (e.g., Young's modules and elongation) 42 , the most critical parameter for fatigue life turns out to be the size of the pore normal to the applied stress. As expected, the PCCs for internal and surface pore features shows similar trends as seen in Fig. 14e.

Correlation between CT data and fatigue life for AB samples. The AB samples in general show
comparatively shorter fatigue life than the M samples, which should be caused by different surface conditions between the two groups of samples (Fig. 8). Since the roughness of all AB samples is similar, the variation of the fatigue life is less affected by the laser speed compared to that observed in the M samples.
For the AB samples, the laser speeds of 1000 and 1250 mm/s generally lead to better fatigue lives regardless of the applied maximum stress (Fig. 15a)   www.nature.com/scientificreports/ per unit volume, likely due to keyhole formation 19,41 . At relatively high laser speeds, the pore density is small, but the size of the micro-pores increases, likely due to lack of fusion. As shown in the case of M samples, we see  www.nature.com/scientificreports/ that the optimized process condition to minimize internal pore density is established at 1500 mm/s from our observation, while the vender-recommended specification for the printing speed is 1250 mm/s. However, AB samples have unique properties in terms of surface pores. For example, the surface pores, defined as those within ~ 80 μm from the sample's physical surface, have almost constant number of pore density and size regardless of the laser speed because the processing parameters of contour scans are fixed for all samples (Fig. 15b). For the average projected pore areas on the YZ-plane, the surface pores have smaller values than the internal ones (Fig. 15d). The correlation strengths between the pore features and HCF differ for internal and surface pores depending on the specific features we analyze. The HCF is more correlated with the density and total pore volume of the surface pores than the internal pores as shown by the higher PCCs (Fig. 15e). For the mean volume and projected area, surface and internal pores exhibit similar strength of correlation with HCF. The behavior can also be slightly different for different stress levels. For HCF at 758 MPa, the three largest www.nature.com/scientificreports/ coefficients are strongly related to the surface pore information (i.e., the sum of surface pore volume: − 0.993, surface pore number density: − 0.987 and the mean surface pore volume: − 0.802). HCF at 552 MPa shows similar behavior, but behavior at 690 MPa is slightly different, likely due to the more irregular HCF data as shown in Fig. 15a. This observation implies that the management of the surface pores can have a larger impact on HCF than internal pores.
Drop-out neural network. We first quantify the relationships between the pore features and the log cycles to failure (logN) independently for the AB and M samples since they have very difference surface roughness. The descriptors used for M and AB samples are stress (σ), surface roughness (all four parameters: R a , R t , R iso , r ), pore density (ρ), diameter ( d ), compactness (η), sphericity (γ) and projected YZ area. Pore features for both internal and surface pores are included as independent descriptors. There are 41 HCF data points for the M samples and 35 for the AB samples, and we train the DONN using the leave-one-out cross-validation method (i.e., reserve one data for testing and use the rest data for training, which iterates through all the data) given the limited amount of data. The inputs and labels are all standardized before feeding into the DONN for training or validation. Figure 16a,b respectively shows the pair plots between predictions from the trained DONN and the experimental values for M and AB samples. It can be seen that the models can predict the logN given a set of surface and pore descriptors with good accuracy. The DONN-predicted average logN agree well with the experimentally measured logN, with PCC of 0.935 and 0.944 respectively for the M and AB samples. It is noted that when PCC = 1, there is a perfect correlation between the prediction and ground truth. In addition, the prediction uncertainties are also shown, as color-coded in Fig. 16. It is seen that all of the prediction uncertainties are below 0.35 for the M samples (Fig. 16a) and below 0.13 for the AB samples (Fig. 16b). Since the major difference between the AB and M samples are their surface features, we further trained a unified DONN using all data from both sets to predict logN of all samples. We then went through the same training process as the previous scenario and drew the pair plot between predictions and the experimental values in Fig. 16c. The high PCC value of 0.946 again indicates that the unified model still has good prediction capability, and the uncertainties are mostly below 0.2 with only one case of ~ 0.3. The reason of the high accuracy from DONN could be that the data collected from the experiment were of high quality, and the correlation between the pore features, surface roughness and fatigue life was well represented by the data collected, which was implied in Fig. 11. We have tested the DONN model with even less data points by randomly removing some from the database, but the DONN model still shows high predictive accuracy (see Fig. S5). It is possible that the model predictive capability may degrade if we are predicting pore features and surface roughness way out of the training www.nature.com/scientificreports/ range. However, the fact that DONN can be accurate and in the meantime estimate uncertainty suggests that such a model, with proper training against high-quality data, can be a useful tool for AM analyses.

Conclusion
In this work, we investigated the effects of surface roughness and pore characteristics on the stress-controlled fatigue lives of direct LPBF-printed Ti64 fatigue bars, and developed machine learning models to describe their correlations. The unique feature leveraged in this study, the depletion zone achieved through the contour laser scan, played an essential role in separating the effect of pores and surface roughness. The contour laser scans in the LPBF process make AB samples have similar surface roughness, but diverse internal pore features were achieved by varying the laser scanning speed during the hatch scans. According to the linear-log model, narrow distribution (R 2 = 0.924) for all AB samples was presented in the S-N plot. Therefore, this result suggests that the fatigue life of the AB samples is dominated by the microscale surface roughness (R a ~ 7.7 µm) regardless of the internal pore features. The M samples, which have internal pores exposed to the surface after machining, exhibit more scattered S-N plots among samples printed with different laser speeds. This result suggests that the fatigue life of the M samples is largely impacted by the pore features, which are influenced by the laser speed during the LPBF process. A machine learning model using DONN was established to predict the quantitative relationship between the surface roughness, pore features and the fatigue data. The DONN-predicted average fatigue life agreed well with the experimentally measured values, with Pearson Correlation Coefficients of 0.935 and 0.944, respectively, for the M and AB samples. DONN also has the unique capability of estimating the prediction uncertainty. The estimated prediction uncertainties were below 0.35 for the M samples and below 0.13 for the AB samples. Therefore, we expect that our data-driven surrogate model will contribute to advancing the LPBF process for industrial adoption by providing a fast evaluation of the acceptance of a printed part without the need for timeconsuming destructive tests.