Xiaohao Sun

Kun Zhou

Frédéric Demoly

Ruike Renee Zhao

H Jerry Qi

Machine learning in 3D/4D printing design

Keywords: 3D printing, 4D printing, machine learning, inverse design, mechanical responses

3D/4D printing offers significant flexibility in manufacturing complex structures with diverse range of mechanical responses, while also posing critical needs in tackling challenging inverse design problems. The rapidly developing machine learning (ML) approach offers new opportunities and has attracted significant interests in the field. In this perspective paper, we highlight recent advancements of utilizing ML for designing printed structures with desired mechanical responses. First, we provide an overview of common forward and inverse problems, relevant types of structures, and design space and responses in 3D/4D printing. Next, we review recent works that employ a variety of ML approaches for the inverse design of different mechanical responses, ranging from structural properties to active shape changes. Finally, we briefly discuss the main challenges, summarize existing and potential ML approaches, and extend the discussion to broader design problems in the field of 3D/4D printing. This paper is hoped to provide foundational guides and insights into the application of ML for the 3D/4D printing design.

Introduction

3D printing, or additive manufacturing, enables the creation of complex physical objects from digital models. Multimaterial printing allows for the fabrication of composite structures with materials of different properties and different active responses [START_REF] Kuang | Grayscale digital light processing 3D printing for highly functionally graded materials[END_REF][START_REF] Cheng | Centrifugal multimaterial 3D printing of multifunctional heterogeneous objects[END_REF][START_REF] Yue | Single-vat single-cure grayscale digital light processing 3D printing of materials with large property difference and high stretchability[END_REF]. Owing to the development of multimaterial printing and active materials, the emerging 4D printing technology takes a step further by introducing time as a dimension, allowing printed objects to change their shape, properties, or functionality when exposed to specific energy stimuli (e.g., light, heat, moisture, pH, solvent, electric/magnetic field, etc.) [START_REF] Tibbits | The emergence of "4D printing[END_REF][START_REF] Ge | Active materials by four-dimension printing[END_REF][START_REF] Ge | Multimaterial 4D Printing with Tailorable Shape Memory Polymers[END_REF][START_REF] Yue | Cold-programmed shape-morphing structures based on grayscale digital light processing 4D printing[END_REF][START_REF] Kuang | Advances in 4D Printing: Materials and Applications[END_REF]. There exist many 3D printing techniques. Depending on how the raw material is deposited, these techniques can be classified into the following categories: extrusion-based methods such as direct ink writing (DIW) and fused filament fabrication (FFF), inkjet printing, vatphotopolymerization methods such as digital light processing (DLP), stereolithography (SLA), and two-photon polymerization (TPP), powder bed fusion-based methods such as selective laser sintering (SLS), etc. We refer the readers to recent reviews [START_REF] Kuang | Advances in 4D Printing: Materials and Applications[END_REF][START_REF] Leanza | Active Materials for Functional Origami[END_REF] for detailed descriptions of these techniques. 3D/4D printing offers significant manufacturing flexibility, especially in creating complex shapes and structures that exhibit functions and responses beyond those of printed materials.

Here, we refer printed materials as those directly coming out of a printer without specially designed geometry or features. Their properties are only determined by the printing techniques and printer operating parameters. In 3D/4D printing, mechanical design plays an important role in harnessing its advantage to enable intelligent printing and advancing various engineering applications [START_REF] Gibson | Design for Additive Manufacturing[END_REF][START_REF] Yuan | Mechanics-based design strategies for 4D printing: A review[END_REF][START_REF] Wang | A brief review on mechanical designs for 4D printing[END_REF][START_REF] Demoly | The status, barriers, challenges, and future in design for 4D printing[END_REF][START_REF] Ze | Spinning-enabled wireless amphibious origami millirobot[END_REF][START_REF] Leanza | Active Materials for Functional Origami[END_REF][START_REF] Sim | Magneto-Mechanical Bilayer Metamaterial with Global Area-Preserving Density Tunability for Acoustic Wave Regulation[END_REF][START_REF] Wu | Stretchable origami robotic arm with omnidirectional bending and twisting[END_REF][START_REF] Wu | Ring Origami: Snap-Folding of Rings with Different Geometries[END_REF][START_REF] Sun | Phase diagram and mechanics of snap-folding of ring origami by twisting[END_REF][START_REF] Roach | 4D Printed Multifunctional Composites with Cooling-Rate Mediated Tunable Shape Morphing[END_REF]. This entails defining the functional description of transformable or deployable systems according for various usage scenarios, on which computational reasoning is needed to embody knowledge and decisions related to 4D printing. To achieve the appropriate geometry and structure of shape-changing objects, decisions can be made on qualitative recommendation with the support of domain ontology (which is a component of symbolic artificial intelligence to formalize knowledge of an expertise domain with machine-interpretable description), as successfully demonstrated in the design of multimaterial 4D-printed objects [X,X]. However, addressing design for 3D/4D printing via symbolic reasoning alone is insufficient and demands both forward prediction of the properties, physical fields, load-displacement, and shape change of printed structures, and the inverse design of material distributions, topology, geometry, and stimulus fields (in terms of amplitude, location, and duration), as illustrated in Figure 1.

The printed objects can range from digital composites at the pixel (2D) or voxel (3D) level, to metamaterials or architected materials, and other active or intelligent material systems.

Microstructures can also be encoded in pixels or voxels to create a hierarchical or multiscale material system [START_REF] Gu | Bioinspired hierarchical composite design using machine learning: simulation, additive manufacturing, and experiment[END_REF][START_REF] Montgomery | Locally patterned anisotropy using grayscale vat photopolymerization[END_REF]. The forward problem takes the inputs from the embodiment and detail design stages, such as material properties, material distributions, geometry, topology, hierarchies, and stimulus fields, and predicts mechanical-response outputs such as structural properties (e.g., modulus, strength, and toughness, stiffness tensor for anisotropic systems), physical fields (e.g., strain and stress fields), nonlinear load-displacement response and, particularly, the shape or function changes of active material systems (which can be seen as deformation field) (Figure 1). The inverse design problem seeks to find appropriate design inputs for tasks such as extremizing property values and obtaining designated properties or responses (Figure 1).

Motivated by the needs to fully utilize the manufacturing flexibility, significant advancements have been made in developing design strategies. Topology optimization (TO) [START_REF] Sigmund | Topology optimization approaches[END_REF] represents a large class of methods that optimize the geometric features within a design domain to achieve certain objectives. While initiated for maximizing structural performance and minimizing weight, TO has found significant applications to a wide range of design problems in 3D/4D printing [START_REF] Liu | Current and future trends in topology optimization for additive manufacturing[END_REF][START_REF] Zhu | A review of topology optimization for additive manufacturing: Status and challenges[END_REF]. Examples include multiscale TO for enhanced structural performance [START_REF] Wu | Topology optimization of multi-scale structures: a review[END_REF][START_REF] Sanders | Optimal and continuous multilattice embedding[END_REF][START_REF] Senhora | Optimally-Tailored Spinodal Architected Materials for Multiscale Design and Manufacturing[END_REF][START_REF] Deng | Concurrent topology optimization of multiscale structures with multiple porous materials under random field loading uncertainty[END_REF] and programmed shape changes [START_REF] Zhu | Two-Scale Topology Optimization with Microstructures[END_REF], anisotropic composite TO for enhanced performance [START_REF] Boddeti | Simultaneous Digital Design and Additive Manufacture of Structures and Materials[END_REF][START_REF] Boddeti | Optimal design and manufacture of variable stiffness laminated continuous fiber reinforced composites[END_REF] and target actuated motions [START_REF] Boddeti | Optimal Soft Composites for Under-Actuated Soft Robots[END_REF], and TO for programming force-displacement response [START_REF] Li | Digital synthesis of free-form multimaterial structures for realization of arbitrary programmed mechanical responses[END_REF], shape changes of various 4D-printed systems including active composites [START_REF] Maute | Level Set Topology Optimization of Printed Active Composites[END_REF][START_REF] Geiss | Combined Level-Set-XFEM-Density Topology Optimization of Four-Dimensional Printed Structures Undergoing Large Deformation[END_REF], inflatable structures [START_REF] Tanaka | Turing pattern-based design and fabrication of inflatable shapemorphing structures[END_REF], rod-based structures [START_REF] Weeger | Isogeometric shape optimization of nonlinear, curved 3D beams and beam structures[END_REF][START_REF] Weeger | Isogeometric sizing and shape optimization of 3D beams and lattice structures at large deformations[END_REF], and magnetoactive materials [START_REF] Zhao | Topology optimization of hard-magnetic soft materials[END_REF], and continuous shape morphing paths or motions of soft composites [START_REF] Li | Programming and physical realization of extreme three-dimensional responses of metastructures under large deformations[END_REF][START_REF] Yuhn | 4D topology optimization: Integrated optimization of the structure and self-actuation of soft bodies for dynamic motions[END_REF]. In addition, TO has been used in the design of supports and infills for improved part printability [START_REF] Liu | Current and future trends in topology optimization for additive manufacturing[END_REF]. Despite its great success, TO generally requires complicated mathematical derivations and can be time-consuming due to the computationally expensive physical simulations, mostly finite element (FE) based, especially when geometric and material nonlinearities are involved.

Machine learning (ML), particularly deep learning [START_REF] Lecun | Deep learning[END_REF], offers an alternative approach that can handle complex mapping efficiently, making them attractive tools in the design for 3D/4D printing. ML can be broadly categorized into three types: supervised learning (SL), unsupervised learning (USL), and reinforcement learning (RL). SL learns the mapping in labeled data, which is often used for classification and regression tasks, such as property prediction. USL identifies inherent structures in unlabeled data, which may be used for clustering, dimensionality reduction, and discovering new structures. RL involves an agent that takes actions in an environment to maximize a reward, which is often used for decisionmaking and optimization tasks. The landscape of ML techniques is vast and consistently evolving. Here we list some popular methods used in design: support vector machine (SVM), decision trees (DT), neural networks (NN), convolutional neural networks (CNN), recurrent neural networks (RNN), graph neural network (GNN), generative adversarial networks (GAN), principal component analysis (PCA), variational autoencoders (VAE), gaussian process (GP), Bayesian learning (BL), active learning (AL), evolutionary algorithms (EA), among many others [START_REF] Goodfellow | Deep learning[END_REF]. The readers are referred to textbooks (e.g., [START_REF] Goodfellow | Deep learning[END_REF]) for working principles of these ML methods and to some recent reviews [START_REF] Guo | Artificial intelligence and machine learning in design of mechanical materials[END_REF][START_REF] Brodnik | Perspective: Machine learning in experimental solid mechanics[END_REF][START_REF] Jin | Recent Advances and Applications of Machine Learning in Experimental Solid Mechanics: A Review[END_REF] for ML applications to the area of mechanics of materials.

In this perspective article, we will review some recent works that apply ML methods to the design for 3D/4D printing. We primarily focus on the design for the mechanical properties or active responses of printed structures. While ML has many other applications in the entire field of 3D printing [START_REF] Jin | Machine Learning for Advanced Additive Manufacturing[END_REF][START_REF] Meng | Machine Learning in Additive Manufacturing: A Review[END_REF][START_REF] Wang | Machine learning in additive manufacturing: State-of-the-art and perspectives[END_REF][START_REF] Goh | A review on machine learning in 3D printing: applications, potential, and challenges[END_REF][START_REF] Qin | Research and application of machine learning for additive manufacturing[END_REF], such as processing parameter refinements [START_REF] Roach | Utilizing computer vision and artificial intelligence algorithms to predict and design the mechanical compression response of direct ink write 3D printed foam replacement structures[END_REF][START_REF] Killgore | A Data-Driven Approach to Complex Voxel Predictions in Grayscale Digital Light Processing Additive Manufacturing Using U-Nets and Generative Adversarial Networks[END_REF], insitu anomaly monitoring for quality controls [START_REF] Roach | Invertible neural networks for real-time control of extrusion additive manufacturing[END_REF], and printing material design and discovery [START_REF] Liu | Materials discovery and design using machine learning[END_REF][START_REF] Chen | Machine-Learning-Assisted De Novo Design of Organic Molecules and Polymers: Opportunities and Challenges[END_REF][START_REF] Batra | Emerging materials intelligence ecosystems propelled by machine learning[END_REF][START_REF] Yan | The Rise of Machine Learning in Polymer Discovery[END_REF], these are not the focus here. The paper is organized as follows. In Section 2, we will summarize existing works on ML in 3D/4D printing designs, which will be discussed in several categories of material systems and target properties/responses, corresponding to subsections 2.1 to 2.4. Section 3 is the last section for providing discussions and perspectives.

3D/4D printing designs 2.1 Mechanical properties of composites

Composites that possess pixel-or voxel-level material distributions can be naturally encoded as number arrays, which are suitable to serve as input data for ML models.

Extensive studies have been done on utilizing ML to predict or optimize various mechanical properties of composite (or heterogeneous) materials, such as effective modulus, strength, toughness, among others. Cecen et al. [START_REF] Cecen | Material structure-property linkages using three-dimensional convolutional neural networks[END_REF] employed 3D CNN to predict the effective modulus of 3D heterogeneous materials. Li et al. [START_REF] Li | Predicting the effective mechanical property of heterogeneous materials by image based modeling and deep learning[END_REF] utilized CNN to predict the effective modulus of 2D heterogeneous materials. Regarding strength and toughness, Buehler and coworkers [START_REF] Gu | Bioinspired hierarchical composite design using machine learning: simulation, additive manufacturing, and experiment[END_REF][START_REF] Gu | De novo composite design based on machine learning algorithm[END_REF][START_REF] Yu | Artificial intelligence design algorithm for nanocomposites optimized for shear crack resistance[END_REF] have made significant efforts in exploring the ML capability in composite optimizations. They developed an ML classification model [START_REF] Gu | De novo composite design based on machine learning algorithm[END_REF] to evaluate 2D composite designs in terms of their strength or toughness, and distinguish them as either "good" or "bad". The model, once trained with FE-generated data, can be used to assess the ranking of unseen designs, thus empowering the optimization to achieve high strength or toughness. The optimized designs based on this approach are shown in Figure 2A. An ML regression model [START_REF] Yu | Artificial intelligence design algorithm for nanocomposites optimized for shear crack resistance[END_REF] was later developed and combined with EA for optimizing the composite strength and toughness under shear loadings. In composite designs based on pixels, the design space is often tremendous. To mitigate this issue, Buehler and coworkers [START_REF] Gu | Bioinspired hierarchical composite design using machine learning: simulation, additive manufacturing, and experiment[END_REF] innovatively incorporated ML with the hierarchical design concept. This strategy uses specific microstructures containing numerous pixels as basic design units and then performs the prediction or design in a coarse-grain manner. As shown in Figure 2B, they proposed three elementary design units with different anisotropies. The ML model was then employed to predict the mechanical properties of the composite system, which, in turn, enabled fast optimizations. In addition to NN and CNN, the application of other ML methods such as active learning [START_REF] Chen | Generative Deep Neural Networks for Inverse Materials Design Using Backpropagation and Active Learning[END_REF] and reinforcement learning [START_REF] Sui | Deep Reinforcement Learning for Digital Materials Design[END_REF][START_REF] Yu | Hierarchical Multiresolution Design of Bioinspired Structural Composites Using Progressive Reinforcement Learning[END_REF] for the bioinspired composite designs have been explored. Furthermore, minimizing the overall compliance of irregular structural topologies (a form of heterogeneous materials) is a typical inverse problem in TO. A variety of ML models such as generative adversarial network (GAN) [START_REF] Rawat | A novel topology design approach using an integrated deep learning network architecture[END_REF] and convolutional neural network (CNN) [START_REF] Yan | Deep learning driven real time topology optimisation based on initial stress learning[END_REF] have been developed for TO tasks. We will not elaborate on these works but refer the readers to a recent review [START_REF] Woldseth | On the use of artificial neural networks in topology optimisation[END_REF].

Stress and strain fields

Forward prediction and material distribution design

Apart from macroscopic mechanical properties, the physical fields (e.g., stress and strain fields) in materials or composites are often of interest. One associated forward problem is the prediction of stress or strain fields given a structure. Nie et al. [START_REF] Nie | Stress Field Prediction in Cantilevered Structures Using Convolutional Neural Networks[END_REF] proposed a CNN model that can accurately predict the stress fields of cantilever structures with moderately arbitrary topologies and loads. Buehler and coworkers [START_REF] Yang | Deep learning model to predict complex stress and strain fields in hierarchical composites[END_REF] developed a conditional GANbased ML approach, which can accurately predict the stress and strain fields of composites with pixel-level material distribution, as shown in Figure 2C. The model also demonstrated the applicability to different component shapes, boundary conditions, and geometric hierarchies. Later on, they further extended this approach for the complete strain and stress tensor predictions, and demonstrated enhanced model generalization by enriching the training datasets with different hierarchies and component ratios [START_REF] Yang | End-to-end deep learning method to predict complete strain and stress tensors for complex hierarchical composite microstructures[END_REF].

The inverse problem, which manifests as various specific tasks and applications in different fields, has attracted significant interest. In the context of 3D printing, the goal is to design the material property distribution to achieve the target physical field under external loads.

Montgomery et al. [START_REF] Montgomery | Locally patterned anisotropy using grayscale vat photopolymerization[END_REF] managed to realize locally tunable anisotropy by using grayscale digital light processing (DLP) printed microstructural patterned units, where the CNN model was employed for the macroscale design of property field given target strain fields.

Material characterization in experimental mechanics

In experimental mechanics [START_REF] Brodnik | Perspective: Machine learning in experimental solid mechanics[END_REF][START_REF] Jin | Recent Advances and Applications of Machine Learning in Experimental Solid Mechanics: A Review[END_REF], the inverse problem holds particular significance for the material characterization or elastography, i.e., to identify the mechanical property field based on measured deformation field. Various ML methods have been developed for this problem. Although it differs from the design problem in 3D/4D printing, the underlying objective for both problems is to establish a mapping from deformation to property, suggesting that ML methodologies developed for one might be adapted for the other. Therefore, we briefly discuss the ML strategies used in the material characterization here.

Physics-informed neural networks (PINN), pioneered by Karniadakis and coworkers [START_REF] Raissi | Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations[END_REF],

have made significant advancements. PINN has been applied to various systems governed by partial differential equations (PDEs), both for forward and inverse problems. Specifically, Zhang et al. [START_REF] Zhang | Physics-informed neural networks for nonhomogeneous material identification in elasticity imaging[END_REF] implemented a PINN to determine the modulus field of nonhomogeneous hyperelastic materials subjected to external loads, based on the applied boundary displacement data. Later on, they expanded the approach to materials with heterogeneous inclusions or defects [START_REF] Zhang | Analyses of internal structures and defects in materials using physics-informed neural networks[END_REF]. Using PINN, they were able to identify both the geometry (or topology) and elastic properties of the inclusions (Figure 2D), which was demonstrated for materials with various constitutive behaviors, possibly with large deformations or plasticity. Moreover, a similar PINN approach was recently proposed by Mowlavi et al. [START_REF] Mowlavi | Topology optimization with physics-informed neural networks: application to noninvasive detection of hidden geometries[END_REF], who demonstrated the identification of inclusions with unknown numbers, various properties and irregular shapes. In addition to the works above, other PINN methods have been proposed to identify nonhomogeneous mechanical properties using full-field experimental data [START_REF] Hamel | Calibrating constitutive models with full-field data via physics informed neural networks[END_REF][START_REF] Chen | Learning hidden elasticity with deep neural networks[END_REF][START_REF] Kamali | Elasticity imaging using physics-informed neural networks: Spatial discovery of elastic modulus and Poisson's ratio[END_REF][START_REF] Chen | Physics-Informed Deep-Learning For Elasticity: Forward, Inverse, and Mixed Problems[END_REF][START_REF] Liu | cv-PINN: Efficient learning of variational physics-informed neural network with domain decomposition[END_REF]. One of major advantages of PINN is that it can integrate physical laws and data in the loss function, and thus require no or a small amount of data in many cases. Additionally, while PINN does not outperform conventional methods such as FE simulations for forward problems [START_REF] Grossmann | Can physics-informed neural networks beat the finite element method?[END_REF], it demonstrates superior performance for many inverse problems [START_REF] Jin | Recent Advances and Applications of Machine Learning in Experimental Solid Mechanics: A Review[END_REF].

In essence, PINN represents an optimization method leveraging the strong expressivity of deep neural networks. Despite its strength, this optimization nature implies that a fresh optimization run is required for each unique deformation field, making individual tasks time-consuming. Supervised learning (SL), although requiring a large amount of labeled data, can function much faster once the training is complete and thus has also been employed for inverse material characterization tasks. For example, Liu et al. [START_REF] Liu | Deep learning in frequency domain for inverse identification of nonhomogeneous material properties[END_REF] developed an ML model that combines discrete cosine transform (DCT) and CNN for accurate modulus field identification. The DCT was used to transform data into the frequency domain, thereby achieving dimensionality reduction and noise filtering. The CNN was then utilized to learn the inverse mapping of frequency data from the strain to the modulus field. This demonstrates the importance of dimensionality reduction in SL tasks when the design or property space is huge.

Mechanical metamaterials

Mechanical metamaterials, or architected materials, represent a broad class of engineered structures whose properties are determined more by their geometric configurations than by the constituent materials. They often involve intricate microstructural units (or architectures), making them highly amenable to fabrication via 3D printing. Such microstructures can yield exotic properties, such as tailorable anisotropy, unusual stressstrain curves, negative Poisson's ratio, and tunable acoustic properties. Therefore, the inverse microstructural design for desired properties is a significant facet in the 3D/4D printing design.

Anisotropic elasticity by generative models

In the design of mechanical metamaterials, an important objective is to achieve the desired, often anisotropic, stiffness tensor. Here, the associated forward problem, i.e., predicting the homogenized elastic stiffness tensor of an architecture (often referred to as homogenization), is typically more tractable using supervised ML models. However, the inverse problem presents a significant challenge as it is ill-posed due to the infinitedimensional geometric design space and the one-to-many mapping nature from properties to structures. To tackle the inverse problem, deep generative models have been employed to spawn new complex architected designs. For example, Zhao and coworkers [START_REF] Mao | Designing complex architectured materials with generative adversarial networks[END_REF] developed a GAN model that learns microstructural features from the enormous database they built. This model was then used to generate a myriad of isotropic-elastic architectures that approach the Hashin-Shtrikman (HS) upper bounds under a wide range of porosity (from 0.05 to 0.75). Additionally, Li and coworkers [START_REF] Challapalli | Inverse machine learning framework for optimizing lightweight metamaterials[END_REF] used a GAN to generate new 3D lattice structures whose compression strength were evaluated using a forward GP regressor [START_REF] Challapalli | Machine learning assisted design of new lattice core for sandwich structures with superior load carrying capacity[END_REF], thus discovering novel lattice architectures with high compression strength. Moreover, they utilized a GP regressor for finding novel 2D lattices with high recovery stress [START_REF] Challapalli | Inverse machine learning discovered metamaterials with record high recovery stress[END_REF].

Note that the design objective of these GAN-aided tasks is relatively limited, e.g., to extremizing a specific property. When we desire the target property to vary within a range, e.g., designing functionally graded metamaterials with spatially varying properties and microstructures, the problem becomes considerably more challenging. To tackle this challenge, Chen and coworkers [START_REF] Wang | Deep generative modeling for mechanistic-based learning and design of metamaterial systems[END_REF] utilized the VAE to aid the design process (Figure 2E). After building a large database, the encoder within the VAE can compress the microstructure information into a low-dimensional, highly structured latent space, from which the initial structure can be restored by the decoder. A forward predictor (i.e., regressor) was further employed to learn the relationship between the latent variables and the stiffness. As shown in Figure 2E, by continuously sampling points in the latent space, they generated diverse architecture families with gradually varying geometries and stiffness. This, in conjunction with conventional macroscale TO, enabled the multiscale design of functionally graded metamaterials that achieve target shape changes. Later on, Chen and coworkers [START_REF] Wang | Mechanical cloak via data-driven aperiodic metamaterial design[END_REF] further utilized the same approach for the design of metamaterialbased mechanical cloaks. In addition to VAE, they also employed latent variable GP to obtain a latent space for the designs of 2D and 3D lattice metamaterials [START_REF] Wang | Data-Driven Multiscale Topology Optimization Using Multi-Response Latent Variable Gaussian Process[END_REF].

Anisotropic elasticity by forward ML-supervised inverse ML model

Alternatively, Kochmann et al. proposed a general inverse design framework that ingeniously exploits a forward ML model to supervise an inverse ML model, and applied it to the spinodoid metamaterials [START_REF] Kumar | Inverse-designed spinodoid metamaterials[END_REF]. Figure 2F illustrates the concept of this approach. The forward ML model, which takes the design parameters as input to predict the stiffness (property), is pre-trained using labeled data and then leveraged to train the inverse model through the following procedure. The inverse model takes the target property as input and yields a trial design, which is fed into the forward model to predict the trial property. The inverse ML model is trained by minimizing the discrepancy between the predicted and target properties. Once trained, the inverse model can instantaneously generate the optimized designs on-demand, while the forward and inverse models together also provide a computationally efficient two-way structure-property mapping. Moreover, their approach enables the design of spatially varying architectures for functional grading. Later on, they extended this design framework to truss (or lattice) metamaterials by incorporating an appropriate design parameterization [START_REF] Bastek | Inverting the structure-property map of truss metamaterials by deep learning[END_REF], as well as to the pore growth-based cellular metamaterials [START_REF] Van 't Sant | Inverse-designed growth-based cellular metamaterials[END_REF]. More recently, they incorporated the forward ML model into gradientbased multiscale TO, where the ML allows for rapid forward homogenization given microstructure and efficient computation of gradients via automatic differentiation (AD), enabling the accelerated multiscale TO of functional graded spinodoid metamaterials [START_REF] Zheng | Data-driven topology optimization of spinodoid metamaterials with seamlessly tunable anisotropy[END_REF].

Stress-strain response

Owing to their unique microstructures, mechanical metamaterials often exhibit unusual stress-strain curves under external loads. The rational design of these structures, aimed at achieving diverse target load-deformation responses, holds significant engineering values.

Given the vast geometric design space, ML has been exploited for accelerating the inverse design process. For instance, Wang et al. [START_REF] Wang | Inverse design of shell-based mechanical metamaterial with customized loading curves based on machine learning and genetic algorithm[END_REF] combined an NN forward model and an EA to design novel central-symmetry, shell-based metamaterials with various target compressive stress-strain curves, such as strain hardening and softening. Note that a large amount of datapoints is needed to well represent a stress-strain curve, which implies high data dimensionality and can impair network performance. Employing multiple NNs can improve performance while also increasing computational cost [START_REF] Wang | Inverse design of shell-based mechanical metamaterial with customized loading curves based on machine learning and genetic algorithm[END_REF]. This issue is addressed in an alternative study with a different metamaterial system, where Deng et al. [START_REF] Deng | Inverse Design of Mechanical Metamaterials with Target Nonlinear Response via a Neural Accelerated Evolution Strategy[END_REF] utilized PCA to condense the stress-strain data, obtaining their principal components.

They then trained a NN to directly learn the relationship between the geometric design parameters and the resulting principal components, which achieves high prediction accuracy. Combining NN with an evolution strategy (a class of EA), they achieved an effective inverse design. Notably, they also attempted to use an inverse NN to learn the mapping from response to design, demonstrating that an inverse NN does not perform well due to the ill-posed nature of the inverse problem. Moreover, Bayesian ML has also been used to design super-compressible metamaterial blocks [START_REF] Bessa | Bayesian Machine Learning in Metamaterial Design: Fragile Becomes Supercompressible[END_REF].

In addition to the mechanical response mentioned above, other physical properties of metamaterials, including acoustic and optical properties, have also attracted significant interests and inspired studies utilizing ML methods [START_REF] Li | Designing phononic crystal with anticipated band gap through a deep learning based data-driven method[END_REF][START_REF] Wu | A machine learning-based method to design modular metamaterials[END_REF][100][101]. We will not elaborate on these here but refer the readers to a recent review [102].

Active shape-change response by 4D printing

Integrating 3D printing with active materials (or stimuli-responsive materials) enables the emerging 4D printing technique [START_REF] Kuang | Advances in 4D Printing: Materials and Applications[END_REF]. The ability to spatially control mechanical properties of multimaterial 3D printing further offers a vast design space. In general, the 4D printing concept is not limited to shape changes, but also property or functionality changing. In this section, we mainly discuss works using ML for designing shape-change response in 4D printing, possibly involving general active material systems. Generally speaking, design for shape change could be more challenging than that for mechanical properties such as stiffness and toughness, as high-dimensional data are needed to fully describe a shape change.

Finite element -evolutionary algorithm approach

To exploit large design space offered by multimaterial 3D printing, the computational design integrating mechanical simulations and optimizations has become a highly capable tool. For example, the gradient-based TO has made great progress [START_REF] Maute | Level Set Topology Optimization of Printed Active Composites[END_REF][START_REF] Geiss | Combined Level-Set-XFEM-Density Topology Optimization of Four-Dimensional Printed Structures Undergoing Large Deformation[END_REF][START_REF] Tanaka | Turing pattern-based design and fabrication of inflatable shapemorphing structures[END_REF][START_REF] Weeger | Isogeometric shape optimization of nonlinear, curved 3D beams and beam structures[END_REF][START_REF] Weeger | Isogeometric sizing and shape optimization of 3D beams and lattice structures at large deformations[END_REF][START_REF] Zhao | Topology optimization of hard-magnetic soft materials[END_REF][START_REF] Li | Programming and physical realization of extreme three-dimensional responses of metastructures under large deformations[END_REF][START_REF] Yuhn | 4D topology optimization: Integrated optimization of the structure and self-actuation of soft bodies for dynamic motions[END_REF], yet it may suffer from low design efficiency and high numerical complexity when geometric and material nonlinearities are involved. Alternatively, gradient-free optimization algorithms such as EA have also achieved great success. For example, Hamel et al. [103] employed the FE and EA (FE-EA) for the inverse design of active composite (AC) beams with voxel-level material distributions. The approach was later extended to magneto-AC beams by Wu et al.

[104], who also developed voxel-level encoding approach in direct ink write 3D printing method. Athinarayanarao et al. [105] used FE-EA approach to design AC beams integrated with topological void voxels. The FE-EA approach is time-consuming and cannot deal with very complicated target shapes. This is because the EA typically requires numerous forward FE simulations to explore a large design space, thus suffering from high computational cost. To reduce computational cost, researchers have developed forward reduced order models (ROMs) to speed up evolutionary designs for different material systems, such as 3D voxel ACs [106, 107] and magneto-AC beams [108, 109]. Yet, faster forward models, preferably capable of handling vast amounts of data, are still highly desired to enable more efficient inverse designs. As such, the ML approach is particularly suited to deliver ultrafast, massive predictions and has been extensively exploited to address the inverse design problem.

Integrated forward ML and optimization algorithms

One common approach is to use ML as forward predictive models, which is combined with optimization algorithms for the inverse design. In this case, it is crucial to select the appropriate network architecture based on the specific design problem (active material systems, target response, etc.). For AC beams, Zhang et al. [110] applied multiple ML models to the forward prediction problem and found the CNN performed best. Later on, Sun et al. [111] found the RNN is particularly suited for the beam problem as it inherently preserves a sequential data dependency similar to that arises from the beam deformation (Figure 3A). The RNN thus demonstrated remarkably high accuracy in the forward shape prediction based on material distributions, which then empowered EA to achieve highly efficient inverse designs of complicated, even hand-drawn, target shapes. For another AC system, magneto-mechanical metamaterials, Ma et al. [112] ingeniously encoded the magnetization distribution into a 2D array and utilized a deep residual network (ResNet) model to learn the relationship between magnetization distribution and active strain (Figure 3B). They further demonstrated the ResNet-empowered discrete artificial bee colony (DABC) algorithm can rapidly achieve inverse designs for various target active strains and Poisson's ratios. In addition, ML has also been used for designing shape changes of auxetic metamaterials with hierarchical pattern distributions [113] and for predicting the bending angle of soft pneumatic robots given geometric parameters [114].

Inverse ML approaches

One alternative approach is to train an inverse ML model that maps from the target response to the optimized design. For example, for inflatable composite membranes, Forte et al. [115] successfully utilized an inverse NN to learn the mapping from 3D target inflated shapes to the optimized 2D pixel-level material distributions (Figure 3C). Similarly, for buckling mesosurfaces, Zhang and coworkers [116] trained an inverse NN to directly predict the optimized microlattice precursor configurations needed to realize complex target surfaces upon buckling (Figure 3D). More recently, they applied a similar strategy for the inverse design of buckling frame structures that can morph into complex target shapes [117]. Note that these inverse ML models were all trained to learn the inverse mapping directly from the data. Despite their successes, such models may struggle with complex inverse problems where multiple distinct designs can produce very similar responses (thus causing a one-tomany issue that can be harmful to the training), as exemplified in metamaterials design [START_REF] Deng | Inverse Design of Mechanical Metamaterials with Target Nonlinear Response via a Neural Accelerated Evolution Strategy[END_REF]. In this case, the use of forward ML to supervise an inverse ML model [START_REF] Kumar | Inverse-designed spinodoid metamaterials[END_REF] can facilitate learning the inverse map, as discussed in Section 2.3.2. Espinosa and coworkers [118] utilized this approach to program the shape changes of kirigami metamaterials upon tension-induced buckling.

Perspective

It is typically more tractable to learn the forward mapping from designs to responses given labeled data. However, the inverse problem is challenging as it is ill-posed due to the large, often infinite-dimensional, design space and the one-to-many mapping nature from responses to designs. Moreover, in many design tasks, instead of simply optimizing or extremizing a single property, the target response is desired to vary within a range, such as achieving the various target mechanical properties or attaining different target shape transformations under external/internal stimuli. This scenario makes the inverse design more challenging, particularly when the target response involves high-dimensional data, such as the shape-change response based on the material distribution in 3D space and stimuli distribution over both time and space. ML holds significant promise in tackling these challenges. In the following, we briefly summarize existing and potential strategies for the effective application of ML in 3D/4D printing designs (Figure 4). In inverse design, accurate forward prediction is crucial and, depending on the specific problem, it may require varying amounts of data. As the design space is typically huge, using some data dimensionality reduction methods, such as PCA, DCT and AE, to precompress the data often facilitates the learning and improves the performance. Additionally, observing the specific problem to select an appropriate network architecture is important.

With an efficient forward ML (F-ML) model in place, several strategies exist for the optimization.

First, combine an F-ML with an optimization algorithm, either gradient-based or gradientfree. Compared to conventional computational methods, the high speed of ML allows for accelerated design with any optimization algorithms, as they all involve the forward prediction steps. Additionally, the automatic differentiability of F-ML allows for efficient computation of gradients (or sensitivities) and thus can significantly accelerate gradientbased optimizations.

Second, utilize generative models like VAE or GAN to generate new designs and employ an F-ML for screening. Specifically, VAE can be used to create a continuous, structured latent space, and in this case, the F-ML can learn the mapping from the latent variables to the property. Note that EA may also be seen as a form of generative modeling.

• Third, integrated F-ML and RL may be used for the inverse design. Previous studies have employed RL for the toughness maximization of 3D-printed composites [START_REF] Yu | Hierarchical Multiresolution Design of Bioinspired Structural Composites Using Progressive Reinforcement Learning[END_REF] and the compliance minimization of structural topologies [119]. In these works, the FE was utilized for the reward evaluation during the RL training, which is computationally expensive. Integrating pretrained F-ML with RL could significantly improve the design efficiency, rendering RL more feasible for largescale problems.

Furthermore, methods based on inverse ML (I-ML) can be used, which may or may not need F-ML depending on the specific training strategy for the I-ML. One strategy is to directly train the inverse model using labeled data, which can be effective at times [START_REF] Liu | Deep learning in frequency domain for inverse identification of nonhomogeneous material properties[END_REF]115] but often fails for complex inverse problems [START_REF] Deng | Inverse Design of Mechanical Metamaterials with Target Nonlinear Response via a Neural Accelerated Evolution Strategy[END_REF]120] due to the ill-definition (i.e., oneto-many mapping). An alternative strategy leverages the F-ML to train the I-ML (i.e., F-ML supervised I-ML). In this case, the I-ML takes into the target property and yields a trial design, which is fed into the F-ML to predict the trial property. The training of the inverse ML model is done by minimizing the difference between the predicted and target properties.

Moreover, the I-ML training may be supervised by other differentiable forward models such as ROMs, not necessarily F-ML. For all strategies above, once the training is complete, the I-ML can promptly generate the optimized designs.

To delve even further into the perspectives and, more specifically, to leverage the benefits of ML while ensuring a complete understanding, there is a strategic need to integrate materials/design informatics and ML for scientists [123][124][125][126][127][128][129][130]. This trend of merging symbolic AI and ML is commonly referred to as neuro-symbolic integration. It entails constructing a comprehensive knowledge/database enhanced with computational procedures to discover innovative materials and structures. Symbolic logic representations can then be used in ML to incorporate background knowledge in learning models and algorithms. This approach ensures transparency to humans, deductive reasoning, the integration of expert knowledge, and structured generalization, particularly in scenarios with limited data where physics is essential [131,132]. This symbolic AI layer proves valuable for working with small datasets and/or providing rationale in quantitative investigations involving extensive data generated from high-throughput computational materials design.

Beyond achieving material or structural designs with optimized responses, the reliable and accurate printing of intended designs is also crucial. This involves issues such as design optimizations considering manufacturability/printability, printing parameters refinement, quality monitoring and controls, and material design and discovery. Additionally, integrated design for the process-structure-property mapping may be important [121]. Using DLP as an example, the desired voxel-level material distributions may deviate significantly from the actual printing, especially for small-sized objects, due to factors such as light penetration, uneven light distribution and species reaction-diffusion [START_REF] Montgomery | Locally patterned anisotropy using grayscale vat photopolymerization[END_REF]122]. In this case, refining printing parameters (e.g., light field distribution) for appropriate compensations poses a multiphysics inverse problem, which may also be addressed using ML strategies outlined above.

In conclusion, this perspective paper highlights the rapidly growing role of ML in addressing the complex inverse design problems in 3D/4D printing. First, we provide an overview of common forward and inverse problems, relevant types of structures, and design space and responses in 3D/4D printing. Next, by reviewing recent works that employ a variety of ML approaches, we provide an in-depth discussion on how ML can be harnessed to design printed structures with specific mechanical responses, from structural properties to load-displacement responses, physical fields and active shape changes.

Finally, after discussing the challenges, we highlight the existing ML approaches and discuss their potential extensions. Broader design problems in the field of 3D/4D printing are further discussed. Despite existing challenges, the integration of ML into 3D/4D printing design has immense potential to revolutionize the field. Our work aims to serve as a foundational guide, offering critical insights for researchers and practitioners looking to leverage ML for efficient and intelligent designs in additive manufacturing.

Figure 1 .

 1 Figure 1. Overview of forward and inverse problems in 3D/4D printing utilizing ML. The design space typically involves material distribution, topology, geometry, and stimulus fields. The output generally includes mechanical properties, load-displacement, physical

Figure 2 .

 2 Figure 2. Applications of ML in various material systems with different design parameters and mechanical responses. (A) Optimized material distributions of composites for high toughness (top row) and strength (bottom row). (B) Hierarchical design units (left) and optimized designs for high toughness (right). Reproduced from Ref. [13] with permission from the Royal Society of Chemistry. (C) Predictions of stress and strain fields of composites with pixel-level material distributions using conditional GAN. (D) Inverse identification of material distributions based on boundary displacements using physics-

Figure 3 .

 3 Figure 3. Applications of ML in various active material systems for designing active shapechange response. (A) Forward predictions using RNN-based ML and inverse design using

Figure 4 .

 4 Figure 4. Overview of ML strategies for designs in 3D/4D printing.

Acknowledgments H.J.Q. acknowledges the support of an AFOSR grant (FA9550-20-1-0306; Dr. B.-L. "Les" Lee, Program Manager) and a gift fund from HP, Inc.