Graph node representation method based on hyperspherical hierarchical contrastive learning

By introducing node dispersion and hierarchical contraction mechanisms within the hyperspherical space, the problems of negative sample dependence and representation collapse in graph contrastive learning are solved, achieving efficient and stable node representation and classification.

CN121145923BActive Publication Date: 2026-07-10KUNMING UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
KUNMING UNIV OF SCI & TECH
Filing Date
2025-09-09
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing graph contrastive learning methods rely on a large number of negative samples, resulting in high computational and storage overhead, difficulty in scaling, and easy collapse of node representations, which affects discriminativeness and the performance of downstream tasks.

Method used

In a hyperspherical space, a node dispersion and hierarchical contraction mechanism is introduced. The objective function is optimized by the node dispersion loss and hierarchical contraction loss, and node classification is performed by combining a logistic regression model.

Benefits of technology

It effectively avoids node representation collapse, improves discriminativeness and stability, reduces computational overhead, increases node classification accuracy, and maintains result stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121145923B_ABST
    Figure CN121145923B_ABST
Patent Text Reader

Abstract

This invention relates to a graph node representation method based on hyperspherical hierarchical contrastive learning, belonging to the fields of artificial intelligence and graph representation learning technology. Existing graph contrastive learning methods often lack effective dispersion constraints, easily leading to node representation collapse and thus weakening the ability to distinguish between different types of nodes. To address these issues, this invention is proposed. Specifically, firstly, node features are encoded using a graph neural network, and node embeddings are normalized and projected onto a unit hyperspherical space. Subsequently, a node dispersion mechanism is introduced within the hyperspherical space to maintain a uniform distribution of nodes and avoid representation collapse. Then, a hierarchical contraction mechanism is used to progressively guide node representations closer to neighbor centers and the global center, enhancing the consistency between local and global representations. Finally, by constructing a comprehensive optimization objective and training the model, accurate classification of graph nodes is achieved. This invention can enhance overall dispersion while maintaining clustering of similar nodes, thereby significantly improving the performance of downstream tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a graph node representation method based on hypersphere hierarchical contrastive learning, belonging to the fields of artificial intelligence and graph representation learning technology. Background Technology

[0002] With the continuous emergence of large-scale graph data such as social networks, knowledge graphs, and biomolecular networks, learning effective node representations from graph structures has become an important research direction in the field of graph machine learning.

[0003] In recent years, contrastive learning, as an unsupervised learning paradigm, has been widely applied to graph representation learning. Its core idea is to achieve invariance to noise by maximizing the similarity of positive sample pairs and to promote a uniform distribution of node representations in the space through negative sample pairs. Uniformity has been proven to be a crucial factor in preventing model collapse and improving the discriminative power of representations. Existing methods, such as contrastive learning frameworks based on negative sampling, have alleviated the problem of insufficient labeled data to some extent, but still have the following shortcomings:

[0004] (1) Strong dependence on negative samples: Many methods rely on a large number of negative samples for training, resulting in high computational and storage overhead and difficulty in scaling up on large-scale graph data.

[0005] (2) Complex augmentation strategies: Some methods rely on complex data augmentation mechanisms based on graph structures or features, otherwise it is difficult to guarantee the stability of training.

[0006] (3) Representation collapse problem: Even in contrastive learning frameworks without negative samples, due to the lack of effective dispersion constraints, node representations are prone to shrinking to the same or similar regions, making it difficult to distinguish between nodes of different categories, which seriously affects the performance of downstream tasks.

[0007] Therefore, how to maintain the clustering effect of similar nodes, introduce a reasonable dispersion mechanism to avoid representation collapse, and combine it with a hierarchical shrinkage strategy to enhance the consistency between local and global representations has become a key problem that current graph contrastive learning methods urgently need to solve. Summary of the Invention

[0008] To address the aforementioned problems, this invention provides a graph node representation method based on hyperspherical hierarchical contrastive learning. This method projects node representations uniformly onto a hyperspherical space and introduces node dispersion and hierarchical contraction mechanisms within this space. This enhances the dispersion of the overall distribution while ensuring clustering of similar nodes, effectively improving the discriminativeness and stability of the graph node representation.

[0009] The technical solution of this invention is: a graph node representation method based on hyperspherical hierarchical contrastive learning, the method comprising:

[0010] Step 1, Node Encoding and Projection: The input graph data is processed, and the node features are encoded using a graph neural network to obtain the node embedding representation. The node embedding representation is then normalized and projected onto a unit hypersphere space to obtain the normalized node representation.

[0011] Step 2: Learning through comparison of hyperspherical layering:

[0012] A node dispersion mechanism is introduced in the hypersphere space. By comparing the node representation with a randomly shuffled node representation, the nodes are encouraged to maintain a uniform distribution on the hypersphere and avoid representation collapse.

[0013] Then, a hierarchical contraction mechanism is executed, which constrains the node representation to gradually move closer to its local center at the local level, and further constrains the local center to move closer to the global center at the global level;

[0014] Finally, the node dispersion loss and the hierarchical contraction loss are weighted and combined to construct the overall optimization objective function, and the model parameters are updated by gradient descent to obtain the optimized node representation that combines dispersion and clustering.

[0015] Step 3, Result Prediction: After obtaining the optimized node representation, it is input into a classifier for node classification. The classifier uses a logistic regression model combined with... The regularized cross-entropy loss function is optimized to output the final classification result.

[0016] Furthermore, Step 1 includes:

[0017] Step 1.1: Represent the graph data as G = (X, A), where, The node feature matrix, Let N be the adjacency matrix, where N is the number of nodes and d is the dimension.

[0018] A Dropout perturbation is introduced at input, randomly discarding edge or node feature dimensions to obtain a perturbed graph representation. in Let represent the node feature matrix and adjacency matrix of the graph representation after perturbation, respectively;

[0019] Step 1.2: Encode node features using a Graph Convolutional Network (GCN);

[0020] Specifically, the adjacency matrix is ​​first symmetrically normalized:

[0021]

[0022] in, Let I be the degree matrix, and let I be the identity matrix;

[0023] Subsequently, the GCN information propagation layer is defined as:

[0024]

[0025] Among them, H (l) For the node representation of the l-th layer, W (l) Let be a trainable weight matrix, and σ(·) be a non-linear activation function;

[0026] After multiple layers of propagation and feature aggregation, the final node embedding representation H is obtained:

[0027]

[0028] Step 1.3: After completing the encoding of the graph convolutional network, the node embedding representation is obtained. Perform embedding representation on each node After norm normalization, it is projected onto the unit hypersphere; its definition is as follows:

[0029]

[0030] Among them, H i Let H be the embedding vector of the i-th node. i ||2 is a vector H i The 2-norm, Z i This is the node representation of the i-th node after normalization.

[0031] Furthermore, Step 2 includes:

[0032] Step 2.1: First, introduce a node dispersion mechanism within the hyperspherical space;

[0033] Specifically, in each training iteration, the set of normalized node representations {Z1, Z2, ..., Z...} is... N Rearrange the nodes in a random order to obtain a shuffled representation {Z}. shuf,1 Z shuf,2 ,…,Z shuf,N}; where Z shuf,i This represents a shuffled node that is randomly paired with it;

[0034] For each node, Z represents... i The corresponding randomly shuffled node representation Z shu,i Pairing is performed, and the degree of similarity is measured by calculating the cosine similarity between the two pairs, defining the scattering loss. for:

[0035]

[0036] Where, ||·||2 represents the second norm of the vector;

[0037] Step 2.2: Based on the node dispersion constraint, a hierarchical contraction mechanism is proposed; this hierarchical contraction mechanism includes two levels:

[0038] One approach is local contraction, which involves using neighborhood aggregation to gradually bring each node representation closer to the center of its neighboring nodes.

[0039] The second is global contraction, which involves aggregating all local centers and constraining them to approach the global center;

[0040] In this hierarchical shrinkage process, two types of loss functions are defined:

[0041] Local contraction loss Used to constrain the consistency of node representation with its local center;

[0042] Global contraction loss Used to constrain the consistency between local centers and global centers;

[0043] The combination of these two approaches allows node representations to maintain aggregation properties at both the local and global levels.

[0044] Step 2.3: After completing the node dispersion constraint and hierarchical contraction constraint, the scattering loss will be... Local contraction loss Global contraction loss We perform weighted combinations to form the overall optimization objective function. Specifically:

[0045]

[0046] Where α, γ, and β are the weighting coefficients of scattering loss, local contraction loss, and global contraction loss, respectively, and are non-negative real numbers, used to balance the contributions of different loss terms to the overall objective function.

[0047] Furthermore, Step 2.2 includes:

[0048] Step 2.2.1: In the hyperspherical space, for the i-th node, first determine the set of neighboring nodes based on its adjacency relationship. Then, the mean of all node representations in the set is calculated to obtain the local center c of the node. i :

[0049]

[0050] Among them, Z j The node representation of each node in the hypersphere space;

[0051] Subsequently, the node representation Z is constrained by maximizing cosine similarity. i Its corresponding local center c i To maintain proximity, local contraction loss Defined as:

[0052]

[0053] Step 2.2.2: Based on the local contraction, apply the following to all local centers c within the entire map area. i By performing mean aggregation, we obtain the global center C:

[0054]

[0055] Subsequently, by constraining all local centers to gradually approach the global center using cosine similarity, the global loss is reduced. Defined as:

[0056]

[0057] Furthermore, Step 3 includes:

[0058] After completing the hypersphere hierarchical contrastive learning, the optimized node representation matrix is ​​obtained. Applying node representation to node classification tasks;

[0059] Specifically, given the optimized node representation Z of the i1th node. i1 When input into a logistic regression classifier, the prediction result is:

[0060]

[0061] in, This is the classification weight matrix. C is the bias term, where C is the total number of categories. Let be the predicted class probability distribution, and Softmax(·) be the softmax function;

[0062] Loss function of classifier Using with Regularized cross-entropy loss function:

[0063]

[0064] in, y is the set of indices of the nodes in the training set. i1c Let i1 be the true label of the i1th node in class c. λ represents the probability that the classifier predicts the i1th node belongs to the cth class, and λ is the regularization coefficient.

[0065] By minimizing this loss function The classifier is effectively trained and the prediction results are output on the test set to complete the classification task of the downstream nodes.

[0066] The present invention also provides a graph node representation system based on hyperspherical hierarchical contrastive learning, the system comprising: a module for executing the graph node representation method based on hyperspherical hierarchical contrastive learning.

[0067] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the program to implement the graph node representation method based on hyperspherical hierarchical contrastive learning.

[0068] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the graph node representation method based on hyperspherical hierarchical contrastive learning.

[0069] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the graph node representation method based on hypersphere hierarchical contrastive learning.

[0070] The beneficial effects of this invention are:

[0071] 1. This invention provides a graph node representation method based on hyperspherical hierarchical contrastive learning. By combining node dispersion and hierarchical contraction in the hyperspherical space, it effectively avoids the representation collapse problem and maintains representation consistency at both the local and global levels, thereby obtaining a node representation that combines dispersion and clustering. This method does not rely on a large number of negative samples, reducing computational overhead and exhibiting good scalability and robustness.

[0072] 2. The method of this invention demonstrates superior performance compared to existing methods in node classification tasks on multiple public graph datasets, with a significant overall improvement in classification accuracy. Furthermore, the method maintained a low standard deviation across multiple experimental runs, exhibiting consistent and stable results, thus fully validating its effectiveness and superiority across different graph structures and task scenarios. Attached Figure Description

[0073] Figure 1 This is a block diagram of the hyperspherical hierarchical contrastive learning model provided in an embodiment of the present invention;

[0074] Figure 2 This is an overall framework diagram of the graph node representation method based on hyperspherical hierarchical contrastive learning provided in the embodiments of the present invention. Detailed Implementation

[0075] Example 1: As Figures 1-2As shown, a graph node representation method based on hyperspherical hierarchical contrastive learning is described, the method comprising:

[0076] Step 1, Node Encoding and Projection: The input graph data is processed, and the node features are encoded using a graph neural network to obtain node embedding representations. The node embedding representations are then normalized and projected onto a unit hypersphere space to obtain normalized node representations, ensuring that all node representations reside in a unified representation space.

[0077] Further, Step 1 includes:

[0078] Step 1.1: Represent the graph data as G = (X, A), where, The node feature matrix, Let N be the adjacency matrix, where N is the number of nodes and d is the dimension.

[0079] A Dropout perturbation is introduced at input, randomly discarding edge or node feature dimensions to enhance model robustness and obtain the perturbed graph representation. in Let represent the node feature matrix and adjacency matrix of the graph representation after perturbation, respectively;

[0080] Step 1.2: Encode node features using Graph Convolutional Networks (GCNs);

[0081] Specifically, the adjacency matrix is ​​first symmetrically normalized:

[0082]

[0083] in, Let I be the degree matrix, and let I be the identity matrix;

[0084] Subsequently, the GCN information propagation layer is defined as:

[0085]

[0086] Among them, H (l) For the node representation of the l-th layer, W (l) Let σ be a trainable weight matrix, and σ(·) be a non-linear activation function (such as ReLU).

[0087] After multiple layers of propagation and feature aggregation, the final node embedding representation H is obtained:

[0088]

[0089] Step 1.3: After completing the encoding of the graph convolutional network, the node embedding representation is obtained. To unify the representation space and avoid the impact of inconsistent embedding scales among different nodes, it is necessary to perform a process for each node's embedding representation. After norm normalization, it is projected onto the unit hypersphere; its definition is as follows:

[0090]

[0091] Among them, H i Let H be the embedding vector of the i-th node. i ||2 is a vector H i The 2-norm, Z i This is the node representation of the i-th node after normalization.

[0092] Step 2: Learning through comparison of hyperspherical layering:

[0093] A node dispersion mechanism is introduced in the hypersphere space. By comparing the node representation with a randomly shuffled node representation, the nodes are encouraged to maintain a uniform distribution on the hypersphere and avoid representation collapse.

[0094] Subsequently, a hierarchical contraction mechanism is implemented, which constrains the node representation to gradually move closer to its local center at the local level, and further constrains the local center to move closer to the global center at the global level, so as to enhance the consistency and stability of the node representation.

[0095] Finally, the node dispersion loss and the hierarchical contraction loss are weighted and combined to construct the overall optimization objective function, and the model parameters are updated by gradient descent to obtain the optimized node representation that combines dispersion and clustering.

[0096] Furthermore, Step 2 includes:

[0097] Step 2.1 To avoid excessive clustering of all node representations on the hypersphere, which would lead to representation collapse, a node dispersion mechanism is first introduced within the hypersphere space.

[0098] Specifically, in each training iteration, to ensure the randomness of pairing relationships, the set of normalized node representations {Z1, Z2, ..., Z...} is... N Rearrange the nodes in a random order to obtain a shuffled representation {Z}. shuf,1 Z shuf,2 ,…,Z shuf,N}; where Z shuf,i This represents a shuffled node that is randomly paired with it;

[0099] For each node, Z represents... i The corresponding randomly shuffled node representation Z shuf,iPairing is performed, and the degree of similarity is measured by calculating the cosine similarity between the two pairs, defining the scattering loss. for:

[0100]

[0101] Where, ||·||² represents the L2 norm of the vector, which is obtained by minimizing… This encourages nodes to remain dispersed, thereby enhancing the uniformity of the global distribution;

[0102] Step 2.2: Based on the node dispersion constraint, in order to ensure the consistency and stability of node representation at different levels, this invention proposes a hierarchical contraction mechanism; this hierarchical contraction mechanism includes two levels:

[0103] One approach is local contraction, which involves using neighborhood aggregation to gradually bring each node representation closer to the center of its neighboring nodes, thereby enhancing the consistency of local structural information.

[0104] The second is global contraction, which involves aggregating all local centers and constraining them to approach the global center to ensure the consistency of the overall representation between different regions.

[0105] In this hierarchical shrinkage process, two types of loss functions are defined:

[0106] Local contraction loss Used to constrain the consistency of node representation with its local center;

[0107] Global contraction loss Used to constrain the consistency between local centers and global centers;

[0108] The combination of the two allows node representations to maintain aggregation characteristics at both the local and global levels, thereby enhancing the expressive power of graph structure information;

[0109] Step 2.3: After completing the node dispersion constraint and hierarchical contraction constraint, in order to unify the optimization objective, the scattering loss is... Local contraction loss Global contraction loss We perform weighted combinations to form the overall optimization objective function. Specifically:

[0110]

[0111] Here, α, γ, and β are the weighting coefficients of scattering loss, local contraction loss, and global contraction loss, respectively, and are non-negative real numbers. They are used to balance the contribution of different loss terms to the overall objective function. By minimizing the above objective function, the consistency of node representation at the local and global levels can be guaranteed at the same time, while maintaining the overall dispersion and avoiding representation collapse, thereby improving the performance of downstream tasks.

[0112] Furthermore, Step 2.2 includes:

[0113] Step 2.2.1: In the hyperspherical space, for the i-th node, first determine the set of neighboring nodes based on its adjacency relationship. Then, the mean of all node representations in the set is calculated to obtain the local center c of the node. i :

[0114]

[0115] Among them, Z j The node representation of each node in the hypersphere space;

[0116] Subsequently, the node representation Z is constrained by maximizing cosine similarity. i Its corresponding local center c i To maintain proximity, thereby ensuring the consistency of representation among neighboring nodes and effectively capturing local structural features of the graph, local contraction loss is used. Defined as:

[0117]

[0118] Step 2.2.2: Based on the local contraction, in order to further maintain the overall consistency between different regions, all local centers c within the entire map area are... i By performing mean aggregation, we obtain the global center C:

[0119]

[0120] Subsequently, cosine similarity is used to constrain all local centers to gradually approach the global center, thereby avoiding the situation where the global distribution is unstable when node representations are only clustered locally, and reducing the global shrinkage loss. Defined as:

[0121]

[0122] Step 3, Result Prediction: After obtaining the optimized node representation, it is input into a classifier for node classification. The classifier uses a logistic regression model combined with... The regularized cross-entropy loss function is optimized to output the final classification result.

[0123] Furthermore, Step 3 includes:

[0124] After completing the hypersphere hierarchical contrastive learning, the optimized node representation matrix is ​​obtained. To verify the validity of the node representation, the node representation was applied to a node classification task;

[0125] Specifically, given the optimized node representation Z of the i1th node. i1 When input into a logistic regression classifier, the prediction result is:

[0126]

[0127] in, This is the classification weight matrix. C is the bias term, where C is the total number of categories. For the predicted class probability distribution, Softmax(·) is the softmax function;

[0128] Loss function of classifier Using with Regularized cross-entropy loss function:

[0129]

[0130] in, y is the set of indices of the nodes in the training set. i1c Let i1 be the true label of the i1th node in class c. λ represents the probability that the classifier predicts the i1th node belongs to the cth class, and λ is the regularization coefficient.

[0131] By minimizing this loss function The classifier is effectively trained and the prediction results are output on the test set to complete the classification task of the downstream nodes.

[0132] The present invention also provides a graph node representation system based on hypersphere hierarchical contrastive learning, the system comprising: a module for executing the graph node representation method based on hypersphere hierarchical contrastive learning.

[0133] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the program to implement the graph node representation method based on hyperspherical hierarchical contrastive learning.

[0134] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the graph node representation method based on hyperspherical hierarchical contrastive learning.

[0135] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the graph node representation method based on hypersphere hierarchical contrastive learning.

[0136] To verify the effectiveness of the method described in this invention, experiments were conducted on six publicly available graph datasets, including Cora, PubMed, WikiCS, Computers, CS, and Physics. These datasets cover various typical scenarios such as citation networks, knowledge entry networks, e-commerce networks, and academic collaboration networks, and are characterized by varying sizes and structural complexities, thus comprehensively testing the applicability and robustness of the method. In the experiments, all datasets were divided into training, validation, and test sets in a 1:1:8 ratio.

[0137] The comparative methods cover different types of representative graph representation learning methods, specifically including:

[0138] (1) Supervised methods: MLP, GCN;

[0139] (2) Graph embedding methods: DEEPWALK, NODE2VEC;

[0140] (3) Graph comparison learning methods: VGAE, DGI, GMI, MVGRL, GRACE, GCA, BGRL, SUGRL, CCa-SSG.

[0141] The methods described above are representative algorithms in the current field of graph representation learning, demonstrating the performance advantages of the method presented in this invention from different perspectives. All experiments were repeated multiple times, and the mean and standard deviation were reported to ensure the fairness and stability of the results. The experiments used a node classification task as the evaluation metric, with classification accuracy as the performance indicator. Classification accuracy (ACC) is defined as the proportion of correctly predicted samples to the total number of samples, calculated as follows:

[0142]

[0143] Where N represents the total number of nodes in the test set, y represents the class label predicted by the model. i is the true label of the node, and 1(·) is an indicator function that takes the value 1 when the prediction matches the true label, and 0 otherwise.

[0144] Experiment 1: Main Comparison of Experimental Results

[0145] To comprehensively evaluate the effectiveness of the method of this invention, several representative methods were selected for comparison. In the table, bold numbers represent the best results on each dataset; "OOM" indicates that the experiment using this method on the corresponding dataset could not be run due to insufficient video memory.

[0146] Table 1 shows the main comparative experimental results.

[0147]

[0148]

[0149] The experimental results are shown in Table 1. The proposed method outperforms existing methods on all six datasets. On the Cora, PubMed, WikiCS, and Computers datasets, the proposed method achieves significant improvements in classification accuracy, demonstrating its good adaptability to graph data of varying sizes and structural features. Particularly on the large-scale Physics dataset, the proposed method achieves an accuracy of 95.89%, further improving the robustness and generalization ability of the model compared to existing contrastive learning methods.

[0150] Furthermore, from a stability perspective, the standard deviation of the proposed method remains low on most datasets, indicating that it achieves stable and consistent results across different experimental runs. This demonstrates that by introducing node dispersion and hierarchical contraction constraints into the hyperspherical space, the representation collapse problem is effectively avoided, and the consistency between local and global representations is enhanced, thereby achieving an overall performance improvement in downstream tasks.

[0151] Experiment 2: Ablation Experiment

[0152] To verify the effectiveness of each module in this method, ablation experiments were conducted on the Cora dataset. The experimental results are shown in Table 2 ("×" represents no fusion, "√" represents fusion):

[0153] Table 2 Results of multi-granularity feature extraction and defusion experiments

[0154]

[0155] The experimental results are shown in Table 2. When node dispersion, local contraction, and global contraction were not introduced, the model's classification accuracy was only 80.48%, indicating that the lack of dispersion and contraction constraints led to insufficient discriminative power in node representations. After introducing the node dispersion mechanism, the accuracy improved to 81.54%, demonstrating that dispersion constraints can alleviate collapse and maintain the uniform distribution of nodes on the hypersphere, thereby enhancing discriminative power. Further adding a local contraction mechanism significantly improved the accuracy to 85.69%, indicating that guiding node representations towards the neighborhood center while ensuring dispersion can strengthen local structural consistency and help improve classification performance. Finally, introducing a global contraction mechanism based on the above two methods achieved an accuracy of 85.91%, obtaining the best result, indicating that global constraints played a positive role in further ensuring the stability of the overall representation. In summary, the ablation experiment results fully verify the necessity and complementarity of the node dispersion and hierarchical contraction mechanisms in the method of this invention. The combination of the two can significantly improve the discriminative power of node representations and the performance of downstream tasks.

[0156] The specific embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.

Claims

1. A graph node representation method based on hyperspherical hierarchical contrastive learning, characterized in that: The method includes: Step 1, Node Encoding and Projection: The input graph data is processed, and the node features are encoded using a graph neural network to obtain the node embedding representation. The node embedding representation is then normalized and projected onto a unit hypersphere space to obtain the normalized node representation. Step 2: Learning through comparison of hyperspherical layering: A node dispersion mechanism is introduced in the hypersphere space. By comparing the node representation with a randomly shuffled node representation, the nodes are encouraged to maintain a uniform distribution on the hypersphere and avoid representation collapse. Then, a hierarchical contraction mechanism is executed, which constrains the node representation to gradually move closer to its local center at the local level, and further constrains the local center to move closer to the global center at the global level; Finally, the node dispersion loss and the hierarchical contraction loss are weighted and combined to construct the overall optimization objective function, and the model parameters are updated by gradient descent to obtain the optimized node representation that combines dispersion and clustering. Step 3, Result Prediction: After obtaining the optimized node representation, it is input into a classifier for node classification. The classifier uses a logistic regression model combined with... The regularized cross-entropy loss function is optimized to output the final classification result; Step 1 includes: Step 1.1: Represent the graph data as ,in, The node feature matrix, It is an adjacency matrix. For the number of nodes, To represent dimensions; A Dropout perturbation is introduced at input, randomly discarding edge or node feature dimensions to obtain a perturbed graph representation. ,in , , , Let represent the node feature matrix and adjacency matrix of the graph representation after perturbation, respectively; Step 1.2: Encode node features using a Graph Convolutional Network (GCN); Specifically, the adjacency matrix is ​​first symmetrically normalized: ; in, For degree matrix, It is the identity matrix; Subsequently, the GCN information propagation layer is defined as: ; in, For the first Layer node representation, For trainable weight matrix, It is a non-linear activation function; After multiple layers of propagation and feature aggregation, the final node embedding representation H is obtained: ; Step 1.3: After completing the encoding of the graph convolutional network, the node embedding representation is obtained. ; Perform embedding representation on each node After norm normalization, it is projected onto the unit hypersphere; its definition is as follows: ; in, For the first The embedding vector of each node. For vectors The 2-norm, The unitized first The node representation of a node.

2. The graph node representation method based on hyperspherical hierarchical contrastive learning according to claim 1, characterized in that: Step 2 includes: Step 2.1: First, introduce a node dispersion mechanism within the hyperspherical space; Specifically, in each training iteration, the set of normalized node representations is... Rearrange the nodes in a random order to obtain a shuffled set of node representations. ;in, This represents a shuffled node that is randomly paired with it; For each node representation The corresponding randomly shuffled node representation Pairing is performed, and the degree of similarity is measured by calculating the cosine similarity between the two pairs, defining the scattering loss. for: ; in, The second norm of a vector; Step 2.2: Based on the node dispersion constraint, a hierarchical contraction mechanism is proposed; this hierarchical contraction mechanism includes two levels: One approach is local contraction, which involves using neighborhood aggregation to gradually bring each node representation closer to the center of its neighboring nodes. The second is global contraction, which involves aggregating all local centers and constraining them to approach the global center; In this hierarchical shrinkage process, two types of loss functions are defined: Local contraction loss This is used to constrain the consistency of node representations with their local centers; Global contraction loss This is used to constrain the consistency between the local center and the global center; The combination of these two approaches allows node representations to maintain aggregation properties at both the local and global levels. Step 2.3: After completing the node dispersion constraint and hierarchical contraction constraint, the scattering loss will be... Local contraction loss Global contraction loss We perform weighted combinations to form the overall optimization objective function. Specifically: ; in, , , These are the weighting coefficients for scattering loss, local contraction loss, and global contraction loss, respectively, and are non-negative real numbers used to balance the contributions of different loss terms to the overall objective function.

3. The graph node representation method based on hyperspherical hierarchical contrastive learning according to claim 2, characterized in that: Step 2.2 includes: Step 2.2.1, In the hyperspherical space, for the first... For each node, first determine its set of neighboring nodes based on its adjacency relationship. The mean of the representations of all nodes in the set is calculated to obtain the local center of the node. : ; in, The node representation of each node in the hypersphere space; Subsequently, the node representation is constrained by maximizing cosine similarity. Its corresponding local center To maintain proximity, local contraction loss Defined as: ; Step 2.2.2: Based on the local contraction, apply the following to all local centers within the entire map area. Perform mean aggregation to obtain the global center. : ; Subsequently, by constraining all local centers to gradually approach the global center using cosine similarity, the global loss is reduced. Defined as: 。 4. The graph node representation method based on hyperspherical hierarchical contrastive learning according to claim 1, characterized in that: Step 3 includes: After completing the hypersphere hierarchical contrastive learning, the optimized node representation matrix is ​​obtained. Applying node representation to node classification tasks; Specifically, given the optimized first Node representation of a node When input into a logistic regression classifier, the prediction result is: ; in, This is the classification weight matrix. For bias terms, The total number of categories, For the predicted class probability distribution, It is the softmax function; Loss function of classifier Using with Regularized cross-entropy loss function: ; in, For the set of indices of nodes in the training set, For the first 1 node at the Real labels on the class, This indicates that the classifier predicts the first... 1 node belongs to the The probability of a class Regularization coefficient; By minimizing this loss function The classifier is effectively trained and the prediction results are output on the test set, thereby completing the classification task of downstream nodes.

5. A graph node representation system based on hyperspherical hierarchical contrastive learning, characterized in that, The system includes a module for performing the graph node representation method based on hypersphere hierarchical contrastive learning as described in any one of claims 1 to 4.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, When the processor executes the program, it implements the graph node representation method based on hyperspherical hierarchical contrastive learning as described in any one of claims 1 to 4.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the graph node representation method based on hyperspherical hierarchical contrastive learning as described in any one of claims 1 to 4.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the graph node representation method based on hyperspherical hierarchical contrastive learning as described in any one of claims 1 to 4.