Highly Productive 3D Printing Process to Transcend Intractability in Materials and Geometries via Interactive Machine-Learning-Based Technique

Herein, a highly productive and defect‐free 3D‐printing system enforced by deep‐learning (DL)‐based anomaly detection and reinforcement‐learning (RL)‐based optimization processes is developed. Unpredictable defect factors, such as machine setting errors or unexpected material flow, are analyzed by image‐based anomaly detection implemented using a variational autoencoder DL model. Real‐time detection and in situ correction of defects are implemented by an autocalibration algorithm in conjunction with the DL system. In view of productivity enhancement, the optimized set of diversified printing speeds can be generated from virtual simulation of RL, which is established using a physics‐based engineering model. The RL‐simulated parameter set maximizes printing speed and minimizes deflection‐related failures throughout the 3D‐printing process. With the synergistic assistance of DL and RL techniques, the developed system can overcome the inherent challenging intractability of 3D printing in terms of material property and geometry, achieving high process productivity.


Introduction
Additive manufacturing (AM), also known as 3D printing, is a layer-wise fabrication technique with a diverse range of material availability including metals, polymers, ceramics, and composites. Among the standard AM processes, material extrusion (MEX) has been the most popularized 3D-printing process in polymer-based manufacturing fields, owing to its superior cost-effectiveness in hardware settings and material usage. [1] Additionally, the wide usability range of material feedstocks endows MEX-manufactured parts with the relevant functionalities, such as mechanical reliability in strength/stiffness, [2] mechanical flexibility/softness, [3] electrical conductivity, [4] and biological function. [5] Accordingly, in a wide range of scientific and technological studies, MEX has provided core implementation methodologies with its universal functionality and manufacturability. [6] However, the practical use of MEX has been limited in many cases due to the inherent defects generated during a series of continuous layer-wise deposition processes of molten polymer. These defects are caused by machine-or material-related error issues in the printing and layering process. The machine-error issues arise frequently from mechanical malfunctions in the operation of moving modules and drivetrains of MEX machines, such as layering shift or skip and wobbling of workpiece. [7] Furthermore, the material-related issues are attributed to unstable material properties of the used polymer, causing shrinkage, warping, and deformation during the process. [8] These defect-inducing factors incur unexpected defective deposition and catastrophic failures in the layering process, resulting in low stiffness or strength of the printed material, or intractable high aspect ratio of the printed geometry. [9] Hence, researchers have been challenged to solve the defect issues by experimental adjustment of printing parameters, management of working conditions, and pre-and post-processing of the object. [10] Despite numerous efforts, the current state of AM or 3D-printing technology has not perfectly exhibited adequate methodologies to predict and control machine and material errors. Moreover, the inherent feature to accommodate universal materials and geometries is an advantage of AM; however, it can be also a disadvantage that creates difficulties in manufacturing for the universal purposes of AM. Owing to the lack of an accurate formulating solution, the time-consuming and labor-intensive trial-and-error approach is still used to fine-tune and optimize the process parameters and working conditions. [11] The machine-learning (ML) technique has been recommended as a powerful tool for various fields, such as autonomous vehicles, [12] medical treatments, [13] smart factories, [14] and AM. [15][16][17] In the field of manufacturing, it can potentially optimize the processes with manufacturing parameters, find unperceivable features in images of the on-process object, and predict issues in processes from a high volume of process-related data. [18] Recently, it has been introduced into the field of AM in terms of process and design optimization, quality control, and enhancement of the cost-effectiveness. [19] Currently, the most frequently used ML technique in AM is image-based quality management of AM-processed results. [20] In many studies, convolution neural network (CNN), a popular deep-learning (DL) network for the image-classification problem, has been trialed to detect the process defects during the 3D-printing process. [21] However, the ML-based quality control system of MEX is still far from real-time monitoring owing to non-negligible factors, such as delay of firmware, unoptimized ML algorithms, and limited amount of data. Moreover, quality control systems remain at a level of the simple detection of defects; they do not deal with the prevention of defects before or after the printing process. Naturally, subsequent steps investigate the compensation needs of defects generated from mechanical malfunctions and material properties via the ML-assisted process development.
In this study, we recommend ML-based solutions for dealing with the defect generation issues in MEX using a variational autoencoder (VAE) DL algorithm and reinforcement-learning (RL) simulation. The layer shift and oozed blob, which were the frequently and unpredictably generated defects in the MEX process, were automatically detected by the anomaly detection system with the VAE-DL model. Beyond detecting the abnormal printing process by the VAE-DL, an autocalibration algorithm has been newly invented to correct the defects and compensate the process without delay of firmware reaction and printing procedure. Furthermore, physical bending deformation of printed objects was incurred by acceleration or deceleration of the nozzle and eventually led to the defective oozed blob on the nozzle. This defect was prevented by the collective optimization of diversified printing parameters, particularly in printing speed, generated from the RL-based simulation. The RL model was established comprehensively considering negative and positive rewards of defect generation factors and printing time reduction, respectively, thereby improving the printability and productivity. Using the RL-simulated process parameters with the VAE-DL-based algorithm increased productivity and overcame the fabrication capability limits of the intractably overhanging structures, which had been almost impossible with the typical 3D-printing system. Based on our review of existing literature, this study presents a novel approach that integrates DL and RL to achieve an adequate solution for defect-free 3D printing. To demonstrate the feasibility, we challenged the intractable layering process with low stiffness and highly pliable material and complex structural geometries, such as high-aspect-ratio slenderness and overhang architecture. The ML-assisted 3D-printing technique is expected to overcome various obstacles in the practical AM field and could be developed into a key technology for intelligent manufacturing systems.

3D Printing System with Image-Based In Situ Monitoring Setup
The base 3D-printing hardware system was employed as a commercial MEX type 3D printer (Ender-3 V2, Creality, China). At the extruder of the 3D printer, two identical cameras (PS-AEC500, China) were equipped perpendicular to each other. To avoid interference between the moving parts within the build space, the selected cameras were mirror-reflection periscope cameras with a slender geometry (diameter of 12 mm and length of 50 mm). The cameras were equipped to the nozzle module to synchronize the monitoring position according to the nozzle movement during 3D printing. As for the position in z-axis, they were set up at an identical height to the nozzle tip to capture images of the printing region and nozzle. For each printed layer, the dual-view images of each printed layer were captured along the xand y-axis by the two selected cameras (X-and Y-cam). With the developed image-acquisition module, the interested regions of printed object could be thoroughly monitored in x-/y-/z-axes during the printing process. The images were captured as 640 Â 480 pixels, and thereafter cropped to 124 Â 64 pixels that could visualize above the as-printed layer and below the nozzle. To acquire clear image data, the noise vibration of the fan was excluded by slowing down the fan operation during the image capture procedure. The images, which were 10 000 and 100 images for the respective cameras, were used as training and validation data for the neural network. The overall control of cameras and 3D printer was executed using Raspberry Pi 4 (Raspberry Pi Foundation, UK). For defect detection, the data were transported to a GPU hardware (Geforce RTX 3080 with 8 GB VRAM, NVIDIA, USA) to compute a VAE-DL model.

Material, Models, and Settings for 3D Printing
A commercial feedstock of poly(vinyl alcohol) filament (PVA filament with diameter of 1.75 mm, eSUN Ltd., China) was used for the overall 3D-printing experiments. Owing to its poor mechanical stiffness, it was employed as the intractable material for 3D printing, which this study aims to overcome. For the base model, a slender cylindrical geometry of 5 mm diameter and 80 mm length, that is, high aspect ratio of 1:16, was employed to demonstrate the printability of intractable geometry. Further, two additional different geometries were used to challenge the higher levels of geometrical intractability. One was an overhang structure with the same diameter and height as the base model but an inclined angle of 45°. The other was a more complicated structure with the same diameter and height as the base model but with helically coiled slender cylinders and multiple bifurcated overhang branches, which was inspired from the double helix structure of DNA. Notably, these models did not include any supporting structures such as a bottom raft, overhang support, or bridge to sustain the printability level of intractable material and geometries. For each 3D model, the corresponding G-code was obtained using an open-source slicing software (PrusaSlicer). For 3D-printing settings, the temperatures of the extruder and bed were set at 210 and 60°C, respectively. A nozzle with 0.4 mm inner diameter was equipped to the extruder. The 3D printing was performed with a layering thickness of 0.16 mm and 100% infill.

Detection and Correction of Defects Via VAE-DL and Autocalibration Algorithm
To analyze the unpredictable defect factors during the 3D-printing process, a VAE-DL model was developed to detect the outliers indicating abnormal defects, as shown in Figure 1a.
Alibi detect from open-source libraries was employed in the VAE-DL model, which was characterized by multiple CNN layers consisting of an encoder, decoder, and latent space. The encoder and decoder were composed of four layers of Conv2D and Conv2DTranspose (TensorFlow, Keras), respectively. The dimension of the latent space was set to 1024, consisting of the mean value (μ) and standard deviation (σ), which learned during back-propagation following the Gaussian probability density; the loss function is the negative log-likelihood with reconstruction loss and Kullback-Leibler (KL) divergence loss.
The image-acquisition process was automatically performed by Raspberry Pi and two periscope cameras in the xand y-directions using a python (programing language, Python software foundation, PSF) script in a layer-wise manner. The size of the image was determined as 124 Â 64 pixels. For the training data, images were captured ten times from each sample, resulting a total number of 10 000 images (5000 images from X-and Y-cam, respectively). One hundred validation data were randomly acquired from newly captured images of additionally printed objects. The training and validation data were used for the training set and calculation of threshold value, respectively. Following the Gaussian probability density, the threshold value was set to be out of the normal range of 99% of the validation data. With the trained VAE-DL model, the printed object was monitored in a layer-wise manner and outlier scores were calculated to verify them with respect to the threshold value range. When the outlier score calculated from the processed image exceeded the threshold value, the VAE model perceived that the defect was incurred at the printed object. Thereafter, the autocalibration algorithm was activated to correct the defects. It reset the absolute x and y coordinates of the printer to correct the misaligned position that could cause layer shift. Also, it detached the oozed blob at the nozzle, which could evolve into a defective stuck blob failure. The printing process resumed after the autocalibration. This algorithm had an infinite loop activated at every layer throughout the printing operation. The relevant python scripts were created to interactively control both 3D printer and ML computing hardware.

RL-Based Optimization of Diversified Printing Speeds
The structural deflection of the as-printed part can be predicted theoretically by a simple physics-based engineering model. Due to the inherent low stiffness of PVA, the printed object was bent at the top surface by the drag force generated from acceleration or deceleration of the nozzle head ( Figure 1b). This defect factor could be theoretically predicted and calculated by considering the deflection of a cantilever beam. According to the material property and shape geometry of the printed object, bending stiffness and deflection were calculated layer-wise using the following equations where L, E, I, F, and d represent the length of the present state of the printed part, Young's modulus of the printing material, moment of inertia, drag force at the top surface, and maximum deflection, respectively. Based on this physics-based engineering model, the RL simulation, specifically using the proximal policy optimization (PPO)  , and 100 mm s À1 as the discrete action. The environment was evaluated with both positive and negative rewards: the printing time and amount of deflection were the positive and negative values, respectively. Each deflection was calculated based on the present state of the physics model considering the acceleration that is dependent on the printing speed and height at each layer. The total episode of the RL simulation was set to 3.0E7. To calculate the state of the RL environment, the RL determined the optimal set of printing speeds per layer with the least time consumed and defects formed. Using the results of RL, the generated set of printing speeds was applied to the G-code for practical 3D printing.

Characterization of Defects in 3D Printing
Prior to the establishment of ML (DL and RL) algorithms, it was necessary to characterize the defect generation factors during the 3D-printing process. According to the defect generation mechanisms, we could develop the suitable ML-based solutions to prevent the defect. In the MEX-based 3D-printing process, there have been a variety of defect generation issues arising from working/setting errors of the printing machine and unstable rheological/mechanical properties of the used material. [7,8] Figure 2 shows the defects of printed objects incurred from these two error factors in regards to machine and material. For the machine error, defects were frequently caused by rapidly changing the nozzle head movement in the xor y-direction. The high speed of components caused excessive acceleration and deceleration, thereby leading to abnormal defective deposition in printing. Mechanical malfunction of the drivetrain components in the 3D printer could be attributed to the inertia of the mass of relatively heavy moving components, such as the extruder and printing bed. [22] This malfunction could be fatal when the acceleration is increased to achieve high speed for better productivity owing to the harsh conditions created. The mechanical malfunction caused layer shifts, which were unpredictably incurred (Figure 2a,i). Due to the relatively large mass of the printing bed, defects mainly occurred from the y-direction movement of the printing bed, which exerted acceleration-related forces on the drivetrain components. Because the 3D-printing movement is complicated along with the infill and contour of the printing path, it is nearly impossible to predict the mechanical malfunction of the drivetrain. Likewise, because the large mass of the extruder generated inertial forces, the x-direction movement could cause layer shift. Therefore, for the complete defect detection, the layer shift was monitored in both x and y-direction using two cameras equipped in the two directions. Figure 2b shows that the dual-view imaging module of the X-and Y-cam could acquire defective images whether the layer shift occurred in the xor y-direction. Based on the acquired images, the layer shift was precisely detected in real time by the VAE-DL algorithm (Figure 1a), which will be discussed further in Section 3.2.
For the material error factors, the abnormal deposition on the printed surface, such as oozed blob, could be incurred from the instability of the used material in terms of rheological and mechanical properties. Although rheologically instable deposition occurred unpredictably, it could be preemptively detected and controlled by in situ monitoring and using the VAE-DL algorithm. Further, in view of the instable property, we could characterize a predictable defect factor based on the bending phenomena of the printed object, which caused the defective oozed blob on the printed surface (Figure 1b and 2a, ii). The moving extruder generates dragging force along the printed surface in the printing direction by the acceleration. As a result, the dragging force causes the bending deflection of the printed object, especially if the printed object has poor mechanical stiffness and high-aspect-ratio geometry. The bending deflection leads to the redundant and abnormal deposition of molten polymers oozing out at of the deflection gap between the nozzle and object (Figure 2a, ii). The unfavorably accumulated molten materials became the defective blob below the nozzle and get stuck onto the printing object and nozzle, thereby causing a critical failure. Therefore, to minimize defects, such as oozed blob, the bending deflection should be optimally mitigated by controlling the printing speed. By analogy of the printed object as a simple beam, the amount of deflection was theoretically calculated using Equation (1) to predict how much the object would be bent by the present states of the printed height, printing speed, and corresponded acceleration. The calculated values were used to establish the environment for RL simulation that is discussed in Section 3.3.

VAE-DL and Autocalibration Algorithms for In Situ Control of Defects
For image-based detection of the aforementioned defects, such as layer shift, oozed blob, and other abnormal depositions, we employed a VAE-DL algorithm as a representative CNNclassification model, which was also referred to as outlier detection or one-class classification. [23] It is one of several algorithms used to test whether the DL model can detect when new input data matches the distribution of the training data. The general CNN-based anomaly-detection-classification models mainly focus on the classification settings, that is, whether the distributions of inlier and outlier show a significant difference. They needed a balanced amount of data between the normal and the abnormal groups, otherwise the performance of DL deteriorated owing to overoptimistic and overfitting issues. [24,25] On the contrary, the VAE model was valid regardless of the use of a data set and even contained the imbalance amounts of data for each class. When monitoring the 3D-printing process, the acquired image data from the process had much higher ratio of normal data than that of abnormal data, showing the significant imbalance. With the inherent advantage of VAE-DL algorithm as unsupervised DL, we could successfully train the model only using the normal data of 3D-printing images. In this regard, the VAE model is practically suitable for detecting defects of 3D printing over other CNN models which require balanced amounts of data sets for each class.
With the 10 000 images data acquired from the X-and Y-cam, two VAE models were separately trained in the xand y-direction. After the training, following the Gaussian probability density, the outliers were set to 99% using the additionally acquired image data, thereby setting the threshold value. The threshold was calculated and adjusted to 0.0003 for both VAE models of the X-and Y-cam. To evaluate the accuracy of the trained VAE model set within the threshold, an additional data set was prepared with 2000 defect-free normal images and 316 defect-detected abnormal images, which were manually labeled. The total number of abnormal images was 316, consisting of 5 images of layer shifting and the rest of oozed blob. Figure 3a shows the results of the VAE process including the original/reconstructed and as-processed outlier images.
The original image acquired from the X-or Y-cam was sent through the encoder and reconstructed by the decoder. The outlier level was highlighted in green and quantitatively calculated by determining the difference between the original and reconstructed images. In the plot of outlier level scores (Figure 3a), the scores of 100 normal images which were randomly selected from the additional data set were under the threshold value. The scores of abnormal images ranged from 0.0003 to 0.08, showing a significant difference. As shown in Figure 3b, three types of defects were exhibited as representative defects. The scores of developed blobs, which stuck on the nozzle, had large differences from the threshold value. The layer shifts were also successfully detected as outliers. In particular, pre-blobs which were the potentially defective premature blob were favorably detected, although they had the less highlighted mark compared to the developed blob, by the scores that slightly exceeded the threshold value. With the VAE-processed results from 316 abnormal and 2000 normal images, a confusion matrix was composed independently for each VAE model trained by X-or Y-cam images, as shown Figure 3c. The VAE model trained by X-cam images (1000 normal and 170 abnormal), revealed that the normal and abnormal images were predicted with very high precisions of 100% and 99.41% with respect to negatives, respectively. The VAE model trained by Y-cam images (1000 normal and 146 abnormal) exhibited perfect prediction performance. Collectively, these results imply that the learned model could detect defects with a very high accuracy.
Next, we developed an in situ autocalibration algorithm working in conjunction with the highly accurate VAE model, for defect detection and correction. Figure 4 shows the overall systematic procedures from the in situ defect detection to the promptly activated autocalibration as a flow chart. The VAEdetecting and 3D-printing modules were interactively operated by a control module configured using Raspberry Pi. If the www.advancedsciencenews.com www.advintellsyst.com VAE module detects the defects by identifying outlier scores over the threshold value, the algorithm automatically activates the calibration process that resets the nozzle position as a new origin with absolute x and y coordinates. After the resetting movement of the nozzle, the misaligned drivetrain of the 3D-printing system could be realigned with respect to the printing position, thereby correcting the layer shift, as shown in Figure 5. Furthermore, the blob formed around the nozzle or printed object could be detached during the resetting movement of nozzle. As a result, the developed VAE-based autocalibration www.advancedsciencenews.com www.advintellsyst.com algorithm could restore the printing process facing failure. This would be expected as a great enhancement in productivity and processability of 3D printing.

Establishment of RL Model for Process Optimization with Diversified Printing Speeds
Currently, the application of RL to AM technology has been limited due to the challenge in establishing a mathematical model of the layer-wise process or physics-based model of the RL environment. [18] Meanwhile, PPO, which is an on-policy algorithm, has been used as a practical algorithm in the manufacturing field. [26][27][28][29] The on-policy algorithms, such as PPO, advantage actor-critic (A2C), and trust region policy optimization (TRPO), generally use continuous action space for efficiency. [30][31][32] However, recent research has reported that the PPO with discrete action space showed significantly superior performance on high-dimensional tasks with complex dynamics such as humanoid tasks. [33] In this respect, we anticipated it would be suitable to apply the PPO with discrete action space to the AM, which has the physics-based model. First, we established a simple physics-based engineering model by analogy of the high-aspect-ratio 3D-printed part as a cantilever beam (Figure 6a). According to the engineering model of a cantilever beam (Equation (1)), the beam deflection incurring . Layer-wise flow chart of 3D-printing system integrated with VAE-DL and autocalibration algorithm. a) VAE-detecting module for computing process determining outlier scores of captured images from X-and Y-cams. According to the outlier score, the algorithm decided to run the autocalibration. b) Control module for the cooperative operation of 3D printer and two cameras. c) The 3D-printing module operated according to the controlled G-code.
www.advancedsciencenews.com www.advintellsyst.com defects in the 3D printing could be characterized, thereby establishing the corresponding RL environment with the calculated deflection value. In the theoretical model, the moment of inertia (I), which was determined by cross-sectional shape, was not changed significantly by the varied infill density ( Figure S1, Supporting Information). To be simplified, the value of I was used as a fixed value calculated from the cross section with infill of 100%. Young's modulus (E) was practically measured by uniaxial tensile tests using the practically 3D-printed PVA specimens, of which the stiffness was measured as 79.5 AE 11.4 MPa (1% secant in strain), as shown in Figure S2, Supporting Information. For the action of RL, there were five different speed options of 10, 25, 50, 75, and 100 mm s À1 , which corresponded to nozzle movement accelerations of 50, 320, 1250, 2800, and 5000 mm s À2 , respectively. The correspondence between the printing speeds and accelerations were determined by a slicing program (PrusaSlicer). By diversifying printing speed options, the RL environment calculated both deflection and total printing time at every layer for each printing episode with 500 layers in the RL simulation.
With the calculated values of deflection and total printing time, the state of the environment was optimized with a reward algorithm of "The more, The less" and "The less, The more" (Figure 6b). The conceptual algorithm of "The more, The less" was employed to set negative rewards per calculated deflection. This algorithm was described in detail as a pseudo code shown in Figure 6c. When the higher-speed printing parameter used, the total printing time reduced but the deflection of printed object became larger due to the higher acceleration of nozzle movement (Figure 6c, rows 6 and 8). Essentially, the possibility of defective blob generation would increase with higher printing speed. To decrease the possibility, the amount of deflection was set as a negative reward in the RL environment. The absolute value of the negative reward was proportional to the amount of the deflection which could be calculated from the established physics-based cantilever model. (Figure 6c, rows 7-10).
In contrast, the concept of "The less, The more" was recommended to compensate for the extension of printing time with a positive reward system. When the low-speed printing parameter was set to avoid deflection, the 3D-printing process would become stable, but the total printing time would be extended. This implies that pursuing the stability led to a decrease in productivity. To compensate for the reduced productivity, the positive and negative rewards were reflected together. When the RL Figure 5. Autocalibration results. The layer shift and pre-blob at the 139th layer were successfully corrected after autocalibration. The printing process resumed following the remaining procedure. www.advancedsciencenews.com www.advintellsyst.com action selected the options for acceleration corresponding to printing speed, the average printing time could be calculated from total printing time at the current state (Figure 6c, row 10). The absolute value of the positive rewards was determined by comparing the average printing time with the pre-determined printing time for a single layer of 3-7 s, which was determined from the varied printing speeds of 10-100 mm s À1 . (Figure 6c, rows [10][11][12][13][14][15][16][17][18][19]. Finally, as the negative and positive rewards were compromised together to form a total reward (Figure 6c, row 20), the RL model became trained toward the maximization of total reward, thereby optimizing the variation of printing speeds. Essentially, the synergistic reward algorithm could simultaneously enhance the productivity and processability of 3D printing by minimizing the total printing time and possibility of defect, respectively. Moreover, a productivity weight factor (m) was introduced to the RL model code as shown in rows 12, 14, and so on in Figure 6. By multiplying the positive reward by the weight factor m, the influence of positive reward on RL environment was reinforced, thereby further reducing the printing time. The four levels of weight factors (5, 50, 500, and 5000) were applied to the RL model code as shown in Figure S3, Supporting Information. As the episodes of RL simulation progressed, the total rewards converged toward a constant value, which was to be the optimized set of diversified printing speeds. The convergence of reward could be attained for all cases of weight factors, even up to 5000 ( Figure S4a, Supporting Information).

Enhanced Processability and Productivity by Optimization Via RL Simulation
Before the demonstration of enhancement of process capabilities via RL, we first performed a set of trial-error experiments to evaluate the relationship between printability and printing speed. The pre-experiment was performed using a high-aspect-ratio model (5 mm diameter and 80 mm height) at a fixed printing speed of 10, 25, 50, 75, and 100 mm s À1 . Due to the bending phenomena during printing, oozed blob failures occurred in most printed samples before completing the printing process up to the height of 80 mm ( Figure S5, Supporting Information). The limits of printable height, where the defects occurred, were recorded in Figure 7a, showing that the printable height got lower with higher printing speed. Interestingly, the slowest printing at the speed of 10 mm s À1 still showed the blob failure before reaching 80 mm height. This was attributed to thermal stagnation of the hot nozzle (210°C) and bed (60°CÞ around the printing region. The slow movement of hot nozzle at a certain range of local printing paths could cause a superimposed thermal stagnation and its relevant unexpected material flow or deformation of printed object. [27] We expected the RL-simulated parameter set of printing speeds to provide an optimal condition not only to enhance the productivity but also to avoid the defects from bending deformation or thermal stagnation. Remarkably, the RL simulation generated a well-ordered parameter set, which was arranged in order of printing speed as shown in Figure 7b. From the start of printing with the highest speed (100 mm s À1 ), the RL algorithm chose the lower speed values to avoid defects as printing progressed. In addition, the higher productivity weight factor (m), which means higher level of printability, tended to select higher printing speed values throughout the printed layers, as shown in Levels 1-4 of Figure 7b. Level 4 (m = 5000) provided an optimized speed profile, which was composed of 10, 25, 50, 75, and 100 mm s À1 in order at the ranges of layers 1-139, 140-276, 277-378, 379-450, and 451-500, respectively. It showed the best productivity with a total printing time of 2,161 s.  In a real printing test, as expected, the results printed according to RL simulation (m = 5000) exhibited a better printability performance of seven successes per ten trials, while the fixed condition at 25 mm s À1 exhibited failure (Figure 7c). Although the printability was dramatically enhanced, the abnormally deposited defects still occurred due to the bending deformation and thermal stagnation. This was perfectly complemented with the incorporation of the VAE-DL-based autocalibration algorithm. By the detection and correction of defects, the printing of to-be-failed objects could be completed without the critical failure (Video S1, Supporting Information-Supporting Video 1 is available from the link. https://drive.google.com/file/d/ 1bXpPpzZt7huFa_2He24KA9umGlZC_xe4/view?usp=sharing). This was practically demonstrated by conducting a total of 30 printing tests. As shown in Figure 8a, the 30 trials were successfully completed, and the autocalibration was activated for 3 trials out of them where the defects were detected. Meaningfully, this implies that the productivity was synergistically maximized by the integrative application of DL and RL.
For further quantitative evaluation, the productivities of different printing conditions were compared in terms of overall equipment effectiveness (OEE). The OEE has been considered an effective standard for evaluating the productivity of overall manufacturing procedures comprehensively, including availability of equipment, process performance, and quality of product. [34] It can be calculated as follows Actual run time Planned run time Â Actual production parameter Ideal or maximum production parameter

Â
Number of good parts Total number of parts (2) The availability in all cases was assumed as 100% because the actual and planned run times were almost identical. For the performance, the ideal or maximum production parameter was derived from the maximum printing speed in terms of layers per seconds. In our experiment, it was 0.3996 layer s À1 derived from the printing speed of 100 mm s À1 . The actual production www.advancedsciencenews.com www.advintellsyst.com parameter was calculated from the total printing time divided by the total layers printed (500 layers in this case). Last, the quality was set to the ratio of the number of successfully printed objects to the total number of printing trials. Figure 8b displays the calculated OEE values of the RL/DL-applied, RL-only-applied, and two different fixed printing speed conditions (10 and 25 mm s À1 ). As expected, with OEE comprehensively considering performance and quality, the RL/DL-applied printing condition provided the highest value compared to other conditions. Even when the 25 mm s À1 condition or larger than that was used, the OEE value became zero since there were no successfully printed objects. From the results, the integrative ML(RL & DL)-based printing strategy was believed to achieve the utmost production capability under the possible range of process parameters.

Applicability to Complex Geometries of 3D-Printed Parts
To demonstrate the general applicability of our developed MLbased 3D-printing system, it was tested with the more complex geometries of overhang structures. One of the most important challenges to overcome is the hindrance to practical 3D freeform fabrication in 3D printing by the overhang structures. The inclined angle of overhang was selected as 45°, which is considered as a maximum angle that can be printed without support structures. [35] If the overhang was more inclined, a defective stringing effect, flexure, and blob would occur, leading to printing failure. [36] Furthermore, in our study, the as-printed overhang structures, which involve the intractably pliable material and high-aspect-ratio geometry, undergo torsion and bending ( Figure 9a). Thus, compared to the previous simply straight cylinder with high aspect ratio, it generated a much larger deflection caused by the bending deflection and torsional shear strain. As a result, despite the lowest printing speed of 10 mm s À1 , all ten printed samples generated defective flexure and blob failure, as shown in Figure 9a.
Therefore, to determine an optimized process condition preventing failure, the RL-based parameter re-setup was applied in a similar way to the previous method for a simple straight structure. However, compared to the previous case without overhang, the torsional deformation was reflected as the additional negative reward in the RL environment (Figure 9b, rows 8-14). Applying a simple twisted cantilever model analogy, the shear strain was calculated considering the theoretically measured torque, shear modulus, and dimension of as-printed part. [37,38] As shown in Figure S4b, Supporting Information, RL models considering the torsion for overhang also converged in all cases of the four different levels of productivity (m = 5, 50, 500, and 5000). As a result, Figure 9c shows the RL-derived parameter sets of diversified printing speeds and their resulting total printing time. Overall, the printing times slightly increased compared to the prior results of RL simulation of the straight cylinder structures. From the four RL results, we selected the highest productivity condition (Level 4, m = 5000) for a practical printability test of overhang structure. This was set with 10, 25, 50, 75, and 100 mm s À1 for layers 1-173, 174-301, 302-398, 399-460, and 461-500, respectively. Surprisingly, 10 out of 10 trials were successful upon printing completion as shown in Figure 9a). Unlike the 10 mm s À1 case where the defective flexure and blob were founded, the as-printed structure showed straight and stable defect-free shapes.
Taking one step forward, we attempted the RL-based 3D-printing method with a more complex geometry, consisting of multiple bifurcated overhang branches and diversified overhang directions, which is inspired by the double helix structure of DNA (Figure 10a). This extremely complicated structure undergoes multiple combinative deformations by bending and torsion. As shown in Figure 10b, even at the lowest printing speed of 10 mm s À1 , severe defective failure including blobs and extensive stringing caused from thermal stagnation are observed. Considering the multiple cross sections and bifurcated overhang branches, the RL environment was reorganized with Figure 9. a) Schematic illustration of overhang structure exerted by bending and torsion from the moving nozzle (left). All failure of fixed condition at 10 mm s À1 (upper, right) and all success of RL-simulated condition (m = 5000) (lower, right). b) The pseudo code of RL for the overhang structure. c) Results of RL simulation for the overhang structure varied with productivity weight factors (mean AE standard deviation, n = 10).
www.advancedsciencenews.com www.advintellsyst.com multiple negative rewards, where the maximum values of deflection and shear strain were used as the finally determined negative reward. Interestingly, the condition of level 4 (m = 5000) appeared to require more total printing rather than the level 3 (m = 500) (Figure 10c). Even though the reward of level 4 converged to a constant value ( Figure S4c, Supporting Information), the large weight factor incurred adverse effects by compromising the negative and positive rewards due to the complex geometry. Nevertheless, the condition of level 3 provided a sufficient productivity with an efficient variation of printing times. Most of all, successful printing could be achieved, while the trials with conditions of 10 mm s À1 all failed, as shown in Figure 10b. The experimental results collectively showed the general applicability of the developed integrative ML-based 3D printing to highly intractable geometries to achieve high productivity.

Conclusion
The present study proposes an integrative application of DL and RL to a MEX-based 3D-printing system for attaining the detection/correction of defects and utmost productivity. The defects, occurring as layer shift, oozed blob, and other abnormal depositions, were attributed to working/setting errors of the printing machine and rheological/mechanical instability of used materials or printed objects. Such unpredictable occurrences of defects could be detected by image-based anomaly detection implemented using a VAE-DL model, which was trained to a high accuracy using sufficient meticulously captured image data. Further, the defects were corrected by the autocalibration algorithm working in conjunction with the VAE-detection module, thereby restoring the to-be-failed object in situ. In view of productivity, the RL model, specifically PPO algorithm, was developed to optimize the process parameter set of printing speeds. Under the RL environment established by a suitable physics-based engineering model, the negative and positive reward algorithm could synergistically work and generate the well-trained and converged RL model maximizing printing speeds and minimizing defective deflections. The optimized sets of diversified printing speeds via the RL simulation were confirmed with their defect controllability and high productivity by practical printing tests using intractable high-aspect-ratio and overhang geometries. We believe that the results of this study will serve as an influential technical bridge between the two technology groups of ML and 3D printing. Also, the developed method has leeway to be applied www.advancedsciencenews.com www.advintellsyst.com to other AM processes and intractable materials, aside from the case of MEX and PVA. By extension, it is expected that the improved artificial intelligence-based AM systems will address universalities of material usage in the general AM processes.

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