Tailoring the architecture of cellular materials — including random foams as well as deterministic truss-, plate-, and shell-based lattices — has produced a wide variety of metamaterials (also referred to as architected materials) whose macroscale physical and mechanical properties can be controlled by a careful design at the microstructural level. Supported by optimization techniques1,2,3,4,5,6,7 and advances in additive manufacturing8, truss- and plate-based mechanical metamaterials9,10,11,12,13,14,15 have gained prominence as, e.g., lightweight cellular solids with engineered stiffness, strength, or energy absorption. Unfortunately, they also suffer from detrimental stress concentrations found at all intersections of structural members, which generally leads to low strength and poor recoverability16,17,18. Metamaterials based on smooth topologies — such as triply periodic minimal surfaces (TPMS) — address this shortcoming19 by avoiding points of stress concentration while also showing excellent scaling of stiffness and strength with respect to density20,21,22 (leveraging the benefits of doubly curved surfaces23 that engage slender structures primarily in stretching rather than bending24,25). Most recently, spinodal topologies — extensively studied in the 1960s–1990s — have found a revival in metamaterials26,27,28,29. They are naturally created by self-assembly processes such as spinodal decomposition during phase separation30,31 in, e.g., nanoporous metal foams32,33,34, microemulsions35,36, and polymer blends37,38. Similar to TPMS, spinodal topologies consist of smooth, non-intersecting surfaces having nearly zero mean curvature29,39 with unique topological properties26,28,29,39,40,41,42. Spinodal topologies can be realized as solid networks (obtained from removing one of the two phases after phase separation, such as in nanoporous foams26,29) and as shell networks (retaining only the interfaces between the two phases27,28). Overall, spinodal topologies cover an extreme and seamless range of anisotropic (direction-dependent) mechanical properties, as verified, e.g., by their tailorable anisotropic elastic moduli26 — creating materials that are stiff in some directions and soft in others. By contrast to unit-cell-based truss-, plate-, or TPMS-type architectures, spinodal designs are non-periodic, which greatly enhances the design space and achievable directionality. Moreover, non-periodic architectures do not suffer from the fabrication-based introduction of symmetry-breaking defects — by contrast to periodic metamaterials whose sensitivity to defects deteriorates their mechanical properties22,27,28,43,44. As we further demonstrate here, the non-periodicity of spinodal networks (without geometric unit cell limitations or tessellation requirements) — counter-intuitively — enables the effortless creation of functionally graded materials with spatially varying properties. Finally, the emergence of spinodal topologies during self-assembly (such as by arresting spinodal decomposition in polymeric emulsions27) promises scalable manufacturing of centimeter-scale samples with nanoscale features, in contrast to conventional additive manufacturing-based designs.

While spinodal topologies hence promise an intriguingly large design space as well as advantages over most competing architectures, key challenges persist. It is practically impossible to theoretically explore the full anisotropic design space, since topologies are obtained by simulating the time-dependent Cahn–Hilliard phase separation process26,28 (see Fig. 1a), which can take hours per simulation on a modern computer. The only reported alternative29 is limited to isotropy, which strongly limits the achievable property space. To overcome this limitation, we here deploy a cellular design strategy that bypasses expensive simulations and leverages the statistics of spinodal topologies, resulting in a class of metamaterial architectures, which we term spinodoid (spinodal-like) topologies, with enormous anisotropic design and property spaces. Exploring those, however, requires another approach for the inverse design to be reported here.

Fig. 1: Design of spinodoid metamaterials.
figure 1

a Conventional methodology of generating spinodal topologies by computationally expensive phase field simulations in combination with a level set. The anisotropic lamellar topology shown here was obtained by such simulations with anisotropic surface energies (see ref. 26 for details). b Schematic view of the design parameters (cone angles) θ1, θ2, and θ3 in our anisotropic GRF approach. Black dots indicate the N wave vectors ni sampled from within the cones. c Spinodoid topology generation strategy using the GRF approach, followed by computational homogenization for effective property extraction. Here the example of an isotropic GRF (θ1 = θ2 = 0°, θ3 = 90°) and its corresponding topology (for ρ = 0.5) and elastic surface (obtained by finite element simulations) are shown. The elastic surface illustrates the effective (normalized) directional Young’s modulus E(d) for all directions dS2 in the Cartesian basis \(\{{\hat{{\boldsymbol{e}}}}_{1},{\hat{{\boldsymbol{e}}}}_{2},{\hat{{\boldsymbol{e}}}}_{3}\}\). Indicated in light and dark gray are the elastic Voigt bound (ρEs) and the Hashin–Shtrikman upper bound, respectively, for comparison.

Structure–property relations of all existing metamaterials have primarily been explored in a forward fashion: given a microstructure, one extracts the effective properties by methods of homogenization. The inverse challenge — identifying a microstructural topology that meets the mechanical property requirements — has often been addressed by inefficient trial and error, requiring a designer’s intuitive understanding of the structure–property relations. Systematic approaches such as topology optimization and genetic algorithms2,45,46 are not only beneficial but also computationally expensive (relying on repeated sampling and/or computation of the effective properties) and highly dependent on initial guesses. In addition, while the forward problem, i.e., mapping from topological parameters to property space, is well defined, the inverse problem is ill-posed (multiple topologies can have the exact same or similar effective properties). Recent advances in machine learning and deep learning have shown success in overcoming this challenge. Machine learning-based surrogate models — trained in a data-driven47,48 (supervised) or physics-driven49,50,51,52 (unsupervised) setting, which can bypass expensive simulations and/or experiments — have been developed for applications, including metamaterials3,53, composites54,55, two-dimensional materials, and nanotubes56,57. More recently, surrogate models based on autoencoders and variational autoencoders58,59 have attracted interest due to their ability to obtain a low-dimensional latent space parametrization of the design space. Once trained, surrogate models accelerate the search for possible candidates that fit the design requirements from a large design space. However, such approaches require solving an optimization problem based on the (forward-only) surrogate model, which prevents an on-demand inverse design framework.

We here deploy a machine learning strategy for the inverse design of the newly introduced spinodoid topologies, which efficiently predicts an optimal topology for a given set of sought properties. Our approach, in contrast to surrogate optimization methods, provides a computationally inexpensive two-way relationship between topological parameters and mechanical properties. Although we focus on the anisotropic elasticity of spinodoid architectures (and demonstrate their potential for, e.g., spatially varying patient-specific bone replacements), our inverse design approach — inspired by similar problems in the nanophotonic and plasmonic community60,61,62,63,64,65 — is sufficiently general to apply, in principle, to any physical material properties and to any finite set of design parameters.

In the following, we first introduce the class of spinodoid topologies, followed by a discussion of the tunable anisotropic material behavior with opportunities for functionally graded spinodoid metamaterials. Next, we present the data-driven inverse design framework, whose application to spinodoid metamaterials results in topologies with as-designed anisotropic stiffness. We close by demonstrating the (inverse) design of synthetic bones based on spinodoids.


From spinodal to spinodoid topologies with tunable anisotropy

Spinodal topologies form naturally when a homogeneous solution decomposes into two spatially separated uniform phases in a diffusion-driven fashion. During the early stages of phase separation, small fluctuations in the phase distribution are described accurately by the linear Cahn–Hilliard model66 for an isotropic evolution of the underlying phase field φ(x) representing the concentration fluctuation of one phase at position x Ω in a domain \(\Omega \subset {\mathbb{R}}^{3}\) (Fig. 1a). Cahn30 showed that the phase field may be described by a superposition of a large number N 1 of standing waves of constant wavenumber β > 0, mathematically known as a Gaussian random field (GRF)67:

$$\varphi ({\boldsymbol{x}})=\sqrt{\frac{2}{N}}\mathop{\sum }\limits_{i = 1}^{N}\cos (\beta {{\boldsymbol{n}}}_{i}\cdot {\boldsymbol{x}}+{\gamma }_{i}),\, {\rm{with}}\quad {{\boldsymbol{n}}}_{i} \sim {\mathcal{U}}({S}^{2}),\, {\gamma }_{i} \sim {\mathcal{U}}([0,2\pi )),$$

where \({S}^{2}=\{{\boldsymbol{k}}\in {\mathbb{R}}^{3}:\,\parallel {\boldsymbol{k}}\parallel\, =1\}\) denotes the unit sphere in three-dimensional (3D). ni and γi denote, respectively, the directions and phase angles of the ith wave vector, which are random variables independently sampled from uniform probability distributions. While the original Cahn–Hilliard equation applies only to isotropic systems, it has been exploited for simulating anisotropic phase separation68,69,70,71,72,73,74,75 by introducing directional-dependent interface energy or phase mobility/diffusivity, both of which result in cellular architectures with anisotropic properties. Toward the same objective but without the need to simulate the phase separation process, we here propose an anisotropic extension of Cahn’s GRF-based solution (1) as a means to efficiently generate smooth spinodal-like topologies.

Our point of departure is the observation that the wave vectors in (1) are isotropically sampled from the unit sphere. To introduce anisotropy, we restrict those ni directions by biasing their statistical sampling with a non-uniform orientation distribution function (ODF), favoring some directions and neglecting others. Since the resulting topologies approximate the products of spinodal decomposition, we speak of spinodoid topologies. As a particular example, inspired by crystallographic texture poles, we introduce the distribution

$${{\boldsymbol{n}}}_{i} \sim {\mathcal{U}}\left(\left\{{\boldsymbol{k}}\in {S}^{2}:\left(| {\boldsymbol{k}}\cdot {\hat{{\boldsymbol{e}}}}_{1}|\, >\,\cos {\theta }_{1}\right)\oplus \left(| {\boldsymbol{k}}\cdot {\hat{{\boldsymbol{e}}}}_{2}|\, >\,\cos {\theta }_{2}\right)\oplus \left(| {\boldsymbol{k}}\cdot {\hat{{\boldsymbol{e}}}}_{3}|\, >\,\cos {\theta }_{3}\right)\right\}\right),$$

where \(\{{\hat{{\boldsymbol{e}}}}_{1},{\hat{{\boldsymbol{e}}}}_{2},{\hat{{\boldsymbol{e}}}}_{3}\}\) denotes the Cartesian basis and angles \({\theta }_{1},{\theta }_{2},{\theta }_{3}\in \{0\}\cup [{\theta }_{\min },\pi /2]\) represent the allowed spread of wave vectors about each of the three orthogonal base directions (Fig. 1b). Choosing, e.g., θ1 = θ2 = 0 restricts wave vectors to the cone, which forms an angle less than θ3 > 0 with the x3-axis (and the interfaces of the topologies align preferentially perpendicular to those ni vectors). Controlling the value of θ3 allows a seamless transition from a phase field with an isotropic structure (θ3 = π/2, reducing to the unit sphere) to that with a lamellar structure (θ3 < π/2). As representative examples, Figs 1c and 2 show specific choices of \(\left({\theta }_{1},{\theta }_{2},{\theta }_{3}\right)\) and the resulting isotropic, lamellar, columnar, and cubic symmetries.

Fig. 2: Anisotropic spinodoid topologies and their properties.
figure 2

af Example solid topologies and their corresponding elastic surfaces, demonstrating the wide range of anisotropy controlled by the design parameters (θ1, θ2, θ3) for ρ = 0.5. Elastic surfaces illustrate the effective (normalized) directional Young’s modulus E(d) for all directions dS2 in the Cartesian basis \(\{{\hat{{\boldsymbol{e}}}}_{1},{\hat{{\boldsymbol{e}}}}_{2},{\hat{{\boldsymbol{e}}}}_{3}\}\). Indicated in gray is the elastic Voigt bound (ρEs) as an upper bound.

From the above phase field, a bicontinuous topology is constructed by computing level sets or isosurfaces of the phase field29,30,40,41. To this end, we define a binary indicator function χ(x) that denotes the presence of material vs. void at x. This applies equally to the generation of solid- and shell-type architectures27,28:

$$\begin{array}{*{20}{l}}{{\rm{solid}}\,{\rm{network:}}\quad\chi ({\boldsymbol{x}})}& = &{\left\{ {\begin{array}{*{20}{l}}{1\quad {\rm{if}}\quad\varphi ({\boldsymbol{x}}) \le {\varphi _0}}\\{0 \quad {\rm{if}} \quad \varphi ({\boldsymbol{x}})\, >\, {\varphi _0}}\end{array}} \right.}\\{{\rm{shell}}\,{\rm{network:}}\quad\chi ({\boldsymbol{x}})}& = &{\left\{ {\begin{array}{*{20}{l}}{1\quad {\rm{if}} \quad \varphi ({\boldsymbol{x}}) = {\varphi _0}}\\{0\quad {\rm{if}} \quad \varphi ({\boldsymbol{x}}) \, \ne \, {\varphi _0}}\end{array}} \right.}\,.\end{array}$$

For solid networks, threshold φ0 is computed as the quantile (of normally distributed random variable φ) evaluated at the average relative density \(\rho =\mathbb{E}[\chi ]\) of the solid phase: \({\varphi }_{0}=\sqrt{2}\ {{\rm{erf}}}^{-1}(2\rho -1)\). The relative density ρ provides a measure of the porosity of a given topology. Since small relative densities ρ 1 may contain disjoint solid domains, we restrict the design space to ρ [0.3, 1] in the following (for the same reason, we choose the minimum cone angle as \({\theta }_{\min }=1{5}^{\circ }\)); for isotropic topologies, ρ > 0.159 was recently shown to ensure bi-continuity29. For shell topologies, the zero isosurface (φ0 = 0) is chosen. We note that the area per unit volume of the isosurface of stochastic fields of type (1) is constant regardless of the anisotropy76, and the area per unit volume of the zero isosurface of an isotropic GRF bounded by a unit cell is40,41

$$s=\frac{2}{\sqrt{3}\pi }{e}^{-{\varphi }_{0}^{2}/2}\beta =\frac{2}{\sqrt{3}\pi }\beta ,$$

so that the relative density of all slender shell topologies is obtained as ρ = sh with shell thickness h (note that the relative density of shell architectures can be orders of magnitude below that of their solid counterparts). The complete set of design parameters to characterize our anisotropic spinodoid topologies is hence Θ = (ρ, θ1, θ2, θ3).

We stress that the thus generated topologies are not mere mathematical constructs but have physical relevance: they may be interpreted as an approximate solution to the modified Cahn–Hilliard equation modeling spinodal decomposition in case of an anisotropic diffusive mobility (see Supplementary Information, Section 1). It is for this reason that the spinodoid architectures presented here may indeed be expected from phase separation with direction-dependent interface mobility. While the self-assembly based fabrication has been demonstrated only for isotropic structures27, phase separation in block copolymers and polymeric micro-emulsions is a promising avenue for the self-assembly of anisotropic spinodal topologies36,37,38,77,78.

The above architectures are generally non-periodic, which is expected from foams but is a departure from conventional metamaterial designs and comes with advantages. First, non-periodic topologies are more resilient to fabrication-related, symmetry-breaking imperfections27,28. The lack of symmetry also affects the buckling behavior and suppresses bifurcation modes of intermediate wavelengths (spanning single to multiple unit cells) often exploited in periodic metamaterials79,80,81,82,83. Second, despite the complex architecture (applying to an, in principle, infinite design space without periodicity or symmetries), the mathematical description is simple and can be encoded in an ODF and parametrized by a finite set of design parameters (e.g., Θ). Third, the topology can be varied smoothly and seamlessly across a given body for the purpose of functional grading without issues arising from unit cell tessellation and discontinuous topologies (which, in contrast, is an active challenge for periodic topologies, including trusses, plates, and shells). Although functional grading with smooth transitions was demonstrated for TPMS topologies84,85,86, the triple-periodicity constraint results in a limited and discrete design space (including the well-known Schwarz Primitive87 and Schoen Gyroid88) and included limited examples of anisotropy in TPMS topologies89,90,91. A unified continuous design space, particularly in terms of a tunable anisotropy of the resultant metamaterial, has remained a challenge. Here a spatially variant spinodoid topology can be generated by the spatial superposition of two or more random fields (Fig. 3 and Supplementary Information, Section 4), which offers unprecedented opportunities for spatially variant architectures. In addition to locally varying the topology, this approach can also create architectures with spatially variant microstructural length scales (e.g., to vary locally the characteristic pore size); an example is shown in Supplementary Information, Section 4. Finally, the non-periodic field-based formulation (1) is space-filling and can be leveraged to create spinodoid solids of arbitrary macroscopic shapes (without the need for adaptive tessellation and conforming algorithms near the body’s boundary, as is the case for most periodic unit cell-based designs).

Fig. 3: Functional grading.
figure 3

A spatially variant architecture interpolating between columnar (θ1 = 0°, θ2 = θ3 = 30°) and lamellar (θ1 = 30°, θ2 = θ3 = 0°) topologies (indicated by orange and blue colors, respectively). The cellular solid is generated by the superposition of the corresponding anisotropic GRFs φ1 and φ2 in a linearly graded fashion: \(\varphi ({\boldsymbol{x}})=\left(1-\lambda ({x}_{1})\right){\varphi }_{1}({\boldsymbol{x}})+\lambda ({x}_{1}){\varphi }_{2}({\boldsymbol{x}})\) with λ(x1)  [0, 1] (see Supplementary Fig. 4); the elastic surfaces corresponding to the two GRFs are shown with their design parameters. The level set φ0 is set to zero for a homogeneous relative density of ρ = 0.5. As a consequence of the heterogeneous stiffness distribution, loads are carried and deformation is observed inhomogeneously across the sample (as demonstrated in Supplementary Information, Section 4 for axial compression).

Tunable anisotropic material behavior

As a representative example of effective properties, we characterize the 3D elastic stiffness of solid topologies (shell topologies can be treated analogously, which have great potential due to their optimal scaling of stiffness and strength with density28 and their extreme resilience verified experimentally in ceramic thin-shell architectures27). We apply computational homogenization by the finite element method (FEM), using a representative volume element (RVE) for each chosen topology made of a homogeneous, isotropic, linear elastic base material (Young’s modulus Es, Poisson’s ratio νs = 0.3). The resulting effective (homogenized) constitutive behavior of the metamaterial is linear elastic with an effective fourth-order elastic modulus tensor \(\mathbb{C}\) extracted from the RVE via applying average strains 〈ϵ〉, computing volume-averaged stresses 〈σ〉, and solving \(\langle {\sigma }_{ij}\rangle ={\mathbb{C}}_{ijkl}\langle {\epsilon }_{kl}\rangle\). Since the topologies lack periodicity, we apply affine displacement boundary conditions to the RVE, so that the homogenized stiffness is generally an overestimate of the true stiffness (for sufficiently large RVEs relative to microstructural features, assuring statistical homogeneity and a separation of scales, this estimate presents a good measure of the effective stiffness of the metamaterial). Numerical details are contained in Supplementary Information, Section 2. The microstructural length scale is inversely proportional to the wavenumber β in (1). For a cubic RVE of size l × l × l, we found β = 10π/l to be sufficient for an effective separation of scales; similar observations were reported previously for spinodal topologies28,29.

To visualize the elastic anisotropy, the elastic surface is computed, showing the effective Young’s modulus along a direction dS2 as

$$E({\boldsymbol{d}})={\left(\mathop{\sum} \limits_{i,j,k,l = 1}^{3}{\mathbb{C}}_{ijkl}^{-1}{d}_{i}{d}_{j}{d}_{k}{d}_{l}\right)}^{-1}.$$

Figure 2 illustrates how design parameters (θ1, θ2, θ3) control the elastic surface. In addition, the relative density ρ controls the absolute stiffness scaling (see Supplementary Fig. 2). Note that the principal stiffness directions here are by choice always aligned with coordinates \(\{{\hat{{\boldsymbol{e}}}}_{1},{\hat{{\boldsymbol{e}}}}_{2},{\hat{{\boldsymbol{e}}}}_{3}\}\). However, a coordinate rotation (i.e., \(\hat{\mathbb{C}}_{pqrs}={\sum }_{i,j,k,l}{R}_{pi}{R}_{qj}{R}_{rk}{R}_{sl}{\mathbb{C}}_{ijkl}\) for a rotation tensor R SO(3)) can further expand the design space to obtain stiffness tensors with arbitrary principal directions.

All information related to the structure of the elastic surface of a metamaterial is now encoded in the effective stiffness matrix \(\mathbb{C}\), whose components — by exploiting symmetries and the orthotropic nature of all architectures defined by Eq. (2) — reduces to the following vector of independent elastic moduli: \({\boldsymbol{S}}=({\mathbb{C}}_{1111},{\mathbb{C}}_{1122},{\mathbb{C}}_{1133},{\mathbb{C}}_{2222},{\mathbb{C}}_{2233},{\mathbb{C}}_{3333},{\mathbb{C}}_{2323},{\mathbb{C}}_{3131},{\mathbb{C}}_{1212})\).

Data-driven inverse design

Toward the creation of cellular solids with as-designed properties, we need to address the inverse design question: how can we systematically and efficiently find a topology from within the design space that has the target anisotropic elastic moduli? In contrast to existing methods, we use offline training of a machine learning model that provides a computationally inexpensive two-way relationship between topological parameters and mechanical properties. We propose a machine learning technique based on deep neural networks (NNs)92, which require the a-priori creation of a sufficiently large and representative training dataset \({\mathcal{D}}=\left\{\{{{\mathbf{\Theta}}}_{i},{{\boldsymbol{S}}}_{i}\},i=1,\ldots ,n\right\}\) consisting of n pairs of design parameters Θ and corresponding stiffness S, which are computed by FEM homogenization. Note that a large dataset is made possible only because of the computationally inexpensive GRF-based formulation of the spinodoid topology. Creating a dataset by simulating the time-dependent Cahn–Hilliard phase separation process is impractical as each simulation can take several hours on a modern computer (in contrast to few seconds for the GRF-based formulation; see Supplementary Information, Section 5).

Let \({{\mathcal{F}}}_{\omega }\) be a NN that maps design parameters Θ onto stiffness S in a forward fashion and is hence referred to as f-NN. We choose a multi-layer perceptron (MLP) architecture (Fig. 4a) whose parameter set ω contains the weights and biases of all hidden layers (see Supplementary Information, Section 5). Training the f-NN requires minimizing the (mean squared error) loss between true values and predictions with respect to the f-NN-parameters ω, i.e.,

$${{\mathcal{F}}}_{\omega }\leftarrow \mathop{\min }\limits_{\omega }\frac{1}{n}\mathop{\sum }\limits_{i = 1}^{n}\parallel {{\mathcal{F}}}_{\omega }[{{\mathbf{\Theta}}}_{i}]-{{\boldsymbol{S}}}_{i}{\parallel }^{2}.$$

This problem is well posed, and we use a back-propagation algorithm93 to perform the optimization in Eq. (6). We leverage automatic differentiation94 (which is also the implementation basis of back-propagation in most modern machine learning packages) to compute the gradients \({\mathcal{F}}^{\prime} [{{\mathbf{\Theta}}}_{i}]=\partial {\mathcal{F}}_{\omega }[{{\mathbf{\Theta}}}_{i}]/\partial {{\mathbf{\Theta}}}_{i}\) (the latter will be important for the inverse problem).

Fig. 4: Data-driven inverse design.
figure 4

a Schematic of the inverse design process. The inverse model (i-NN) takes a queried stiffness S as input and outputs design parameters Θ defining a topology according to Eq. (1). The predicted design parameters are fed to the forward model (f-NN) to reconstruct the stiffness and verify the predictions from the i-NN. Both NN models consist of six hidden layers with the indicated numbers of nodes. b, c Reconstructed vs. true stiffness component \({\mathbb{C}}_{1111}\) in the test dataset. The reconstructed stiffness (i.e., stiffness of the topologies predicted by the i-NN) is computed using f-NN and FEM. d, e Predicted vs. true design parameters ρ and θ1 in the test dataset. All dashed lines represent the ideal line with zero intercept and unit slope; the corresponding R2 deviations are indicated. Further details are provided in Supplementary Information, Section 5.

To address the inverse problem, we introduce another MLP NN \({{\mathcal{G}}}_{\tau }\) (the i-NN), which maps stiffness S onto design parameters Θ. Here the challenge lies in defining a measure (a loss function) that identifies the correctness of an answer while ignoring the multiplicity of correct answers (since various design parameters may yield the same or similar effective stiffness). As a trivial example, the spinodoid topologies corresponding to Θ = (ρ, 90°, 0, 0), (ρ, 90°, 90°, 0), and (ρ, 90°, 90°, 90°) all have the same (isotropic) stiffness. This prevents the straightforward application of machine learning tools, which rely on direct computation of errors. For example, the naive approach to minimize \(\mathop{\sum }\nolimits_{i = 1}^{n}\parallel {{\mathcal{G}}}_{\tau }[{{\boldsymbol{S}}}_{i}]-{{\mathbf{\Theta}}}_{i}{\parallel }^{2}\) is ill-posed and may not converge to a correct solution (see Supplementary Information, Section 7). To overcome this challenge, we leverage the f-NN and propose to train the i-NN using the loss function

$${{\mathcal{G}}}_{\tau }\leftarrow \mathop{\min }\limits_{\tau }\frac{1}{n}\mathop{\sum }\limits_{i = 1}^{n}\left({\underbrace{{\left\Vert {{\mathcal{F}}}_{\omega }\left[{{\mathcal{G}}}_{\tau }\left[{{\boldsymbol{S}}}_{i}\right]\right]-{{\boldsymbol{S}}}_{i}\right\Vert }^{2}}_{{\text{reconstruction}}\, {\text{loss}}}}+{\underbrace{\lambda {\left\Vert {{\mathcal{G}}}_{\tau }[{{\boldsymbol{S}}}_{i}]-{{\mathbf{\Theta}}}_{i}\right\Vert }^{2}}_{{{\text{prediction}}\, {\text{loss}}}}}\right)\,{\rm{with}}\quad \lambda\, \ge \,0.$$

The reconstruction loss computes the error between the stiffness of a predicted topology and the true stiffness that has been queried, the rationale being that the predicted topology must have the correct stiffness irrespective of the design parameters used to create that topology. Ideally, the reconstruction should be computed using FEM. For efficiency, we instead leverage the above f-NN as a computationally inexpensive approximator of the FEM homogenization scheme. The advantage is two-fold. First, the numerous evaluations of the reconstruction loss via the pre-trained f-NN are several orders of magnitude less expensive than if FEM was used for reconstruction (see Supplementary Information, Section 5) during the i-NN training. Second, the back-propagation algorithm93 requires computing the derivatives of the loss function with respect to the NN parameters (so-called sensitivities). Numerical differentiation by FEM (perturbing the design parameters and re-calculating the effective stiffness for each perturbation) would incur prohibitive expenses — the f-NN as an approximator instead provides analytical gradients via automatic differentiation94 (see Supplementary Information, Section 5). Note that during the i-NN training, the pre-trained f-NN remains unchanged; i.e., no further do we train the parameters ω of the f-NN. The prediction loss in Eq. (7) acts as a soft regularization by measuring the error in the predicted design parameters. Although this regularization is not necessary (equivalent to choosing λ = 0), we observe that it accelerates the training of i-NN and the convergence of the reconstruction loss as long as λ is sufficiently small (e.g., λ ~ 0.01–1.0). For example, in the initial epochs of training when the parameters of the i-NN are untrained, the prediction loss ensures that the design parameter predictions from the i-NN are not nonsensical. For this reason, we activate the prediction loss only during the first few epochs of the training stage before deactivating it again (details in Supplementary Information, Section 5).

For a quantitative assessment of our machine learning technique, we generated a set of training and test data containing, respectively, 19,170 and 2130 pairs of topologies and their corresponding effective elastic stiffnesses (details about datasets and training protocols are in Supplementary Information, Section 5). For each queried stiffness Si from the test dataset, the i-NN predicts a set of design parameters \({{\mathbf{\Theta}}}_{i}^{* }\) expected to yield the sought effective stiffness Si. For verification, we reconstruct the stiffness \({{\boldsymbol{S}}}_{i}^{* }\) of the identified design \({{\mathbf{\Theta}}}_{i}^{* }\) (i) exactly via FEM simulations and (ii) approximately using the f-NN (recall that we cannot compare \({{\mathbf{\Theta}}}_{i}^{* }\) to Θi from the test data, since the mapping between design parameters and stiffnesses is non-unique). Ideally, in both cases the reconstructed stiffness of the identified topology should agree with the target stiffness, i.e., \({{\boldsymbol{S}}}_{i}^{* }\approx {{\boldsymbol{S}}}_{i}\). In a plot of predicted (or reconstructed) vs. queried stiffness components, we hence expect each data point to ideally lie on a line with zero intercept and unit slope, and we may use the coefficient of determination (R2) with respect to the aforementioned line as a measure of accuracy.

Representative example results of reconstruction vs. true (queried) stiffness component \({\mathbb{C}}_{1111}\) are shown in Fig. 4b, c. Since the i-NN has been trained against the f-NN (which only serves as an approximation of FEM-based homogenization), the FEM reconstruction of stiffness shows a lower accuracy (R2 = 0.997) than when using f-NN (R2 = 0.999), as expected. Nevertheless, we generally observed excellent agreement of queried (true) vs. achieved (reconstructed) stiffness values across all stiffness components tested (we verified R2 ≥ 0.995 and 0.998, respectively, across all FEM- and f-NN-based reconstructions).

As expected, the predicted topological parameters Θ* for a queried stiffness S may vary significantly from those in the dataset due to non-uniqueness (Fig. 4e). When queried, e.g., with a stiffness S originally obtained from a sample with Θ = (0.35, 70°, 70°, 0°), the i-NN predicted an architecture with Θ* = (0.34, 47.99°, 55.88°, 31.79°) with only negligible differences in stiffness. In addition, for close-to-isotropic stiffness queries (obtained from a sample with e.g., at least one of θ1, θ2, or θ3 >80°), the i-NN predicts all three θ1, θ2, and θ3 in the range of 45°–65° (contributing to the decrease in prediction accuracy for high values of θ1 in Fig. 4e). This highlights the advantages of our approach in overcoming the ill-posedness of the inverse problem. Note that the stiffness dependence on relative density ρ is so dominant that the i-NN generally recovers the relative density of architectures from the training set for a given stiffness (Fig. 4d).

While the inverse model is successful on test queries similar to the training dataset, a natural question arises: is the model applicable to arbitrary stiffness queries? There are two requirements: (i) a queried stiffness must be thermodynamically admissible, i.e., it must satisfy major and minor symmetries (\({\mathbb{C}}_{ijkl}={\mathbb{C}}_{klij}={\mathbb{C}}_{ijlk},\,i,j,k,l=1,2,3\)) and strong ellipticity for reasons of stability (using Einstein’s summation convention: \({\mathbb{C}}_{ijkl}{u}_{i}{v}_{j}{u}_{k}{v}_{l}\,>\,0\) for all non-zero \({\boldsymbol{u}},{\boldsymbol{v}}\in \mathbb{R}^{3}\)). Furthermore, it must not violate the Voigt upper bound that limits the maximally achievable stiffness for a given relative density (e.g., one cannot ask for an architecture that is stiffer than the base material). (ii) The query S must lie within the design space (i.e., there must be at least one Θ* within the bounds of the design parameters whose stiffness matches the query S). If these requirements are not satisfied, the i-NN will likely predict a Θ*, which does not lie within the design space (an indication that the S does not satisfy the aforementioned conditions). In the unlikely event Θ* does lie within the design space, a quick reconstruction of S* via f-NN (and comparison with the query S) will invalidate the i-NN prediction.

Once trained, the f-NN and i-NN together provide a computationally inexpensive two-way structure–property map as a design tool for spinodoid metamaterials (Supplementary Information, Section 5 estimates computational costs). Moreover, the machine learning framework presented here can be readily integrated into the functional grading approach of Fig. 3 to inverse-design spatially variant solids. The i-NN can be used to generate multiple independent GRFs that locally satisfy the anisotropic stiffness requirements (queries to the i-NN), followed by the straightforward GRF interpolation approach outlined in Supplementary Information, Section 4.

Inverse design of artificial bone

Synthetic bones or bone-mimetic scaffolds and implants are prime examples that have benefited from advances in additive manufacturing95,96,97. Matching the topological and mechanical properties of bones in 3D-printed architectures (important for successful long-term compatibility98) has remained a challenge though. Although bone properties have been mimicked by truss and TPMS architectures95,98,99, the thus available design space is highly limited. For example, those designs did not cover the required high level of elastic anisotropy and heterogeneity as well as porosity found100 across different patients or even across bones within the same patient. Leveraging the approach introduced here can overcome those challenges and create bone-mimetic structures with properties closer to those of natural bone than any of the aforementioned designs.

As an example, we consider trabecular bone from bovine femur samples, whose relative density and anisotropic stiffness components were measured experimentally101 (see Supplementary Information, Section 5). Using the measured directional modulus variations as a query (and assuming the base material of bone tissue is isotropic), the i-NN predicts the spinodoid architectures and their stiffnesses and relative densities summarized in Fig. 5. Remarkably, the inverse model accurately predicts the target relative density and matches the anisotropic elastic stiffness of the bone specimens despite no prior information about trabecular bone during the learning stage. The small differences between the reconstructed and experimentally measured stiffnesses are attributed to small but non-zero normal–shear coupling terms in the measured stiffness tensor (deviations diminish when the corresponding stiffness components are set to zero). Moreover, unlike previous approaches95,101, the resulting columnar spinodoid architectures bear topological resemblance to natural bone specimens (micro-computed tomographic images of the original bones are included in Fig. 5). The columnar topology makes structural features align with the load-bearing directions, akin to the trabecular alignment in natural femoral bones.

Fig. 5: Inverse design of bone-mimetic topologies.
figure 5

Measured anisotropic stiffnesses of bovine femoral specimens #2 and #3 from Colabella et al.101 (see Supplementary Table 1) were used as queries; shown are micro-computer tomographic (CT) scans of both bone samples as well as the predicted topologies (with β = 15π/l for visual comparison) and the corresponding design parameters Θ. Elastic surfaces of the bone specimens (dashed lines) and the predicted topologies (solid lines) are illustrated via projections onto the \({\hat{{\boldsymbol{e}}}}_{1}\)-\({\hat{{\boldsymbol{e}}}}_{3}\)-, \({\hat{{\boldsymbol{e}}}}_{2}\)-\({\hat{{\boldsymbol{e}}}}_{3}\)-, and \({\hat{{\boldsymbol{e}}}}_{1}\)-\({\hat{{\boldsymbol{e}}}}_{2}\)-planes. Also shown are adjusted elastic surfaces of both the bone samples (obtained from setting all off-diagonal normal–shear and shear–shear coupling terms to zero in the measured stiffness tensors). Micro-CT images are adapted from ref. 101 with permission from Springer Nature.


Bone datasets are scarce, particularly from a data-driven inverse-design perspective. Our approach bypasses this challenge and applies an inverse model trained on spinodoid metamaterials to the in silico generation of artificial bone, preserving the anisotropic stiffness and level of porosity (while the characteristic length scale is controlled by the wavelength). If a small but representative dataset for trabecular bones becomes available, the accuracy of the inverse model may be improved even further by first training on the spinodoid design space followed by fine-tuning on bone data. Finally, spatially varying architectures matching patient-specific mechanical properties across an individual bone (if known) can be realized readily by the GRF interpolation approach of Fig. 3. This capability of creating cellular solids with as-designed spatially varying stiffness and density is key to, e.g., acoustic cloaking102 or tissue engineering103. We close by noting that, with possible integration into multiscale topology optimization or as a standalone framework to explore the design space (e.g., via genetic algorithms), our combination of forward and inverse maps of the structure–property relation accelerates the design process of metamaterials with a wide range of tunable mechanical response (anisotropic stiffness only being the tip of the iceberg).


Details of the anisotropic spinodal decomposition theory (Section 1), the simulation procedures and post-processing of data (Sections 2 and 3), the spatially variant architecture simulations (Section 4), the machine learning protocols (Section 5), and the bone data (Section 6) are summarized in the Supplementary Information.