Functional Response Conditional Variational Auto-Encoders for Inverse Design of Metamaterials
Abstract
Metamaterials are emerging as a new paradigmatic material system, providing unprecedented and customizable properties for various engineering applications.
However, the inverse design of metamaterials, which aims to retrieve the metamaterial microstructure according to a given electromagnetic response, is very challenging as it is non-trivial to unveil the nonintuitive and intricate relationship between the microstructures, and their functional responses.
In this study, we resolve this critical problem by extending the classic conditional variational autoencoder for discrete responses to a more general version that can handle functional responses.
By encoding microstructures and their electromagnetic response curves into common latent spaces via deep neural networks and aligning them via a specific loss function, the proposed functional response conditional variational autoencoder can unveil the implicit relationship between microstructures and their electromagnetic responses efficiently.
The proposed novel learning framework not only facilitates metamaterial design greatly by avoiding the time-consuming case-by-case numerical simulations in the traditional forward design, but also has the potential to resolve other problems with similar structures.
Introduction
Metamaterials are macroscopic composites that contain artificial, three-dimensional, periodic (or not) unit-cell patterns engineered to produce optimized responses to a specific excitation that is unseen in natural materials [1–4].
Due to their great potentials to manipulate electromagnetic waves, metamaterials have drawn great interests in achieving novel physics phenomenon [5] and become a breakthrough technology to realize unique functionality in various fields [6–12].
Like atoms forming a molecule in natural materials, metamaterials with various microstructures (i.e, facility topologies) can lead to different response curves.
To be concrete, for a microstructure with facility topology x , its responses to electromagnetic wave of different frequencies form a complex response curve y .
The laws of physics determine that there exists a deterministic function y = f
( x ) that maps the facility topology x to its response curves y .
In the forward design of metamaterials, we aim to learn the unknown mapping function f ( · ) , i.e., predict y for a given x ; in the inverse design, we focus on learning the inverse mapping f − 1 ( · ) instead, i.e., finding an appropriate x in a pre-given design space X whose response curves y is close enough to given target response y ∗ .
In practice, researchers and designers utilize full-wave simulations via finite element method (FEM) to obtain mapping pairs of facility topology and its response curves in high-throughput, and try to learn the forward or inverse mapping functions, i.e., f ( · ) or f − 1 ( · ) , from the simulated data.
Consider the design space X as the assemble of all images with L × L binary pixels, where the black pixels stand for substrate, while the white ones are metal material.
Figure 1 demonstrates a typical microstructure of the I -shape and the corresponding response curves composed of four channels (two magnitude channels and two phase channels).
More microstructures of different topology types are illustrated in
Figure 2 and Figure 3.
For a collection of design points x 1 , .., x n ∈ X , let τ i be the topology type of x i (e.g., I -shape, hexagon-shape and so on), and y i =
f ( x i ) being the corresponding response curves obtained via FEM simulation.
Our goal in this study is to learn the inverse mapping function f − 1 ( · ) from a collection of triplets { ( τ i , x i , y i ) } ni =1 .
Leveraging on the quick development of deep neural network (DNN) in recent years, DNN-based inverse design via variational auto-encoder (VAE) [13] and conditional variational auto-encoder (CVAE) [14] has gained great successes in a broad range of applications [15–20].
However, available methods for inverse design based on CVAE assume that the responses are discrete classification labels, and cannot handle complex response curves as encountered here.
In this work, we fill in this gap by proposing a novel CVAE framework with functional responses as conditional input (referred to as
FR-CVAE) that can successfully map the unstructured design space X and the complex functional response space Y =
{ y = f
( x ) : x ∈ X} .
A series of simulation experiments confirm that the proposed method is effective to achieve high-quality inverse design for metamaterials.
Method
Figure 1 illustrates the overall architecture of the proposed FR-CVAE, which is composed of four components: (1) an encoding network of x , ϕ α : x → z , that maps a design x ∈ X to a lower dimension latent space representation z ∈ Z ( Z ∈ R p ), which can also be expressed as an encoding distribution q α ( z | x ) =
N ( µ z ( x , ϕ α ) , σ 2 z ( x , ϕ α ) · I p ) , (2) an encoding network of y referred to as ϕ β : y → z , that embeds the functional response y into the same latent space Z via another encoding distribution q β ( z | y )
=
N ( µ z ( y , ϕ β ) , σ 2 z ( y , ϕ β ) · I p ) , (3) a decoding network ϕ γ :
z → x , that generates an image ˆ x ∈ X from z ∈ Z via a decoding distribution q γ ( x | z ) over the design space
X , and (4) a classifier ϕ ψ : y → p τ which shares the network of ϕ β except its last layer and utilize a linear layer parameterized by ψ and softmax function to generate the classification probability of topology types, p τ .
Let Θ =
( α , β , γ , ψ ) denote all parameters involved in the model.
Among the four involved networks, the encoding network ϕ α , and the decoding network ϕ γ , are exactly same as in the classic CVAE [14].
However, unlike the traditional CVAE using discrete classification label as condition input [14], the proposed FR-CVAE introduces an extra encoder network ϕ β , to take care of the complex responses, which are continuous curves, and an additional classifier, i.e., ϕ ψ , to format multi-task learning to guide the encoding process of ϕ β .
In principle, we can specify ϕ β with any DNN that can convert a high-dimensional response curve y into the latent space Z .
Here, we choose the Swin-Transformer [21] as the encoding network ϕ β , considering its effectiveness to capture complicated patterns from sequence data due to its attention mechanism.
The loss function of FR-CVAE is composed of three components.
The first component is the reconstruction loss L x ( α , γ ) , which plays exactly the same role as in the classic VAE or CVAE.
For the i -th data point ( τ i , x i , y i ) , the L x loss has the the following form:
[Equation]
where the integration is about the latent vector z over the whole latent space Z .
The second component
L y ( β , ψ ) is classification loss for y , the cross-entropy loss L CE [22] enhanced by an additional triplet loss L Triplet [23], i.e.,
[Equation]
The third component L x ∼ y ( α , β ) is applied to stabilize and align the stochastic encoding of x and y via
[Equation]
where the first KL divergence plays the role of stabilization as in the ordinary VAE, since it forces the stochastic encoding function
q α ( ·| x i ) of every x i to be close to a pre-given distribution π 0 (which is typically the stand normal distribution on Z ), while the second one connects the encoding of x i and y i via distribution alignment.
Assembling all these components together, we come up with the following joint loss function:
[Equation]
In practice, w 1 and w 2 in Eq.
(3) need to be properly specified to adjust the relative weight of the
L x ∼ y loss.
We simply set w 1 = w 2 = 1 in this study.
We also note that the proposed FR-CVAE would degenerate to VAE of x if we remove the alignment loss by setting w 2 = 0 .
The proposed
FR-CVAE can be trained in a similar way as CVAE.
The complete training procedure is detailed in
Algorithm 1.
ϵ ⊙ ( Σ z ( Y ))) 12 , ϵ ∼ N ( 0 , I ) ; 8:
Decoder: ˆ X ← ϕ γ ; 9:
Compute the loss L ( Θ | τ , X , Y ) according to Eq.
Back-propagate the gradients.
11: until maximum iteration reached
Experiments 3.1 Experimental Setup
Dataset Simulated response curves of 61,992 microstructure patterns belonging to 30 topology types (e.g., I -shape, cross shaped, split ring, circular, etc.) were collected to support this study.
On average, about 2,000 simulated response curves were collected for each topology type at different scales.
The image of every involved microstructure pattern was encoded into a 200 × 200 binary matrix, and the corresponding response curves are the real and imaginary part of scatter parameters,
S11 and S21, over the frequency region of 0.1-30GHz, formatting as a 4 × 1001 -dimensional vector.
Implementation Details We randomly selected 80% of the collected data (i.e., 49,594 microstructures with their corresponding response curves) to train the proposed FR-CVAE, and used the rest 20% for testing.
The training is performed via Adam optimizer [24] through minibatch gradient descent for 1,000 epochs with the batch size set to be 256, which takes about fifteen hours by using[-
-]
Nvidia Telsa P100
GB GPU cards.
3.2 Experimental Results
Classification and Similarity The bar-plots in Figure 2 summarize the quality of inverse design based on the proposed FR-CVAE with Swin-Transformer (results of MLP based functional response encoder shown as Figure A2) for each of the 30 topology types: the light blue bars show the classification accuracy that the generated structures belong to the ground true topology type, the dark blue bars report the average cosine similarity between the two embedding vectors of the generated and ground true microstructure.
The proposed FR-CVAE achieves high-quality results in both perspectives for most topology types, suggesting that designs very close to the ideal ones can be successfully captured.
On-demand Inverse Design To further check whether the generated microstructures can indeed produce response curves that are close to the target response curves, we visualize the response curves of a few generated microstructures versus their target response curves in Figure 3, with the images of the generated and ground true microstructure showed side by side as well.
From the figure we can see clearly that most of the generated microstructures have a clear and feasible configuration and the generated designs reproduce the corresponding input response curves with high fidelity, which means the trained FR-CVAE model can effectively link the microstructure design and response curve through the probabilistic representation by latent variables and even preserve some fine features.
However, it can also be noted that some generated microstructures have blurred regions on the boundary, which is a common phenomenon for generative models with a log-likelihood loss function [25].
Acknowledgments and Disclosure of Funding
This work was supported by the National Natural Science Foundation of China (grant numbers 11931001 and 11771242), the Beijing Academy of Artificial Intelligence (grant number
BAAI2019ZD0103), the State Key Laboratory of Meta-RF Electromagnetic Modulation Technology and Guangdong Provincial Key Laboratory of Meta-RF Microwave.
The authors declare no competing interests