A heterogeneous graph node classification method based on a multi-view prototype enhanced graph neural network
By constructing a multi-view prototype enhanced graph neural network, the problems of insufficient multi-view information fusion and category prototype utilization in heterogeneous graph models are solved, thereby improving the accuracy and robustness of heterogeneous graph node classification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGXI UNIV
- Filing Date
- 2026-05-13
- Publication Date
- 2026-07-31
AI Technical Summary
Existing heterogeneous graph neural network models struggle to systematically combine multiple short meta-paths and complex meta-structures when dealing with various node types and relationships. They are unable to fully exploit high-order semantic relationships, have limited long-range dependency modeling capabilities, lack sufficient multi-view information fusion, and lack explicit category prototype modeling mechanisms, resulting in insufficient node classification accuracy and robustness.
By constructing a multi-view prototype enhanced graph neural network, the type information of nodes and edges is automatically parsed. A multi-view concatenated graph attention network is designed, and category prototypes and intra-class sorting convolutional modules are introduced to explicitly guide node representations to gather toward category prototypes, thereby improving intra-class compactness and inter-class separability.
It significantly improves the accuracy and robustness of heterogeneous graph node classification, enhances the ability to fuse multi-view information and training stability, and maintains superior classification performance, especially in semi-supervised scenarios with sparse training labels.
Smart Images

Figure CN122490213A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence and graph data mining technology, specifically involving a heterogeneous graph node classification method based on multi-view prototype enhanced graph neural network, which can be applied to node representation learning and category prediction tasks in scenarios such as recommendation systems, literature and social network analysis, biomedical networks, and knowledge graphs. Background Technology
[0002] Heterogeneous Information Networks (HINs) consist of multiple types of nodes and edges, enabling them to more realistically depict complex relational structures in the real world. In applications such as recommender systems, research collaboration analysis, and drug-disease association prediction, tasks like node classification and link prediction on heterogeneous graphs are often required to uncover latent semantic relationships and global patterns. Traditional methods based on feature engineering or matrix factorization struggle to simultaneously utilize high-dimensional attribute information and multi-type relational structures. In recent years, numerous Graph Neural Network (GNN) methods have provided new approaches to graph data modeling.
[0003] Existing homogeneous graph neural network models, such as GCN, GraphSAGE, and GAT, rely on neighbor aggregation mechanisms to perform feature propagation and representation learning on the graph structure, achieving good results in tasks such as social networks and citation networks. However, these models assume that the graph has only one type of node and one type of edge, making it difficult to directly handle heterogeneous graphs containing multiple entities and relationships, such as authors, papers, conferences, topics, drugs, and diseases. To address this, researchers have proposed various deep learning models for heterogeneous graphs, such as HAN based on meta-path attention, MAGNN which introduces node-level and semantic-level aggregation within meta-paths, and methods such as GTN and HGT that use learnable graph transformations or heterogeneous attention mechanisms. These models improve the performance of heterogeneous graph node classification by designing a few typical meta-paths to extract neighborhood structures under specific semantics.
[0004] However, existing heterogeneous graph neural networks still have several shortcomings. First, most methods rely on a small number of manually defined meta-paths, making it difficult to systematically combine various short meta-paths with complex meta-structures, and failing to fully explore higher-order semantic relationships such as "shared mediator nodes" and "multiple constraint neighborhoods." Simultaneously, their ability to model long-range dependencies is limited, making it difficult to consider long meta-path information while maintaining computational feasibility. Second, while some multi-view methods construct multiple views for different meta-paths or relationships, they typically only perform weighted summation or concatenation of the results from each view at a single layer of the network. The sequential dependencies and layer-by-layer complementary information between views are not fully utilized, resulting in insufficient information fusion between different views and a tendency for structural semantics to be averaged and diluted. Third, in semi-supervised node classification scenarios, node labels are often only used at the loss function level. Existing models lack explicit "category prototype" modeling mechanisms and rarely use information such as class mean vectors and intra-class structure to directly constrain node representations, resulting in insufficient intra-class compactness and unclear inter-class boundaries in the learned embedding space.
[0005] Furthermore, heterogeneous graphs are typically large in scale, sparse in structure, and have numerous relation types. Multi-view modeling further amplifies the number of parameters and computational costs, easily leading to problems such as unstable training and gradient imbalance between different views. Although existing work has alleviated the oversmoothing and gradient vanishing problems of deep GNNs through residual connections, normalization, and dropout, systematic research on how to design structurally sound and training-stable graph attention network architectures in multi-view concatenation scenarios still lacks systematic research.
[0006] To address the aforementioned issues, a method is needed that can: 1) automatically parse the type information of nodes and edges from the original heterogeneous graph data file, systematically construct a probabilistic graph view of metapath and node feature similarity, thereby comprehensively characterizing various structural semantic relationships; 2) organically connect multiple views during the graph neural network encoding stage, sequentially perform graph convolution aggregation on each view, and combine residual and normalization mechanisms to fully leverage the sequential complementary effect between views; 3) explicitly introduce category prototypes and intra-class ordering structures into the representation space, perform prototype alignment and intra-class relationship enhancement on node representations to improve intra-class compactness and inter-class separability, thereby significantly improving the accuracy and robustness of heterogeneous graph node classification.
[0007] To address the shortcomings of existing technologies, this invention proposes a heterogeneous graph node classification method (PMCR-Net) based on a multi-view prototype-enhanced graph neural network. This method parses various node and edge types from raw heterogeneous graph data stored in formats such as .dat, constructing a multi-view heterogeneous graph structure including a meta-path probability graph. Based on this, a multi-view concatenated graph attention network (SCA) is designed to achieve layer-by-layer aggregation and residual propagation of multiple views. Furthermore, labeled nodes in the training set are used to construct a category prototype (CPF), and pseudo-labels are defined for nodes with unknown labels based on similarity calculations with prototype nodes. An intra-class ranking convolutional module (ICSC) is then used to enhance the representations of nodes of the same class, guiding node representations to converge towards their category prototypes in the feature space. Through this design, this invention can more fully utilize the multi-relationship structure and prior label information in heterogeneous graphs while maintaining controllable computational complexity, effectively improving the performance of node classification tasks. Summary of the Invention
[0008] To address the shortcomings of existing heterogeneous graph node classification methods, such as insufficient characterization of multi-relation semantics, inadequate fusion of multi-view information, and insufficient utilization of category priors, this invention aims to provide a heterogeneous graph node classification method based on a multi-view prototype-enhanced graph neural network. By uniformly converting long and short meta-paths and meta-structures into multiple homogeneous subgraphs and performing view-by-view cascaded interactions within a graph attention network, and by introducing category prototype and intra-class ranking convolution enhancement modules, explicit intra-class constraints and inter-class separation are applied to node representations, thereby significantly improving the accuracy and robustness of heterogeneous graph node classification.
[0009] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0010] A heterogeneous graph node classification method based on a multi-view prototype augmented graph neural network includes the following steps:
[0011] S1, obtain the original data of the heterogeneous graph stored in the form of a text file or binary file, parse the original data to obtain multiple node types, multiple edge types, initial features of each node and category label information of some nodes, and determine the target node type and its corresponding target node set.
[0012] S2, according to the preset meta-path, perform high-order combination of the original edge relationships of the heterogeneous graph to construct multiple homogeneous views; and calculate the node feature similarity to filter the neighboring nodes of the meta-path subgraph; sort and combine the meta-path subgraphs in a prescribed order to obtain a multi-view homogeneous graph structure for the target node;
[0013] S3, construct a multi-view concatenated graph convolutional network, input the multi-view homogeneous graph structure and the initial features of the target node into the multi-view concatenated graph convolutional network, perform graph convolution aggregation on each view in the prescribed order in each layer, and perform residual connection and normalization processing, and use the updated features of the previous view as the input features of the next view in the same layer, until the node features of all views are updated.
[0014] S4: Based on the target nodes with known labels in the training set, calculate the mean vector of the node representation by category on the basis of the node hidden representation to obtain the corresponding category prototype, and update the historical category prototype by exponential moving average to obtain the steady-state category prototype representation; for target nodes with unknown labels, calculate the similarity between their hidden representation and each category prototype, and select the one with the highest similarity as the pseudo label of its own node.
[0015] S5, perform intra-class ranking convolutional enhancement on nodes within the same category: score multiple nodes within the same category based on learnable scoring vectors, rank nodes within the same category according to scores, form a one-dimensional sequence of the ranked nodes, input the sequence into a one-dimensional convolutional network for convolutional aggregation and nonlinear transformation, extract intra-class ranking convolutional features, calculate the similarity between the updated node features and the prototype nodes of each category, and perform weighted fusion on the category prototypes to obtain prototype fusion features;
[0016] S6, the prototype fusion feature is concatenated and linearly mapped with the node features updated by the multi-view concatenated graph convolutional network to obtain the final target node representation;
[0017] S7. Input the target node representation into the classifier, output the category prediction result of the target node, and calculate the loss function using the known labels. Jointly train the parameters of the multi-view concatenated graph attention network, the category prototype module, and the intra-class ranking convolution enhancement module to obtain a trained model for heterogeneous graph node classification.
[0018] Compared to existing heterogeneous graph node classification models, this model transforms meta-paths into homogeneous subgraphs and promotes information interaction between subgraphs through cascading. Simultaneously, it facilitates the target node's exploration of distant nodes that are exceptionally important for its own node representation learning through intra-class ranking and one-dimensional convolution. Furthermore, it proposes prototype node enhancement to promote information interaction between nodes of different categories, resulting in higher intra-class compactness and inter-class separability of node representations in the feature space, significantly improving the accuracy of heterogeneous graph node classification.
[0019] Further, step S2 includes:
[0020] Based on the preset meta-path, matrix multiplication is performed on the first-level adjacency matrices between different node types in the heterogeneous graph to obtain the higher-order adjacency matrix within the target node type.
[0021] Calculate the feature similarity matrix between target nodes, and multiply the higher-order adjacency matrix element by element with the feature similarity matrix to obtain the weighted adjacency matrix;
[0022] The weighted adjacency matrix is normalized and Top-K filtered row by row, and the K neighbor nodes with the highest similarity values in each row are retained to construct a meta-path probability graph view, thus obtaining the multi-view homogeneous graph structure.
[0023] Furthermore, the multi-view concatenated graph convolutional network described in step S3 includes at least one multi-view graph convolutional layer. In each layer, graph convolution aggregation is performed on multiple homogeneous views in a preset order. For each view, the graph convolution algorithm is used to aggregate the features of neighboring nodes. The graph convolution output of the current view is superimposed and normalized with the input of the current view. When all views have been updated, the node representation of the last view is used as the output of the layer and passed to the next multi-view graph convolutional layer.
[0024] Further, in step S4, updating the historical category prototype using an exponential moving average method includes:
[0025] For each category, the hidden representations of target nodes with that category label in the training set are collected in the current layer and averaged according to the number of nodes to obtain the current batch category prototype features. The current batch category prototypes are weighted and fused with the historical category prototypes of the previous iteration according to a preset exponential moving average coefficient to obtain the updated category prototypes, which are then stored in the steady-state category prototype table.
[0026] Furthermore, in step S4, for target nodes with unknown labels, the cosine similarity between their hidden representation and the prototype of each category is calculated, and the confidence weight of each category is obtained by normalization using the softmax function. The category with the highest confidence weight is taken as the pseudo label, and pseudo label nodes with confidence weights not lower than a preset threshold are selected for inclusion in the subsequent intra-class sorting process.
[0027] Further, in step S5, the intra-class ranking convolution enhancement includes:
[0028] For nodes with the same label, the scores of each node and the corresponding category prototype are calculated using the learnable parameter matrix. The nodes of the same category are sorted according to the scores, and the hidden representations of the sorted nodes are stacked along the sequence direction to form a one-dimensional feature sequence. The one-dimensional feature sequence is input into a one-dimensional convolutional network for convolution, nonlinear activation, and normalization operations to obtain the intra-class sorted convolutional features.
[0029] Furthermore, in step S6, the prototype fusion feature is concatenated with the updated node features of the multi-view concatenated graph convolutional network, and mapped back to a unified dimension through a linear transformation to obtain the final target node representation.
[0030] Furthermore, in step S7, the classifier is a linear classifier, the loss function is a cross-entropy loss function, and the parameters of the multi-view concatenated graph convolutional network, the category prototype module, and the intra-class ranking convolutional enhancement module are jointly trained end-to-end through backpropagation and an optimizer.
[0031] The beneficial effects of this invention are as follows:
[0032] 1. This invention transforms long and short meta-paths into multiple complementary homogeneous subgraph views and combines node feature similarity to perform probabilistic filtering and Top-K truncation of meta-path neighbor nodes. While preserving high-order structural semantics, it effectively suppresses noisy neighbors in long-range propagation, and can more comprehensively capture various structural semantic information such as local and global, multiple constraints and long-range dependencies.
[0033] 2. This invention adopts a cascaded interaction method that performs graph convolution aggregation on each view in the same layer, and ensures information flow and training stability through residual connections and normalization mechanisms. It effectively avoids the semantic dilution problem caused by simple averaging of multiple views, so that the structural semantics of different views are gradually superimposed and interacted in the feature space in an orderly and controllable manner, thereby significantly improving the expressive power of node representation and the stability of deep network training.
[0034] 3. This invention constructs a steady-state category prototype through exponential moving average, explicitly introduces category prior constraints to perform global semantic alignment of node representations, and utilizes an intra-class ranking convolution enhancement mechanism to mine local structural relationships between nodes of the same class and distant important nodes, thereby enhancing the association and constraints of intra-class nodes. This makes the node representations exhibit higher intra-class compactness and inter-class separability in the feature space (see [link]). Figure 2 ).
[0035] 4. Experimental results on multiple standard heterogeneous graph datasets such as ACM, DBLP, and IMDB show that, under medium-to-high training ratios on the IMDB dataset and the ACM and DBLP datasets, the present invention significantly outperforms existing methods such as HAN, MAGNN, HGT, and TAGDN in terms of Macro-F1 and Micro-F1 scores for node classification, verifying the substantial improvement of the present invention in the accuracy of heterogeneous graph node classification.
[0036] 5. The robustness and generalization performance of the model benefit from the mitigation of gradient imbalance and oversmoothing problems by multi-view cascade interaction, residual connection and normalization mechanism, as well as the guidance of structured distribution of feature space by class prototype and intra-class ranking convolution. The present invention maintains good and relatively stable classification performance under different training label ratios of 20%, 40% and 60%. In particular, it can still effectively learn discriminative node representations in semi-supervised scenarios with sparse training labels, demonstrating strong training robustness, semi-supervised adaptability and generalization performance. Attached Figure Description
[0037] Figure 1 This is the overall model diagram of heterogeneous graph node classification based on multi-view prototype enhanced graph neural network of the present invention (PMCR-Net model structure diagram).
[0038] Figure 2 This is a two-dimensional visualization of the node embedding features of this model and the comparison model on the DBLP dataset (two-dimensional visualization of node features). Detailed Implementation
[0039] I. Data Representation and Symbol Conventions for Heterogeneous Plots
[0040] In this embodiment, the heterogeneous graph is denoted as
[0041]
[0042] in, Represents a set of nodes. Denotes the set of edges. Here is a node type mapping function, where A is a set of node types. Let R be the edge type mapping function, and R be the set of edge types.
[0043] Let the target node type be The target node set is:
[0044]
[0045] Each target node Corresponding initial feature vector Stack the features of all target nodes into a feature matrix:
[0046]
[0047] Some target nodes are labeled with categories, and the set of labeled nodes is denoted as follows: Its label is recorded as:
[0048]
[0049] II. Multi-view construction: Meta-path probability graph
[0050] 2.1 Constructing a first-level adjacency matrix from the original data
[0051] In this embodiment, the original heterogeneous graph data is stored in the form of text files (such as .csv, .txt) or binary files (such as .dat, .bin), including the following three types of files: Node files: recording node ID, node type, and node characteristics; Edge files: recording source node ID, target node ID, and edge type; Type files: recording the correspondence between node type numbers and edge type numbers. The overall process of constructing the above multi-view is described in [link to documentation]. Figure 1 The data parsing and view construction section on the left.
[0052] By parsing the above file, pairs of nodes are created for each node type. Construct a first-level adjacency matrix
[0053]
[0054] in Representation type The number of nodes, if there exists a subtype nodes To type nodes If there is a directed edge, then we have
[0055]
[0056] In actual implementation, Sparse matrix formats (such as CSR / COO) are generally used for storage to facilitate efficient subsequent calculations.
[0057] 2.2 Metapath Definition
[0058] Let the meta-path be denoted as:
[0059]
[0060] in It is a sequence of node types, and This represents a higher-order relationship that starts from the target type and returns to the target type. Based on the type sequence, the corresponding first-level adjacency matrices are extracted sequentially. The higher-order adjacency matrix is obtained through matrix multiplication.
[0061]
[0062] 2.3 Construction of Meta-Path Probability Graph View
[0063] To model long-range dependencies, this embodiment further introduces a probabilistic graphical view that combines meta-paths with node feature similarity. Let the meta-path... Similarly, calculate its higher-order adjacency matrix.
[0064]
[0065] Read the feature matrix of the target node from the node file. Calculate the cosine similarity matrix between nodes. ,in
[0066]
[0067] Element-wise multiplication of structural adjacency and feature similarity yields a weighted adjacency matrix:
[0068]
[0069] in This represents the Hadamard product. For each row... Normalization and Top-K filtering are performed to retain the first... The row with the largest absolute value Set one element to zero, and set the rest to zero.
[0070]
[0071] in To prevent division by zero by small constants. Where the edge weights... Can be viewed as a slave node Transfer to node along long-length path The probability of the edge weight. Can be viewed as a slave node Transfer to node along long-length path The probability is used to obtain the meta-path probability graph view.
[0072]
[0073] 2.4 Multi-view Collection
[0074] In summary, regarding the target node type Several views are constructed.
[0075]
[0076] Each of them This may correspond to a certain meta-path probability graph view. Each view can be converted into a corresponding sparse adjacency matrix. and edge weight matrix .
[0077] III. Multi-view concatenated graph convolutional networks
[0078] This embodiment employs a multi-layer, multi-view, concatenated graph attention network to learn the representation of the target node. Assume the network has a total of... Layers, each layer's input is The output is ,in ,and The module structure of the above multi-view concatenated graph convolutional network is described in [reference needed]. Figure 1 The MCR-GCN part.
[0079] 3.1 Single-view graph convolution aggregation
[0080] For the first A view of a layer Its sparse adjacency is achieved through the edge set. This is represented by the weighted out-degree and weighted in-degree.
[0081]
[0082] in Let the edge weights be represented, then the formula for updating the node features of the current view is:
[0083]
[0084] in These are learnable parameters. Indicates the current network layer number. Indicates the order of the current subgraph.
[0085] 3.2 Multi-view cascading and residual connection
[0086] For the first In terms of layers, the default view order Let the input of this layer be... ,in This represents the final output feature of the previous layer of the network.
[0087] For the first A view We will have a weighted GCN View Output As input, a single-view weighted graph convolution is performed to aggregate and update node features. Specifically, the single-view graph convolution output is... Input features of this view Perform residual superposition and batch normalization. Processing yields the updated features of the current view:
[0088]
[0089] When all After all views have been processed, the output of the last view is used as the output of that layer.
[0090]
[0091] In this way, multiple homogeneous subgraph views are cascaded and interacted within each layer, allowing the structural semantics of different views to be gradually superimposed and merged in the feature space.
[0092] IV. Category Prototype Construction and Exponential Moving Average Update
[0093] In obtaining the first Hidden representation of layers Subsequently, this embodiment utilizes tagged nodes to construct category prototypes.
[0094] 4.1 Calculation of the prototype for the current batch category
[0095] For the first Class, collect labels from the training set as The set of nodes:
[0096]
[0097] In the In the current iteration of the layer, the category The prototype is defined as the mean of the hidden representation of this type of node:
[0098]
[0099] 4.2 Steady-State Category Prototype Table and EMA Update
[0100] To enhance training stability, this embodiment maintains a steady-state category prototype table. And it is updated using an exponential moving average:
[0101]
[0102] Where γ is the exponential moving average coefficient (or smoothing factor), with a value range of 0 < γ < 1, used to control the fusion ratio between historical prototypes and current batch prototypes. Initially, it can be set to... This represents the mean of the first batch. EMA updates ensure that the category prototype reflects the latest feature distribution while maintaining a degree of historical smoothing.
[0103] V. Intra-class Sorting Convolution Enhancement Module (ICSC)
[0104] In this embodiment, the process of sequentially scoring and sorting nodes within the same category and extracting one-dimensional convolutional features is collectively referred to as intra-class ranking convolutional enhancement, which includes the following sub-steps:
[0105] 5.1 Intra-class scoring and ranking
[0106] Obtain the hidden representation of the node and steady-state category prototype Next, this embodiment scores and sorts the nodes with known labels within each category to construct an intra-category sequence. For target nodes with unknown labels, this model also constructs pseudo-labels for unknown label nodes based on their similarity to the category prototype and includes them in the intra-category sorting process. For any unlabeled node... This embodiment first considers its hidden representation. With prototypes of each category The similarity between them is used to construct normalized weights. Specifically, the similarity function is denoted as... Using cosine similarity, we have
[0107]
[0108]
[0109] in, This is a temperature coefficient used to adjust the sharpness of the weight distribution. Represents a node Belongs to the Confidence weights for classes.
[0110] In this embodiment, the category corresponding to the maximum confidence level is used as the node. The pseudo-labels can be set, and the confidence threshold can be set. Used to filter out high-confidence pseudo-labels:
[0111]
[0112]
[0113] in, Indicates being divided into the first A set of pseudo-label nodes whose confidence level is not lower than the threshold.
[0114] Based on this, this embodiment will use a set of nodes with real labels. With pseudo-label node set Merge to obtain an expanded set of nodes for intra-class sorting.
[0115]
[0116] For extended sets any node in All scores are given using the same scoring function, which is defined as follows:
[0117]
[0118] in For the learnable parameter matrix The given linear score:
[0119]
[0120] Sort nodes of the same type according to their scores, for example, in descending order:
[0121]
[0122] in .
[0123] 5.2 Intra-class one-dimensional convolution feature extraction
[0124] The sorted node representations are stacked sequentially to form a sequence of intra-class features:
[0125]
[0126] Consider it as having a length of The number of channels is A one-dimensional sequence is input into a one-dimensional convolutional network. In this embodiment, the one-dimensional convolutional network uses... To achieve this, the kernel size is... The number of channels remains consistent with the input dimension or is reduced in dimension, and then sequentially passes through the ReLU activation function and layer normalization (LayerNorm) operation. Let the convolution kernel parameters be... The convolution output is
[0127]
[0128] The convolution output can be further processed by a non-linear activation function. and normalization operations:
[0129]
[0130] Record No. Sorted nodes The intra-class convolution enhancement feature is
[0131]
[0132] See the effect of node representation feature distribution after intra-class sorted convolution enhancement. Figure 2 The PMCR-Net subplot is shown in the diagram.
[0133] VI. Prototype Fusion and Final Node Representation
[0134] 6.1 Prototype Fusion Features
[0135] For each node Prototype weights are constructed based on the similarity between their hidden representations and the prototypes of each category. Similarity is calculated as follows:
[0136]
[0137] The class weights are obtained through softmax regularization:
[0138]
[0139] in This is a temperature coefficient used to adjust the "sharpness" of the weight distribution.
[0140] Prototype fusion feature is defined as:
[0141]
[0142] 6.2 Final Representation After Prototype Enhancement
[0143] For tagged nodes Its intra-class convolution enhancement feature is denoted as For unlabeled nodes, the nearest-class prototype method can be used to construct the model. .
[0144] Concatenate prototype fusion features with intraclass convolutional features:
[0145]
[0146] Mapping back to a unified dimension via a linear transformation:
[0147]
[0148] in The dimension is represented by the final node.
[0149] VII. Classification and Training
[0150] Input the final node representation into the linear classifier:
[0151]
[0152] The predicted probability is
[0153]
[0154] Supervised training of labeled nodes is performed using cross-entropy loss:
[0155]
[0156] The parameters of the multi-view concatenated graph attention network, the category prototype module, and the intra-class ranking convolutional enhancement module are jointly trained end-to-end using backpropagation and an optimizer until the metrics converge on the validation set or the preset number of iterations is reached.
[0157] Experimental data confirm the effectiveness of this invention, as shown in the following three tables:
[0158] Table 1 shows the node classification experiments on the ACM dataset.
[0159]
[0160] Table 2 shows the node classification experiments on the DBLP dataset.
[0161]
[0162] Table 3 shows the node classification experiments on the IMDB dataset.
[0163]
[0164] See the 2D visualization results of node embeddings for each model on the DBLP dataset. Figure 2 ,Depend on Figure 2 It is evident that the node distribution of existing comparative models generally exhibits low clustering of nodes of the same type, overlapping of regions of different categories, and blurred inter-class boundaries. Some models even show multiple clusters of nodes of the same type or severe overlap with other categories, indicating that the node representations they have learned lack intra-class compactness and inter-class separability in the feature space.
[0165] In contrast, in the subgraphs corresponding to PMCR-Net of this invention, nodes of the same type are highly clustered, the boundaries between different color clusters are clear, and the overlapping areas are significantly reduced. The node representations exhibit higher intra-class compactness and stronger inter-class separation in the feature space. This visualization result corroborates the experimental data in Table 2 showing that PMCR-Net achieves better classification accuracy on the DBLP dataset. It demonstrates that this invention, through the synergistic effect of multi-view concatenated graph convolution, class prototype alignment, and intra-class ranking convolution enhancement, effectively guides node representations to cluster towards their respective class prototypes, thereby improving the accuracy, robustness, and generalization performance of heterogeneous graph node classification.
Claims
1. A heterogeneous graph node classification method based on multi-view prototype enhanced graph neural network, characterized in that, Includes the following steps: S1, obtain the original data of the heterogeneous graph stored in the form of a text file or binary file, parse the original data to obtain multiple node types, multiple edge types, initial features of each node and category label information of some nodes, and determine the target node type and its corresponding target node set. S2, based on the preset meta-path, perform high-order combination of the original edge relationships of the heterogeneous graph to construct multiple homogeneous views; and calculate the node feature similarity to filter the neighboring nodes of the meta-path subgraph. The aforementioned meta-path subgraphs are sorted and combined in a prescribed order to obtain a multi-view homogeneous graph structure for the target node; S3, construct a multi-view concatenated graph convolutional network, input the multi-view homogeneous graph structure and the initial features of the target node into the multi-view concatenated graph convolutional network, perform graph convolution aggregation on each view in the prescribed order in each layer, and perform residual connection and normalization processing, and use the updated features of the previous view as the input features of the next view in the same layer, until the node features of all views are updated. S4: Based on the target nodes with known labels in the training set, calculate the mean vector of the node representation by category on the basis of the node hidden representation to obtain the corresponding category prototype, and update the historical category prototype by exponential moving average to obtain the steady-state category prototype representation; for target nodes with unknown labels, calculate the similarity between their hidden representation and each category prototype, and select the one with the highest similarity as the pseudo label of its own node. S5, perform intra-class ranking convolutional enhancement on nodes within the same category: score multiple nodes within the same category based on learnable scoring vectors, rank nodes within the same category according to scores, form a one-dimensional sequence of the ranked nodes, input the sequence into a one-dimensional convolutional network for convolutional aggregation and nonlinear transformation, extract intra-class ranking convolutional features, calculate the similarity between the updated node features and the prototype nodes of each category, and perform weighted fusion on the category prototypes to obtain prototype fusion features; S6, the prototype fusion feature is concatenated and linearly mapped with the node features updated by the multi-view concatenated graph convolutional network to obtain the final target node representation; S7. Input the target node representation into the classifier, output the category prediction result of the target node, and calculate the loss function using the known labels. Jointly train the parameters of the multi-view concatenated graph attention network, the category prototype module, and the intra-class ranking convolution enhancement module to obtain a trained model for heterogeneous graph node classification.
2. The method of claim 1, wherein, Step S2 includes: Based on the preset meta-path, matrix multiplication is performed on the first-level adjacency matrices between different node types in the heterogeneous graph to obtain the higher-order adjacency matrix within the target node type. Calculate the feature similarity matrix between target nodes, and multiply the higher-order adjacency matrix element by element with the feature similarity matrix to obtain the weighted adjacency matrix; The weighted adjacency matrix is normalized and Top-K filtered row by row, and the K neighbor nodes with the highest similarity values in each row are retained to construct a meta-path probability graph view, thus obtaining the multi-view homogeneous graph structure.
3. The method of claim 1, wherein, The multi-view concatenated graph convolutional network described in step S3 includes at least one multi-view graph convolutional layer. In each layer, graph convolution aggregation is performed on multiple homogeneous views in a preset order. For each view, the graph convolution algorithm is used to aggregate the features of neighboring nodes. The graph convolution output of the current view is superimposed and normalized with the input of the current view. When all views have been updated, the node representation of the last view is used as the output of the layer and passed to the next multi-view graph convolutional layer.
4. The method of claim 1, wherein, In step S4, updating the historical category prototype using the exponential moving average method includes: For each category, the hidden representations of target nodes with that category label in the training set are collected in the current layer and averaged according to the number of nodes to obtain the current batch category prototype features. The current batch category prototypes are weighted and fused with the historical category prototypes of the previous iteration according to a preset exponential moving average coefficient to obtain the updated category prototypes, which are then stored in the steady-state category prototype table.
5. The method according to claim 1, characterized in that, In step S4, for target nodes with unknown labels, the cosine similarity between their hidden representation and the prototype of each category is calculated. The confidence weight of each category is obtained by normalization using the softmax function. The category with the highest confidence weight is taken as the pseudo label, and pseudo label nodes with confidence weights not lower than a preset threshold are selected for inclusion in the subsequent intra-class sorting process.
6. The method according to claim 1, characterized in that, In step S5, the intra-class ranking convolution enhancement includes: For nodes with the same label, the scores of each node and the corresponding category prototype are calculated using the learnable parameter matrix. The nodes of the same category are sorted according to the scores, and the hidden representations of the sorted nodes are stacked along the sequence direction to form a one-dimensional feature sequence. The one-dimensional feature sequence is input into a one-dimensional convolutional network for convolution, nonlinear activation, and normalization operations to obtain the intra-class sorted convolutional features.
7. The method according to claim 2, characterized in that, In step S6, the prototype fusion feature is concatenated with the updated node features of the multi-view concatenated graph convolutional network, and mapped back to a unified dimension through a linear transformation to obtain the final target node representation.
8. The method according to claim 1, characterized in that, In step S7, the classifier is a linear classifier, the loss function is the cross-entropy loss function, and the parameters of the multi-view concatenated graph convolutional network, the category prototype module, and the intra-class ranking convolutional enhancement module are jointly trained end-to-end through backpropagation and optimizer.