Cross-network node classification method based on diffusion and multi-granularity field adaptation

Through the method based on diffusion and multi-granularity domain adaptation, the problem of insufficient global information integration and domain adaptation complexity of the graph neural network algorithm in cross-network node tasks is solved. Through the graph convolution diffusion model and multi-level loss function, a more comprehensive solution is achieved. Efficient cross-network node classification.

CN118779723APending Publication Date: 2024-10-15UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410917657.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Existing graph neural network algorithms have limitations in local information aggregation, insufficient global information integration, complexity of domain adaptation, and balance issues in combining adversarial learning with traditional domain difference measures in cross-network node tasks, resulting in model learning at node representations. , deficiencies in information transfer and domain adaptation.

Method used

A cross-network node classification method based on diffusion and multi-granularity domain adaptation is adopted, the transition probability matrix is ​​obtained through the graph convolution diffusion model, shared and independent encoders are combined for feature representation learning, and a multi-level loss function is designed to balance different loss terms, using The trained graph neural network performs cross-network node classification.

Benefits of technology

Graph diffusion provides more global information, combines adversarial methods and multi-level MMD to reduce domain differences in cross-domain node classification, improves the performance and generalization capabilities of the model, and can effectively complete graph cross-network node classification tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779723A_ABST
    Figure CN118779723A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-network node classification method based on diffusion and multi-granularity field adaptation. The method comprises the following steps: obtaining a corresponding transition probability matrix from a source graph and a target graph through a graph convolution diffusion model; according to the transition probability matrix, feature representation of each node in the source graph and the target graph is obtained through a shared encoder and an independent encoder; according to the feature representation, carrying out loss design from three levels of a graph level, a category level and a node level, and carrying out back propagation on loss to update parameters of a graph neural network to obtain a trained graph neural network; a large number of experiments on six cross-network node classification tasks prove that the method provided by the invention is superior to an SOTA method. According to the method, the cross-network node classification task can be effectively completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a cross-network node classification method based on diffusion and multi-granularity domain adaptation. Background Art

[0002] Networks are a powerful means of representing complex interactions and relationships between entities and are ubiquitous in the real world, such as social networks, citation networks, and protein-protein interaction networks. Cross-network node classification can transfer knowledge learned from the source network to help predict node labels in the target network, which can benefit a variety of applications.

[0003] In recent years, domain adaptation has received extensive attention. Given a target domain that lacks labels, domain adaptation aims to leverage the rich labeled data in the source domain to help target domain learning. A popular domain adaptation algorithm is feature-based, which aims to learn domain-invariant feature representations to mitigate domain differences. In these domain adaptation algorithms, each data sample is considered independent and identically distributed during representation learning, which is suitable for image or text data in computer vision (CV) and natural language processing (NLP). However, in network structured data, each instance (i.e., node) naturally has complex interactions or relationships (i.e., edges) with other instances (i.e., its neighbors). Considering the complex network relationships between nodes should be quite important and necessary for various graph mining tasks.

[0004] The traditional graph neural network algorithms currently under research mainly face the limitations of local information aggregation and insufficient global information integration. There are problems with original information retention in cross-network node tasks, the complexity of domain adaptation, and the balance between adversarial learning and traditional domain difference metrics. These problems collectively point to the shortcomings of the algorithm in node representation learning, information transfer, and domain adaptation. Further research and innovation are needed to improve the performance and generalization ability of the model. Summary of the invention

[0005] In view of the existing flight data anomaly detection methods and the unlabeled characteristics of flight data, the present invention provides a cross-network node classification method based on diffusion and multi-granularity domain adaptation, which can perform anomaly detection and is explainable.

[0006] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a cross-network node classification method based on diffusion and multi-granularity domain adaptation, comprising:

[0007] S1, the source graph and the target graph are passed through the graph convolution diffusion model to obtain the corresponding transfer probability matrix;

[0008] S2. According to the transition probability matrix, the source graph and the target graph are respectively passed through a shared encoder and an independent encoder to obtain the feature representation of each node in the graph;

[0009] The shared encoder includes a local encoder and a global encoder;

[0010] S3. According to the feature representation, loss design is performed at three levels: graph level, category level, and node level. The loss is back-propagated to update the parameters of the graph neural network to obtain a trained graph neural network.

[0011] S4. Use the trained graph neural network to complete cross-network node classification.

[0012] Further: In S1, the calculation formula of the transition probability matrix is:

[0013]

[0014] Among them, S is the transition probability matrix, θ k is the weighting coefficient, T k is the generalized transfer matrix.

[0015] Further: S2 includes:

[0016] S21, obtain local embedding representations of the source image and the target image through the local encoder;

[0017] S22, according to the transition probability matrix, obtain the global embedding representation of the source image and the target image through the global encoder;

[0018] S23, according to the local embedding representation and the global embedding representation of the source graph and the target graph, the feature embedding of each node in the graph is obtained by attention weighting;

[0019] S24, embedding the source image and the target image respectively through independent encoders to obtain independent feature embedding;

[0020] S25. Use independent feature embedding to provide embedding information for the feature embedding of each node in the graph, and obtain the feature representation of each node in the graph.

[0021] Further: In S21, a local GCN encoder is used to obtain a local embedding representation Z l , where the local GCN encoder layer i outputs Z l(i) The expression is:

[0022]

[0023] Among them, X is the input, σ is the activation function, D is the degree matrix, A is the adjacency matrix, W l(i) is the weight parameter of the local GCN layer i.

[0024] Further: In S22, a global GCN encoder is used to obtain a global embedding representation Zg , where the global GCN encoder layer i outputs Z g(i) The expression is:

[0025]

[0026] Among them, W g(i) is the weight parameter of the i-th layer of the global GCN.

[0027] Further: In S23, the expression of the feature embedding Z of each node is:

[0028] Z=w1Z l +w2Z g

[0029]

[0030] Among them, w i = {w1,w2}, w1 and w2 are local embedding representations Z l and the global embedding representation Z g The weight of , fc(.) represents the linear transformation layer.

[0031] Further: the S24 includes:

[0032] S241. The positive sample embedding Zp of each node in the graph is obtained through the independent GCN model, where the positive sample embedding representation Zp(i) of the i-th layer of the independent GCN model is:

[0033]

[0034] Among them, W p(i) is the weight parameter of the i-th layer of the independent GCN model;

[0035] S242, randomly swap the attributes of the nodes in the graph, and obtain the negative sample embedding of each node in the graph through an independent GCN model

[0036] S243, embed the positive sample of each node in the graph into Zp and the negative sample into By embedding it as an independent feature.

[0037] Further: The loss expression designed in S3 is:

[0038]

[0039] Among them, λ, μ, η, γ, and ρ are the trade-off parameters for balancing the impact of different loss terms. cls is the source domain classification loss, L entropyis the target domain entropy loss, loss d is the domain adversarial loss, loss dist is the distance loss, loss pair is a pairwise constraint, loss diff is the soft subspace orthogonality constraint, loss dgi is the discriminator loss, θ h are the learning parameters of all encoders, θ y is the parameter of the node classifier, θ d Parameters of the classifier learned for domain adversarial learning.

[0040] Further: the source domain classification loss L cls The expression is:

[0041]

[0042] Among them, N s represents the total number of source domain nodes, D cls (.) is the category classifier, y i represents the label of the i-th node in the source domain, Represents the feature vector obtained by the shared encoder of the i-th node in the source domain;

[0043] The target domain entropy loss L entropy The expression is:

[0044]

[0045] Among them, N t represents the total number of nodes in the target domain, is the i-th node in the target domain through D cls (.) The pseudo labels obtained, Represents the feature vector obtained by the shared encoder of the i-th node in the target domain;

[0046] The domain adversarial loss d The expression is:

[0047]

[0048] Among them, d i is the weight coefficient, D(.) is the domain discriminator, z i is the i-th feature vector in the total set of source domain and target domain;

[0049] The distance loss dist The expression is:

[0050]

[0051] in, is the full-image distance loss, is the distance loss for all categories, α dist is a hyperparameter used to control the ratio of the total image distance loss to the total category distance loss. norm(.) is the operation for calculating the second norm. R(.) means taking the average value. Z S and Z T are the feature vectors obtained by the shared encoder for the source domain and the target domain, c is the total number of categories, c' is a constant with a value different from c, and Z Sc represents the embedding representation of the node with category c in the source domain, Z Tc Represents the embedding representation of the node with predicted category c in the target domain;

[0052] The pairwise constraint loss pair The expression is:

[0053] loss pair =α p loss node-pair +(1-α p )loss edge-pair

[0054]

[0055] Among them, α p To control the node loss loss node-pair and edge pair loss edge-pair The proportion of hyperparameters, represents the feature vector obtained by the shared encoder of the jth node in the source domain, Representation calculation and The cosine similarity of j represents the label of the jth node in the source domain, Indicated by y i and j The label pairs are composed of, BCE(.) represents binary cross entropy, N pair is the number of sample pairs, z j is the i-th feature vector in the total set of source domain and target domain; v i and v j denote the i-th node and j-th node in the source domain respectively, and e ij Indicates whether there is an edge between node i and node j. If there is an edge, then e ij The value of is 1, otherwise it is 0;

[0056] The soft subspace orthogonality constraint loss diff The expression is:

[0057]

[0058] in, and Respectively represent Z s and Z T The transpose of and They are the feature vectors obtained by independent encoders for the source domain and the target domain respectively;

[0059] The discriminator loss dgi The expression is:

[0060]

[0061] Where N is the number of graph nodes embedded using independent encoders, A is the graph-level embedding vector, and D dgi (.,.) represents the probability score assigned to the sample pair, is the negative sample embedding representation of the i-th layer of the independent GCN model.

[0062] The beneficial effects of the present invention are:

[0063] 1. Data enhancement is performed through graph diffusion, replacing the traditional PPMI mutual information matrix as the transfer matrix of global information, which can provide more global information for model training;

[0064] 2. Adopt adversarial methods combined with multi-level MMD to effectively learn domain-invariant and semantic representations, thereby reducing domain differences in cross-domain node classification;

[0065] 3. The information of the target graph and the topological structure between nodes are taken into consideration, making it easy to complete the task of classifying nodes across the network. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 Flowchart of the cross-network node classification method based on diffusion and multi-granularity domain adaptation. DETAILED DESCRIPTION

[0067] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0068] like Figure 1 As shown, in one embodiment of the present invention, a cross-network node classification method based on diffusion and multi-granularity domain adaptation is provided, including:

[0069] S1, the source graph and the target graph are passed through the graph convolution diffusion model to obtain the corresponding transfer probability matrix;

[0070] In S1, the calculation formula of the transition probability matrix is:

[0071]

[0072] Among them, S is the transition probability matrix, θ k is the weighting coefficient, T k is the generalized transfer matrix;

[0073] In this example, three real-world citation networks (i.e., Citationv1, DBLPv7, and ACMv9) were used to evaluate the effect of cross-network node classification;

[0074] In each network, each node represents a paper, and each edge represents a 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. We alternately use the two networks as the source network or target network for the cross-network node classification task;

[0075] For example, we use A→C to indicate that ACMv9 is the source network and Citationv1 is the target network. There are 6 tasks in total, namely A→C, A→D, C→A, C→D, D→A, and D→C;

[0076] S2. According to the transition probability matrix, the source graph and the target graph are respectively passed through a shared encoder and an independent encoder to obtain the feature representation of each node in the graph;

[0077] The shared encoder includes a local encoder and a global encoder;

[0078] S3. According to the feature representation, loss design is performed at three levels: graph level, category level, and node level. The loss is back-propagated to update the parameters of the graph neural network to obtain a trained graph neural network.

[0079] S4. Use the trained graph neural network to complete cross-network node classification.

[0080] The S2 includes:

[0081] S21, obtain local embedding representations of the source image and the target image through the local encoder;

[0082] In S21, a local GCN encoder is used to obtain a local embedding representation Z l , where the local GCN encoder layer i outputs Z l(i) The expression is:

[0083]

[0084] Among them, X is the input, σ is the activation function, D is the degree matrix, A is the adjacency matrix, W l(i) is the weight parameter of the local GCN layer i;

[0085] S22, according to the transition probability matrix, obtain the global embedding representation of the source image and the target image through the global encoder;

[0086] In S22, a global GCN encoder is used to obtain a global embedding representation Z g , where the global GCN encoder layer i outputs Z g(i) The expression is:

[0087]

[0088] Among them, W g(i) is the weight parameter of the i-th layer of the global GCN;

[0089] S23, according to the local embedding representation and the global embedding representation of the source graph and the target graph, the feature embedding of each node in the graph is obtained by attention weighting;

[0090] In S23, the expression of the feature embedding Z of each node is:

[0091] Z=w1Z l +w2Z g

[0092]

[0093] Among them, w i = {w1,w2}, w1 and w2 are local embedding representations Z l and the global embedding representation Z g The weight of , fc(.) represents the linear transformation layer;

[0094] S24, embedding the source image and the target image respectively through independent encoders to obtain independent feature embedding;

[0095] In S24, in order to prevent the feature representation encoded by the shared encoder from forgetting the original information, each image is embedded separately, and the DGI encoder is used to perform efficient unsupervised embedding on each image separately;

[0096] The S24 includes:

[0097] S241, get the positive sample embedding Z of each node in the graph through an independent GCN model p , where the positive sample embedding representation Z of the i-th layer of the independent GCN modelp(i) for:

[0098]

[0099] Among them, W p(i) is the weight parameter of the i-th layer of the independent GCN model;

[0100] S242, randomly swap the attributes of the nodes in the graph, and obtain the negative sample embedding of each node in the graph through an independent GCN model

[0101] S243, embed the positive sample of each node in the graph into Zp and the negative sample into By embedding as independent features;

[0102] S25. Use independent feature embedding to provide embedding information for the feature embedding of each node in the graph, and obtain the feature representation of each node in the graph.

[0103] The loss expression designed in S3 is:

[0104]

[0105] Among them, λ, μ, η, γ, and ρ are the trade-off parameters for balancing the impact of different loss terms. cls is the source domain classification loss, L entropy is the target domain entropy loss, loss d is the domain adversarial loss, loss dist is the distance loss, loss pair is a pairwise constraint, loss diff is the soft subspace orthogonality constraint, loss dgi is the discriminator loss, θ h are the learning parameters of all encoders, θ y is the parameter of the node classifier, θ d Learning parameters of classifiers for domain adversarial learning;

[0106] The source domain classification loss L cls It is used to train the model to predict node labels and minimize the source domain classification loss, which is expressed as:

[0107]

[0108] Among them, N s represents the total number of source domain nodes, D cls (.) is the category classifier, y i represents the label of the i-th node in the source domain, Represents the feature vector obtained by the shared encoder of the i-th node in the source domain;

[0109] The target domain entropy loss L entropy It is used to make the pseudo-label results generated in the target domain more compact and concentrated, with as few edge points as possible. It is achieved by minimizing the conditional entropy of the predicted probability on the target network. The expression is:

[0110]

[0111] Among them, N t represents the total number of nodes in the target domain, is the i-th node in the target domain through D cls (.) The pseudo labels obtained, Represents the feature vector obtained by the shared encoder of the i-th node in the target domain;

[0112] The domain adversarial loss d The shared node representations learned by our model are domain invariant, using an adversarial domain adaptation approach;

[0113] The shared encoder should produce domain-invariant features that make the domain discriminator D(.) believe that Z s and Z T If they are of the same type, it is possible to reduce the distribution differences between networks and learn domain-invariant features. Therefore, a GRL-based adversarial domain adaptation method is used to train the GNN encoder and domain discriminator. The training is performed by using the nodes of the source network and the target network. The expression is:

[0114]

[0115] Among them, d i is the weight coefficient, D(.) is the domain discriminator, which is used to distinguish whether the shared features are from the source domain or the target domain, z i is the i-th feature vector in the total set of source domain and target domain;

[0116] The distance loss dist Including full-image distance loss and all-category distance loss

[0117] At the graph level, the center of the overall data domain should be as close as possible, but there are N nodes between the source domain and the target domain. s and N T There is an imbalance problem, and data balance needs to be considered. In the shared feature space encoded by the shared encoder, the domain with less data is sampled and expanded. Since the target graph does not know the label and cannot be refined to the category level for sampling, the domain is randomly sampled abs(N s -N T) point pairs, and add the feature average of each point pair as a new sample point to the domain, so as to achieve the purpose of balancing the number of sample points in the two domains. After the data is balanced, directly take the graph-level embedding of the two images and calculate their bi-norm. The smaller the distance, the better;

[0118] At the category level, the node classification discriminator Dcls learned from the source domain also pseudo-labels the target domain The embedding features of nodes with the same label in the source and target domains should be close, and the features of nodes with different labels should be far apart;

[0119] The distance loss dist The expression is:

[0120]

[0121] in, is the full-image distance loss, is the distance loss for all categories, α dist is a hyperparameter used to control the ratio of the total image distance loss to the total category distance loss. norm(.) is the operation for calculating the second norm. R(.) means taking the average value. Z S and Z T are the feature vectors obtained by the shared encoder for the source domain and the target domain, c is the total number of categories, c' is a constant with a value different from c, and Z Sc represents the embedding representation of the node with category c in the source domain, Z Tc Represents the embedding representation of the node with predicted category c in the target domain;

[0122] Since the feature space distance loss is based on the graph level and category level, some edge nodes may interfere with feature zooming. Therefore, we consider zooming in the space from the node level and obtain sample pairs from the following two perspectives for constraints.

[0123] First, from the perspective of categories, the source image data has all the labels, which is more conducive to guiding model learning. Therefore, sample pairs are sampled from the source image, and the cosine similarity of each sample pair is calculated. If the labels of two points belong to the same category, then the label of this sample pair is is 1, otherwise is 0;

[0124] In this way, from the perspective of node level, the features of nodes of the same category are as close as possible, and the features of nodes of different categories are as far away as possible. pair The expression is:

[0125] loss pair =α p loss node-pair +(1-αp )loss edge-pair

[0126]

[0127] Among them, α p To control the node loss loss node-pair and edge pair loss edge-pair The proportion of hyperparameters, represents the feature vector obtained by the shared encoder of the jth node in the source domain, Representation calculation and The cosine similarity of j represents the label of the jth node in the source domain, Indicated by y i and j The label pairs are composed of, BCE(.) represents binary cross entropy, N pair is the number of sample pairs, z j is the i-th feature vector in the total set of source domain and target domain; v i and v j denote the i-th node and j-th node in the source domain respectively, and e ij Indicates whether there is an edge between node i and node j. If there is an edge, then e ij The value of is 1, otherwise it is 0;

[0128] The soft subspace orthogonality constraint loss diff It is used to define the loss of providing information to the embedding obtained by the shared encoder by making the distance between the two close after the independent encoder embedding is obtained. Its expression is:

[0129]

[0130] in, and Respectively represent Z s and Z T The transpose of and They are the feature vectors obtained by independent encoders for the source domain and the target domain respectively;

[0131] The discriminator loss dgi The loss for efficient unsupervised embedding of each image using the DGI encoder is expressed as:

[0132]

[0133] Where N is the number of graph nodes embedded using independent encoders, A is the graph-level embedding vector, and D dgi(.,.) represents the probability score assigned to the sample pair, is the negative sample embedding representation of the i-th layer of the independent GCN model.

[0134] In one embodiment of the present invention, Source Only method, traditional domain adaptation and graph domain adaptation are used as comparison methods;

[0135] In the Source Only method, GCN and GraphSAGE only use source graph label data. They are trained on the source graph and tested directly on the target graph.

[0136] In traditional domain adaptation, DANN is selected from traditional domain adaptation models, ignoring the intrinsic relationship between samples and not considering graph structure information;

[0137] A branch of the GNN-based SOTA GDA model is selected in graph domain adaptation, including AdaGCN, UDAGCN, ASN, GRADE-N, SpecReg, and JHGDA;

[0138] The experiment was set up for training for 800 epochs. The GDC module first processed the original adjacency matrix and then selected the PPR kernel for diffusion. Its transfer probability was 0.05. The threshold truncation method was used to construct a new adjacency matrix. The eps threshold value was set between {1e -3 , 1e -4}; The hyperparameters λ and μ in the specific loss function are all set to 0.5 and 0.5, respectively. are all set to 1, and η takes values ​​in {1,1e -3 ,1e -5}, γ is set to 1, ρ is set to 0.01, α p Set to 0.9, alpha dist Set to 0.9, sample pair N pair The Adam optimizer is used, the learning rate is 0.02, and the weight decay is 5e -4 The GCN convolutional layers are all set to 2 layers, the hidden layer vector dimension is 128, the output feature dimension is 16, and the dropout is set to 0.5. The experimental results are compared using acc as the indicator.

[0139] The experimental results are shown in Table 1:

[0140] Table 1 Comparison of experimental results on classification accuracy across network nodes

[0141]

[0142]

[0143] According to Table 1, we can know that:

[0144] (1) Traditional domain adaptation methods cannot solve the task of cross-network node classification without using graph information. DANN only uses attribute features and does not consider the edges between nodes, which has the worst effect. Although the information of the target graph is considered, the topological structure is more important for graph data, which means that the association between nodes should be considered.

[0145] (2) Using only source image information is not effective. The target image information is also very important. The GCN and GSAGE methods only train classifiers on source images without using target image information. The effect is obviously not good enough, which also shows that there is indeed a distribution difference between the source image and the target image. The classifier trained on the source image cannot be directly used to classify the target image.

[0146] (3) All graph domain adaptation methods have good results. This can be explained by the fact that while extracting node features based on GCN, using the target graph information for the cross-network node classification task can better adapt to the domain. Therefore, all the results exceed the Source Only and traditional domain adaptation methods. Among them, our method achieved the best results in 5 data sets, and the average value was 1.55% higher than the sota method JHGDA. The improvement in A→D was 3%. This can be explained by the fact that we used the GDC diffusion model, which allows us to capture more stable global information, while learning domain-invariant features from different granularities, and ultimately learn a more effective cross-network node classifier.

[0147] In summary, the present invention uses graph diffusion to perform data enhancement, replacing the traditional PPMI mutual information matrix as the transfer matrix of global information, which can provide more global information for model training. At the same time, the adversarial method is combined with multi-level MMD to effectively learn domain invariance and semantic representation, thereby reducing the domain differences of cross-domain node classification.

[0148] The present invention effectively solves the limitations of existing graph neural network algorithms through a series of innovative strategies: first, global information is integrated through graph diffusion technology to enhance the model's understanding of the global structure; second, in the case where there are a large proportion of edges between nodes of the same category in the graph, graph diffusion is used to enhance data connections and improve information richness; third, in order to retain the original information, the introduction of DGI is designed to enable the shared encoder to remember the original graph information; finally, by combining explicit and implicit domain difference metrics and minimizing them at different granularities, a deeper level of domain adaptation is achieved. In summary, the above methods jointly improve the effect of the present invention in cross-network node classification applications.

[0149] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A cross-network node classification method based on diffusion and multi-granularity domain adaptation, characterized in that: include: S1, the source graph and the target graph are passed through the graph convolution diffusion model to obtain the corresponding transfer probability matrix; S2. According to the transition probability matrix, the source graph and the target graph are respectively passed through a shared encoder and an independent encoder to obtain the feature representation of each node in the graph; The shared encoder includes a local encoder and a global encoder; S3. According to the feature representation, loss design is performed at three levels: graph level, category level, and node level. The loss is back-propagated to update the parameters of the graph neural network to obtain a trained graph neural network. S4. Use the trained graph neural network to complete cross-network node classification.

2. The cross-network node classification method based on diffusion and multi-granularity domain adaptation according to claim 1 is characterized in that: In S1, the calculation formula of the transition probability matrix is: Among them, S is the transition probability matrix, θ k is the weighting coefficient, T k is the generalized transfer matrix.

3. The cross-network node classification method based on diffusion and multi-granularity domain adaptation according to claim 2 is characterized in that: The S2 includes: S21, obtain local embedding representations of the source image and the target image through the local encoder; S22, according to the transition probability matrix, obtain the global embedding representation of the source image and the target image through the global encoder; S23, according to the local embedding representation and the global embedding representation of the source graph and the target graph, the feature embedding of each node in the graph is obtained by attention weighting; S24, embedding the source image and the target image respectively through independent encoders to obtain independent feature embedding; S25. Use independent feature embedding to provide embedding information for the feature embedding of each node in the graph, and obtain the feature representation of each node in the graph.

4. The cross-network node classification method based on diffusion and multi-granularity domain adaptation according to claim 3 is characterized in that: In S21, a local GCN encoder is used to obtain a local embedding representation Z l , where the local GCN encoder layer i outputs Z l(i) The expression is: Among them, X is the input, σ is the activation function, D is the degree matrix, A is the adjacency matrix, W l(i) is the weight parameter of the local GCN layer i.

5. The cross-network node classification method based on diffusion and multi-granularity domain adaptation according to claim 4 is characterized in that: In S22, a global GCN encoder is used to obtain a global embedding representation Z g , where the global GCN encoder layer i outputs Z g(i) The expression is: Among them, W g(i) is the weight parameter of the i-th layer of the global GCN.

6. The cross-network node classification method based on diffusion and multi-granularity domain adaptation according to claim 5 is characterized in that: In S23, the expression of the feature embedding Z of each node is: Z=w1Z l +w2Z g Among them, w i = {w1,w2}, w1 and w2 are local embedding representations Z l and the global embedding representation Z g The weight of , fc(.) represents the linear transformation layer.

7. The cross-network node classification method based on diffusion and multi-granularity domain adaptation according to claim 3 is characterized in that: The S24 includes: S241. The positive sample embedding Zp of each node in the graph is obtained through the independent GCN model, where the positive sample embedding representation Zp(i) of the i-th layer of the independent GCN model is: Among them, W p(i) is the weight parameter of the i-th layer of the independent GCN model; S242, randomly swap the attributes of the nodes in the graph, and obtain the negative sample embedding of each node in the graph through an independent GCN model S243, embed the positive sample of each node in the graph into Zp and the negative sample into By embedding them as independent features.

8. The cross-network node classification method based on diffusion and multi-granularity domain adaptation according to claim 7 is characterized in that: The loss expression designed in S3 is: Among them, λ, μ, η, γ, and ρ are the trade-off parameters for balancing the impact of different loss terms. cls is the source domain classification loss, L entropy is the target domain entropy loss, loss d is the domain adversarial loss, loss dist is the distance loss, loss pair is a pairwise constraint, loss diff is the soft subspace orthogonality constraint, loss dgi is the discriminator loss, θ h are the learning parameters of all encoders, θ y is the parameter of the node classifier, θ d Parameters of the classifier learned for domain adversarial learning.

9. The cross-network node classification method based on diffusion and multi-granularity domain adaptation according to claim 8 is characterized in that: The source domain classification loss L cls The expression is: Among them, N s represents the total number of source domain nodes, D cls (.) is the category classifier, y i represents the label of the i-th node in the source domain, Represents the feature vector obtained by the shared encoder of the i-th node in the source domain; The target domain entropy loss L entropy The expression is: Among them, N t represents the total number of nodes in the target domain, is the i-th node in the target domain through D cls (.) The pseudo labels obtained, Represents the feature vector obtained by the shared encoder of the i-th node in the target domain; The domain adversarial loss d The expression is: Among them, d i is the weight coefficient, D(.) is the domain discriminator, z i is the i-th feature vector in the total set of source domain and target domain; The distance loss dist The expression is: in, is the full-image distance loss, is the distance loss for all categories, α dist is a hyperparameter used to control the ratio of the total image distance loss to the total category distance loss. norm(.) is the operation for calculating the second norm. R(.) means taking the average value. Z S and Z T are the feature vectors obtained by the shared encoder for the source domain and the target domain, c is the total number of categories, c' is a constant with a value different from c, and Z Sc represents the embedding representation of the node with category c in the source domain, Z Tc Represents the embedding representation of the node with predicted category c in the target domain; The pairwise constraint loss pair The expression is: loss pair =α p loss node-pair +(1-α p )loss edge-pair Among them, α p To control the node loss loss node-pair and edge pair loss edge-pair The proportion of hyperparameters, represents the feature vector obtained by the shared encoder of the jth node in the source domain, Representation calculation and The cosine similarity of j represents the label of the jth node in the source domain, Indicated by y i and j The label pairs are composed of, BCE(.) represents binary cross entropy, N pair is the number of sample pairs, z j is the i-th feature vector in the total set of source domain and target domain; v i and v j denote the i-th node and j-th node in the source domain respectively, and e ij Indicates whether there is an edge between node i and node j. If there is an edge, then e ij The value of is 1, otherwise it is 0; The soft subspace orthogonality constraint loss diff The expression is: in, and Respectively represent Z s and Z T The transpose of and They are the feature vectors obtained by independent encoders for the source domain and the target domain respectively; The discriminator loss dgi The expression is: Where N is the number of graph nodes embedded using independent encoders, A is the graph-level embedding vector, and D dgi (.,.) represents the probability score assigned to the sample pair, is the negative sample embedding representation of the i-th layer of the independent GCN model.