Unified method, medium and product for neural operator training and partial differential equation system solving based on variational principle
By constructing unlabeled optimization objectives using variational principles and automatic differentiation techniques, the training and solution of neural operators are unified, solving the problems of high computational cost and low efficiency of data-driven training methods, and realizing efficient neural operator training and partial differential equation solving.
Patent Information
- Application Number
- CN202310326728.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2026-05-15
- Estimated Expiration
- 2043-03-30
AI Technical Summary
Existing data-driven neural operator training methods require a large amount of labeled data, resulting in computational burden and cost, and the training process is separated from the solution, leading to low efficiency.
A variational principle-based approach is adopted to estimate discrete functionals through the prediction node solutions of neural operators, and an unlabeled optimization objective is constructed using automatic differentiation techniques. The neural operators are then trained using an iterative method, unifying the solution and training processes.
It reduces reliance on traditional solvers, lowers computational costs, and improves generalization ability and solution efficiency in the mapping from parameter space to solution space.
Smart Images

Figure CN116468104B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of physical simulation and machine learning, and in particular relates to a unified method, medium and product for training neural operators and solving partial differential equations based on variational principles. Background Technology
[0002] Neural operators, as a type of deep neural network capable of effectively learning the mapping operator between the parameter space and solution space of partial differential equations, offer higher accuracy and real-time inference across the entire solution domain compared to traditional surrogate models such as Gaussian process models and radial basis function models. They have garnered widespread attention in numerous physical simulation fields, including fluid dynamics, solid dynamics, electromagnetics, and heat transfer. Neural operators possess numerous advantages, such as potential super-resolution, high flexibility, and excellent generalization performance, making them highly promising for applications in industries such as digital twins of industrial equipment, real-time and large-scale simulation solutions, animation and game modeling and rendering, and metaverse simulations. They are very likely to become a core technology for next-generation physical simulation solvers.
[0003] However, existing data-driven training methods for neural operators require massive amounts of labeled data from traditional solvers, leading to extensive use of traditional solvers and thus a huge computational burden. In addition, the training process itself also incurs certain computational costs. Summary of the Invention
[0004] To address the shortcomings of existing data-driven methods for training neural operators, this invention proposes a unified method, medium, and product based on variational principles for training neural operators and solving partial differential equation systems. This method estimates discrete functionals by predicting nodal solutions of the neural operator, and then minimizes the gradient norm of the discrete functional with respect to nodal solutions using an iterative method based on the equation system. This constructs an unlabeled optimization objective to train the neural operator, thus avoiding the extensive use of traditional solvers to obtain labels and saving computational costs. Furthermore, this method leverages the generalization ability of the neural operator to provide good initial solutions for each iteration, essentially integrating training and solving into a unified framework.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] Firstly, a unified method for training neural operators and solving partial differential equation systems based on variational principles is proposed, comprising the following steps:
[0007] Step 100: Sample from the parameter space of the partial differential equation system to form an unlabeled dataset D containing only discrete parameter fields. Divide dataset D into an offset set L, a test set T, and an unlabeled set U. Divide the unlabeled set U into multiple batches and encode the boundary conditions to form the mask tensor of the boundary conditions. This includes the following sub-steps:
[0008] Step 101: Select the form of the parameter space and the sampling strategy for the partial differential equation system;
[0009] Step 102: Divide the solution domain of the partial differential equation system into grids, and sample the parameter space of the partial differential equation system according to the sampling strategy selected in Step 101. Discretize the sampled parameter fields at the Gaussian points of the grid to form an unlabeled discrete parameter field dataset D containing only discrete parameter fields. Specifically: determine the number of sampled discrete parameter fields and the shape of the discrete parameter fields.
[0010] Step 103: Randomly sample (N1+N2) discrete parameter fields from the discrete parameter field dataset D, solve the nodal solutions of the partial differential equation system corresponding to these (N1+N2) discrete parameter fields, and take the first N1 discrete parameter fields and their corresponding nodal solutions (labels) as the offset set L, and the remaining N2 discrete parameter fields and their corresponding nodal solutions as the test set T. The offset set L is used to offset the range of the output. See step 203 for details.
[0011] Step 104: Exclude the (N1+N2) discrete parameter fields sampled in the previous step from the dataset D to form an unlabeled set U as the training set;
[0012] Step 105: Set a variable i to record the number of iterations and set its value to 0. Divide the unlabeled set U into several batches of discrete parameter field samples.
[0013] Step 106: Encode the boundary conditions to form a mask tensor M with the same shape as the nodal solution. In M, the M elements whose positions correspond to the constrained nodal degrees of freedom are set to 0, and the remaining elements are set to 1.
[0014] Step 200: Use the neural operator module F to predict the nodal solutions of the discrete parameter field samples in the unlabeled set U, and further obtain the discretized functional as an estimate of the system functional based on the nodal solutions, including the following sub-steps:
[0015] Step 201: Extract a batch of discrete fiber angle field samples s from the unlabeled set U without replacement. If all batches are extracted, increment the variable i by 1. Determine whether the training process of the neural operator has reached the convergence condition of the algorithm. If it has converged, output the weight θ of the neural operator and execute step 304. Otherwise, shuffle the unlabeled set U and divide the shuffled unlabeled set U into several batches. Extract and train again from the first batch. The convergence condition can be that i reaches the maximum number of training iterations or the inference accuracy of the neural operator has reached the accuracy requirement.
[0016] Step 202: Input the sample s into the neural operator module F for inference, and use the mask tensor M to perform a masking operation on the tensor F(s) output by F to obtain the node solution a, as shown in Equation (1.1);
[0017] a=F(s)⊙M(1.1) In equation (1.1), ⊙ represents the element-wise product between tensors, and the same applies below;
[0018] Step 203: Use the mean and standard deviation (std) of all labels in the offset set L to perform offset processing on the node solution a:
[0019] a=a⊙std+mean(1.2)
[0020] Step 204: Perform a convolution operation on the solution at node a to obtain the solution at the Gaussian point and its spatial derivative;
[0021] Step 205: Use tensor operations to process the solution and its spatial derivative at the Gaussian point, and obtain the value of the integrand of the functional at the Gaussian point;
[0022] Step 206: Using the Gaussian integration method, obtain the discretized functional estimate Π based on the value of the integrand of the functional at the Gaussian point;
[0023] Step 300: Apply variational operations to the discretized functional to construct the optimization objective. Specifically: calculate the gradient R of the functional estimate Π with respect to the node solution a, and use its norm as the minimization objective. Use an iterative method based on the system of equations to obtain the update step size Δa of the current node solution, and use Δa to update the weight θ of the neural operator module F. This includes the following sub-steps:
[0024] Step 301: Using the automatic differentiation method, backpropagate the functional estimate Π, record the gradient R of the functional estimate Π with respect to the node solution a, and use its norm as the minimization objective.
[0025] Step 302: Input the gradient R into the iterative method based on the system of equations to obtain the update step size Δa of the current node solution;
[0026] Step 303: Update the weights θ of the neural operator using Δa, and return to execute step 201;
[0027] Step 304: Perform inference on the test set T using the neural operator module F, and collect test set metrics.
[0028] Furthermore, in step 101, the parameter space of the partial differential equation system can be the space formed by the coefficients or free terms of the partial differential equation system. The parameter space form of the partial differential equation system can be a continuous parameter field controlled by parameters, such as a B-spline surface or a Gaussian random field, or a function of such parameter fields as independent variables. The sampling strategy can be a simple random sampling method or a Latin hypercube sampling method.
[0029] Furthermore, in step 102, the mesh division setting can be adjusted according to the specific research problem. Sampling the parameter space of the partial differential equation system can refer to direct sampling of the parameters of the partial differential equation system, or it can refer to sampling of the independent variables that control the parameters of the partial differential equation system. For example, for the heat conduction partial differential equation that controls heat conduction, the heat source term can be directly sampled. For the elasticity partial differential equation system that controls the fiber layup elastic plate, the material principal direction coordinate axis angle that controls the elastic coefficient in the constitutive equation system can be sampled, that is, the fiber angle field can be sampled.
[0030] Furthermore, in step 103, the analytical method used to solve the partial differential equation system can be a similar analytical method such as finite element analysis, boundary element analysis, isogeometric analysis, and meshless method.
[0031] Furthermore, in step 105, the size and number of batches can be adjusted according to the specific research question.
[0032] Furthermore, in step 202, the neural operator module F includes, but is not limited to, a single neural operator and a combination of multiple neural operators. The network structure and hyperparameters of all neural networks in the neural operator module F can be adjusted according to the specific research problem.
[0033] Furthermore, in step 205, the specific form of the tensor operation of obtaining the integrand of the functional at the Gaussian point from the solution at the Gaussian point and its spatial derivative can be adjusted according to the form of the partial differential equation system being solved.
[0034] Furthermore, in step 302, the iterative method based on the system of equations includes, but is not limited to, the steepest descent method and the conjugate gradient method. The number of iterations in the iterative method based on the system of equations can be adjusted according to the specific research problem, and the maximum number of training iterations can be adjusted according to the specific research problem.
[0035] Furthermore, in step 303, the various hyperparameters required for the update process, such as learning rate and momentum, can be adjusted according to the specific research problem.
[0036] Furthermore, in step 304, the test set metrics can be determined independently based on the specific research question.
[0037] In a second aspect, a computer-readable storage medium includes instructions that, when executed on a computer, cause the computer to perform a method as described in any of the first aspects.
[0038] Thirdly, a computer program product containing instructions that, when run on a computer, causes the computer to perform any of the methods of the first aspect.
[0039] The beneficial effects of this invention are:
[0040] This invention proposes a unified method, medium, and product for training neural operators and solving partial differential equation systems based on variational principles, integrating the solution and training processes into a unified framework. Purely data-driven solutions and training processes are separate, requiring numerous labels to construct optimization objectives. This invention, however, estimates the output functional of the neural operator and introduces variational operations to construct unlabeled optimization objectives, thereby reducing the number of labels required during training and consequently reducing the use of traditional solvers. Fields such as optimization design and uncertainty quantification require solving the parameter set of partial differential equation systems, rather than individual parameters. Traditional solvers, such as finite element method solvers, can only solve each parameter instance independently, iteratively solving the entire parameter set. This invention, however, solves an operator from the parameter space to the solution space while simultaneously learning the weights of a generalized neural operator. This ensures that while specifically solving a particular parameter, the invention can achieve accuracy improvements on other parameters. This invention is expected to replace traditional solvers in fields such as optimization design and uncertainty quantification, where a large number of parameters of partial differential equation systems need to be solved. Attached Figure Description
[0041] Figure 1 A flowchart illustrating the implementation of a unified method, medium, and product for training neural operators and solving partial differential equation systems based on variational principles, provided in this embodiment of the invention.
[0042] Figure 2 This is a schematic diagram of the boundary conditions in Example 1;
[0043] Figure 3 This is a schematic diagram of the neural operator network structure in Example 1;
[0044] Figure 4 The image shows five randomly selected samples from the test set of Example 1.
[0045] Figure 5 This is a schematic diagram of the boundary conditions of a rectangular region P containing a varying heat source in Example 2;
[0046] Figure 6 The image shows five randomly selected samples from the test set of Example 2. Detailed Implementation
[0047] To provide a more detailed description of the technical problems solved by this invention, the technical solutions adopted, and the technical effects achieved, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and not for limiting it. The described embodiments are merely some embodiments of the invention, not all embodiments. Other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are all within the scope of protection of this invention. Furthermore, it should be noted that, for ease of description, the accompanying drawings only show the relevant parts of the invention and not all of them.
[0048] Example 1
[0049] This invention provides a unified method for training neural operators and solving partial differential equations based on variational principles, comprising the following steps:
[0050] Step 100: Study the variable stiffness fiber layup elastic plate P. The dimensions, material properties, and boundary conditions of plate P are described in Step 103. Sample the fiber angle field of plate P to form an unlabeled dataset D containing only discrete fiber angle fields. Further divide dataset D into an offset set L, a test set T, and an unlabeled set U. Divide the unlabeled set U into multiple batches and encode the boundary conditions to form a mask tensor for the boundary conditions. This includes the following sub-steps:
[0051] Step 101: Select the fiber angle field as a second-order B-spline surface controlled by a 4×4 control point grid, with the z-coordinate component fixed. Then, for the point (x... p ,y p ), its fiber angle Z(x) p ,y p The result is determined by equation (1.1):
[0052]
[0053] Among them, (u p ,v p ) is a point (x) p ,y p The parameter coordinates of N i,2 and N j,2, i and j are the basis functions of the (i+1)th and (j+1)th control points in the x and y directions, respectively, where i and j are the control point numbers in the x and y directions, respectively, and the sampling strategy is selected as Latin hypercube sampling;
[0054] Step 102: For the fiber layup elastic plate P under study, select a planar 4-node bilinear reduced integral element. Use a uniform mesh with a mesh density of 32×32 elements and a total of 33×33 nodes. Perform Latin hypercube sampling on the z-coordinates of the 4×4 control points of the fiber angle field. The sampling range for all z-coordinates is... This enables the sampling of fiber angle fields. The number of sampled fiber angle fields is 100,000. 14,005 of these fiber angle fields are randomly selected and discretized to form an unlabeled discrete fiber angle field dataset D containing only discrete fiber angle fields. The fiber angle fields are discretized at Gaussian points on the grid, and the shape of the discrete fiber angle fields is 32×32×1.
[0055] Step 103: Randomly sample 2005 discrete fiber angle fields from dataset D, solve the nodal displacement solutions of the partial differential equations corresponding to these 2005 discrete fiber angle fields, and use the first 5 discrete fiber angle fields and their corresponding nodal displacement solutions as the offset set L, and the remaining 2000 discrete fiber angle fields and their corresponding nodal displacement solutions as the test set T. In this example, the nodal displacement solutions are obtained using the commercial ABAQUS software. The calculation uses the S4R element from the ABAQUS software element library. The ABAQUS software uses a uniform mesh with a density of 32×32 elements and a total of 33×33 nodes. The boundary conditions of the variable stiffness fiber layup elastic plate P studied in this example are as follows: Figure 2 As shown, the dimensions of the variable stiffness fiber layup elastic plate P studied in this example are as follows: Plate P is a square plate with a length and width of 100 mm, i.e., OA = OB = 100 mm, and a thickness of 0.125 mm. The material properties of plate P are as follows: elastic modulus E1 in the fiber direction = 126000 MPa, elastic modulus perpendicular to the fiber direction = 11000 MPa, and Poisson's ratio ν in plane 1-2. 12 =0.28; the shear modulus in plane 1-2 is G 12 =6600MPa, the boundary conditions of plate P are: fix the left side OA and the bottom side OB of plate P, and apply an upward line load F1 and a rightward line load F3 to the top side BC, and apply a rightward line load F2 and an upward line load F4 to the right side AC, F1 = 5N / mm, F3 = 5xN / mm, F2 = 5N / mm, F4 = 5yN / mm;
[0056] In this embodiment, five samples were randomly selected from the test set, as shown in the diagram below. Figure 4As shown, the five samples are displayed in five columns, with each column representing one sample. The first row shows the fiber paths of the five samples; the second row shows the fiber angle fields (in rad) of the five samples; the third row shows the x-component predictions (in mm) of the neural operator for the displacement node solutions of the five samples; the fourth row shows the labels (in mm) of the x-components (in mm) of the displacement node solutions of the five samples; the fifth row shows the absolute error (in mm) of the x-component predictions (in mm) of the neural operator for the displacement node solutions of the five samples; the sixth row shows the y-component predictions (in mm) of the neural operator for the displacement node solutions of the five samples; the seventh row shows the labels (in mm) of the y-components (in mm) of the displacement node solutions of the five samples; and the eighth row shows the absolute error (in mm) of the y-component predictions (in mm) of the neural operator for the displacement node solutions of the five samples.
[0057] Step 104: Exclude the 2005 discrete fiber angle fields sampled in the previous step from the dataset D, and obtain an unlabeled set U containing 12000 discrete fiber angle fields as the training set.
[0058] Step 105: Set the variable i to record the number of iterations and set its value to 0. Divide the unlabeled set U into 12,000 batches of discrete fiber angle field samples, with each batch having a size of 1.
[0059] Step 106: Encode the boundary conditions to form a boundary condition mask tensor M of shape (1, 33, 33, 2). In M, the M elements whose positions correspond to the degrees of freedom of the constrained nodes are set to 0, and the remaining elements are set to 1.
[0060] Step 200: Use the neural operator module F, which contains two identically configured implicit Fourier neural operators (IFNO). Each IFNO is responsible for predicting one translation component. The settings for each Fourier neural operator are as follows: Figure 3 As shown, the method predicts the nodal displacements of the discrete fiber angle field samples in the unlabeled set U, corresponding to a shape of 32×32×2. Further, based on the nodal displacements, a discretized functional is obtained as an estimate of the system functional. This includes the following sub-steps:
[0061] Step 201: Extract a batch of discrete fiber angle field samples s from the unlabeled set U without replacement. If all batches are extracted, increment the variable i by 1. Determine whether the training process of the neural operator has reached the convergence condition of the algorithm. If convergence is achieved, output the weight θ of the neural operator and execute step 304. Otherwise, shuffle the unlabeled set U and re-divide the shuffled unlabeled set U into 12,000 batches. Extract and train again from the first batch. The convergence condition is that i reaches the maximum number of training iterations. In this embodiment, the maximum number of training iterations is 500.
[0062] Step 202: Input the discrete fiber angle field sample s into the neural operator module F for inference, and use the mask tensor M to perform a masking operation on the tensor F(s) output by F to obtain the node displacement solution a, as shown in equation (1.2).
[0063] a=F(s)⊙M(1.2)
[0064] Step 203: Use the mean tensor and standard deviation tensor std of all labels in the offset set L to offset the node displacement a;
[0065] a=a⊙std+mean(1.3)
[0066] Step 204: Perform a convolution operation on the nodal displacement a to obtain the solution and its spatial derivative at the Gaussian point;
[0067] Step 205: Use tensor operations to process the solution at the Gaussian point and the spatial derivative to obtain the value of the integrand of the functional at the Gaussian point;
[0068] Step 206: Using the Gaussian integration method, based on the value of the integrand of the functional at the Gaussian point, obtain the discretized functional Π, as shown in equation (1.4);
[0069]
[0070] Among them, a e Represents the nodal displacement of each element, with the subscript "l" indicating the value at the l-th integration point within the element. N represents the shape function matrix, B represents the strain-displacement matrix, D represents the material property matrix, and J represents the nodal displacement of each element. e The Jacobian matrix representing the unit, where f represents physical strength. Represents surface force, H l I ml These represent the weights of the l-th integration point within the cell and the l-th integration point at the m-th cell boundary, respectively.
[0071] Step 300: For the discretized functional Apply variational operations, specifically: compute functional estimates. The gradient R of the node displacement a is minimized, and its norm is used as the objective. An iterative method based on the system of equations is used to obtain the update step size Δa of the current node displacement. Then, the weights θ of the neural operator module F are updated using Δa. The process includes the following sub-steps:
[0072] Step 301: Use automatic differentiation techniques to estimate the functional. Perform backpropagation and record the functional estimates. The gradient R of the nodal displacement a is shown in Equation (1.5), and the norm of R is minimized.
[0073]
[0074] Step 302: Input the gradient R into the conjugate gradient method. The conjugate gradient method runs for two iterations to obtain the update step size Δa of the current node displacement.
[0075] Step 303: Based on the stochastic gradient descent method, update the weights θ of the neural operator using Δa, set the learning rate to 1, and then return to execute step 201;
[0076] Step 304: Perform inference on the test set T using the neural operator module F, and select the average relative 2-norm error as the test set index, as shown in Equation (1.6);
[0077]
[0078] The functional descriptions and hyperparameter settings of each layer of the neural operator network in this embodiment are shown in Table 1:
[0079] Table 1
[0080]
[0081] In a second aspect, a computer-readable storage medium includes instructions that, when executed on a computer, cause the computer to perform a method as described in any of the first aspects.
[0082] Thirdly, a computer program product containing instructions that, when run on a computer, causes the computer to perform any of the methods of the first aspect.
[0083] To address the shortcomings of existing data-driven methods for training neural operators and traditional solvers, this invention proposes a unified method, medium, and product based on variational principles for training neural operators and solving partial differential equation systems. Composite materials are widely used in aerospace, sports equipment, and automotive manufacturing industries. Variable stiffness composite materials, in particular, are favored in lightweight design due to their ability to maximize mechanical load-bearing capacity through fiber path optimization. Variable angle fiber layups are a fundamental component of variable stiffness composite materials, and achieving batch real-time analysis of the mechanical response of variable angle fiber layups is crucial for accelerating the optimization design of variable stiffness composite materials. Example 1 of this invention, oriented towards anisotropic variable angle fiber layup simulation, achieved a mean relative 2-norm error of 2.93% on a test set with a capacity of 2000, using only 5 labels on the offset set L and no labels on the training set. This reaches the level of training error in purely data-driven systems, demonstrating that this invention can be applied to batch real-time, low-cost, and high-efficiency simulation analysis of the mechanical response of variable angle fiber layups. Since no data-driven training error term is used, this invention can save the time and computing power required to generate a large number of labels for constructing data-driven error terms. Furthermore, it unifies the two tasks of solving partial differential equations and training neural operators within a single framework, providing strong support for downstream applications such as optimization design and inverse problems.
[0084] Example 2
[0085] In a first aspect, the present invention provides a unified method for training neural operators and solving partial differential equation systems based on variational principles, comprising the following steps:
[0086] Step 100: Investigate the heat transfer problem in a rectangular region P containing varying heat sources. The region size and boundary conditions are described in Step 103. Sample the heat sources to form an unlabeled dataset D containing only discrete heat source fields. Further divide dataset D into an offset set L, a test set T, and an unlabeled set U. Divide the unlabeled set U into multiple batches. Encode the boundary conditions to form a mask tensor for the boundary conditions. This includes the following sub-steps:
[0087] Step 101: Select the form of the heat source field as a Gaussian random field:
[0088]
[0089] in, The sampling strategy selected is simple random sampling;
[0090] Step 102: For the rectangular region P containing the changing heat source under study, select a planar 4-node bilinear element as the unit. The grid setting adopts uniform grid division with a grid density of 30×30 elements and a total of 31×31 nodes. The heat source field is then subjected to simple random sampling and discretization. The number of samples is 12010, thus forming an unlabeled dataset D containing only the heat source field. The heat source field is discretized at the Gaussian points of the grid, and the shape of the discretized heat source field is 30×30×1.
[0091] Step 103: Randomly sample 2010 discrete heat source fields from dataset D, solve the nodal temperature solutions of the partial differential equations corresponding to these 2010 discrete heat source fields, and use the first 10 discrete heat source fields and their corresponding nodal temperature solution labels as the offset set L, and the remaining 2000 discrete heat source fields and their corresponding nodal temperature solution labels as the test set T. In this example, the nodal temperature solution labels are obtained by COMSOL commercial software. During the calculation, planar 4-node bilinear elements from the COMSOL commercial software element library are used. The mesh generation in the COMSOL software is uniform, with a mesh density of 30×30 elements and a total of 31×31 nodes. The boundary conditions of the rectangular region P containing the varying heat source studied in this example are as follows: Figure 5 As shown, in this example, the length and width of region P are both 1m, that is, OA=OB=1m, and the four boundaries of region P are all set as Dirichlet boundary conditions with a temperature of 0℃.
[0092] In this embodiment, five samples were randomly selected from the test set, as shown in the diagram below. Figure 6 As shown, the five samples are presented in five columns, with each column containing one sample. The first row shows the heat source fields (unit: W / m²) of the five samples. 2 The first line contains the temperature node solutions of the neural operator for 5 samples (unit: °C), the second line contains the labels of the temperature node solutions of 5 samples (unit: °C), and the fourth line contains the absolute error of the prediction of the temperature node solutions of the neural operator for 5 samples (unit: °C).
[0093] Step 104: Exclude the 2010 discrete heat source fields sampled in the previous step from the dataset D, and obtain an unlabeled set U containing 10000 discrete heat source fields as the training set.
[0094] Step 105: Set a variable i to record the number of iterations and set its value to 0. Divide the unlabeled set U into 157 batches of discrete heat source field samples, of which 156 batches are 64 in size and the last batch is 16 in size.
[0095] Step 106: Encode the boundary conditions to form a boundary condition mask tensor M of shape (1, 31, 31, 1). In M, the M elements whose positions correspond to the degrees of freedom of the constrained nodes are set to 0, and the remaining elements are set to 1.
[0096] Step 200: Use the neural operator module F, which contains an implicit Fourier neural operator (IFNO), to predict the temperature. Predict the temperature of the nodes with a shape of 31×31×1 corresponding to the discrete heat source field samples in the unlabeled set U. Further, obtain the discretized functional based on the node temperature as an estimate of the system functional. This includes the following sub-steps:
[0097] Step 201: Extract a batch of discrete fiber angle field samples s from the unlabeled set U without replacement. If all batches are extracted, increment the variable i by 1. Determine whether the training process of the neural operator has reached the convergence condition of the algorithm. If convergence is achieved, output the weight θ of the neural operator and execute step 304. Otherwise, shuffle the unlabeled set U and re-divide the shuffled unlabeled set U into 157 batches, of which 156 batches are of size 64 and the last batch is of size 16. Extract and train again from the first batch. The convergence condition is that i reaches the maximum number of training iterations. In this embodiment, the maximum number of training iterations is 5000.
[0098] Step 202: Input the discrete heat source field sample s into the neural operator module F for inference, and use the mask tensor M to perform a masking operation on the tensor F(s) output by F to obtain the node temperature solution a, as shown in Equation (1.2).
[0099] a=F(s)⊙M(1.2)
[0100] Step 203: Use the mean tensor and standard deviation tensor std of all labels in the offset set L to offset the node temperature a;
[0101] a=a⊙std+mean(1.3)
[0102] Step 204: Perform a convolution operation on the node temperature a to obtain the solution and its spatial derivative at the Gaussian point;
[0103] Step 205: Use tensor operations to process the solution at the Gaussian point and the spatial derivative to obtain the value of the integrand of the functional at the Gaussian point;
[0104] Step 206: Using the Gaussian integration method, obtain the discretized temperature functional based on the value of the integrand at the Gaussian point.
[0105] Step 300: Apply the discretized temperature functional Apply variational operations, specifically: compute functional estimates. The gradient R of node temperature a is minimized, and its norm is used as the objective. An iterative method based on the system of equations is used to obtain the update step size Δa of the current node temperature. Then, the weights θ of the neural operator module F are updated using Δa. The process includes the following sub-steps:
[0106] Step 301: Use automatic differentiation techniques to estimate the functional. Perform backpropagation and record the functional estimates. The gradient R of the node temperature a is shown in Equation (1.5), and the norm of R is used as the minimization objective.
[0107]
[0108] Step 302: Input the gradient R into the conjugate gradient method. The conjugate gradient method runs for two iterations to obtain the update step size Δa of the current node temperature.
[0109] Step 303: Based on the stochastic gradient descent method, update the weights θ of the neural operator using Δa, set the learning rate to 1e-5, and then return to execute step 201;
[0110] Step 304: Perform inference on the test set T using the neural operator module F, and select the average relative 2-norm error as the test set index, as shown in Equation (1.6);
[0111]
[0112] In a second aspect, a computer-readable storage medium includes instructions that, when executed on a computer, cause the computer to perform a method as described in any of the first aspects.
[0113] Thirdly, a computer program product containing instructions that, when run on a computer, causes the computer to perform any of the methods of the first aspect.
[0114] To address the shortcomings of existing data-driven methods for training neural operators and traditional solvers, this invention proposes a unified method, medium, and product based on variational principles for training neural operators and solving partial differential equation systems. Heat transfer problems are widespread in various engineering and technological fields, such as energy and power, metallurgy, chemical industry, transportation, building materials, machinery, and traditional industries like food, light industry, textiles, and pharmaceuticals, as well as many high-tech fields such as aerospace, nuclear energy, microelectronics, materials science, biomedical engineering, environmental engineering, new energy, and agricultural engineering. Accurate, real-time, and batch simulations of heat transfer phenomena can help us better understand and master these phenomena, thus enabling better application in practical production and daily life. For example, it can be used to simulate and optimize heat transfer phenomena in industrial production processes, improving production efficiency and product quality; it can be used to simulate and optimize heat transfer phenomena in buildings, improving their energy-saving performance; and it can be used to simulate and optimize heat transfer phenomena in electronic devices, improving their heat dissipation performance. In Example 2 of this invention, in studying the heat transfer problem of a rectangular region P containing a varying heat source, with only 10 labels in the offset set L and no labels in the training set, an average relative 2-norm error of only 2.20% was achieved on a test set of 2000, reaching the level of a purely data-driven training error. This demonstrates that the invention can be applied to accurate real-time batch simulation of heat transfer phenomena. Since no data-driven training error term is used, this invention saves the time and computational effort required to generate a large number of labels for constructing the data-driven error term. Furthermore, it unifies the tasks of solving partial differential equations and training neural operators within a single framework, providing strong support for downstream applications such as optimization design and inverse problems.
[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications to the technical solutions described in the foregoing embodiments, or equivalent substitutions for some or all of the technical features, do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A kind A unified method for training neural operators and solving partial differential equation systems based on variational principles is characterized by: Includes the following steps: Step 100: Study the variable stiffness fiber layup elastic plate P. The dimensions, material properties and boundary conditions of plate P are described in Step 103. Sample the fiber angle field of plate P to form an unlabeled dataset D containing only discrete fiber angle fields. Further divide the dataset D into an offset set L, a test set T and an unlabeled set U. Divide the unlabeled set U into multiple batches and encode the boundary conditions to form a mask tensor of the boundary conditions. Step 200: Use the neural operator module F to predict the nodal solutions of the discrete parameter field samples in the unlabeled set U, and obtain the discretized functional based on the nodal solutions as an estimate of the system functional; The sub-step of step 200 is as follows: Step 201: Draw a batch of discrete fiber angle field samples s from the unlabeled set U without replacement. If all batches are drawn, increment the variable i by 1. Determine whether the training process of the neural operator has reached the convergence condition of the algorithm. If it converges, output the weights of the neural operator. If the label set U is shuffled, the shuffled label set U is divided into several batches, and the extraction and training are carried out again starting from the first batch. The convergence condition can be that i reaches the maximum number of training iterations or the inference accuracy of the neural operator has reached the accuracy requirement. Step 202: Input the sample s into the neural operator module F for inference, using the mask tensor tensor of F output Perform a masking operation to obtain the node solution. As shown in Equation 1.1; (1.1) In Equation 1.1, This represents the element-wise product between tensors, and the same applies below. Step 203: Using the mean and standard deviation (std) of all labels in the offset set L, solve the node... Perform offset processing: (1.2) Step 204: Solve the node Perform a convolution operation to obtain the solution at the Gaussian point and its spatial derivative; Step 205: Use tensor operations to process the solution and its spatial derivative at the Gaussian point, and obtain the value of the integrand of the functional at the Gaussian point; Step 206: Using the Gaussian integration method, obtain the discretized functional estimate based on the values of the integrand at the Gaussian points. ; Step 300: Apply variational operations to the discretized functional to construct the optimization objective and compute the functional estimate. Regarding nodal solutions The gradient R is calculated, and its norm is minimized. An iterative method based on the system of equations is used to obtain the update step size of the solution at the current node. and utilize Update the weights of the neural operator module F .
2. The one according to claim 1 A unified method for training neural operators and solving partial differential equation systems based on variational principles is characterized by: The sub-step of step 100 is as follows: Step 101: Select the form of the parameter space and the sampling strategy for the partial differential equation system; Step 102: Divide the solution domain of the partial differential equation system into grids, and sample the parameter space of the partial differential equation system according to the sampling strategy selected in Step 101. Discretize the sampled parameter fields at the Gaussian points of the grid to form an unlabeled discrete parameter field dataset D containing only discrete parameter fields. Step 103: Randomly sample (N1+N2) discrete parameter fields from the discrete parameter field dataset D, solve the nodal solutions of the partial differential equation system corresponding to these (N1+N2) discrete parameter fields, and take the first N1 discrete parameter fields and their corresponding nodal solutions as the offset set L, and the remaining N2 discrete parameter fields and their corresponding nodal solutions as the test set T. The offset set L is used to offset the range of the output. Step 104: Exclude the (N1+N2) discrete parameter fields sampled in the previous step from the dataset D to form an unlabeled set U as the training set; Step 105: Set a variable i to record the number of iterations and set its value to 0. Divide the unlabeled set U into several batches of discrete parameter field samples. Step 106: Encode the boundary conditions to form a mask tensor with the same shape as the nodal solution. ,exist In this context, the position corresponds to the degree of freedom of the constrained node. The element is set to 0, and the rest are set to 1.
3. The one according to claim 1 A unified method for training neural operators and solving partial differential equation systems based on variational principles is characterized by: The sub-step of step 300 is as follows: Step 301: Use the automatic differentiation method to estimate the functional. Perform backpropagation and record the functional estimates. Solution to the node The gradient R is obtained, and its norm is minimized as the objective; Step 302: Input the gradient R into the iterative method based on the system of equations to obtain the update step size of the current nodal solution. ; Step 303: Use Weights of neural operators Perform the update and return to step 201; Step 304: Perform inference on the test set T using the neural operator module F, and collect test set metrics.
4. The one according to claim 1 A unified method for training neural operators and solving partial differential equation systems based on variational principles is characterized by: In step 202, the neural operator module F is a single neural operator or a combination of multiple neural operators.
5. A computer-readable storage medium, characterized in that, Includes instructions that, when executed on a computer, cause the computer to perform the uniform method as described in any one of claims 1-4.
6. A computer program product containing instructions, characterized in that, When it is run on a computer, it causes the computer to perform the unified method as described in any one of claims 1-4.