Graph neural network training method based on flexible diffusion convolution and related equipment

By introducing flexible diffusion convolution and label smoothing technologies into graph neural networks, the problem of poor performance of traditional graph neural networks in complex graph data prediction is solved, and higher prediction accuracy and model generalization capabilities are achieved.

CN119761446AActive Publication Date: 2025-04-04JILIN UNIVERSITY
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410879493.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2025-04-04
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

When traditional graph neural networks process complex graph data, it is difficult to fully capture relevant information, resulting in poor performance or poor model performance as expected. Especially in applications such as recommendation systems, low prediction accuracy is an urgent problem to be solved.

Method used

A graph neural network training method based on flexible diffusion convolution is proposed. By obtaining training graph data containing node labels, determining local structural features based on node degree information, using diffusion kernel functions to process these features, and combining with the label smoothing process, the prediction performance of graph neural network model is optimized.

Benefits of technology

It significantly improves the prediction performance of graph neural network models, enhances the accuracy of label prediction of complex graph data, improves the robustness and generalization ability of the model, reduces the tendency of overfitting, and shortens the model training time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119761446A_ABST
    Figure CN119761446A_ABST
Patent Text Reader

Abstract

The invention discloses a graph neural network training method based on flexible diffusion convolution and related equipment. The method comprises the following steps: acquiring training graph data containing node labels; determining a local structure feature of each node according to the node degree information of the training graph data; processing the local structure features by using a diffusion kernel function to obtain smooth features of each node; inputting the smooth features into a multi-layer perceptron to obtain a preliminary label value of each node, and performing label smoothing processing on the preliminary label value to obtain a predicted label value of each node; and updating parameters of the diffusion kernel function and the multi-layer perceptron based on the predicted label value and the node label until convergence or reaching a preset training round number. According to the method, the prediction performance of the graph neural network model can be optimized, the robustness and generalization are improved, and the tag prediction accuracy of complex graph data such as a recommendation system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of graph neural networks, and in particular to a graph neural network training method based on flexible diffusion convolution and related equipment. Background Art

[0002] With the rapid development of artificial intelligence (AI) technology, graph neural networks (GNNs) have become an important tool for processing complex relational data, which has broad and important research significance. GNNs can solve complex relational modeling problems. The data in many practical problems are presented in the form of graphs, such as recommendation systems, social networks, bioinformatics, and transportation networks. GNNs provide a powerful method for capturing and analyzing these complex relationships and structures. The effectiveness of GNNs is mainly due to the message passing paradigm, which involves iteratively aggregating information from surrounding nodes to the target node for global learning and reasoning. However, with the continuous increase in the scale and complexity of graph data, traditional graph neural networks often fail to fully capture relevant information, resulting in poor performance or model performance that is not as expected. Therefore, how to improve the prediction accuracy of complex graph data such as recommendation systems is an urgent problem to be solved. Summary of the invention

[0003] The embodiment of the present application provides a graph neural network training method based on flexible diffusion convolution and related equipment, which can optimize the prediction performance of the graph neural network model, improve robustness and generalization, and improve the accuracy of label prediction for complex graph data such as recommendation systems through flexible diffusion convolution and label smoothing process. The above technical solution is as follows:

[0004] In a first aspect, an embodiment of the present application provides a graph neural network training method based on flexible diffusion convolution; the method comprises:

[0005] Get the training graph data including node labels;

[0006] Determining the local structural features of each node according to the node degree information of the training graph data;

[0007] Processing the local structural features using a diffusion kernel function to obtain a smooth feature of each node;

[0008] Inputting the smoothed features into a multilayer perceptron to obtain a preliminary label value for each node, and obtaining a predicted label value for each node after processing the preliminary label value by label smoothing;

[0009] The parameters of the diffusion kernel function and the multilayer perceptron are updated based on the predicted label value and the node label until convergence or a predetermined number of training rounds is reached.

[0010] In a possible implementation, determining the local structural features of each node according to the node degree information of the training graph data includes:

[0011] Determine the number of hops of each node according to the node degree information of the training graph data;

[0012] Aggregate each node with its neighboring nodes of corresponding hop count to obtain the local structural features of each node;

[0013] The larger the degree of the node is, the smaller the corresponding hop number is.

[0014] In a possible implementation, the hop count of each node is determined according to the node degree information of the training graph data, and is calculated based on the following formula:

[0015]

[0016] in, is the hop count of node i; is the minimum value of hop count; is the maximum number of hops; degi is the degree of node i; deg max is the maximum degree among all nodes; deg min is the minimum degree among all nodes.

[0017] In a possible implementation, the aggregation process of each node and the neighboring nodes with the corresponding number of hops is calculated based on the following formula:

[0018]

[0019] in, is the local structural feature representation of node i at layer l+1; is the hop count of node i; is the normalized adjacency matrix; Hl is the feature matrix of all nodes in the lth layer; is the local structural feature representation of node i in layer l; α1 is the smoothing coefficient; k is the number of diffusion hops.

[0020] In a possible implementation, the local structural features are processed using a diffusion kernel function to obtain a smooth feature of each node, and the calculation process is based on the following formula:

[0021]

[0022] in, is the smoothed feature representation of node i at layer l+1; is the hop count of node i; λ is the diffusion coefficient; T is the transformation matrix; is the smooth feature representation of node i in layer l; k is the number of diffusion hops.

[0023] In a possible implementation, the predicted label value of each node is obtained after the preliminary label value is processed by label smoothing, and is calculated based on the following formula:

[0024]

[0025] in, is the predicted label value of node i; is the hop count of node i; is the normalized adjacency matrix; α2 is the smoothing coefficient; k is the number of diffusion jumps; is the initial label value of node i.

[0026] In a possible implementation, the method further includes:

[0027] The diffusion coefficient of the diffusion kernel function is updated by a two-layer optimization strategy; the two-layer optimization strategy includes:

[0028] By fixing the diffusion coefficient, minimizing the training loss on the training set to determine the optimal model weights of the multilayer perceptron;

[0029] Based on the optimal model weights, the validation loss is minimized on the validation set to determine the optimal diffusion coefficient.

[0030] In a second aspect, an embodiment of the present application provides a graph neural network training device based on flexible diffusion convolution, the device comprising:

[0031] The acquisition module is used to obtain the training graph data including node labels;

[0032] A flexible module, used for determining the local structural features of each node according to the node degree information of the training graph data;

[0033] A diffusion module, used for processing the local structural features using a diffusion kernel function to obtain a smooth feature of each node;

[0034] A label smoothing module, used for inputting the smoothed features into a multilayer perceptron to obtain a preliminary label value for each node, and obtaining a predicted label value for each node after processing the preliminary label value by label smoothing;

[0035] An updating module is used to update the parameters of the diffusion kernel function and the multilayer perceptron based on the predicted label value and the node label until convergence or a predetermined number of training rounds is reached.

[0036] In a possible implementation, the flexible module includes:

[0037] a hop count determination unit, configured to determine the hop count of each node according to the node degree information of the training graph data;

[0038] An aggregation processing unit, used for aggregating each node with neighboring nodes of corresponding hop counts to obtain local structural features of each node;

[0039] The larger the degree of the node is, the smaller the corresponding hop number is.

[0040] In a possible implementation, the hop count determination unit is specifically configured to calculate based on the following formula:

[0041]

[0042] in, is the hop count of node i; is the minimum value of the hop count; is the maximum number of hops; degi is the degree of node i; deg max is the maximum degree among all nodes; deg min is the minimum degree among all nodes.

[0043] In a possible implementation, the aggregation processing unit is specifically configured to calculate based on the following formula:

[0044]

[0045] in, is the local structural feature representation of node i at layer l+1; is the hop count of node i; is the normalized adjacency matrix; Hl is the feature matrix of all nodes in the lth layer; is the local structural feature representation of node i in layer l; α1 is the smoothing coefficient; k is the number of diffusion hops.

[0046] In a possible implementation, the diffusion module is specifically configured to calculate and process based on the following formula:

[0047]

[0048] in, is the smoothed feature representation of node i at layer l+1; is the hop count of node i; λ is the diffusion coefficient; T is the transformation matrix; is the smooth feature representation of node i in layer l; k is the number of diffusion hops.

[0049] In a possible implementation, the label smoothing module is specifically configured to calculate and process based on the following formula:

[0050]

[0051] in, is the predicted label value of node i; is the hop count of node i; is the normalized adjacency matrix; α2 is the smoothing coefficient; k is the number of diffusion jumps; is the initial label value of node i.

[0052] In a possible implementation, the device further includes:

[0053] An optimization module is used to update the diffusion coefficient of the diffusion kernel function through a two-layer optimization strategy; the two-layer optimization strategy includes:

[0054] By fixing the diffusion coefficient, minimizing the training loss on the training set to determine the optimal model weights of the multilayer perceptron;

[0055] Based on the optimal model weights, the validation loss is minimized on the validation set to determine the optimal diffusion coefficient.

[0056] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above method steps.

[0057] In a fourth aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores instructions, and the instructions are suitable for being loaded by a processor and executing the above method steps.

[0058] In one or more embodiments of the present application, training graph data containing node labels is obtained; local structural features of each node are determined according to the node degree information of the training graph data; the local structural features are processed by the diffusion kernel function to obtain the smooth features of each node; the smooth features are input into the multilayer perceptron to obtain the preliminary label value of each node, the predicted label value of each node is obtained after the preliminary label value is processed by label smoothing, and the diffusion kernel function and the multilayer perceptron parameters are updated based on the predicted label value and the node label until convergence or a predetermined number of training rounds is reached. The present application can significantly improve the prediction performance of the graph neural network model and improve the accuracy of label prediction for recommendation systems and other complex graph data. Through the reasonable aggregation local structure size designed based on node degree information and the continuously changing neighborhood radius achieved by the diffusion kernel, the present application effectively enhances the continuity of node representation and the integrity of information. This flexible neighborhood adjustment mechanism breaks through the limitation of fixed neighborhood size in traditional methods, allowing each node to adaptively adjust the scope of its information aggregation according to the diversity of its connections, thereby better handling noise and anomalies in graph data. In addition, by introducing the label smoothing process, this application further reduces the overconfidence and overfitting tendency of the model, enhances the robustness of the model to uncertain labels, and improves the overall prediction performance. Overall, this application effectively improves the applicability and generalization ability of the model on complex graph structure data and shortens the model training time by comprehensively using dynamic neighborhood size and diffusion convolution technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0060] Figure 1 A schematic diagram of a flow chart of a graph neural network training method based on flexible diffusion convolution provided in an embodiment of the present application;

[0061] Figure 2 A schematic diagram of a flow chart of another graph neural network training method based on flexible diffusion convolution provided in an embodiment of the present application;

[0062] Figure 3 Box plots showing the classification accuracy of different methods on multiple datasets;

[0063] Figure 4 A radar chart showing the classification accuracy of different methods using GCN, JKNet and ARMA as the backbone;

[0064] Figure 5A schematic diagram of the structure of a graph neural network training device based on flexible diffusion convolution provided in an embodiment of the present application;

[0065] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0066] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0067] In the description of the present application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0068] In recommendation systems, graph neural networks are widely used to model complex user-item relationships to improve the personalization and accuracy of recommendations. However, traditional graph neural networks often face some performance and accuracy challenges when dealing with recommendation system applications:

[0069] When the number of GNN layers increases, node features tend to be uniform, making it difficult to distinguish between different nodes, thereby reducing the personalization and accuracy of recommendations. This phenomenon is called oversmoothing, because the information transmission of each layer causes the features to spread widely in the graph, making the features of remote nodes similar.

[0070] Most traditional GNNs use a fixed neighborhood size to aggregate information, which ignores the differences in connection density between nodes. For nodes with high degree (number of connections), a fixed neighborhood size may lead to information overload, while for nodes with low degree, it may lead to insufficient information.

[0071] In recommender systems, the nature of interactions between users and items may be diverse, and traditional GNNs often have difficulty in effectively capturing this heterogeneity because they usually assume that all types of edges and nodes are homogeneous.

[0072] To solve the above problems, the present application proposes a graph neural network training method based on flexible diffusion convolution, which can be implemented by a computer program and can be run on a graph neural network training device based on the von Neumann system. The computer program can be integrated into the application or run as an independent tool application. Among them, the graph neural network training device in the embodiment of the present application can be a terminal device, including but not limited to: a personal computer, a tablet computer, a handheld device, a vehicle-mounted device, a wearable device, a computing device or other processing device connected to a wireless modem. In different networks, terminal devices can be called different names, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, cellular phone, cordless phone, 5G network or terminal device in future evolution network, etc. The graph neural network label prediction device can also be a server, which can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, distribution networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms. The graph neural network training device can also be a system composed of servers and terminal devices. It is specifically determined based on the actual application environment, and the embodiments of this application are not limited to this.

[0073] The graph neural network training method based on flexible diffusion convolution obtains the graph data to be processed; determines the local structural features of each node according to the node degree information of the graph data; processes the local structural features using the diffusion kernel function to obtain the smooth features of each node; inputs the smooth features into the multilayer perceptron to obtain the preliminary label value of each node, obtains the predicted label value of each node after processing the preliminary label value by label smoothing, and updates the diffusion kernel function and the multilayer perceptron parameters based on the predicted label value and the node label until convergence or a predetermined number of training rounds is reached. The method can significantly improve the prediction performance of the graph neural network model and improve the accuracy of label prediction for recommendation systems and other complex graph data. Through the reasonable aggregation local structure size designed based on the node degree information and the continuously changing neighborhood radius realized by the diffusion kernel, the method effectively enhances the continuity of node representation and the integrity of information. This flexible neighborhood adjustment mechanism breaks through the limitation of fixed neighborhood size in traditional methods, allowing each node to adaptively adjust the scope of its information aggregation according to the diversity of its connections, so as to better handle noise and anomalies in graph data. In addition, by introducing the label smoothing process, this method further reduces the overconfidence and overfitting tendency of the model, enhances the robustness of the model to uncertain labels, and improves the overall prediction performance. Overall, this method effectively improves the applicability and generalization ability of the model on complex graph structure data and shortens the model training time by comprehensively using dynamic neighborhood size and diffusion convolution technology.

[0074] The present application is described in detail below with reference to specific embodiments.

[0075] Figure 1 A flowchart of a graph neural network training method based on flexible diffusion convolution provided in an embodiment of the present application. Figure 1 As shown, the electronic device is used as the execution subject for introduction, and the method includes the following steps:

[0076] S101, obtaining training graph data including node labels.

[0077] Specifically, the training graph data can be the same-matched graph data, different-matched graph data, and can come from different application scenarios. These training graph data can represent various relationships and connections. In graph neural networks, graph data usually contains nodes and edges, where nodes represent entities and edges represent relationships between entities. The training graph data can be one or more groups of graph data such as recommendation system data, social network data, bioinformatics data, transportation network data, knowledge graph data, financial network data, telecommunications network data, and Internet data, to solve the problem of low prediction accuracy of traditional graph neural networks in different application scenarios and improve the performance and generalization ability of the model. Node labels are labels used in graph data to identify the category or feature to which each node belongs. In different application scenarios, the specific meaning and use of node labels may vary.

[0078] Exemplarily, the training graph data may be e-commerce recommendation system data, where nodes represent users and items, and edges represent user behaviors on items (such as user User123 clicks, purchases, or reviews item Item456). User nodes may have node labels such as age, gender, and interests; item nodes may have node labels such as price, category, and rating.

[0079] The training graph data can be urban traffic network data, where nodes represent traffic nodes (such as intersection A and bus stop B), edges represent traffic routes (such as there is a bus route connecting intersection A and bus stop B), and traffic nodes can have node labels such as location and type (intersection, station).

[0080] S102, determining the local structural features of each node according to the node degree information of the training graph data.

[0081] Specifically, the local structural features of each node, that is, the neighborhood range of each node and the information that needs to be aggregated, are determined based on the node degree information (the number of connections of the node) of the training graph data.

[0082] In some embodiments, determining the local structural features of each node based on the node degree information of the training graph data includes: determining the number of hops of each node based on the node degree information of the training graph data; aggregating each node with neighboring nodes of the corresponding number of hops to obtain the local structural features of each node.

[0083] This embodiment flexibly allocates aggregated neighbor nodes of different hop counts to the node according to the node's degree, thereby avoiding the process of aggregating neighbor nodes with a fixed hop count, which causes the node's embedded representation information to be insufficient or too smooth. The node's information can also be enhanced by aggregating the node with its neighbor nodes of the corresponding hop count.

[0084] In this embodiment, the node degree refers to the number of edges connected to each node. In graph data, the degree of each node can represent the connection strength of the node. For each node, the number of directly connected neighboring nodes can be counted. For example, for a node A, if it is directly connected to 4 other nodes, then the degree of node A is 4.

[0085] The number of hops represents the neighborhood range around the node, that is, the size of the local structure of the node, and is usually used to determine the number of neighbor nodes that need to be considered in the feature aggregation process. In this embodiment, the number of hops corresponding to the node is not fixed, but dynamically adjusted according to the degree of the node. Nodes with lower degrees are assigned neighbor nodes with larger hops to expand the neighborhood range of the node, thereby making up for the lack of neighbor information in the aggregation process; nodes with higher degrees are assigned neighbor nodes with smaller hops to narrow the neighborhood range to avoid over-smoothing. That is, the larger the degree of the node, the smaller the corresponding hop number, and the smaller the degree of the node, the larger the corresponding hop number.

[0086] According to the determined number of hops, the corresponding range of neighbor nodes is selected for each node. In the subsequent feature extraction process, the information of these neighbor nodes will be aggregated to the central node, enhancing the node information and obtaining local structural features.

[0087] In some embodiments, the hop count of each node is determined based on the node degree information of the training graph data, and is calculated based on the following formula (1):

[0088]

[0089] Formula (1) is used in this embodiment to determine the (normalized) hop count of each node: That is, the size of the local structure (neighborhood range) of each node. is the (normalized) hop count of node i, indicating the size of the local structure of the node; is the minimum value of the number of hops (within the normalized range); is the maximum value of the number of hops (within the normalized range); deg i is the degree of node i, that is, the number of connections of the node; degrma x is the maximum degree of all nodes in the graph; n is the minimum degree among all nodes in the graph.

[0090] Specifically, the calculation method is to use the minimum value Plus a range adjustment term, the adjustment term is Multiply by an adjustment factor.

[0091] The adjustment factor is:

[0092] The adjustment factor determines how the specific value of the hop count is adjusted as the node degree changes. i +1) means taking the logarithm of the degree of node i and adding 1 to smooth the influence of the degree; the numerator log(degma x +1)-log(deg i +1) represents the logarithmic difference between the current node degree and the maximum degree; the denominator log(degma x +1)-log(degmi n +1) represents the logarithmic difference between the maximum degree and the minimum degree.

[0093] Nodes with high degrees have more connections and their hop count is will be close to That is, the domain is small to avoid excessive information aggregation. Nodes with low degrees have fewer connections and their hop count is will be close to That is, the domain is large to ensure sufficient information aggregation. In the graph neural network, the use of formula (1) can ensure that nodes of different degrees have an appropriate neighborhood range during the feature aggregation process, thereby improving the generalization ability and prediction performance of the model. By dynamically adjusting the number of hops, the degree of information aggregation can be effectively balanced to avoid the problem of over-smoothing or insufficient information.

[0094] In some embodiments, the aggregation process of each node and the neighboring nodes with the corresponding number of hops is calculated based on the following formula:

[0095]

[0096] Formula (2) is used in this embodiment to update node features in the graph neural network by aggregating the information of each node's neighbor nodes to generate new node features, that is, the local structural features of the node. is the local structural feature representation of node i at the l+1th layer (after the l+1th iteration); is the hop count of node i, indicating the size of the local structure, which can be calculated by formula (1); is the normalized adjacency matrix; Hl is the feature matrix of all nodes in the lth layer, which can be calculated from the local structural features of all nodes in the lth layer; is the local structural feature representation of node i in layer l; α1 is the smoothing coefficient, which is used to balance the neighborhood information and the node’s own characteristics; k is the number of diffusion hops, indicating the number of layers or depth of feature propagation.

[0097] Specifically, the normalized adjacency matrix is the symmetric normalization of the adjacency matrix A, that is:

[0098]

[0099] Among them, A is the original adjacency matrix, which represents the connection relationship between nodes in the graph; I is the unit matrix, which is used to add self-connection in the adjacency matrix, that is, the connection between each node and itself; is the diagonal matrix, That means the degree of each node is increased by 1. The normalized adjacency matrix can balance the influence between different nodes, making the weight in the information transmission process more reasonable and preventing high-degree nodes from excessively affecting neighboring nodes.

[0100] In this embodiment, the node feature can be updated by formula (2), and the information of neighbor nodes is combined with the node's own features to generate a new node feature representation. The smoothing coefficient α is used to balance the aggregated information of neighbor nodes and the node's own features to prevent the features from being over-smoothed or lacking information.

[0101] Specifically, for each node i, according to the neighborhood range Aggregate features from its neighboring nodes within k hops; use normalized adjacency matrix and the l-th layer feature matrix H l ,calculate Use the smoothing coefficient α1 to weight the aggregated neighbor features and node features; for each hop number k, calculate the weighted feature Normalize the weighted features, calculate the average value, and get the new node feature representation That is, the local structural characteristics of the node.

[0102] In the graph neural network, this formula (2) is used to dynamically adjust the neighborhood range and balance the neighbor features and the node features itself, thus achieving effective update and aggregation of node features in the graph neural network. This method can capture and analyze complex relationships and structures in the training graph data, improving the prediction performance and generalization ability of the model.

[0103] S103, using the diffusion kernel function to process the local structural features to obtain the smoothing features of each node.

[0104] Specifically, the local structural features of the node are processed by the diffusion kernel function to generate smooth node features. This method can capture and integrate neighborhood information, making the node features more stable and accurate. The diffusion kernel function plays the role of feature propagation and aggregation here, and realizes the smoothing of node features by simulating the physical diffusion process.

[0105] In some embodiments, the use of the diffusion kernel function to process the local structural features to obtain the smoothing features of each node is calculated based on the following formula:

[0106]

[0107] in, is the smoothed feature representation of node i at the l+1th layer (after the l+1th iteration); is the number of hops of node i, indicating the size of the local structure, which can be calculated by formula (1); λ is the diffusion coefficient, which controls the intensity of the diffusion process and is a learnable parameter in the network. A dedicated propagation neighborhood can be learned for each layer and feature channel; T is the transformation matrix, which can be the adjacency matrix of the graph or its normalized form; is the smooth feature representation of node i at layer l, where H 0 is the initial input feature matrix, which can be obtained by the output after aggregation processing of formula (2); k is the number of diffusion hops, indicating the number of layers or depth of feature propagation.

[0108] In this embodiment, the concept of diffusion equation is introduced on the graph, and it is believed that this continuous GNN can consider the information transfer between neighbors. To achieve this, we use the tools of differential geometry to generalize the definition of gradient and divergence to the graph.

[0109] Assumptions and So the gradient of the graph is defined as Here, it is assumed that the edges are antisymmetric, that is, The divergence of a graph is defined as the inverse of the graph gradient, i.e.

[0110] The Laplace matrix is ​​expressed as L = DA. According to the defined discrete gradient and divergence operators, the diffusion process in the figure can be obtained as follows:

[0111]

[0112] Among them, ξ ij (t) is the diffusion coefficient, usually a scalar value. In some special diffusion cases, ξ ij (t) is set to 1, which makes this process equivalent to So this process is also called Laplace smoothing. The differential equation can be solved using the diffusion kernel, that is, H(t) = e -Lt H(0). The diffusion kernel uses the exponential function of the Laplace matrix to describe the similarity and distance between nodes. During the calculation process, the Laplace matrix needs to be symmetric normalized, that is, And make Thus, the diffusion kernel used in the figure can be expressed as H(t) = e -(I-T)t H(0). Then, Taylor expansion is used to obtain an explicit polynomial approximation of the diffusion kernel, which is expressed as follows:

[0113]

[0114] In order to reduce the complexity, the k-th order truncation is used to approximate the convolution kernel, as shown in formula (3).

[0115] S104, inputting the smoothed features into a multilayer perceptron to obtain a preliminary label value for each node, and obtaining a predicted label value for each node after processing the preliminary label value through label smoothing.

[0116] Specifically, the smooth features obtained by processing the local structural features with the diffusion kernel function are used as input and passed to the multilayer perceptron (MLP) to generate preliminary label values ​​for each node. The multilayer perceptron is a feedforward neural network that contains multiple hidden layers, each layer consists of multiple neurons, and has a nonlinear activation function. Label smoothing is used to prevent the model from overfitting the training data and improve the generalization ability of the model. Label smoothing is to allocate part of the probability mass from the true label to other categories, making the model's prediction smoother and more robust.

[0117] In some embodiments, the predicted label value of each node is obtained after the preliminary label value is processed by label smoothing, and is calculated based on the following formula:

[0118]

[0119] in, is the predicted label value of node i; is the hop count of node i; is the normalized adjacency matrix; α2 is the smoothing coefficient; k is the number of diffusion jumps; is the initial label value of node i.

[0120] Specifically, Represents the diffusion of the initial label value of node i on the k-hop neighboring nodes, using the normalized adjacency matrix Through multiple jumps, the information of neighbor nodes is diffused to the central node i, which represents the label propagation process. The initial label value of node i is retained The smoothing coefficient α2 is used to control the weight of the own label to ensure that the node's own label information is not completely ignored during the smoothing process. Combining label diffusion and self-label, a smoother label representation is obtained through weighted averaging. (1-α2) and α2 are used as two weight parameters to balance the contribution of neighbor labels and self-label. Finally, the weighted averaged labels are normalized to ensure that the final predicted label value is within a reasonable range. Normalization coefficient Used to standardize the predicted label value of node i to make the range of label value more reasonable.

[0121] Through the above method, the preliminary label value can be smoothed, and the information of neighbor nodes and its own label information can be combined to obtain a smoother and more robust predicted label value. This processing method helps to improve the generalization ability of the model and reduce overfitting.

[0122] S105, updating the parameters of the diffusion kernel function and the multilayer perceptron based on the predicted label value and the node label until convergence or reaching a predetermined number of training rounds.

[0123] Specifically, through back propagation and optimization algorithms, the parameters of the model are continuously updated to minimize the loss between the predicted label value and the true label value, and finally the model with the best performance is obtained.

[0124] Exemplarily, this step may include defining a loss function for measuring the difference between the model predicted label value and the true label value. Commonly used loss functions include mean square error (MSE), cross entropy loss, etc. The gradient information of the loss function to the model parameters is calculated by the chain rule, such as calculating the partial derivatives of the loss function to the diffusion kernel function parameters and the multi-layer perceptron (MLP) parameters. An optimization algorithm is selected to update the parameters of the graph neural network model (such as updating the parameters of the diffusion kernel function and the multi-layer perceptron) according to the gradient information, so that the loss function is gradually reduced. Commonly used optimization algorithms include stochastic gradient descent (SGD), Adam, etc. In each training iteration, forward propagation, loss calculation, back propagation and parameter update are repeated until the model converges or a predetermined number of training rounds is reached.

[0125] This training process ensures that the graph neural network model can effectively learn the complex relationships and patterns in the training graph data, thereby achieving high-accuracy label prediction in various application scenarios.

[0126] In some embodiments, the diffusion coefficient of the diffusion kernel function is updated by a two-layer optimization strategy; the two-layer optimization strategy includes:

[0127] By fixing the diffusion coefficient, the training loss is minimized on the training set to determine the optimal model weights of the multilayer perceptron;

[0128] Based on the best model weights, the validation loss is minimized on the validation set to determine the optimal diffusion coefficient.

[0129] Specifically, the diffusion convolution in the embodiment of the present application is a technology that can use the diffusion kernel function instead of the discrete feature aggregation function used by GNN. The embodiment of the present application also provides a flexible local structure selection method that takes into account the changes in the neighbor radius between different nodes and layers. The method uses the diffusion kernel function to continuously transform the adjacency matrix based on the node degree. This method can eliminate the need to manually adjust the neighbor radius and update the kernel radius through the gradient descent method to achieve the optimal prediction accuracy.

[0130] In order to prevent overfitting of the model, this embodiment proposes a two-layer optimization strategy to help the graph neural network model achieve better performance. Specifically, first fix the diffusion coefficient λ, train the model weight w of the graph neural network model on the training set, and determine the optimal model weight w* after minimizing the training loss. Then, using the optimal model weight w*, determine the optimal kernel radius, that is, the optimal diffusion coefficient λ*, by finding the minimum validation loss on the validation set. The expression of the two-layer optimization strategy is as follows:

[0131]

[0132] In order to find the best diffusion coefficient λ*, before each iteration to update the search for λ, it is necessary to find the optimal convergence value of w, which adds significant complexity to the entire model training process. In some embodiments, inspired by Neural Architecture Search (NAS) and gradient-based hyperparameter optimization (by optimizing the model structure or hyperparameters simultaneously during the training process), this embodiment can use an approximate method to simultaneously update the diffusion coefficient λ each time the model weight w is updated (using a gradient-based method to calculate the gradient of the loss function to the diffusion coefficient λ, and update λ based on the gradient). At each iteration, the model weight w and the diffusion coefficient λ are updated simultaneously, which can reduce the time consumption caused by the two-stage optimization and shorten the model training time.

[0133] Please refer to the following Figure 2 , Figure 2 A flowchart of a graph neural network training method based on flexible diffusion convolution provided in an embodiment of the present application. Figure 2 As shown in the figure, the method is introduced by taking the electronic device as the execution subject and the graph neural network for optimizing the recommendation system as an example. The method includes the following steps:

[0134] (a) Input graph data

[0135] In the input graph data, each node represents an entity, and each edge represents the relationship between entities. For example, in a recommendation system, a node can represent a user or an item, and an edge represents the interaction between a user and an item (such as click, purchase, rating, etc.). The graph data of the recommendation system can contain the interaction relationship between users and items. Through this relationship graph, the model can capture the user's interest preferences and the relevance of items.

[0136] (b) Flexible Module

[0137] The flexible module assigns different local structure sizes (receptive fields) to each node based on the node degree information of the graph data. Nodes with higher node degrees (such as node 1) will receive smaller receptive fields, while nodes with lower node degrees (such as node 2) will receive larger receptive fields. Figure 2 As shown in (b), the local structure hop number assigned to the node with a node degree of 1 is 4 (orange part), the local structure hop number assigned to the node with a node degree of 2 is 3 (purple part), the local structure hop number assigned to the node with a node degree of 4 is 1 (blue part), and the local structure hop number assigned to the node with a node degree of 3 is 2 (green part).

[0138] For example, in a recommendation system, different users have different levels of activity. Users with higher node degrees may be active users, and the model assigns them a smaller receptive field to avoid over-smoothing. Users with lower node degrees may be cold-start users, and the model assigns them a larger receptive field to obtain more neighborhood information.

[0139] (c) Diffusion Module

[0140] The diffusion module uses the diffusion kernel function to process the local structural features and obtain the smooth features of each node. The figure shows the processing process with different diffusion steps k. The diffusion coefficient λ controls the intensity of the diffusion process. Figure 2 As shown in (c) of the figure, the diffusion process from k = 1 to k = 4 is shown. The information of a node is gradually diffused to its neighboring nodes and aggregated according to the weight of the diffusion kernel function. Each step corresponds to a diffusion level, and the information is propagated and aggregated layer by layer.

[0141] For example, through the diffusion kernel function, the recommendation system can propagate feature information between users and items, thereby capturing richer user preferences and item features. For example, the features of user 1 can be propagated to items with which the user interacts through the diffusion process, thereby improving the accuracy of recommendations.

[0142] (d) Label Smoothing

[0143] The smoothed features are input into the multilayer perceptron to obtain the preliminary label value of each node. Label smoothing smoothes the preliminary label value to obtain the final predicted label value. Through label smoothing, part of the probability mass is allocated from the true label to other categories, reducing the overfitting of the model to the training data, improving the generalization ability of the prediction, and making the model's prediction smoother and more robust.

[0144] For example, label smoothing in a recommendation system can prevent the model from overfitting to the noise in the training data. For example, for user rating prediction, label smoothing can make the model more cautious in prediction, thereby improving generalization ability.

[0145] In each training iteration, the above steps are repeatedly performed, as well as forward propagation, loss calculation, backpropagation, and parameter update until the model converges or reaches the predetermined number of training rounds.

[0146] Next, experiments are conducted to verify the performance optimization effect of the graph neural network training method based on flexible diffusion convolution provided in the embodiment of the present application on the graph neural network model.

[0147] In the experiment, the experimental results are recorded by running the experiment 100 times. Figure 3 As shown in the figure, the classification accuracy performance of different methods on multiple data sets is shown. Each sub-graph represents a data set, and each sub-graph shows the accuracy distribution of different methods on the data set.

[0148] The datasets include:

[0149] CORA: A dataset of academic paper citation networks.

[0150] CITESEER: A dataset of academic paper citation networks.

[0151] PUBMED: The Biomedical Literature Citation Network Dataset.

[0152] AMZ COMP: A dataset of user reviews of Amazon computer products.

[0153] AMZ PHOTO: A dataset of user reviews of Amazon photo products.

[0154] COAUTHOR CS: A co-authorship network dataset in computer science.

[0155] CORNELL: Cornell University web link dataset.

[0156] TEXAS: A web link dataset from the University of Texas.

[0157] WISCONSIN: Web link dataset from the University of Wisconsin.

[0158] Diffusion methods include:

[0159] Flexi-DC: A method based on flexible diffuse convolution proposed in an embodiment of the present application.

[0160] GDC: Generalized Graph Diffusion Method.

[0161] ADC: Adaptive Diffused Convolution method.

[0162] None: No diffusion method was used, serving as the control group.

[0163] Graph neural networks include:

[0164] GCN: Graph Convolutional Network.

[0165] JKNet: Skip-connected graph neural networks.

[0166] ARMA: Autoregressive Moving Average Filter Graph Neural Networks.

[0167] according to Figure 3 It can be seen that in most data sets, the accuracy of the Flexi-DC method provided in the embodiments of the present application is significantly higher than that of other methods. The accuracy of the GDC and ADC methods is generally better than that of the control group (None) that does not use any diffusion method, but is generally not as stable as the Flexi-DC method.

[0168] like Figure 4 As shown, the accuracy of node classification of different comparison frameworks of different methods with GCN, JKNet and ARMA as the skeleton is demonstrated. The experimental results of the Flexi-DC method proposed in the embodiment of the present application are basically better than the experimental results of the comparison algorithm, which indicates that the method proposed in the embodiment of the present application is robust and generalizable to different types of problems.

[0169] In order to solve the problem of low accuracy of label prediction of recommended system graph data in the prior art, the present application also provides a method for predicting label of recommended system graph data to improve the accuracy of label prediction of recommended system graph data. With electronic equipment as the execution subject, the method includes:

[0170] Obtain the graph data of the recommendation system, input the graph data into the trained graph neural network, and obtain the recommended label of each node of the recommendation system.

[0171] Specifically, the local structural features of each node are determined based on the node degree information of the graph data of the recommendation system;

[0172] The diffusion kernel function is used to process the local structural features to obtain the smooth features of each node;

[0173] The smooth features are input into the multilayer perceptron to obtain the label value of each node, that is, the recommended label of each node is obtained.

[0174] Among them, graph neural network is based on Figure 1 The graph neural network training method based on flexible diffusion convolution is shown. The specific prediction process corresponds to the training process and will not be repeated here.

[0175] Please refer to the following Figure 5 , Figure 5 A graph neural network training device based on flexible diffusion convolution is provided as an exemplary embodiment of the present application. Figure 5 As shown, the device 500 includes:

[0176] An acquisition module 510 is used to acquire training graph data including node labels;

[0177] A flexible module 520, configured to determine a local structural feature of each node according to the node degree information of the training graph data;

[0178] A diffusion module 530, used for processing the local structural features using a diffusion kernel function to obtain a smooth feature of each node;

[0179] A label smoothing module 540 is used to input the smoothed features into a multilayer perceptron to obtain a preliminary label value for each node, and obtain a predicted label value for each node after processing the preliminary label value through label smoothing;

[0180] The updating module 550 is used to update the parameters of the diffusion kernel function and the multilayer perceptron based on the predicted label value and the node label until convergence or a predetermined number of training rounds is reached.

[0181] In a possible implementation, the flexible module 520 includes:

[0182] a hop count determination unit, configured to determine the hop count of each node according to the node degree information of the training graph data;

[0183] An aggregation processing unit, used for aggregating each node with neighboring nodes of corresponding hop counts to obtain local structural features of each node;

[0184] The larger the degree of the node is, the smaller the corresponding hop number is.

[0185] In a possible implementation, the hop count determination unit is specifically configured to calculate based on the following formula:

[0186]

[0187] Where N is the hop count of node i; is the minimum value of hop count; is the maximum number of hops; degi is the degree of node i; degma x is the maximum degree among all nodes; n is the minimum degree among all nodes.

[0188] In a possible implementation, the aggregation processing unit is specifically configured to calculate based on the following formula:

[0189]

[0190] in, is the local structural feature representation of node i at layer l+1; is the hop count of node i; is the normalized adjacency matrix; Hl is the feature matrix of all nodes in the lth layer; is the local structural feature representation of node i in layer l; α1 is the smoothing coefficient; k is the number of diffusion hops.

[0191] In a possible implementation, the diffusion module 530 is specifically configured to calculate and process based on the following formula:

[0192]

[0193] in, is the smoothed feature representation of node i at layer l+1; is the hop count of node i; λ is the diffusion coefficient; T is the transformation matrix; is the smooth feature representation of node i in layer l; k is the number of diffusion hops.

[0194] In a possible implementation, the label smoothing module 540 is specifically configured to calculate and process based on the following formula:

[0195]

[0196] in, is the predicted label value of node i; is the hop count of node i; is the normalized adjacency matrix; α2 is the smoothing coefficient; k is the number of diffusion jumps; is the initial label value of node i.

[0197] In a possible implementation, the device 500 further includes:

[0198] An optimization module is used to update the diffusion coefficient of the diffusion kernel function through a two-layer optimization strategy; the two-layer optimization strategy includes:

[0199] By fixing the diffusion coefficient, minimizing the training loss on the training set to determine the optimal model weights of the multilayer perceptron;

[0200] Based on the optimal model weights, the validation loss is minimized on the validation set to determine the optimal diffusion coefficient.

[0201] The division of each module in the above-mentioned graph neural network training device based on flexible diffusion convolution is only for illustrative purposes. In other embodiments, the graph neural network training device based on flexible diffusion convolution can be divided into different modules as needed to complete all or part of the functions of the above-mentioned graph neural network label prediction device based on flexible diffusion convolution. The implementation of each module in the graph neural network training device based on flexible diffusion convolution provided in the embodiment of the present application may be in the form of a computer program. The computer program can be run on a terminal or a server. The program modules constituted by the computer program can be stored in the memory of a terminal or a server. When the computer program is executed by the processor, all or part of the steps of the graph neural network training method based on flexible diffusion convolution described in the embodiment of the present application are implemented.

[0202] See also Figure 6 , Figure 6 The following is a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. Figure 6 As shown, the electronic device 600 may include: at least one processor 610, at least one communication bus 620, a user interface 630, at least one network interface 640, and a memory 650. The communication bus 620 may be used to realize the connection and communication of the above components.

[0203] The user interface 630 may include a display screen (Display) and a camera (Camera), and the optional user interface may also include a standard wired interface and a wireless interface.

[0204] The network interface 640 may optionally include a Bluetooth module, a Near Field Communication (NFC) module, a Wireless Fidelity (Wi-Fi) module, and the like.

[0205] Among them, the processor 610 may include one or more processing cores. The processor 610 uses various interfaces and lines to connect various parts within the entire electronic device 600, and executes various functions and processes data of the electronic device 600 by running or executing instructions, programs, code sets or instruction sets stored in the memory 650, and calling data stored in the memory 650. Optionally, the processor 610 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 610 can integrate one or more combinations of a processor (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 610, and it can be implemented separately through a chip.

[0206] The memory 650 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 650 includes a non-transitory computer-readable medium. The memory 650 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 650 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as an acquisition function, a diffusion function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 650 may optionally be at least one storage device located away from the aforementioned processor 610. As Figure 6 As shown, the memory 650 as a computer storage medium may include an operating system, a network communication module, a user interface module, and program instructions.

[0207] Specifically, the processor 610 may be used to call the program instructions stored in the memory 650, and specifically perform the following operations:

[0208] Get the training graph data including node labels;

[0209] Determining the local structural features of each node according to the node degree information of the training graph data;

[0210] Processing the local structural features using a diffusion kernel function to obtain a smooth feature of each node;

[0211] Inputting the smoothed features into a multilayer perceptron to obtain a preliminary label value for each node, and obtaining a predicted label value for each node after processing the preliminary label value by label smoothing;

[0212] The parameters of the diffusion kernel function and the multilayer perceptron are updated based on the predicted label value and the node label until convergence or a predetermined number of training rounds is reached.

[0213] In some possible embodiments, when the processor 610 determines the local structural feature of each node according to the node degree information of the training graph data, it further specifically performs:

[0214] Determine the number of hops of each node according to the node degree information of the training graph data;

[0215] Aggregate each node with its neighboring nodes of corresponding hop count to obtain the local structural features of each node;

[0216] The larger the degree of the node is, the smaller the corresponding hop number is.

[0217] In some possible embodiments, when the processor 610 performs the process of determining the number of hops of each node according to the node degree information of the training graph data, the calculation process is based on the following formula:

[0218]

[0219] in, is the hop count of node i; is the minimum value of hop count; is the maximum number of hops; degi is the degree of node i; deg max is the maximum degree among all nodes; deg min is the minimum degree among all nodes.

[0220] In some possible embodiments, when the processor 610 performs the process of aggregating each node with neighboring nodes of a corresponding number of hops, the process is calculated based on the following formula:

[0221]

[0222] in, is the local structural feature representation of node i at layer l+1; is the hop count of node i; is the normalized adjacency matrix; Hl is the feature matrix of all nodes in the lth layer; is the local structural feature representation of node i in layer l; α1 is the smoothing coefficient; k is the number of diffusion hops.

[0223] In some possible embodiments, when the processor 610 uses the diffusion kernel function to process the local structural features to obtain the smoothing features of each node, the calculation process is based on the following formula:

[0224]

[0225] in, is the smoothed feature representation of node i at layer l+1; is the hop count of node i; λ is the diffusion coefficient; T is the transformation matrix; is the smooth feature representation of node i in layer l; k is the number of diffusion hops.

[0226] In some possible embodiments, when the processor 610 obtains the predicted label value of each node after performing the label smoothing process on the preliminary label value, the calculation process is based on the following formula:

[0227]

[0228] in, is the predicted label value of node i; is the hop count of node i; is the normalized adjacency matrix; α2 is the smoothing coefficient; k is the number of diffusion jumps; is the initial label value of node i.

[0229] In some possible embodiments, the processor 610 further specifically performs: updating the diffusion coefficient of the diffusion kernel function by a double-layer optimization strategy; the double-layer optimization strategy includes:

[0230] By fixing the diffusion coefficient, minimizing the training loss on the training set to determine the optimal model weights of the multilayer perceptron;

[0231] Based on the optimal model weights, the validation loss is minimized on the validation set to determine the optimal diffusion coefficient.

[0232] The embodiment of the present application also provides a computer-readable storage medium, which stores instructions, and when it is run on a computer or processor, it enables the computer or processor to perform one or more steps in the above embodiment. If the various component modules of the above-mentioned graph neural network training device based on flexible diffusion convolution are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above-mentioned computer-readable storage medium.

[0233] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The above-mentioned computer program product includes one or more computer instructions. When the above-mentioned computer program instructions are loaded and executed on a computer, the above-mentioned process or function according to the embodiment of the present application is generated in whole or in part. The above-mentioned computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The above-mentioned computer instructions can be stored in a computer-readable storage medium or transmitted by the above-mentioned computer-readable storage medium. The above-mentioned computer instructions can be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (such as coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The above-mentioned computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The above-mentioned available media can be magnetic media (for example, floppy disks, hard disks, tapes), optical media (for example, digital versatile discs (DVD)), or semiconductor media (for example, solid state disks (SSD)), etc.

[0234] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes. In the absence of conflict, the technical features in this embodiment and the implementation scheme can be combined arbitrarily.

[0235] The embodiments described above are merely preferred embodiments of the present application and are not intended to limit the scope of the present application. Without departing from the design spirit of the present application, various modifications and improvements made to the technical solutions of the present application by ordinary technicians in this field should fall within the protection scope determined by the claims.

[0236] The above describes a specific embodiment of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims and the specification can be performed in an order different from the order in the embodiments recorded in the specification and still achieve the desired results. In addition, the process depicted in the drawings does not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

Claims

1. A graph neural network training method based on flexible diffusion convolution, characterized in that: The method comprises: Get the training graph data including node labels; Determining the local structural features of each node according to the node degree information of the training graph data; Processing the local structural features using a diffusion kernel function to obtain a smooth feature of each node; Inputting the smoothed features into a multilayer perceptron to obtain a preliminary label value for each node, and obtaining a predicted label value for each node after processing the preliminary label value by label smoothing; The parameters of the diffusion kernel function and the multilayer perceptron are updated based on the predicted label value and the node label until convergence or a predetermined number of training rounds is reached.

2. The method according to claim 1, characterized in that Determining the local structural features of each node according to the node degree information of the training graph data includes: Determine the number of hops of each node according to the node degree information of the training graph data; Aggregate each node with its neighboring nodes of corresponding hop count to obtain the local structural features of each node; The larger the degree of the node is, the smaller the corresponding hop number is.

3. The method according to claim 2, characterized in that The number of hops of each node is determined according to the node degree information of the training graph data, and is calculated based on the following formula: in, is the hop count of node i; is the minimum value of hop count; is the maximum value of the hop count; deg i is the degree of node i; deg max is the maximum degree among all nodes; deg min is the minimum degree among all nodes.

4. The method according to claim 2, characterized in that: The aggregation process of each node and the neighboring nodes with the corresponding number of hops is calculated based on the following formula: in, is the local structural feature representation of node i at layer l+1; is the hop count of node i; is the normalized adjacency matrix; H l is the feature matrix of all nodes in the lth layer; is the local structural feature representation of node i in layer l; α1 is the smoothing coefficient; k is the number of diffusion hops.

5. The method according to claim 1, characterized in that The local structural features are processed by the diffusion kernel function to obtain the smoothing features of each node, and the calculation process is based on the following formula: in, is the smoothed feature representation of node i at layer l+1; is the hop count of node i; λ is the diffusion coefficient; T is the transformation matrix; is the smooth feature representation of node i in layer l; k is the number of diffusion hops.

6. The method according to claim 1, characterized in that The predicted label value of each node is obtained by label smoothing the preliminary label value, and is calculated based on the following formula: in, is the predicted label value of node i; is the hop count of node i; is the normalized adjacency matrix; α2 is the smoothing coefficient; k is the number of diffusion jumps; is the initial label value of node i.

7. The method according to claim 5, characterized in that The method further comprises: The diffusion coefficient of the diffusion kernel function is updated by a two-layer optimization strategy; the two-layer optimization strategy includes: By fixing the diffusion coefficient, minimizing the training loss on the training set to determine the optimal model weights of the multilayer perceptron; Based on the optimal model weights, the validation loss is minimized on the validation set to determine the optimal diffusion coefficient.

8. A graph neural network training device based on flexible diffusion convolution, characterized in that: The device comprises: The acquisition module is used to obtain the training graph data including node labels; A flexible module, used for determining the local structural features of each node according to the node degree information of the training graph data; A diffusion module, used for processing the local structural features using a diffusion kernel function to obtain a smooth feature of each node; A label smoothing module, used for inputting the smoothed features into a multilayer perceptron to obtain a preliminary label value for each node, and obtaining a predicted label value for each node after processing the preliminary label value by label smoothing; An updating module updates the diffusion kernel function and the parameters of the multilayer perceptron based on the predicted label value and the node label until convergence or a predetermined number of training rounds is reached.

9. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 7.

10. A computer storage medium, characterized in that: The computer storage medium stores instructions, which are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Information recommendation method based on graph convolution and neural collaborative filtering

    CN108874914A

  • Graph neural network training method and device

    CN112085172A

  • Feature recognition method and device based on graph neural network, storage medium and terminal

    CN112819103A

  • Graph neural network model and determination method thereof, graph representation method, medium and terminal

    CN114925805A

  • Model training method and device, graph data processing method and device, equipment and storage medium

    CN115222044A