Applications of artificial intelligence and machine learning in metal additive manufacturing

Artificial intelligence (AI) and additive manufacturing (AM) are both disruptive new technologies. AI has entered many aspects of our lives, but has not been fully realized in the world of AM. Because of the vast amount of data and the digital nature of the technology, AM offers tremendous opportunities in machine learning (ML) and consequently AI. This paper provides a vantage point view of the applications of ML and AI in AM, and specifically in powder bed AM technology. The types of data, sources of data, potential variabilities in experimental and simulation data, and the applicability of these data in ML algorithms are discussed. Several new ideas are presented where fusing these two transformative technologies can potentially have a profound impact on how AM is applied in different fields. A vision on the potential direction of AM to fully realize AI’s advantage is provided.


Introduction
The concept of artificial intelligence (AI) was coined by John McCarthy [1] signifying the intelligence demonstrated by machines. Before McCarthy, the British mathematician, computer scientist, and philosopher Alan Turing introduced the idea of intelligent machines. This started with the simple question of 'Can machines think?' [2] in which he articulated through an imitation game the logical way of analyzing the information piece by piece to make an intelligent decision. McCulloch and Pitts [3], before Turing, developed a foundation for neural network by drawing from basic physiology and functions of neurons, propositional logic developed by Russel and Whitehead in Principia Mathematica [4], and the computational theory of Turing. AI is categorized into two approaches; symbolic or traditional intelligence (which is solving problems through reasoning and knowledge) [5] and computational intelligence (which is solving problems and making decision based on example data) [6]. Computational AI encompasses artificial neural network, fuzzy systems, and evolutionary programing as defined by IEEE Computational Intelligence Society [7].
Both symbolic and computational intelligences can be acquired through different means like machine learning (ML) through both experiments and simulations. AI includes subfields such as automated reasoning [8] where computer programs are used to allow machines to completely or nearly completely reason and act. In many cases, the logic or reasonings made by the machine may have to be made under uncertain circumstances [9,10]. In these situations, making decisions is not a deterministic action, but rather a probabilistic action and thus complex fields of fuzzy logic [11]and Bayesian statistics [12] can be very helpful in understanding them.
The most common type of AI is the ability to mimic human behavior and the ability of the machine to continually improve upon its behavior. The task of learning and improving, seemingly simple for human beings, is a very complex cognitive phenomenon and involves millions of years of cognitive and physiological evolution. To realize general intelligence in machines, we need three main requirements: the ability to conduct complex computational tasks, memory, and data to learn from (figure 1) [13][14][15][16]. For a machine or  human to be able to learn, these three factors are paramount. Our brains satisfy the two factors of memory and computational capabilities. Both AI and human brain need data to process and learn.
We tend to believe that now we have achieved what is needed to develop these intelligent machines. Despite this belief, only weak AI has been achieved, (With the other types being: general or strong AI, and artificial superintelligence) [17]. We have computers with highly sophisticated and rapid computational capabilities. These computers are also able to save and memorize these computations and the results. For majority of applications, the third component-data-is abundantly available thanks to our advances in digitization, the internet, and media.
Since the initial inception of the idea of AI, tremendous progress has been made by mathematicians, philosophers, physiologists, neuroscientists, cognitive scientists, computer scientists, electrical engineers, and others. Each field has had its impact on the development of tools and techniques related to AI. Philosophers have made their impact by pointing out the similarities of the brain and a machine. Physiology, neuroscience, and cognitive sciences have helped with understanding how human brain functions and processes the information. Computer science has been the foundation for the development of mathematical programs, logic, and rational reasoning algorithms to implement these ideas.
In today's world we often encounter terms such as 'data science' , AI, and ML. It is important to distinguish the differences between these terms. Data science is a very broad and interdisciplinary field where scientific methods, processes and algorithms are used to extract knowledge from many data [18]. It is use is not limited to AI. As seen in figure 2, although AI relies on use of data science, it is not the only application of data science. Development of data analysis techniques is the basis for development of AI. Figure 2 also shows ML as sub domain of AI. To develop AI, machines need to learn and thus ML is indicated as a subdomain of AI and as shown is categorized as supervised, unsupervised, and reinforced learnings [19][20][21]. Learning algorithms are numerous. Most common deep learning algorithms are shown in deep learning subdomain. Depending on the type of data used (labeled historical data vs. unlabeled and open domain data) ML can be categorized as supervised vs. unsupervised learning. In supervised learning historical and labeled data is used to teach the models to fit to new measurements or input [22]. Classification of labeled data and predicting trends using previously labeled data is used to determine the model output. In unsupervised ML, data clustering is used to find patterns and groupings [23]. Reinforced learning is a method of using a combination of supervised and unsupervised learning [24]. The main technique used in ML is the Neural Network. Many different approaches have been developed for NN as seen in figure 2.
AI has advanced in a variety of applications including speech recognition, driverless and autonomous vehicles, robotics, game development and playing, computer graphics, computer hacking and spam fighting. Manufacturing is one of the areas that will be impacted immensely by the advances made in AI. In fact, after banking, financial, and insurance services, manufacturing is the largest spending category for AI as per data provided by [25] seen in figure 3.
Application of AI in manufacturing requires implementation of smart manufacturing where sensors can provide in situ information. Smart manufacturing is not new concepts in manufacturing. Digital Twin is one way of utilizing smart manufacturing in a two-way method to improve systems outcome and predictability between real world system and its digital counterpart. The concept of digital twin which has been widely used in industry refers to representing a d physical system using digital data. The system can be a process, a machine, a part or a combination of all. A digital twin reflects a bi-directional dynamic mapping process and provides a complete digital footprint of products [26,27]. Development of applications of digital twin in additive manufacturing (AM) started immediately after the inception of the concept by numerous activities on process modeling [26,[28][29][30]. Knapp et al defined Key building blocks of a computationally efficient first-generation digital twin of laser-based directed energy deposition AM as a transient, three-dimensional model that calculates temperature and velocity fields, cooling rates, solidification parameters and deposit geometry [30]. Integration of cyber-physical systems and digital twin has paved the way to develop the ML and AI algorithms.
AM is a digital technology that can significantly benefit from the new advancements in data science, ML and AI [31]. Given that all steps in AM process are done digitally, data collection and organization on the process itself is facilitated. On the other hand, AM is a highly automated process during the design, process preparation and printing stage. This produces numerous system data that are difficult to visualize and interpret by human [32]. This is exacerbated by the enclosed environment which creates obstacles in observation and monitoring of the process. Furthermore, the speed of the process makes it challenging to monitor it. ML could come into play for data visualization, image recognition and system modelling to better understand this process. Moreover, the preparation and post-processing stages involve many labor-intensive processes which can be assisted by process automation with intelligent analysis algorithms for planning and decision making [32].
For example, ML and AI can be used to optimize process quality and reduce defect density. Improving the feedback control to enhance the process quality is an area that has been heavily investigated. More examples on process quality are provided later in the paper. Additionally, AI can be used by combining the design and process together through what is so called concurrent design. In this process, the information acquired during the build is used to improve the design adaptively and continuously. Design improvements can have multiple objectives including reducing the residual stress during the build process, reducing the weight, and improving the strength in certain areas where the defects have developed. There is much room to create and innovate in this space. Due to nature of AM where digitization and computer models play such an important role, application of AI becomes very relevant. This manuscript focuses on application of AI in powder bed processes for metals.

Powder bed processes
Powder bed AM technologies refers to a category of AM technologies in which a laser or electron beam is used to melt the powder layer by layer and form a shape according to a computer aided design (CAD) model. Powder bed processes have been around for a few decades. The idea of powder bed processes using laser sintering was incepted by Dr Carl Deckard and academic adviser Dr Joe Beaman at the University of Texas at Austin in the mid-1980s [33]. Since then, there has been tremendous advancements made in this technology. With advancements made in laser technology, enabling higher laser powers, melting became possible and selective melting process (SLM) was borne. European innovators continued by using electron beam instead of laser for melting [34,35]. The process starts with a CAD model that is fed to a software at the interface of the machine. This interface software then layers the design and creates support structures. During the process, typically powder is spread on top of the build plate using a rack and sometimes is packed with a roller. At the next step, a laser or electron beam pre-heats and melts the powder. There are several intermediary steps that have been developed to enhance the process. For example, in electron beam machines, a preheating of the base plate occurs that tends to reduce the stresses developed in the part.
Ideally, AM generates a part that requires a minimum amount of post processing. However, often several post process steps are necessary to prepare the part for the final application. An example of these post process steps includes removal of the part from base plate, removal of the support structures, and sometimes polishing and heat treating to reduce the residual stresses in the parts.

AL and ML application in AM
For the purpose of the application of AI in AM-given the complex nature of the process-it is beneficial to break down the applications into pre-process, process and post process as seen in the figure 4 . In the pre-process, ML can be used in design space (geometrical design, topology optimization, raw materials design and in powder properties). In the area of raw materials design, recent advancement of ML allows for prediction of materials properties [36,37]. It also facilitates designing new novel materials [38,39] and can utilize AM's unique manufacturing abilities to materialize the designs that were not feasible to [40][41][42][43] Application of ML in the other two areas identified in the pre-process level, namely design space (geometrical design and topology optimization) and powder properties are very limited so far with powder properties being least explored. Next section provides more details of each category.
In the process itself, applications of ML is categorized for simplicity to experimental work on process monitoring and optimization and simulation work done on the same area. Experimental process monitoring and optimization is one of the areas that have been subject of research in large degrees. This area is elaborated in detail in section 2.2. Application of ML in post process data analysis is relatively new. Most of the research has been focusing on relating the post process data back to the process itself. Limited studies are conducted in that area. Therefore, a brief review of the application of AI and ML in post process is provided in section 2.3.

AI application in pre-process
At the pre-process step, ML has already penetrated the materials and design space. For the sake of simplicity, the materials design category is included in the materials space. In the materials domain, the majority of these advances are made possible through the Materials Genome Initiative by the US government [44]. MGI is the driving force behind computational materials science for the design and manufacturing of new materials with new and different properties. ML has been instrumental in advances made in this space [45]. MGI is applied to a wide range of materials including metals and alloys commonly used in AM processes. A comprehensive review of ML in materials is provided in [20]. Materials data is extensively available through databases [20,46]. In the design space which includes digital design, CAD and other relevant fields ML can potentially reform two major aspects: (a) user interaction with the machine, (b) design software improvements and integration with process characteristics. AM is envisioned to be an easy method used by any users of age and experience level-from K-12 students [47,48] to commodity engineers. For AM to be truly integrated with daily and social activities, users must be able to easily interact with the machines. ML and AI can change the interaction between humans and machines through application of AI in image and voice recognition. The ability to interact with machines through a verbal connection rather than technical programmatic steps can facilitate easier human interactions with machine and broaden the applications of AI in commodity items or medical applications. In many cases, 3D scanning is used to generate a 3D model of the parts. AI applications in image recognition can improve the 3D scanning process that is often used to create a 3D model of the parts [49]. AI can also be useful when internet databases are used to pull CAD models by users. AI facilitates utilizing the internet of things and digital space in harnessing available designs (STL and other CAD files).
On design software improvement and integration with the process design, software can be modified to take advantage of the AM process ability in microstructural design and bottom-up process. For example, an informed design process where the capabilities of AM in creating tailored and directional properties can be utilized could potentially transform the design optimization space and provide avenues in creating programs and software for design optimization. More recent advances in concurrent design where the design is adaptively modified during the build process so that negative aspects, such as residual stresses or defects can be repaired or reduced. This requires great understanding of how design parameters impact the residual stresses and defects. Additionally, an in-situ process monitoring feedback loop is required to inform the design process.

AI application in process
Like other applications, AI can only be applied to AM process if the ML programs have been developed and the data is available for learning. In-situ monitoring and process learning in AM has started relatively recently. Today we have companies and equipment that provide some in situ monitoring data during the process. On the research front, ML has been used in several different facets of process optimization, manipulation, and tailoring. Of interest are defect density, local defects, internal stresses developed during the process, design and dimensional accuracy, microstructural variabilities, and others. Controlling any of these parameters is a challenging task as the number of variables that impact them are immense. Not only do the controllable process parameters impact the outcome, other factors such as geometry, type of materials, type of design, form of the parts and environmental factors also impact the outcome. Only certain variables can be controlled while other variables typically act as noise or additional parameters of which their impact can only be learned over time. There is extensive data in literature on impact of each of these variables and ML can play an important role in determining the outcome as input controllable variable and noncontrollable variables effects are learned e.g. [50][51][52][53][54][55][56][57].
All algorithms including supervised, unsupervised and reinforced algorithms have been used in AM [58][59][60][61][62]. Unsupervised and reinforced algorithms can learn locally from the process and develop patterns and models and vary the parameters within the same build to reduce errors, minimize defects or tailor microstructure. In that case, local monitoring, local processing of data, analysis of results and local control feedback is essential. This requires extensive data collections, rapid analysis and processing of data and large storage space. Furthermore, statistical analysis may be required in cases where deterministic approaches are not adequate to make a local decision. Although challenging due to the need for high-speed data collection and analysis, this may be the preferred way of process optimization, mainly because using local data collection, analysis, and correction one can avoid variabilities from machine to machine and test to test. Regardless, some parameters such as spatial distribution of powder is not reproducible. Quantification of these variables because of their random nature may be very challenging. It also allows development of processes for uncharted waters such as new materials or new processes.
Using supervised learning, historical and labeled data can also be utilized to optimize processes and tailor the process. However, in this domain, the question of types of data, data categorization and standardization, data storage and sharing are the topics that are still greatly controversial or partially resolved. The machine manufacturers typically have immense databases that can help with this mission. However, the proprietary nature of the data does not allow widespread and broad sharing with the research community. Additional obstacles include the variability that follow the data. This introduces lack of reliability and accuracy in data which makes it challenging to replicate or use for process learning for a wide range of machines and materials.
The body of literature on in situ monitoring of AM has grown tremendously over the last decade. This is because AM process is a dynamic process with potential to improve during build. In situ monitoring can potentially provide information in two manners. The information can be used as basis to gradually improve the process in multiple runs. Ultimately, it can also be used to improve the process within one run if the information can be processed and feedback can be provided rapidly to the process. Majority of in situ monitoring research is conducted with the goal of improving the quality of parts made using additive. Multiple review articles in recent years have summarized this extensive literature [63][64][65] including a report published by National Institute of Standards and Technology on Measurement Science Needs for Real-time Control of Additive Manufacturing Powder Bed Fusion Processes [66].
Process improvement are of concern specifically for aerospace application where quality of end parts become critical. The main concern being currently addressed with in situ improvements are discontinuities occurring during the process. Surface roughness and final mechanical qualities are also of concern. Because of the complexity of AM process, especially in powder bed fusing process more than 50 parameters were found to impact the outcome [67]. Several studies were conducted to optimize the process experimentally. Attempts made to generalize this optimization using a comprehensive approach [67]. However, there is great variability between machines and users [68]. Additionally, this process must be repeated for each new material. This makes it very challenging to extrapolate findings of each optimization study broadly to other users and machines. Because of the number of parameters that impact the process, and variabilities that exist, scientists need to develop in situ monitoring systems that work with ML algorithms to learn and improve each process locally. This is important from the standardization aspects. Materials made for different industrial sectors must be able to pass the standards for use in those applications. For example, the quality standards for aerospace applications is quite stringent. In powder bed processes, a large number of efforts have focused on in situ measurement of temperature using different technologies [69]. Most of the techniques used thus far have relied on thermal or optical imaging. Perhaps the most advanced method used is ultra-fast synchrotron x-ray imaging, which can provide information on the process on the surface and in the depth [70]. Some studies focused on measurements of surface quality or dimensions. For the sake of simplicity in this manuscript, the areas that have been investigated are categorized as follows and a more elaborate discussion are provided in each specific area: • Defect detection and correction.
• Reducing residual stresses and failure during and after build.
• In situ metrology and design accuracy.
• Alloy design and optimization.

Defects detection and reduction
This is an area that majority of the research has been focused on. One of the most important factors in AM manufacturing of parts is defects. For some critical applications such as aerospace applications where these defects can cause premature or fatigue failure and could cause catastrophic damage, it is imperative that these defects are avoided [71,72]. The bottom-up nature of AM which is a huge advantage over traditional manufacturing techniques, provides the opportunity to detect and avoid defects on the flight and during build. One of the factors that has been of interest for the past decade is the melt pool temperature which in turn has been connected to the defect generation during the process. From very early on when AM became center of attention, measuring temperature was one of the goals of manufacturers and researchers alike. In that direction, with investment from the US government, several companies have now developed analytical tools such as IR cameras that can be used in situ to measure melt pool temperature. However, temperature data is not directly defect data. Melt pool temperature should then be correlate to defects through process learning.
As an example, image processing technologies have been used to identify defects in an ongoing process [59,62]. Gobert et al used layer wise images taken during the process in conjunction with linear support vector analysis using binary classifiers to assign certain characteristics to pixels (flaw vs nominal formation). After build CT scan imaging was used to relate the flaws locations and coordinates to the images taken during the process. Several challenges with this method are translation and correlation of the exact coordinates of flaws located in images taken in situ to after build CT Scan images. This could be potentially erroneous due to the expansion of the part and the residual stresses that may be lessened after part removal from the process. Caggiano et al did not use a binary classifier in learning from the process [59]. Instead, their group used a bi-stream deep convolutional neural network (DCNN) to extract the embedded patterns that are most relevant to the process conditions. This process involves taking images after powder spread and after SLM of the layer. Using bi-stream DCNN they propose to be able to consider the impact of surface irregularities in the powder spread of the consequent step. Their method shows 99.4% accuracy in ability to detect defective condition.
As opposed to these two approaches that rely on taking optical images of the surface, several other researchers relied on measuring the dimensions of the melt pool and taking infrared images of the temperature distribution. Typically an infrared imaging technology in conjunction with ML algorithms such as decision tree (DT), K-nearest neighbor (KNN), support vector machine (SVM), linear discriminant analysis (LDA), quadratic discriminant analysis [61] are used to determine the melt pool dimensions and consequently the porosity in parts made using powder bed technology. They characterized the melt pool using a pyrometer and used an x-ray tomography after the build to determine defects and accordingly label the images of melt pool as defective or non-defective In their study they conducted a comparison between different algorithms and found out that KNN method has the best accuracy in classifying the melt pools defect or non-defect. Conversely, DT provides the best prediction in incorrectly identifying the normal melt pool as defect.
In addition to temperature data, researchers have tried to use plume and splatter characteristics to learn the relationship between the process parameters and final melt pool geometry and defects. In this case, a Deep Belief Network learning method is used to characterize the melt pool using plume and splatter signature [73] in conjunction with near infrared imaging. Their method proved efficient in determining five different states of melting for 83% of the time.
Temperature or visual inspection are not the only methods used for detecting defects in AM process. Research is currently underway for using acoustic emission in conjunction with convolutional neural network analysis to determine the quality of parts including sublayer pores and defects [74]. They created different machine setting to generate different pore density and collected the acoustic emission from the process. The collected data was categorized into training set and testing. The acoustic signal is then broken down into pockets and transformed into an image consisting of different color ranges of stored energy. These images are then used to characterize the process and train the algorithms. After training algorithms, these images were used to test the quality of built by classification to three different categories of poor, medium and good. Classification accuracies were found to be 83%, 85% and 89% for high, medium, and poor quality respectively.
As seen, there is large number of variabilities on how defects are detected. In some case direct measurements are used such as acoustic emission, while in other cases indirect measurements such as temperature are used to infer information about the process. Direct quantification of defects clearly has an advantage in that it reduces errors associated with processing and interpretation of data. Different algorithms offer different advantages. Some offer more accuracy, while others offer speed and need for less memory. Factors such as size of training data, interpretability of the models (restrictive vs flexible), training time, prediction time, linearity, data format, number of features and memory requirement. Selecting the right algorithm and method is essential in developing a successful ML algorithm [75,76]. As an example, algorithms like SVM, linear regression, logistic regression, and a few types of neural networks can make quick predictions. However, algorithms like KNN and ensemble models often require more time to make their predictions [76].

Reducing stress residuals and failure during and after build
In terms of physical defects such as voids, cracks or un-melted powder, imaging and acoustic techniques are found reliable techniques [77,78]. However, stresses and strains developed in the material during build are typically not visible during visual inspection. Measuring stresses and strains in parts even in a normal condition outside the melt pool is a challenging task. Stresses are not measurable directly. Only strains, as a second effect of stresses, are measurable. In AM processes not only do the high temperature environment pose difficulty, the speed of the process, vibrations during build and other variables make it extremely difficult to use traditional strain measurement techniques. Most strain measurement techniques are contact measurements such as using traditional strain gauges or extensometers, meaning the measurement tool must be put in contact with the part to be able to measure the strain. Non-contact techniques such as Moiré interferometry [79], digital image correlation [80,81], laser measurements [82], x-ray diffraction [83], convergent electron beam diffraction [84] and neutron diffraction residual stress measurement technique that is used to measure lattice distance in strained materials [57] have been utilized in traditional applications, but are yet to be applied to AM application. These techniques are typically very sensitive to environmental parameters such as temperature, vibration, and others. At this point in time, no strain measurement techniques have been yet utilized or adapted to be used in situ within the build chamber. Of the techniques mentioned above, perhaps x-ray diffraction and e-beam diffraction, have the most potential to be used in laser powder bed and e-beam powder bed methods respectively, where naturally laser and e-beam are used to melt the material.
Given the challenges and lack of experimental data in stress and strain measurements during the process of AM, most likely method to achieve efficient and accurate ML and improve process proves to be through simulation and modeling and/or obtaining historical data from after processes. Simulation is proved to be an effective tool in situations where experiments are not feasible. Well-established high-fidelity physics-based simulations can help us understand impact of process parameters on solid formation, residual stresses and deformation in parts. This knowledge can certainly be used to tweak or inform the ML algorithms. The effect can be confirmed by correlating the simulation predictions on stress or deformation with experimental results. A continuous improvement in learning process through a joint computational and experimental approach can be used to teach the algorithms in an efficient manner.
Our simulation domain has improved significantly over the last decade and we are now able to conduct multi-physics and multi-scale modeling of the processes [85]. Ability to model intrinsic elastic and plastic behavior of material at different temperatures and integration of that with multi-scale metallurgical and phase deformation models can give us valuable information that can be used to avoid or reduce excessive need for experimentation. Simulation assisted ML which focuses on reducing the need for experimental data and utilizing simulation to train ML algorithms is a new field that has been given extensive attention in several fields including biomedical, gaming and manufacturing applications [86][87][88][89].
Combination of ML and simulations have been used in two different scenarios. In the first scenario, simulation is integrated into ML as additional resource for training (Rueden et al 2020). Usually, the motivation is augmentation of data in scenarios that are not sufficiently represented in available data. The second scenario is the opposite in which ML is used in simulations. This is typically done for saving computational resources, such cases where a simpler surrogate model can be used as an approximation to replace the full simulation Rueden et al 2020. For the latter scenario in manufacturing [90], used a surrogate model to represent the weld behavior. Their study was focused on predicting the weld distortion in pipe girth weld. A surrogate simple model was developed to avoid running a full simulation model for the 46 080 number of possibilities for weld orientation. The data from surrogate model was used in conjunction with full simulation to determine factors impacting the weld distortion.

In situ metrology and design accuracy
Dimensional accuracy is another parameter that is important in a variety of applications. Many different factors affect the dimensional accuracy. These include the initial geometry and design, type of material and its thermo-physical behavior in a heated environment, build parameters such as laser or e-beam spot size, the powder size, hatch spacing and layer thickness. Understanding the combinatorial effect of all these factors can help with making more accurate parts. Knowing how different the final part is from the initial design, can also help designers adjust their initial design dimensions to come out with the accurate final part. All of these can be learned from a process where analytical tools and devices inside the chamber can accurately measure the dimensions of the part as it is being built. Having that information on the fly, ML algorithms can help compare the build on the flight with the design specs and provide quick feedback to the process so that process can be adjusted accordingly. Given the spatial and temporal scales of the powder bed process, having a rapid inspection method is a necessity. Each layer is built in matters of micro-seconds, during which the dimensions are changing. Many steps are taken within that time including spreading of the powder, preheat and melting of a whole layer. Additionally, local inspection of melt pool may not be adequate to convey information on overall part design and geometry. Therefore, a full field view and inspection is necessary. To obtain information in out of plane dimension, measurement of depths is essential. Therefore, 3D information is necessary. Metrology inspection tools should have (a) full large field of view, (b) high speed, (c) high accuracy [91]. This is the requirement for any inspection tool for in situ monitoring of powder bed AM parts.
Studies that focus on in situ metrology of powder bed processes are limited in several different aspects. In a limited review published in 2016 [63] and a new study conducted recently [92] authors listed some of the methods that are being explored. The methods provided in these reviews were mostly limited to optical imaging or thermal measurements [92]. Optical imaging typically relies on two-dimensional image of the surface. Methods that rely on 2D imaging of the surface usually lack the depth information. Furthermore, in most cases, imaging of the whole layer is impractical because of necessary size of the camera detection area and image sizes [93]. To overcome the depth issue, Land II et al [94] used a traditional machine vision linear approximation to measure the planar dimensions of each build layer, and a phase shifting fringe projection system to produce an area height profile of each layer. In phase shifting fringe protection system, the measurement of the area height profile is carried out via the projection of light with sinusoidally varying spatial intensity and a traditional phase shifting algorithm. Further analysis of this technique showed promise in detecting powder texture, fused region height variation, characteristic length scales on the surface, and average height drop of the fused regions [95]. However, the method also poses some limitations including the need for trial and error for optimization of the projector brightness and camera exposure. Additional complexities arise when dealing with hybrid material surfaces [95].
Other techniques such as Optical Coherence Tomography are proposed to measure the surface curvature and porosity. However, this technique is not used to conduct in situ metrology of the parts [96]. Other auxiliary techniques such as enhanced phase measuring profilometry was proposed and used along with 3D surface imaging to detect geometrical signatures in powder bed processes [97]. Even though, successfully used to measure the surface topography of the fusion area 'rapidly and reliably' , this method does not provide depth information for the build. Finally, most recently a method of Fringe Projection Profilometry is used for in situ 3D inspection of powder bed parts [91]. This method uses a charge-coupled device camera and a digital light processing projector. It relies on perturbation of the fringe pattern generated by the projector and captured by the camera. Perturbation and phase information are then used to capture 3D shape information.
Further enhancements in image processing and MLs have enabled researchers to optimize the use of optical images in determining the geometrical defects and out of control deviation from the nominal geometry [98]. This method used image segmentation to compare with the original design and develop a deviation map. Although this method is suitable to detect geometrical distortions that affect the currently monitored layer, it is not suitable to detect deviations originating after the production of the monitored layer. Additionally, if the severity of distortions is small compared to the camera resolution and uncertainty, naturally, this method cannot detect them. Advances made in laser physics have also been utilized to determine the surface and subsurface geometrical attributes such as melt pool depth [99]. This method [99] correlates the characteristic oscillation frequency of the surface ripples of the melt pool to laser penetration depth and corresponding melt pool depth. Results show that oscillation frequencies range from 3 to 5.5 kHz. Molten pool penetration depth and cross-sectional area could be correlated with the oscillation frequencies and for two metals tested in this study higher oscillation frequencies corresponded to a shallower molten pool and a smaller mass of molten material [99].

Microstructural design
If no deliberate control of parameters are designed to change the microstructure of the parts made using powder bed additive processes, a columnar microstructure is typically the results of the build [100,101]. This columnar structure forms along the build orientation due to re-melting and solidification of multiple layers and the epitaxial growth mechanisms occurring. However, due to the bottom-up nature of the process and the possibility of controlling the temperature and thermal gradients within the build that dictates how grains grow and in what orientation, the prospect of controlling the grain growth and orientation is considered one of the important aspects of the AM powder bed process. Studies were conducted to deliberately change that microstructure to a more equiaxed type by controlling the thermal gradient to solidification rate ratio through process control [102]. Formation of certain phases controlled through additive process is also another unique aspect that was recently explored [55]. A good review of metallurgy and mechanistic models used for ML in additive is provided here [103]. In particular, this review has summarized ways that additive can help produce unique parts using temporal and spatial control of process parameters such as creating a single crystal metallic part (e.g. turbine blades), parts with site specific properties (e.g. crankshafts that require hard surface and soft core), unique metal matrix composites (e.g. achieving both ductility and strength), and parts with tailored solidification morphology and texture.
Microstructural design is a unique advantage of AM and specifically powder bed process that could be very helpful and critical, especially in situations where a specific microstructure is needed. For example, in applications where cyclic load and high temperatures could cause combination of creep and fatigue, such as turbine blades in jet engines, having a single crystal is critical. Reduced microstructural defects (dislocation and grain boundaries) in single crystal metal helps reduce the fatigue and creep damage and extends the life expectancy of the blades and engine. Creating a single crystal material is a very expensive process. As AM started to be used in aerospace applications, one of the advantages that researchers eyed was its unique advantage in the ability to design and tailor a certain microstructure and specifically single crystal blades [104]. The initial columnar grain growth structure and some variation to this microstructure was examined by [56]. In a more sophisticated manner, if process parameters are varied locally, a site-specific grain growth control can be achieved. This advantage was examined very early on by Oak Ridge National Lab scientists in study where local microstructure was controlled by controlling the process parameters [105].
Most recently in a breakthrough study, it was shown that a single crystal material can be processed using this technology [106]. This is done through scanning strategy, geometry control and using µ-Helix setting parameter in the electron beam melting machine. The µ-Helix parameter setting is a special variant of multi passing, which enables controlling the solidification paths to resemble a µm-sized helix.
With advancements in manufacturing of AM machines as the processes become more controllable, the possibility of using ML in design and implementation of new and advanced grain structures increase. In situ grain structure and orientation monitoring is a very challenging task. Evaluation of grain orientation typically is done through electron backscatter diffraction (EBSD) analysis which is a very challenging and meticulous microscopic analysis [51]. Therefore, we are currently away from a point where EBSD could be used in situ to monitor and provide unsupervised learning data for ML. Other technologies that exist such as x-ray microscopy [107][108][109], can potentially be used in situ, though this technology also has its limitations in terms of specimen size and field of view. Therefore, now, the data that is needed for ML processes applied for grain structure refinement and design can only be obtained through post process microstructural characterization of the specimens. This could provide data for supervised learning for ML algorithms used for microstructural design.

Alloy design and optimization
Alloy design was an area of interest to materials community long before AM came into play. In fact, ML has been extensively used recently in designing alloys with specific desirable properties starting from improving the mechanical properties to adjusting the properties for biomedical application and even creating new series of metals based on the new composition of material [20,36,110,111]. For example, in a recent study published in nature, ML was used to develop β-Ti alloy with minimum elastic modulus. Their projected composition showed promising results in experiments [111]. A comprehensive analysis conducted on steel alloys used 16 different descriptors in an ML platform to predict the yield strength and UTS of 5473 thermo-mechanically controlled processed (TMCP) steel alloys [112]. They made conclusions regarding the accuracy and usefulness of different algorithms. Additionally, this study found that the amount of C, Mn, Nb, and Si was well controlled by the optimization process and the increased amount of these key alloying elements in the solution contributed to improving the strength and played a positive role for the TMCP application [112]. The experimental verification of this analysis is yet to be conducted.
For the same token that experimental verification is needed for each of these alloy designs using ML, a point that must always be remembered is that the design of a material and successful manufacturing of that materials are two separate problems. Many materials may be designed theoretically, however, limitations in manufacturing approaches would hinder the actual manufacturing of those materials. This is where AM becomes extremely useful. Traditional methods that are used to create alloys such as casting have always been haunted by the lack of control on the microstructure and phases of material. Formation of phases does not always occur in an equilibrium condition [35]. As an example, in casting phase formation is specific to cooling rate which in many cases is hard to control specially in complicated parts and new designs. The cooling rate has a profound impact on the phases that form in materials.
An example of relationship between the cooling rate and the types of phases and microstructures are shown in figure 5. This is where AM becomes extremely useful, because of the local and bottom-up build nature of the process, the cooling rate in the melt pool can potentially be controlled such that the desired phases can be achieved, bringing us one step closer to actual manufacturing of the complicated alloys that require controlled environment for manufacturing. Some of the factors that impact cooling rate include the geometry (heat path through solid vs powder), materials thermo-physical properties (e.g. diffusivity, emissivity, reflectivity all in solid, powder or molten form), distance from the base-plate, laser and electron beam parameters that impact the amount of heat that is deposited in the material (e.g. power, speed, spot size etc), and the type of atmosphere used in the process (e.g. vacuum vs inert gas). Many of these parameters are either machine dependent or materials dependent. Therefore, the most convenient method could potentially be by controlling the process parameters such as beam power and speed. If a particular process, material, geometry and machine is under consideration, a thermal finite element simulation can easily provide information the process parameters scope for achieving a certain thermal gradient and cooling rate in the part.
However, despite its benefits, AM will also pose some challenges and difficulties in creating the final microstructure and alloys. Some of these challenges are listed below: • Because of high local temperatures and sometime use of vacuum inside the chamber, evaporation of low melting temperature components can occur. This causes the change of initial intended composition. Currently, there is no systematic way to control this evaporation and therefore the composition of the final parts may slightly differ from the initial composition. • Typically, parts that are made using other manufacturing technique benefit from additional post processing steps such as extrusion that work harden the material and enhance the strength of the parts. Parts made using additive are typically made to near net shape or net shape and therefore, the additional work hardening steps are removed. While this may limit the strength of these parts, it opens opportunities for researchers to develop ways to enhance strength of the AM parts through the AM process itself.
Future development in ML and AI in additive will open opportunities to more closely control these variations and end up with high quality final parts.

Application of ML and AI in post process
The post processing steps of AM has benefitted from ML and AI in a very limited manner. This is due to the fact that at the post process stage, the parts have already been built and in situ control and improvement opportunity has passed. However, information at the post processing stage can be used to optimize the process for future builds. However, there are opportunities where quality factors such as defect density, surface roughness or dimensional accuracy and reliability indices such as fatigue strength can be traced back to the initial design, materials, or process conditions. Cylic mechanical or thermo-mechanical fatigue is a very important reliability factor for many of the applications related to AM. For example, high temperature parts used in jet engines where cyclic load is common, often suffer fatigue failure. Since additive AM is being used extensively for aerospace applications, fatigue becomes a critical factor. In that direction, some researchers have tried to use ML to optimize long term behavior of the materials as function of process parameters. For example, using literature data, an adaptive neuro-fuzzy inference system was trained to determine the fatigue strength of stainless steel [118]. Several other studies focused on fatigue prediction of AM parts using ML based on theoretical models and types of defects generated during AM processes [119,120].
Fatigue life of parts is impacted by the microstructure of the parts as well as the types of defects that develop during manufacturing including porosity and surface defects. Powder bed processes are prone to these types of defects. For this reason, several studies focused on evaluation of porosity as a process quality index. X-ray tomography is often used for measuring porosity and defect density. Majority of research at the post process level has been focused on ML algorithms to optimize generation and optimization of x-ray tomography images and enhance their interpretation [121,122]. Further painstaking effort was taken in a study where micrographs of metallic components built using laser powder bed processes was used as training source for the ML algorithm for classification of porosity types [123]. In an effort to overcome the limitations and costs associated with using in situ monitoring tools to optimize the processes, a research focused on quality repeatability focused on statistical analysis of relationship between downstream mechanical properties and the process inputs [124]. The main conclusion was that a combinational effect from the part location and post-chamber pressure drop was found to significantly influence the mechanical properties of printed parts [124].
Given the importance of surface roughness and microstructural variations in long term behavior of the AM parts, there are opportunities to apply ML in evaluation of these types of process outcomes. Currently the number of studies that focus on these aspects are very scarce.

Summary and conclusion
AM can benefit extensively from applications of ML and AI. Although some progress has been made, applications of ML and AI in streamlining AM to be integrated into other manufacturing techniques or becoming a commodity for users is still far in the future. AI can advance AM in the areas of process optimization, design correlation, design improvement, defect reduction and microstructural design. AM can significantly benefit from the current approaches developed for other processes; However, the main hurdle at the current time is availability and reliability of the data that are needed for training the ML algorithms. Current experimental data available from the research community or AM manufacturers are varied and, in some cases, not publicly available. Therefore, reliable data collection, storage and sharing is paramount in development of ML algorithms for AM. There are significant variations between the observation and types of experiments that have been conducted or currently underway. Therefore, it is important for the manufacturing community to create a venue for data storage. In order for the data to be useful and for the ML algorithms to work properly, the data generation condition must also be disclosed with data. For example, information such as process parameters, exact details of the raw materials such powder or feedstock, the composition, properties of the raw material such as flowability of powder, size of particles etc, the type of machine and any other data that is essential in recreating and labeling the data should be disclosed and shared.
Additionally, the challenges involved with the process itself such as high temperatures or high speeds pose difficulty on monitoring and measurements of the process. Most of the available technologies rely on thermal of optical imaging of the surface of the material and in majority of the cases, information for the depth cannot be acquired easily. It is important that manufacturers and researchers develop tools that can monitor with high accuracy and speed the variety of parameters and conditions of the process. Defects detection, the ability to create a 3D image of the build during the build or ability to monitor the microstructure and grain orientations are some examples that are still not fully feasible. These areas would certainly provide some challenges that eager and energetic community can tackle and address.

Data availability statement
All data that support the findings of this study are included within the article (and any supplementary files).