Variational principle-based neural operator training and partial differential equation system solving integrated method, medium, and product
Patent Information
- Application Number
- GB2024006536
- Authority / Receiving Office
- GB · GB
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-30
- Filing Date
- 2024-01-03
- Publication Date
- 2025-01-15
AI Technical Summary
Existing data-driven neural operator training methods require a large amount of labeled data, resulting in high computational costs and reliance on traditional solvers, which cannot efficiently handle the mapping from parameter space to solution space of partial differential equations.
Using a method based on the variational principle, the discrete functional is estimated through the predicted node solution of the neural operator, and automatic differentiation technology is used to minimize the gradient norm, construct a label-free optimization goal, unify the training and solution process, and reduce the burden on traditional solvers. rely.
It reduces the need for labels during the training process, reduces computational costs, improves generalization capabilities when solving parameter sets of partial differential equations, and achieves efficient neural operator weight learning.
Smart Images

Figure 00000000_0001_ABST 
Figure 00000000_0000_ABST
Abstract
Description
Unified methods, media, and products for neural operator training and solving partial differential equations based on variational principles Technical Field
[0001] The present invention belongs to the intersection of physical simulation and machine learning, and in particular relates to a unified method, medium and product for neural operator training and solving partial differential equations based on the variational principle. Background Art
[0002] Neural operators, as deep neural networks that effectively learn mapping operators between the parameter space and solution space of partial differential equations, are capable of highly accurate, real-time reasoning across the entire domain of partial differential equations, compared to traditional proxy models like Gaussian process models and radial basis function models. They have garnered widespread attention in a wide range of physical simulation fields, including fluid, solid, electromagnetic, and heat transfer simulations. With their numerous advantages, including potential super-resolution, high flexibility, and excellent generalization, neural operators have significant potential for application in industries such as digital twins of industrial equipment, real-time and large-scale simulation solutions, animation and game modeling and rendering, and the metaverse, and are highly likely to become the core technology for the next generation of 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 a huge computational burden. In addition, the training process itself also incurs a certain computational cost.
[0004] Summary of the Invention
[0005] To address the shortcomings of existing data-driven methods for training neural operators, the present invention proposes a unified method, medium, and product for neural operator training and solving partial differential equations based on the variational principle. Discrete functionals are estimated through the predicted node solutions of neural operators, and the gradient norm of the discrete functionals obtained using automatic differentiation techniques to the node solutions is minimized through an iterative method based on the system of equations. This constructs an unlabeled optimization objective to train the neural operator, thereby avoiding the extensive use of traditional solvers to obtain labels and saving computational costs. At the same time, this method utilizes the generalization ability of neural operators to provide a good initial solution for each iteration, essentially incorporating training and solving into a unified framework.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0007] First, a unified method for neural operator training and solving partial differential equations based on the variational principle, comprising the following steps:
[0008] 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 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, encode the boundary conditions, and form a mask tensor of the boundary conditions. The following sub-steps are included:
[0009] Step 101: Select the form of the parameter space and sampling strategy of the partial differential equation system;
[0010] Step 102: Grid the solution domain of the partial differential equation system, and sample the parameter space of the partial differential equation system according to the sampling strategy selected in step 101. Discretize the sampled parameter field 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.
[0011] Step 103: Randomly sample (N1+N2) discrete parameter fields from the discrete parameter field dataset D, solve the node solutions of the partial differential equations corresponding to these (N1+N2) discrete parameter fields, and use the first N1 discrete parameter fields and their corresponding node solutions (labels) as the offset set L, and the remaining N2 discrete parameter fields and their corresponding node solutions as the test set T. The offset set L is used to offset the output range, see step 203 for details;
[0012] Step 104: exclude the (N1+N2) discrete parameter fields sampled in the previous step from the data set D to form an unlabeled set U as a training set;
[0013] Step 105: Set the variable i that records the number of iterations and set its value to 0, dividing the unlabeled set U into several batches of discrete parameter field samples;
[0014] Step 106: Encode the boundary conditions to form a mask tensor M of the boundary conditions with the same shape as the node solution, in which the elements of M corresponding to the constrained node degrees of freedom are set to 0, and the remaining elements are set to 1;
[0015] Step 200: Use the neural operator module F to predict the node 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 node solutions, including the following sub-steps:
[0016] Step 201: Extract a batch of discrete fiber angle field samples s from the unlabeled set U without replacement. If all batches are extracted, the variable i is incremented by 1. It is determined whether the training process of the neural operator has reached the algorithm convergence condition. If converged, the weight θ of the neural operator is output and step 304 is executed. Otherwise, the unlabeled set U is shuffled and re-divided into several batches. Re-extract and train 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.
[0017] Step 202: Input the sample s into the neural operator module F for inference, and use the mask tensor M to perform a mask operation on the tensor F(s) output by F to obtain the node solution a, as shown in Equation (1.1); a=F(s)⊙M (1.1)
[0018] In formula (1.1), ⊙ represents the element-wise product between tensors, the same below;
[0019] 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: a=a⊙std+mean (1.2)
[0020] Step 204: Perform a convolution operation on the node solution a to obtain the solution at the Gaussian point and its spatial derivative;
[0021] Step 205: Process the solution at the Gaussian point and its spatial derivative using tensor operations to obtain the value of the functional integrand at the Gaussian point;
[0022] Step 206: Using the Gaussian integral method, obtain the discretized functional estimate Π according to the value of the functional integrand at the Gaussian point;
[0023] Step 300: Apply a variational operation to the discretized functional to construct an optimization objective. Specifically, the gradient R of the functional estimate Π with respect to the node solution a is calculated, and its norm is used as the minimization objective. An iterative method based on a system of equations is used to obtain the update step size △a of the current node solution, and △a is used to update the weight θ of the neural operator module F. The following sub-steps are included:
[0024] Step 301: Use the automatic differentiation method to perform backpropagation on 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 target;
[0025] Step 302: Input the gradient R into the iterative method based on the equation system to obtain the update step size △a of the current node solution;
[0026] Step 303: Use Δa to update the weight θ of the neural operator, and return to step 201;
[0027] Step 304: Perform inference on the neural operator module F on the test set T and calculate the test set indicators.
[0028] Furthermore, in step 101, the parameter space of the partial differential equation system can be a space formed by the coefficients or free terms of the partial differential equation system, the parameter space of the partial differential equation system can be a continuous parameter field controlled by parameters such as a B-spline surface and a Gaussian random field, or a function with such a parameter field as an independent variable, and the sampling strategy can be a sampling method such as a simple random sampling method and a Latin hypercube sampling method.
[0029] Furthermore, in the step 102, the grid division setting can be adjusted according to the specific research problem. Sampling the parameter space of the partial differential equation group can refer to direct sampling of the parameters of the partial differential equation group, or it can refer to sampling of the independent variables that control the parameters of the partial differential equation group. For example, for the heat conduction partial differential equation that controls heat conduction, the heat source term can be directly sampled, and for the elastic mechanics partial differential equation group that controls the fiber laminate elastic plate, the material principal direction coordinate axis angle that controls the elastic coefficient in the constitutive equation group can be sampled, that is, the fiber angle field can be sampled.
[0030] Furthermore, in step 103, the analysis method used to solve the partial differential equations may be a finite element analysis method, a boundary element analysis method, an isogeometric analysis method, a meshless method, or similar analysis methods.
[0031] Furthermore, in step 105, the size and number of batches can be adjusted according to specific research questions.
[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 of the neural operator module F can be adjusted according to specific research problems.
[0033] Furthermore, in step 205, the specific form of the tensor operation for obtaining the functional integrand 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 to be 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 iterative steps of 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, various hyperparameters required for the update process, such as learning rate, momentum, etc., can be adjusted according to specific research problems.
[0036] Furthermore, in step 304, the test set indicators can be determined according to the specific research questions.
[0037] In a second aspect, a computer-readable storage medium comprises instructions, which, when executed on a computer, cause the computer to execute any one of the methods of the first aspect.
[0038] In a third aspect, a computer program product comprising instructions, when executed on a computer, causes the computer to execute any one of the methods of the first aspect.
[0039] The beneficial effects of the present invention are:
[0040] The present invention proposes a unified method, medium and product for neural operator training and partial differential equation solution based on the variational principle, which integrates the solution and training processes into a unified framework. The solution and training process of pure data-driven approach are carried out separately, and a large number of labels are required to construct the optimization target. The present invention estimates the output functional of the neural operator and introduces variational operation to construct the unlabeled optimization target, thereby reducing the labels required in the training process and reducing the use of traditional solvers. Fields such as optimization design and uncertainty quantification require solving the parameter set of the partial differential equation system rather than a single parameter. Traditional solvers, such as finite element-based solvers, can only solve each parameter instance in the parameter set independently, and then traverse the entire parameter set. The present invention solves an operator from parameter space to solution space and simultaneously learns the weight of a neural operator with generalization ability. This ensures that while solving a specific parameter, the present invention can obtain accuracy improvement on other parameters. The present invention is expected to replace traditional solvers in fields such as optimization design and uncertainty quantification, which require solving a large number of parameters of partial differential equations. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] FIG1 is a flowchart of a unified method, medium, and product for neural operator training and partial differential equation solution based on the variational principle provided by an embodiment of the present invention;
[0042] FIG2 is a schematic diagram of boundary conditions of Example 1;
[0043] FIG3 is a schematic diagram of the neural operator network structure of Example 1;
[0044] FIG4 is a diagram showing five randomly sampled samples from the test set of Example 1;
[0045] FIG5 is a schematic diagram of the boundary conditions of a rectangular region P containing a variable heat source in Example 2;
[0046] FIG6 is a diagram showing 5 randomly sampled samples from the test set of Example 2. DETAILED DESCRIPTION
[0047] In order to make the technical problems solved by the present invention, the technical solutions adopted and the technical effects achieved more detailed, the present invention is further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. The described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. It should also be noted that, for the convenience of description, only the relevant parts of the present invention, rather than all of the contents, are shown in the accompanying drawings.
[0048] Example 1
[0049] The embodiment of the present invention provides a unified method for neural operator training and solving partial differential equations based on the variational principle, including the following steps:
[0050] Step 100: Study a variable-stiffness fiber-laminated elastic plate P. The dimensions, material properties, and boundary conditions of plate P are described in step 103. The fiber angle field of plate P is sampled to form an unlabeled dataset D containing only discrete fiber angle fields. Dataset D is further divided into an offset set L, a test set T, and an unlabeled set U. The unlabeled set U is divided into multiple batches. The boundary conditions are encoded to form a mask tensor of the boundary conditions. This includes the following substeps:
[0051] Step 101: The fiber angle field is selected as the z-coordinate component of a second-order B-spline surface controlled by a 4×4 control point grid. The x and y components of the control points are fixed. For a point (x p ,y p ), its fiber angle Z(x p ,y p ) is determined by formula (1.1):
[0052] Among them, (u p ,v p ) is the point (x p ,y p ) parameter coordinates, N i,2 and N j,2 are the basis functions of the (i+1)th and (j+1)th control points in the x and y directions, respectively. i and j are the labels of the control points in the x and y directions, respectively. The sampling strategy is Latin hypercube sampling.
[0053] Step 102: For the fiber-laminated elastic plate P under study, the unit is selected as a bilinear reduced integration unit with four plane nodes. The grid setting adopts uniform grid division, the grid division density is 32×32 units, and there are 33×33 nodes in total. The z coordinates of the 4×4 control points of the fiber angle field are sampled using Latin hypercube. The range of all z coordinate sampling is In this way, the fiber angle field is sampled. The number of sampled fiber angle fields is 100,000, and 14,005 fiber angle fields are randomly extracted and discretized to form an unlabeled discrete fiber angle field dataset D containing only discrete fiber angle fields. The fiber angle field is discretized at the Gaussian points of the grid, and the shape of the discrete fiber angle field is 32×32×1.
[0054] Step 103: Randomly sample 2005 discrete fiber angle fields from the data set 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. The nodal displacement solutions in this example are obtained by solving the ABAQUS commercial software. The S4R unit in the ABAQUS commercial software unit library is used in the calculation, and the meshing in the ABAQUS software is divided into The grid density is uniformly divided, with a total of 32×32 units and 33×33 nodes. The boundary conditions of the variable stiffness fiber laminate elastic plate P studied in this example are shown in Figure 2. The dimensions of the variable stiffness fiber laminate elastic plate P studied in this example are: the plate P is a square plate with a length and width of 100 mm, that is, OA = OB = 100 mm, and a plate thickness of 0.125 mm. The material properties of the plate P are: the elastic modulus in the fiber direction is E1 = 126000 MPa, the elastic modulus perpendicular to the fiber direction is E2 = 11000 MPa, and the Poisson's ratio ν in the 1-2 plane is ν. 12 =0.28; the shear modulus in the 1-2 plane is G 12 =6600 MPa. The boundary conditions of plate P are as follows: the left side OA and the bottom side OB of plate P are fixed, and an upward linear load F1 and a rightward linear load F3 are applied to the top side BC, and a rightward linear load F2 and an upward linear load F4 are applied to the right side AC. F1 = 5 N / mm, F3 = 5x N / mm, F2 = 5 N / mm, and F4 = 5y N / mm.
[0055] In this embodiment, 5 samples are randomly sampled from the test set and the display diagram is shown in Figure 4, where the 5 samples are displayed in five columns, each column is a sample, where the first row is the fiber path display of the 5 samples, the second row is the fiber angle field of the 5 samples (unit: rad), the third row is the neural operator's prediction of the x-component of the displacement node solution of the 5 samples (unit: mm), the fourth row is the label of the x-component of the displacement node solution of the 5 samples (unit: mm), the fifth row is the absolute value error of the neural operator's prediction of the x-component of the displacement node solution of the 5 samples (unit: mm), the sixth row is the neural operator's prediction of the y-component of the displacement node solution of the 5 samples (unit: mm), the seventh row is the label of the y-component of the displacement node solution of the 5 samples (unit: mm), and the eighth row is the absolute value error of the neural operator's prediction of the y-component of the displacement node solution of the 5 samples (unit: mm).
[0056] Step 104: Exclude the 2005 discrete fiber angle fields sampled in the previous step from the data set D, and obtain an unlabeled set U containing 12,000 discrete fiber angle fields as a training set;
[0057] Step 105: Set the variable i that records 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, and the size of each batch is 1;
[0058] Step 106: Encode the boundary conditions to form a boundary condition mask tensor M of shape (1, 33, 33, 2), in which the elements of M corresponding to the constrained node degrees of freedom are set to 0, and the remaining elements are set to 1;
[0059] Step 200: Using a neural operator module F, F includes two implicit Fourier neural operators (IFNO) with identical settings. Each IFNO is responsible for predicting a displacement component. The settings of each IFNO are shown in FIG3 . The node displacements corresponding to the discrete fiber angle field samples in the unlabeled set U are predicted to have a shape of 32×32×2. A discretized functional is further obtained based on the node displacements as an estimate of the system functional. The following substeps are included:
[0060] Step 201: Extract a batch of discrete fiber angle field samples s from the unlabeled set U without replacement. If all batches are extracted, the variable i is incremented by 1. It is determined whether the training process of the neural operator has reached the algorithm convergence condition. If converged, the weight θ of the neural operator is output and step 304 is executed. Otherwise, the unlabeled set U is shuffled and re-divided into 12,000 batches. Re-extract and train 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.
[0061] Step 202: Input the discrete fiber angle field sample s into the neural operator module F for inference. Use the mask tensor M to perform a mask operation on the tensor F(s) output by F to obtain the node displacement solution a, as shown in Equation (1.2); a=F(s)⊙M (1.2)
[0062] Step 203: Use the mean tensor mean and standard deviation tensor std of all labels in the offset set L to perform offset processing on the node displacement a; a=a⊙std+mean (1.3)
[0063] Step 204: Perform a convolution operation on the node displacement a to obtain the solution at the Gaussian point and its spatial derivative;
[0064] Step 205: Using tensor operations to process the solution and spatial derivative at the Gaussian point to obtain the value of the functional integrand at the Gaussian point;
[0065] Step 206: Using the Gaussian integral method, the discretized functional Π is obtained based on the value of the functional's integrand at the Gaussian point, as shown in Equation (1.4);
[0066] Among them, a e represents the nodal displacement of each element, the subscript "l" is taken at the lth integration point in the element, N represents the shape function matrix, B represents the strain-displacement matrix, D represents the material property matrix, and J e represents the Jacobian matrix of the unit, f represents the physical force, Represents surface force, H l , I ml They represent the weight of the lth integration point in the unit and the weight of the lth integration point on the boundary of the mth unit, respectively.
[0067] Step 300: Discretize the functional Apply variational operations, specifically: calculate functional estimates Regarding the gradient R of the node displacement a, and taking its norm as the minimization target, an iterative method based on a system of equations is used to obtain the update step size △a of the current node displacement, and △a is used to update the weight θ of the neural operator module F, including the following sub-steps:
[0068] Step 301: Use automatic differentiation technology to estimate the functional Perform back propagation and record functional estimation The gradient R of the node displacement a is shown in Equation (1.5), and the norm of R is used as the minimization target;
[0069] Step 302: Input the gradient R into the conjugate gradient method, and the conjugate gradient method runs two iterations to obtain the update step length △a of the current node displacement;
[0070] Step 303: Based on the stochastic gradient descent method, the weight θ of the neural operator is updated using △a, and the learning rate is set to 1, and then the process returns to step 201;
[0071] Step 304: Perform inference on the neural operator module F on the test set T, and select the test set indicator as the mean relative 2-norm error, as shown in formula (1.6);
[0072] The functional description and hyperparameter settings of each layer of the neural operator network in this embodiment are shown in Table 1:
[0073] Table 1
[0074] In a second aspect, a computer-readable storage medium comprises instructions, which, when executed on a computer, cause the computer to execute any one of the methods of the first aspect.
[0075] In a third aspect, a computer program product comprising instructions, when executed on a computer, causes the computer to execute any one of the methods of the first aspect.
[0076] To address the shortcomings of existing data-driven neural operator training methods and traditional solvers, the present invention proposes a unified method, medium, and product for neural operator training and solving partial differential equations based on the variational principle. Composite materials are widely used in industries such as aerospace, sports equipment, and automotive manufacturing. Variable-stiffness composite materials are particularly favored in lightweight design because they can maximize mechanical bearing performance through fiber path optimization. Variable-angle fiber layups are a fundamental component of variable-stiffness composite materials. Real-time batch analysis of the mechanical response of variable-angle fiber layups is of great significance for accelerating the optimization design of variable-stiffness composite materials. Example 1 of the present invention simulates anisotropic variable-angle fiber layups. Using only five labels in the offset set L and a completely unlabeled training set, it achieves an average relative 2-norm error of 2.93% on a test set of 2000. This achieves the error level of purely data-driven training, demonstrating that the present invention can be applied to batch, real-time, low-cost, and high-performance simulation analysis of the mechanical response of variable-angle fiber layups. Since no data-driven training error term is used, the present invention can save the time and computing power of generating a large number of labels required to construct the data-driven error term, and unify the two tasks of solving the partial differential equation system and training the neural operator within a single framework, providing strong support for downstream applications such as optimization design and inverse problems.
[0077] Example 2
[0078] In a first aspect, the present invention provides a unified method for neural operator training and solving partial differential equations based on the variational principle, comprising the following steps:
[0079] Step 100: Study the heat transfer problem of a rectangular region P containing a variable heat source. The region size and boundary conditions are shown in step 103. Sample the heat source to form an unlabeled dataset D containing only discrete heat source fields. Further divide the dataset D into an offset set L, a test set T, and an unlabeled set U. The unlabeled set U is divided into multiple batches. Encode the boundary conditions to form a mask tensor of the boundary conditions. This includes the following sub-steps:
[0080] Step 101: Select the form of the heat source field as Gaussian random field:
[0081] in, The sampling strategy was chosen to be simple random sampling;
[0082] Step 102: For the rectangular region P containing the variable heat source under study, select a planar 4-node bilinear unit as the unit, use a uniform grid setting, the grid density is 30×30 units, and a total of 31×31 nodes, and perform simple random sampling and discretization on the heat source field. The number of samples is 12010, thereby forming an unlabeled data set D containing only the discrete heat source field. The heat source field is discretized at the Gaussian points of the grid, and the discretized heat source field shape is 30×30×1.
[0083] Step 103: Randomly sample 2010 discrete heat source fields from the data set 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. The nodal temperature solution labels in this example are obtained by solving with the COMSOL commercial software. The calculation is performed using a planar 4-node bilinear element in the COMSOL commercial software element library. The meshing in the COMSOL software adopts uniform meshing 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 variable heat source studied in this example are shown in FIG5 . In this example, the length and width of the region P are both 1 m, that is, OA = OB = 1 m, and the four boundaries of the region P are all set to Dirichlet boundary conditions with a temperature of 0°C.
[0084] In this embodiment, the test set randomly samples 5 samples as shown in Figure 6, where the 5 samples are displayed in five columns, each column is a sample, and the first row is the heat source field of the 5 samples (unit: W / m 2 ), the second line is the temperature node solution of the 5 samples by the neural operator (unit: ℃), the third line is the temperature node solution label of the 5 samples (unit: ℃), and the fourth line is the absolute value error of the prediction of the temperature node solution of the 5 samples by the neural operator (unit: ℃);
[0085] Step 104: exclude the 2010 discrete heat source fields sampled in the previous step from the data set D, and obtain an unlabeled set U containing 10,000 discrete heat source fields as a training set;
[0086] Step 105: Set the variable i that records 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 have a size of 64 and the last batch has a size of 16.
[0087] Step 106: Encode the boundary conditions to form a boundary condition mask tensor M of shape (1, 31, 31, 1), in which the elements of M corresponding to the constrained node degrees of freedom are set to 0, and the remaining elements are set to 1;
[0088] Step 200: Use the neural operator module F, which includes an implicit Fourier neural operator (IFNO) responsible for temperature prediction. It predicts the node temperature of the shape 31×31×1 corresponding to the discrete heat source field samples in the unlabeled set U. Further, a discretized functional is obtained based on the node temperature as an estimate of the system functional. The following sub-steps are included:
[0089] Step 201: Extract a batch of discrete fiber angle field samples s from the unlabeled set U without replacement. If all batches are extracted, the variable i is incremented by 1. It is determined whether the training process of the neural operator has reached the algorithm convergence condition. If converged, the weight θ of the neural operator is output and step 304 is executed. Otherwise, the unlabeled set U is shuffled and re-divided into 157 batches, 156 of which are of size 64 and the last batch is of size 16. Re-extract and train 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.
[0090] 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 mask operation on the tensor F(s) output by F to obtain the node temperature solution a, as shown in Equation (1.2); a=F(s)⊙M (1.2)
[0091] Step 203: Use the mean tensor mean and standard deviation tensor std of all labels in the offset set L to perform offset processing on the node temperature a; a=a⊙std+mean (1.3)
[0092] Step 204: Perform a convolution operation on the node temperature a to obtain the solution at the Gaussian point and its spatial derivative;
[0093] Step 205: Using tensor operations to process the solution and spatial derivative at the Gaussian point to obtain the value of the functional integrand at the Gaussian point;
[0094] Step 206: Using the Gaussian integral method, the discretized temperature functional is obtained based on the value of the functional integrand at the Gaussian point.
[0095] Step 300: Discretize the temperature functional Apply variational operations, specifically: calculate functional estimates Regarding the gradient R of the node temperature a, and taking its norm as the minimization target, an iterative method based on a system of equations is used to obtain the update step size △a of the current node temperature, and △a is used to update the weight θ of the neural operator module F, including the following sub-steps:
[0096] Step 301: Use automatic differentiation technology to estimate the functional Perform back propagation and record functional estimation The gradient R of the node temperature a is shown in Equation (1.5), and the norm of R is used as the minimization target;
[0097] Step 302: Input the gradient R into the conjugate gradient method, and the conjugate gradient method runs two iterations to obtain the update step length △a of the current node temperature;
[0098] Step 303: Based on the stochastic gradient descent method, the weight θ of the neural operator is updated using △a, and the learning rate is set to 1e-5, and then the process returns to step 201;
[0099] Step 304: Perform inference on the neural operator module F on the test set T, and select the test set indicator as the mean relative 2-norm error, as shown in formula (1.6);
[0100] In a second aspect, a computer-readable storage medium comprises instructions, which, when executed on a computer, cause the computer to execute any one of the methods of the first aspect.
[0101] In a third aspect, a computer program product comprising instructions, when executed on a computer, causes the computer to execute any one of the methods of the first aspect.
[0102] In response to the shortcomings of existing data-driven training methods for neural operators and traditional solvers, the present invention proposes a unified method, medium and product for neural operator training and solving partial differential equations based on the variational principle. Heat transfer problems are widely present in various engineering and technical fields, such as energy and power, metallurgy, chemical industry, transportation, construction and building materials, machinery, as well as traditional industries such as food, light industry, textiles, and medicine, as well as many high-tech fields such as aerospace, nuclear energy, microelectronics, materials, biomedical engineering, environmental engineering, new energy and agricultural engineering. Accurate and real-time batch simulation of heat transfer phenomena can help us better understand and master heat transfer phenomena, so as to better apply them to actual production and life. For example, it can be used to simulate and optimize heat transfer phenomena in industrial production processes to improve production efficiency and product quality; it can be used to simulate and optimize heat transfer phenomena in buildings to improve the energy-saving performance of buildings; it can be used to simulate and optimize heat transfer phenomena in electronic equipment to improve the heat dissipation performance of electronic equipment, etc. In studying the heat transfer problem of a rectangular region P containing a variable heat source, Example 2 of the present invention achieved an average relative 2-norm error of only 2.20% on a test set of 2000, using only 10 labels in the offset set L and a completely unlabeled training set. This achieves a purely data-driven training error level, demonstrating that the present invention can be applied to accurate, real-time batch simulations of heat transfer phenomena. By eliminating the use of data-driven training error terms, the present invention saves the time and computing power required to generate the large number of labels required to construct the data-driven error terms. Furthermore, the present invention 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.
[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications to the technical solutions described in the above embodiments, or equivalent replacement of some or all of the technical features therein, do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A unified method for neural operator training and partial differential equation solution based on variational principle, characterized in that: The following steps are involved: Step 100: sampling from the parameter space of the partial differential equation system to form an unlabeled data set D containing only discrete parameter fields, dividing the data set D into an offset set L, a test set T, and an unlabeled set U, dividing the unlabeled set U into multiple batches, encoding the boundary conditions, and forming a mask tensor of the boundary conditions; Step 200: Use the neural operator module F to predict the node solutions of the discrete parameter field samples in the unlabeled set U, and obtain the discretized functional as an estimate of the system functional according to the node solutions; Step 300: Apply variational operations to the discretized functional to construct an optimization target, calculate the gradient R of the functional estimate Π with respect to the node solution a, and use its norm as the minimization target, use an iterative method based on a 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.
2. The unified method for neural operator training and partial differential equation solution based on variational principle according to claim 1, characterized in that: The sub-steps of step 100 are: Step 101: Select the form and sampling strategy of the parameter space of the partial differential equation system; Step 102: gridding the solution domain of the partial differential equation system, sampling the parameter space of the partial differential equation system according to the sampling strategy selected in step 101, discretizing the sampled parameter field at the Gaussian points of the grid, and forming an unlabeled discrete parameter field data set D containing only discrete parameter fields; Step 103: randomly sample (N1+N2) discrete parameter fields from the discrete parameter field data set D, solve the node solutions of the partial differential equations corresponding to the (N1+N2) discrete parameter fields, and use the first N1 discrete parameter fields and their corresponding node solutions as the offset set L, and the remaining N2 discrete parameter fields and their corresponding node solutions as the test set T, wherein the offset set L is used to offset the output range; Step 104: exclude the (N1+N2) discrete parameter fields sampled in the previous step from the data set D to form an unlabeled set U as a training set; Step 105: Set a variable i that records the number of iterations and set its value to 0, dividing the unlabeled set U into several batches of discrete parameter field samples; Step 106: Encode the boundary conditions to form a mask tensor M of the boundary conditions with the same shape as the node solution, in which the M elements corresponding to the constrained node degrees of freedom are set to 0, and the remaining elements are set to 1.
3. The unified method for neural operator training and partial differential equation solution based on variational principle according to claim 2, characterized in that: The sub-steps of step 200 are: Step 201: extract a batch of discrete fiber angle field samples s from the unlabeled set U without replacement. If all batches are extracted, the variable i is incremented by 1 to determine whether the training process of the neural operator has reached the algorithm convergence condition. If converged, the weight θ of the neural operator is output and step 304 is executed. Otherwise, the unlabeled set U is shuffled and the shuffled unlabeled set U is re-divided into For several batches, extraction and training are performed again from the first batch; wherein the convergence condition may be that i reaches the maximum number of iterations of training 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, and use the mask tensor M to perform a mask operation on the tensor F(s) output by F to obtain the node solution a, as shown in formula (1.1); a=F(s)⊙M (1.1) In formula (1.1), ⊙ represents the element-wise product between tensors, the same below; 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: a=a⊙std+mean (1.2) Step 204: performing a convolution operation on the node solution a to obtain a solution at the Gaussian point and its spatial derivative; Step 205: Process the solution at the Gaussian point and its spatial derivative using tensor operations to obtain the value of the functional integrand at the Gaussian point; Step 206: Using the Gaussian integral method, according to the value of the functional integrand at the Gaussian point, obtain the discretized functional estimate Π.
4. The unified method for neural operator training and partial differential equation solution based on variational principle according to claim 3, characterized in that: The sub-steps of step 300 are: Step 301: Use the automatic differentiation method to back-propagate the functional estimate Π, record the gradient R of the functional estimate Π to the node solution a, and use its norm as the minimization target; Step 302: input the gradient R into the iterative method based on the equation system to obtain the update step length △a of the current node solution; Step 303: Use △a to update the weight θ of the neural operator, and return to execute step 201; Step 304: Perform inference on the neural operator module F on the test set T and calculate the test set indicators.
5. The unified method for neural operator training and partial differential equation solution based on variational principle according to claim 3, characterized in that: In step 202, the neural operator module F is a single neural operator or a combination of multiple neural operators.
6. A computer-readable storage medium, characterized in that: The invention comprises instructions, which, when executed on a computer, cause the computer to execute the unified method as claimed in any one of claims 1 to 5.
7. A computer program product comprising instructions, characterized in that When it is run on a computer, it enables the computer to execute the unified method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Partial differential equation numerical solution method based on neural network architecture search
CN114444012A
Unified method for neural operator training and partial differential equation set solving based on variational principle, medium and product
CN116468104A
A penalty method for PDE-constrained optimization
US20160070023A1
Image classification method for equivariant convolutional network model based on partial differential operator
WO2021184466A1
Image classification method using partial differential operator-based general-equivariant convolutional neural network model
WO2022062164A1