Open set cross-network node classification method and device

Through the methods of adversarial training and clustered self-training, the problems of new categories processing and boundary alignment in open set cross-network node classification are solved, and accurate detection of unknown categories nodes in the target network and correct classification of known categories nodes are achieved.

CN119939320AActive Publication Date: 2025-05-06HAINAN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510126125.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-27
Publication Date
2025-05-06
Estimated Expiration
2045-01-27

AI Technical Summary

Technical Problem

The existing cross-network node classification method mainly targets the closed set assumption and cannot effectively deal with the situation where the target network contains new categories that do not appear in the source network, resulting in classification boundary alignment problems and negative migrations in the open set cross-network node classification.

Method used

An open set cross-network node classification method is adopted, and adversarial training is performed using graph neural network encoder and neighborhood aggregation node classifier. First, a rough separation of known categories and unknown categories is separated, and then through clustering and pseudo-label self-training, the boundaries are gradually refined and the adversarial domain alignment of unknown categories is excluded.

Benefits of technology

The problems of boundary alignment and negative migration in the open set cross-network node classification are effectively solved, and accurate detection of unknown categories of nodes in the target network and correct classification of known categories of nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119939320A_ABST
    Figure CN119939320A_ABST
Patent Text Reader

Abstract

The invention discloses an open set cross-network node classification method and device, relates to the field of machine learning, designs a framework of separation first and domain adaptation second, and comprises the following steps: constructing a rough boundary through adversarial learning to separate an unknown category and a known category, then distributing a pseudo label to iteratively train a model in a self-training mode, and finally, constructing a domain adaptive model; a more accurate boundary is generated for separating a known category from an unknown category step by step, then in a domain adaptation stage, negative domain adaptation coefficients are allocated to nodes of the unknown category, positive domain adaptation coefficients are allocated to nodes of the known category, so that the nodes of the known category of a target network are aligned with a source network, and the target network is further optimized. And nodes of unknown categories in the target network are pushed away from the source network, so that countermeasure domain alignment of the unknown categories is eliminated, and high-accuracy classification of open set cross-network nodes is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine learning technology, and in particular to an open set cross-network node classification method and device. Background Art

[0002] In graph data analysis, labels are often expensive, limited, or even unavailable. Cross-network node classification has received extensive attention in the field of graph machine learning in recent years. Its goal is to transfer knowledge learned from a source network with rich node labels to predict node labels in another target network that lacks labels. Existing cross-network node classification methods are almost all designed for the closed set assumption, which requires that the source network and the target network have exactly the same category label space. However, in real-world applications, the target network may contain new categories that have not appeared in the source network. For example, in the cross-platform online social network user interest prediction scenario, users in the newly formed target social network may contain new interest categories that do not appear in the mature source social network.

[0003] like Figure 1 As shown in the figure, in the open set cross-network node classification problem, the target network contains not only all the known categories in the source network, but also the "unknown" categories that do not appear in the source network. The purpose of the open set cross-network node classification problem is: 1. Classify the nodes in the target network that belong to the known categories of the source network into the corresponding known categories; 2. Detect the nodes in the target network that belong to the "unknown" category.

[0004] There are two major challenges in solving the above open set cross-network node classification problem:

[0005] 1. Since the target network is completely unlabeled, we cannot know which nodes in the target network belong to the known categories that have appeared in the source network, and which nodes belong to the "unknown" categories that have appeared in the target network. Therefore, how to construct a boundary to separate the nodes belonging to the known categories and the nodes belonging to the "unknown" categories in the target network is a major challenge in solving the open set cross-network node classification problem;

[0006] 2. Distribution differences between different networks will hinder the direct application of models trained on the source network to the target network. In the open set cross-network node classification problem, since the target network has "unknown" categories that do not appear in the source network, if the distribution of the source network and the target network is directly aligned as in the previous closed set cross-network node classification method, there will be a problem, that is, the distribution of the unknown categories of the target network will be aligned with the distribution of the known categories of the source network, resulting in negative transfer and increasing the difficulty of identifying nodes of unknown categories in the target network. Therefore, how to align the distribution of the target network with the distribution of the source network under the condition of excluding the unknown categories of the target network is another major challenge in solving the open set cross-network node classification problem. Summary of the invention

[0007] Based on this, it is necessary to provide an open set cross-network node classification method and device to address the above technical problems, which performs well in the open set cross-network node classification problem.

[0008] In a first aspect, the present application provides an open set cross-network node classification method. The method comprises:

[0009] Use the graph neural network encoder to obtain node embedding based on the attributes and adjacency matrix of the nodes in the target network;

[0010] Use the neighborhood aggregation node classifier to obtain the classification prediction probability of the node based on the node embedding;

[0011] In the separation phase, adversarial training is performed on the graph neural network encoder and the neighborhood aggregation node classifier to roughly separate known categories from unknown categories, and the nodes are marked with classification labels of known categories or unknown categories;

[0012] In the domain adaptation phase, based on the nodes of known categories in the source network and the nodes with unknown classification labels in the target network, the nodes in the target network are clustered and the nodes are labeled with cluster labels of known or unknown categories; pseudo labels are assigned to the nodes based on the classification labels and cluster labels, and the graph neural network encoder and neighborhood aggregation node classifier are iteratively trained in a self-training manner based on the pseudo labels;

[0013] The nodes in the target network are classified based on the trained graph neural network encoder and neighborhood aggregation node classifier.

[0014] In one embodiment, the neighborhood aggregation node classifier is constructed using a single-layer multi-head attention network, and the output dimension of the neighborhood aggregation node classifier is 1 more than the number of known categories in the source network.

[0015] In one embodiment, adversarial training of a graph neural network encoder and a neighborhood aggregation node classifier includes:

[0016] The neighborhood aggregation node classifier is trained so that the classification prediction probability of each node in the target network belonging to an unknown category by the neighborhood aggregation node classifier is close to a fixed threshold between 0 and 1; the graph neural network encoder is trained to maximize the error rate of the neighborhood aggregation node classifier.

[0017] In one embodiment, clustering nodes in the target network based on nodes of known categories in the source network and nodes with classification labels of unknown categories in the target network includes:

[0018] Clustering the nodes in the target network according to the node embedding to obtain several clusters, including several clusters corresponding to each known category in the source network and one cluster corresponding to the unknown category;

[0019] The initial centroid of the cluster corresponding to the unknown category is determined by the unknown category node set, and the nodes in the unknown category node set are selected from the nodes in the target network according to the classification prediction probability of the unknown category.

[0020] In one embodiment, assigning pseudo labels to nodes based on classification labels and cluster labels includes:

[0021] When the classification label and cluster label of a node are consistent, a pseudo label is assigned to the node.

[0022] In one embodiment, the method further comprises:

[0023] Based on the pseudo labels, nodes of unknown categories are assigned negative domain adaptation coefficients, and nodes of known categories are assigned positive domain adaptation coefficients.

[0024] In a second aspect, the present application also provides an open set cross-network node classification device. The device includes:

[0025] Graph neural network encoder, used to obtain node embeddings based on the attributes and adjacency matrix of nodes in the target network;

[0026] Neighborhood aggregation node classifier, used to obtain the classification prediction probability of the node based on the node embedding;

[0027] An adversarial domain alignment module is used to perform adversarial training on the graph neural network encoder and the neighborhood aggregation node classifier in the separation stage, perform rough separation of known categories and unknown categories, and mark the nodes with classification labels of known categories or unknown categories; and, in the domain adaptation stage, cluster the nodes in the target network based on the nodes of known categories in the source network and the nodes with classification labels of unknown categories in the target network, and mark the nodes with cluster labels of known categories or unknown categories; assign pseudo labels to the nodes based on the classification labels and cluster labels, and iteratively train the graph neural network encoder and the neighborhood aggregation node classifier in a self-training manner according to the pseudo labels;

[0028] The output module is used to classify the nodes in the target network based on the trained graph neural network encoder and neighborhood aggregation node classifier.

[0029] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above-mentioned open set cross-network node classification method when executing the computer program.

[0030] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above-mentioned open set cross-network node classification method when executed by a processor.

[0031] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the steps in the above open set cross-network node classification method when executed by a processor.

[0032] The above-mentioned open set cross-network node classification method and device use a graph neural network encoder to obtain node embedding according to the attributes and adjacency matrix of the nodes in the target network; use a neighborhood aggregation node classifier to obtain the classification prediction probability of the node according to the node embedding; in the separation stage, the graph neural network encoder and the neighborhood aggregation node classifier are adversarially trained to roughly separate known categories and unknown categories, and mark the nodes with classification labels of known categories or unknown categories; in the domain adaptation stage, based on the nodes of known categories in the source network and the nodes with classification labels of unknown categories in the target network, the nodes in the target network are clustered, and the nodes are marked with clustering labels of known categories or unknown categories; pseudo-labels are assigned to the nodes based on the classification labels and clustering labels, and the graph neural network encoder and the neighborhood aggregation node classifier are iteratively trained in a self-training manner according to the pseudo-labels; and the classification of the nodes in the target network is realized based on the trained graph neural network encoder and the neighborhood aggregation node classifier. The present invention designs a framework of separation followed by domain adaptation. First, a rough boundary is constructed through adversarial learning to separate unknown categories from known categories. Then, pseudo labels are assigned to iteratively train the model in a self-training manner, and a more precise boundary is gradually generated for separating known categories from unknown categories. This can achieve adversarial domain alignment that excludes unknown categories, and further realize effective, reliable and accurate classification of open sets across network nodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A schematic diagram of classifying open sets across network nodes in one embodiment;

[0034] Figure 2 FIG. 4 is a structural block diagram of a UAGA model in an embodiment. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0036] Existing cross-network node classification methods are generally based on the closed set assumption, which requires that the source network and the target network share exactly the same category space. However, in real-world application scenarios, this closed set assumption is difficult to guarantee. In order to break through the limitations of the closed set assumption, this paper proposes an unknown-excluded adversarial graph domain alignment (UAGA) model for a more realistic and novel open set cross-network node classification problem. Figure 2 As shown in the figure, the UAGA model includes three important modules, namely, graph neural network encoder, neighborhood aggregation node classifier and domain discriminator.

[0037] Based on the above model, an embodiment of the present application provides an open set cross-network node classification method, which mainly includes two steps. The first is a coarse separation of known categories and unknown categories based on adversarial learning, and the second is adversarial domain adaptation based on excluding unknown categories.

[0038] Specifically, the open set cross-network node classification method mainly includes:

[0039] S102, using a graph neural network encoder to obtain node embedding according to the attributes and adjacency matrix of the nodes in the target network;

[0040] S104, using a neighborhood aggregation node classifier to obtain a classification prediction probability of the node according to the node embedding;

[0041] S106, in the separation stage, adversarial training is performed on the graph neural network encoder and the neighborhood aggregation node classifier, known categories and unknown categories are roughly separated, and the nodes are marked with classification labels of known categories or unknown categories;

[0042] S108, in the domain adaptation stage, based on the nodes of known categories in the source network and the nodes of unknown categories in the target network, the nodes in the target network are clustered, and the nodes are marked with cluster labels of known categories or unknown categories; pseudo labels are assigned to the nodes based on the classification labels and cluster labels, and the graph neural network encoder and the neighborhood aggregation node classifier are iteratively trained in a self-training manner according to the pseudo labels;

[0043] S110, classifying the nodes in the target network based on the trained graph neural network encoder and neighborhood aggregation node classifier.

[0044] In S108, a domain discriminator composed of a multi-layer perceptron is introduced to predict whether the node comes from the target network or the source network, and the graph neural network encoder and the domain discriminator are jointly trained according to the pseudo label. Accordingly, in S110, the trained domain discriminator, the trained graph neural network and the neighborhood aggregation node classifier together constitute the trained UAGA model.

[0045] Existing cross-network node classification methods are generally based on the closed set assumption, which requires that the source network and the target network share exactly the same category space. However, in real-world application scenarios, this closed set assumption is difficult to guarantee. In order to break through the limitations of the closed set assumption, this embodiment solves a more realistic and novel open set cross-network node classification problem, in which the target network contains not only all the known categories in the source network, but also additional unknown categories. The goal of the open set cross-network node classification problem is to classify the nodes in the target network that belong to the known categories of the source network into the corresponding known categories, and detect the nodes in the target network that belong to the unknown categories.

[0046] The UAGA model adopts a training strategy of first separation and then domain adaptation, that is, first roughly separate the nodes of known categories and the nodes of unknown categories, and then perform adversarial domain alignment to exclude the unknown categories, effectively detect the nodes belonging to the unknown categories in the target network, and classify the nodes of known categories into the corresponding known categories, solving the classification problem of open set cross-network nodes.

[0047] In one embodiment, an open set cross-network node classification method includes:

[0048] Step 1: Roughly separate known categories and unknown categories based on adversarial learning.

[0049] Step 1.1 The graph neural network encoder is constructed by the graph attention network to learn the node v i The graph neural network encoder adaptively aggregates the attributes of its neighbors and itself:

[0050]

[0051] in, is node v i and v i The adaptive edge weights of Represents node v i The attribute vector of . W are all learnable parameters, h i is node v i The embedded representation of .

[0052] Step 1.2 To fully exploit the homogeneity assumption, we use a single-layer multi-head graph attention network to construct a K+1-dimensional node classifier to adaptively aggregate the predicted probabilities of the node itself and its neighbors:

[0053]

[0054] in, is node v i The predicted label probability vector, the first K dimensions correspond to the probability of belonging to a certain category in the known categories, and the K+1th dimension corresponds to the probability of belonging to an unknown category, W c is a learnable parameter. In the UAGA model, whether in the training phase or the testing phase, we use formula (2) to obtain the final predicted label of each node.

[0055] Step 1.3 constructs the node classification loss using the cross entropy loss of Softmax based on the predicted probability of the node classifier and the known node labels in the source network:

[0056]

[0057] in, Indicates the number of nodes in the source network. The true category label belongs to the kth category, otherwise, Represents the node classifier predicting the node The probability of belonging to the kth class. Minimize the loss Class-discriminative node embeddings can be learned to partition nodes of different classes.

[0058] Step 1.4 In the open set cross-network node classification problem, we need to detect nodes belonging to unknown categories in the target network. We use adversarial learning to construct a rough boundary that separates the known and unknown categories of the target network. On the one hand, we train a K+1-dimensional neighborhood aggregation node classifier so that each target network node The predicted probability of the K+1th dimension (the predicted probability belonging to the unknown category) is as equal to the fixed threshold μ as possible, that is, Where 0<μ<1, the fixed threshold μ can be regarded as the boundary threshold between known categories and unknown categories. On the other hand, the graph neural network encoder is trained to maximize the error rate of the neighborhood aggregation node classifier in one of the following two ways, that is, let As far as possible, it is not equal to μ: Method 1) Let As large as possible, so that the node Classify as unknown category; Method 2) Let As small as possible, so that the node Classify into some known category.

[0059] Step 1.5 uses binary cross entropy loss to define the recognition loss of unknown categories:

[0060]

[0061] in represents the number of nodes in the target network, and μ is set to 0.5.

[0062] Step 1.6 The adversarial training of the graph neural network encoder and the neighborhood aggregation node classifier can be performed based on the following optimization objectives:

[0063]

[0064] Among them, θ C is the learnable parameter of the graph neural network encoder, θ G is the learnable parameter of the neighborhood aggregation node classifier. In order to update θ C and θ G , we insert a gradient reversal layer to convert the sign of the gradient during the back-propagation process. After step 1, the neighborhood aggregation node classifier learns a rough boundary separating known categories from unknown categories, and the graph neural network encoder makes the nodes in the target network as far away from this boundary as possible.

[0065] Step 2 is based on adversarial domain adaptation that excludes unknown categories.

[0066] Step 2.1 Since the target network has no labels at all in the cross-network node classification problem, we cannot know which nodes in the target network belong to the unknown category. Therefore, we need to assign pseudo labels to the nodes in the target network first. First, the node embedding of the target network is used as input, and the K-means clustering algorithm is used to divide all nodes in the target network into K+1 clusters. The first K categories correspond to known categories, and the initial centroid of the kth cluster is defined as the average value of the node embeddings belonging to the kth known category in the source network, that is:

[0067] Step 2.2 The K+1th cluster corresponds to the unknown category. Since this category does not appear in the source network, we select the R nodes with the highest prediction probability of the unknown category in the target network to construct the unknown category node set.

[0068] Step 2.3 Unknown Category Node Set The average of the node embeddings of all nodes in is used to calculate the initial centroid of the K+1th cluster, namely:

[0069] Step 2.4 Given the initial centroids of K+1 clusters, all nodes in the target network will be assigned to the cluster corresponding to their nearest centroid, and a cluster label matrix will be obtained accordingly.

[0070] Step 2.5 Using only cluster labels may contain noise, so we only assign pseudo labels to nodes in the target network when their cluster labels and classification labels are exactly the same:

[0071]

[0072] Step 2.6 If There are points in that are not assigned pseudo labels by formula (6), and their pseudo labels are set to unknown categories.

[0073] Step 2.7 The target network nodes with pseudo labels are iteratively trained in a self-training manner using the following target classification loss to train the graph neural network encoder and the neighborhood aggregation node classifier:

[0074]

[0075] in, Indicates the number of nodes in the target network that are assigned pseudo labels.

[0076] Step 2.8 In order to narrow the distribution difference between nodes of known categories in the target network and the source network, we introduce a domain discriminator composed of a multi-layer perceptron to define the domain classification loss:

[0077]

[0078] Among them, if the node v i From the source network, then d i =0; if node v i From the target network, otherwise d i =1. is the domain discriminator prediction node v i Probability from the target network.

[0079] Step 2.9 The graph neural network, neighborhood aggregation node classifier, and domain discriminator are trained by optimizing the following objective function:

[0080]

[0081] Where β and λ are hyperparameters used to weigh the impact of different losses, θ D are the learnable parameters of the domain discriminator. To update all learnable parameters simultaneously, we insert a gradient reversal layer to convert the sign of the gradient during back-propagation and multiply it by the domain adaptation coefficient λ.

[0082] Step 2.10 The traditional adversarial domain adaptation method based on the gradient reversal layer assigns positive domain adaptation coefficients to all samples from different domains. If the traditional adversarial domain adaptation method based on the gradient reversal layer is used in the open set cross-network node classification problem, all nodes of the target network will be aligned with the source network without excluding nodes of unknown categories in the target network, which will inevitably lead to a decrease in the model's recognition ability for nodes of unknown categories, resulting in negative migration. To solve this problem, the UAGA model innovatively proposes to assign negative domain adaptation coefficients to nodes of unknown categories and positive domain adaptation coefficients to nodes of known categories, that is:

[0083]

[0084] On the one hand, the positive domain adaptation coefficient guides the graph neural network encoder and domain discriminator to be trained in an adversarial manner, thereby learning network-invariant node embeddings for nodes of known categories in different networks. On the other hand, the negative domain adaptation coefficient guides the graph neural network encoder and domain discriminator to be trained in the same direction, making it easy to distinguish node embeddings of unknown categories in the target network from node embeddings of known categories in the source network.

[0085] The UAGA model constructed in the present invention designs a framework of separation first and then domain adaptation. First, a rough boundary is constructed through adversarial learning to separate unknown categories and known categories, and then adversarial graph domain alignment is performed to exclude unknown categories.

[0086] Existing adversarial domain adaptation methods based on gradient reversal layers always assign positive domain adaptation coefficients to all samples from different domains. The UAGA model proposed in this paper uses negative domain adaptation coefficients for the first time in adversarial domain adaptation to exclude samples of unknown categories. By assigning negative domain adaptation coefficients to nodes of unknown categories and positive domain adaptation coefficients to nodes of known categories, the UAGA model aligns nodes of known categories in the target network with the source network and pushes nodes of unknown categories in the target network away from the source network.

[0087] In addition, unlike the existing open set domain adaptation methods, the UAGA model proposed in the present invention uses the graph homogeneity theorem (i.e., regardless of whether the nodes of the target network belong to known categories or unknown categories, they tend to be connected to other nodes of the same category) from the perspective of graph structure data, and designs a K+1-dimensional neighborhood aggregation node classifier for simultaneously classifying nodes of known categories and detecting nodes of unknown categories.

[0088] In order to verify the superiority of the present invention, a large number of experiments are conducted to compare the UAGA model with 9 most advanced methods on 6 sets of open set cross-network node classification tasks. The experimental results are shown in Table 1, which shows that the UAGA model achieves the highest node classification performance in all four evaluation indicators (OS, OS*, AUC, HS).

[0089] Table 1: Comparison results of UAGA and 9 algorithms on 6 groups of cross-network node classification tasks

[0090]

[0091] The UAGA model proposed in this paper takes the citation network as the actual application scenario and conducts experimental verification on the open set cross-network node classification problem. The citation network dataset used is shown in Table 2.

[0092] Table 2: Statistics of the experimental dataset used by UAGA

[0093]

[0094] We select three citation network datasets, Citationv1, DBLPv4 and ACMv8, and conduct six open-set cross-network node classification tasks: 1) Citationv1 as the source network and DBLPv4 as the target network; 2) DBLPv4 as the source network and Citationv1 as the target network; 3) Citationv1 as the source network and ACMv8 as the target network; 4) ACMv8 as the source network and Citationv1 as the target network; 5) DBLPv4 as the source network and ACMv8 as the target network; 6) ACMv8 as the source network and DBLPv4 as the target network. In the three citation networks of Citationv1, DBLPv4 and ACMv8, each node represents a paper, and each edge represents the citation relationship between two papers. Each node has an attribute vector, which are keywords extracted from the paper title. Each node has a category label, which represents the research field to which the paper belongs. In the source network, each node has a known category label, which represents the research field of each paper. In the target network, each node has no category label, that is, the research field of each paper is unknown. The UAGA model proposed in this paper transfers the knowledge learned from the source citation network to predict whether the research field of the paper in the target citation network belongs to a known category in the source network or a new category that does not appear in the source network.

[0095] In summary, the UAGA model proposed in the present invention adopts a training strategy of first separation and then domain adaptation, that is, first roughly separate the nodes of known categories and the nodes of unknown categories, and then perform adversarial domain alignment to exclude unknown categories. In the separation stage, the UAGA model trains a graph neural network encoder based on the attention mechanism and a K+1-dimensional neighborhood aggregation node classifier in an adversarial manner to learn a rough boundary for separating nodes of known categories and nodes of unknown categories. In the domain adaptation stage, the node will be assigned a corresponding pseudo-label only when the clustering label and classification label of the node in the target network are consistent. The target network nodes with pseudo-labels will iteratively train the UAGA model in a self-training manner, thereby gradually generating a more accurate boundary for separating nodes of known categories and nodes of unknown categories. In addition, unlike the traditional closed set cross-network node classification method that matches all nodes in the target network with all nodes in the source network for cross-network distribution, the UAGA model explicitly excludes nodes of unknown categories in the target network from cross-network distribution matching. Unlike traditional adversarial domain adaptation methods, which assign positive domain adaptation coefficients to all samples in the gradient reversal layer, the UAGA model innovatively proposes to assign negative domain adaptation coefficients to nodes of unknown categories and positive domain adaptation coefficients to nodes of known categories. On the one hand, the positive domain adaptation coefficient guides the graph neural network encoder and domain discriminator to be trained in an adversarial manner, thereby learning network-invariant node embeddings for nodes of known categories in different networks. On the other hand, the negative domain adaptation coefficient guides the graph neural network and domain discriminator to train in the same direction, making it easy to distinguish node embeddings of unknown categories in the target network from node embeddings of known categories in the source network.

[0096] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0097] Based on the same inventive concept, the embodiment of the present application also provides an open set cross-network node classification device for implementing the open set cross-network node classification method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more open set cross-network node classification device embodiments provided below can refer to the above limitations on the open set cross-network node classification method, which will not be repeated here.

[0098] In one embodiment, an open set cross-network node classification device is provided, comprising:

[0099] Graph neural network encoder, used to obtain node embeddings based on the attributes and adjacency matrix of nodes in the target network;

[0100] Neighborhood aggregation node classifier, used to obtain the classification prediction probability of the node based on the node embedding;

[0101] An adversarial domain alignment module is used to perform adversarial training on the graph neural network encoder and the neighborhood aggregation node classifier in the separation stage, perform rough separation of known categories and unknown categories, and mark the nodes with classification labels of known categories or unknown categories; and, in the domain adaptation stage, cluster the nodes in the target network based on the nodes of known categories in the source network and the nodes with classification labels of unknown categories in the target network, and mark the nodes with cluster labels of known categories or unknown categories; assign pseudo labels to the nodes based on the classification labels and cluster labels, and iteratively train the graph neural network encoder and the neighborhood aggregation node classifier in a self-training manner according to the pseudo labels;

[0102] The output module is used to classify the nodes in the target network based on the trained graph neural network encoder and neighborhood aggregation node classifier.

[0103] A domain discriminator composed of a multi-layer perceptron is also introduced into the classification device to predict whether the node comes from the target network or the source network, and the graph neural network encoder and the domain discriminator are jointly trained based on the pseudo-label. Accordingly, the trained domain discriminator, the trained graph neural network and the neighborhood aggregation node classifier together constitute the UAGA model.

[0104] Among them, the graph neural network encoder uses a single-layer multi-head graph attention network to construct the graph neural network encoder, takes the node attributes and adjacency matrix as input, and outputs node embedding.

[0105] The input of the neighborhood aggregation node classifier is the node embedding, and the output is the label prediction probability of the node. In order to exploit the homogeneity assumption of the graph, we use a single-layer multi-head graph attention network to construct the node classifier. In order to enable the node classifier to simultaneously classify nodes of known categories and identify nodes of unknown categories, we let the output dimension of the classifier be 1 more than the number of known categories of the source network, that is, let the last dimension represent the probability of the predicted node belonging to the unknown category.

[0106] The input of the domain discriminator is the node embedding, and the output is the predicted probability that the node is from the target network. In order to match the distribution of known categories of the source and target networks, and make the distribution of unknown categories of the target network significantly different from that of the source network, we use adversarial domain adaptation technology based on improved gradient reversal layers to adversarially train the graph neural network encoder and domain discriminator. First, in the gradient reversal layer, based on pseudo labels, negative domain adaptation coefficients are assigned to nodes of unknown categories, and positive domain adaptation coefficients are assigned to nodes of known categories. On the one hand, the positive domain adaptation coefficient guides the graph neural network encoder and domain discriminator to train in an adversarial manner, thereby learning node embeddings with network invariance for nodes of known categories of different networks. On the other hand, the negative domain adaptation coefficient guides the graph neural network and domain discriminator to train in the same direction, so that the node embeddings of unknown categories of the target network are easily distinguished from the node embeddings of known categories of the source network.

[0107] Each module in the above-mentioned open set cross-network node classification device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0108] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in all the above method embodiments when executing the computer program.

[0109] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in all the above method embodiments are implemented.

[0110] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in all the above method embodiments when executed by a processor.

[0111] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0112] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processors involved in each embodiment provided in this application may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, data processing logic devices based on quantum computing, etc., but are not limited thereto.

[0113] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0114] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An open set cross-network node classification method, characterized in that: The method comprises: Use the graph neural network encoder to obtain node embedding based on the attributes and adjacency matrix of the nodes in the target network; Obtaining a classification prediction probability of the node according to the node embedding using a neighborhood aggregation node classifier; In the separation stage, adversarial training is performed on the graph neural network encoder and the neighborhood aggregation node classifier, known categories and unknown categories are roughly separated, and the nodes are marked with classification labels of known categories or unknown categories; In the domain adaptation stage, based on the nodes of known categories in the source network and the nodes of unknown categories in the target network, the nodes in the target network are clustered, and the nodes are marked with cluster labels of known categories or unknown categories; pseudo labels are assigned to the nodes based on the classification labels and the cluster labels, and the graph neural network encoder and the neighborhood aggregation node classifier are iteratively trained in a self-training manner according to the pseudo labels; Classification of the nodes in the target network is achieved based on the trained graph neural network encoder and the neighborhood aggregation node classifier.

2. The method according to claim 1, characterized in that The neighborhood aggregation node classifier is constructed using a single-layer multi-head attention network, and the output dimension of the neighborhood aggregation node classifier is 1 more than the number of known categories in the source network.

3. The method according to claim 1, characterized in that The adversarial training of the graph neural network encoder and the neighborhood aggregation node classifier includes: The neighborhood aggregation node classifier is trained so that the classification prediction probability of each node in the target network belonging to an unknown category by the neighborhood aggregation node classifier approaches a fixed threshold between 0 and 1; and the graph neural network encoder is trained to maximize the error rate of the neighborhood aggregation node classifier.

4. The method according to claim 1, characterized in that: The clustering of the nodes in the target network based on the nodes of known categories in the source network and the nodes whose classification labels are unknown categories in the target network comprises: Clustering the nodes in the target network according to the node embedding to obtain a plurality of clusters, wherein the clusters include a plurality of clusters corresponding to each known category in the source network and a cluster corresponding to an unknown category; The initial centroid of the cluster corresponding to the unknown category is determined by an unknown category node set, and the nodes in the unknown category node set are selected from the nodes in the target network according to the classification prediction probability of the unknown category.

5. The method according to claim 1, characterized in that The assigning a pseudo label to the node based on the classification label and the clustering label comprises: When the classification label and the clustering label of the node are consistent, the pseudo label is assigned to the node.

6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Based on the pseudo labels, a negative domain adaptation coefficient is assigned to the node of the unknown category, and a positive domain adaptation coefficient is assigned to the node of the known category.

7. An open set cross-network node classification device, characterized in that: The device comprises: Graph neural network encoder, used to obtain node embeddings based on the attributes and adjacency matrix of nodes in the target network; A neighborhood aggregation node classifier, used to obtain a classification prediction probability of the node according to the node embedding; An adversarial domain alignment module is used to perform adversarial training on the graph neural network encoder and the neighborhood aggregation node classifier in the separation stage, perform rough separation of known categories and unknown categories, and mark the nodes with classification labels of known categories or unknown categories; and, in the domain adaptation stage, cluster the nodes in the target network based on the nodes of known categories in the source network and the nodes whose classification labels are unknown categories in the target network, and mark the nodes with clustering labels of known categories or unknown categories; assign pseudo labels to the nodes based on the classification labels and the clustering labels, and iteratively train the graph neural network encoder and the neighborhood aggregation node classifier in a self-training manner according to the pseudo labels; An output module is used to classify the nodes in the target network based on the trained graph neural network encoder and the neighborhood aggregation node classifier.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Graph node classification method and device based on graph neural network knowledge distillation

    CN112861936A

  • Paper field classification method and device in citation network based on pseudo label depolarization and medium

    CN118035448A

  • Training method and apparatus for graph neural network

    US20230342606A1