CN116956081A - Heterogeneous social network distribution outward generalization-oriented social label prediction method and system - Google Patents

Heterogeneous social network distribution outward generalization-oriented social label prediction method and system Download PDF

Info

Publication number
CN116956081A
CN116956081A CN202310720948.3A CN202310720948A CN116956081A CN 116956081 A CN116956081 A CN 116956081A CN 202310720948 A CN202310720948 A CN 202310720948A CN 116956081 A CN116956081 A CN 116956081A
Authority
CN
China
Prior art keywords
graph
social network
heterogeneous
propagation
social
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310720948.3A
Other languages
Chinese (zh)
Inventor
况琨
张瑞豪
陈政聿
吴飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN202310720948.3A priority Critical patent/CN116956081A/en
Publication of CN116956081A publication Critical patent/CN116956081A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/042Knowledge-based neural networks; Logical representations of neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a social label prediction method and a social label prediction system for heterogeneous social network distribution generalization. The invention comprises the following steps: 1) Constructing social network data into heterogeneous social network graphs; 2) Performing initial clustering division on the heterogeneous social network graph; 3) Inputting the clustered heterogeneous social network graph into a self-adaptive neighborhood propagation module based on a graph neural network, and performing one-round parameter optimization on the self-adaptive neighborhood propagation module under the supervision of the existing social information labels in the graph; 4) Extracting graph characteristic information again for the heterogeneous social network graph by using a self-adaptive neighborhood propagation module after a new round of parameter optimization, and then carrying out cluster clustering again by using the updated graph characteristic information; 5) And repeating the iteration to complete the training of the self-adaptive neighborhood propagation module and use the training for prediction. The method has stronger robustness and accuracy to heterogeneous social network data outside the training set distribution, and can accurately predict the user labels.

Description

Heterogeneous social network distribution outward generalization-oriented social label prediction method and system
Technical Field
The invention relates to the field of machine learning, in particular to a method, a device and a system for training a graph neural network model with different distributions of training data and test data in heterogeneous social network data.
Background
The graphic neural network (Graph Neural Network, GNN) is a framework which directly learns the graphic structure data by deep learning and is used for learning the graphic structure data, extracting and exploring the characteristics and modes in the graphic structure data, and meeting the requirements of graphic learning tasks such as clustering, classifying, predicting, dividing, generating and the like.
In the field of social networking, a typical application of GNNs is graph-based social label prediction, where such scenarios may be user-defined by utilizing GNNs to predict social labels of user nodes, such as music types liked by a user based on other users that the user knows, music types liked by the user, and so forth. However, most existing methods today assume that the training and testing data are independent and distributed identically, whereas social networks tend to be heterogeneous networks, and the distribution between training and testing data may be different. Due to the lack of distribution generalization capability, the model performance of the existing methods can suffer from significant degradation in performance in data sets that are applied to different distributions than the training data. Therefore, learning a graph neural network with distributed generalization capability is crucial for social label prediction in heterogeneous social networks.
Disclosure of Invention
The invention aims to solve the problem of performance degradation caused by different distributions of training data and test data in heterogeneous social network data by the conventional heterogeneous composition neural network algorithm, and provides a social label prediction method for heterogeneous social network distribution generalization.
The technical scheme adopted by the invention is as follows:
in a first aspect, the present invention provides a social label prediction method for heterogeneous social network distribution generalization, which includes the following steps:
s1, constructing part of social network data with social information labels into a heterogeneous social network diagram, wherein each node in the diagram represents a user, if a social relationship exists between the user and the user, an edge connection is established between two corresponding user nodes, and if a social relationship does not exist between the user and the user, an edge connection does not exist between the two corresponding user nodes;
s2, initializing graph characteristic information by using node characteristics and adjacent side data of the heterogeneous social network graph, randomly selecting a plurality of nodes from the heterogeneous social network graph to determine a clustering center, dividing all nodes in the graph into a plurality of clusters through an environment clustering module, and forming a graph environment in the heterogeneous social network graph by each cluster;
S3, inputting the clustered heterogeneous social network graph into a graph neural network-based adaptive neighborhood propagation module, and performing a round of parameter optimization on the adaptive neighborhood propagation module under the supervision of the existing social information labels in the graph; in the self-adaptive neighborhood propagation module, the high-order neighborhood information and the low-order neighborhood information in the graph are fused by the invariant propagation layer, the self-adaptive neighborhood information is captured through self-adaptive propagation, a self-adaptive propagation step is generated, and the node social information label is predicted after the node characteristics are adjusted by the generated self-adaptive propagation step;
s4, extracting graph characteristic information again from the heterogeneous social network graph by using a self-adaptive neighborhood propagation module subjected to new parameter optimization, and then recalculating the clustering center of each current clustering cluster by using updated graph characteristic information, and repartitioning all nodes in the graph into a plurality of clustering clusters based on the new clustering centers;
s5, repeating the steps S3 and S4 continuously, performing iterative training on the self-adaptive neighborhood propagation module, inputting the heterogeneous social network diagram into the final self-adaptive neighborhood propagation module after training is finished, and performing social information label prediction on nodes without social information labels.
As a preference of the first aspect, the specific step of S2 is as follows:
s201, initializing graph feature information phi (X, A) = (X, A) for an input heterogeneous social network graph G, randomly selecting K nodes from the heterogeneous social network graph G, and taking node features and adjacent edge data of the K nodes as a clustering center point mu 12 ,...μ K ∈R n N is the node characteristic of the node and the total characteristic dimension of adjacent side data;
s202, respectively calculating the distances from node characteristics and adjacent side data to each clustering center point of all nodes in the heterogeneous social network graph G through an environment clustering module, and dividing each node into clusters where the closest clustering center point is located, thereby forming K clustering clusters G e ∈ε tr Each cluster G e Corresponds to one graph environment e, epsilon in the heterogeneous social network graph tr Is a set of all graph environments.
As a preference of the first aspect, in S3, the adaptive neighborhood propagation module includes a final layer invariant propagation layer, a generating network and an output network;
the output of the unchanged propagation layer of the first E [1, final ] layer is as follows:
H (l+1) =σ(((1-α l )H ll H (0) )((1-β l )I nl W (l) ))
wherein alpha is l And beta l For two superparameters representing weights, I n Is an identity map, W (l) Is the weight matrix of the first layer invariable propagation layer, and sigma is the activation function; h l For the input of the first invariable propagation layer, the output of the previous invariable propagation layer is adoptedLayer 1 invariant propagation layer, initial input set to Wherein W is a weight matrix, A k K-th order adjacency matrix, which is heterogeneous social network graph G,>processing k-order adjacency matrix A through MLP network k The obtained embedding, h X The embedding obtained by processing the node characteristic X through the MLP network;
the generation network generates the output of the network with initial input and all invariable propagation layers [ H ] (0) ,H (1) ,…,H (final) ]As input, outputting an adaptive propagation step probability matrix S with dimension of M multiplied by N through Gumbel-Softmax; wherein M is the number of nodes in the heterogeneous social network graph G, n=final+1, and each row of vectors in the matrix SEach corresponding to a node in the heterogeneous social network graph G representing the probability distribution of the best propagation step s in that node;
the output network is represented by sigma ([ H ] (0) ,H (1) ,...,H (final) ]X S) as input, outputting social information labels corresponding to each node in the heterogeneous social network graph G.
As a preference of the first aspect, the generating network and the output network each employ an MLP network.
As a preference of the first aspect, in S3, the specific steps of performing a round of parameter optimization on the adaptive neighborhood propagation module are as follows:
S301, inputting the heterogeneous social network graph G into a graph neural network-based adaptive neighborhood propagation module, and calculating a total loss function according to label prediction results of all marked nodes in each graph environment by the adaptive neighborhood propagation module:
wherein: e and Var represent the loss terms L for all graph environments, respectively e Is the expected and variance of (1); l (L) e Representing the loss term of graph environment e, which is formed by cluster G e Negative log likelihood loss of all marked node prediction results and KL divergence loss of the optimal propagation step;
s302, according to the calculated total loss function L p And (G; theta) carrying out gradient update on the learnable parameters in the adaptive neighborhood propagation module through back propagation to complete one round of training.
As a preferable aspect of the first aspect, in S301, a loss term L of the graph environment e e The calculation formula is as follows:
wherein: p is p θ (y|ANP (X, A)) is cluster G e Negative log likelihood loss of all labeled node predictors,representing the predicted optimal propagation step probability distribution of said generated network>KL divergence from the optimal probability distribution for the best propagation step.
As a preference of the first aspect, the specific step of S4 is as follows:
S401, extracting phi (X, A) =ANP (X, A) of graph characteristic information from the heterogeneous social network graph again by using an adaptive neighborhood propagation module ANP (,) subjected to new parameter optimization, and updating node characteristics and adjacent side data (X) of each node in the heterogeneous social network graph G i ,A i );
S402, recalculating each cluster G currently by using the updated graph characteristic information e Node characteristics and adjacent edge data (X) i ,A i ) Average value and serve as each cluster G e Is a new cluster center;
s403, recalculating the node characteristics of each node and the distance from adjacent edge data to each new cluster center point in the heterogeneous social network graph G, dividing each node into cluster clusters where the new cluster center point closest to the node is located, and updating K cluster clusters G e ∈ε tr
In a second aspect, the present invention provides a social label prediction system for heterogeneous social network distribution generalization, which includes the following steps:
the diagram construction module is used for constructing part of social network data with social information labels into a heterogeneous social network diagram, each node in the diagram represents a user, if a social relationship exists between the user and the user, edge connection is established between two corresponding user nodes, and if a social relationship does not exist between the user and the user, edge connection does not exist between the two corresponding user nodes;
The initial clustering module is used for initializing graph characteristic information by using node characteristics and adjacent side data of the heterogeneous social network graph, randomly selecting a plurality of nodes from the heterogeneous social network graph to determine a clustering center, dividing all nodes in the graph into a plurality of cluster clusters through the environment clustering module, and forming a graph environment in the heterogeneous social network graph by each cluster;
the invariant graph data representation learning module is used for inputting the clustered heterogeneous social network graph into the adaptive neighborhood propagation module based on the graph neural network, and carrying out a round of parameter optimization on the adaptive neighborhood propagation module under the supervision of the existing social information labels in the graph; in the self-adaptive neighborhood propagation module, the high-order neighborhood information and the low-order neighborhood information in the graph are fused by the invariant propagation layer, the self-adaptive neighborhood information is captured through self-adaptive propagation, a self-adaptive propagation step is generated, and the node social information label is predicted after the node characteristics are adjusted by the generated self-adaptive propagation step;
the cluster updating module is used for extracting the graph characteristic information again for the heterogeneous social network graph by utilizing the self-adaptive neighborhood propagation module after the new round of parameter optimization, then, calculating the cluster center of each current cluster by utilizing the updated graph characteristic information again, and dividing all nodes in the graph into a plurality of clusters again based on the new cluster center;
The iterative training and predicting module is used for continuously repeating the processes in the constant graph data representation learning module and the clustering updating module, performing iterative training on the self-adaptive neighborhood spreading module, inputting the heterogeneous social network graph into the final self-adaptive neighborhood spreading module after training is finished, and performing social information label prediction on nodes without social information labels.
In a third aspect, the present invention provides a computer readable storage medium, where a computer program is stored on the storage medium, where the computer program, when executed by a processor, implements a social label prediction method for heterogeneous social network distribution generalization according to any one of the first aspect.
In a third aspect, the present invention provides a computer electronic device comprising a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to implement the social label prediction method for heterogeneous social network distribution generalization according to any one of the first aspect when executing the computer program.
Compared with the prior art, the invention applies the graph neural network to heterogeneous social network prediction outside distribution, and provides a new constant neighborhood pattern learning (INPL) framework which aims at relieving the problem of distribution deviation on heterogeneous graphs. Specifically: 1) To alleviate the neighborhood pattern distribution bias problem on heterograms, the present invention proposes an adaptive neighborhood propagation (Adaptive Neighborhood Propagation, ANP) module, wherein an invariant propagation layer (Invariant Propagation Layer, IPL) is proposed to combine high-order and low-order neighborhood information, and adaptive propagation (Adaptive Propagation, AP) is used to capture the adaptive neighborhood information. 2) To mitigate distribution bias in an unknown test environment, the present invention proposes Invariant heterogeneous graph learning (Invariant Non-homophilous Graph Learning) to constrain adaptive neighborhood propagation, which learns Invariant graph representations over the iso-graph. The present invention contemplates an environmental clustering (Environment Clustering) module to learn multiple sub-graph partitions, while an invariant graph learning (Invariant Graph Representation Learning) module learns invariant graph representations based on the multiple partitioned sub-graphs. Compared with a common heterogeneous graph neural network algorithm, the method has stronger robustness and accuracy on test data outside the training set distribution in the heterogeneous social network.
Drawings
FIG. 1 is a schematic step diagram of a social label prediction method for heterogeneous social network distribution generalization.
Fig. 2 is a network architecture diagram of an adaptive neighborhood propagation module.
FIG. 3 is a schematic diagram of the modular composition of a social label prediction system for heterogeneous social network distribution generalization.
FIG. 4 is a flowchart of a training and testing method in an embodiment.
Detailed Description
The invention is further illustrated and described below with reference to the drawings and detailed description.
As shown in FIG. 1, in a preferred embodiment of the present invention, a social label prediction method for heterogeneous social network distribution-oriented generalization is provided, which is used for predicting social information labels of unlabeled users in social network data. The prediction method specifically comprises the following steps:
s1, constructing part of social network data with social information labels into a heterogeneous social network graph G, wherein each node in the graph G represents a user, if a social relationship exists between the user and the user, an edge connection is established between two corresponding user nodes, and if no social relationship exists between the user and the user, no edge connection exists between the two corresponding user nodes.
In the invention, the social network data are data reflecting social behaviors of the user, such as adding a friend by the user, deleting a friend by the user, and the like, and can provide composition basis for constructing the social network. The existence of the social relationship and the absence of the social relationship between the two users respectively indicate the existence of the association relationship and the absence of the association relationship between the two users, and the social information label of the users is a classification type label of the users. The social information label of the user is a classification type label when the user is portrait, and the specific label form can be determined according to the actual application scene, such as gender of the user, favorite music type label of the user, research field label of the user, and the like. In addition, the association relationship between the users may be specifically determined according to the actual application scenario, for example, in the subsequent embodiment, the tag form is the gender of the user, and the association relationship between the users may represent whether the two users are friends, for example, if the users are friends, the nodes represented by the users and the nodes represented by the other users have edges as connection, but not friends, and no edges.
Aiming at the distributed heterogeneous problem in the heterogeneous social network graph G, the invention relates to a Graph Neural Network (GNN) -based adaptive neighborhood propagation module (Adaptive Neighborhood Propagation, ANP). As shown in fig. 2, the ANP module includes a final layer invariable propagation layer (Invariant Propagation Layer, IPL), a generation network and an output network, and the network structures of the three parts are described in detail below.
11 Constant propagation layer)
In order to combine the high-order and low-order neighborhood information, the invention designs an arbitrary first E [1, final ] layer invariable propagation layer as follows:
H (l+1) =σ(((1-α l )H ll H (0) )((1-β l )I nl W (l) ))
wherein H is (l+1) Alpha, the output of the first layer invariable propagation layer l And beta l For two superparameters representing weights, I n Is an identity map, W (l) Is the weight matrix of the first layer invariable propagation layer, and sigma is the activation function; h l For the input of the first layer invariable propagation layer, the output of the previous layer invariable propagation layer is adopted, and for the first layer invariable propagation layer, the initial input is set asWherein W is a weight matrix, A k K-th order adjacency matrix, which is heterogeneous social network graph G,>processing k-order adjacency matrix A through MLP network k The obtained embedding, h X Is an embedding obtained by processing node characteristics X through the MLP network. h is a X And->The calculation formula of (2) is as follows:
h X =MLP X (X)∈R d×n
wherein:MLP X are all different MLP networks.
12 Generating a network
Generating a network with initial input and output of all invariant propagation layers [ H ] (0) ,H (1) ,…,H (final) ]As input, an adaptive propagation step probability matrix S with dimension mxn is output by gummel-Softmax. Wherein M is the number of nodes in the heterogeneous social network graph G, n=final+1, and each row of vectors in the matrix SEach corresponds to a node in the heterogeneous social network graph G representing the probability distribution of the best propagation step s in that node. In an embodiment of the invention, the generation network is implemented using an MLP network, denoted +.>Mapping functions can also be used->And (3) representing.
The generating network actually realizes an adaptive propagation (Adaptive Propagation, AP) mechanism, namely, the generating network learns an adaptive propagation step s, and can control the optimal propagation step of each node, namely, each node specifically uses the output of the unchanged propagation layer to output the subsequent output network for social information label prediction. Since there is no way to directly obtain the optimal propagation of neighborhood information in practice. To capture adaptive neighborhood information, the present invention generates a network MLP by generating a network MLP generator Learning an adaptive propagation step s, which learning process can be regarded as optimizing the propagation distribution by inference And learn the parameter θ of the ANP module through the loss function. In the ANP module, the invariant propagation layer IPL is used for combining high-order and low-order neighborhood information, and the adaptive propagation AP is used for capturing adaptive neighborhood information, thereby generating a network +.>And learning and generating an adaptive propagation step s of each node. However, the optimal propagation step s is discrete and inseparable, making direct optimization difficult if ordinary Softmax is employed. Therefore, the invention adopts Gumbel-Softmax sampling method, namely generating network MLP generator The original non-differentiable samples in the discrete distribution are replaced with differentiable samples in the corresponding gummel-Softmax distribution.
The above-described generation network of the present inventionEstimate of optimal propagation step s by Gumbel-Softmax +.>From a classification profile, discrete variation profile +.>The parameter of (2) is->It can be expressed as:
wherein, the liquid crystal display device comprises a liquid crystal display device,is an i.i.d. sample sampled from Gumbel (0, 1) distribution, gamma g Softmax temperature, japan>Is sample->K-th value of>Representation->Is the (a) th k A number of indexes corresponding to a. Sup. Th k -1 layer number. When τ is>At 0, gumbel-Softmax distribution is smooth, so the network is generated +.>Parameter of->Optimization can be done by standard back propagation.
13 A) output network
Output network with sigma ([ H) (0) ,H (1) ,…,H (final) ]X S) as input, in the input [ H ] (0) ,H (1) ,…,H (final) ]The final output of each node is in fact feature filtered with an optimal propagation step S through matrix multiplication of S. The output network may predict social information labels corresponding to each node in the heterogeneous social network graph G based on the final features corresponding to the optimal propagation step s. In the embodiment of the invention, the output network is implemented by using an MLP network, which is denoted as MLP final
The Adaptive Neighborhood Propagation (ANP) module provided by the invention can relieve the neighborhood pattern distribution transfer problem on the heterograms by capturing the adaptive neighborhood information. However, the test environment is always unknown and unpredictable, with the class distribution and neighborhood pattern distribution being different. This unknown distribution variation can over-optimize GNNs on labeled training samples, which hampers their robustness, resulting in poor generalization of GNNs. The present invention therefore proposes an Invariant heterogeneous graph learning (Invariant Non-homophilous Graph Learning) strategy to overcome this unknown distribution shift, which learns Invariant graph representations on Non-isomorphic graphs. To overcome these problems, two modules form part of the above-described solution strategy, the first being an environmental clustering (Environment Clustering) module that learns multiple sub-graph partitions and the second being a constant graph learning (Invariant Graph Representation Learning) module that learns constant graph representations based on the multiple partitioned sub-graphs. The invariant heterograph learning may constrain the ANP to mitigate distribution shifts in an unknown environment. These two modules are described in detail below:
21 Environment clustering (Environment Clustering) module
The environment clustering module takes a single graph as input and outputs a plurality of graph environments. The goal of the environment clustering module is to increase the similarity of nodes in the same environment while reducing the bias between different environments. Thus, the nodes should be clustered by variant relationships between the nodes and the target labels. The changed information Φ (X, a) is updated to Φ (X, a) =anp (X, a) by ANP. The initial moment has randomly selected K cluster center points mu in the previous step S2 12 ,...μ K ∈R n . Thus at the beginning of the optimization, there are K clusters G 1 ,G 2 ...G K ∈ε tr . The invention can select K-means as an environment clustering method, which is one of the representative methods of unsupervised clustering. The objective function of the environmental clustering module is to minimize the sum of the distances between all nodes and the relevant cluster center points. That is, each node i in graph G is assigned to cluster G closest to the cluster center e
G i =argmin e ‖Φ(X i ,A i )-μ e2 ,e∈1,2,...,K
Where e is the subscript of the cluster, Y is the label of the graph data G, Φ is the graph feature after the graph data extraction feature, and Φ (X, a) = (X, a) is initialized. X is X i Is the node characteristic of node i in the graph G, A i Is the adjacent edge data of node i in graph G, mu e Is the cluster center of the environment e.
In actual execution, for each environment G e ∈ε tr Cluster center mu e The updates may be made according to the following general formula:
wherein m is the total number of nodes in the graph G, G i Indicating the environment to which node i belongs, l is a boolean function that returns 1 when the condition is true and returns 0 when the condition is false. The above general formula effectively assigns each node i in graph G to the cluster closest to the cluster center.
22 Constant pattern learning (Invariant Graph Representation Learning)
To learn a invariant graph representation, an invariant graph learning module formulates a plurality of partitioned sub-graphsAs input, the nodes of each environment are predicted using an adaptive neighborhood propagation (Adaptive Neighborhood Propagation, ANP) module, while the variance term is used to penalize the loss function. The loss function of INPL is:
wherein: e and Var represent the loss terms L for all graph environments, respectively e Is the expected and variance of (1); l (L) e Representing the loss term of graph environment e, which is formed by cluster G e Negative of all marked node prediction results inLog likelihood loss and KL divergence loss for the best propagation step. With such a penalty, the ANP may be constrained to mitigate distribution shifts in an unknown environment.
Based on the above description of the constant heterogeneous diagram learning strategy, the specific training and prediction process of the ANP module in the present invention will be described in detail according to steps S2 to S5.
S2, initializing graph characteristic information by using node characteristics and adjacent side data of the heterogeneous social network graph, randomly selecting a plurality of nodes from the heterogeneous social network graph to determine a clustering center, dividing all nodes in the graph into a plurality of cluster clusters through an environment cluster (Environment Clustering) module, and forming a graph environment in the heterogeneous social network graph by each cluster.
In the embodiment of the present invention, the specific steps of the step S2 are as follows:
s201, initializing graph feature information phi (X, A) = (X, A) for an input heterogeneous social network graph G, randomly selecting K nodes from the heterogeneous social network graph G, and taking node features and adjacent edge data of the K nodes as a clustering center point mu 12 ,...μ K ∈R n N is the node characteristic of the node and the total characteristic dimension of the adjacent edge data.
It should be noted that, the value of K may be determined by optimizing according to the actual user category condition, which belongs to the super parameter.
S202, respectively calculating the distances from node characteristics and adjacent side data to each clustering center point of all nodes in the heterogeneous social network graph G through an environment clustering module, and dividing each node into clusters where the closest clustering center point is located, thereby forming K clustering clusters G e ∈ε tr Each cluster G e Corresponds to one graph environment e, epsilon in the heterogeneous social network graph tr Is a set of all graph environments.
S3, inputting the clustered heterogeneous social network graph into a graph neural network-based adaptive neighborhood propagation module, and performing a round of parameter optimization on the adaptive neighborhood propagation module under the supervision of the existing social information labels in the graph; in the self-adaptive neighborhood propagation module, the high-order neighborhood information and the low-order neighborhood information in the graph are fused by the invariant propagation layer, the self-adaptive neighborhood information is captured through self-adaptive propagation, a self-adaptive propagation step is generated, and the node social information label is predicted after the node characteristics are adjusted by the generated self-adaptive propagation step.
In the embodiment of the present invention, in the step S3, the specific steps for performing a round of parameter optimization on the adaptive neighborhood propagation module are as follows:
s301, inputting the heterogeneous social network graph G into a graph neural network-based adaptive neighborhood propagation module, and calculating a total loss function according to label prediction results of all marked nodes in each graph environment by the adaptive neighborhood propagation module:
in an embodiment of the present invention, the loss term L of the graph environment e is e The calculation formula is as follows:
Wherein: p is p θ (y|ANP (X, A)) is cluster G e Negative log likelihood loss (NLL loss) of all labeled node predictors,representing best propagation step probability distribution resulting from generating network predictionsAnd p(s) n ) KL divergence between. Wherein p(s) n ) The optimal probability distribution, which represents the optimal propagation step, can generally be achieved using a normal distribution.
In particular, it is noted that due to one cluster G e The marked nodes with labels or the unmarked nodes without labels may exist in the model, and the loss item L is calculated e When all the already used products are neededNodes are annotated to calculate losses, while non-annotated nodes do not need to participate in the loss calculation.
S302, according to the calculated total loss function L p And (G; theta) carrying out gradient update on the learnable parameters in the adaptive neighborhood propagation module through back propagation to complete one round of training.
S4, extracting graph characteristic information again from the heterogeneous social network graph by using the self-adaptive neighborhood propagation module subjected to new parameter optimization, and then, recalculating the clustering center of each current clustering cluster by using the updated graph characteristic information, and repartitioning all nodes in the graph into a plurality of clustering clusters based on the new clustering centers.
In the embodiment of the present invention, the specific steps of the step S4 are as follows:
s401, extracting phi (X, A) =ANP (X, A) of graph characteristic information from the heterogeneous social network graph again by using an adaptive neighborhood propagation module ANP (,) subjected to new parameter optimization, and updating node characteristics and adjacent side data (X) of each node in the heterogeneous social network graph G i ,A i );
S402, the environment clustering (Environment Clustering) module recalculates each cluster G currently by using the updated graph characteristic information e Node characteristics and adjacent edge data (X) i ,A i ) Average value and serve as each cluster G e Is a new cluster center;
s403, recalculating the node characteristics of each node and the distance from adjacent edge data to each new cluster center point in the heterogeneous social network graph G, dividing each node into cluster clusters where the new cluster center point closest to the node is located, and updating K cluster clusters G e ∈ε tr
S5, repeating the steps S3 and S4 continuously, performing iterative training on the self-adaptive neighborhood propagation module, inputting the heterogeneous social network diagram into the final self-adaptive neighborhood propagation module after training is finished, and performing social information label prediction on nodes without social information labels.
Based on the same inventive concept, another preferred embodiment of the present invention further provides a social label prediction system facing heterogeneous social network distribution generalization, which corresponds to the social label prediction method facing heterogeneous social network distribution generalization provided in the above embodiment. As shown in fig. 3, the social label prediction system for heterogeneous social network distribution generalization includes three basic modules, which are respectively:
The diagram construction module is used for constructing part of social network data with social information labels into a heterogeneous social network diagram, each node in the diagram represents a user, if a social relationship exists between the user and the user, edge connection is established between two corresponding user nodes, and if a social relationship does not exist between the user and the user, edge connection does not exist between the two corresponding user nodes;
the initial clustering module is used for initializing graph characteristic information by using node characteristics and adjacent side data of the heterogeneous social network graph, randomly selecting a plurality of nodes from the heterogeneous social network graph to determine a clustering center, dividing all nodes in the graph into a plurality of cluster clusters through the environment clustering module, and forming a graph environment in the heterogeneous social network graph by each cluster;
the invariant graph data representation learning module is used for inputting the clustered heterogeneous social network graph into the adaptive neighborhood propagation module based on the graph neural network, and carrying out a round of parameter optimization on the adaptive neighborhood propagation module under the supervision of the existing social information labels in the graph; in the self-adaptive neighborhood propagation module, the high-order neighborhood information and the low-order neighborhood information in the graph are fused by the invariant propagation layer, the self-adaptive neighborhood information is captured through self-adaptive propagation, a self-adaptive propagation step is generated, and the node social information label is predicted after the node characteristics are adjusted by the generated self-adaptive propagation step;
The cluster updating module is used for extracting the graph characteristic information again for the heterogeneous social network graph by utilizing the self-adaptive neighborhood propagation module after the new round of parameter optimization, then, calculating the cluster center of each current cluster by utilizing the updated graph characteristic information again, and dividing all nodes in the graph into a plurality of clusters again based on the new cluster center;
the iterative training and predicting module is used for continuously repeating the processes in the constant graph data representation learning module and the clustering updating module, performing iterative training on the self-adaptive neighborhood spreading module, inputting the heterogeneous social network graph into the final self-adaptive neighborhood spreading module after training is finished, and performing social information label prediction on nodes without social information labels.
Because the principle of solving the problem of the social label prediction system for heterogeneous social network distribution generalization in the embodiment of the present invention is similar to that of the social label prediction method for heterogeneous social network distribution generalization in the above embodiment of the present invention, the specific implementation form of each module of the system in the embodiment may also be referred to the specific implementation form of the above method, and the repetition is omitted.
Similarly, based on the same inventive concept, another preferred embodiment of the present invention further provides an electronic device corresponding to the social label prediction method for heterogeneous social network distribution generalization provided in the above embodiment, where the electronic device includes a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to implement the social label prediction method for heterogeneous social network distribution generalization as described above when executing the computer program.
Further, the logic instructions in the memory described above may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention.
Therefore, based on the same inventive concept, another preferred embodiment of the present invention further provides a computer readable storage medium corresponding to the social label prediction method for heterogeneous social network distribution generalization provided in the foregoing embodiment, where the storage medium stores a computer program, and when the computer program is executed by a processor, the social label prediction method for heterogeneous social network distribution generalization described in the foregoing can be implemented.
Specifically, in the computer-readable storage medium of the above two embodiments, the stored computer program is executed by the processor, and the steps S1 to S5 described above may be executed.
It is understood that the storage medium may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one magnetic disk Memory. Meanwhile, the storage medium may be various media capable of storing program codes, such as a USB flash disk, a mobile hard disk, a magnetic disk or an optical disk.
It will be appreciated that the above-described processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also Digital signal processors (Digital SignalProcessing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
It should be further noted that, for convenience and brevity of description, specific working processes of the system described above may refer to corresponding processes in the foregoing method embodiments, which are not described herein again. In the embodiments of the present application, the division of steps or modules in the system and the method is only one logic function division, and other division manners may be implemented in actual implementation, for example, multiple modules or steps may be combined or may be integrated together, and one module or step may also be split.
The social label prediction method for heterogeneous social network distribution generalization in the foregoing embodiment is applied to a specific example to show a specific effect of the present application in heterogeneous social network prediction. Specific method steps are as described in the foregoing S1 to S5, and are not repeated, and only specific effects thereof are shown below.
Examples
This embodiment is implemented and validated on the disclosed heterogeneous friendship network data set Penn 94. The data set is from a student network at university of Facebook 100 in 2005, each node of which represents a student. The label of each node indicates the sex of the user and the edge indicates whether two students are friends. The nodes are characterized by profession, second profession/profession, bedroom/dormitory, grade and senior, and the dataset is made up of 41554 nodes. The task of the algorithm is to predict the gender of the student given the student's graph data information. The algorithm training and testing process is shown in fig. 4, which takes 48% of the dataset as the labeled training set, 32% of the dataset as the validation set, and the remainder as the unlabeled test set to be predicted.
In order to objectively evaluate the performance of the algorithm, the method is evaluated by using a prediction Accuracy (Accuracy) and is compared with a graph neural network algorithm GCN and a heterogeneous graph algorithm LINKX which are widely used at present.
The experimental results obtained in this example are shown in table 1:
table 1 graph prediction classification accuracy of graph data
The result shows that the classification method has higher accuracy rate compared with GCN and LINKX.
The above embodiment is only a preferred embodiment of the present invention, but it is not intended to limit the present invention. Various changes and modifications may be made by one of ordinary skill in the pertinent art without departing from the spirit and scope of the present invention. Therefore, all the technical schemes obtained by adopting the equivalent substitution or equivalent transformation are within the protection scope of the invention.

Claims (10)

1. A social label prediction method for heterogeneous social network distribution generalization is characterized by comprising the following steps:
s1, constructing part of social network data with social information labels into a heterogeneous social network diagram, wherein each node in the diagram represents a user, if a social relationship exists between the user and the user, an edge connection is established between two corresponding user nodes, and if a social relationship does not exist between the user and the user, an edge connection does not exist between the two corresponding user nodes;
S2, initializing graph characteristic information by using node characteristics and adjacent side data of the heterogeneous social network graph, randomly selecting a plurality of nodes from the heterogeneous social network graph to determine a clustering center, dividing all nodes in the graph into a plurality of clusters through an environment clustering module, and forming a graph environment in the heterogeneous social network graph by each cluster;
s3, inputting the clustered heterogeneous social network graph into a graph neural network-based adaptive neighborhood propagation module, and performing a round of parameter optimization on the adaptive neighborhood propagation module under the supervision of the existing social information labels in the graph; in the self-adaptive neighborhood propagation module, the high-order neighborhood information and the low-order neighborhood information in the graph are fused by the invariant propagation layer, the self-adaptive neighborhood information is captured through self-adaptive propagation, a self-adaptive propagation step is generated, and the node social information label is predicted after the node characteristics are adjusted by the generated self-adaptive propagation step;
s4, extracting graph characteristic information again from the heterogeneous social network graph by using a self-adaptive neighborhood propagation module subjected to new parameter optimization, and then recalculating the clustering center of each current clustering cluster by using updated graph characteristic information, and repartitioning all nodes in the graph into a plurality of clustering clusters based on the new clustering centers;
S5, repeating the steps S3 and S4 continuously, performing iterative training on the self-adaptive neighborhood propagation module, inputting the heterogeneous social network diagram into the final self-adaptive neighborhood propagation module after training is finished, and performing social information label prediction on nodes without social information labels.
2. The social label prediction method for heterogeneous social network distribution generalization according to claim 1, wherein the specific steps of S2 are as follows:
s201, initializing graph feature information phi (X, A) = (X, A) for an input heterogeneous social network graph G, randomly selecting K nodes from the heterogeneous social network graph G, and taking node features and adjacent edge data of the K nodes as a clustering center point mu 12 ,...μ K ∈R n N is the node characteristic of the node and the total characteristic dimension of adjacent side data;
s202, respectively calculating the distances from node characteristics and adjacent side data to each clustering center point of all nodes in the heterogeneous social network graph G through an environment clustering module, and dividing each node into clusters where the closest clustering center point is located, thereby forming K clustering clusters G e ∈ε tr Each cluster G e Corresponds to one graph environment e, epsilon in the heterogeneous social network graph tr Is a set of all graph environments.
3. The social label prediction method for heterogeneous social network distribution outward generalization according to claim 1, wherein in S3, the adaptive neighborhood propagation module comprises a final layer invariant propagation layer, a generation network and an output network;
the output of the unchanged propagation layer of the first E [1, final ] layer is as follows:
H (l+1) =σ(((1-α l )H ll H (0) )((1-β l )I nl W (l) ))
wherein alpha is l And beta l For two superparameters representing weights, I n Is an identity map, W (l) Is the weight matrix of the first layer invariable propagation layer, and sigma is the activation function; h l For the input of the first layer invariable propagation layer, the output of the previous layer invariable propagation layer is adopted, and for the first layer invariable propagation layer, the initial input is set as Wherein W is a weight matrix, A k K-th order adjacency matrix, which is heterogeneous social network graph G,>processing k-order adjacency matrix A through MLP network k The obtained embedding, h X The embedding obtained by processing the node characteristic X through the MLP network;
the generation network generates the output of the network with initial input and all invariable propagation layers [ H ] (0) ,H (1) ,...,H (final) ]As input, outputting an adaptive propagation step probability matrix S with dimension of M multiplied by N through Gumbel-Softmax; wherein M is the number of nodes in the heterogeneous social network graph G, n=final+1, and each row of vectors in the matrix SEach corresponding to a node in the heterogeneous social network graph G representing the probability distribution of the best propagation step s in that node;
The output network is represented by sigma ([ H ] (0) ,H (1) ,...,H (final) ]X S) as input, outputting social information labels corresponding to each node in the heterogeneous social network graph G.
4. The heterogeneous social network distribution-oriented generalization social label prediction method of claim 3, wherein the generating network and the output network both adopt an MLP network.
5. The social label prediction method for heterogeneous social network distribution generalization according to claim 3, wherein in S3, the specific steps of performing a round of parameter optimization on the adaptive neighborhood propagation module are as follows:
s301, inputting the heterogeneous social network graph G into a graph neural network-based adaptive neighborhood propagation module, and calculating a total loss function according to label prediction results of all marked nodes in each graph environment by the adaptive neighborhood propagation module:
wherein: e and Var represent the loss terms L for all graph environments, respectively e Is the expected and variance of (1); l (L) e Representing the loss term of graph environment e, which is formed by cluster G e Negative log likelihood loss of all marked node prediction results and KL divergence loss of the optimal propagation step;
s302, according to the calculated total loss function L p And (G; theta) carrying out gradient update on the learnable parameters in the adaptive neighborhood propagation module through back propagation to complete one round of training.
6. The social label prediction method for heterogeneous social network distribution generalization according to claim 1, wherein in S301, a loss term L of graph environment e e The calculation formula is as follows:
wherein: p is p θ (y|ANP (X, A)) is cluster G e Negative log likelihood loss of all labeled node predictors,representing the predicted optimal propagation step probability distribution of said generated network>KL divergence from the optimal probability distribution for the best propagation step.
7. The social label prediction method for heterogeneous social network distribution generalization according to claim 1, wherein the specific step of S4 is as follows:
s401, extracting phi (X, A) =ANP (X, A) of graph characteristic information from the heterogeneous social network graph again by using an adaptive neighborhood propagation module ANP (,) subjected to new parameter optimization, and updating node characteristics and adjacent side data (X) of each node in the heterogeneous social network graph G i ,A i );
S402, recalculating each cluster G currently by using the updated graph characteristic information e Node characteristics and adjacent edge data (X) i ,A i ) Average value and serve as each cluster G e Is a new cluster center;
s403, recalculating the node characteristics of each node and the distance from adjacent edge data to each new cluster center point in the heterogeneous social network graph G, dividing each node into cluster clusters where the new cluster center point closest to the node is located, and updating K cluster clusters G e ∈ε tr
8. A social label prediction system for heterogeneous social network distribution generalization is characterized by comprising the following steps:
the diagram construction module is used for constructing part of social network data with social information labels into a heterogeneous social network diagram, each node in the diagram represents a user, if a social relationship exists between the user and the user, edge connection is established between two corresponding user nodes, and if a social relationship does not exist between the user and the user, edge connection does not exist between the two corresponding user nodes;
the initial clustering module is used for initializing graph characteristic information by using node characteristics and adjacent side data of the heterogeneous social network graph, randomly selecting a plurality of nodes from the heterogeneous social network graph to determine a clustering center, dividing all nodes in the graph into a plurality of cluster clusters through the environment clustering module, and forming a graph environment in the heterogeneous social network graph by each cluster;
the invariant graph data representation learning module is used for inputting the clustered heterogeneous social network graph into the adaptive neighborhood propagation module based on the graph neural network, and carrying out a round of parameter optimization on the adaptive neighborhood propagation module under the supervision of the existing social information labels in the graph; in the self-adaptive neighborhood propagation module, the high-order neighborhood information and the low-order neighborhood information in the graph are fused by the invariant propagation layer, the self-adaptive neighborhood information is captured through self-adaptive propagation, a self-adaptive propagation step is generated, and the node social information label is predicted after the node characteristics are adjusted by the generated self-adaptive propagation step;
The cluster updating module is used for extracting the graph characteristic information again for the heterogeneous social network graph by utilizing the self-adaptive neighborhood propagation module after the new round of parameter optimization, then, calculating the cluster center of each current cluster by utilizing the updated graph characteristic information again, and dividing all nodes in the graph into a plurality of clusters again based on the new cluster center;
the iterative training and predicting module is used for continuously repeating the processes in the constant graph data representation learning module and the clustering updating module, performing iterative training on the self-adaptive neighborhood spreading module, inputting the heterogeneous social network graph into the final self-adaptive neighborhood spreading module after training is finished, and performing social information label prediction on nodes without social information labels.
9. A computer readable storage medium, wherein a computer program is stored on the storage medium, and when the computer program is executed by a processor, the social label prediction method for heterogeneous social network distribution generalization according to any one of claims 1 to 7 is implemented.
10. A computer electronic device comprising a memory and a processor;
the memory is used for storing a computer program;
The processor is configured to implement the social label prediction method for heterogeneous social network distribution generalization according to any one of claims 1 to 7 when executing the computer program.
CN202310720948.3A 2023-06-16 2023-06-16 Heterogeneous social network distribution outward generalization-oriented social label prediction method and system Pending CN116956081A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310720948.3A CN116956081A (en) 2023-06-16 2023-06-16 Heterogeneous social network distribution outward generalization-oriented social label prediction method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310720948.3A CN116956081A (en) 2023-06-16 2023-06-16 Heterogeneous social network distribution outward generalization-oriented social label prediction method and system

Publications (1)

Publication Number Publication Date
CN116956081A true CN116956081A (en) 2023-10-27

Family

ID=88445259

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310720948.3A Pending CN116956081A (en) 2023-06-16 2023-06-16 Heterogeneous social network distribution outward generalization-oriented social label prediction method and system

Country Status (1)

Country Link
CN (1) CN116956081A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117493490A (en) * 2023-11-17 2024-02-02 南京信息工程大学 Topic detection method, device, equipment and medium based on heterogeneous multi-relation graph

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117493490A (en) * 2023-11-17 2024-02-02 南京信息工程大学 Topic detection method, device, equipment and medium based on heterogeneous multi-relation graph
CN117493490B (en) * 2023-11-17 2024-05-14 南京信息工程大学 Topic detection method, device, equipment and medium based on heterogeneous multi-relation graph

Similar Documents

Publication Publication Date Title
Ding et al. RecNet: A deep neural network for personalized POI recommendation in location-based social networks
Cortez et al. Using sensitivity analysis and visualization techniques to open black box data mining models
Kong et al. A balanced power consumption algorithm based on enhanced parallel cat swarm optimization for wireless sensor network
Tabouy et al. Variational inference for stochastic block models from sampled data
CN110929046B (en) Knowledge entity recommendation method and system based on heterogeneous network embedding
Lu et al. GLR: A graph-based latent representation model for successive POI recommendation
Lu CNN Convolutional layer optimisation based on quantum evolutionary algorithm
CN113962358B (en) Information diffusion prediction method based on time sequence hypergraph attention neural network
Feng et al. A hierarchical multi-label classification method based on neural networks for gene function prediction
Gasimov et al. Separation via polyhedral conic functions
CN115293919B (en) Social network distribution outward generalization-oriented graph neural network prediction method and system
Bien et al. Non-convex global minimization and false discovery rate control for the TREX
Yang et al. Cost-effective incremental deep model: Matching model capacity with the least sampling
CN112380344A (en) Text classification method, topic generation method, device, equipment and medium
Kumar et al. Variance-based harmony search algorithm for unimodal and multimodal optimization problems with application to clustering
CN116956081A (en) Heterogeneous social network distribution outward generalization-oriented social label prediction method and system
Shakibian et al. Multi-kernel one class link prediction in heterogeneous complex networks
CN110717116B (en) Link prediction method and system of relational network, equipment and storage medium
Kim et al. Anytimenet: Controlling time-quality tradeoffs in deep neural network architectures
CN110929172A (en) Information selection method and device, electronic equipment and readable storage medium
Bauckhage et al. Kernel archetypal analysis for clustering web search frequency time series
Liu et al. A data classification method based on particle swarm optimisation and kernel function extreme learning machine
Mohi ud din et al. A review of challenges and solutions in the design and implementation of deep graph neural networks
Saranya et al. Hybrid global sensitivity analysis based optimal attribute selection using classification techniques by machine learning algorithm
Kumar et al. Gene expression data clustering using variance-based harmony search algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination