A method and apparatus for inverse design of electromagnetic devices based on bijective differentiable projection layer and neural network
By introducing a bijective differentiable projection layer into the neural network, the generation results of electromagnetic devices are projected into the convex feasible region, which solves the problem that the design results of electromagnetic devices in the prior art cannot meet the practical application requirements, and realizes the inverse design of electromagnetic devices with stable convergence and constraint satisfaction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PEKING UNIV
- Filing Date
- 2026-02-12
- Publication Date
- 2026-06-09
Smart Images

Figure CN122174630A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electromagnetic device design technology, specifically a method and apparatus for inverse design of electromagnetic devices based on bijective differentiable projection and neural networks. Background Technology
[0002] Electromagnetic devices, including but not limited to antennas, electromagnetic metasurfaces, and frequency-selective surfaces, serve as core supporting units in strategic emerging fields such as next-generation wireless communication, intelligent sensing, and new energy utilization. Their multifunctionality has become a key characteristic for overcoming technological bottlenecks, making them widely adaptable to critical areas such as wireless communication and electromagnetic compatibility. However, the practical application of electromagnetic devices is inherently limited by the physical realizability and manufacturability of their geometry and materials. Specifically, the substrate material must be commercially available and readily accessible, while the manufacturing process imposes inherent constraints on structural dimensions—for example, micro-nano manufacturing technology determines the lower limit of feature sizes, while macroscopic application scenarios set an upper limit on the overall device size. Furthermore, to ensure the integrity of core functions, the initial shape and topology of the electromagnetic device should remain unchanged during the design optimization process. These constraints collectively outline a high-dimensional, non-convex, and complex feasible design space. Therefore, efficiently designing electromagnetic devices that simultaneously achieve the expected electromagnetic response and meet all the aforementioned constraints has become a crucial prerequisite for driving the development of related technologies.
[0003] Deep learning technology has given rise to a new paradigm for rapid reverse design of electromagnetic devices due to its ability to alleviate the time-consuming, inefficient, and experience-dependent shortcomings of traditional methods. Electromagnetic device reverse design is a design paradigm that derives device structure or material parameters from the target electromagnetic properties. Its core is to directly generate structures through algorithms while satisfying physical constraints, significantly improving design efficiency and performance ceilings. However, existing deep learning techniques for electromagnetic device reverse design cannot guarantee that the generated structural parameters and material properties meet practical application scenarios, and may even damage the basic structure of the device, easily leading to unusable design results. Although some existing works have introduced constraint violation penalties into the loss function, constraint penalties, as a soft constraint method, still cannot guarantee that the generated results will necessarily lie within the feasible design space. This drawback of not satisfying design constraints can cause deep learning technology to fail, severely hindering the rapid reverse design of electromagnetic devices. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention proposes an inverse design method for electromagnetic devices based on bijective differentiable projection and neural networks. It constructs a bijective differentiable mapping function that is oriented and adapted to the convex feasible region for inequality constraints of electromagnetic devices. The hypercube vector output by the neural network is precisely projected into the preset convex feasible region, achieving mathematical determinism in constraint satisfaction and ensuring that the final result generated by the neural network strictly meets the constraint conditions. Because the mapping function is differentiable, the neural network can be directly trained along with the mapping function. Furthermore, the bijective property of the mapping function guarantees stable convergence during the neural network training process. The bijective differentiable projection layer proposed in this invention is independently encapsulated as a modular projection layer, which can be added to different neural networks in a plug-and-play manner, enabling rapid inverse design of electromagnetic devices satisfying complex constraints.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: An inverse design method for electromagnetic devices based on a bijective differentiable projection layer and a neural network includes the following steps: Determine the structural variables to be designed for the electromagnetic device and their inequality constraints, and construct a convex feasible region space composed of the inequality constraints. Establish a bijective mapping function from the hypercube domain to the convex feasible domain space; Establish a neural network for generating structural variables of electromagnetic devices; The bijective mapping function is concatenated as an activation function layer after the output layer of the neural network to form a neural network with a bijective differentiable projection layer. Train the neural network with the bijective differentiable projection layer; The target electromagnetic parameters are input into the trained neural network with a bijective differentiable projection layer to generate structural variables that satisfy the inequality constraints, thereby realizing the inverse design of electromagnetic devices.
[0006] Furthermore, the convex feasible region space contains multiple linear constraint inequalities.
[0007] Furthermore, establishing the bijective mapping function from the hypercube domain to the convex feasible domain space includes: selecting a fixed point located in the convex feasible domain space without boundaries as an anchor point; and based on the anchor point, establishing a mapping relationship between any vector belonging to the hypercube domain and any vector of structural variable located in the convex feasible domain space.
[0008] Furthermore, the mapping relationship is as follows: ,in It is a vector of arbitrary structural variables located in the convex feasible region space. It is a bijective mapping function. It is an anchor point. It is any domain belonging to the hypercube The vector, The number of structural variables to be designed. For projection coefficients, For vectors The maximum absolute value among all dimensions.
[0009] Furthermore, the projection coefficient is calculated as follows: ,in The projection coefficients are determined by the linear constraint inequality. To constrain the number of inequalities.
[0010] Furthermore, the aforementioned The calculation method is as follows: If ,but ;otherwise, ;in Let be the coefficient vector of the linear constraint inequality. It is a constant. This indicates transpose.
[0011] Furthermore, the output layer of the neural network is a tanh activation function mapped to the range of -1 to 1.
[0012] An electromagnetic device inverse design apparatus based on a bijective differentiable projection layer and a neural network, comprising: The convex feasible region space construction module is used to determine the structural variables and inequality constraints of the electromagnetic device to be designed, and to construct the convex feasible region space composed of inequality constraints. A bijective mapping function establishment module is used to establish a bijective mapping function from the hypercube domain to the convex feasible domain space; The neural network building module is used to build a neural network for generating structural variables of electromagnetic devices; A neural network construction module with a bijective differentiable projection layer is used to concatenate the bijective mapping function as an activation function layer after the output layer of the neural network to form a neural network with a bijective differentiable projection layer. A neural network training module is used to train the neural network with a bijective differentiable projection layer. The structural variable generation module is used to input the target electromagnetic parameters into the neural network with a bijective differentiable projection layer after training, generate structural variables that satisfy the inequality constraints, and realize the inverse design of electromagnetic devices.
[0013] The present invention also provides a computer device including a memory and a processor, the memory storing a computer program configured to be executed by the processor, the computer program including instructions for performing the methods described above.
[0014] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a computer, implements the above-described method.
[0015] The beneficial effects achieved by this invention are as follows: 1. This invention connects a bijective differentiable projection layer in series with the output layer of a neural network, thereby projecting the output of the neural network into the design feasible region. This ensures that the inverse design results strictly meet the design constraints, laying the foundation for the practical application of electromagnetic devices based on neural network inverse design.
[0016] 2. The bijective differentiable projection layer proposed in this invention has a simple calculation method, and the partial derivatives of all calculation steps can be calculated. At the same time, its bijective property avoids the gradient update instability problem caused by the introduction of non-one-to-one mapping, thus ensuring stable convergence during the training process of the neural network.
[0017] 3. This invention has extremely high versatility, covering all scenarios involving the inverse design of electromagnetic devices with constraints composed of linear inequalities. The bijective differentiable projection layer is an independently packaged functional module that does not require modification of the original neural network structure, activation function, or training logic. It only needs to be connected in series with the output layer to take effect, adapting to various inverse design network architectures such as cascaded neural networks, conditional variational autoencoders, and generative adversarial networks, thus solving the problem of strong binding between constraint adaptation and network type in existing technologies. Attached Figure Description
[0018] Figure 1 This is a flowchart of the steps of an electromagnetic device inverse design method based on bijective differentiable projection and neural network according to the present invention.
[0019] Figure 2 This is a schematic diagram of the frequency-selective surface unit structure to be optimized in an embodiment of the present invention.
[0020] Figure 3 This is the network structure of the conditional variational autoencoder in the embodiments of the present invention.
[0021] Figure 4 This is an embodiment of the present invention that describes the overall structure of a neural network with a biradiative differentiable projection layer.
[0022] Figure 5 Example 1 shows the comparative test results of having and not having a biradiative microprojectable layer in an embodiment of the present invention.
[0023] Figure 6 This is Example 2 of a comparative test with and without a bi-rayed microprojectable layer in an embodiment of the present invention.
[0024] Figure 7This is a structural block diagram of an electromagnetic device inverse design device based on bijective differentiable projection and neural network according to the present invention. Detailed Implementation
[0025] To make the various technical features, advantages, or effects of the present invention more apparent and understandable, the following embodiments are described in detail with reference to the accompanying drawings.
[0026] This invention provides an electromagnetic device inverse design method based on bijective differentiable projection and neural networks, such as... Figure 1 As shown, it includes the following steps: Step 11: Determine the structural variables to be designed for the electromagnetic device and their inequality constraints, and construct the convex feasible region space composed of the inequality constraints. Step 12: Establish a bijective mapping function from the hypercube domain to the convex feasible domain space; Step 13: Establish a neural network for generating structural variables of electromagnetic devices; Step 14: Connect the bijective mapping function as an activation function layer after the output layer of the neural network to form a neural network with a bijective differentiable projection layer; Step 15: Train the neural network with the bijective differentiable projection layer; Step 16: Input the target electromagnetic parameters into the trained neural network with a bijective differentiable projection layer to generate structural variables that satisfy the inequality constraints, thereby realizing the inverse design of the electromagnetic device.
[0027] In one embodiment, step 11 determines the structural variables to be designed for the electromagnetic device and assembles them into a vector. The inequality constraints of the structural variables are determined, and a convex feasible region space composed of these constraints is constructed. The convex feasible region space composed of the inequality constraints is modeled as follows: ,in Let be the vector of structural variables to be designed for the electromagnetic device. Let be the convex feasible region space formed by inequality constraints. For linear constraint inequalities, These are the numbers of the linear constraint inequalities. This represents the number of constraint inequalities. Linear constraint inequalities. It can be represented as ,in For the coefficient vector, It is a constant.
[0028] In one embodiment, step 12 establishes the hypercube domain bijective mapping function to the convex feasible region space formed by inequality constraints ,in Let be the number of structural variables to be designed. Specifically, select a fixed point located in the convex feasible region space without boundaries. As anchor points, then for any domain belonging to the hypercube vector and arbitrary structure variable vectors located in the convex feasible region space Establish a mapping relationship, the expression of which is: ,in For projection coefficients, For vectors The maximum absolute value across all dimensions. The projection coefficients pass through fixed points. ,vector The convex feasible region space is calculated.
[0029] In one embodiment, the projection coefficients in step 12 The calculation method is as follows ,in For the linear constraint inequality Determined projection coefficients.
[0030] Specifically, The calculation formula is: .
[0031] In one embodiment, step 13 establishes a neural network for generating electromagnetic device structural variables. ,in For the target electromagnetic parameters, Let be the set of parameters for the neural network, and set the output layer of the network to a tanh activation function that maps to -1 to 1.
[0032] In one embodiment, step 14 will use a bijective mapping function. As a separate activation function layer concatenated after the output layer of the neural network, it forms a new neural network with a bijective differentiable projection layer. .
[0033] In one embodiment, step 15, training the neural network, involves updating the neural network parameters via gradient descent after calculating the loss function, and then optimizing the network using the Adam network optimizer.
[0034] In one embodiment, step 16 feeds the trained neural network... By inputting target electromagnetic parameters, the neural network can generate structural variables that satisfy inequality constraints, enabling rapid inverse design of electromagnetic devices that meet complex constraints.
[0035] In one embodiment, a reverse design method for electromagnetic devices based on bijective differentiable projection and neural networks is specifically disclosed, taking the design of a frequency selective surface as an example. The unit structure of the frequency selective surface, with an operating frequency of 5 GHz to 18 GHz, is shown below. Figure 2 As shown, the unit as a whole is a square, with a side length of... It is 12mm, and the length of the small frame is... It is 5.3 mm. The method specifically includes the following steps: Step 11. Determine the structural variables to be designed for the electromagnetic device and arrange them into a vector. The inequality constraints of the structural variables are determined, and the convex feasible region space composed of the inequality constraints is constructed.
[0036] The structural variables of the frequency selection unit structure to be designed are There are a total of 7 structural variables, namely .in, These represent the length, width, and brim length of the first branch, respectively. These represent the length, width, and brim width of the second branch, respectively. Indicates the width of the hat brim.
[0037] Based on the modeling expression of structural variables, the inequality constraints are expressed as follows: ,in Let be the coefficient matrix, with the following number of rows: The number of columns corresponds to the number of inequality constraints. This corresponds to the number of structure variables; The vector is a restricted vector with 1 column and 1 row. , which corresponds to the constant in the inequality constraint conditions.
[0038] In this embodiment, the specific constraints are as follows: There are 13 in total, namely .
[0039] corresponding equal , equal . The Behavior It is equal to , The Behavior It is equal to .
[0040] Step 12. Establish from the hypercube domain bijective mapping function to the convex feasible region space formed by inequality constraints ,in The number of structural variables to be designed.
[0041] Select a fixed point for Then for any domain belonging to the hypercube vector and any vector located in the convex feasible region space Establish a mapping relationship, the expression of which is: ,in For projection coefficients, For vectors The maximum absolute value across all dimensions. The projection coefficients pass through fixed points. ,vector The convex feasible region space is calculated.
[0042] Projection coefficient The calculation method is as follows ,in For the linear constraint inequality Determined projection coefficients.
[0043] Specifically, The calculation formula is: .
[0044] in Indicates "or", It indicates "otherwise" or "in other circumstances".
[0045] Step 13. Establish a neural network for generating structural variables of electromagnetic devices. ,in For the target electromagnetic parameters, Let be the set of parameters for the neural network, and set the output layer of the neural network to a tanh activation function that maps to -1 to 1.
[0046] In this example, a conditional variational autoencoder is used as a neural network for generating electromagnetic device structural variables. The structure of a neural network is as follows: Figure 3This consists of an encoder and a decoder. The encoder first combines the target transmission coefficient magnitude (1×1×10¹) and the structural variables (1×1×7) into a tensor of dimension 1×1×10⁸, which is then processed and computed by multiple fully connected layers, where BatchNorm is the batch normalization layer and Gelu is the Gelu activation function. The final output is used to construct the mean and variance of the multivariate Gaussian distribution and to calculate the loss function. The decoder takes the sampled values from the multivariate Gaussian distribution and the target transmission coefficient as input, combines them into a tensor of dimension 1×1×16⁵, processes and computes it through multiple fully connected layers, and finally uses the tanh activation function to map the neural network output to the range -1 to 1.
[0047] Step 14. Apply the bijective mapping function As a separate activation function layer concatenated after the output layer of the neural network, it forms a new neural network with a bijective differentiable projection layer. In this example, a bijective differentiable projection layer is concatenated after the tanh activation function of the decoder. The overall framework is as follows: Figure 4 As shown.
[0048] Step 15. Train the neural network. Divide the dataset into a training set and a validation set. The training set consists of 1000 data pairs, and the validation set consists of 125 data pairs. Each data pair in the training set includes a structure variable tensor (1×1×7). The label dimension corresponding to the input data pair is (1×1×101), which is the transmission coefficient amplitude obtained using CST simulation software. The batch size is 100, and training is performed according to the standard training method of conditional variational autoencoders. After calculating the loss function, the neural network parameters are updated using gradient descent; the Adam network optimizer is used for network optimization.
[0049] Step 16. Feed the trained neural network By inputting target electromagnetic parameters, the neural network can generate structural variables that satisfy inequality constraints, enabling rapid inverse design of electromagnetic devices that meet complex constraints.
[0050] The method described above in this invention specifically designs a bijective differentiable projection mechanism for convex feasible regions constrained by inequality constraints. Its core principle is to ensure that the neural network output "strictly falls within the convex feasible region" and guarantees training convergence, thus solving the problem of "deterministic constraint satisfaction." This invention utilizes a synergistic approach, combining bijective differentiable mapping, convex feasible region directional projection, and independent modular layers. The mapping function achieves precise adaptation to the convex feasible region through "anchor point selection + constraint adaptive projection coefficients," and as an independent layer, it can be directly connected to any neural network for plug-and-play functionality. This invention mathematically guarantees that the output will necessarily satisfy all inequality constraints (hard constraints) through bijective mapping from the hypercube domain to the convex feasible region, without relying on loss function penalties.
[0051] To demonstrate the advancement and practicality of our method, we use a conditional variational autoencoder without an unused bijective differentiable projection layer as a comparison. The only difference is that the comparison method does not use a bijective differentiable projection layer, and the decoder directly outputs the generated structure variables, i.e., replacing the tanh activation function with the ReLU activation function.
[0052] On the validation set, 96% of the generated designs from the decoder neural network without a bijective differentiable projection layer failed to meet the constraints, while 0% of the generated designs from the decoder neural network with a bijective differentiable projection layer failed to meet the constraints. For this electromagnetic device, the user is most concerned with the resonant frequency of the transmission coefficient amplitude. Therefore, using the target resonant frequency as the mean, two target transmission coefficient amplitudes were simulated using a Gaussian function. The decoder neural networks with and without bijective differentiable projection layers were then tested, and the test results are as follows. Figure 5 and Figure 6 As shown, without the bijective differentiable projection layer, the frequency selection surface generated by the decoder network exhibits significant distortion, violating the periodic boundary conditions and making it unsuitable for fabrication in a real-world environment. Furthermore, the simulated resonant peak of the transmission coefficient amplitude deviates significantly from the target resonant peak. In contrast, the decoder network using the bijective differentiable projection layer generates results that strictly satisfy the constraints, resulting in a better correlation between the simulated resonant peak of the transmission coefficient amplitude and the target resonant peak.
[0053] Another embodiment of the present invention provides an electromagnetic device inverse design apparatus based on a bijective differentiable projection layer and a neural network, such as... Figure 7 As shown, the device 20 includes: The convex feasible region space construction module 21 is used to determine the structural variables and inequality constraints of the electromagnetic device to be designed, and to construct the convex feasible region space composed of inequality constraints. The bijective mapping function establishment module 22 is used to establish a bijective mapping function from the hypercube domain to the convex feasible domain space; Neural network building module 23 is used to build a neural network for generating structural variables of electromagnetic devices; The neural network construction module 24 with a bijective differentiable projection layer is used to concatenate the bijective mapping function as an activation function layer after the output layer of the neural network to form a neural network with a bijective differentiable projection layer. Neural network training module 25 is used to train the neural network with bijective differentiable projection layers; The structural variable generation module 26 is used to input the target electromagnetic parameters into the neural network with the bijective differentiable projection layer after training, generate structural variables that satisfy the inequality constraints, and realize the inverse design of electromagnetic devices.
[0054] The above division of modules is merely illustrative. In practical applications, the functions described above can be assigned to different functional modules as needed to complete all or part of the functions described in the aforementioned method. The specific working process of each module can be found in the corresponding processes in the aforementioned method embodiments.
[0055] The various steps and modules in this invention can be implemented as software functional units and stored in a computer-readable storage medium, including several instructions to cause a computer device to execute some or all of the steps of the method described in this invention. For example, one embodiment of this invention provides a computer device (computer, server, etc.) including a memory and a processor. The memory stores a computer program configured to be executed by the processor, and the computer program includes instructions for performing the steps of the method of this invention. For example, another embodiment of this invention provides a computer-readable storage medium (such as ROM / RAM, disk, optical disk, etc.) storing a computer program. When the computer program is executed by a computer, it implements the steps of the method of this invention. For example, another embodiment of this invention provides a computer program product including a computer program. When the computer program is executed by a computer, it implements the steps of the method of this invention.
[0056] Although the present invention has been disclosed above with reference to embodiments, it is not intended to limit the present invention. Appropriate modifications or equivalent substitutions made by those skilled in the art to the technical solutions of the present invention should be covered within the protection scope of the present invention, which is defined by the claims.
Claims
1. A method for inverse design of electromagnetic devices based on a bijective differentiable projection layer and a neural network, characterized in that, Includes the following steps: Determine the structural variables to be designed for the electromagnetic device and their inequality constraints, and construct a convex feasible region space composed of the inequality constraints. Establish a bijective mapping function from the hypercube domain to the convex feasible domain space; Establish a neural network for generating structural variables of electromagnetic devices; The bijective mapping function is concatenated as an activation function layer after the output layer of the neural network to form a neural network with a bijective differentiable projection layer. Train the neural network with the bijective differentiable projection layer; The target electromagnetic parameters are input into the trained neural network with a bijective differentiable projection layer to generate structural variables that satisfy the inequality constraints, thereby realizing the inverse design of electromagnetic devices.
2. The method according to claim 1, characterized in that, The convex feasible region space contains multiple linear constraint inequalities.
3. The method according to claim 1, characterized in that, The step of establishing a bijective mapping function from the hypercube domain to the convex feasible domain space includes: selecting a fixed point located in the convex feasible domain space without boundaries as an anchor point; and establishing a mapping relationship between any vector belonging to the hypercube domain and any vector of structural variable located in the convex feasible domain space based on the anchor point.
4. The method according to claim 3, characterized in that, The mapping relationship is as follows: ,in It is a vector of arbitrary structural variables located in the convex feasible region space. It is a bijective mapping function. It is an anchor point. It is any domain belonging to the hypercube The vector, The number of structural variables to be designed. For projection coefficients, For vectors The maximum absolute value among all dimensions.
5. The method according to claim 4, characterized in that, The projection coefficient is calculated as follows: ,in The projection coefficients are determined by the linear constraint inequality. To constrain the number of inequalities.
6. The method according to claim 5, characterized in that, The The calculation method is as follows: If ,but ;otherwise, ;in Let be the coefficient vector of the linear constraint inequality. It is a constant. This indicates transpose.
7. The method according to claim 1, characterized in that, The output layer of the neural network is a tanh activation function mapped to the range of -1 to 1.
8. An electromagnetic device inverse design device based on a bijective differentiable projection layer and a neural network, characterized in that, include: The convex feasible region space construction module is used to determine the structural variables and inequality constraints of the electromagnetic device to be designed, and to construct the convex feasible region space composed of inequality constraints. A bijective mapping function establishment module is used to establish a bijective mapping function from the hypercube domain to the convex feasible domain space; The neural network building module is used to build a neural network for generating structural variables of electromagnetic devices; A neural network construction module with a bijective differentiable projection layer is used to concatenate the bijective mapping function as an activation function layer after the output layer of the neural network to form a neural network with a bijective differentiable projection layer. A neural network training module is used to train the neural network with a bijective differentiable projection layer. The structural variable generation module is used to input the target electromagnetic parameters into the neural network with a bijective differentiable projection layer after training, generate structural variables that satisfy the inequality constraints, and realize the inverse design of electromagnetic devices.
9. A computer device, characterized in that, It includes a memory and a processor, the memory storing a computer program configured to be executed by the processor, the computer program including instructions for performing the method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a computer, implements the method according to any one of claims 1 to 7.