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

By employing a flexible graph neural network training method that combines diffusing convolution and label smoothing, the local structural features and neighborhood size are dynamically adjusted. This addresses the problem of insufficient information capture in complex graph data by traditional graph neural networks, thereby improving the model's prediction accuracy and robustness.

CN119761446BActive Publication Date: 2026-03-17JILIN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Traditional graph neural networks struggle to capture sufficient relevant information when processing complex graph data, resulting in poor performance or model performance falling short of expectations. This is especially true in recommendation systems, where issues such as oversmoothing, information overload, or insufficient information can occur.

Method used

A graph neural network training method based on flexible diffraction convolution is adopted. By acquiring node degree information, local structural features are dynamically adjusted, and the prediction performance of the graph neural network model is optimized by utilizing the diffraction kernel function and label smoothing process.

Benefits of technology

It improves the prediction accuracy and robustness of graph neural network models, enhances the ability to predict labels for complex graph data, reduces the tendency to overfit, and improves the applicability and generalization ability of the model on complex graph structure data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119761446B_ABST
    Figure CN119761446B_ABST
Patent Text Reader

Abstract

The application discloses a graph neural network training method based on flexible diffusion convolution and related equipment, and the method comprises the following steps: acquiring training graph data containing node labels; determining the local structure features 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 the smoothing features of each node; inputting the smoothing features into a multi-layer perceptron to obtain the preliminary label values of each node, and obtaining the predicted label values of each node after processing the preliminary label values through label smoothing; updating the parameters of the diffusion kernel function and the multi-layer perceptron based on the predicted label values and the node labels until convergence or a predetermined number of training rounds is reached. The application can optimize the prediction performance of the graph neural network model, improve the robustness and generalization, and improve the label prediction accuracy of complex graph data such as a recommendation system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the rapid development of artificial intelligence (AI) technology, Graph Neural Networks (GNNs) have become an important tool for processing complex relational data, possessing broad and significant research value. GNNs can solve complex relationship modeling problems. Many practical problems present data in graph form, such as recommender 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 mainly benefits from the message-passing paradigm, which involves iteratively aggregating information from surrounding nodes to the target node for global learning and inference. However, as the scale and complexity of graph data continue to increase, traditional graph neural networks often fail to fully capture relevant information, leading to poor performance or models that do not meet expectations. Therefore, how to improve the prediction accuracy of complex graph data, such as in recommender systems, is an urgent problem to be solved. Summary of the Invention

[0003] This application provides a graph neural network training method and related equipment based on flexible diffusing convolution. This method optimizes the prediction performance of the graph neural network model, improves robustness and generalization, and enhances the label prediction accuracy for complex graph data such as those used in recommendation systems through flexible diffusing convolution and label smoothing processes. The above technical solution is as follows:

[0004] In a first aspect, embodiments of this application provide a graph neural network training method based on flexible diffusing convolution; the method includes:

[0005] Obtain training graph data containing node labels;

[0006] The local structural features of each node are determined based on the node degree information of the training graph data;

[0007] The local structural features are processed using a diffusion kernel function to obtain the smooth features of each node;

[0008] The smoothed features are input into a multilayer perceptron to obtain the initial label value of each node. After the initial label value is processed by label smoothing, the predicted label value of each node is obtained.

[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 are reached.

[0010] In one possible implementation, determining the local structural features of each node based on the node degree information of the training graph data includes:

[0011] The number of hops for each node is determined based on the node degree information of the training graph data;

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

[0013] The higher the degree of the node, the lower the corresponding hop count.

[0014] In one possible implementation, the hop count of each node is determined based on the node degree information of the training graph data, and the calculation is performed using the following formula:

[0015]

[0016] in, Let i be the number of hops to node i. This is the minimum number of jumps; `deg` represents the maximum number of hops; `degi` represents the degree of node `i`; `deg` represents the maximum number of hops. max The maximum degree among all nodes; deg min It is the minimum degree among all nodes.

[0017] In one possible implementation, the aggregation of each node with its corresponding hop count neighbor nodes is calculated based on the following formula:

[0018]

[0019] in, Let i be the local structural feature representation of node i in the (l+1)th layer; Let i be the number of hops to node i. Hl is the normalized adjacency matrix; Hl is the feature matrix of all nodes in the l-th layer; Let α1 be the local structural feature representation of node i in layer l; α1 is the smoothing coefficient; and k is the diffusion hop number.

[0020] In one possible implementation, the local structural features are processed using a diffusion kernel function to obtain smooth features for each node, calculated based on the following formula:

[0021]

[0022] in, Let i be the smooth feature representation of node i in the (l+1)th layer; Let λ be the hop count of node i; λ be the diffusion coefficient; and T be the transformation matrix. Let k be the smooth feature representation of node i in layer l; k is the diffusion hop number.

[0023] In one possible implementation, the predicted label value for each node is obtained after smoothing the initial label values ​​using the label, and the calculation is based on the following formula:

[0024]

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

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

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

[0028] By fixing the diffusion coefficient, the optimal model weights of the multilayer perceptron are determined by minimizing the training loss on the training set.

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

[0030] Secondly, embodiments of this application provide a graph neural network training device based on flexible diffusing convolution, the device comprising:

[0031] The acquisition module is used to acquire training graph data containing node labels;

[0032] A flexible module is used to determine the local structural features of each node based on the node degree information of the training graph data;

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

[0034] The label smoothing module is used to input the smoothed features into the multilayer perceptron to obtain the preliminary label value of each node, and to obtain the predicted label value of each node after processing the preliminary label value through label smoothing.

[0035] An update 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 one possible implementation, the flexible module includes:

[0037] The hop count determination unit is used to determine the hop count of each node based on the node degree information of the training graph data;

[0038] The aggregation processing unit is used to aggregate each node with its neighboring nodes of the corresponding hop count to obtain the local structural features of each node.

[0039] The higher the degree of the node, the lower the corresponding hop count.

[0040] In one possible implementation, the hop count determination unit is specifically used for calculation based on the following formula:

[0041]

[0042] in, Let i be the number of hops to node i. This is the minimum number of jumps; `deg` represents the maximum number of hops; `degi` represents the degree of node `i`; `deg` represents the maximum number of hops. max The maximum degree among all nodes; deg min It is the minimum degree among all nodes.

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

[0044]

[0045] in, Let i be the local structural feature representation of node i in the (l+1)th layer; Let i be the number of hops to node i. Hl is the normalized adjacency matrix; Hl is the feature matrix of all nodes in the l-th layer; Let α1 be the local structural feature representation of node i in layer l; α1 is the smoothing coefficient; and k is the diffusion hop number.

[0046] In one possible implementation, the diffusion module is specifically used to perform the calculation based on the following formula:

[0047]

[0048] in, Let i be the smooth feature representation of node i in the (l+1)th layer; Let λ be the hop count of node i; λ be the diffusion coefficient; and T be the transformation matrix. Let k be the smooth feature representation of node i in layer l; k is the diffusion hop number.

[0049] In one possible implementation, the label smoothing module is specifically used to calculate the processing based on the following formula:

[0050]

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

[0052] In one 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, the optimal model weights of the multilayer perceptron are determined by minimizing the training loss on the training set.

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

[0056] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory; wherein the memory stores a computer program, the computer program being adapted to be loaded by the processor and executed by the above-described method steps.

[0057] Fourthly, embodiments of this application provide a computer storage medium storing instructions adapted for loading by a processor and executing the above-described method steps.

[0058] In one or more embodiments of this application, training graph data containing node labels is acquired; local structural features of each node are determined based on the node degree information of the training graph data; the local structural features are processed using a diffusion kernel function to obtain smoothed features for each node; the smoothed features are input into a multilayer perceptron to obtain preliminary label values ​​for each node; the preliminary label values ​​are then processed through label smoothing to obtain predicted label values ​​for each node; the diffusion kernel function and the parameters of the multilayer perceptron are updated based on the predicted label values ​​and the node labels until convergence or a predetermined number of training rounds is reached. This application can significantly improve the prediction performance of graph neural network models and increase the label prediction accuracy for recommendation systems and other complex graph data. By designing a reasonable aggregation local structure size based on node degree information and using a continuously changing neighborhood radius implemented with a diffusion kernel, this application effectively enhances the continuity and integrity of node representations. This flexible neighborhood adjustment mechanism breaks through the limitation of fixed neighborhood size in traditional methods, allowing each node to adaptively adjust the range of its information aggregation according to the diversity of its connections, thereby better handling noise and anomalies in graph data. Furthermore, by introducing a label smoothing process, this application further reduces the model's overconfidence and overfitting tendency, enhances the model's robustness to uncertain labels, and improves overall prediction performance. Overall, this application effectively improves the model's applicability and generalization ability on complex graph-structured data and shortens model training time by comprehensively utilizing dynamic neighborhood size and diffusing convolution techniques. Attached Figure Description

[0059] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0060] Figure 1 A flowchart illustrating a graph neural network training method based on flexible diffraction convolution provided in this application embodiment;

[0061] Figure 2 A flowchart illustrating another graph neural network training method based on flexible diffraction convolution provided in this application embodiment;

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

[0063] Figure 4 Radar graph showing the classification accuracy performance 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 diffraction convolution provided in an embodiment of this application;

[0065] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0066] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0067] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.

[0068] In recommender 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 performance and accuracy challenges when handling recommender system applications:

[0069] As the number of layers in a GNN increases, node features tend to become more uniform, making it difficult to distinguish between different nodes and thus reducing the personalization and accuracy of recommendations. This phenomenon is called oversmoothing, because the information transmission in each layer causes features to spread widely throughout the graph, making the features of distant nodes similar as well.

[0070] Most traditional GNNs use a fixed neighborhood size to aggregate information, which ignores the different connection densities 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 information under-contact.

[0071] In recommender systems, the nature of interactions between users and items can be diverse. Traditional GNNs often struggle to capture this heterogeneity effectively because they typically assume that all types of edges and nodes are homogeneous.

[0072] To address the aforementioned issues, this application proposes a graph neural network training method based on flexible diffusing convolution. This method can be implemented using a computer program and can run on a graph neural network training device based on the von Neumann architecture. This computer program can be integrated into applications or run as a standalone utility application. The graph neural network training device in this application can be a terminal device, including but not limited to: personal computers, tablets, handheld devices, in-vehicle devices, wearable devices, computing devices, or other processing devices connected to a wireless modem. Terminal devices may have different names in different networks, 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 equipment, cellular phone, cordless phone, terminal device in 5G networks or future evolved networks, etc. The graph neural network label prediction device can also be a server, which can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The graph neural network training device can also be a system combining servers and terminal devices. The specific implementation depends on the actual application environment, and this application does not limit this.

[0073] This graph neural network training method based on flexible diffusing convolution acquires graph data to be processed; determines the local structural features of each node based on the node degree information of the graph data; processes the local structural features using a diffusing kernel function to obtain smoothed features for each node; inputs the smoothed features into a multilayer perceptron to obtain the preliminary label value for each node; after label smoothing, the preliminary label value is obtained to obtain the predicted label value for each node; and the parameters of the diffusing 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 are reached. This method can significantly improve the prediction performance of graph neural network models and improve the label prediction accuracy for recommendation systems and other complex graph data. By designing a reasonable aggregation local structure size based on node degree information and using a continuously changing neighborhood radius implemented with a diffusing kernel, this method effectively enhances the continuity and integrity of node representations. This flexible neighborhood adjustment mechanism breaks through the limitation of fixed neighborhood size in traditional methods, allowing each node to adaptively adjust the range of its information aggregation according to the diversity of its connections, thereby better handling noise and anomalies in graph data. Furthermore, by introducing a label smoothing process, this method further reduces the model's overconfidence and overfitting tendency, enhances its robustness to uncertain labels, and improves overall prediction performance. In summary, this method, by comprehensively utilizing dynamic neighborhood size and diffusing convolution techniques, effectively improves the model's applicability and generalization ability on complex graph-structured data, and shortens model training time.

[0074] The present application will now be described in detail with reference to specific embodiments.

[0075] Figure 1 This is a flowchart illustrating a graph neural network training method based on flexible diffraction convolution, provided as an embodiment of this application. Figure 1 As shown, taking an electronic device as the execution subject, this method includes the following steps:

[0076] S101, Obtain training graph data containing node labels.

[0077] Specifically, training graph data can be homographed or heterographed, and can originate from different application scenarios. This training graph data can represent various relationships and connections. In graph neural networks, graph data typically contains nodes and edges; nodes represent entities, and edges represent relationships between entities. This training graph data can be one or more sets of graph data from various sources, 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 address the low prediction accuracy of traditional graph neural networks in different application scenarios and improve model performance and generalization ability. Node labels are labels used in graph data to identify the category or feature to which each node belongs. The specific meaning and purpose of node labels may differ in different application scenarios.

[0078] For example, the training graph data can be data from an e-commerce recommendation system, where nodes represent users and items, and edges represent user behaviors on items (e.g., user User123 clicked, purchased, or rated item Item456). User nodes can have node labels such as age, gender, and interests; item nodes can 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 lines (such as a bus line connecting intersection A and bus stop B), and traffic nodes can have node labels such as location and type (intersection, station).

[0080] S102, determine the local structural features of each node based on the node degree information of the training graph data.

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

[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 hop count of each node based on the node degree information of the training graph data; and aggregating each node with its neighboring nodes corresponding to the hop count to obtain the local structural features of each node.

[0083] This embodiment flexibly assigns aggregated neighbor nodes with different hop counts to a node based on its degree, thereby avoiding insufficient or overly smooth embedding representation information of the node caused by the aggregation process of neighbor nodes with fixed hop counts. The information of a node can also be enhanced by aggregating it with its neighbor nodes of corresponding hop counts.

[0084] In this embodiment, node degree refers to the number of edges connected to each node. In graph data, the degree of each node represents the connectivity of that node. For each node, the number of its 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] Hop count represents the neighborhood range surrounding a node, i.e., the size of the node's local structure, and is typically used to determine the number of neighboring nodes to be considered during feature aggregation. In this embodiment, the hop count corresponding to a node is not fixed, but dynamically adjusted based on the node's degree. Nodes with lower degrees are assigned neighboring nodes with larger hop counts to expand their neighborhood range, thereby compensating for insufficient neighbor information during aggregation; nodes with higher degrees are assigned neighboring nodes with smaller hop counts to shrink their neighborhood range, thus avoiding over-smoothing. That is, the larger the degree of a node, the smaller its corresponding hop count, and vice versa.

[0086] Based on the determined hop count, a range of neighboring nodes is selected for each node. In subsequent feature extraction, the information from these neighboring nodes is aggregated onto the central node, enhancing the node's information and yielding local structural features.

[0087] In some embodiments, the determination of the hop count for each node based on the node degree information of the training graph data is performed using the following formula (1):

[0088]

[0089] Formula (1) is used in this embodiment to determine the (normalized) hop count for each node. That is, the size of the local structure (neighborhood range) of each node. Let be the (normalized) hop count of node i, representing the local structure size of that node; The minimum number of hops (within the normalization range); The maximum number of hops (within the normalization range); deg i Let be the degree of node i, i.e., the number of connections to that node; degrma x The maximum degree among all nodes in the graph; degmi n It is the minimum degree among all nodes in the graph.

[0090] Specifically, this calculation method uses the minimum value Add a range adjustment option, the adjustment option is: Multiply by a regulating 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. Specifically, log(deg) i +1) represents taking the logarithm of the degree of node i and adding 1 to smooth out the effect of the degree; the numerator is log(degma) x +1) - log(deg) i +1) represents the logarithmic difference between the current node's degree and the maximum degree; the denominator is log(degma) x +1)-log(degmi n +1) represents the logarithmic difference between the maximum and minimum degrees.

[0093] Nodes with high degree have more connections and higher hop counts. Approaching This means the domain is relatively small to avoid excessive information aggregation. Nodes with low degrees have fewer connections and lower hop counts. Approaching That is, the neighborhood is large enough to ensure sufficient information aggregation. In graph neural networks, using formula (1) can ensure that nodes of different degrees have an appropriate neighborhood range during feature aggregation, 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, avoiding the problems of over-smoothing or insufficient information.

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

[0095]

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

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

[0098]

[0099] Where A is the original adjacency matrix, representing the connection relationships between nodes in the graph; I is the identity matrix, used to add self-connections to the adjacency matrix, that is, the connection between each node and itself; For the angle matrix, This means that the degree of each node is increased by 1. The normalized adjacency matrix can balance the influence between different nodes, making the weights in the information transmission process more reasonable and preventing high-degree nodes from excessively influencing their neighbors.

[0100] In this embodiment, node features can be updated using formula (2), which combines the information of neighboring nodes with the node's own features to generate a new node feature representation. The smoothing coefficient α is used to balance the aggregated information of neighboring nodes and the node's own features, preventing features from being overly smoothed or lacking sufficient information.

[0101] Specifically, for each node i, based on the neighborhood range Aggregate features from its k-hop neighbors; use a normalized adjacency matrix. and the feature matrix H of the l-th layer l ,calculate The aggregated neighbor features and node-specific features are weighted using a smoothing coefficient α1; for each hop number k, the weighted features are calculated. The weighted features are normalized, and the average value is calculated to obtain a new node feature representation. That is, the local structural features of a node.

[0102] In graph neural networks, formula (2) is used to dynamically adjust the neighborhood range and balance the features of neighbors and the network itself, thereby achieving effective updating and aggregation of node features. This method can be used to capture and analyze complex relationships and structures in training graph data, improving the model's predictive performance and generalization ability.

[0103] S103 uses a diffusion kernel function to process local structural features to obtain smooth features for each node.

[0104] Specifically, a diffusion kernel function is used to process the local structural features of nodes, thereby generating smooth node features. This method can capture and integrate neighborhood information, making node features more stable and accurate. The diffusion kernel function plays a role in feature propagation and aggregation, achieving smoothing of node features by simulating a physical diffusion process.

[0105] In some embodiments, the smoothing feature of each node is obtained by processing local structural features using a diffusion kernel function, and the processing is based on the following formula:

[0106]

[0107] in, This represents the smooth feature representation of node i at the (l+1)th layer (after the (l+1)th iteration); λ is the number of hops of node i, representing 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. It is a learnable parameter in the network and can learn a dedicated propagation neighborhood for each layer and feature channel; T is the transformation matrix, which can be the adjacency matrix of the graph or its normalized form. Let H be the smooth feature representation of node i in the l-th layer, where H 0 The initial input feature matrix can be obtained from the output after aggregation processing by formula (2); k is the diffusion hop number, which represents the number of layers or depth of feature propagation.

[0108] In this embodiment, the concept of a diffusion equation is introduced onto the graph, and it is assumed that this continuous GNN can account for information transfer between neighbors. To achieve this, we use tools from differential geometry to generalize the definitions of gradient and divergence to the graph.

[0109] Assumption and Therefore, the gradient of the graph is defined as Here, we assume that these edges are antisymmetric, that is... The divergence of a graph is defined as the inverse of its gradient, i.e.

[0110] The Laplace matrix is ​​represented as L = DA. Based on the defined discrete gradient and divergence operator, the diffusion process in the figure can be obtained as follows:

[0111]

[0112] Where, ξ ij ξ(t) represents the diffusion coefficient, usually a scalar value. In some special diffusion cases, ξ... ij Setting (t) to 1 makes this process equivalent to Therefore, this process is also known as Laplace smoothing. The differential equation can be solved using a diffusion kernel, i.e., H(t) = e^(-t / t). -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, the Laplace matrix needs to be symmetrically normalized, i.e. And make Thus, the diffusion kernel used in the diagram can be represented as H(t) = e -(I-T)t H(0). Then, using Taylor expansion, we obtain the explicit polynomial approximation of the diffusion kernel, expressed as follows:

[0113]

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

[0115] S104. Input the smoothed features into the multilayer perceptron to obtain the preliminary label value of each node. After smoothing the preliminary label values, obtain the predicted label value of each node.

[0116] Specifically, the smoothed features obtained by processing local structural features using the diffusion kernel function are used as input to a multilayer perceptron (MLP) to generate preliminary label values ​​for each node. A multilayer perceptron is a feedforward neural network containing multiple hidden layers, each consisting of multiple neurons with non-linear activation functions. Label smoothing is used to prevent the model from overfitting the training data and improve the model's generalization ability. Label smoothing involves distributing some probability mass from the true label to other categories, making the model's predictions smoother and more robust.

[0117] In some embodiments, the predicted label value for each node is obtained after smoothing the initial label values ​​using the label method, and is calculated based on the following formula:

[0118]

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

[0120] Specifically, The diffusion of the initial label value of node i across its k-hop neighbors is represented using a normalized adjacency matrix. The k-th power of the number. Through multiple hops, information from neighboring nodes is propagated to the central node i, representing the label propagation process. The initial label value of node i was preserved. The smoothing coefficient α2 controls the weight of the node's own label, ensuring that its label information is not completely ignored during the smoothing process. Combining label diffusion and the node's own label, a weighted average is used to obtain a smoother label representation. (1-α2) and α2 serve as two weighting parameters to balance the contributions of neighboring labels and the node's own label. Finally, the weighted averaged labels are normalized to ensure that the final predicted label values ​​are within a reasonable range. Normalization coefficient. This is used to standardize the predicted label value of node i, making the range of label values ​​more reasonable.

[0121] The above method smooths the initial label values, combining information from neighboring nodes and the model's own label information to obtain smoother and more robust predicted label values. This processing method helps improve the model's generalization ability and reduce overfitting.

[0122] S105 updates the parameters of the diffusion kernel function and the multilayer perceptron based on the predicted label values ​​and node labels until convergence or the predetermined number of training rounds is reached.

[0123] Specifically, by using backpropagation and optimization algorithms, the model parameters are continuously updated to minimize the loss between the predicted label values ​​and the true label values, ultimately obtaining the model with the best performance.

[0124] For example, this step may include defining a loss function to measure the difference between the model's predicted label values ​​and the true label values. Commonly used loss functions include mean squared error (MSE) and cross-entropy loss. The gradient information of the loss function with respect to the model parameters is calculated using the chain rule, such as calculating the partial derivatives of the loss function with respect to the parameters of the diffusion kernel function and the multilayer perceptron (MLP). An optimization algorithm is selected to update the parameters of the graph neural network model based on the gradient information (e.g., updating the parameters of the diffusion kernel function and the MLP), so that the loss function gradually decreases. Commonly used optimization algorithms include stochastic gradient descent (SGD) and Adam. In each training iteration, forward propagation, loss calculation, backpropagation, and parameter updates are repeatedly performed until the model converges or reaches the predetermined number of training epochs.

[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 using a two-layer optimization strategy; the two-layer optimization strategy includes:

[0127] By fixing the diffusion coefficient, the optimal model weights for the multilayer perceptron are determined by minimizing the training loss on the training set.

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

[0129] Specifically, in this application's embodiments, diffusing convolution is a technique that can use a diffusing kernel function instead of the discrete feature aggregation function used in GNNs. This application's embodiments also provide a flexible local structure selection method that considers the variations in the radii of different nodes and inter-layer neighbors. This method uses a diffusing kernel function to continuously transform the adjacency matrix based on node degree. This method eliminates the need for manual adjustment of neighbor radii and updates the kernel radius using gradient descent, achieving optimal prediction accuracy.

[0130] To prevent overfitting, this embodiment proposes a two-layer optimization strategy to help the graph neural network model achieve better performance. Specifically, first, the diffusion coefficient λ is fixed, and the model weights w are trained on the training set. The optimal model weights w* are determined after minimizing the training loss. Then, using the optimal model weights w*, the optimal kernel radius, i.e., the optimal diffusion coefficient λ*, is determined by finding the minimum validation loss on the validation set. The expression for the two-layer optimization strategy is shown below:

[0131]

[0132] To find the optimal diffusion coefficient λ*, the optimal convergence value of w needs to be found before each iteration updates the search for λ, which significantly increases the complexity of the entire model training process. In some embodiments, inspired by Neural Architecture Search (NAS) and gradient-based hyperparameter optimization (by simultaneously optimizing the model structure or hyperparameters during training), this embodiment can use an approximation method to simultaneously update the diffusion coefficient λ each time the model weights w are updated (using a gradient-based method, calculating the gradient of the loss function with respect to the diffusion coefficient λ, and updating λ according to the gradient). Updating both the model weights w and the diffusion coefficient λ simultaneously in each iteration reduces the time consumption of two-stage optimization and shortens the model training time.

[0133] Please refer to the following. Figure 2 , Figure 2 This is a flowchart illustrating a graph neural network training method based on flexible diffraction convolution, provided as an embodiment of this application. Figure 2 As shown, taking an electronic device as the execution subject and an optimized graph neural network for a recommendation system as an example, this method is introduced. 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 a relationship between entities. For example, in a recommender system, nodes can represent users or items, and edges represent interactions between users and items (such as clicks, purchases, ratings, etc.). The graph data of a recommender system can contain the interaction relationships between users and items. Through this relationship graph, the model can capture user interests and 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 degree (such as node 1) will receive smaller receptive fields, while nodes with lower node degree (such as node 2) will receive larger receptive fields. Figure 2 As shown in (b), a node with a degree of 1 is assigned 4 local structure hops (orange part), a node with a degree of 2 is assigned 3 local structure hops (purple part), a node with a degree of 4 is assigned 1 local structure hop (blue part), and a node with a degree of 3 is assigned 2 local structure hops (green part).

[0138] For example, in a recommender system, different users have different activity levels. Users with higher node degree may be active users, and the model assigns them a smaller receptive field to avoid over-smoothing, while users with lower node degree 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 a diffusion kernel function to process local structural features, obtaining smooth features for each node. The diagram illustrates the processing at different diffusion steps k. The diffusion coefficient λ controls the intensity of the diffusion process. Figure 2 As shown in (c), the figure illustrates the diffusion process from k=1 to k=4, with nodes... The information gradually spreads to its neighboring nodes and is aggregated according to the weights of the diffusion kernel function. Each step corresponds to a diffusion level, and information propagates and aggregates layer by layer.

[0141] For example, by using a diffusion kernel function, a recommendation system can propagate feature information between users and items, thereby capturing richer user preferences and item characteristics. For instance, user 1's features can be propagated to items with which they have interacted through the diffusion process, thus improving recommendation accuracy.

[0142] (d) Label Smoothing

[0143] The smoothed features are input into the multilayer perceptron to obtain the initial label value for each node. Label smoothing then smooths these initial label values ​​to obtain the final predicted label value. By smoothing the label, some probability mass is reassigned from the true label to other categories, reducing the model's overfitting to the training data, improving the generalization ability of the prediction, and making the model's predictions smoother and more robust.

[0144] For example, in recommender systems, label smoothing can prevent models from overfitting to noise in the training data. For instance, in predicting user ratings, label smoothing can make the model more cautious in its predictions, thereby improving generalization ability.

[0145] In each training iteration, the above steps are repeated, along with forward propagation, loss calculation, backpropagation, and parameter updates, until the model converges or reaches the predetermined number of training rounds.

[0146] Next, experiments will be conducted to verify the performance optimization effect of the graph neural network training method based on flexible diffraction convolution provided in this application on the graph neural network model.

[0147] In the experiment, the results were recorded by running the experiment 100 times. For example... Figure 3 As shown, the diagram illustrates the classification accuracy performance of different methods across multiple datasets. Each subplot represents a dataset, and each subplot displays the accuracy distribution of different methods on that dataset.

[0148] The dataset includes:

[0149] CORA: Academic Paper Citation Network Dataset.

[0150] CITESEER: A dataset of academic paper citations.

[0151] PUBMED: Biomedical Literature Citation Network Dataset.

[0152] AMZ COMP: Amazon Computer Products User Review Dataset.

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

[0154] COAUTHOR CS: A network dataset of co-authors in the field of computer science.

[0155] CORNELL: A dataset of web links from Cornell University in the United States.

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

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

[0158] Diffusion methods include:

[0159] Flexi-DC: A method based on flexible diffusion convolution proposed in the embodiments of this application.

[0160] GDC: Generalized Graph Diffusion Method.

[0161] ADC: Adaptive Diffusion Convolution Method.

[0162] None: No diffusion method was used; this serves as a control group.

[0163] Graph neural networks include:

[0164] GCN: Graph Convolutional Network.

[0165] JKNet: Jump Connection Graph Neural Network.

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

[0167] according to Figure 3 As can be seen, in most datasets, the accuracy of the Flexi-DC method provided in this application embodiment 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 did not use any diffusion method, but is not as stable as the Flexi-DC method overall.

[0168] like Figure 4 As shown, the accuracy of different methods in node classification using GCN, JKNet, and ARMA as the backbone is demonstrated. The experimental results of the Flexi-DC method proposed in this application are generally better than the experimental results of the comparison algorithms, which shows that the method proposed in this application has robustness and generalization for different types of problems.

[0169] To address the low accuracy of label prediction for graph data in existing recommendation systems, this application also provides a method for predicting labels for graph data in recommendation systems, thereby improving the accuracy of label prediction. Using an electronic device 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 recommendation label for 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 in the recommendation system;

[0172] The smoothed features of each node are obtained by processing local structural features using a diffusion kernel function;

[0173] The smoothed features are input into the multilayer perceptron to obtain the label value of each node, which is the recommended label for each node.

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

[0175] Please refer to the following. Figure 5 , Figure 5 This application provides an exemplary embodiment of a graph neural network training device based on flexible diffusing convolution. For example... Figure 5 As shown, the device 500 includes:

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

[0177] The flexible module 520 is used to determine the local structural features of each node based on the node degree information of the training graph data;

[0178] The diffusion module 530 is used to process the local structural features using a diffusion kernel function to obtain the smooth features of each node;

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

[0180] The update 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 one possible implementation, the flexible module 520 includes:

[0182] The hop count determination unit is used to determine the hop count of each node based on the node degree information of the training graph data;

[0183] The aggregation processing unit is used to aggregate each node with its neighboring nodes of the corresponding hop count to obtain the local structural features of each node.

[0184] The higher the degree of the node, the lower the corresponding hop count.

[0185] In one possible implementation, the hop count determination unit is specifically used for calculation based on the following formula:

[0186]

[0187] Where N is the number of hops of node i; This is the minimum number of jumps; The maximum number of hops; degi is the degree of node i; degma x The maximum degree among all nodes; degmi n It is the minimum degree among all nodes.

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

[0189]

[0190] in, Let i be the local structural feature representation of node i in the (l+1)th layer; Let i be the number of hops to node i. Hl is the normalized adjacency matrix; Hl is the feature matrix of all nodes in the l-th layer; Let α1 be the local structural feature representation of node i in layer l; α1 is the smoothing coefficient; and k is the diffusion hop number.

[0191] In one possible implementation, the diffusion module 530 is specifically used for calculation based on the following formula:

[0192]

[0193] in, Let i be the smooth feature representation of node i in the (l+1)th layer; Let λ be the hop count of node i; λ be the diffusion coefficient; and T be the transformation matrix. Let k be the smooth feature representation of node i in layer l; k is the diffusion hop number.

[0194] In one possible implementation, the label smoothing module 540 is specifically used for calculation based on the following formula:

[0195]

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

[0197] In one 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, the optimal model weights of the multilayer perceptron are determined by minimizing the training loss on the training set.

[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 modules in the above-described graph neural network training device based on flexible diffusing convolution is for illustrative purposes only. In other embodiments, the graph neural network training device based on flexible diffusing convolution can be divided into different modules as needed to complete all or part of the functions of the graph neural network label prediction device based on flexible diffusing convolution. The implementation of each module in the graph neural network training device based on flexible diffusing convolution provided in this application embodiment can be in the form of a computer program. This computer program can run on a terminal or server. The program modules constituted by this computer program can be stored in the memory of the terminal or server. When the computer program is executed by the processor, it implements all or part of the steps of the graph neural network training method based on flexible diffusing convolution described in this application embodiment.

[0202] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided for an exemplary embodiment of this application. For example... 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 can be used to enable communication between the aforementioned components.

[0203] The user interface 630 may include a display screen and a camera. Optional user interfaces may also include standard wired interfaces and wireless interfaces.

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

[0205] The processor 610 may include one or more processing cores. The processor 610 connects to various parts within the electronic device 600 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 650, and by calling data stored in the memory 650. Optionally, the processor 610 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 610 may integrate one or a combination of several of the following: a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 610 and may be implemented as a separate chip.

[0206] The memory 650 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 650 may include a non-transitory computer-readable medium. The memory 650 may be used to store instructions, programs, code, 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 a fetch function, a spread function, etc.), instructions for implementing the various method embodiments described above, etc.; the data storage area may store data involved in the various method embodiments described above, etc. Optionally, the memory 650 may also be at least one storage device located remotely from the aforementioned processor 610. Figure 6 As shown, the memory 650, which serves 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 can be used to call program instructions stored in the memory 650 and perform the following operations:

[0208] Obtain training graph data containing node labels;

[0209] The local structural features of each node are determined based on the node degree information of the training graph data;

[0210] The local structural features are processed using a diffusion kernel function to obtain the smooth features of each node;

[0211] The smoothed features are input into a multilayer perceptron to obtain the initial label value of each node. After the initial label value is processed by label smoothing, the predicted label value of each node is obtained.

[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 are reached.

[0213] In some possible embodiments, when the processor 610 performs the step of determining the local structural features of each node based on the node degree information of the training graph data, it also specifically performs the following:

[0214] The number of hops for each node is determined based on the node degree information of the training graph data;

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

[0216] The higher the degree of the node, the lower the corresponding hop count.

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

[0218]

[0219] in, Let i be the number of hops to node i. This is the minimum number of jumps; `deg` represents the maximum number of hops; `degi` represents the degree of node `i`; `deg` represents the maximum number of hops. max The maximum degree among all nodes; deg min It is the minimum degree among all nodes.

[0220] In some possible embodiments, when performing the aggregation process of each node with its neighboring nodes of the corresponding hop count, the processor 610 calculates the processing based on the following formula:

[0221]

[0222] in, Let i be the local structural feature representation of node i in the (l+1)th layer; Let i be the number of hops to node i. Hl is the normalized adjacency matrix; Hl is the feature matrix of all nodes in the l-th layer; Let α1 be the local structural feature representation of node i in layer l; α1 is the smoothing coefficient; and k is the diffusion hop number.

[0223] In some possible embodiments, when the processor 610 performs the processing of the local structural features using the diffusion kernel function to obtain the smooth features of each node, it calculates the processing based on the following formula:

[0224]

[0225] in, Let i be the smooth feature representation of node i in the (l+1)th layer; Let λ be the hop count of node i; λ be the diffusion coefficient; and T be the transformation matrix. Let k be the smooth feature representation of node i at layer l; k is the diffusion hop count.

[0226] In some possible embodiments, when the processor 610 obtains the predicted label value for each node after performing the label smoothing process on the initial label values, it calculates the processing based on the following formula:

[0227]

[0228] in, Let be the predicted label value for node i; Let i be the number of hops to node i. α2 is the normalized adjacency matrix; α2 is the smoothing coefficient; k is the diffusion hop count; Let be 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 through a two-layer optimization strategy; the two-layer optimization strategy includes:

[0230] By fixing the diffusion coefficient, the optimal model weights of the multilayer perceptron are determined by minimizing the training loss on the training set.

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

[0232] This application also provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform one or more steps in the above embodiments. If the constituent modules of the above-described graph neural network training device based on flexible diffusing convolution are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium.

[0233] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital versatile discs (DVDs)), or semiconductor media (e.g., solid-state drives (SSDs)).

[0234] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks. Unless otherwise specified, the technical features of this embodiment and its implementation can be combined arbitrarily.

[0235] The embodiments described above are merely preferred embodiments of this application and are not intended to limit the scope of this application. Any modifications and improvements made by those skilled in the art to the technical solutions of this application without departing from the spirit of this application should fall within the protection scope defined by the claims.

[0236] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims and specification may be performed in a different order than in the embodiments described in the specification and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

Claims

1. A flexible diffusion convolution-based graph neural network training method, characterized in that, The graph neural network is used for modeling the relationship between users and items in an e-commerce recommendation system for node label prediction of graph data of the e-commerce recommendation system in the e-commerce recommendation system, and the method comprises: obtaining training graph data containing node labels, the training graph data being e-commerce recommendation system data, nodes in the training graph data including user nodes and item nodes, the user nodes corresponding to user node labels, the item nodes corresponding to item node labels, and edges representing user behaviors on items; determining local structure features of each node according to 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 multilayer perceptron to obtain preliminary label values of each node, and obtaining predicted label values of each node after label smoothing processing of the preliminary label values; updating parameters of the diffusion kernel function and the multilayer perceptron based on the predicted label values and the node labels until convergence or a predetermined number of training rounds is reached; wherein the determining of the local structure features of each node according to the node degree information of the training graph data comprises: determining a hop number of each node according to the node degree information of the training graph data; and aggregating and processing each node and neighbor nodes corresponding to the hop number to obtain the local structure features of each node; wherein the greater the degree of the node, the smaller the corresponding hop number; wherein the determining of the hop number of each node based on the node degree information of the training graph data is calculated and processed based on the following formula: wherein, is the number of hops for a node ; is the minimum value of the number of hops; is the maximum value of the number of hops; is the degree of a node ; is the maximum degree among all nodes; is the minimum degree among all nodes.

2. The method of claim 1, wherein, the aggregating and processing of each node and neighbor nodes corresponding to the hop number is calculated and processed based on the following formula: in, For nodes In the Representation of the local structural features of a layer; For nodes The number of jumps; This is the normalized adjacency matrix; For the first Feature matrix of all nodes in the layer; For nodes In the Representation of the local structural features of a layer; For smoothing coefficients; Diffusion jump count.

3. The method of claim 1, wherein, the processing of the local structure features by using the diffusion kernel function to obtain the smooth features of each node is calculated and processed based on the following formula: wherein, is a node In a first Smooth feature representation of the layer; is a node Number of hops; is a diffusion coefficient; is a transformation matrix; is a node Smooth feature representation of the layer; In a first Diffusion number of hops.

4. The method of claim 1, wherein, the obtaining of the predicted label values of each node after the label smoothing processing of the preliminary label values is calculated and processed based on the following formula: wherein, is a predicted label value for a node ; is a hop count for a node ; is a normalized adjacency matrix; is a smoothing coefficient; is a diffusion hop count; is a preliminary label value for a node .

5. The method of claim 3, wherein, the method further comprises: updating a diffusion coefficient of the diffusion kernel function by a double-layer optimization strategy; the double-layer optimization strategy comprises: determining optimal model weights of the multilayer perceptron by fixing the diffusion coefficient and minimizing training loss on a training set; determining an optimal diffusion coefficient based on the optimal model weights and minimizing validation loss on a validation set.

6. A flexible diffusion convolution-based graph neural network training apparatus, characterized in that, The graph neural network is used for modeling the relationship between users and items in an e-commerce recommendation system for node label prediction of graph data of the e-commerce recommendation system in the e-commerce recommendation system, and the device comprises: an acquisition module configured to acquire training graph data containing node labels, the training graph data being e-commerce recommendation system data, nodes in the training graph data including user nodes and item nodes, the user nodes corresponding to user node labels, the item nodes corresponding to item node labels, and edges representing user behaviors on items; a flexible module configured to determine local structure features of each node according to node degree information of the training graph data; a diffusion module configured to process the local structure features by using a diffusion kernel function to obtain smooth features of each node; a label smoothing module, configured to input the smoothed features into a multi-layer perceptron to obtain a preliminary label value of each node, and to obtain a predicted label value of each node by performing label smoothing on the preliminary label value; an updating module, configured to update parameters of the diffusion kernel function and the multi-layer perceptron based on the predicted label value and the node label until convergence or a predetermined number of training rounds is reached; wherein the determining of the local structure feature of each node according to the node degree information of the training graph data comprises: determining a hop number of each node according to the node degree information of the training graph data; and performing aggregation processing on each node and neighbor nodes corresponding to the hop number to obtain the local structure feature of each node; wherein the greater the degree of the node, the smaller the corresponding hop number; wherein the determining of the hop number of each node according to the node degree information of the training graph data is based on the following formula: wherein, is the number of hops for a node ; is the minimum value of the number of hops; is the maximum value of the number of hops; is the degree of a node ; is the maximum degree among all nodes; is the minimum degree among all nodes.

7. An electronic device, comprising: comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is adapted to be loaded and executed by the processor to perform the method steps of any one of claims 1-5.

8. A computer storage medium, characterized in that, the computer storage medium stores instructions, and the instructions are adapted to be loaded and executed by the processor to perform the method steps of any one of claims 1-5.

Citation Information

Patent Citations

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

    CN108874914A

  • Graph neural network training method and device

    CN112085172A