Method and device for solving partial differential equation

The directional distribution of Monte Carlo sampling is optimized through vMF mixed model and neural field model, and the Monte Carlo method has solved the problem of low sampling efficiency and large variance in high-dimensional partial differential equations, and efficient and accurate partial differential equation solution is achieved.

CN120386966APending Publication Date: 2025-07-29TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510609603.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

When the existing Monte Carlo method deals with high-dimensional partial differential equations, especially the Neumann boundary problem, the sampling efficiency is low and the variance is large, especially in areas with severe gradient changes, which is difficult to optimize the sampling strategy.

Method used

The vMF mixed model and neural field model are used to learn the characteristics of local PDE solutions online. By reparameterized recursive terms, the direction distribution of Monte Carlo sampling is optimized, the optimal sampling strategy is selected, and the reflection formula is used to process the sampling direction that does not meet the boundary conditions.

Benefits of technology

The efficiency of Monte Carlo sampling is improved, the sampling variance is reduced, and the solution accuracy and efficiency of partial differential equations are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120386966A_ABST
    Figure CN120386966A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for solving a partial differential equation. The method comprises the following steps: acquiring a partial differential equation needing to be solved; re-parameterizing a recursive term of the partial differential equation in the estimator to obtain a target function in the estimator; determining target distribution corresponding to the target function based on the vMF hybrid model and the neural field model; determining a corresponding Monte Carlo sampling result based on the target distribution and the target function; and determining a target solution of the partial differential equation based on all Monte Carlo sampling results. According to the method, the characteristics of the local PDE solution are learned on line through the vMF hybrid model and the neural field model, and the direction distribution of sampling in the estimator is optimized, so that the optimal sampling distribution can be selected according to the characteristics of the local PDE solution in different regions, the sampling efficiency is improved, and the variance is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and particularly to a method and device for solving partial differential equations. Background Art

[0002] Currently, the Monte Carlo (MC) method can approximate the solution of PDEs by means of random walks or random sampling, without relying on grids, thus avoiding the grid division problem and showing good scalability in high-dimensional problems. Based on this, the PDE solving technology based on the Monte Carlo method has gradually attracted attention.

[0003] Among them, in the Monte Carlo method for solving PDEs, Walk on Spheres (WoS) and Walk on Stars (WoSt) are two methods. Among them, the WoS method starts from a point inside the region, moves towards the boundary in a random walk manner, and calculates the expected value of the solution using the boundary conditions. Thus, the WoS method is applicable to problems with Dirichlet boundary conditions. However, the WoS method is difficult to handle Neumann boundary problems, while the WoSt method extends the applicable range of WoS by performing random walks within a star-shaped region, enabling the algorithm to handle both Dirichlet and Neumann mixed boundary conditions simultaneously.

[0004] In addition, the WoSt method has more advantages than grid methods in solving high-dimensional PDEs, but it requires efficient sampling of the random walk directions. Among them, the traditional WoSt method usually adopts uniform direction sampling, but in regions where the gradient of the solution changes violently, uniform sampling easily leads to low sampling efficiency and introduces large variances. Summary of the Invention

[0005] The present invention aims to solve at least one of the technical problems in the related art to some extent.

[0006] To this end, an object of the present invention is to propose a method for solving partial differential equations, which optimizes the sampling direction distribution in the estimator by online learning the characteristics of local PDE solutions through a vMF mixture model and a neural field model, enabling the optimal sampling distribution to be selected according to the characteristics of local PDE solutions in different regions, thereby improving the sampling efficiency and reducing the variance.

[0007] Another object of the present invention is to propose a device for solving partial differential equations.

[0008] To achieve the above object, an embodiment of one aspect of the present invention proposes a method for solving partial differential equations, including:

[0009] Obtain the partial differential equation to be solved;

[0010] Reparameterize the recursive term of the partial differential equation in the estimator to obtain the objective function in the estimator;

[0011] Based on the vMF mixture model and the neural field model, determine the target distribution corresponding to the objective function;

[0012] Based on the target distribution and the objective function, determine the corresponding Monte Carlo sampling result;

[0013] Based on all Monte Carlo sampling results, determine the target solution of the partial differential equation.

[0014] The method for solving the partial differential equation according to the embodiments of the present invention may further have the following additional technical features:

[0015] Further, the reparameterizing the recursive term of the partial differential equation in the estimator to obtain the objective function in the estimator includes:

[0016] Determine the sampling direction v of the sampling point;

[0017] Based on the sampling direction of the sampling point, reparameterize the recursive term of the partial differential equation in the estimator to obtain the objective function in the estimator, where the objective function is:

[0018]

[0019] where p(ν|x k ) is the sampling probability density function, and α(x k ) is the weight factor, <n>and <s>represent the contributions of the Neumann boundary and the source term, respectively, where ‖S d-1 ‖ is the area of the unit sphere, x k is the sampling point, and d is the dimension.

[0020] Further, determining the target distribution corresponding to the objective function based on the vMF mixture model and the neural field model includes:

[0021] Determining a corresponding guiding distribution based on the vMF mixture model and the neural field model;

[0022] Determining the selection probability corresponding to the objective function;

[0023] If the selection probability is less than or equal to a preset threshold, then determining the guiding distribution as the target distribution corresponding to the objective function;

[0024] If the selection probability is greater than the preset threshold, then determining the uniform distribution as the target distribution corresponding to the objective function.

[0025] Further, determining the corresponding guiding distribution based on the vMF mixture model and the neural field model includes:

[0026] Modeling the directional data using the von Mises–Fisher distribution to determine the vMF mixture model;

[0027] Using the neural field model to map the spatial coordinates of the sampling points to unnormalized parameters;

[0028] Performing normalization processing on the unnormalized parameters to obtain the model parameters of the vMF mixture model;

[0029] Substituting the model parameters into the vMF mixture model to determine the corresponding guiding distribution.

[0030] Further, the method further includes:

[0031] Determining the KL divergence and the first estimated gradient corresponding to the guiding distribution;

[0032] Updating the parameters of the neural field model based on the first estimated gradient until the KL divergence converges.

[0033] Further, the method further includes:

[0034] Constructing a combined sampling probability density function;

[0035] Substituting the guiding distribution, the uniform distribution, and the selection probability into the combined sampling probability density function to obtain the value of the combined sampling probability density function;

[0036] Determine the loss value corresponding to the selection probability based on the combined sampling probability density function value;

[0037] Determine the second estimated gradient corresponding to the selection probability based on the combined sampling probability density function value;

[0038] Update the selection probability based on the second estimated gradient until the loss value converges.

[0039] Furthermore, the method further includes:

[0040] Determine whether the sampling point is located on the Neumann boundary;

[0041] If the sampling point is located on the Neumann boundary, then determine whether the corresponding sampling direction satisfies the emission processing condition;

[0042] If the sampling direction does not satisfy the emission processing condition, then perform direction processing using the reflection formula to obtain the reflected direction, and determine the reflected direction as the sampling direction of the sampling point.

[0043] To achieve the above object, another embodiment of the present invention provides a device for solving partial differential equations, the device includes:

[0044] An acquisition module, configured to acquire the partial differential equation to be solved;

[0045] A parameterization module, configured to reparameterize the recurrence term in the estimator of the partial differential equation to obtain the objective function in the estimator;

[0046] A first determination module, configured to determine the target distribution corresponding to the objective function based on the vMF mixture model and the neural field model;

[0047] A second determination module, configured to determine the corresponding Monte Carlo sampling result based on the target distribution and the objective function;

[0048] A third determination module, configured to determine the target solution of the partial differential equation based on all Monte Carlo sampling results.

[0049] The method and device for solving partial differential equations proposed by the present invention learn the characteristics of local PDE solutions online through the vMF mixture model and the neural field model, optimize the direction distribution of sampling in the estimator, so that the optimal sampling distribution can be selected according to the characteristics of local PDE solutions in different regions, thereby improving the sampling efficiency and reducing the variance.

[0050] The additional aspects and advantages of the present invention will be partially given in the following description, partially become obvious from the following description, or be understood through the practice of the present invention. Description of the Drawings

[0051] The above and / or additional aspects and advantages of the present invention will become apparent and be readily understood from the following description of embodiments in conjunction with the accompanying drawings, where:

[0052] Figure 1 A flowchart of a method for solving a partial differential equation according to an embodiment of the present invention;

[0053] Figure 2 A schematic diagram of a guiding distribution according to an embodiment of the present invention;

[0054] Figure 3 A schematic diagram of determining a target distribution corresponding to an objective function according to an embodiment of the present invention;

[0055] Figure 4 A schematic diagram of a wavefront parallel architecture according to an embodiment of the present invention;

[0056] Figure 5 A schematic structural diagram of a device for solving a partial differential equation according to an embodiment of the present invention. Detailed implementation manners

[0057] Embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described by referring to the accompanying drawings are exemplary and are intended to explain the present invention, and should not be construed as limiting the present invention.

[0058] Currently, research attempts to introduce importance sampling into the WoSt method. However, the current method is limited to sampling the source term and Neumann contribution term and is unable to sample the recursive term. Due to the difficulties encountered in sampling in the Monte Carlo method for solving partial differential equations, one can turn to the field of graphics rendering where the Monte Carlo method is widely used. Among them, the Monte Carlo method is widely applied in the field of rendering for light calculation. Especially in the global illumination rendering technology based on path tracing, Monte Carlo sampling is used to simulate the propagation of light and generate realistic rendering effects. Also, a major problem in path tracing is that light calculation is prone to generating noise. Therefore, how to optimize the sampling strategy of the light direction becomes the key. To solve this problem, the path guiding technology is proposed. Its core idea is to use machine learning or statistical modeling methods to estimate the light distribution, thereby constructing an efficient directional probability density function during the sampling stage. For example, methods based on adaptive tree structures (such as BSP trees, light cut trees) can store and update the light direction distribution, and then use the existing light data for optimization during sampling. In addition, in recent years, deep learning technology has promoted neural network-guided path sampling, that is, using neural networks to learn the light distribution and providing an optimized probability density function during the sampling stage. The above methods have significantly reduced the variance of the Monte Carlo method in the rendering field and improved the calculation efficiency.

[0059] Also, the path guiding technology is mainly applied to rendering, but its basic idea is highly similar to the guided sampling in Monte Carlo PDE solving. The core problem is to construct an efficient sampling distribution in a high-dimensional space to reduce variance and improve calculation efficiency. However, in the field of solving PDEs, the existing Monte Carlo methods have not fully borrowed the idea of the path guiding technology. Especially in the WoSt method, there is still a lack of an adaptive sampling strategy based on data-driven optimization.

[0060] Based on the above description, a method and device for solving partial differential equations according to an embodiment of the present invention will be described with reference to the accompanying drawings.

[0061] First, a method for solving partial differential equations according to an embodiment of the present invention will be described with reference to the accompanying drawings.

[0062] Figure 1 It is a flowchart of a method for solving partial differential equations according to an embodiment of the present invention.

[0063] As Figure 1 shown, the method for solving partial differential equations includes the following steps:

[0064] Step S1, obtain the partial differential equation to be solved;

[0065] In one embodiment of the present invention, the above method for solving partial differential equations can be applied to the WoSt estimator.

[0066] Wherein, in one embodiment of the present invention, the target problem to be solved can be converted into a partial differential equation, so that the solution of the partial differential equation can be determined as the solution of the target problem.

[0067] Exemplarily, in one embodiment of the present invention, it is assumed that the partial differential equation to be solved is the Poisson equation, where the Poisson equation is:

[0068] Δu(x)=f(x)onΩ,

[0069]

[0070] Wherein, the boundary of the region is divided into the Dirichlet part and the Neumann part The corresponding boundary values are g and h respectively, Δ is the negative semi - definite Laplace operator, is the unknown solution, is the source term. Among them, in computer numerical simulation, the above equation can be used to describe many physical phenomena, for example: the steady - state temperature distribution, where f corresponds to the heat source or heat sink, g corresponds to the temperature on the boundary, and h corresponds to the heat flux on the boundary.

[0071] Step S2, re - parameterize the recursive term in the estimator for the partial differential equation to obtain the objective function in the estimator;

[0072] Wherein, in one embodiment of the present invention, based on the Poisson equation in the above step, the function corresponding to the traditional WoSt estimator can be:

[0073]

[0074] Wherein, <n>and <s>Correspond to the Neumann boundary contribution term and the source contribution term respectively. These two terms are non-recursive, and the first term in <u(x k )>, that is, the term other than the above two non-recursive terms is called the recursive term, and this term contains <u(x k+1 )>. Therefore, the estimator needs to be recursively run repeatedly. Also, in the recursive term, B is a sphere with x k as the center of the sphere and r as the radius; r is equal to the smaller value of the distance from x k to and the distance to the nearest silhouette of ; the star-shaped region St := B ∩ Ω; represents the Neumann part in the boundary of St; α(x k ) is a coefficient related to the spatial position of the query point; p is the probability density distribution (PDF) of the sampler. Based on the above description, the recursive term samples for x k+1 , or x k+1 is a parameter of the sampling probability density distribution. However, it is difficult to model the distribution of points on an irregular region in space. To simplify the problem, the recursive term in the WoSt estimator can be reparameterized, so as to use the direction vector instead of x k+1 to represent this sampling problem.

[0075] Also, in an embodiment of the present invention, the method of reparameterizing the recursive term of the partial differential equation in the estimator to obtain the objective function in the estimator may include the following steps:

[0076] Step S21, determining the sampling direction v of the sampling point;

[0077] Step S22, based on the sampling direction ν of the sampling point, reparameterizing the recursive term of the partial differential equation in the estimator to obtain the objective function in the estimator, where the objective function is:

[0078]

[0079] where, p(ν|x k ) is the sampling probability density function, and α(x k ) is the weight factor. <n>And <s>Separate the contributions of the Neumann boundary and the source term, where ‖S d-1 ‖ is the area of the unit sphere, x k is the sampling point, and d is the dimension.

[0080] Among them, in one embodiment of the present invention, the sampling direction ν of the above sampling point can be:

[0081]

[0082] Among them, x k and x k+1 are sampling points, is the unit sphere.

[0083] In addition, in one embodiment of the present invention, the recursive term in the WoSt estimator is reparameterized into an integral expression with respect to the direction vector, so that the sampling problem can be transformed into a direction sampling problem, and then the characteristics of the local PDE solution can be learned online through a neural network to optimize the direction sampling distribution in the WoSt estimator, thereby improving the sampling efficiency and reducing the variance.

[0084] Furthermore, in one embodiment of the present invention, if the above sampling point is located on the Neumann boundary, the sampling point needs to be reflected to convert the sampling direction that does not meet the boundary physical requirements into an effective direction through reflection. Specifically, in one embodiment of the present invention, the above method may further include the following steps:

[0085] Step 1: Determine whether the sampling point is located on the Neumann boundary;

[0086] Step 2: If the sampling point is located on the Neumann boundary, determine whether the sampling direction corresponding to the sampling point meets the emission processing condition;

[0087] Step 3: If the sampling direction does not meet the emission processing condition, use the reflection formula to perform direction processing to obtain the reflected direction, and determine the reflected direction as the sampling direction of the sampling point.

[0088] Among them, in one embodiment of the present invention, the above emission processing condition may be ν·n(x k )>0, where v is the sampling direction and n(x k ) is the local normal.

[0089] In addition, in one implementation of the present invention, if the sampling direction ν of the sampling point and the local normal is n(x k ), and v·n(x k )>0, it is determined that the sampling direction corresponding to the sampling point meets the emission processing condition; otherwise, it is determined that the sampling direction corresponding to the sampling point does not meet the emission processing condition.

[0090] Further, in an embodiment of the present invention, the above emission formula may be:

[0091] ν ref = v - 2(v · n(x k ))n(x k ).

[0092] Moreover, in an embodiment of the present invention, if the sampling direction does not meet the emission processing conditions, the above reflection formula is used to perform direction processing to obtain the reflected direction v ref , and the reflected direction v ref is determined as the sampling direction of the sampling point, so that the sampling direction that does not meet the boundary physical requirements can be converted into an effective direction through reflection.

[0093] Step S3: Based on the vMF mixture model and the neural field model, determine the target distribution corresponding to the objective function;

[0094] In an embodiment of the present invention, after obtaining the objective function in the estimator through the above steps, the target distribution corresponding to the objective function can be determined based on the vMF mixture model and the neural field model, so that the corresponding Monte Carlo sampling result can be determined based on the objective function and the target distribution subsequently.

[0095] Specifically, in an embodiment of the present invention, the method for determining the target distribution corresponding to the objective function based on the vMF mixture model and the neural field model may include the following steps:

[0096] Step S31: Based on the vMF mixture model and the neural field model, determine the corresponding guiding distribution;

[0097] Step S32: Determine the selection probability corresponding to the objective function;

[0098] Step S33: If the selection probability is less than or equal to the preset threshold, determine the guiding distribution as the target distribution corresponding to the objective function;

[0099] Step S34: If the selection probability is greater than the preset threshold, determine the uniform distribution as the target distribution corresponding to the objective function.

[0100] Among them, in an embodiment of the present invention, the method for determining the corresponding guiding distribution based on the vMF mixture model and the neural field model may include the following steps:

[0101] Step 1: Use the von Mises–Fisher distribution to model the direction data and determine the vMF mixture model;

[0102] Step 2: Use the neural field model to map the spatial coordinates of the sampling points to unnormalized parameters;

[0103] Step 3: Standardize the unstandardized parameters to obtain the model parameters of the vMF mixture model;

[0104] Step 4: Substitute the model parameters into the vMF mixture model to determine the corresponding guiding distribution.

[0105] Among them, in an embodiment of the present invention, the von Mises–Fisher distribution is used to model the target distribution in the sampling direction, and its probability density on S d-1 is:

[0106] v(ν|μ,κ) = C d (κ)exp(κμ T ν),

[0107] where μ is the mean of the vMF distribution, κ is the concentration degree of the vMF distribution, and the normalization constant C d (κ) is:

[0108]

[0109] where d is the dimension, and I d / 2-1 (k) is the modified Bessel function of the first kind of order k.

[0110] The determined vMF mixture model can be:

[0111]

[0112] where the mixing parameter satisfies λ i > 0 and As Figure 2 shown, the guiding distribution is the conditional distribution of the spatial position and is a distribution defined on the spherical surface.

[0113] In addition, in an embodiment of the present invention, the above neural field model can be composed of a multi-resolution feature grid and a lightweight MLP. The neural field model can map the spatial coordinates x of the sampling points to the unstandardized parameters

[0114]

[0115] Furthermore, in an embodiment of the present invention, the above unstandardized parameters can be standardized as follows to obtain the model parameters of the vMF mixture model

[0116]

[0117] Furthermore, in an embodiment of the present invention, the model parameters of the vMF mixture model are obtained through the above steps After that, the model parameters can be substituted into the vMF mixture model to determine the corresponding guiding distribution

[0118] Moreover, in an embodiment of the present invention, after obtaining the corresponding guiding distribution through the above steps, the parameters of the neural field model can be updated according to the guiding distribution so that the guiding distribution adaptively approximates the target direction distribution through online training.

[0119] Specifically, in an embodiment of the present invention, the above method may include the following steps:

[0120] Step a: Determine the KL divergence and the first estimated gradient corresponding to the guiding distribution;

[0121] Step b: Update the parameters of the neural field model based on the first estimated gradient until the KL divergence converges.

[0122] Among them, in an embodiment of the present invention, the above target direction distribution may be:

[0123]

[0124] Moreover, in an embodiment of the present invention, the KL divergence is:

[0125]

[0126] Furthermore, in an embodiment of the present invention, the first estimated gradient is:

[0127]

[0128] Among them, the parameters of the neural field are updated using the first estimated amplitude so that the guiding distribution gradually approximates the target distribution.

[0129] Moreover, in an embodiment of the present invention, each sampling point has a corresponding selection probability c(x) ∈ (0, 1), so that the target distribution corresponding to the objective function can be determined according to the selection probability. Among them, in an embodiment of the present invention, the selection probability c(x) corresponding to the initial sampling point can be randomly generated by the neural field model.

[0130] Among them, in an embodiment of the present invention, the above preset threshold can be set as needed. By way of example, in an embodiment of the present invention, assuming the preset threshold is 0.6, then if the selection probability is less than or equal to 0.6, the guiding distribution is determined as the target distribution corresponding to the objective function; if the selection probability is greater than 0.6, the uniform distribution is determined as the target distribution corresponding to the objective function.

[0131] Further, in an embodiment of the present invention, after obtaining the introduced distribution and the uniform distribution of the objective function through the above steps, it is necessary to use the introduced distribution and the uniform distribution to backpropagate and update c(x) for the selection probability, so as to achieve an adaptive balance between guided sampling and uniform sampling, thereby reducing the overall sampling variance.

[0132] Specifically, in an embodiment of the present invention, the above method may further include the following steps:

[0133] Step 11, construct a combined sampling probability density function;

[0134] Step 12, substitute the guided distribution, the uniform distribution, and the selection probability into the combined sampling probability density function to obtain the value of the combined sampling probability density function;

[0135] Step 13, determine the loss value corresponding to the selection probability based on the value of the combined sampling probability density function;

[0136] Step 14, determine the second estimated gradient corresponding to the selection probability based on the value of the combined sampling probability density function;

[0137] Step 15, update the selection probability based on the second estimated gradient until the loss value converges.

[0138] Among them, in an embodiment of the present invention, the combined sampling probability density function is:

[0139]

[0140] where p u (v∣x) is the probability density function of uniform direction sampling,

[0141]

[0142] In addition, in an embodiment of the present invention, the method for determining the loss value corresponding to the selection probability based on the value of the combined sampling probability density function may include: determining the loss value corresponding to the selection probability through a loss function based on the value of the combined sampling probability density function, where the loss function is

[0143]

[0144] where e is a set fixed constant (for example, 0.2).

[0145] Further, in an embodiment of the present invention, the method for determining the second estimated gradient corresponding to the selection probability based on the value of the combined sampling probability density function may include: determining the second estimated gradient corresponding to the selection probability through a gradient formula based on the value of the combined sampling probability density function, where the gradient formula is:

[0146]

[0147] Also, in one embodiment of the present invention, after obtaining the second estimated gradient and the loss value through the above steps, the selection probability can be updated based on the second estimated gradient until the loss value converges.

[0148] Step S4, determining the corresponding Monte Carlo sampling result based on the target distribution and the target function;

[0149] Among them, in one embodiment of the present invention, after obtaining the target distribution and the target function through the above steps, the corresponding Monte Carlo sampling result for this time can be determined based on the target distribution and the target function.

[0150] Specifically, in one embodiment of the present invention, a large number of random samples can be generated according to the target distribution through the target function, the value of the target function is calculated for each sample, and then the average value of the target function corresponding to all samples is determined as the Monte Carlo sampling result for this time.

[0151] Step S5, determining the target solution of the partial differential equation based on all Monte Carlo sampling results.

[0152] Among them, in one embodiment of the present invention, after obtaining the Monte Carlo sampling result through the above steps, the above steps can be repeated to obtain all Monte Carlo sampling results, and the average value of all Monte Carlo sampling results is determined as the target solution of the partial differential equation.

[0153] Based on the above description, Figure 3 is a schematic diagram of determining the target distribution corresponding to the target function proposed by the embodiment of the present invention. As Figure 3 shown, the multi-resolution feature grid and the lightweight MLP map the spatial coordinates x of the sampling points to unnormalized parameters, and then the unnormalized parameters can be processed through the following normalization to obtain the model parameters of the vMF mixture model, and the model parameters of the vMF mixture model are input into the vMF mixture model to obtain the guiding distribution corresponding to the sampling points. Also, the selection probability can be output through the multi-resolution feature grid and the lightweight MLP.

[0154] Also, in one embodiment of the present invention, Figure 4 A schematic diagram of a wavefront parallel architecture proposed by an embodiment of the present invention is shown. Among them, when adopting the wavefront parallel architecture on the GPU, the above PDE solving process can be divided into a logical stage, a calculation stage, and a wandering stage. Among them, the logical stage includes parallelly calculating the sampling space parameters of WoSt, and dividing the random walk into points falling within the epsilon-shell and points falling within the wandering space; the calculation stage: parallelly calculating the contribution of the objective function of each sampling point at the current step (including Dirichlet, Neumann, and source terms); the wandering stage: parallelly generating the sampling direction for the next step, sampling a new direction according to the current guiding distribution and updating the sampling path, so that the collaborative and efficient operation of neural field online training and sampling evaluation can be realized through CUDA Streams and structured memory layout.

[0155] According to the PDE solving method proposed by an embodiment of the present invention, by online learning the characteristics of the local PDE solution through the vMF mixture model and the neural field model, the sampling direction distribution in the estimator is optimized, so that the optimal sampling distribution can be selected according to the characteristics of the local PDE solution in different regions, thereby improving the sampling efficiency and reducing the variance.

[0156] Next, a PDE solving device proposed by an embodiment of the present invention will be described with reference to the accompanying drawings.

[0157] Figure 5 A schematic structural diagram of a PDE solving device according to an embodiment of the present invention is shown.

[0158] As Figure 5 shown, the PDE solving device 10 includes: an acquisition module 501, a parameterization module 502, a first determination module 503, a second determination module 504, and a third determination module 505, where

[0159] The acquisition module 501 is used to acquire the PDE to be solved;

[0160] The parameterization module 502 is used to reparameterize the recursive term in the estimator of the PDE to obtain the objective function in the estimator;

[0161] The first determination module 503 is used to determine the target distribution corresponding to the objective function based on the vMF mixture model and the neural field model;

[0162] The second determination module 504 is used to determine the corresponding Monte Carlo sampling result based on the target distribution and the objective function;

[0163] The third determination module 505 is used to determine the target solution of the PDE based on all Monte Carlo sampling results.

[0164] Further, the above-mentioned parameterization module 502 is specifically configured to:

[0165] Determine the sampling direction v of the sampling point;

[0166] Based on the sampling direction of the sampling point, reparameterize the recursive term of the partial differential equation in the estimator to obtain the objective function in the estimator, where the objective function is:

[0167]

[0168] where p(ν|x k ) is the sampling probability density function, and α(x k ) is the weight factor. <n>And <s>respectively represent the contributions of the Neumann boundary and the source term, where ‖S d-1 ‖ is the area of the unit sphere, x k is the sampling point, and d is the dimension.

[0169] Furthermore, the above-mentioned first determination module 503 is specifically configured to:

[0170] Determine the corresponding guiding distribution based on the vMF mixture model and the neural field model;

[0171] Determine the selection probability corresponding to the objective function;

[0172] If the selection probability is less than or equal to the preset threshold, then determine the guiding distribution as the target distribution corresponding to the objective function;

[0173] If the selection probability is greater than the preset threshold, then determine the uniform distribution as the target distribution corresponding to the objective function.

[0174] Furthermore, the above-mentioned first determination module 503 is further configured to:

[0175] Model the direction data using the von Mises–Fisher distribution to determine the vMF mixture model;

[0176] Use the neural field model to map the spatial coordinates of the sampling points to unnormalized parameters;

[0177] Normalize the unnormalized parameters to obtain the model parameters of the vMF mixture model;

[0178] Substitute the model parameters into the vMF mixture model to determine the corresponding guiding distribution.

[0179] Furthermore, the above-mentioned first determination module 503 is further configured to:

[0180] Determine the KL divergence and the first estimated gradient corresponding to the guiding distribution;

[0181] Update the parameters of the neural field model based on the first estimated gradient until the KL divergence converges.

[0182] Furthermore, the above-mentioned first determination module 503 is further configured to:

[0183] Construct a combined sampling probability density function;

[0184] Substitute the guiding distribution, the uniform distribution, and the selection probability into the combined sampling probability density function to obtain the value of the combined sampling probability density function;

[0185] Determine the loss value corresponding to the selection probability based on the value of the combined sampling probability density function;

[0186] Determine a second estimated gradient corresponding to the selection probability based on the combined sampling probability density function value;

[0187] Update the selection probability based on the second estimated gradient until the loss value converges.

[0188] Furthermore, the above-mentioned parameterization module 502 is further configured to:

[0189] Determine whether the sampling point is located on the Neumann boundary;

[0190] If the sampling point is located on the Neumann boundary, determine whether the corresponding sampling direction satisfies the emission processing condition;

[0191] If the sampling direction does not satisfy the emission processing condition, perform direction processing using the reflection formula to obtain the reflected direction, and determine the reflected direction as the sampling direction of the sampling point.

[0192] According to the PDE solving device proposed in the embodiment of the present invention, by learning the characteristics of the local PDE solution online through the vMF mixture model and the neural field model, and optimizing the direction distribution of sampling in the estimator, the optimal sampling distribution can be selected according to the characteristics of the local PDE solution in different regions, thereby improving the sampling efficiency and reducing the variance.

[0193] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically defined.

[0194] In the description of this specification, the description with reference to terms such as "an embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, without conflict, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples.

[0195] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.< / s> < / n> < / s> < / n> < / s> < / n> < / s> < / n>

Claims

1. A method for solving partial differential equations, characterized in that, The method includes: Obtain a partial differential equation to be solved; Reparameterize the recursive term in the estimator of the partial differential equation to obtain an objective function in the estimator; Based on the vMF mixture model and the neural field model, determine the target distribution corresponding to the objective function; Based on the target distribution and the objective function, determine the corresponding Monte Carlo sampling result; Based on all Monte Carlo sampling results, determine the target solution of the partial differential equation.

2. The method according to claim 1, characterized in that The reparameterizing the recursive term in the estimator of the partial differential equation to obtain an objective function in the estimator includes: Determine the sampling direction v of the sampling point; Based on the sampling direction of the sampling point, reparameterize the recursive term in the estimator of the partial differential equation to obtain an objective function in the estimator, where the objective function is: where, p(ν|x k ) is the sampling probability density function, and α(x k ) is the weight factor. <n>and <s>represent the contributions of the Neumann boundary and the source term respectively, where ‖S d-1 ‖ is the area of the unit sphere, x k is the sampling point, and d is the dimension.< / s> < / n> <s> 3. The method according to claim 1, wherein The determining the target distribution corresponding to the objective function based on the vMF mixture model and the neural field model includes: Based on the vMF mixture model and the neural field model, determine the corresponding guiding distribution; Determine the selection probability corresponding to the objective function; If the selection probability is less than or equal to a preset threshold, determine the guiding distribution as the target distribution corresponding to the objective function; If the selection probability is greater than the preset threshold, determine the uniform distribution as the target distribution corresponding to the objective function.

4. The method according to claim 3, characterized in that The determining the corresponding guiding distribution based on the vMF mixture model and the neural field model includes: Use the von Mises–Fisher distribution to model the direction data to determine the vMF mixture model; Use the neural field model to map the spatial coordinates of the sampling points to unnormalized parameters; Perform normalization processing on the unnormalized parameters to obtain the model parameters of the vMF mixture model; Substitute the model parameters into the vMF mixture model to determine the corresponding guiding distribution.

5. The method according to claim 3, characterized in that, The method further includes: Determine the KL divergence and the first estimated gradient corresponding to the guiding distribution; Update the parameters of the neural field model based on the first estimated gradient until the KL divergence converges.

6. The method according to claim 3, wherein The method further includes: Construct a combined sampling probability density function; Substitute the guiding distribution, the uniform distribution, and the selection probability into the combined sampling probability density function to obtain the value of the combined sampling probability density function; Based on the value of the combined sampling probability density function, determine the loss value corresponding to the selection probability; Based on the value of the combined sampling probability density function, determine the second estimated gradient corresponding to the selection probability; Update the selection probability based on the second estimated gradient until the loss value converges.

7. The method according to claim 2, wherein The method further includes: Determine whether the sampling point is located on the Neumann boundary; If the sampling point is located on the Neumann boundary, determine whether the corresponding sampling direction satisfies the emission processing condition; If the sampling direction does not satisfy the emission processing condition, perform direction processing using the reflection formula to obtain the reflected direction, and determine the reflected direction as the sampling direction of the sampling point.

8. A solving device for partial differential equations, characterized in that, The device includes: An acquisition module, configured to acquire a partial differential equation to be solved; A parameterization module, configured to reparameterize the recursive terms of the partial differential equation in the estimator to obtain an objective function in the estimator; A first determination module, configured to determine an objective distribution corresponding to the objective function based on the vMF mixture model and the neural field model; A second determination module, configured to determine a corresponding Monte Carlo sampling result based on the objective distribution and the objective function; A third determination module, configured to determine an objective solution of the partial differential equation based on all the Monte Carlo sampling results.

9. An electronic device, comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the method according to any one of claims 1-7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1-7. < / s>