A grid smoothing method and system based on physical embedding graph neural network
By using a physical embedding graph neural network-based approach, the problems of insufficient physical constraints and low optimization efficiency in existing 3D volumetric mesh smoothing methods are solved, achieving efficient and robust mesh smoothing and improving the geometric quality and local feature extraction capabilities of the mesh.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI
- Filing Date
- 2026-04-20
- Publication Date
- 2026-07-31
AI Technical Summary
Existing AI-based mesh smoothing methods are mainly limited to surface meshes and lack physical constraints on 3D volume meshes, resulting in mesh inversion, weak local geometric feature extraction capabilities, and low optimization efficiency.
A method based on physical embedding graph neural networks is adopted, which achieves mesh smoothing by using Gaussian-enhanced physical embedding feature encoding, Jacobi-guided local deformation modeling, anisotropic attention aggregation and adaptive gating mechanism, combined with end-to-end model training of differentiable line search and symmetric Dirichlet energy.
While ensuring strict non-reversal, it efficiently and robustly improves the geometric quality of 3D volume meshes, enhances local geometry perception and optimization efficiency, and ensures the topological legality and physical consistency of the mesh.
Smart Images

Figure CN122492486A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of computer graphics, computer-aided engineering (CAE) and three-dimensional geometry processing technology, and specifically relates to a mesh smoothing method and system based on physically embedded graph neural networks. Background Technology
[0002] In Computer-Aided Engineering (CAE) and Finite Element Analysis (FEA), three-dimensional tetrahedral meshes are the standard representation of discretized continuous physical domains. The geometric quality of the mesh directly determines the accuracy, convergence speed, and stability of the numerical simulation. If the mesh contains severely distorted or physically inverted elements (i.e., negative tetrahedral volume), it will lead to a deterioration of the stiffness matrix condition number, causing computational divergence or severe numerical errors. Therefore, the initial mesh must be smoothed before performing finite element calculations to improve its quality.
[0003] Traditional mesh smoothing methods are mainly divided into two categories: heuristic methods (such as Laplace smoothing) and optimization-based methods. Laplace smoothing is computationally fast, but it is prone to causing mesh volume shrinkage and even mesh inversion at complex boundaries. Optimization-based methods (such as minimizing the symmetric Dirichlet energy) can obtain high-quality meshes, but they have huge computational overhead and are highly dependent on the initial guess, making them extremely inefficient when dealing with large-scale meshes.
[0004] In recent years, mesh processing methods based on deep learning (especially graph neural networks, GNNs) have shown great potential. However, existing AI-based mesh smoothing models are almost entirely designed for 2D or 3D surface meshes, with few deep learning smoothing methods specifically for 3D volumetric meshes (such as tetrahedral meshes). Directly extending existing surface mesh data-driven methods to tetrahedral meshes has the following significant technical drawbacks: 1) Lack of physical consistency: Volumetric meshes have complex internal structures. Conventional GNNs directly regress node displacements in Euclidean space without considering the 3D deformation laws in continuum mechanics, making them prone to non-physical mesh inversions during prediction (i.e., the tetrahedral volume is negative or the Jacobian determinant is less than zero). 2) Weak local geometry awareness: Directly using absolute coordinates as input makes it difficult to guarantee translation and rotation invariance and cannot effectively capture the complex local anisotropic distortions of tetrahedral meshes. 3) Lack of strict safety guarantee mechanisms: Existing networks lack constraints on the maximum feasible step size when outputting displacements, making it easy to violate the topological validity of the volumetric mesh during inference and training phases. Summary of the Invention
[0005] The purpose of this invention is to solve the problems that existing AI-based mesh smoothing methods are mainly limited to surface meshes, and lack physical constraints when processing tetrahedral meshes, resulting in mesh inversion, weak local geometric feature extraction capabilities, and low optimization efficiency.
[0006] To achieve the above objectives, on the one hand, the present invention provides a mesh smoothing method based on a physically embedded graph neural network, the method comprising the following steps:
[0007] Acquire initial tetrahedral mesh data and perform Gaussian-enhanced physical embedding feature encoding;
[0008] Jacobi-guided local deformation modeling and feature update;
[0009] The initial displacement is calculated through anisotropic attention aggregation and adaptive gating mechanism;
[0010] Perform a differentiable line search and output the final smooth mesh;
[0011] End-to-end model training based on symmetric Dirichlet energy.
[0012] On the other hand, the present invention provides a grid smoothing system based on a physically embedded graph neural network, the system comprising:
[0013] The topology building module is used to acquire initial tetrahedral mesh data and perform Gaussian-enhanced physical embedding feature encoding.
[0014] The Jacobian transform module is used for Jacobian-guided local deformation modeling and feature updating.
[0015] The attention aggregation module is used to calculate the initial displacement through anisotropic attention aggregation and adaptive gating mechanism;
[0016] An adaptive gating module is used to perform a differentiable line search and output a final smooth mesh.
[0017] The physical constraint output module is used for end-to-end model training based on symmetric Dirichlet energy.
[0018] This invention fills the gap in the field of deep learning smoothing of three-dimensional volumetric meshes by deeply integrating the principles of continuum mechanics with graph neural networks. Under the premise of ensuring strict non-reversal, it efficiently and robustly improves the geometric quality of tetrahedral meshes. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of a mesh smoothing method based on a physically embedded graph neural network provided in an embodiment of the present invention;
[0020] Figure 2A schematic diagram of the model structure of the physical embedding graph neural network model provided in an embodiment of the present invention;
[0021] Figure 3 This is a schematic diagram of a grid smoothing system structure based on a physically embedded graph neural network, provided as an embodiment of the present invention. Detailed Implementation
[0022] To enable those skilled in the art to more fully understand and implement the present invention, the technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention.
[0023] This invention constructs a physically embedded graph neural network architecture specifically designed for 3D volumetric meshes. First, a Gaussian-enhanced physically embedded feature encoding is proposed, decoupling absolute coordinates into relative directions and scalar distances, and combining this with Gaussian radial basis functions to achieve translation invariance and high-dimensional feature mapping. Second, a Jacobi-guided local deformation modeling is proposed, using a neural network to predict affine transformation matrices in residual form to simulate local deformation gradients in continuum mechanics, replacing traditional direct displacement regression. Third, an anisotropic attention aggregation and adaptive gating mechanism is constructed, adaptively focusing on distorted regions through attention weights, and using a gating network to predict scalar coefficients to scale and filter the aggregated displacement. Finally, a differentiable line search mechanism is introduced, analytically calculating the maximum feasible step size before the network outputs the final displacement, and combining this with symmetric Dirichlet energy to construct a nonlinear loss function for end-to-end training.
[0024] Combination Figure 1 and Figure 2 As shown, this embodiment of the invention provides a mesh smoothing method based on a physically embedded graph neural network, which is mainly used for mesh quality optimization before finite element analysis. Figure 2 As shown, the physical embedding graph neural network model structure mainly includes a Gaussian-enhanced physical encoder, a Jacobi-guided transform module, an anisotropic attention aggregation module, and an adaptive gating module. The model takes the local geometric features of nodes and their neighborhoods as input. First, the encoder extracts high-dimensional features. Then, the transform module predicts the local affine transformation matrix. Following this, weighted aggregation is performed through an anisotropic attention mechanism. Finally, the adaptive gating module outputs safe node displacements, thereby achieving smooth optimization of mesh quality. The entire mesh smoothing method includes the following detailed steps:
[0025] Step S1: Obtain the initial tetrahedral mesh data and perform Gaussian-enhanced physical embedding feature encoding.
[0026] First, the initial 3D tetrahedral mesh data to be smoothed is obtained, and a topology graph based on the mesh node connection relationship is constructed to determine each node and its corresponding ring of neighboring nodes; its node coordinate matrix and tetrahedral unit connection relationship (topology) are extracted and transformed into graph structure data G = (V, E), where V is the set of mesh nodes and E is the set of mesh edges.
[0027] For each node and its surrounding neighboring nodes, a relative geometric descriptor is extracted to decouple the absolute spatial coordinates into relative directions and scalar distances. This is then combined with radial basis functions for feature encoding to generate a high-dimensional edge feature vector containing multi-head features. Based on this high-dimensional edge feature vector, an affine transformation matrix is predicted for each neighboring node. The affine transformation matrix is used to simulate local deformation in continuum mechanics, and the candidate displacement vectors of the neighboring nodes relative to the center node are calculated accordingly.
[0028] To overcome the sensitivity to translation and rotation caused by directly inputting absolute coordinates, this embodiment of the invention performs Gaussian-enhanced physical embedding feature encoding on the local neighborhood. Specifically, for any center node i and its neighboring nodes j, the relative displacement vector is calculated. .Will Decoupling as scalar distance and unit direction vector Subsequently, a set of Gaussian radial basis functions (RBFs) were used to evaluate the scalar distance. Perform high-dimensional mapping to generate distance feature vectors .Will With unit direction vector The concatenation is mapped to a high-dimensional edge feature vector using a multilayer perceptron (MLP). This encoding method not only guarantees translation invariance, but also enables the network to keenly capture minute distortions in local geometry.
[0029] In the feature encoding step, for the edges of the l-th layer Define relative vectors and its Euclidean length The high-dimensional edge feature vector The calculation formula is:
[0030]
[0031] in, It is a multilayer perceptron. For the direction of normalization, For Gaussian radial basis functions, This indicates a feature splicing operation.
[0032] Step S2: Jacobi-guided local deformation modeling and feature update.
[0033] After extracting edge features, the network does not directly predict the absolute displacement of nodes, but instead simulates the deformation gradient in continuum mechanics. Specifically, it utilizes the message passing mechanism of graph neural networks to process the edge feature vectors... Aggregate to node i to generate node features .
[0034] Then, The input is fed into a dedicated deformation prediction module (composed of a multi-layer MLP), which predicts a value for each node. affine transformation matrix (i.e., the affine Jacobian matrix). This matrix represents the deformation trend of a local infinitesimal element centered at node i. It is calculated... This allows us to obtain candidate displacement vectors based on local deformation patterns. This Jacobi-guided mechanism ensures that the network output conforms to the laws of three-dimensional physics and effectively addresses anisotropic distortion.
[0035] In the Jacobi-guided transformation step, the high-dimensional edge feature vector is... Reconstruct the tensor into a multihead tensor and extract the deformation gradient parameters from it. and scalar attention score ;
[0036] Affine transformation matrix The calculation uses the residual formula:
[0037]
[0038] in, To transform the network, The identity matrix is used; the candidate displacement vector is calculated as follows: .
[0039] Step S3: Calculate the initial displacement through anisotropic attention aggregation and adaptive gating mechanism.
[0040] To avoid over-smoothing and protect mesh boundaries, this embodiment of the invention introduces an intelligent filtering mechanism. When node i collects candidate displacements from all its neighbors j, anisotropic attention weights are calculated. The weights are determined by both node features and edge features. The network adaptively assigns greater weights to severely distorted regions and less weights to regions with good quality.
[0041] Furthermore, anisotropic attention scores are extracted based on the high-dimensional edge feature vectors, and normalized attention weights are calculated. These attention weights are then used to weight and sum the candidate displacement vectors to obtain an aggregated displacement vector. This aggregated displacement vector is input into a gating network to predict scalar coefficients used to distinguish between noise outliers and clean interiors. The aggregated displacement vector is then scaled using these scalar coefficients to obtain the final predicted displacement for each node.
[0042] Specifically, the aggregated displacements are input into an adaptive gating network to predict a scalar gating coefficient. The final initial displacement The aggregate displacement is obtained by scaling the gating coefficient. This mechanism effectively locks high-quality interior points and feature boundaries, achieving precise local smoothing.
[0043] In the anisotropic attention aggregation step, the ring neighborhood of the central node i Normalized attention weights within The calculation is as follows:
[0044]
[0045] in, This represents the normalized attention weight of neighbor node j to center node i under the h-th attention head; and Let represent the unnormalized attention scores between node i and nodes j and k under the h-th attention head, respectively; Let i represent the set of neighboring nodes of the central node i; k is the index of the traversed node in the neighboring set.
[0046] For a single attention head h, the aggregated displacement vector The calculation is as follows:
[0047]
[0048] in, Let i represent the aggregate displacement vector of the center node i under the h-th attention head; The affine transformation matrix (i.e., the Jacobian matrix) used to simulate local deformation is represented by the network prediction. This represents the relative direction vector from node i to node j.
[0049] In the adaptive gated update step, scalar coefficients The constraint is between [0,1], and its calculation formula is:
[0050]
[0051] in, Here, H is the number of attention heads, and H is the sigmoid activation function. is the scalar gating coefficient of node i, used to adaptively control the scaling of the final displacement; This refers to the multilayer perceptron network in the gating module. for:
[0052]
[0053] in, This represents the final predicted displacement of the central node i after multi-head attention fusion and scaling by the gating coefficient.
[0054] Step S4: Perform a differentiable line search to output a final smooth mesh with strict non-reversal.
[0055] To provide strict physical safety guarantees and prevent the network output from causing the tetrahedral volume to be negative (i.e., mesh inversion), this embodiment of the invention incorporates a differentiable line search mechanism at the end of the network. It analytically calculates the maximum feasible step size to ensure that the volumes of all associated tetrahedrons are positive. Under the safe condition of ensuring that no physical inversion occurs, it evaluates the geometric distortion loss function and updates the network parameters accordingly to output a smoothed, high-quality tetrahedral mesh.
[0056] Geometric distortion loss function Defined as:
[0057]
[0058] in, For a set of nodes, For nodes Associative tetrahedral sets This represents the state of the tetrahedron under updated coordinates. Specifically, This represents the volume of the original tetrahedral unit before the update. This represents the new volume of the tetrahedral element after the node coordinates are updated.
[0059] For the initial displacement predicted by the network Instead of adding it directly to the original coordinates, it is added along the direction of displacement. Analytical calculation of the critical step size at which each tetrahedral element reverses. Specifically, the volume of the tetrahedron is a cubic polynomial in terms of the step length t. By solving for the roots of this polynomial, we can find the smallest positive root that makes the volume exactly zero. .
[0060] Multiply the smallest critical step size in the entire grid by a safety factor (e.g., 0.8) to obtain the globally maximum feasible step size. The final node update formula is:
[0061] .
[0062] in, Indicates the new spatial coordinates after the node is updated; Indicates the original spatial coordinates of the node before the update; This represents the global maximum feasible safe step size that ensures the volume of all tetrahedra in the entire mesh is positive; This represents the initial displacement vector output by the network. Since the root-finding process is analytical and differentiable, the gradient can be successfully backpropagated, which mathematically eliminates the possibility of volume mesh inversion.
[0063] Step S5: End-to-end model training based on symmetric Dirichlet energy.
[0064] During the model training phase, an unsupervised physical energy loss function is used. The symmetric Dirichlet energy of each tetrahedral element in the smoothed mesh is calculated as the loss function. The energy function tends to infinity as the tetrahedron approaches degeneracy. Thanks to the differentiable line search in step S4, which ensures the network is absolutely non-reversible, the nonlinear loss function does not experience gradient explosion during training, guaranteeing extremely high stability in end-to-end training. After training convergence, only one forward propagation is needed to output a high-quality mesh during the inference phase.
[0065] Specifically, during the model training phase, a differentiable line search mechanism is introduced to analytically calculate the maximum feasible step size that ensures the volumes of all associated tetrahedra are positive. To ensure a safe state without physical reversal, symmetric Dirichlet energy is used. Evaluation of geometric distortion loss function :
[0066]
[0067] in, For a set of nodes, Let x_i be the set of tetrahedrons associated with node x_i. This indicates the state of the tetrahedron in the updated coordinates. Based on this, the network parameters are updated to output a smoothed, high-quality tetrahedral mesh.
[0068] Figure 3 This invention provides a grid smoothing system based on a physically embedded graph neural network. For example... Figure 3 As shown, the system includes:
[0069] Topology building module 31 is used to acquire initial tetrahedral mesh data and perform Gaussian-enhanced physical embedding feature encoding;
[0070] Jacobi transformation module 32 is used for Jacobi-guided local deformation modeling and feature updating;
[0071] Attention aggregation module 33 is used to calculate the initial displacement through anisotropic attention aggregation and adaptive gating mechanism;
[0072] Adaptive gating module 34 is used to perform differentiable line search and output the final smooth mesh;
[0073] Physical constraint output module 35 is used for end-to-end model training based on symmetric Dirichlet energy.
[0074] The modules in the above system are set based on the steps of the method embodiment, and their specific working principles and technical effects are the same as those in Embodiment 1, so they will not be repeated here.
[0075] This invention significantly improves the model's perception and generalization ability to complex 3D geometric features through Gaussian-enhanced decoupling coding, and enhances its robustness to rotation. The Jacobi-guided deformation mechanism ensures that the network output strictly follows the laws of physics and mechanics, effectively handling anisotropic distortion and fundamentally reducing the probability of non-physical folding. The anisotropic attention and adaptive gating mechanism act as intelligent filters, accurately smoothing distorted units while perfectly protecting the feature boundaries and high-quality interior points of the mesh, avoiding over-smoothing. Most importantly, the differentiable line search mechanism constructs a strict inversion-free physical safety barrier, which not only mathematically eliminates the phenomenon of volume mesh inversion, but also ensures the stability of the nonlinear loss function based on geometric distortion during training. This allows the model to obtain a high-quality tetrahedral mesh with only one forward propagation during the inference phase, improving computational efficiency by several orders of magnitude compared to traditional iterative optimization algorithms.
[0076] The specific embodiments described above further illustrate the purpose, technical solutions, and beneficial effects of the multiple embodiments disclosed in this specification. It should be understood that the above description is only within the scope of this specification. Any modifications, equivalent substitutions, improvements, etc., made based on the technical solutions of the multiple embodiments disclosed in this specification should be included within the protection scope of the multiple embodiments disclosed in this specification.
Claims
1. A mesh smoothing method based on a physically embedded graph neural network, characterized in that, Includes the following steps: Acquire initial tetrahedral mesh data and perform Gaussian-enhanced physical embedding feature encoding; Jacobi-guided local deformation modeling and feature update; The initial displacement is calculated through anisotropic attention aggregation and adaptive gating mechanism; Perform a differentiable line search and output the final smooth mesh; End-to-end model training based on symmetric Dirichlet energy.
2. The method according to claim 1, characterized in that, The step of acquiring initial tetrahedral mesh data and performing Gaussian-enhanced physical embedding feature encoding includes: Obtain the initial 3D tetrahedral mesh data to be smoothed, and construct a topology graph based on the mesh node connection relationship to determine each node and its corresponding ring neighbor node set; For each node and its one-ring neighboring nodes, a relative geometric descriptor is extracted, the absolute spatial coordinates are decoupled into relative direction and scalar distance, and feature encoding is performed in combination with radial basis function to generate a high-dimensional edge feature vector containing multi-head features. Based on the high-dimensional edge feature vector, an affine transformation matrix is predicted for each neighboring node. The affine transformation matrix is used to simulate local deformation in continuum mechanics, and the candidate displacement vector of the neighboring node relative to the center node is calculated accordingly.
3. The method according to claim 1, characterized in that, In the feature encoding step, for the edges of the l-th layer Define relative vectors and its Euclidean length High-dimensional edge feature vector The calculation formula is: in, It is a multilayer perceptron. For the direction of normalization, For Gaussian radial basis functions, This indicates a feature splicing operation.
4. The method according to claim 1, characterized in that, In the Jacobi-guided transformation step, the high-dimensional edge feature vectors are transformed... Reconstruct the tensor into a multi-head tensor, from which the deformation gradient parameter m_{ij} and scalar attention score are extracted. ; Affine transformation matrix The calculation uses the residual formula: in, To transform the network, The identity matrix is used; the candidate displacement vector is calculated as follows: .
5. The method according to claim 1, characterized in that, In the anisotropic attention aggregation step, the ring neighborhood of the central node i Normalized attention weights within The calculation is as follows: For a single attention head h, the aggregated displacement vector The calculation is as follows: in, Let i represent the aggregate displacement vector of the center node i under the h-th attention head; This represents the affine transformation matrix predicted by the network, used to simulate local deformation; This represents the relative direction vector from node i to node j.
6. The method according to claim 1, characterized in that, In the adaptive gating update step, the scalar coefficients The constraint is between [0,1], and its calculation formula is: in, The sigmoid activation function is used, and H is the number of attention heads; the final predicted displacement for: in, This represents the final predicted displacement of the central node i after multi-head attention fusion and scaling by the gating coefficient.
7. The method according to claim 1, characterized in that, Geometric distortion loss function Defined as: in, For a set of nodes, For nodes Associative tetrahedral sets This represents the state of the tetrahedron under updated coordinates. This represents the volume of the original tetrahedral unit before the update. This represents the new volume of the tetrahedral element after the node coordinates are updated.
8. The method according to claim 1, characterized in that, The node update formula is: in, Indicates the new spatial coordinates after the node is updated; Indicates the original spatial coordinates of the node before the update; This represents the global maximum feasible safe step size that ensures the volume of all tetrahedra in the entire mesh is positive; This represents the initial displacement vector output by the network.
9. The method according to claim 1, characterized in that, Using symmetrical Dirichlet energy Evaluation of geometric distortion loss function : in, For a set of nodes, Let x_i be the set of tetrahedrons associated with node x_i. This indicates the state of the tetrahedron under the updated coordinates; based on this, the network parameters are updated to output a smoothed, high-quality tetrahedral mesh.
10. A grid smoothing system based on a physically embedded graph neural network, characterized in that, include: The topology building module is used to acquire initial tetrahedral mesh data and perform Gaussian-enhanced physical embedding feature encoding. The Jacobian transform module is used for Jacobian-guided local deformation modeling and feature updating. The attention aggregation module is used to calculate the initial displacement through anisotropic attention aggregation and adaptive gating mechanism; An adaptive gating module is used to perform a differentiable line search and output a final smooth mesh. The physical constraint output module is used for end-to-end model training based on symmetric Dirichlet energy.