Numerical simulation method and system constructed based on neural network and iterative approximation method
By introducing time variables and iterative approximation methods into neural networks, and combining implicit multistep methods and Runge-Kutta methods, the problems of low computational resource consumption and time dimension efficiency of traditional numerical simulation methods in high-dimensional complex systems are solved, and efficient and accurate numerical simulation is achieved.
Patent Information
- Application Number
- CN202511058028.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-11-14
AI Technical Summary
Traditional numerical simulation methods face exponential growth in computational resource consumption in high-dimensional complex systems and multi-scale coupled problems, making it difficult to meet the requirements of efficient and accurate simulation. Physical information neural networks are inefficient in solving problems in the time dimension and require multiple iterations of training.
By employing neural networks and iterative approximation methods, and combining implicit multi-step methods and Runge-Kutta methods with time variables as input, a semi-discrete time iterative format is constructed to achieve continuous time prediction in a single round of training, avoiding a large number of internal point samplings.
It reduces the number of iterations, lowers computational memory usage, improves prediction accuracy and convergence speed, and enhances computational efficiency and prediction accuracy.
Smart Images

Figure CN120951773A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of neural networks, and more specifically, to numerical simulation methods and systems based on neural networks and iterative approximation methods. Background Technology
[0002] In the field of fluid mechanics, numerical simulation technology has become an important tool for revealing complex flow mechanisms, optimizing engineering design, and promoting scientific and technological progress. Through numerical simulation, researchers can efficiently and cost-effectively analyze key issues such as the aerodynamic characteristics of aircraft and the evolution of turbulent structures in a virtual environment, providing strong technical support for the research and development of high-end equipment such as aerospace equipment. With the continuous improvement of engineering needs, higher requirements are being placed on the accuracy, efficiency, and applicability of numerical simulation.
[0003] Traditional numerical simulation methods mainly include the finite difference method (FDM), finite element method (FEM), and finite volume method (FVM), which transform continuous partial differential equations into a system of algebraic equations through different discretization strategies, making them suitable for different types of fluid mechanics problems. These methods are widely used in engineering practice. In mainstream simulation software widely used in the field of fluid mechanics (such as COMSOL Multiphysics and ANSYS Fluent), the finite element method and finite volume method are integrated as core numerical solution tools, achieving efficient simulation of complex flow phenomena. However, as the complexity of fluid mechanics problems continues to increase, especially in high-dimensional complex systems and multi-scale coupled problems, traditional numerical methods often face the "curse of dimensionality"—that is, as the spatial dimension and degrees of freedom increase, the consumption of computational resources grows exponentially, leading to a significant decrease in solution efficiency, making it difficult to meet the needs of practical engineering for efficient and accurate simulation.
[0004] To overcome the bottlenecks of traditional methods, Physical-Informed Neural Networks (PINNs) have emerged. PINNs achieve meshless solutions to high-dimensional partial differential equations by directly embedding physical constraints into the loss function of the neural network, effectively alleviating the curse of dimensionality. While PINNs can efficiently handle complex flow problems in the spatial dimension, they still have shortcomings in the temporal dimension: they typically require multiple training and iterations for each time step, making it difficult to obtain full-time-domain flow evolution information at once, thus affecting overall computational efficiency and application adoption.
[0005] Raissi et al. first proposed Physics-Informed Neural Networks (PINN), a method that incorporates prior physical knowledge (usually partial differential equations, PDEs) into the neural network training process. Depending on how time is handled, PINN can be divided into continuous-time and discrete-time models. Many researchers have proposed a series of improved algorithms based on PINN.
[0006] Continuous-time and discrete-time models of physical information neural networks each have their own characteristics and limitations. Continuous-time models can achieve continuous predictions across the entire time domain after a single training iteration, but this requires a large number of internal point samples, and the number of internal points increases exponentially with increasing dimensionality. Discrete-time models, on the other hand, can achieve predictions over large time steps without requiring internal points by applying traditional numerical discretization methods, but they can only predict a specific time step per training iteration. Obtaining the prediction value at each time step requires multiple iterative training iterations.
[0007] To further improve the efficiency of neural networks in numerical simulation of complex flow problems, this invention provides a numerical simulation method and system based on neural networks and iterative approximation methods, aiming to provide technical support for solving time-related problems such as aircraft aerodynamic characteristics and turbulent structure evolution more efficiently. Addressing the drawback of discrete-time physical information neural network models requiring multiple iterations for training, this invention uses time variables as input, enabling continuous-time prediction with only one network in a single training round. Simultaneously, for new discrete processes, it employs more accurate implicit multi-step methods and Runge-Kutta methods, integrating the physical model of the control equations approximated by neural networks into a semi-discrete time iterative format. This avoids sampling a large number of internal points during training and achieves excellent results in both prediction accuracy and convergence speed. Summary of the Invention
[0008] In view of the shortcomings of the prior art, the purpose of this invention is to provide a numerical simulation method and system based on neural networks and iterative approximation methods.
[0009] According to the present invention, a numerical simulation method based on neural networks and iterative approximation methods is provided, the method comprising the following steps:
[0010] Step S1: Determine the partial differential equation problem to be solved;
[0011] Step S2: Construct an exact solution dataset based on the constraints;
[0012] Step S3: Build the objective function network using a deep learning network;
[0013] Step S4: Establish the loss function based on the optimization problem;
[0014] Step S5: Train the deep learning network using a random training set;
[0015] Step S6: Use the trained objective function network to output the predicted optimal solution;
[0016] The objective function network takes a time variable as input and achieves continuous time prediction through a single round of training.
[0017] The method is deployed in practical applications to perform one or more tasks including target detection, image classification, product defect detection, or maritime vessel target recognition.
[0018] In product defect detection tasks, the input is an image of the front screen and the back surface of the product from a smart mobile terminal or tablet computer, and the output is information on the existence, location, or type of product defects.
[0019] In the task of identifying ships on the sea surface, the input is a sea surface image, and the output is information on the presence, location, or type of ships.
[0020] Preferably, the deep learning network in step S3 is an adaptive fully connected neural network, an attention-based fully connected neural network, or a Kolmogorov-Arnold network;
[0021] The adaptive fully connected neural network adds adaptive variables to the first hidden layer to form an adaptive activation function;
[0022] The attention-based fully connected neural network enhances feature representation by constructing residual connections through a Transformer network;
[0023] The Kolmogorov-Arnold network uses B-splines or Chebyshev polynomials as activation functions.
[0024] Preferably, the loss function in step S4 is constructed using a time-semi-discrete iterative format, specifically as follows:
[0025] For one-dimensional problems, an implicit multi-step method is used. The one-step implicit multi-step method is formalized as follows:
[0026]
[0027] Where u n For u(t) n x) corresponds to the solution u at time nΔt, where Δt is the time step;
[0028] A new semi-discretization method is constructed by applying the approximate value of u, f(t, x; θ), to equation (1):
[0029]
[0030] Where f n This is the output at time nΔt; construction complete.
[0031] When using the method described above, the specific losses in step S4 are as follows:
[0032] The loss function at each time point is expressed as follows:
[0033] Loss n (θ)=||u n -f n || 2 ,n=1,...,N. (3)
[0034] The loss under the initial condition Loss0 is:
[0035] Loss0(θ)=||u 0 (x)-f 0 (x;θ)|| 2 (4)
[0036] Boundary conditions Loss b The loss is:
[0037]
[0038] Under periodic boundary conditions, the loss is reformulated as:
[0039]
[0040] Where x l It is the lower bound, x u This is the upper bound; therefore, the total loss function consists of the sum of the following three terms:
[0041]
[0042] Preferably, the loss function in step S4 is constructed using a time-semi-discrete iterative format, specifically as follows:
[0043] For the two-dimensional problem, the q-order implicit Runge-Kutta method is adopted. The q-order implicit Runge-Kutta method is formalized as follows:
[0044]
[0045] At this point, the neural network has multiple outputs, which can be described as follows:
[0046]
[0047] Then, substituting equation (9) into equation (8), we get:
[0048]
[0049] When using the method described above, the specific losses in step S4 are as follows:
[0050] The loss function at each time step is designed as follows:
[0051]
[0052] The initial conditional loss is:
[0053]
[0054] The total loss function consists of the sum of the following three terms:
[0055]
[0056] Preferably, the adaptive variable is dynamically adjusted according to task requirements, and the value of the adaptive variable is dynamically optimized according to the gradient of the loss function during training.
[0057] The present invention also provides a numerical simulation system based on neural networks and iterative approximation systems, the system comprising the following modules:
[0058] Module M1: Defines the partial differential equation problem to be solved;
[0059] Module M2: Constructs an exact solution dataset based on the constraints;
[0060] Module M3: Utilizes deep learning networks to build the objective function network;
[0061] Module M4: Establishes the loss function based on the optimization problem;
[0062] Module M5: Trains deep learning networks using random training sets;
[0063] Module M6: Utilizes the trained objective function network to output the predicted optimal solution;
[0064] The objective function network takes a time variable as input and achieves continuous time prediction through a single round of training.
[0065] The system is deployed in real-world applications and performs one or more tasks, including target detection, image classification, product defect detection, or maritime vessel target recognition.
[0066] In product defect detection tasks, the input is an image of the front screen and the back surface of the product from a smart mobile terminal or tablet computer, and the output is information on the existence, location, or type of product defects.
[0067] In the task of identifying ships on the sea surface, the input is a sea surface image, and the output is information on the presence, location, or type of ships.
[0068] Preferably, the deep learning network in module M3 is an adaptive fully connected neural network, an attention-based fully connected neural network, or a Kolmogorov-Arnold network;
[0069] The adaptive fully connected neural network adds adaptive variables to the first hidden layer to form an adaptive activation function;
[0070] The attention-based fully connected neural network enhances feature representation by constructing residual connections through a Transformer network;
[0071] The Kolmogorov-Arnold network utilizes B-splines or Chebyshev polynomials as activation functions. Preferably, the loss function in module M4 is constructed using a time-semi-discrete iterative format, specifically: an implicit multi-step method is employed for the one-dimensional problem, and the one-step implicit multi-step system is formalized as follows:
[0072]
[0073] Where u n For u(t) n x) corresponds to the solution u at time nΔt, where Δt is the time step;
[0074] A new semi-discrete system is constructed by applying the approximate value of u, f(t,x;θ), to equation (1):
[0075]
[0076] Where f n This is the output at time nΔt; construction complete.
[0077] When using the system, the specific losses in module M4 are as follows:
[0078] The loss function at each time point is expressed as follows:
[0079] Loss n (θ)=||u n -f n || 2 ,n=1,...,N. (3)
[0080] The loss under the initial condition Loss0 is:
[0081] Loss0(θ)=||u 0 (x)-f 0 (x;θ)|| 2 (4)
[0082] Boundary conditions Loss b The loss is:
[0083]
[0084] Under periodic boundary conditions, the loss is reformulated as:
[0085]
[0086] Where x l It is the lower bound, x u This is the upper bound; therefore, the total loss function consists of the sum of the following three terms:
[0087]
[0088] Preferably, the loss function in module M4 is constructed using a time-semi-discrete iterative format, specifically as follows:
[0089] For the two-dimensional problem, the q-order implicit Runge-Kutta method is adopted. The formalization of the q-order implicit Runge-Kutta system is as follows:
[0090]
[0091] At this point, the neural network has multiple outputs, which can be described as follows:
[0092]
[0093] Then, substituting equation (9) into equation (8), we get:
[0094]
[0095] When using the system, the specific losses in module M4 are as follows:
[0096] The loss function at each time step is designed as follows:
[0097]
[0098] The initial conditional loss is:
[0099]
[0100] The total loss function consists of the sum of the following three terms:
[0101]
[0102] Preferably, the adaptive variable is dynamically adjusted according to task requirements, and the value of the adaptive variable is dynamically optimized according to the gradient of the loss function during training.
[0103] Compared with the prior art, the present invention has the following beneficial effects:
[0104] 1. This invention optimizes the multi-round iterative training of the traditional discrete-time model into a single-round training mode by using time variables as input layer features. In the Burgers equation experiment, the number of training iterations is reduced by 19.3%, which solves the problem that the existing PINN discrete-time model needs to be repeatedly trained to obtain the full time domain solution.
[0105] 2. This invention uses an implicit multi-step method (one-dimensional) and the Runge-Kutta method (two-dimensional) to construct a time semi-discrete iterative scheme, which reduces the number of sampling points by 98% in the Black-Scholes equation experiment and reduces the relative L2 error from 1.48 to 9.03e-04, overcoming the exponential dependence of the continuous-time model on the internal sampling points.
[0106] 3. This invention establishes a meshless spatiotemporal decoupling mechanism. In the two-dimensional Burgers equation experiment, the mesh generation step of the traditional FEM / FVM is eliminated by independent time recursion calculation of spatial points, and the computational memory usage is reduced by 37%.
[0107] 4. Based on the adaptive activation function optimization of AFNN, this invention improves the convergence speed by 23.8% in the Allen-Cahn equation, reduces the relative L2 error by 75.5%, and improves the rate of change of the activation function slope by 3.2 times when the adaptive variable a=2;
[0108] 5. The attention mechanism-driven feature enhancement of this invention reduces the error of AttentionFNN by 60.5% compared with the standard FNN in the two-dimensional Burgers equation task, and realizes interpretable localization of key regions of the physical field through Transformer weight visualization. Attached Figure Description
[0109] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0110] Figure 1 This diagram illustrates the use of an adaptive activation function in the first hidden layer of AFNN, where α is an adaptive variable.
[0111] Figure 2 This is a schematic diagram of a fully connected neural network based on an attention mechanism.
[0112] Figure 3A schematic diagram of the KAN neural network;
[0113] Figure 4 This is a schematic diagram of the DeLISA structure;
[0114] Figure 5 A schematic diagram comparing the predictions of PINN and DeLISA (a), showing the Burgers equation (a) with iteration = 300; the Schrödinger equation (b) with iteration = 1000; and the carburizing equation with variable coefficients (c) with iteration = 50.
[0115] Figure 6 A schematic diagram comparing the predicted and exact solutions of the Burgers equation at different times;
[0116] Figure 7 The diagram shows the Burgers equation. (a) represents the change in loss with the number of iterations, and (b) represents the curve of the predicted solution at t = 0.99 and iteration = (0, 1000, 2000, 5000).
[0117] Figure 8 A schematic diagram comparing the predicted and exact solutions of the two-dimensional Burgers equation at different times;
[0118] Figure 9 The diagram shows the two-dimensional Burgers equation. (a) represents the change of loss with the number of iterations, and (b) represents the absolute error between the predicted solution and the exact solution at time T.
[0119] Figure 10 This is a flowchart illustrating the principle of the present invention. Detailed Implementation
[0120] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.
[0121] Example 1:
[0122] According to the present invention, a numerical simulation method based on neural networks and iterative approximation methods is provided, the method comprising the following steps:
[0123] Step S1: Determine the partial differential equation problem to be solved;
[0124] Step S2: Construct an exact solution dataset based on the constraints;
[0125] Step S3: Build the objective function network using a deep learning network;
[0126] Step S4: Establish the loss function based on the optimization problem;
[0127] Step S5: Train the deep learning network using a random training set;
[0128] Step S6: Use the trained objective function network to output the predicted optimal solution;
[0129] The objective function network takes a time variable as input and achieves continuous-time prediction through a single round of training. The method is deployed in practical applications to perform one or more tasks, including target detection, image classification, product defect detection, or maritime vessel target recognition. In the product defect detection task, the input is an image of the front screen and back surface of a smart mobile terminal or tablet, and the output is information on the existence, location, or type of product defect. In the maritime vessel target recognition task, the input is a sea surface image, and the output is information on the existence, location, or type of vessel.
[0130] Deep learning networks can be adaptive fully connected neural networks, attention-based fully connected neural networks, or Kolmogorov-Arnold networks. Adaptive fully connected neural networks add adaptive variables to the first hidden layer to form an adaptive activation function. Attention-based fully connected neural networks use Transformer networks to construct residual connections to enhance feature representation. Kolmogorov-Arnold networks use B-splines or Chebyshev polynomials as activation functions.
[0131] The loss function is constructed using a time-semi-discretized iterative format, specifically as follows:
[0132] For one-dimensional problems, an implicit multi-step method is used. The one-step implicit multi-step method is formalized as follows:
[0133]
[0134] Where u n For u(t) n x) corresponds to the solution u at time nΔt, where Δt is the time step; It is a differential operator, corresponding to the partial differential equation problem determined in step one; and Indicates the operator The function value u applied to time steps n and n+1, specifically the discrete difference matrix or finite element matrix acting on the vector u. n+1 and u n Above; N refers to the size of the semi-discrete grid; n is the corresponding index variable.
[0135] A new semi-discretization method is constructed by applying the approximate value of u, f(t, x; θ), to equation (1):
[0136]
[0137] Where f n It is the output at time nΔt. It is a differential operator, corresponding to the partial differential equation problem determined in step one; and Indicates the operator; The approximation f applied to time steps n and n+1, specifically the action of the discrete difference matrix or finite element matrix on vector f. n+1 and f n Above, the construction is complete;
[0138] When using the method described above, the specific losses in step S4 are as follows:
[0139] The loss function at each time point is expressed as follows:
[0140] Loss n (θ)=||u n -f n || 2 ,n=1,...,N. (3)
[0141] The loss under the initial condition Loss0 is:
[0142] Loss0(θ)=||u 0 (x)-f 0 (x;θ)|| 2 (4)
[0143] u 0 (x) corresponds to the initial condition function of the partial differential equation problem determined in step one. It is a known true function or real data, generally the initial solution at time t = 0; f 0 (x; θ) represents the output of the neural network at the initial time.
[0144] Boundary conditions Loss b The loss is:
[0145]
[0146] u n (x b ) represents the true solution u(x,t) at time t n and boundary point x b The true value of f; n (x b ;θ) represents the neural network model at time tn and boundary position x b Predicted solutions on; This represents the true solution u(x, t) at time t. n and boundary point x b The first spatial derivative of ; This indicates that the neural network model is at time t n and boundary position x b The first spatial derivative on the given surface.
[0147] Under periodic boundary conditions, the loss is reformulated as:
[0148]
[0149] Where x l It is the lower bound, x u It is the upper bound; f n (x l ;θ) represents the neural network at time t n Time, left boundary position x l The predicted value at f; n (x u ;θ) represents the neural network at time t n Time, right boundary position x u The predicted value at that location; This indicates that the neural network at time t n Time, left boundary position x l The first spatial derivative at that point; This indicates that the neural network at time t n Time, right boundary position x u The first spatial derivative at that point. Therefore, the total loss function consists of the sum of the following three terms:
[0150]
[0151] The loss function is constructed using a time-semi-discretized iterative format, specifically as follows:
[0152] For the two-dimensional problem, the q-order implicit Runge-Kutta method is adopted. The q-order implicit Runge-Kutta method is formalized as follows:
[0153]
[0154] q represents the order or number of stages of the implicit Runge-Kutta method; Indicates the current time step t n Based on, offset c i The solution at time Δt is usually an intermediate time point; a ij These are elements in the coefficient matrix of the implicit Runge-Kutta method, defining the dependencies between each intermediate stage; It is a differential operator Acting at the intermediate moment The result above; i is the index of the intermediate stage of the implicit Runge-Kutta method; u n,q+i Auxiliary or internal variables are used to correct predicted values; u n+1 It is the numerical solution after time stepping; b j These are the implicit Runge-Kutta weighting coefficients, used to weight and sum the contributions of each stage.
[0155] At this point, the neural network has multiple outputs, which can be described as follows:
[0156]
[0157] Then, substituting equation (9) into equation (8), we get:
[0158]
[0159] When using the method described above, the specific losses in step S4 are as follows:
[0160] The loss function at each time step is designed as follows:
[0161]
[0162] The initial conditional loss is:
[0163]
[0164] The total loss function consists of the sum of the following three terms:
[0165]
[0166] The adaptive variables are dynamically adjusted according to task requirements, and their values are dynamically optimized based on the gradient of the loss function during training.
[0167] The present invention also provides a numerical simulation system based on neural networks and iterative approximation systems. The numerical simulation system based on neural networks and iterative approximation systems can be implemented by executing the process steps of the numerical simulation method based on neural networks and iterative approximation systems. That is, those skilled in the art can understand the numerical simulation method based on neural networks and iterative approximation systems as a preferred embodiment of the numerical simulation system based on neural networks and iterative approximation systems.
[0168] Example 2:
[0169] The present invention also provides a numerical simulation system based on neural networks and iterative approximation systems, the system comprising the following modules:
[0170] Module M1: Defines the partial differential equation problem to be solved;
[0171] Module M2: Constructs an exact solution dataset based on the constraints;
[0172] Module M3: Utilizes deep learning networks to build the objective function network;
[0173] Module M4: Establishes the loss function based on the optimization problem;
[0174] Module M5: Trains deep learning networks using random training sets;
[0175] Module M6: Utilizes the trained objective function network to output the predicted optimal solution;
[0176] The objective function network takes a time variable as input and achieves continuous time prediction through a single round of training. The system is deployed in practical applications to perform one or more tasks, including target detection, image classification, product defect detection, or maritime vessel target recognition. In the product defect detection task, the input is an image of the front screen and back surface of a smart mobile terminal or tablet, and the output is information on the existence, location, or type of product defect. In the maritime vessel target recognition task, the input is a sea surface image, and the output is information on the existence, location, or type of vessel.
[0177] Deep learning networks can be adaptive fully connected neural networks, attention-based fully connected neural networks, or Kolmogorov-Arnold networks. Adaptive fully connected neural networks add adaptive variables to the first hidden layer to form an adaptive activation function. Attention-based fully connected neural networks use Transformer networks to construct residual connections to enhance feature representation. Kolmogorov-Arnold networks use B-splines or Chebyshev polynomials as activation functions.
[0178] The loss function is constructed using a time-semi-discretized iterative format, specifically as follows:
[0179] For one-dimensional problems, an implicit multi-step method is used. The one-step implicit multi-step system is formalized as follows:
[0180]
[0181] Where u n For u(t) n x) corresponds to the solution u at time nΔt, where Δt is the time step;
[0182] A new semi-discrete system is constructed by applying the approximate value of u, f(t, x; θ), to equation (1):
[0183]
[0184] Where f n This is the output at time nΔt; construction complete.
[0185] When using the system, the specific losses in module M4 are as follows:
[0186] The loss function at each time point is expressed as follows:
[0187] Loss n (θ)=||u n -f n || 2 ,n=1,...,N. (3)
[0188] The loss under the initial condition Loss0 is:
[0189] Loss0(θ)=||u 0 (x)-f 0 (x;θ)|| 2 (4)
[0190] Boundary conditions Loss b The loss is:
[0191]
[0192] Under periodic boundary conditions, the loss is reformulated as:
[0193]
[0194] Where x l It is the lower bound, x u This is the upper bound; therefore, the total loss function consists of the sum of the following three terms:
[0195]
[0196] The loss function is constructed using a time-semi-discretized iterative format, specifically as follows:
[0197] For the two-dimensional problem, the q-order implicit Runge-Kutta method is adopted. The formalization of the q-order implicit Runge-Kutta system is as follows:
[0198]
[0199] At this point, the neural network has multiple outputs, which can be described as follows:
[0200]
[0201] Then, substituting equation (9) into equation (8), we get:
[0202]
[0203] When using the system, the specific losses in module M4 are as follows:
[0204] The loss function at each time step is designed as follows:
[0205]
[0206] The initial conditional loss is:
[0207]
[0208] The total loss function consists of the sum of the following three terms:
[0209]
[0210] The adaptive variables are dynamically adjusted according to task requirements, and their values are dynamically optimized based on the gradient of the loss function during training.
[0211] Example 3:
[0212] PINN's continuous-time and discrete-time models each have their own characteristics and limitations. The continuous-time model can achieve continuous prediction across the entire time domain after a single training iteration, but this requires a large number of internal point samples, and the number of internal points increases exponentially with increasing dimensionality. The discrete-time model, by applying traditional numerical discretization methods, can achieve predictions over large time steps without requiring internal points, but it can only predict one time step per training iteration. To obtain the prediction value at each time step, multiple iterative training iterations are required.
[0213] To enable continuous-time prediction in discrete-time models, this invention provides the following technical solution:
[0214] Numerical simulation methods for partial differential equations that combine hybrid physics mechanisms and deep learning iterations belong to the field of deep learning simulation and solution. Figure 1 The method includes the following steps:
[0215] S1: Determine the partial differential equation problem to be solved;
[0216] S2: Exact solution dataset constructed based on constraints
[0217] S3: Utilize deep learning networks to build the objective function network;
[0218] S4: Establish the loss function based on the optimization problem;
[0219] S5: Train the deep learning network using a random training set;
[0220] S6: Utilize the trained objective function network to output the predicted optimal solution;
[0221] Furthermore, the partial differential equation problem described in S1 takes the form of:
[0222]
[0223] Where u(t, x) is the unknown solution to the equation. For the differential operator, u t Let Ω be the first derivative of u with respect to t, and Ω be the bounded region. Initial and boundary conditions are given by the practical problem. The objective of this invention is to solve the above partial differential equations in the continuous time domain using the proposed time semi-discretization method within a neural network framework, and this method depends only on the initial and boundary points.
[0224] Furthermore, the objective function network described in S3 is constructed using a deep learning network cascaded iterative approximation method.
[0225] Preferably, the deep learning network is an adaptive fully connected neural network, an attention-based fully connected neural network, or a KAN, as detailed below:
[0226] An adaptive fully connected neural network adds an adaptive variable α to the first hidden layer to form a new adaptive activation function.
[0227] The attention-based fully connected neural network introduces two transformer networks, U and V, to map the input variable X to a high-dimensional feature space. Then, each hidden layer uses element-wise multiplication to form new residual connections to enhance the hidden state. The detailed process is as follows:
[0228] U=φ(XW u +b u ),V=φ(XW v +b v )
[0229] H l =φ(XW l +b l )
[0230] Z k =φ(H k W k +b k ), k=1,...,L
[0231] H k+1 =(1-Z) k )☉U+Z k ☉V,k=1,...,L
[0232] f(X;θ)=H L+1 W+b
[0233] Where ⊙ denotes element-wise multiplication, i.e., multiplying corresponding elements of the matrix. φ is the tanh activation function. θ contains the standard parameters of a fully connected neural network and the weights and biases of the two transformer networks:
[0234]
[0235] In this network structure, network U and V can be viewed as weights of the hidden layer output states. During training, they automatically adjust the composition of the residual connections, thereby enhancing the representation of information that plays a crucial role in function fitting.
[0236] According to the definition of the Kolmogorov-Arnold representation theorem, a multivariate continuous function f defined on a bounded field can be decomposed into a finite combination of single-variable continuous functions and a binary operation of addition:
[0237]
[0238] Where, φ q It is a continuous external function, φ q,p It is a single variable x p The continuous inner function. The outer function Φ. q The inner function φ q,p The results are combined, and these inner functions act on each variable x individually. p .
[0239] While using the above formula directly is theoretically reasonable, it is practically useless. These univariate functions can be non-smooth or even fractal, making them difficult to learn in practice. Therefore, KAN is generalized to arbitrary widths and depths compared to the original formula of the Kolmogorov-Arnold representation theorem, providing a more efficient and interpretable representation of solutions.
[0240] A structure with L layers and n l A KAN with n neurons can be defined as follows:
[0241]
[0242] in, It is the i-th layer of the l-th layer. l The activation function of each neuron. Each layer of a KAN can be viewed as a nonlinear transformation of the output of the previous layer. The activation function of a KAN can be any continuous function, typically using smooth functions such as B-splines or Chebyshev polynomials.
[0243] By selecting an appropriate activation function, KAN can effectively approximate complex nonlinear functions, thereby improving the network's expressive power and learning efficiency. The network structure of KAN is as follows: Figure 6 As shown.
[0244] Commonly used activation functions include smoothing functions such as B-splines and Chebyshev polynomials. For general applications, this paper will follow the original formula of KAN and use B-splines as the activation function. B-splines can be defined as follows:
[0245]
[0246] Among them, t i Here, k represents the node of the B-splines, and k is the order of the B-splines. B-splines have local support properties, which can help the network learn solutions more effectively. The second-order B-splines used here have a quadratic shape, making them more flexible than first-order B-splines.
[0247] At the same time, the KAN input data is scaled and normalized:
[0248]
[0249] Among them, X c and Y c Here, L and W are the center coordinates of the domain, respectively, and L and W are the length and width of the domain, respectively. This normalization process can help the network learn solutions more effectively.
[0250] For the same reason, the tanh activation function can be applied to the output of the KAN layer, restricting it to the range [-1, 1]. This allows the network to better utilize the approximation capabilities of B-splines in the range [-1, 1].
[0251] Furthermore, the method for establishing the loss function described in S4 is as follows:
[0252] S401: Input approximate solution
[0253] S402: Calculate the loss at each time step. n =(u n -f n ) 2 ;
[0254] S403: Calculate the loss at each time step boundary. n,b =(u n (x b )-f n (x b ;θ)) 2
[0255] S404: Calculate total loss
[0256] Furthermore, the training process described in S5 is as follows:
[0257] S501: A set of N randomly generated m-dimensional sample points X;
[0258] S502: Input the set of sample points into the deep learning network to obtain the predicted values.
[0259] S503: Use iterative approximation methods to obtain approximate solutions at the corresponding time steps;
[0260] S504: Take the approximate solution as input and calculate the loss value using the loss function established in S4;
[0261] S505: Use gradient descent of the loss value to adjust the parameters of the deep learning network of the objective function network; S506: Repeat steps S501 to S505 until the loss value meets the threshold setting to complete the training.
[0262] Furthermore, the iterative approximation method is specifically as follows:
[0263] Obtain the output of the neural network
[0264] The mapping relationship between the neural network output and the predicted solution is constructed by using a time semi-discretization method.
[0265] The final predicted solution is calculated using the above mapping relationship.
[0266] Preferably, the above-mentioned time semi-discretization method is a one-step implicit multi-step method for one-dimensional problems, specifically: First, the one-step implicit multi-step method is formalized as follows:
[0267]
[0268] Where u n For u(t) n x) corresponds to the solution u at time nΔt, where Δt is the time step.
[0269] Then, the approximate value of u, f(t, x; θ), is applied to the above equation to construct a new semi-discretization method:
[0270]
[0271] Where f n This is the output at time nΔt, construction complete.
[0272] When using this method, the losses in S4 can be further specified as follows:
[0273] The loss function at each time point is expressed as follows:
[0274] Loss n (θ)=||u n -f n || 2 n=1,...,N.
[0275] Then the loss under the initial condition Loss0 is:
[0276] Loss0(θ)=||u 0 (x)-f 0 (x;θ)|| 2 .
[0277] Boundary conditions Loss b The loss is:
[0278]
[0279] Under periodic boundary conditions, the loss is reformulated as:
[0280]
[0281] Where x l It is the lower bound, x u This is the upper bound. Therefore, the total loss function consists of the sum of the following three terms:
[0282]
[0283] Preferably, the above-mentioned time semi-discretization method is a q-order implicit Runge-Kutta method for two-dimensional problems, specifically as follows:
[0284] The q-level implicit Runge-Kutta method is formalized as follows:
[0285]
[0286] At this point, the neural network has multiple outputs, which can be described as follows:
[0287]
[0288] Then, substituting (1.3) into equation (1.2), we can obtain...
[0289]
[0290] When using this method, the losses in S4 can be further specified as follows:
[0291] The loss function at each time step is designed as follows:
[0292]
[0293] The initial conditional loss is:
[0294]
[0295] The total loss function consists of the sum of the following three terms:
[0296]
[0297] The DeLISA architecture constructed in this invention is as follows: Figure 4 As shown.
[0298] In this architecture, the neural network portions share the same parameter set to predict u at any time step through a single round of training. Algorithm 1 describes the proposed implicit multi-step method.
[0299]
[0300] Comparison of PINN and DeLISA
[0301] To demonstrate the advantages of DeLISA, this section compares the relative L2 errors of PINN, DeLISA, and DeLISA with adaptive variables for different partial differential equations. The comparison results are listed in Table 1, where DeLISA with adaptive variables is denoted as DeLISA(a). Table 1 shows the relative L2 errors of different methods under the same network layer and neuron count, while maintaining the same convergence conditions.
[0302] Table 1 compares the relative L2 error of different methods, where a is the initial adaptive variable.
[0303]
[0304]
[0305] The results show that DeLISA(a) performs better overall. For the Burgers equation, Schrödinger equation, and variable-coefficient carburizing equation, there is no significant difference in the relative L2 error calculated by different methods. To verify that the proposed method converges faster in the above cases, we supplemented... Figure 5 And Table 2.
[0306] Table 2. Number of iterations for different methods.
[0307]
[0308] Figure 5The predictions of PINN and DeLISA(a) at a certain number of iterations are depicted, showing that DeLISA(a)'s prediction is closer to the "inflection point". Furthermore, Table 2 shows the number of iterations required for convergence of different methods; it can be seen that DeLISA(a) requires fewer iterations than PINN. In summary, DeLISA(a) converges faster than PINN.
[0309] One-dimensional Burgers equation
[0310] The Burgers equations are an important class of nonlinear partial differential equations that describe many physical flow phenomena, such as turbulence, boundary layer properties, and shock wave formation. In particular, due to the discontinuity of shock waves, they have attracted increasing attention from researchers. This section considers the following one-dimensional Burgers equations:
[0311] u t =-uu x +(0.01 / π)u xx x∈[-1,1],t∈[0,1],
[0312] u(0,x)=-sin(πx),
[0313] u(t,-1)=u(t,1)=0.
[0314] First, the one-dimensional Burgers equation is discretized using an implicit multi-step method, resulting in:
[0315]
[0316] Then the output f(t,x;θ) of AFNN is applied to the above equation:
[0317]
[0318] The partial derivatives of f are calculated using automatic differentiation. The parameters θ of the AFNN are then learned by minimizing the following loss function:
[0319]
[0320] In this experiment, AFNN was configured with four hidden layers, each consisting of 50 neurons and a tanh activation function. The adaptive variable α of the first hidden layer was set to 2, and the time step Δt = 0.01. At each time step, the training set consisted of an initial point N0 = 256 and boundary points N at each time step. b composition. Figure 6 The predicted and exact solutions for t = (0, 0.33, 0.66, 0.99) were compared, verifying that the predicted solution can accurately fit the exact solution. Figure 7(a) depicts the trend of the loss function as the number of iterations increases. To test the performance of the proposed method, Table 3 shows the error for different numbers of neurons, where L represents the number of neurons. The results are similar to those of the classical discretization method, with the relative L2 error increasing with time. Furthermore, from... Figure 7 (b) It can be seen that as the number of iterations increases, AFNN first approximates the smooth part of the curve, and then approximates the shock wave. In image processing, low frequencies represent areas where brightness or grayscale values change slowly in an image, describing the main part of the image and serving as a comprehensive measure of the overall image intensity. High frequencies correspond to parts of the image that change drastically, namely the edges (contours) or noise and details, primarily measuring the edges and contours of the image. Therefore, Figure 7 (b) also proves the F-Principle. Furthermore, from... Figure 7 It can be seen that after 5000 iterations, the neural network is mainly fitting the shock wave, resulting in a small change in the loss function.
[0321] Table 3 Burgers Equation: Relative L2 Error at Different Time Points for Different Numbers of Neurons
[0322]
[0323]
[0324] Two-dimensional Burgers equation
[0325] Now consider the two-dimensional Burgers equation:
[0326] u t +u(u x +u y ) = 0.1(u xx +u yy ),(x,y)∈[0,1]×[0,1],t∈[0,2]
[0327] u(0,x,y)=u 0 ,
[0328] u(t,x b y b )=u b ,
[0329] Wherein, the initial condition u 0 and boundary conditions u b It is generated by the following analytical solution:
[0330]
[0331] In this example, the series q = 4, the time step is Δt = 0.01, the initial point is N0 = 30 × 30, and the boundary point at each time step is N. b . Figure 8 The prediction results are shown for t = (0, 0.5, 1.2, 2), where the time step is 10Δt. (Example) Figure 9 As shown in (a), the loss function curve becomes gentler as the number of iterations increases. Figure 9 (b) shows the absolute value of the difference between the predicted and accurate values. Table 4 shows the prediction results using the two networks, where L represents the number of hidden layers and M represents the number of neurons. The results show that the network based on the attention mechanism has a significantly lower prediction error than the fully connected neural network.
[0332] Table 4 Two-dimensional Burgers equations: relative L2 error at different time steps.
[0333]
[0334]
[0335] This invention uses a time variable as input, enabling continuous-time prediction with only a single network in a single training round. By employing a more accurate implicit multi-step method and Runge-Kutta method, it integrates the physical model of the governing equations approximated by a neural network into a semi-discrete temporal iterative format, avoiding sampling a large number of internal points during training. Although this method uses a semi-discrete temporal approach, it does not generate a grid. During the solution process, each spatial point depends only on its previous time step, thus avoiding grid generation. The AFNN-based DeLISA applies an adaptive activation function in the first hidden layer, effectively improving the network's convergence speed and accuracy. The attention-based DeLISA enhances network interpretability and performance through the attention mechanism.
[0336] Those skilled in the art can understand this embodiment as a more specific description of Embodiment 1 and Embodiment 2.
[0337] Those skilled in the art will understand that, besides implementing the system and its various devices, modules, and units provided by this invention in the form of purely computer-readable program code, the same functions can be achieved entirely through logical programming of the method steps, making the system and its various devices, modules, and units of this invention function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, the system and its various devices, modules, and units provided by this invention can be considered as a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; alternatively, the devices, modules, and units for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0338] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.
Claims
1. A numerical simulation method based on neural networks and iterative approximation methods, characterized in that, The method includes the following steps: Step S1: Determine the partial differential equation problem to be solved; Step S2: Construct an exact solution dataset based on the constraints; Step S3: Build the objective function network using a deep learning network; Step S4: Establish the loss function based on the optimization problem; Step S5: Train the deep learning network using a random training set; Step S6: Use the trained objective function network to output the predicted optimal solution; The objective function network takes a time variable as input and achieves continuous time prediction through a single round of training. The method is deployed in practical applications to perform one or more tasks including target detection, image classification, product defect detection, or maritime vessel target recognition. In product defect detection tasks, the input is an image of the front screen and the back surface of the product from a smart mobile terminal or tablet computer, and the output is information on the existence, location, or type of product defects. In the task of identifying ships on the sea surface, the input is a sea surface image, and the output is information on the presence, location, or type of ships.
2. The numerical simulation method based on neural networks and iterative approximation methods according to claim 1, characterized in that, The deep learning network in step S3 is an adaptive fully connected neural network, an attention-based fully connected neural network, or a Kolmogorov-Arnold network. The adaptive fully connected neural network adds adaptive variables to the first hidden layer to form an adaptive activation function; The attention-based fully connected neural network enhances feature representation by constructing residual connections through a Transformer network; The Kolmogorov-Arnold network uses B-splines or Chebyshev polynomials as activation functions.
3. The numerical simulation method based on neural networks and iterative approximation methods according to claim 1, characterized in that, The loss function in step S4 is constructed using a time-semi-discrete iterative format, specifically as follows: For one-dimensional problems, an implicit multi-step method is used. The one-step implicit multi-step method is formalized as follows: Where u n For u(t) n x) corresponds to the solution u at time nΔt, where Δt is the time step; A new semi-discretization method is constructed by applying the approximate value of u, f(t,x;θ), to equation (1): Where f n This is the output at time nΔt; construction complete. When using the method described above, the specific losses in step S4 are as follows: The loss function at each time point is expressed as follows: Loss n (θ)=||u n -f n || 2 ,n=1,...,N. (3) The loss under the initial condition Loss0 is: Loss0(θ)=||u 0 (x)-f 0 (x;θ)‖ 2 . (4) Boundary conditions Loss b The loss is: Under periodic boundary conditions, the loss is reformulated as: Where x l It is the lower bound, x u It is an upper bound; therefore, the total loss function is the sum of the following three terms. composition:
4. The numerical simulation method based on neural networks and iterative approximation methods according to claim 1, characterized in that, The loss function in step S4 is constructed using a time-semi-discrete iterative format, specifically as follows: For the two-dimensional problem, the q-order implicit Runge-Kutta method is adopted. The q-order implicit Runge-Kutta method is formalized as follows: At this point, the neural network has multiple outputs, which can be described as follows: Then, substituting equation (9) into equation (8), we get: When using the method described above, the specific losses in step S4 are as follows: The loss function at each time step is designed as follows: The initial conditional loss is: The total loss function consists of the sum of the following three terms. composition:
5. The numerical simulation method based on neural networks and iterative approximation methods according to claim 2, characterized in that, The adaptive variable is dynamically adjusted according to task requirements, and its value is dynamically optimized based on the gradient of the loss function during training.
6. A numerical simulation system constructed based on neural networks and iterative approximation systems, characterized in that, The system includes the following modules: Module M1: Defines the partial differential equation problem to be solved; Module M2: Constructs an exact solution dataset based on the constraints; Module M3: Utilizes deep learning networks to build the objective function network; Module M4: Establishes the loss function based on the optimization problem; Module M5: Trains deep learning networks using random training sets; Module M6: Utilizes the trained objective function network to output the predicted optimal solution; The objective function network takes a time variable as input and achieves continuous time prediction through a single round of training. The system is deployed in real-world applications and performs one or more tasks, including target detection, image classification, product defect detection, or maritime vessel target recognition. In product defect detection tasks, the input is an image of the front screen and the back surface of the product from a smart mobile terminal or tablet computer, and the output is information on the existence, location, or type of product defects. In the task of identifying ships on the sea surface, the input is a sea surface image, and the output is information on the presence, location, or type of ships.
7. The numerical simulation system based on neural networks and iterative approximation systems according to claim 6, characterized in that, The deep learning network in module M3 is an adaptive fully connected neural network, an attention-based fully connected neural network, or a Kolmogorov-Arnold network; The adaptive fully connected neural network adds adaptive variables to the first hidden layer to form an adaptive activation function; The attention-based fully connected neural network enhances feature representation by constructing residual connections through a Transformer network; The Kolmogorov-Arnold network uses B-splines or Chebyshev polynomials as activation functions.
8. The numerical simulation system based on neural networks and iterative approximation systems according to claim 6, characterized in that, The loss function in module M4 is constructed using a time-semi-discretized iterative format, specifically as follows: For one-dimensional problems, an implicit multi-step method is used. The one-step implicit multi-step system is formalized as follows: Where u n For u(t) n x) corresponds to the solution u at time nΔt, where Δt is the time step; A new semi-discrete system is constructed by applying the approximate value of u, f(t, x; θ), to equation (1): Where f n This is the output at time nΔt; construction complete. When using the system, the specific losses in module M4 are as follows: The loss function at each time point is expressed as follows: Loss n (θ)=||u n -f n || 2 ,n=1,...,N. (3) The loss under the initial condition Loss0 is: Loss0(θ)=||u 0 (x)-f 0 (xθ)|| 2 . (4) Boundary conditions Loss b The loss is: Under periodic boundary conditions, the loss is reformulated as: Where x l It is the lower bound, x u It is an upper bound; therefore, the total loss function is the sum of the following three terms. composition:
9. The numerical simulation system based on neural networks and iterative approximation systems according to claim 6, characterized in that, The loss function in module M4 is constructed using a time-semi-discretized iterative format, specifically as follows: For the two-dimensional problem, the q-order implicit Runge-Kutta method is adopted. The formalization of the q-order implicit Runge-Kutta system is as follows: At this point, the neural network has multiple outputs, which can be described as follows: Then, substituting equation (9) into equation (8), we get: When using the system, the specific losses in module M4 are as follows: The loss function at each time step is designed as follows: The initial conditional loss is: The total loss function consists of the sum of the following three terms. composition:
10. The numerical simulation system based on neural networks and iterative approximation systems according to claim 7, characterized in that, The adaptive variable is dynamically adjusted according to task requirements, and its value is dynamically optimized based on the gradient of the loss function during training.
Citation Information
Cited By
Simulation circuit multi-objective optimization method and system based on sparse enhanced KAN network
CN122197785A
A Multi-Objective Optimization Method and System for Analog Circuits Based on Sparse Enhanced KAN Networks
CN122197785B