Model training method, electronic equipment and computer readable storage medium

By mapping node features in graph data from Euclidean space to hyperbolic space and performing hyperbolic graph convolution operations in tangent space, the problem of limited efficiency and scalability of hyperbolic neural networks when processing large-scale graph data is solved, and more efficient and scalable graph data processing capabilities are achieved.

CN119849544APending Publication Date: 2025-04-18JILIN UNIVERSITY
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411801834.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-04-18

Smart Images

  • Figure CN119849544A_ABST
    Figure CN119849544A_ABST
Patent Text Reader

Abstract

The invention provides a model training method, electronic equipment and a computer readable storage medium, and relates to the field of data processing.The method comprises the steps that data features of nodes in graph data are input into a classification model, and the data features are mapped to a hyperbolic space from an Euclidean space through the classification model, secondly, mapping the data features from the hyperbolic space to a tangent space so as to be subjected to multiple times of equivalent hyperbolic graph convolution operation, then aligning an embedding center of a node with an original point of the tangent space in the tangent space, and mapping the data features of the aligned node to the hyperbolic space from the tangent space so as to obtain a classification result of the classification model for the node; and training a classification model through a classification result, a node category label and a loss function constructed based on regularization loss. According to the method, the hyperbolic representation learning problem on graph data with million-level nodes can be solved, the processing efficiency of the model on large-scale graph data can be improved, and the expandability of the model can also be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and more specifically, to a model training method, an electronic device, and a computer-readable storage medium in the field of data processing. Background Art

[0002] Hierarchical graph-structured data are widely present in various fields of applied science and engineering, so effective representation learning for such data has attracted widespread attention. In this context, hyperbolic geometry has become a powerful tool. Due to its exponential growth characteristics, hyperbolic space can naturally adapt to data with hierarchical graph structures. Based on the research on the successful integration of basic hyperbolic geometry operations into neural networks, a large number of methods using hyperbolic geometry have emerged and are widely used in many fields, including natural language processing, social networks, knowledge graphs, and computer vision. It is worth noting that the remarkable performance of hyperbolic graph neural networks in basic graph tasks such as node classification and link prediction further verifies the effectiveness of hyperbolic geometry in graph-based learning scenarios.

[0003] Although hyperbolic neural networks have made significant progress in the field of graph representation learning, there is a key limitation in their architectural design, which is that they often borrow the design ideas of graph neural networks in Euclidean space. Usually, the formulas of hyperbolic geometry are only applied at the module level, resulting in a network stacking multiple hyperbolic graph convolution layers based on hyperbolic modules. Although this design is effective to a certain extent, it significantly increases the computational overhead, thus limiting the efficiency and scalability of hyperbolic graph neural networks when processing large-scale graph data.

[0004] Therefore, how to improve the efficiency and scalability of hyperbolic graph neural networks when processing large-scale graph data has become an urgent problem to be solved. Summary of the invention

[0005] The present application provides a model training method, an electronic device and a computer-readable storage medium. The present application can solve the hyperbolic representation learning problem on graph data with millions of nodes, which can not only improve the processing efficiency of the model when processing large-scale graph data, but also improve the scalability of the model.

[0006] In a first aspect, a model training method is provided, which includes: inputting a first data feature of each node in graph data into a classification model; wherein the graph data includes first data features of multiple nodes in Euclidean space and node category labels of each of the multiple nodes; for each node, mapping the first data feature of the node from the Euclidean space to a hyperbolic space to obtain a second data feature of the node in the hyperbolic space; performing multiple equivalent hyperbolic graph convolution operations on the second data feature of the node to map the second data feature of the node from the hyperbolic space to a tangent space of a reference point to obtain a third data feature of the node in the tangent space; wherein the graph convolution result of the first hyperbolic graph convolution operation in any two adjacent hyperbolic graph convolution operations is the graph convolution result of the second hyperbolic graph convolution operation. as input data; determining the center vector of the node embedding center according to the feature vectors of the third data features of each of the multiple nodes; for each node, adjusting the feature vector of the third data feature of the node according to the center vector to align the node embedding center with the origin of the tangent space, and obtaining the feature vector of the fourth data feature of the node in the tangent space; based on the feature vector of the fourth data feature, mapping the fourth data feature of the node from the tangent space to the hyperbolic space, and obtaining the feature vector of the fifth data feature of the node in the hyperbolic space; training the classification model according to the feature vector of the fifth data feature of the node, the node category label corresponding to the node and the target loss function; wherein the target loss function is constructed based on the task loss and the regularization loss.

[0007] In the above technical scheme, the embodiment of the present application trains the classification model by adopting the above model training method. The application of the trained classification model can solve the hyperbolic representation learning problem on graph data with millions of nodes, and can not only improve the processing efficiency of the model when processing large-scale graph data, but also improve the scalability of the model.

[0008] In one possible implementation, the classification model includes a multi-layer hyperbolic graph convolutional layer network, and for any two adjacent layers of the multi-layer hyperbolic graph convolutional layer network in the multi-layer hyperbolic graph convolutional layer network, the output end of the first layer of the hyperbolic graph convolutional layer network in the any two adjacent layers of the hyperbolic graph convolutional layer network is connected to the input end of the second layer of the hyperbolic graph convolutional layer network; performing multiple equivalent hyperbolic graph convolution operations on the second data feature of the node to map the second data feature of the node from the hyperbolic space to the tangent space of the reference point to obtain the third data feature of the node in the tangent space includes: using the multi-layer hyperbolic graph convolutional layer network to perform multiple equivalent hyperbolic graph convolution operations on the second data feature of the node to map the second data feature of the node from the hyperbolic space to the tangent space of the reference point to obtain the third data feature of the node in the tangent space.

[0009] In a possible implementation, the number of layers of the multi-layer hyperbolic graph convolutional layer network is K, K ≥ 2; the feature vector obtained by performing a hyperbolic graph convolution operation on the data features of node u in the hyperbolic space through the k-th layer of the hyperbolic graph convolutional layer network is It is expressed as:

[0010]

[0011] Among them, 1≤k≤K, W represents the linear transformation matrix, AGG represents the aggregation function, σ represents the nonlinear activation function, c represents the hyperbolic curvature, r represents the reference point, represents a logarithmic mapping of a reference point r in the hyperbolic space;

[0012] The feature vector is obtained by performing K times of hyperbolic graph convolution operations on the data features of node u in the hyperbolic space through a K-layer hyperbolic graph convolution layer network It is expressed as:

[0013]

[0014] Among them, x u The eigenvector representing the first data feature of node u in the Euclidean space, for any two adjacent layers of hyperbolic graph convolutional layer networks, the exp operation of the first layer of the hyperbolic graph convolutional layer network and the log operation of the second layer of the hyperbolic graph convolutional layer network cancel each other out, and there is no explicit log operation and exp operation in the K-layer hyperbolic graph convolutional layer network, but in fact an equivalent hyperbolic graph convolution operation is performed in the tangent space.

[0015] In a possible implementation, determining the center vector of the node embedding center based on the feature vectors of the third data features of each of the multiple nodes includes: averaging the feature vectors of the third data features of each of the multiple nodes to obtain the center vector.

[0016] In one possible implementation, adjusting the feature vector of the third data feature of the node according to the center vector to align the node embedding center with the origin of the tangent space to obtain the feature vector of the fourth data feature of the node in the tangent space includes: determining a node embedding offset according to the center vector; subtracting the feature vector of the third data feature of the node from the node embedding offset to align the node embedding center with the origin of the tangent space to obtain the feature vector of the fourth data feature of the node in the tangent space.

[0017] In a possible implementation, for each node, mapping the first data feature of the node from the Euclidean space to the hyperbolic space to obtain the second data feature of the node in the hyperbolic space includes: for each node, using an exponential mapping to map the first data feature of the node from the Euclidean space to the hyperbolic space to obtain the second data feature of the node in the hyperbolic space; based on the feature vector of the fourth data feature, mapping the fourth data feature of the node from the tangent space to the hyperbolic space to obtain the feature vector of the fifth data feature of the node in the hyperbolic space includes: based on the feature vector of the fourth data feature, using an exponential mapping to map the fourth data feature from the tangent space to the hyperbolic space to obtain the feature vector of the fifth data feature of the node in the hyperbolic space.

[0018] In a possible implementation, the objective loss function is expressed as follows:

[0019]

[0020] Among them, L represents the target loss function, L task represents the task loss function, L reg represents the regularized loss function, β represents the hyperparameter for balancing task loss and regularized loss, V represents graph data, z u A feature vector representing the fifth data feature of the node u in the hyperbolic space.

[0021] In one possible implementation, the architecture of the classification model is any one of a convolutional neural network model architecture, an attention mechanism architecture, and a Transformer architecture.

[0022] In a second aspect, a model training device is provided, the model training device comprising:

[0023] An input module, used to input the first data feature of each node in the graph data into the classification model; wherein the graph data includes the first data features of multiple nodes in the Euclidean space and the node category labels of the multiple nodes respectively;

[0024] A first mapping module, configured to map, for each node, a first data feature of the node from the Euclidean space to a hyperbolic space to obtain a second data feature of the node in the hyperbolic space;

[0025] A second mapping module is used to perform multiple equivalent hyperbolic graph convolution operations on the second data feature of the node to map the second data feature of the node from the hyperbolic space to the tangent space of the reference point to obtain a third data feature of the node in the tangent space; wherein the graph convolution result of the first hyperbolic graph convolution operation in any two adjacent hyperbolic graph convolution operations is the input data of the second hyperbolic graph convolution operation;

[0026] A calculation module, used for determining a center vector of a node embedding center according to a feature vector of a third data feature of each of the plurality of nodes;

[0027] an alignment module, configured to adjust, for each node, a feature vector of a third data feature of the node according to the center vector, so as to align an embedding center of the node with an origin of the tangent space, and obtain a feature vector of a fourth data feature of the node in the tangent space;

[0028] A third mapping module, configured to map the fourth data feature of the node from the tangent space to the hyperbolic space based on the feature vector of the fourth data feature, to obtain a feature vector of the fifth data feature of the node in the hyperbolic space;

[0029] A training module is used to train the classification model according to the feature vector of the fifth data feature of the node, the node category label corresponding to the node and the target loss function; wherein the target loss function is constructed based on the task loss and the regularization loss.

[0030] In a third aspect, an electronic device is provided, comprising a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the electronic device executes the model training method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0031] In a fourth aspect, a computer program product is provided, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the model training method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0032] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the model training method in the above-mentioned first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A schematic flow chart of a model training method provided in an embodiment of the present application is shown;

[0034] Figure 2 A schematic diagram of a multi-layer hyperbolic graph convolutional layer network is shown;

[0035] Figure 3 A comparative schematic diagram of model training is shown;

[0036] Figure 4 A schematic diagram showing the performance comparison of various graph neural network models on small and medium graph datasets;

[0037] Figure 5 A schematic diagram showing the performance comparison of various graph neural network models on large graph datasets;

[0038] Figure 6 A schematic diagram of the structure of a model training device provided in an embodiment of the present application is shown;

[0039] Figure 7 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0040] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0041] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical data features indicated. Thus, a data feature defined as "first" or "second" may explicitly or implicitly include one or more of the data features.

[0042] Hierarchical graph data are widely present in various fields of applied science and engineering, so effective representation learning for such data has attracted widespread attention. In this context, hyperbolic geometry has become a powerful tool. Due to its exponential growth characteristics, hyperbolic space can naturally adapt to graph data with hierarchical structures. Based on the research on the successful integration of basic hyperbolic geometry operations into neural networks, a large number of methods using hyperbolic geometry have emerged and are widely used in many fields, including natural language processing, social networks, knowledge graphs, and computer vision. It is worth noting that the remarkable performance of hyperbolic graph neural networks in basic graph tasks such as node classification and link prediction further verifies the effectiveness of hyperbolic geometry in graph-based learning scenarios.

[0043] Although hyperbolic neural networks have made significant progress in the field of graph representation learning, there is a key limitation in their architectural design, which is that they often borrow the design ideas of graph neural networks in Euclidean space. Usually, the formulas of hyperbolic geometry are only applied at the module level, resulting in a network stacking multiple hyperbolic graph convolution layers based on hyperbolic modules. Although this design is effective to a certain extent, it significantly increases the computational overhead, thus limiting the efficiency and scalability of hyperbolic graph neural networks when processing large-scale graph data.

[0044] In existing practical applications, for example, the Transformer-based HypFormer method achieves efficient processing of large-scale graph data. The HypFormer method uses a linear hyperbolic attention mechanism to efficiently learn the hyperbolic representation of large-scale graphs. However, with limited computing resources (such as 24G memory resources), it is difficult to process graph data with millions of nodes.

[0045] The reasons why current hyperbolic graph neural network methods are difficult to handle large-scale graph data include the following aspects:

[0046] 1) The root cause lies in the lack of vector space structure in hyperbolic space: There is a lack of vector structure in hyperbolic space similar to that in Euclidean space, which complicates basic operations in convolutional layers (such as addition and multiplication).

[0047] 2) In order to overcome the problem of lack of vector space structure in hyperbolic space, there are two main solutions in the prior art, namely: The first solution is to use the gyro vector space method, which provides an algebraic framework for hyperbolic geometry, so that hyperbolic points can be represented as feature vectors in neural networks. The second solution is to map the neural network operation to the tangent space, which is the local Euclidean subspace of each hyperbolic point. By using logarithmic mapping and exponential mapping, the operations in the hyperbolic space are mapped to the tangent space, and then the hyperbolic space and the tangent space are converted through the push-forward and pull-back mechanisms. Although these methods can realize the neural network operations in hyperbolic geometry to a certain extent, they introduce significant computational overhead. Whether it is the Möbius operation in the gyro vector space or the push-forward or pull-back mapping in the tangent space, it will bring about a complex computational process. In addition, these methods may lead to numerical instability problems, especially when processing large-scale graph data, the computational efficiency will be greatly reduced, thereby limiting the scalability of hyperbolic neural networks.

[0048] Based on the problems existing in the above-mentioned related technologies, the present application provides a model training method, an electronic device and a computer-readable storage medium. The present application can solve the problem of hyperbolic representation learning on graph data with millions of nodes, and achieves that while maintaining the geometric advantages of the hyperbolic space, it can not only improve the processing efficiency of the model when processing large-scale graph data, but also improve the scalability of the model, so that the model can be widely used in practical scenarios.

[0049] The following is an embodiment of a model training method provided in this application specification.

[0050] The model training method provided in the embodiment of the present application is used to train a classification model, which is aimed at the recognition of node classification tasks in graph data. Nodes in graph data represent entities or objects, and edges in graph data represent the relationship between entities or objects. Nodes can be objects of any form, such as users in social networks, atoms in chemical substances, cities in transportation networks, and the like. Nodes in each application scenario have their specific meanings and attributes. Nodes usually carry certain feature information (also called data features), which can help people understand the node itself and its relationship with other nodes. For example, in a social network, the user's age, gender, interests, and hobbies can all be used as node features. In general, nodes are one of the most basic components in graph data. They are connected to each other through edges to form a complex network structure. By analyzing the nodes and their associated edges, many valuable information and rules can be mined.

[0051] The architecture of the classification model provided in the embodiment of the present application is any one of the convolutional neural network model architecture, the attention mechanism architecture and the Transformer architecture. The present application illustrates the architecture of the classification model as the convolutional neural network model architecture.

[0052] In the case where the architecture of the classification model is a convolutional neural network model architecture, the classification model proposed in the embodiment of the present application can be understood as a simplified hyperbolic graph neural network model, namely a simplified hyperbolic graph neural network model (Simplified Hyperbolic Graph Neural Networks, referred to as SHGNN). The proposed simplified hyperbolic graph neural network model is used to meet the challenge of efficient representation learning on graph data. The simplified hyperbolic graph neural network model is based on the graph signal denoising theory of hyperbolic space. Through a simplified hyperbolic message passing mechanism, it not only significantly improves the computational efficiency, but also maintains accurate expression capabilities, and is particularly suitable for graph data with a hierarchical structure.

[0053] The embodiment of the present application analyzes the design of a simplified hyperbolic graph neural network model through the aspects of the graph signal denoising perspective of message passing, the aspects of the generalization in the hyperbolic space, and the aspects of the simplification based on the tangent space and the hyperbolic message passing layer. The following is a description of the design analysis:

[0054] 1. Aspects of Graph Signal Denoising from the Perspective of Message Passing

[0055] The embodiment of the present application first analyzes the message passing mechanism of conventional graph neural networks (GNNs) from the perspective of graph signal denoising, and generalizes it to the hyperbolic embedding space. In conventional GNNs, the embedding (also called feature vector or embedding vector) representation of a node is updated recursively between layers, aiming to balance the smoothness of local node information and global neighborhood information. The general form of message passing can be expressed as:

[0056]

[0057] The simplified hyperbolic graph neural network model includes K layers of hyperbolic graph convolutional layer networks, K≤2, and in formula (1), A represents the feature vector obtained by performing a hyperbolic graph convolution operation on the data features of node u in the hyperbolic space through the k-th layer of the hyperbolic graph convolution network, uv represents the adjacency weight between node u and node v, and τ represents the fusion ratio of the control node's self-information and neighbor information.

[0058] By deduction, the above message passing mechanism can be equivalent to an optimization process for graph signal denoising, whose goal is to minimize the following loss function:

[0059]

[0060] In formula (2), ω is used to adjust the balance between local smoothness and global smoothness, and E represents the edge set in the graph data.

[0061] 2. Aspects of generalization in hyperbolic space

[0062] In order to process hierarchical graph data, the embodiment of the present application generalizes the graph signal denoising problem to the hyperbolic space. Unlike Euclidean space (also known as Euclidean space), the hyperbolic space provides geometric properties that are more suitable for processing graph data with hierarchical structures. On this basis, the embodiment of the present application proposes a hyperbolic graph propagation layer and its corresponding denoising target, which is expressed as:

[0063]

[0064] In formula (3), g B represents the metric of the hyperbolic space B.

[0065] 3. Tangent Space-Based Simplification and Hyperbolic Message Passing Layer Aspects

[0066] Considering that direct calculation in the hyperbolic space has certain complexity, the embodiment of the present application introduces a method of mapping the problem to the tangent space of the reference point r. In the tangent space, the familiar Euclidean method (such as gradient descent, convex optimization and other techniques) can be applied for optimization. After mapping, the denoising target can be simplified to the following formula (4):

[0067]

[0068] In formula (4), represents the logarithmic mapping of a reference point r in the hyperbolic space, which maps points in the hyperbolic space to the tangent space.

[0069] In the updating process of graph message passing, the embedding representation after logarithmic mapping (which can be understood as a feature vector) is updated by formula (5), which is shown as follows:

[0070]

[0071] Then, the result obtained by formula (5) is mapped from the tangent space to the hyperbolic space through exponential mapping. The formula used to map the result obtained by formula (5) from the tangent space to the hyperbolic space is formula (6), which is as follows:

[0072]

[0073] Based on the above theoretical analysis, the embodiment of the present application proposes a simplified hyperbolic graph convolutional network (SHGCN) based on the above design theory as a specific implementation of the above SHGNN model. The SHGCN model adopts the architecture of the traditional graph convolutional network. Through the above simplified hyperbolic message passing mechanism, it can improve the computational efficiency of graph data and the scalability of the model.

[0074] The training process of the classification model is described in detail below, where the classification model is specifically a SHGCN model. Figure 1 A schematic flow chart of a model training method provided in an embodiment of the present application is shown, such as Figure 1 As shown, the execution subject of the model training method provided in the embodiment of the present application is an electronic device with certain computing power, such as a computer, a server, etc. The above-mentioned model training method includes the following schemes:

[0075] S110: Input the first data feature of each node in the graph data into the classification model.

[0076] In an exemplary embodiment, the above graph data can be understood as sample data for training a classification model, and the graph data includes multiple nodes, edges between multiple nodes, data features of each of the multiple nodes, node category labels of each of the multiple nodes, and other information. Among them. The data feature of each node included in the graph data is called the first data feature, the node category label is used to represent the category of the node, and the data feature of each node in the graph data is in the Euclidean space, that is, the graph data includes the first data features of multiple nodes in the Euclidean space, and the first data feature of each node is represented by a feature matrix.

[0077] For ease of understanding and distinction, the present embodiment refers to each node in the graph data as a node Ni. After acquiring the graph data, the first data feature of the node Ni is input as an input feature into the classification model to start training the classification model.

[0078] S120: For each node, map the first data feature of the node from the Euclidean space to the hyperbolic space to obtain the second data feature of the node in the hyperbolic space.

[0079] After the first data feature of node Ni is input into the classification model, the classification model maps the first data feature of node Ni from Euclidean space to hyperbolic space, thereby obtaining the second data feature of node Ni in the hyperbolic space. The second data feature of node Ni in the hyperbolic space is represented by the feature vector of the second data feature.

[0080] In a possible implementation, the specific implementation process of S120 is: for each node Ni, an exponential mapping is used to map the first data feature of the node Ni from the Euclidean space to the hyperbolic space to obtain the second data feature of the node Ni in the hyperbolic space.

[0081] The exponential mapping used to map the first data feature of the node Ni from the Euclidean space to the hyperbolic space is, for example, the Riemann exponential mapping, and the feature vector z of the second data feature of the node Ni in the hyperbolic space is 0 Through formula (7), we get:

[0082]

[0083] Wherein, X represents the feature matrix of the first data feature of the node Ni.

[0084] S130: Perform K equivalent hyperbolic graph convolution operations on the second data feature of the node to map the second data feature of the node from the hyperbolic space to the tangent space of the reference point to obtain the third data feature of the node in the tangent space, K≥2, and the graph convolution result of the first hyperbolic graph convolution operation in any two adjacent hyperbolic graph convolution operations is the input data of the second hyperbolic graph convolution operation.

[0085] After obtaining the second data feature of the node Ni in the hyperbolic space, perform K equivalent hyperbolic graph convolution operations (i.e., hyperbolic convolution operations) on the second data feature of the node Ni to map the second data feature of the node Ni from the hyperbolic space to the tangent space of the reference point, thereby obtaining the third data feature of the node Ni in the tangent space. For example, K=5, perform the first hyperbolic graph convolution operation on the third data feature of the node Ni, obtain the first graph convolution result corresponding to the first hyperbolic graph convolution operation, and the first graph convolution result corresponding to the first hyperbolic graph convolution operation is used as the input data of the second hyperbolic graph convolution operation, and so on, the second graph convolution result corresponding to the second hyperbolic graph convolution operation is used as the input data of the third hyperbolic graph convolution operation, until the fourth graph convolution result corresponding to the fourth hyperbolic graph convolution operation is used as the input data of the fifth hyperbolic graph convolution operation, and the fifth graph convolution result corresponding to the fifth hyperbolic graph convolution operation is the third data feature of the node Ni in the tangent space.

[0086] In a possible implementation, the classification model includes K layers of hyperbolic graph convolutional network, and for any two adjacent layers of hyperbolic graph convolutional network in the K layers of hyperbolic graph convolutional network, the output end of the first layer of hyperbolic graph convolutional network in any two adjacent layers of hyperbolic graph convolutional network is connected to the input end of the second layer of hyperbolic graph convolutional network. Figure 2 As shown, Figure 2A schematic diagram of a multi-layer hyperbolic graph convolutional layer network is shown, where the output of the first layer of the hyperbolic graph convolutional layer network is connected to the input of the second layer of the hyperbolic graph convolutional layer network, the output of the second layer of the hyperbolic graph convolutional layer network is connected to the input of the third layer of the hyperbolic graph convolutional layer network, and so on, the output of the N-1th layer of the hyperbolic graph convolutional layer network is connected to the input of the Nth layer of the hyperbolic graph convolutional layer network.

[0087] The specific implementation process of S130 is: using a multi-layer hyperbolic graph convolution layer network, performing multiple equivalent hyperbolic graph convolution operations on the second data feature of the node, so as to map the second data feature of the node from the hyperbolic space to the tangent space of the reference point, and obtain the third data feature of the node in the tangent space.

[0088] like Figure 2 As shown, the second data feature of the node Ni in the hyperbolic space is input into the first layer of the hyperbolic graph convolution layer network, and the first layer of the hyperbolic graph convolution layer network performs a hyperbolic graph convolution operation on the second data feature of the node Ni to obtain the first graph convolution result corresponding to the first hyperbolic graph convolution operation. The first graph convolution result corresponding to the first hyperbolic graph convolution operation is input into the second layer of the hyperbolic graph convolution layer network, and the second layer of the hyperbolic graph convolution layer network performs a hyperbolic graph convolution operation on the first graph convolution result corresponding to the first hyperbolic graph convolution operation to obtain the second graph convolution result corresponding to the second hyperbolic graph convolution operation. By analogy, the Nth layer of the hyperbolic graph convolution layer network performs a hyperbolic graph convolution operation on the N-2th graph convolution result corresponding to the N-1th hyperbolic graph convolution operation to obtain the Nth graph convolution result corresponding to the Nth hyperbolic graph convolution operation. The Nth graph convolution result is the third data feature of the node Ni in the tangent space, thereby realizing message passing in the hyperbolic space. By stacking multiple layers of hyperbolic graph convolutional layer networks, higher-order data feature representations can be extracted layer by layer, and more complex graph structure information can be gradually learned, making the feature representation of the data features of the node Ni richer.

[0089] Specifically, the feature vector obtained by performing a hyperbolic graph convolution operation on the data features of node u in the hyperbolic space through the k-th layer of the hyperbolic graph convolution network is It is expressed as:

[0090]

[0091] Among them, 1≤k≤K, W represents the linear transformation matrix, AGG represents the aggregation function, σ represents the nonlinear activation function, c represents the hyperbolic curvature, r represents the reference point, represents the logarithmic mapping of the reference point r in the hyperbolic space;

[0092] The feature vector is obtained by performing K times of hyperbolic graph convolution operations on the data features of node u in the hyperbolic space through a K-layer hyperbolic graph convolution layer network It is expressed as:

[0093]

[0094] Among them, x u The eigenvector representing the first data feature of node u in Euclidean space, when node u is node Ni, That is, the characteristic vector of the third data feature of node Ni in the tangent space.

[0095] For any two adjacent layers of hyperbolic graph convolutional layer networks, the exp operation of the first layer of hyperbolic graph convolutional layer network (the previous layer of hyperbolic graph convolutional layer network) and the log operation of the second layer of hyperbolic graph convolutional layer network (the next layer of hyperbolic graph convolutional layer network) cancel each other out. There are no explicit log operations and exp operations in the K-layer hyperbolic graph convolutional layer network, but in fact an equivalent hyperbolic graph convolution operation is performed in the tangent space of the reference point r.

[0096] The exp operation of the previous hyperbolic graph convolutional layer network and the log operation of the next hyperbolic graph convolutional layer network cancel each other out:

[0097] In the hyperbolic graph convolution operation at the kth layer, the feature vector After the log operation, and then through W k Linear transformation and AGG aggregation operation, then through the σ nonlinear activation function, and finally through the exp operation to obtain the feature vector

[0098] In the hyperbolic graph convolution operation at the k+1th layer, the feature vector After the log operation, and then through W k+1 Linear transformation and AGG aggregation operation, then through the σ nonlinear activation function, and finally through the exp operation to obtain the feature vector

[0099] Offsetting process: In the hyperbolic graph convolution operation at layer k, the eigenvector eigenvector After the log operation, the exp operation is performed. These two operations are mathematically inverse to each other and can cancel each other out. Therefore, in the hyperbolic convolution operation of the k+1th layer, the feature vector After the log operation, the exp operation is performed. These two operations are mathematically inverse to each other, so they can cancel each other out.

[0100] Regarding the equivalent hyperbolic graph convolution operation: Since the exp operation and log operation of two adjacent layers cancel each other out, in fact, in a K-layer network, the feature vector calculation process can be simplified to the above formula (9). There is no explicit log operation and exp operation in formula (9), but in fact, an equivalent hyperbolic graph convolution operation is performed in the tangent space of the reference point r.

[0101] In the hyperbolic graph convolution operation of each layer, the feature vector undergoes linear transformation, aggregation and nonlinear activation function, and finally obtains a new feature vector through exp operation. Since the exp operation and log operation of two adjacent layers cancel each other out, the hyperbolic graph convolution operation of each layer can actually be simplified to a combination of linear transformation, aggregation and nonlinear activation function. This simplification process makes the network calculation more efficient while maintaining the feature representation capability in the hyperbolic space.

[0102] S140: Determine a center vector of the node embedding center according to the feature vectors of the third data features of each of the multiple nodes.

[0103] Based on the calculation method of calculating the third data feature of the computing node Ni in the tangent space, the third data features of each of the multiple nodes in the graph data in the tangent space can be obtained based on the calculation method of the third data feature of the computing node Ni in the tangent space.

[0104] After obtaining the third data features of each of the multiple nodes, the feature vectors of the third data features of each of the multiple nodes can be obtained, and then the center vector of the node embedding center is calculated through the feature vectors of the third data features of each of the multiple nodes. The center vector is expressed as

[0105] In one possible implementation, the center vector The calculation process includes: taking the average value of the feature vectors of the third data feature of multiple nodes to obtain the center vector

[0106]

[0107] in, The feature vector representing the third data feature of node u in the tangent space, when node u is node Ni, The feature vector representing the third data feature of node Ni in the tangent space.

[0108] S150: For each node, adjust the feature vector of the third data feature of the node according to the center vector to align the node embedding center with the origin of the tangent space, and obtain the feature vector of the fourth data feature of the node in the tangent space.

[0109] Get the center vector Then, according to the center vector Adjust the eigenvector of the third data feature of node Ni, that is, in the tangent space according to the center vector The characteristic vector of the third data feature of the node Ni is translated to align the node Ni with the node embedding center. After the translation, the characteristic vector of the third data feature of the node Ni is the characteristic vector of the fourth data feature of the node Ni in the tangent space.

[0110] In one possible implementation, S150 specifically includes: determining the node embedding offset h' based on the center vector, subtracting the feature vector of the third data feature of the node Ni from the node embedding offset h' to align the node embedding center with the origin of the tangent space, and obtaining the feature vector of the fourth data feature of the node Ni in the tangent space.

[0111]

[0112] In formula (11), α represents the offset parameter, The eigenvector representing the fourth data feature of node u in the tangent space, when node u is node Ni, The feature vector representing the fourth data feature of the node Ni in the tangent space.

[0113] S160: Based on the feature vector of the fourth data feature, map the fourth data feature of the node from the tangent space to the hyperbolic space to obtain the feature vector of the fifth data feature of the node in the hyperbolic space.

[0114] After obtaining the eigenvector of the fourth data feature of node Ni in the tangent space, the fourth data feature of node Ni is mapped from the tangent space to the hyperbolic space through the eigenvector of the fourth data feature of node Ni in the tangent space to obtain the eigenvector of the fifth data feature of node Ni in the hyperbolic space, thereby restoring and maintaining the original advantages of the hyperbolic space while ensuring the consistency and integrity of the processing process. This process can reduce the distortion of the hierarchical structure and ensure that the eigenvector in the hyperbolic space can better reflect the geometric structure of the graph.

[0115] In a possible implementation, S160 specifically includes: based on the feature vector of the fourth data feature, using exponential mapping to map the fourth data feature from the tangent space to the hyperbolic space, to obtain the feature vector of the fifth data feature of the node Ni in the hyperbolic space.

[0116]

[0117] In formula (12), The eigenvector representing the fifth data feature of node u in the hyperbolic space, when node u is node Ni, The eigenvector representing the fifth data feature of the node Ni in the hyperbolic space.

[0118] Through the above processing of S130-S160, the problem of hierarchical deviation in the hyperbolic space can be solved. By aligning the node embedding center with the origin of the tangent space, the consistency of the hierarchical information is ensured, the distortion of the hierarchical structure can be reduced, and the eigenvector in the hyperbolic space can better reflect the geometric structure of the graph.

[0119] S170: training a classification model according to a feature vector of a fifth data feature of the node, a node category label corresponding to the node, and a target loss function;

[0120] In order to improve the confidence of the feature vector, the embodiment of the present application introduces a hyperbolic regularization term to encourage the feature vector to move to the periphery of the hyperbolic sphere, thereby enhancing the model's ability to express the hierarchical structure, and constructs a target loss function through task loss and regularization loss. The target loss function is expressed as follows:

[0121]

[0122] Among them, L represents the target loss function, L task represents the task loss function, L reg represents the regularized loss function, β represents the hyperparameter for balancing task loss and regularized loss, V represents graph data, z u The eigenvector representing the fifth data feature of node u in the hyperbolic space. When node u is node Ni, z u The eigenvector representing the fifth data feature of the node Ni in the hyperbolic space.

[0123] By designing the target loss function through regularization, regularization can not only prevent the model from overfitting, but also guide the model to learn more meaningful feature vector representations (embedded representations), thereby improving the overall performance of the model.

[0124] After obtaining the feature vector of the fifth data feature of node Ni, the category classification result of node Ni output by the classification model can be obtained through the feature vector of the fifth data feature of node Ni, and then the difference between the category classification result of node Ni output by the classification model and the node category label corresponding to node Ni is calculated through the target loss function, and the classification model is continuously trained based on the difference until the classification model converges. After the classification model converges, the training of the classification model is stopped, that is, the training of the classification model is completed, and the trained classification model can be used for the recognition of node classification tasks in graph data.

[0125] like Figure 3-Figure 5 As shown, Figure 3 A comparative diagram of model training is shown. Figure 4 The figure shows the performance comparison of various graph neural network models on small and medium graph datasets. Figure 5A schematic diagram showing the performance comparison of various graph neural network models on large graph datasets.

[0126] like Figure 3 As shown, Figure 3 The training time and GPU (Graphics Processing Unit) memory usage of the classification model (SHGCN) of this application and the existing Hierarchical Graph Convolutional Networks (HGCN) are shown. Both the SHGCN model and the HGCN model use the hyperbolic mapping method. By comparison, Figure 3 From the left figure in , we can see that the training time of the HGCN model increases exponentially with the increase of the number of nodes; the training time of the SHGCN model also increases exponentially with the increase of the number of nodes, but the growth rate is slower than that of the HGCN model. It can be seen that the training time of the SHGCN model of the present application is shorter than that of the HGCN model. It can be seen that the SHGCN model of the present application has high computational efficiency. Figure 3 The left graph in the figure shows that the HGCN model increases GPU memory usage exponentially with the increase in the number of nodes; the SHGCN model also increases GPU memory usage exponentially with the increase in the number of nodes, but the growth rate is slower than the HGCN model. In contrast, the SHGCN model shows better scalability when the number of nodes increases. These results show that the SHGCN model of this application has better processing efficiency and lower resource consumption than the HGCN model when processing large-scale graph data.

[0127] like Figure 4 As shown, Figure 4 The comparison results of multiple graph neural network models, namely the convolutional neural network model architecture, the attention mechanism architecture and the Transformer architecture, are shown. Figure 4 The graph datasets involved in this paper are small and medium-sized datasets.

[0128] The graph neural network model of the convolutional neural network model architecture includes 6 models, namely the Multi-Layer Perceptron (MLP), Simplifying Graph Convolutional Network (SGC), Graph Convolutional Network (GCN), Lorentz Graph Convolutional Network (LGCN), Hyperbolic Graph Convolutional Network (HGCN) and the classification model (SHGCN) of this application. Through the comparison results of Group A data, it can be obtained that the accuracy of the MLP model, SGC model, GCN model, LGCN model, HGCN model and SHGCN model in predicting classification under the same small and medium-sized graph data set is the highest, that is, the model performance of the SHGCN model of this application is good, and it also has high accuracy when processing small and medium-sized graph data sets.

[0129] The graph neural network model of the attention mechanism architecture includes three models, namely the graph attention network model (Graph Attention Network, GAT), the hyperbolic graph attention network model (HGAT) and the classification model (SHGAT) of this application. Through the comparison results of Group B data, it can be obtained that the overall performance of the GAT model, HGAT model and SHGAT model in the same small and medium-sized graph data set predicts the classification accuracy. The SHGAT model predicts the classification accuracy is the highest, that is, the model performance of the SHGAT model of this application is good, and it also has high accuracy when processing small and medium-sized graph data sets.

[0130] The graph neural network model of the Transformer architecture includes three models, namely the Simplified Graph Transformer (SGFormer), the Hyperbolic Transformer (HypFormer) and the classification model (SHFormer) of this application. Through the comparison results of Group C data, it can be obtained that the SGFormer model, the HypFormer model and the SHFormer model each predict the classification accuracy under the same small and medium-sized graph data set. The SHFormer model has the highest accuracy in predicting classification, that is, the SHFormer model of this application has better model performance and also has higher accuracy when processing small and medium-sized graph data sets.

[0131] like Figure 5 As shown, Figure 5 The comparison results of multiple graph neural network models, which are convolutional neural network model architecture and Transformer architecture, are shown. Figure 5 The graph datasets involved in this paper are large datasets.

[0132] The graph neural network model of the convolutional neural network model architecture includes 6 models, namely the MLP model, SGC model, GCN model, LGCN model, HGCN model and SHGCN model. Through the comparison results of the D group of data, it can be obtained that the accuracy of the MLP model, SGC model, GCN model, LGCN model, HGCN model and SHGCN model in predicting classification under the same large graph data set is the highest, that is, the SHGCN model of the present application has better model performance and has higher accuracy when processing large graph data sets.

[0133] The graph neural network model of the Transformer architecture includes three models, namely the SGFormer model, the HypFormer model and the SHFormer model. Through the comparison results of the data in Group E, it can be obtained that the SGFormer model, the HypFormer model and the SHFormer model have the highest accuracy in predicting classification under the same large graph data set, that is, the SHFormer model of this application has better model performance and has higher accuracy when processing large graph data sets.

[0134] The embodiment of the present application trains the classification model by adopting the above-mentioned model training method, so that the classification model obtained by training has the following advantages:

[0135] 1. The classification model has high computational efficiency: By generalizing the traditional graph signal denoising problem to the hyperbolic space and introducing simplified calculations in the tangent space, this application greatly reduces the computational burden in message passing, which enables the model to maintain low computational complexity when processing large-scale graph data while also being able to effectively capture the hierarchical structure information of the graph data.

[0136] 2. The classification model has stronger representation capabilities: Hyperbolic space provides a natural geometric structure for hierarchical data. This application enhances the representation capabilities of complex graph structures through message passing and embedding updates in hyperbolic space. This has significant advantages for processing graph data with significant hierarchical structures (for example, social networks, knowledge graphs, etc.) and can better capture long-distance relationships between nodes.

[0137] 3. The classification model has high effectiveness and stability: The design of the classification model in this application is based on rigorous theoretical derivation, which closely combines graph signal denoising with optimization problems in hyperbolic space, fundamentally improving the effectiveness and stability of the model. This theory-driven model not only has a solid mathematical foundation, but also provides a strong guarantee for subsequent practical applications.

[0138] 4. The SHGNN model proposed in this application can not only be used in the traditional graph convolutional neural network architecture, but can also be extended to the attention mechanism and Transformer architecture. This versatility enables the SHGNN model to be widely used in different types of graph data tasks, greatly improving the practicality and scalability of the SHGNN model.

[0139] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0140] Figure 6 A schematic diagram of the structure of a model training device provided in an embodiment of the present application is shown. Figure 6 As shown, the model training device 400 includes:

[0141] An input module 610, configured to input a first data feature of each node in the graph data into a classification model; wherein the graph data includes the first data features of a plurality of nodes in the Euclidean space and node category labels of the plurality of nodes;

[0142] A first mapping module 620 is used for mapping, for each node, a first data feature of the node from the Euclidean space to a hyperbolic space to obtain a second data feature of the node in the hyperbolic space;

[0143] A second mapping module 630 is used to perform multiple equivalent hyperbolic graph convolution operations on the second data feature of the node to map the second data feature of the node from the hyperbolic space to the tangent space of the reference point to obtain a third data feature of the node in the tangent space; wherein the graph convolution result of the first hyperbolic graph convolution operation in any two adjacent hyperbolic graph convolution operations is the input data of the second hyperbolic graph convolution operation;

[0144] A calculation module 640, configured to determine a center vector of a node embedding center according to a feature vector of a third data feature of each of the plurality of nodes;

[0145] an alignment module 650, configured to adjust, for each node, a feature vector of the third data feature of the node according to the center vector, so as to align the embedding center of the node with the origin of the tangent space, and obtain a feature vector of the fourth data feature of the node in the tangent space;

[0146] A third mapping module 660, configured to map the fourth data feature of the node from the tangent space to the hyperbolic space based on the feature vector of the fourth data feature, to obtain a feature vector of the fifth data feature of the node in the hyperbolic space;

[0147] The training module 670 is used to train the classification model according to the feature vector of the fifth data feature of the node, the node category label corresponding to the node and the target loss function; wherein the target loss function is constructed based on the task loss and the regularization loss.

[0148] In one possible implementation, the classification model includes a multi-layer hyperbolic graph convolutional layer network, and for any two adjacent layers of the multi-layer hyperbolic graph convolutional layer network in the multi-layer hyperbolic graph convolutional layer network, the output end of the first layer of the hyperbolic graph convolutional layer network in the any two adjacent layers of the hyperbolic graph convolutional layer network is connected to the input end of the second layer of the hyperbolic graph convolutional layer network; the first mapping module 620 is specifically used to use the multi-layer hyperbolic graph convolutional layer network to perform multiple equivalent hyperbolic graph convolution operations on the second data feature of the node to map the second data feature of the node from the hyperbolic space to the tangent space of the reference point to obtain the third data feature of the node in the tangent space.

[0149] In a possible implementation, the number of layers of the multi-layer hyperbolic graph convolutional layer network is K, where K≥2;

[0150] The feature vector obtained by performing a hyperbolic graph convolution operation on the data features of node u in the hyperbolic space through the k-th hyperbolic graph convolution layer network It is expressed as:

[0151]

[0152] Among them, 1≤k≤K, W represents the linear transformation matrix, AGG represents the aggregation function, σ represents the nonlinear activation function, c represents the hyperbolic curvature, r represents the reference point, represents a logarithmic mapping of a reference point r in the hyperbolic space;

[0153] The feature vector is obtained by performing K times of hyperbolic graph convolution operations on the data features of node u in the hyperbolic space through a K-layer hyperbolic graph convolution layer network It is expressed as:

[0154]

[0155] Among them, x u The eigenvector representing the first data feature of node u in the Euclidean space, for any two adjacent layers of hyperbolic graph convolutional layer networks, the exp operation of the first layer of the hyperbolic graph convolutional layer network and the log operation of the second layer of the hyperbolic graph convolutional layer network cancel each other out, and there is no explicit log operation and exp operation in the K-layer hyperbolic graph convolutional layer network, but in fact an equivalent hyperbolic graph convolution operation is performed in the tangent space.

[0156] In a possible implementation, the calculation module 640 is specifically configured to calculate an average value of the feature vectors of the third data features of each of the multiple nodes to obtain the central vector.

[0157] In one possible implementation, the alignment module 650 is specifically used to determine the node embedding offset based on the center vector; subtract the feature vector of the third data feature of the node from the node embedding offset to align the node embedding center with the origin of the tangent space, and obtain the feature vector of the fourth data feature of the node in the tangent space.

[0158] In a possible implementation, the first mapping module 620 is specifically configured to map, for each node, a first data feature of the node from the Euclidean space to a hyperbolic space using an exponential mapping to obtain a second data feature of the node in the hyperbolic space.

[0159] The third mapping module 660 is specifically configured to map the fourth data feature from the tangent space to the hyperbolic space using exponential mapping based on the feature vector of the fourth data feature, so as to obtain the feature vector of the fifth data feature of the node in the hyperbolic space.

[0160] In a possible implementation, the objective loss function is expressed as follows:

[0161]

[0162] Among them, L represents the target loss function, L task represents the task loss function, L reg represents the regularized loss function, β represents the hyperparameter for balancing task loss and regularized loss, V represents graph data, z u A feature vector representing the fifth data feature of the node u in the hyperbolic space.

[0163] In one possible implementation, the architecture of the classification model is any one of a convolutional neural network model architecture, an attention mechanism architecture, and a Transformer architecture.

[0164] It should be noted that the model training device provided in the above embodiment only uses the division of the above functional modules as an example when executing the model training method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the model training device provided in the above embodiment belongs to the same concept as the model training method embodiment. Therefore, for details not disclosed in the device embodiment of the present application, please refer to the above-mentioned model training method embodiment of the present application, which will not be repeated here.

[0165] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0166] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. Figure 7 As shown, the electronic device 700 includes: a memory 701 and a processor 702, wherein the memory 701 stores an executable program code 7011, and the processor 702 is used to call and execute the executable program code 7011 to perform a model training method.

[0167] In this embodiment, the electronic device can be divided into functional modules according to the above method example. For example, each functional module can be corresponded to, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0168] In the case of dividing each functional module according to each function, the electronic device may include: an input module, a first mapping module, a second mapping module, a calculation module, an alignment module, a third mapping module, a training module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.

[0169] The electronic device provided in this embodiment is used to execute the above-mentioned model training method, and thus can achieve the same effect as the above-mentioned implementation method.

[0170] In the case of an integrated unit, the electronic device may include a processing module and a storage module. The processing module may be used to control and manage the actions of the electronic device. The storage module may be used to support the electronic device in executing related program codes and data.

[0171] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.

[0172] This embodiment also provides a computer-readable storage medium, which stores computer program code. When the computer program code runs on a computer, the computer executes the above-mentioned related method steps to implement a model training method in the above-mentioned embodiment.

[0173] This embodiment also provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the above-mentioned related steps to implement a model training method in the above-mentioned embodiment.

[0174] In addition, the electronic device provided in the embodiments of the present application may specifically be a chip, a component or a module, and the electronic device may include a connected processor and a memory; wherein the memory is used to store instructions, and when the electronic device is running, the processor may call and execute instructions so that the chip executes a model training method in the above-mentioned embodiments.

[0175] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding model training method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding model training method provided above, and will not be repeated here.

[0176] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0177] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some data features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0178] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A model training method, characterized in that: The model training method comprises: Inputting the first data feature of each node in the graph data into the classification model; wherein the graph data includes the first data features of multiple nodes in the Euclidean space and the node category labels of the multiple nodes respectively; For each node, mapping the first data feature of the node from the Euclidean space to the hyperbolic space to obtain a second data feature of the node in the hyperbolic space; Performing multiple equivalent hyperbolic graph convolution operations on the second data feature of the node to map the second data feature of the node from the hyperbolic space to the tangent space of the reference point to obtain a third data feature of the node in the tangent space; wherein the graph convolution result of the first hyperbolic graph convolution operation in any two adjacent hyperbolic graph convolution operations is the input data of the second hyperbolic graph convolution operation; Determine a center vector of a node embedding center according to a feature vector of a third data feature of each of the plurality of nodes; For each node, adjusting the feature vector of the third data feature of the node according to the center vector to align the embedding center of the node with the origin of the tangent space, thereby obtaining the feature vector of the fourth data feature of the node in the tangent space; Based on the feature vector of the fourth data feature, mapping the fourth data feature of the node from the tangent space to the hyperbolic space to obtain a feature vector of the fifth data feature of the node in the hyperbolic space; The classification model is trained according to the feature vector of the fifth data feature of the node, the node category label corresponding to the node and the target loss function; wherein the target loss function is constructed based on the task loss and the regularization loss.

2. The model training method according to claim 1, characterized in that: The classification model includes a multi-layer hyperbolic graph convolutional layer network, and for any two adjacent layers of the multi-layer hyperbolic graph convolutional layer network in the multi-layer hyperbolic graph convolutional layer network, the output end of the first layer of the hyperbolic graph convolutional layer network in the any two adjacent layers of the hyperbolic graph convolutional layer network is connected to the input end of the second layer of the hyperbolic graph convolutional layer network; The performing multiple equivalent hyperbolic graph convolution operations on the second data feature of the node to map the second data feature of the node from the hyperbolic space to the tangent space of the reference point to obtain the third data feature of the node in the tangent space includes: The multi-layer hyperbolic graph convolution layer network is used to perform multiple equivalent hyperbolic graph convolution operations on the second data feature of the node to map the second data feature of the node from the hyperbolic space to the tangent space of the reference point to obtain the third data feature of the node in the tangent space.

3. The model training method according to claim 2, characterized in that: The number of layers of the multi-layer hyperbolic graph convolutional layer network is K, K≥2; The feature vector obtained by performing a hyperbolic graph convolution operation on the data features of node u in the hyperbolic space through the k-th hyperbolic graph convolution layer network It is expressed as: Wherein, 1≤k≤K, W represents a linear transformation matrix, AGG represents an aggregation function, σ represents a nonlinear activation function, c represents a hyperbolic curvature, and r represents the reference point. represents a logarithmic mapping of a reference point r in the hyperbolic space; The feature vector is obtained by performing K times of hyperbolic graph convolution operations on the data features of node u in the hyperbolic space through a K-layer hyperbolic graph convolution layer network It is expressed as: Among them, x u The eigenvector representing the first data feature of node u in the Euclidean space, for any two adjacent layers of hyperbolic graph convolutional layer networks, the exp operation of the first layer of the hyperbolic graph convolutional layer network and the log operation of the second layer of the hyperbolic graph convolutional layer network cancel each other out, and there is no explicit log operation and exp operation in the K-layer hyperbolic graph convolutional layer network, but in fact an equivalent hyperbolic graph convolution operation is performed in the tangent space.

4. The model training method according to claim 1, characterized in that: Determining the center vector of the node embedding center according to the feature vectors of the third data features of each of the multiple nodes includes: The central vector is obtained by averaging the feature vectors of the third data features of the multiple nodes.

5. The model training method according to claim 1, characterized in that: The step of adjusting the feature vector of the third data feature of the node according to the center vector to align the embedding center of the node with the origin of the tangent space to obtain the feature vector of the fourth data feature of the node in the tangent space includes: Determining a node embedding offset according to the center vector; The feature vector of the third data feature of the node is subtracted from the node embedding offset to align the node embedding center with the origin of the tangent space to obtain the feature vector of the fourth data feature of the node in the tangent space.

6. The model training method according to claim 1, characterized in that: For each node, mapping the first data feature of the node from the Euclidean space to the hyperbolic space to obtain the second data feature of the node in the hyperbolic space includes: For each node, using exponential mapping to map the first data feature of the node from the Euclidean space to the hyperbolic space to obtain the second data feature of the node in the hyperbolic space; The mapping of the fourth data feature of the node from the tangent space to the hyperbolic space based on the feature vector of the fourth data feature to obtain the feature vector of the fifth data feature of the node in the hyperbolic space comprises: Based on the feature vector of the fourth data feature, the fourth data feature is mapped from the tangent space to the hyperbolic space using exponential mapping to obtain the feature vector of the fifth data feature of the node in the hyperbolic space.

7. The model training method according to any one of claims 1 to 6, characterized in that: The objective loss function is expressed as follows: Among them, L represents the target loss function, L task represents the task loss function, L reg represents the regularized loss function, β represents the hyperparameter for balancing task loss and regularized loss, V represents graph data, z u A feature vector representing the fifth data feature of the node u in the hyperbolic space.

8. The model training method according to any one of claims 1 to 6, characterized in that: The architecture of the classification model is any one of a convolutional neural network model architecture, an attention mechanism architecture, and a Transformer architecture.

9. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable program codes; A processor, used to call and run the executable program code from the memory, so that the electronic device executes the model training method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, it implements the model training method as described in any one of claims 1 to 8.

Citation Information

Cited By

  • End-to-end fusion method, device and equipment for atlas and large model, medium and product

    CN120744078A

  • Atlas and large model end-to-end fusion method, device, equipment, medium and product

    CN120744078B

  • Cross-modal alignment method and device fusing multivariate semantic embedding center

    CN121145115A