A variational autoencoder latent vector recognition method
By constructing a latent vector recognizer, using the combination method of variational automatic encoder and artificial neural network, the problem that latent vector design is difficult to be in the latent space is solved, and the accuracy and stability of topological design are improved.
Patent Information
- Application Number
- CN202210377027.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-11
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2042-04-11
AI Technical Summary
The prior art is difficult to limit the designed latent vectors to the latent space through tandem neural networks, resulting in the impact of the accuracy and stability of topological design.
By constructing a latent vector recognizer, the trained variational automatic encoder is used to obtain the latent vector data set, calculate the Euclidean distance between the latent vectors, and the minimum value is used to generate the tag vector, form the data set A, and pass the artificial neural network Training a latent vector recognizer, combining it with a neural network used to design latent vectors.
It improves the accuracy and stability of the topological design based on the variational automatic encoder, ensures that the designed latent vector is in the latent space, and improves the accuracy of the design results.
Smart Images

Figure CN114861872B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and more specifically to a latent vector recognition method for a variational autoencoder, and more particularly to a latent vector recognition method for a variational autoencoder guiding structural topology design. Background Art
[0002] Topological design changes the distribution area of the internal materials of the structure so that certain characteristics of the structure can meet the expected requirements. Compared with parameter design, topological design is not limited to a specific configuration and has a wider design space, so it is widely used.
[0003] In recent years, deep learning has been gradually introduced into the topological design of structures due to its advantages of intelligence and efficiency. The idea of its implementation is generally to transform the high-dimensional topological configuration into low-dimensional parameters, then design the transformed parameters, and finally restore the parameters to obtain the designed structure. The variational autoencoder consists of an inference model and a generation model, and is a common deep learning algorithm for data dimensionality reduction and restoration. It can transform a high-dimensional discrete topological space into a low-dimensional continuous latent space, in which each latent vector in the latent space can be restored to the corresponding topological configuration through a generation model. Therefore, the design of the topological configuration can be indirectly realized by designing the latent vector, which greatly reduces the difficulty of high-dimensional configuration design. The design of the latent vector can be realized by using a series neural network with a forward simulation network through a back-propagation algorithm, in which the forward simulation network has learned the relationship between the latent vector and the structural characteristics.
[0004] However, due to the irregularity of the shape of the latent space, it is difficult to confine the designed latent vector within the latent space by cascading neural networks, resulting in the forward simulation network believing that the results are in line with expectations, but the numerical simulation shows that they are far from the expected goals. This is because the input design latent vector is outside the data set area used to train the forward simulation network, but the output structural characteristics are close to or equal to the target. It is like the forward simulation network is deceived by the data outside its data set area, which in turn affects the accuracy and stability of the topological design. Therefore, a new method is needed to identify the latent vector and guide the topological design of the structure, which is also one of the difficulties in current research in this field. Summary of the invention
[0005] In view of the defects existing in the prior art, the object of the present invention is to provide a variational autoencoder latent vector recognition method, by constructing a latent vector identifier to guide the structural topology design.
[0006] In order to achieve the above purpose, the technical solution adopted by the present invention is:
[0007] A variational autoencoder latent vector recognition method, characterized by comprising the following steps:
[0008] Step 1, using the trained variational autoencoder to obtain a latent vector data set with M latent vectors, and calculating the minimum value of the Euclidean distance between each latent vector according to the latent vector data set;
[0009] Step 2, randomly and uniformly generate N vectors in the above latent vector data set according to the area formed by the maximum and minimum values of each dimension of the latent vector, and mark these N vectors to determine the true latent vector and the false latent vector;
[0010] Step 3: Combine the generated N vectors and corresponding labels into a data set A;
[0011] Step 4, construct an artificial neural network, train and test the network using data set A, and obtain a latent vector identifier;
[0012] Step 5: Combine the latent vector identifier with the neural network used to design the latent vector.
[0013] Further, step 1 is specifically as follows:
[0014] Step 1-1, converting the topological data set into a latent vector data set through a trained variational autoencoder, where the latent vector data set contains M latent vectors;
[0015] Step 1-2, calculate the minimum Euclidean distance ξ between each latent vector and other latent vectors in the latent vector dataset i , we get the array ξ=[ξ1,ξ2,…,ξ M ];
[0016] Further, step 2 is specifically as follows:
[0017] Step 2-1, determine a parameter So that x percent of ξ are less than Here, χ is generally between 95 and 100;
[0018] Step 2-2, randomly and uniformly generate N vectors in a region bounded by the maximum and minimum values in each dimension of the latent vector dataset;
[0019] Step 2-3, calculate the Euclidean distance ζ between each of the N generated vectors and all latent vectors in the latent vector dataset i =[ζ i,1 , i,2 ,…,ζ i,M ], and get the array Υ = [ζ1, ζ2, …, ζ N ];
[0020] Step 2-4, mark the generated N vectors, the true latent vector is marked as "1", and the false latent vector is marked as "0".
[0021] Further, the method of marking the N vectors generated in step 2-4 is as follows, where if in ζ i There are at least ψ values less than The i-th generated vector is marked as "1", otherwise it is marked as "0", where ψ is generally an integer between 2 and 10.
[0022] The beneficial effect of the variational autoencoder latent vector identification method described in the present invention is that the accuracy and stability of the variational autoencoder topology design are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The present invention has the following accompanying drawings:
[0024] Figure 1 Flowchart of the construction of latent vector recognizer;
[0025] Figure 2 A schematic diagram of a latent space of an embodiment of the method of the present invention;
[0026] Figure 3 Distribution diagram of data set A in an embodiment of the method of the present invention;
[0027] Figure 4 A schematic diagram of a design model of an embodiment of the method of the present invention;
[0028] Figure 5 Distribution diagram of the designed latent vector in Example 1 of the method of the present invention: (a) with latent vector identifier; (b) without latent vector identifier;
[0029] Figure 6 Comparison diagram of the designed band gap and the target band gap in Example 1 of the method of the present invention: (a) with latent vector identifier; (b) without latent vector identifier;
[0030] Figure 7 Comparison of design errors in Example 1 of the method of the present invention: (a) with latent vector identifier; (b) without latent vector identifier;
[0031] Figure 8 Comparison diagram of optimization results in Example 2 of the method described in the present invention: (a) optimization process of the series neural network with a latent vector identifier; (b) optimization process of the series neural network without a latent vector identifier; (c) optimized latent vectors, where the triangles are the results with the latent vector identifier and the squares are the results without the latent vector identifier; (d) dispersion curve and relative bandwidth calculated by the finite element method with the latent vector identifier; (e) dispersion curve and relative bandwidth calculated by the finite element method without the latent vector identifier. DETAILED DESCRIPTION
[0032] The present invention is further described in detail below in conjunction with the accompanying drawings.
[0033] Example 1: Using a two-dimensional periodic structure composed of steel and soil as an example to construct a deep learning model for topological design
[0034] Taking a two-dimensional periodic structure composed of steel and soil as an example, considering the in-plane plane wave mode, taking the band gap between the third and fourth order energy bands as the target, and constructing a deep learning model composed of a variational autoencoder and a tandem neural network for topological design. In order to make the display more intuitive, the dimension of the latent space is set to 2 in this embodiment.
[0035] The 30,000 topological configurations are converted into latent vectors through the inference model of the variational autoencoder, and we get Figure 2 . Set χ, ψ and N to 99, 3 and 20000 respectively, and we get Figure 3 The dataset A is shown, where the black points are true latent vectors (marked as “1”) and the gray points are false latent vectors (marked as “0”).
[0036] A multilayer perceptron with two hidden layers is constructed, where the number of neurons in the hidden layers is 128 and 64 respectively, the activation function is ReLU, the activation function of the output layer is Sigmoid, and each layer uses Batch Normalization. The dataset A is divided into training set, validation set and test set in a ratio of 8:1:1, and the Adam optimizer is used to train and test the multilayer perceptron to obtain a latent vector recognizer. Figure 4 The combination of the latent vector recognizer and the designed model is shown, where the loss function of the cascaded neural network is:
[0037]
[0038] y L and U are the lower and upper limits of the output bandgap of the forward simulation network, respectively, D is the output of the latent vector identifier, f TL and f TU are the lower and upper limits of the target band gap, respectively.
[0039] 1,000 different targets were input into the design models with and without the latent vector identifier, and the band gap between the third and fourth order energy bands of each design structure was calculated using the finite element method.
[0040] Figure 5 The distribution of the designed latent vectors with and without the latent vector identifier is given. It can be seen that when the latent vector identifier is used, the designed latent vectors are basically in the latent space. When it is not used, some of the designed latent vectors are outside the latent space.
[0041] Figure 6 The 1000 design results in (b) are compared Figure 6 (a) is much more discrete, and the determination coefficient between the designed band gap and the target band gap reaches 0.993 when the latent vector identifier is used, but it is only 0.975 when it is not used, which further illustrates that the design results can be more stable when the latent vector identifier is used.
[0042] Figure 7 (a) and Figure 7 (b) The distribution of design error with and without latent vector identifier is given, where the design error is defined as:
[0043]
[0044] f DL and f DU are the lower and upper limits of the designed band gap, respectively. When the latent vector identifier is used, 91.7% of the errors are less than 0.04, and the maximum error is only 0.12. When the latent vector identifier is not used, only 75.9% of the errors are less than 0.04, and the maximum error reaches 0.24.
[0045] Example 2: Using the same data set and neural network model as in Example 1, the two-dimensional periodic structure is optimized with the goal of maximizing relative bandwidth, where the loss function of the series neural network is:
[0046]
[0047] A random band gap needs to be input into the cascaded neural network to ensure that the model can start running. The relative bandwidth predicted by the forward simulation network is the inverse of the cascaded neural network loss function when the latent vector identifier is not used.
[0048] Figure 8 The optimization results with and without the latent vector identifier are given. When there is no latent vector identifier, the optimized latent vector falls outside the latent vector dataset, and the relative bandwidth predicted by the forward simulation network reaches 0.92 when the tandem neural network converges. Figure 8 As shown in (e), the relative bandwidth calculated by the finite element method after the optimized latent vector is restored to the topological configuration is only 0.32, which is very different from the two. When the latent vector identifier is used to assist in the design, the optimized latent vector falls within the latent vector dataset, and the relative band gaps predicted by the forward simulation network and calculated by the finite element method are close, which are 0.79 and 0.69 respectively.
[0049] In summary, the latent vector identifier avoids the designed latent vector from falling outside the latent space, greatly improving the accuracy and stability of the design results.
[0050] The contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field.
Claims
1. A variational autoencoder latent vector recognition method, characterized in that: The steps include: Step 1, using the trained variational autoencoder to obtain a latent vector data set with M latent vectors, and calculating the minimum value of the Euclidean distance between the latent vectors in the latent vector data set; Step 2, randomly and uniformly generate N vectors in the above latent vector data set according to the area formed by the maximum and minimum values of each dimension of the latent vector, and mark these N vectors to determine the true latent vector and the false latent vector; Step 3: Combine the generated N vectors and corresponding labels into a data set A; Step 4, construct an artificial neural network, train and test the network using data set A, and obtain a latent vector identifier; Step 5, combining the latent vector identifier with the neural network for designing the latent vector; In the above step 1, M topological configurations of the two-dimensional periodic structure of steel and soil are converted into latent vectors through the inference model of the variational autoencoder.
2. A variational autoencoder latent vector identification method as claimed in claim 1, characterized in that: Step 1 is as follows: Step 1-1, convert the topological data set into a latent vector data set through a trained variational autoencoder, where the latent vector data set contains M latent vectors; Step 1-2, calculate the minimum Euclidean distance ξ between each latent vector and other latent vectors in the latent vector dataset i , we get the array ξ=[ξ1,ξ2,…,ξ M ]; 3. The method for latent vector identification of a variational autoencoder according to claim 1, characterized in that: Step 2 is as follows: Step 2-1, determine a parameter So that x percent of ξ are less than Where X takes values between 95 and 100; Step 2-2, randomly and uniformly generate N vectors in a region bounded by the maximum and minimum values of each dimension of the latent vector in the latent vector dataset; Step 2-3, calculate the Euclidean distance ζ between each of the N generated vectors and all latent vectors in the latent vector dataset i =[ζ i1 , i2 ,…,ζ i,M ], and we get the array γ = [ζ1, ζ2, …, ζ N ]; Step 2-4, mark the generated N vectors, the true latent vector is marked as "1", and the false latent vector is marked as "0".
4. A variational autoencoder latent vector identification method as claimed in claim 3, characterized in that: The method of marking the N vectors generated in steps 2-4 is as follows, where if in ζ i There are at least ψ values less than Then the i-th generated vector is marked as "1", otherwise it is marked as "0", where ψ takes an integer between 2 and 10.
Citation Information
Patent Citations
Periodic super-barrier reverse design method based on deep learning
CN114943162A