Physical drive neural network method and system based on physical field mapping
By encoding spatiotemporal coordinates into encoded spatiotemporal fields and designing output layer neurons, combined with numerical differentiation and a custom loss function, the structure of the physics-driven neural network was optimized. This solved the problems of low precision and low efficiency of PINN in high-frequency, multi-scale, and noisy problems, and achieved efficient and accurate physics field solutions.
Patent Information
- Application Number
- CN202511202205.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-12-16
AI Technical Summary
Existing Physics-Driven Neural Networks (PINNs) suffer from low accuracy, low efficiency, and weak robustness when solving inverse problems, especially in high-frequency, multi-scale, and noisy problems. Furthermore, the computational cost of the network is high, and the matching of the number of neurons in the output layer with the number of physical fields limits the model's learning ability.
A physical field mapping-based approach is adopted to encode spatiotemporal coordinates into encoded spatiotemporal fields. Output layer neurons for each target physical field component are designed, and higher-order differential terms are obtained through numerical differentiation. Model parameters are updated using a custom loss function and gradient descent algorithm to optimize the network structure.
It improves the computational efficiency and learning ability of the model, significantly enhances its accuracy and robustness in high-frequency, multi-scale and noisy problems, and achieves efficient solution of differential equations.
Smart Images

Figure CN121145952A_ABST
Abstract
Description
[0001] This invention relates to the field of machine learning technology, and in particular to a physical-driven neural network method and system based on physical field mapping. Background Technology
[0002] Physics-Driven Neural Networks (PINNs) are a method for training machine learning by using physical laws, representing a new direction in the development of scientific artificial intelligence. This method uses equations representing physical laws to replace the datasets that implicitly contain physical laws in the data-driven model, guiding the model to learn the mapping relationship between spatiotemporal coordinates and the physical quantity being sought. This allows the model to solve problems with little or no data samples. The integration of physical information not only reduces the dependence of machine learning on datasets and the cost of data sampling, but also overcomes the shortcomings of traditional models, such as poor data absorption capacity, output limited by the scope of the dataset, and lack of physical interpretability. Currently, physics-driven machine learning has been applied in many fields, including quantum mechanics, elastic wave dynamics, fluid mechanics, electromagnetism, and systems biology.
[0003] However, PINN exhibits low accuracy, low efficiency, and weak robustness when solving inverse problems, and these shortcomings are more pronounced in high-frequency, multi-scale, and noisy problems. Existing physics-driven machine learning inputs are characterized by spatiotemporal variables and sample sizes based on the number of spatiotemporal coordinates. This leads to enormous computational costs for the first layer in multidimensional problems and for each layer during training with a large number of spatiotemporal coordinates. Furthermore, the number of neurons in the output layer of existing physics neural networks matches the number of physical fields—one neuron is assigned to one physical field—which limits the number of neurons in the output layer and the model's learning capacity. Summary of the Invention
[0004] In view of the shortcomings of the existing technology, the purpose of this invention is to provide a physical driven neural network (PFNN) method and system based on physical field mapping, so as to solve the problems of low accuracy, low efficiency and weak robustness in the existing technology, especially the shortcomings in high frequency, multi-scale and noise problems.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a physical-driven neural network method based on physical field mapping, the method comprising: Step 1: Encode the spatiotemporal coordinate matrix into an encoded spatiotemporal field using an encoding formula, wherein the encoding formula is: ; in It is a coded spacetime field; The sampling quantity for spatiotemporal coordinates; It is a spacetime coordinate matrix, its composition For the first iA spatiotemporal coordinate in j The values can be taken in each dimension; The dimension representing the spacetime coordinates; It is the Hadamard product operator; It is a coding coefficient matrix, whose elements Used for adjustment ; It is an encoded vector in which all elements are 1; Step 2: Input the encoded spatiotemporal field into the physical field neural network; Step 3: Design an output layer neuron for each target physical field component to generate the desired physical field; Step 4: Obtain the higher-order differential terms of the physical quantity using numerical differentiation methods, resolving the inconsistency between the derivative obtained by applying the chain rule in the network and its physical meaning in the partial differential equation. The derivative obtained based on the chain rule is as follows: ; in For a dense Jacobian matrix ( (for output dimensions), whose constituent elements are each output physical quantity. For each spatiotemporal coordinate component The derivative of is inconsistent with the physical meaning of the derivative of a physical quantity with respect to independent spacetime variables in a partial differential equation; Step 5: Input all physical quantities into a loss function customized based on physical formulas or physical information, and define the loss function as follows: ; ; ; ; ; in and These are loss functions constructed based on the governing equations, boundary conditions, initial conditions, and data constraints, respectively. For the computational domain; and These represent the number of sampling points in the computational domain, spatial boundary, initial boundary, and data constraints, respectively. and These are operators for the governing equations, boundary conditions, initial conditions, and data constraint loss terms, respectively; the loss terms are constructed based on the physical constraints involved in the specific problem. Step 6: Update the trainable parameters in the model using the backpropagation algorithm based on gradient descent until the stopping criterion is met; Step 7: Output the required physical quantities.
[0006] Furthermore, in step 6, the stopping criterion is that the preset number of iterations or the loss function value reaches a preset threshold.
[0007] Secondly, the present invention provides a physical-driven neural network system based on physical field mapping, comprising: an encoding module, a network body module, a differential calculation module, a loss function module, and a parameter update module; The encoding module is used to encode the spatiotemporal coordinate matrix into an encoded spatiotemporal field; The network main module is used to receive the encoded spatiotemporal field, process it through the hidden layer, and then generate the desired physical field through the output layer. The differential calculation module is used to obtain higher-order differential terms of physical quantities using numerical differential methods; The loss function module is used to customize the loss function based on physical formulas or physical information, and to receive physical quantities for calculation; The parameter update module is used to update the trainable parameters in the model based on the gradient descent backpropagation algorithm until the stopping criterion is met.
[0008] Furthermore, the encoding module employs an encoding formula to implement the encoding process; the encoding formula is: ; in It is a coded spacetime field; It is a spacetime coordinate matrix, its composition For the first i A spatiotemporal coordinate in j The values can be taken in each dimension; The dimension representing the spacetime coordinates; It is the Hadamard product operator; It is a coding coefficient matrix, whose elements Used for adjustment ; It is an encoded vector in which all elements are 1.
[0009] Furthermore, the output layer of the network main module is designed with one neuron for each target physical field component, and the number of neurons in the output layer matches the number of target physical field components.
[0010] Thirdly, the present invention provides a computer-readable storage medium for storing a computer program, which, when executed, implements the above-described method.
[0011] Fourthly, the present invention also provides an electronic device, including a processor and a memory, wherein the memory stores executable instructions, and the processor executes the instructions to implement the above-described method.
[0012] The present invention has the following technical effects: 1. This invention changes the traditional PINN input method, which uses spatiotemporal variables as features and the number of spatiotemporal coordinates as the sample size, by encoding spatiotemporal coordinates into spatiotemporal fields as input. This transforms multidimensional input into a one-dimensional form, and the network only needs to process one training sample per operation, reducing the computational load of each layer of the network and improving the computational efficiency of the model.
[0013] 2. This invention designs output layer neurons for each target physical field component, giving the network more trainable parameters and improving the model's learning ability. Through validation on high-frequency, multi-scale, and noisy problems, the neural network proposed in this invention shows significant improvements in accuracy, efficiency, and robustness. It can accurately and efficiently solve differential equations, contributing to the intelligent and efficient solution of forward and inverse problems in various fields. Attached Figure Description
[0014] Figure 1 shows the technology roadmap for Physically Driven Neural Networks (PFNN) based on physical field mapping; Figure 2 shows the prediction results of the high-frequency solution; Figure 3 shows the solution results for the multi-scale problem; Figure 4 shows the parameter identification results under noise interference. Detailed Implementation
[0015] To make the objectives, advantages and features of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0016] This invention discloses a physics-driven neural network method based on physical field mapping, which is implemented through the following steps: Step 1: Encode the spatiotemporal coordinates into a spatiotemporal field using formula (1): ; in It is a coded spacetime field; The sampling quantity for spatiotemporal coordinates; It is a spacetime coordinate matrix, its composition For the first i A spatiotemporal coordinate in j The values can be taken in each dimension; The dimension representing the spacetime coordinates; It is the Hadamard product operator; It is a coding coefficient matrix, whose elements Used for adjustment ; It is an encoded vector in which all elements are 1.
[0017] Step 2: Input the encoded spatiotemporal field into the physical field neural network.
[0018] Step 3: Design an output layer neuron for each target physical field component to generate the desired physical field.
[0019] Step 4: Obtain the higher-order differential terms of the physical quantity using numerical differentiation methods, resolving the inconsistency between the derivative obtained by applying the chain rule in the network and its physical meaning in the partial differential equation. The derivative obtained based on the chain rule is as follows: ; in For a dense Jacobian matrix ( (for output dimensions), whose constituent elements are each output physical quantity. For each spatiotemporal coordinate component The derivative of is inconsistent with the physical meaning of the derivative of a physical quantity with respect to independent spacetime variables in a partial differential equation; Step 5: Input all physical quantities into a loss function customized based on physical formulas or physical information, and define the loss function as follows: ; ; ; ; ; in and These are loss functions constructed based on the governing equations, boundary conditions, initial conditions, and data constraints, respectively. For the computational domain; and These represent the number of sampling points in the computational domain, spatial boundary, initial boundary, and data constraints, respectively. and These are operators for the governing equations, boundary conditions, initial conditions, and data constraint loss terms, respectively; the loss terms are constructed based on the physical constraints involved in the specific problem. Step 6: Update the trainable parameters in the model using the backpropagation algorithm based on gradient descent until the stopping criterion is met.
[0020] Step 7: Output the required physical quantities.
[0021] like Figure 1 As shown, PFNN consists of a fully connected neural network based on encoding spatiotemporal field input and physical field output, a differential computation layer, and a loss function. Figure 1The calculation process is consistent with the above technical solution description, where the encoding process of the input layer has been explained in step 1, and the design of the output layer has been introduced in step 3. The input layer design transforms multidimensional inputs into a one-dimensional form. Furthermore, since the input features contain information about all spatiotemporal coordinates, the network only needs to process one training sample per operation, unlike PINN which requires processing multiple spatiotemporal coordinate samples. This reduces the computational load of each layer and improves the model's computational efficiency. The output layer design allows the network to have more trainable parameters, resulting in more promising learning capabilities. Moreover, the input layer design ensures that the output layer generates almost no additional computational load even with more trainable parameters.
[0022] The effectiveness of PFNN will be verified below using high-frequency, multi-scale, and noisy problems as examples.
[0023] (1) High-frequency problems To verify the effectiveness of PFNN for high-frequency problems, a Helmholtz equation was considered. ; ; ; in and Spatiotemporal variables; for The physical state of a point can have different physical interpretations for different problems; The wave number is set to 1. As the field source, among which and The source coefficients are set to 3 and 5 respectively, to reflect... and Different patterns of change in two directions.
[0024] The solution to this problem is: ; PFNN and PINN with 4 hidden layers and 64 neurons per layer were respectively constructed to solve this problem. In addition, 100×100 spatiotemporal coordinates and 50,000 iterations were considered.
[0025] The calculation results are shown below. Figure 2 The computational accuracy of PFNN exceeds that of PINN by nearly three orders of magnitude. The computation time of PFNN is 33.7 seconds, only 4.3% of that of PINN. Therefore, the PFNN proposed in this invention is an accurate and efficient method that can effectively solve high-frequency problems.
[0026] (2) Multiscale problems Machine learning, when solving multi-scale problems, often favors learning the slowly changing parts of the function, thus neglecting the rapidly changing parts. To verify the approximation ability of PFNN for multi-scale solutions, a spatiotemporal multi-scale heat conduction problem is considered: ; ; ; in Let be the thermal conductivity coefficient, denoted as . ; and These are spatial and temporal variables, respectively. for The temperature at that location. The solution to this problem is... .
[0027] To solve this spatiotemporal multi-scale problem, PFNN and PINN with 5 hidden layers and 64 neurons per layer were constructed, respectively, and trained using 250×250 spatiotemporal coordinates. Furthermore, a Kolmogorov-Arnold neural network (KINN) with 2 hidden layers and 5 neurons was built for objective comparison. This network resampled 4,000 spatiotemporal coordinates randomly in each iteration, and predictions were performed using 250×250 spatiotemporal coordinates after training.
[0028] Figure 3 The results after 5,000 training iterations are shown. It can be observed that PINN cannot predict results as accurately as PFNN and KINN, and the prediction accuracy of PFNN is almost identical to that of KINN. Furthermore, PFNN takes 79.8 seconds to compute, which is 24 times and 3 times faster than PINN and KINN, respectively. Therefore, PFNN can accurately and efficiently capture multi-scale features.
[0029] (3) Noise problem Robustness reflects the ability of machine learning to resist external disturbances, which is crucial for solving forward and reverse problems based on data with observational noise. The Brinkman-Fochheimer equation is commonly used to describe flow in porous media with wall boundaries, and its effective viscosity often needs to be determined experimentally. To test the robustness of PFNN, an experiment was simulated to infer the effective viscosity in the Brinkman-Fochheimer equation under a noisy environment. The governing equations and corresponding boundary conditions are as follows: ; ; in For flow rate; This is the upper limit of the computational domain; External force; The porosity of the medium; It's penetration rate; The kinematic viscosity of the fluid; Let be the effective viscosity of the fluid. The analytical solution to equation (7) can be written as: ; ; in and The values are 1, 1, 0.4, and 10. -3 and 10 -3 ; It is a design variable, and its actual value is 10. -3 .
[0030] To objectively evaluate the performance of the PFNN, a physically driven neural network (gPINN) with gradient enhancement was constructed to infer the effective viscosity under noise interference. Forty spatial coordinates were considered, and the flow velocity at six coordinates was randomly calculated. Gaussian noise with a mean of 0 and a standard deviation of 0.05 was applied to simulate an actual test where only six sensors were used to measure the flow velocity.
[0031] Figure 4 The results after 50,000 training iterations are shown, with PFNN achieving the highest accuracy, followed by gPINN and PINN. Furthermore, it can be observed that the effective viscosity inferred by PFNN converges to 1.0 × 10⁻⁶. -3 Near the same location, the inference accuracy is 17 times and 30 times that of gPINN and PINN, respectively. Therefore, PFNN has extremely strong robustness and can infer the effective viscosity of fluids under noise interference.
[0032] The above embodiments are for illustrative purposes only and are not intended to limit the scope of this invention. Those skilled in the art can make various changes and modifications without departing from the essence and scope of this invention. Therefore, all equivalent technical solutions also fall within the scope of this invention, and the patent protection scope of this invention should be defined by the claims. Content not described in detail in this specification is prior art known to those skilled in the art.
Claims
1. A physical-driven neural network method based on physical field mapping, characterized in that, The method includes: Step 1: Encode the spatiotemporal coordinate matrix into an encoded spatiotemporal field using an encoding formula, wherein the encoding formula is: ; in It is a coded spacetime field; The sampling quantity for spatiotemporal coordinates; It is a spacetime coordinate matrix, its composition For the first i A spatiotemporal coordinate in j The values can be taken in each dimension; The dimension representing the spacetime coordinates; It is the Hadamard product operator; It is a coding coefficient matrix, whose elements Used for adjustment ; It is an encoded vector in which all elements are 1; Step 2: Input the encoded spatiotemporal field into the physical field neural network; Step 3: Design an output layer neuron for each target physical field component to generate the desired physical field; Step 4: Obtain the higher-order differential terms of the physical quantity using numerical differentiation methods, resolving the inconsistency between the derivative obtained by applying the chain rule in the network and its physical meaning in the partial differential equation. The derivative obtained based on the chain rule is as follows: ; in For a dense Jacobian matrix ( (for output dimensions), whose constituent elements are each output physical quantity. For each spatiotemporal coordinate component The derivative of is inconsistent with the physical meaning of the derivative of a physical quantity with respect to independent spacetime variables in a partial differential equation; Step 5: Input all physical quantities into a loss function customized based on physical formulas or physical information. The loss function is defined as follows: ; ; ; ; ; in and These are loss functions constructed based on the governing equations, boundary conditions, initial conditions, and data constraints, respectively. For the computational domain; and These represent the number of sampling points in the computational domain, spatial boundary, initial boundary, and data constraints, respectively. and These are operators for the governing equations, boundary conditions, initial conditions, and data constraint loss terms, respectively; the loss terms are constructed based on the physical constraints involved in the specific problem. Step 6: Update the trainable parameters in the model using the backpropagation algorithm based on gradient descent until the stopping criterion is met; Step 7: Output the required physical quantities.
2. The method as described in claim 1, characterized in that, In step 6, the stopping criterion is that the preset number of iterations or the loss function value reaches a preset threshold.
3. A physics-driven neural network system based on physical field mapping, characterized in that, include: The network consists of an encoding module, a network body module, a differential calculation module, a loss function module, and a parameter update module. The encoding module is used to encode the spatiotemporal coordinate matrix into an encoded spatiotemporal field; The network main module is used to receive the encoded spatiotemporal field, process it through the hidden layer, and then generate the desired physical field through the output layer. The differential calculation module is used to obtain higher-order differential terms of physical quantities using numerical differential methods; The loss function module is used to customize the loss function based on physical formulas or physical information, and to receive physical quantities for calculation; The parameter update module is used to update the trainable parameters in the model based on the gradient descent backpropagation algorithm until the stopping criterion is met.
4. The system as described in claim 3, characterized in that, The encoding module uses an encoding formula to implement the encoding process; the encoding formula is: ; in It is a coded spacetime field; The sampling quantity for spatiotemporal coordinates; It is a spacetime coordinate matrix, its composition For the first i A spatiotemporal coordinate in j The values can be taken in each dimension; The dimension representing the spacetime coordinates; It is the Hadamard product operator; It is a coding coefficient matrix, whose elements Used for adjustment ; It is an encoded vector in which all elements are 1.
5. The system as described in claim 4, characterized in that, The output layer of the network main module is designed with one neuron for each target physical field component, and the number of neurons in the output layer matches the number of target physical field components.
6. A computer-readable storage medium for storing a computer program, characterized in that, When the program is executed, it implements the method described in any one of claims 1-2.
7. An electronic device, comprising a processor and a memory, characterized in that, The memory stores executable instructions, and the processor executes the instructions to implement the method described in any one of claims 1-2.