Open set across network node classification method and apparatus

By employing adversarial training of the graph neural network encoder and neighborhood aggregation node classifier, along with pseudo-label self-training, the challenge of identifying unknown categories in open set cross-network node classification was solved, enabling the accurate classification of known categories and detection of unknown categories in the target network.

CN119939320BActive Publication Date: 2026-05-08HAINAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HAINAN UNIV
Filing Date
2025-01-27
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Most existing cross-network node classification methods are based on the closed-set assumption, which cannot effectively handle new categories in the target network that do not appear in the source network. Furthermore, the distribution differences between different networks lead to negative migration, making it difficult to accurately identify nodes of unknown categories.

Method used

Adversarial training is performed using a graph neural network encoder and a neighborhood aggregation node classifier. Coarse separation boundaries are constructed through adversarial learning, and precise boundaries are gradually generated through pseudo-label self-training, eliminating adversarial domain alignment for unknown categories.

Benefits of technology

It achieves effective and reliable classification in open set cross-network node classification, improves the ability to identify nodes of unknown categories, and enhances classification accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119939320B_ABST
    Figure CN119939320B_ABST
Patent Text Reader

Abstract

The application discloses an open set cross-network node classification method and device, relates to the field of machine learning, and designs a framework of separating first and then adapting to a domain. First, an unknown class and a known class are separated by constructing a rough boundary through adversarial learning, and then a pseudo label is allocated to iteratively train a model in a self-training manner, so that a more accurate boundary is gradually generated for separating the known class and the unknown class. Secondly, in the domain adaptation stage, a negative domain adaptation coefficient is allocated to the nodes of the unknown class, and a positive domain adaptation coefficient is allocated to the nodes of the known class, so that the nodes of the known class of the target network are aligned with the source network, and the nodes of the unknown class of the target network are pushed away from the source network, thereby realizing the adversarial domain alignment excluding the unknown class, and further realizing the classification of the open set cross-network node with high accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine learning technology, and in particular to an open set cross-network node classification method and apparatus. Background Technology

[0002] In graph data analysis, labels are often expensive, limited, or even unavailable. Cross-network node classification has received widespread attention in graph machine learning in recent years, aiming to transfer knowledge learned from a source network with rich node labels to predict node labels in a target network lacking labels. Existing cross-network node classification methods are almost all designed based on the closed-set assumption, requiring the source and target networks to have identical class label spaces. However, in real-world applications, the target network may contain new categories not present in the source network. For example, in the scenario of predicting user interests in cross-platform online social networks, users in a newly formed target social network may contain new interest categories not present in the established source social network.

[0003] like Figure 1 As shown, in the open set cross-network node classification problem, the target network not only contains all the known categories in the source network, but also includes "unknown" categories that do not appear in the source network. The objectives of the open set cross-network node classification problem are: 1. To classify nodes in the target network that belong to the known categories in the source network into their corresponding known categories; 2. To detect nodes in the target network that belong to the "unknown" categories.

[0004] Solving the above problem of classifying open sets across network nodes presents two major challenges:

[0005] 1. Since the target network is completely unlabeled, we cannot know which nodes in the target network belong to the known categories that appeared in the source network, and which nodes belong to the newly appearing "unknown" categories 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. Distributional differences between different networks can hinder the direct application of models trained on the source network to the target network. In open-set cross-network node classification, because the target network contains "unknown" categories not present in the source network, directly aligning the distributions of the source and target networks as in previous closed-set cross-network node classification methods presents a problem: the distribution of unknown categories in the target network will align with the distribution of known categories in the source network, leading to negative transfer and increasing the difficulty of identifying nodes with unknown categories in the target network. Therefore, aligning the distribution of the target network with the distribution of the source network while excluding unknown categories is another major challenge in solving open-set cross-network node classification problems. Summary of the Invention

[0007] Therefore, it is necessary to provide a method and apparatus for classifying open sets across network nodes, which performs well in the problem of classifying open sets across network nodes, in order to address the above-mentioned technical problems.

[0008] Firstly, this application provides a method for classifying open sets across network nodes. This method includes:

[0009] A graph neural network encoder is used to obtain node embeddings based on the attributes and adjacency matrix of nodes in the target network;

[0010] The classification prediction probability of a node is obtained by using a neighborhood aggregation node classifier based on the node embedding.

[0011] During the separation phase, the graph neural network encoder and the neighborhood aggregation node classifier are subjected to adversarial training to perform coarse separation between known and unknown categories, and the nodes are labeled with the classification labels of known or unknown categories.

[0012] In the domain adaptation phase, based on nodes of known categories in the source network and nodes of unknown categories 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 target network's nodes 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 one more than the number of known categories in the source network.

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

[0016] Train a neighborhood aggregation node classifier so that the probability of the neighborhood aggregation node classifier predicting the classification of each node in the target network as belonging to an unknown category approaches a fixed threshold between 0 and 1; train a graph neural network encoder 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 of unknown categories in the target network includes:

[0018] Based on node embedding, cluster the nodes in the target network to obtain several clusters. Each cluster includes several clusters that correspond one-to-one with each known category in the source network and one cluster that corresponds to an 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 based on the classification prediction probability of the unknown category.

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

[0021] When a node's classification label and clustering label are consistent, a pseudo-label is assigned to the node.

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

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

[0024] Secondly, this application also provides an open set cross-network node classification device. The device includes:

[0025] A graph neural network encoder is used to obtain node embeddings based on the attributes and adjacency matrix of nodes in the target network.

[0026] The neighborhood aggregation node classifier is used to obtain the classification prediction probability of a node based on its embedding.

[0027] The adversarial domain alignment module is used to perform adversarial training on the graph neural network encoder and the neighborhood aggregator classifier during the separation phase, to coarsely separate known and unknown categories, and to label nodes with known or unknown category classification labels; and during the domain adaptation phase, to cluster nodes in the target network based on nodes of known categories in the source network and nodes of unknown categories in the target network, and to label nodes with known or unknown category cluster labels; to assign pseudo-labels to nodes based on classification labels and cluster labels, and to iteratively train the graph neural network encoder and the neighborhood aggregator classifier in a self-training manner based on the pseudo-labels;

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

[0029] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in the above-described open set cross-network node classification method.

[0030] Fourthly, this application also provides a computer-readable storage medium. This computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps in the above-described open set cross-network node classification method.

[0031] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps in the above-described open set cross-network node classification method.

[0032] The aforementioned open-set cross-network node classification method and apparatus utilizes a graph neural network encoder to obtain node embeddings based on the attributes and adjacency matrix of nodes in the target network; it then utilizes a neighborhood aggregation node classifier to obtain the classification prediction probability of nodes based on the node embeddings; in the separation phase, the graph neural network encoder and the neighborhood aggregation node classifier undergo adversarial training to coarsely separate known and unknown categories, and label nodes with known or unknown category classification labels; in the domain adaptation phase, based on nodes of known categories in the source network and nodes with unknown category classification labels in the target network, the nodes in the target network are clustered, and the nodes are labeled with known or unknown category cluster labels; pseudo-labels are assigned to 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 based on the pseudo-labels; finally, the trained graph neural network encoder and the neighborhood aggregation node classifier are used to classify the nodes in the target network. This invention designs a framework of separation followed by domain adaptation. First, a coarse boundary is constructed through adversarial learning to separate unknown and known categories. Then, pseudo-labels are assigned to iteratively train the model in a self-training manner, gradually generating a more accurate boundary for separating known and unknown categories. This enables adversarial domain alignment that excludes unknown categories, thereby achieving effective, reliable, and accurate classification of open sets across network nodes. Attached Figure Description

[0033] Figure 1 This is a schematic diagram illustrating the classification of open sets across network nodes in one embodiment;

[0034] Figure 2 This is a block diagram of the UAGA model in one embodiment. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0036] Existing cross-network node classification methods are generally based on the closed-set assumption, which requires that the source and target networks share the exact same class space. However, in real-world applications, this closed-set assumption is difficult to guarantee. To overcome the limitations of the closed-set assumption, this invention 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, the UAGA model includes three important modules: a graph neural network encoder, a neighborhood aggregation node classifier, and a domain discriminator.

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

[0038] Specifically, open set classification methods across network nodes mainly include:

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

[0040] S104, use the neighborhood aggregation node classifier to obtain the classification prediction probability of the node based on the node embedding;

[0041] S106, In the separation phase, the graph neural network encoder and the neighborhood aggregation node classifier are subjected to adversarial training to perform coarse separation between known and unknown categories, and the nodes are labeled with the classification labels of known or unknown categories.

[0042] S108, In the domain adaptation phase, 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 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 the neighborhood aggregation node classifier are iteratively trained in a self-training manner based on the pseudo-labels.

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

[0044] In S108, a domain discriminator composed of a multilayer perceptron is introduced to predict whether a 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 pseudo-labels. Correspondingly, in S110, the trained domain discriminator, together with the trained graph neural network and the neighborhood aggregation node classifier, constitutes the trained UAGA model.

[0045] Existing cross-network node classification methods are generally based on the closed-set assumption, which requires that the source and target networks share the exact same class space. However, in real-world applications, this closed-set assumption is difficult to guarantee. To overcome the limitations of the closed-set assumption, this embodiment solves the more realistic and novel open-set cross-network node classification problem, where the target network not only contains all the known classes in the source network but also includes additional unknown classes. The goal of the open-set cross-network node classification problem is to classify nodes in the target network that belong to the known classes of the source network into their corresponding known classes, and to detect nodes in the target network that belong to the unknown classes.

[0046] The UAGA model employs a training strategy of first separating and then adapting the domain. This involves first roughly separating nodes of known categories from nodes of unknown categories, and then performing adversarial domain alignment to exclude nodes of unknown categories. This effectively detects nodes of unknown categories in the target network and classifies nodes of known categories into their corresponding known categories, thus solving the problem of classifying nodes across networks in open sets.

[0047] In one embodiment, the open set classification method across network nodes includes:

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

[0049] Step 1.1 The graph neural network encoder is constructed from a graph attention network in order to learn node v i The embedding representation allows the graph neural network encoder to adaptively aggregate attributes of its neighbors and itself:

[0050]

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

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

[0053]

[0054] in, It is node v i The predicted label probability vector, W, has the first K dimensions corresponding to the probability of belonging to a known class, and the (K+1)th dimension corresponding to the probability of belonging to an unknown class. c It is a learnable parameter. In the UAGA model, we obtain the final predicted label of each node through formula (2) in both the training and testing phases.

[0055] Step 1.3 Based on the predicted probabilities of the node classifier and the known node labels in the source network, construct the node classification loss using the cross-entropy loss of Softmax:

[0056]

[0057] in, This represents the number of nodes in the source network. The true category label belongs to the kth class. otherwise, This indicates that the node classifier predicts the node. The probability of belonging to the k-th class. Minimize the loss. It can learn class-discriminative node embeddings to partition nodes into different categories.

[0058] Step 1.4 In the open-set cross-network node classification problem, we need to detect nodes in the target network that belong to unknown categories. We use adversarial learning to construct a coarse boundary separating the known and unknown categories of the target network. On one hand, we train a K+1 dimensional neighborhood aggregator classifier, allowing each target network node... The predicted probability of the (K+1)th dimension (the predicted probability of belonging to the unknown category) should be as equal as possible to a fixed threshold μ, i.e. Where 0 < μ < 1, the fixed threshold μ can be regarded as the boundary threshold between the known 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 through one of the following two methods, i.e., let Try not to be equal to μ: Method 1) Let Make it as large as possible to increase the number of nodes Classify as unknown category; Method 2) Let Make it as small as possible to the node It is classified into a known category.

[0059] Step 1.5 uses binary cross-entropy loss to define the recognition loss for the unknown category:

[0060]

[0061] in This represents the number of nodes in the target network, with μ 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 based on the following optimization objective:

[0063]

[0064] Where, θ C Let θ be the learnable parameters of the graph neural network encoder. G These are the learnable parameters for the neighborhood aggregation node classifier. To update θ simultaneously... C and θ G We insert a gradient reversal layer to transform the sign of the gradient during backpropagation. After step 1, the neighborhood aggregator classifier learns a coarse boundary separating known and unknown classes, while the graph neural network encoder keeps 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 in the cross-network node classification problem is completely unlabeled, 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, using the node embeddings of the target network as input, we use the K-means clustering algorithm to divide all nodes in the target network into K+1 clusters. The first K classes correspond to known categories, and the initial centroid of the k-th cluster is defined as the average of the node embeddings of the k-th known category in the source network, i.e.:

[0067] Step 2.2 The (K+1)th cluster corresponds to the unknown category. Since this category does not appear in the source network, we select the R nodes with the highest predicted 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 the cluster is used to calculate the initial centroid of the (K+1)th cluster, i.e.:

[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, resulting in a clustering label matrix.

[0070] Step 2.5: Using only clustering labels may contain noise, therefore we only assign pseudo-labels to nodes in the target network if their clustering and classification labels are completely identical.

[0071]

[0072] Step 2.6 If Points that are not assigned pseudo-labels by formula (6) are set to the unknown category.

[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:

[0074]

[0075] in, This indicates the number of nodes in the target network that have been assigned pseudo-labels.

[0076] Step 2.8 To reduce the distributional discrepancy between the known categories of nodes in the target network and the source network, we introduce a domain discriminator composed of multilayer perceptrons to define the domain classification loss:

[0077]

[0078] Where, if node v i If it comes from the source network, then d i =0; if node v i From the target network, otherwise d i =1. Is the domain discriminator predicts node v i The probability of originating from the target network.

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

[0080]

[0081] Where β and λ are hyperparameters used to weigh the effects of different losses, θ D These are the learnable parameters of the domain discriminator. To update all learnable parameters simultaneously, we insert a gradient reversal layer to transform the sign of the gradient and multiply it by the domain fitness coefficient λ during backpropagation.

[0082] Step 2.10 Traditional adversarial domain adaptation methods based on gradient inversion layers assign positive domain fitness coefficients to all samples from different domains. For example, in open-set cross-network node classification problems, using traditional adversarial domain adaptation methods based on gradient inversion layers aligns all nodes of the target network with the source network without excluding nodes of unknown classes in the target network. This inevitably leads to a decrease in the model's ability to identify nodes of unknown classes, resulting in negative transfer. To address this problem, the UAGA model innovatively proposes assigning negative domain fitness coefficients to nodes of unknown classes and positive domain fitness coefficients to nodes of known classes, i.e.:

[0083]

[0084] On the one hand, positive domain fitness coefficients guide 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, negative domain fitness coefficients guide the graph neural network encoder and domain discriminator to be trained in the same direction, making it easy to distinguish between node embeddings of unknown categories in the target network and node embeddings of known categories in the source network.

[0085] The UAGA model constructed in this invention designs a framework of separation followed by domain adaptation. First, a coarse boundary is constructed through adversarial learning to separate the unknown class from the known class, and then adversarial graph domain alignment is performed to exclude the unknown class.

[0086] Existing adversarial domain adaptation methods based on gradient inversion layers consistently assign positive domain adaptation coefficients to all samples from different domains. The UAGA model proposed in this invention is the first to use negative domain adaptation coefficients 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 those in the source network and pushes nodes of unknown categories in the target network away from those in the source network.

[0087] Furthermore, unlike existing open set domain adaptation methods, the UAGA model proposed in this invention, from the perspective of graph structure data, utilizes the graph homogeneity theorem (i.e., regardless of whether a node in the target network belongs to a known category or an unknown category, it tends to connect with other nodes of the same category) to design a K+1 dimensional neighborhood aggregation node classifier, which is used to simultaneously classify nodes of known categories and detect nodes of unknown categories.

[0088] To verify the superiority of this invention, the UAGA model was compared with nine state-of-the-art methods in a large number of experiments on six open-set cross-network node classification tasks. The experimental results are shown in Table 1, which shows that the UAGA model achieved the highest node classification performance on four evaluation metrics (OS, OS*, AUC, and HS).

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

[0090]

[0091] The UAGA model proposed in this invention uses citation networks as a practical application scenario and conducts experimental verification on open set cross-network node classification problems. The citation network dataset used is shown in Table 2.

[0092] Table 2: Statistical information of the experimental dataset used in UAGA

[0093]

[0094] We selected three citation network datasets, Citationv1, DBLPv4, and ACMv8, and conducted 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, 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 consists of keywords extracted from the paper titles. Each node has a category label representing the research field of the paper. In the source network, each node has a known category label representing the research field of each paper. In the target network, each node has no category label, meaning the research domain of each paper is unknown. The UAGA model proposed in this invention transfers knowledge learned from the source citation network to predict whether the research domain of papers in the target citation network belongs to a known category in the source network or a new category not present in the source network.

[0095] In summary, the UAGA model proposed in this invention employs a separation-then-domain adaptation training strategy. First, it roughly separates nodes of known and unknown categories, then performs adversarial domain alignment to exclude nodes of the unknown category. In the separation phase, the UAGA model trains an attention-based graph neural network encoder and a K+1 dimensional neighborhood aggregator classifier adversarially, thereby learning a rough boundary for separating nodes of known and unknown categories. In the domain adaptation phase, a node is assigned a pseudo-label only if its clustering and classification labels match. Target network nodes with pseudo-labels iteratively train the UAGA model through self-training, gradually generating a more accurate boundary for separating nodes of known and unknown categories. Furthermore, unlike traditional closed-set cross-network node classification methods that perform cross-network distribution matching between all nodes in the target network and all nodes in the source network, the UAGA model explicitly excludes nodes of unknown categories in the target network from cross-network distribution matching. Traditional adversarial domain adaptation methods assign positive domain adaptation coefficients to all samples in the gradient inversion layer. In contrast, the UAGA model innovatively proposes assigning negative domain adaptation coefficients to nodes of unknown class and positive ones to nodes of known class. On one hand, positive domain adaptation coefficients guide the graph neural network encoder and domain discriminator to train in an adversarial manner, thus learning network-invariant node embeddings for nodes of known class from different networks. On the other hand, negative domain adaptation coefficients guide the graph neural network and domain discriminator to train in the same direction, making it easy to distinguish between the embeddings of unknown class nodes in the target network and the embeddings of known class nodes in the source network.

[0096] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0097] Based on the same inventive concept, this application also provides an open set cross-network node classification device for implementing the open set cross-network node classification method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more open set cross-network node classification device embodiments provided below can be found in the limitations of the open set cross-network node classification method described above, and will not be repeated here.

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

[0099] A graph neural network encoder is used to obtain node embeddings based on the attributes and adjacency matrix of nodes in the target network.

[0100] The neighborhood aggregation node classifier is used to obtain the classification prediction probability of a node based on its embedding.

[0101] The adversarial domain alignment module is used to perform adversarial training on the graph neural network encoder and the neighborhood aggregator classifier during the separation phase, to coarsely separate known and unknown categories, and to label nodes with known or unknown category classification labels; and during the domain adaptation phase, to cluster nodes in the target network based on nodes of known categories in the source network and nodes of unknown categories in the target network, and to label nodes with known or unknown category cluster labels; to assign pseudo-labels to nodes based on classification labels and cluster labels, and to iteratively train the graph neural network encoder and the neighborhood aggregator classifier in a self-training manner based on the pseudo-labels;

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

[0103] The classification device also incorporates a domain discriminator composed of a multilayer perceptron to predict whether a node originates from the target network or the source network, and guides the joint training of the graph neural network encoder and the domain discriminator based on pseudo-labels. Accordingly, the trained domain discriminator, together with the trained graph neural network and the neighborhood aggregation node classifier, constitutes the UAGA model.

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

[0105] The neighborhood aggregation node classifier takes node embeddings as input and outputs the predicted label probability of each node. To leverage the homogeneity assumption of the graph, we construct the node classifier using a single-layer multi-head graph attention network. To enable the node classifier to classify nodes of known categories and identify nodes of unknown categories simultaneously, we increase the output dimension of the classifier by one compared to the number of known categories in the source network; that is, we make the last dimension represent the probability of predicting that a node belongs to an unknown category.

[0106] The domain discriminator takes node embeddings as input and outputs the predicted probability that a node originates from the target network. To match the distributions of known classes in the source and target networks, and to ensure that the distribution of unknown classes in the target network differs significantly from that in the source network, we employ an adversarial domain adaptation technique based on an improved gradient inversion layer to train the graph neural network encoder and domain discriminator against each other. First, in the gradient inversion layer, based on pseudo-labels, negative domain adaptation coefficients are assigned to nodes of unknown classes, and positive domain adaptation coefficients are assigned to nodes of known classes. On one hand, positive domain adaptation coefficients guide the graph neural network encoder and domain discriminator to train in an adversarial manner, thereby learning network-invariant node embeddings for nodes of known classes from different networks. On the other hand, negative domain adaptation coefficients guide the graph neural network and domain discriminator to train in the same direction, making it easy to distinguish the node embeddings of unknown classes in the target network from those of known classes in the source network.

[0107] Each module in the aforementioned open set cross-network node classification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0108] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in all of the above method embodiments.

[0109] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in all of the above method embodiments.

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

[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, data stored, data displayed, 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 the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0112] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this 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. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0113] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for classifying open sets across network nodes, characterized in that, The method includes: A graph neural network encoder is used to obtain node embeddings based on the attributes and adjacency matrix of nodes in the target network; The classification prediction probability of the node is obtained by using a neighborhood aggregation node classifier based on the node embedding; During the separation phase, the graph neural network encoder and the neighborhood aggregation node classifier are subjected to adversarial training to perform coarse separation between known and unknown categories, and the nodes are labeled with classification labels of known or unknown categories. During the domain adaptation phase, based on nodes of known categories in the source network and nodes of unknown categories 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 the cluster labels, and the graph neural network encoder and the neighborhood aggregation node classifier are iteratively trained in a self-training manner based on the pseudo-labels; The trained graph neural network encoder and the neighborhood aggregation node classifier are used to classify the nodes in the target network. In this system, the source network and the target network are different citation datasets; each node represents a paper, and each edge represents the citation relationship between papers; each node has an attribute vector and a classification label, where the attribute vector is the keywords extracted from the paper title, and the classification label is the research field to which the corresponding paper belongs.

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 one 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 such that the probability of the neighborhood aggregation node classifier predicting that each node in the target network belongs to an unknown category approaches 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.

4. The method according to claim 1, characterized in that, The clustering of nodes in the target network based on nodes of known categories in the source network and nodes in the target network whose classification labels are of unknown categories includes: Based on the node embedding, the nodes in the target network are clustered to obtain several clusters, each cluster including several clusters that correspond one-to-one with each known category in the source network and one cluster corresponding to an unknown category; 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.

5. The method according to claim 1, characterized in that, The process of assigning pseudo-labels to the nodes based on the classification labels and the clustering labels includes: When the classification label and the clustering label of a 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 includes: Based on the pseudo-labels, negative domain fitness coefficients are assigned to nodes of unknown categories, and positive domain fitness coefficients are assigned to nodes of known categories.

7. An open set cross-network node classification device, characterized in that, The device includes: A graph neural network encoder is used to obtain node embeddings based on the attributes and adjacency matrix of nodes in the target network. A neighborhood aggregation node classifier is used to obtain the classification prediction probability of the node based on the node embedding; The adversarial domain alignment module is used to perform adversarial training on the graph neural network encoder and the neighborhood aggregation node classifier during the separation phase, to coarsely separate known and unknown categories, and to label the nodes with known or unknown category classification labels; and to cluster the nodes in the target network based on the nodes with known categories in the source network and the nodes with unknown category classification labels in the target network during the domain adaptation phase, and to label the nodes with known or unknown category cluster labels; to assign pseudo-labels to the nodes based on the classification labels and the cluster labels, and to iteratively train the graph neural network encoder and the neighborhood aggregation node classifier in a self-training manner based on the pseudo-labels; The 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. In this system, the source network and the target network are different citation datasets; each node represents a paper, and each edge represents the citation relationship between papers; each node has an attribute vector and a classification label, where the attribute vector is the keywords extracted from the paper title, and the classification label is the research field to which the corresponding paper belongs.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

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

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

Citation Information

Patent Citations

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

    CN112861936A

  • Training method and apparatus for graph neural network

    US20230342606A1