Graph data representation method based on multiple virtual nodes and random hash propagation
By evaluating the importance of nodes and clustering features similarity in graph data, introducing virtual nodes and utilizing a random hash propagation mechanism, the problems of insufficient computational efficiency and expressive power in existing graph data representation methods are solved, and efficient and stable node representation generation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA UNIV OF GEOSCIENCES (WUHAN)
- Filing Date
- 2026-01-13
- Publication Date
- 2026-05-26
AI Technical Summary
Existing graph data representation methods are insufficient in terms of computational efficiency, ability to express structural information, and adaptability to large-scale applications. In particular, in large-scale or dynamic graph data scenarios, existing methods have high computational complexity, consume a lot of resources, and are easily disturbed by node representations, making it difficult to meet the requirements of real-time processing.
By evaluating the importance of nodes and clustering them based on feature similarity in the original graph, the nodes are divided into multiple clusters, and virtual nodes are introduced into each cluster to construct a structure-enhanced graph. A family of random hash functions is used for multiple rounds of propagation and updates to generate node representations.
It enables efficient encoding of node attributes and multi-level structural information without the need for complex parameter training, reduces computational complexity, and improves the discriminativeness and stability of node representations, making it suitable for large-scale and dynamic graph data scenarios.
Smart Images

Figure CN122090102A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of graph data representation, and more particularly to a graph data representation method based on multiple virtual nodes and random hash propagation. Background Technology
[0002] In graph data analysis and complex network modeling, node representation serves as a crucial intermediate form connecting the original graph data with downstream analysis tasks. Its quality directly impacts the effectiveness of applications such as node classification, relationship prediction, and similarity calculation. With the continuous development of application scenarios such as social networks, recommender systems, communication networks, and bioinformatics networks, the scale of graph data continues to grow, and its structure becomes increasingly complex, placing higher demands on the efficiency and expressive power of graph data representation methods.
[0003] Existing graph data representation methods typically involve feature propagation along the graph structure, fusing node attribute information with its neighborhood structure information to obtain a representation that reflects the structural position and relational features of nodes. While these methods can characterize local relationships between nodes to some extent, in practical applications they often rely on parameterized propagation mechanisms or model training processes, requiring the introduction of numerous adjustable parameters and multiple rounds of iterative optimization to achieve a satisfactory representation.
[0004] When graph data is large in scale or its structure changes frequently, the aforementioned parameter-based training methods face significant challenges in terms of computational complexity, storage resource consumption, and training time. On the one hand, the introduction of a large number of parameters causes the cost of model training and inference to increase rapidly with the graph size, making it difficult to meet the real-time processing requirements of large-scale graph data. On the other hand, in dynamically updated graph data scenarios, the model often needs to be retrained frequently, further increasing the computational burden of the system.
[0005] To reduce computational and training costs, some technical solutions attempt to process node features through fixed rules or random mapping, thereby reducing reliance on parameter training. While these methods improve computational efficiency to some extent, the relatively simple propagation rules often fail to fully integrate node attribute information with multi-level neighborhood structure information, resulting in limited ability of node representations to depict complex structural relationships and insufficient distinguishability between nodes.
[0006] Furthermore, in existing graph data representation methods, node information typically propagates outwards layer by layer along the original graph structure. During multiple rounds of propagation, node features are easily interfered with by distant, unrelated nodes, causing the representations of different nodes to gradually become similar. This weakens the differences between nodes and affects the accuracy and stability of subsequent analysis tasks. This problem is particularly pronounced in graph data with uneven node distribution and complex hierarchical structures.
[0007] Therefore, existing graph data representation methods still have shortcomings in terms of computational efficiency, structural information representation capabilities, and adaptability to large-scale applications. How to achieve the collaborative representation of node attribute information and multi-level structural information by optimizing and enhancing the graph structure without relying on complex parameter training, and by combining it with an efficient and stable information propagation mechanism, has become a pressing technical problem to be solved in this field. Summary of the Invention
[0008] The purpose of this invention is to address the shortcomings of existing graph data representation methods in terms of computational efficiency, structural information representation capabilities, and adaptability to large-scale applications, and to provide a graph data representation method based on multiple virtual nodes and random hash propagation.
[0009] The above-mentioned objective of this application is achieved through the following technical solution: S1: Perform node importance assessment and feature similarity clustering on the original graph to divide the nodes into multiple node clusters; S2: Introduce at least one virtual node for each node cluster, construct the connection relationship between the virtual node and all real nodes in the cluster, and form a structural enhancement graph; S3: On the structure enhancement graph, maintain a sketch vector of fixed dimension K for each real node and virtual node; S4: Based on a family of random hash functions, the sketch vector is propagated and updated in multiple rounds to generate a node representation that integrates node attributes and multi-level structural information; the node representation is then directly used for graph data processing tasks.
[0010] Optionally, step S1 includes: The node importance assessment uses the K-Shell algorithm, and the node feature clustering uses the K-Means algorithm. Node importance is incorporated as a weight during the clustering process, specifically including: Given the original graph , Represents a node; Represents an edge; Indicates the number of clusters. Represents the real node The features and corresponding tag sets Cluster labels corresponding to the sample set ; For the picture The K-Shell algorithm is executed on each real node to determine the importance of each real node. For each real node :
[0011] For each cluster, calculate the weighted feature mean as the initial center:
[0012] in, Indicates the first The set of real nodes for each set of candidate nodes; Indicates the first The weighted feature vector of each cluster center.
[0013] Optionally, step S1 includes: For the picture For each real node, standard K-Means clustering is performed to minimize the distance distribution between the node and the center:
[0014] And iteratively update the cluster centers:
[0015] in Represents the real node The cluster label to which it belongs; This indicates the cluster index corresponding to the minimum distance; Indicates the first Cluster centers.
[0016] Optionally, step S2 includes: After clustering is completed, virtual nodes are initialized as follows: For each subgraph The virtual nodes are initially represented by the average feature value of their real nodes:
[0017] in Indicates the first Virtual nodes generated from a subgraph It is the first The total number of real nodes in each subgraph; Let the original diagram be... After clustering, it is divided into m subgraphs, which can be formalized as follows:
[0018] For each subgraph The corresponding virtual nodes are generated according to the mean initialization strategy. Each virtual node It is considered the center node of the subgraph and is directly related to the subgraph it belongs to. Connect all real nodes in the subgraph; if the subgraph have If there are 1 real node, then the virtual node will be with A number of real nodes are formed New border ; After adding the virtual nodes, the original graph Updated to a structural enhancement diagram ,as follows:
[0019] in For all newly added virtual nodes; This adds an edge between the virtual node and the real node.
[0020] Optionally, step S3 includes: The sketch vector is generated by a family of random hash functions and is used to characterize the structural and attribute features of a node in the current propagation stage.
[0021] Optionally, step S3 may also include: The family of random hash functions includes: At least one set of hash functions for mapping neighbor information; At least one set of hash functions for preserving the node's own information; In each round of propagation, real nodes merge the sketch vectors of neighboring nodes and virtual nodes through a stepwise minimum selection or hash competition rule; The graph data processing tasks include: node similarity calculation, cluster analysis, and relationship analysis.
[0022] An electronic device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform a graph data representation method based on multiple virtual nodes and random hash propagation.
[0023] A computer-readable storage medium storing instructions that, when executed, perform a graph data representation method based on multiple virtual nodes and random hash propagation.
[0024] The beneficial effects of the technical solution provided in this application are: This invention performs structural analysis and clustering on the original graph data, constructing node groups based on structural characteristics and attribute similarities. Virtual nodes are then introduced into these groups to reconstruct the graph structure, forming a structure-enhanced graph. This shortens the information propagation path between nodes and strengthens the information convergence capability within each group. Furthermore, this invention introduces a random hash propagation mechanism into the structure-enhanced graph. A family of random hash functions is used to propagate and generate representations of both real and virtual nodes in multiple stages. This achieves efficient encoding of node attribute information and its multi-level neighborhood structure information without the need for trainable parameters or complex optimization processes. The resulting node representation is a fixed-dimensional vector that can be directly used for graph data processing tasks such as node similarity calculation, cluster analysis, and relationship analysis. Compared to existing technologies, this invention significantly reduces computational complexity and system resource consumption while maintaining node representation quality, exhibiting good scalability and engineering applicability. Attached Figure Description
[0025] The present application will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a flowchart of an embodiment of this application; Figure 2 This is a schematic diagram of the electronic device structure in the embodiments of this application. Detailed Implementation
[0026] To provide a clearer understanding of the technical features, objectives, and effects of this application, the specific embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0027] The embodiments of this application provide a graph data representation method based on multiple virtual nodes and random hash propagation.
[0028] Please refer to Figure 1 , Figure 1 This is a flowchart of a graph data representation method based on multiple virtual nodes and random hash propagation, as described in an embodiment of this application, including: S1: Perform node importance assessment and feature similarity clustering on the original graph to divide the nodes into multiple node clusters; S2: Introduce at least one virtual node for each node cluster, construct the connection relationship between the virtual node and all real nodes in the cluster, and form a structural enhancement graph; S3: On the structure enhancement graph, maintain a sketch vector of fixed dimension K for each real node and virtual node; S4: Based on a family of random hash functions, the sketch vector is propagated and updated in multiple rounds to generate a node representation that integrates node attributes and multi-level structural information; the node representation is then directly used for graph data processing tasks.
[0029] The key inventive aspects of this application lie in: evaluating node importance and clustering features similarity in the original graph, dividing the nodes into multiple node clusters; introducing virtual nodes into the node clusters based on clustering to construct an "intra-cluster centralization" structure, enhancing information aggregation capabilities; employing a family of random hash functions for multi-round information propagation to achieve multi-order structure encoding, eliminating the need for training parameters and significantly reducing computational costs. Beneficial effects: While maintaining the discriminative power of node representations, it achieves efficient and scalable graph representation learning, particularly suitable for large-scale dynamic graph scenarios.
[0030] This application provides an embodiment as follows: The present invention introduces a cluster-based multi-virtual node structure and combines it with a random hash propagation mechanism to construct an efficient graph data representation generation framework, thereby achieving joint modeling of node attribute information and multi-level structural information in complex graph structures. The framework comprises three main steps: node group structure partitioning, virtual node construction, and representation generation based on random hash propagation of virtual nodes.
[0031] Step S1 includes: As one implementation example, the construction of virtual nodes relies on the reasonable partitioning of nodes in the graph. To improve the robustness and structure awareness of clustering, this invention proposes a weighted clustering method that combines node importance, integrating... and Clustering algorithms. Traditional It is susceptible to outliers, leading to a shift in cluster centers. It can effectively measure the centrality of nodes in the structure, thus providing structural priors for the initial cluster centers.
[0032] The node importance assessment uses the K-Shell algorithm, and the node feature clustering uses the K-Means algorithm. Node importance is incorporated as a weight during the clustering process, specifically including: Given the original graph , Represents a node; Represents an edge; Indicates the number of clusters. Represents the real node The features and corresponding tag sets Cluster labels corresponding to the sample set ; For the picture The K-Shell algorithm is executed on each real node to determine the importance of each real node. For each real node :
[0033] For each cluster, calculate the weighted feature mean as the initial center:
[0034] in, Indicates the first The set of real nodes for each set of candidate nodes; Indicates the first The weighted feature vector of each cluster center.
[0035] Step S1 includes: For the picture For each real node, standard K-Means clustering is performed to minimize the distance distribution between the node and the center:
[0036] And iteratively update the cluster centers:
[0037] in Represents the real node The cluster label to which it belongs; This indicates the cluster index corresponding to the minimum distance; Indicates the first Cluster centers.
[0038] As one example, this method uses structure-guided initialization to effectively reduce clustering noise caused by initial offset and improve the consistency of partitioning.
[0039] Step S2 includes: After clustering is completed, virtual nodes are initialized as follows: For each subgraph The virtual nodes are initially represented by the average feature value of their real nodes:
[0040] in Indicates the first Virtual nodes generated from a subgraph It is the first The total number of real nodes in each subgraph; Let the original diagram be... After clustering, it is divided into m subgraphs, which can be formalized as follows:
[0041] For each subgraph The corresponding virtual nodes are generated according to the mean initialization strategy. Each virtual node It is considered the center node of the subgraph and is directly related to the subgraph it belongs to. Connect all real nodes in the subgraph; if the subgraph have If there are 1 real node, then the virtual node will be with A number of real nodes are formed New border ; After adding the virtual nodes, the original graph Updated to a structural enhancement diagram ,as follows:
[0042] in For all newly added virtual nodes; This adds an edge between the virtual node and the real node.
[0043] As one embodiment, after cluster centers are generated and an edge that allows them to propagate between them and the points in the cluster is added, it helps to reduce the risk of missing representation information caused by cluster center offset. Furthermore, during the representation generation process, structural enhancement effectively alleviates the problem of homogeneous node representations. The above clustering process is only one optional implementation method, and this invention does not limit the specific form of the clustering algorithm.
[0044] Step S3 includes: The sketch vector is generated by a family of random hash functions and is used to characterize the structural and attribute features of a node in the current propagation stage.
[0045] Step S3 includes: The family of random hash functions includes: At least one set of hash functions for mapping neighbor information; At least one set of hash functions for preserving the node's own information; In each round of propagation, real nodes merge the sketch vectors of neighboring nodes and virtual nodes through a stepwise minimum selection or hash competition rule; The graph data processing tasks include: node similarity calculation, cluster analysis, and relationship analysis.
[0046] As one embodiment, clustering is used to divide the nodes in the graph into multiple semantically similar node clusters, and at least one virtual node is introduced into each node cluster. This virtual node establishes connections with all real nodes within its corresponding cluster, thereby forming a structure-enhanced graph with virtual nodes as the cluster-level information aggregation centers, based on the original graph structure. On this structure-enhanced graph, a fixed-dimensional (K) sketch vector representation is maintained for each real node and virtual node. This sketch vector is generated by a family of random hash functions and is used to characterize the structural and attribute features of the node at the current propagation stage. The family of random hash functions includes at least one set of hash functions for mapping neighbor information and at least one set of hash functions for preserving the node's own information, so as to balance neighborhood structural information and node characteristics during the representation generation process.
[0047] As one embodiment, in each stage of the representation generation process based on random hashing rules, real nodes aggregate the sketch vectors of their original neighboring nodes and their respective virtual nodes according to predefined random hashing rules. Specifically, real nodes map the sketch vectors from neighboring nodes and virtual nodes to a unified hash space, and generate new sketch vector representations through a stepwise minimum selection or equivalent hash competition rules, thereby achieving the fusion of multi-source structural information without introducing learnable parameters.
[0048] In one embodiment, virtual nodes summarize the sketch vectors of real nodes within their respective node clusters to form a cluster-level sketch representation that reflects the overall characteristics of the node cluster. This cluster-level sketch representation is not used as an independent training parameter for representation generation; instead, it serves as a structural summary of the node cluster, providing reference information for real nodes to construct their own sketch vectors during subsequent representation generation.
[0049] As one example, through the above-described aggregation and generation process based on random hashing rules, real nodes and virtual nodes can gradually merge node attribute information and their multi-level neighborhood structure information after multi-stage execution, generating node representations with fixed dimensions, high computational efficiency, and good distinguishability, thereby effectively improving the ability to express local structural differences and group semantic information in the structure-enhanced graph.
[0050] As one embodiment, in order to adapt to different graph data analysis tasks, this invention provides a unified node representation output process after completing the node representation generation based on virtual nodes and random hash propagation, and supports multiple application methods.
[0051] As one example, such as Figure 1As shown, the overall process of this invention includes steps such as graph structure data and node feature input, node importance assessment and clustering, construction of multiple virtual nodes, generation of structure-enhanced graphs, and information propagation and representation generation based on random hashing rules. Through the above process, a fixed-dimensional representation at the node level can be directly obtained without introducing trainable parameters or end-to-end optimization processes.
[0052] As one embodiment, for tasks such as node classification and node similarity calculation, the node representation can serve as a description of the structural and attribute features of nodes, and can be directly used for tasks such as distance calculation between nodes, cluster analysis, or retrieval. In application scenarios requiring supervised or semi-supervised analysis, the node representation can be used as input features and provided to an external classifier or prediction module for processing; the specific form of the external module is not limited.
[0053] As one example, for graph classification or graph-level analysis tasks, a graph-level representation can be further constructed based on node representations. For example, by summarizing, statistically analyzing, or pooling the node representations in the graph, a graph-level representation reflecting the overall graph structure characteristics can be generated, which can then be used for tasks such as graph classification or graph structure discrimination.
[0054] It should be noted that the node representation generation process described in this invention is based on random hashing rules and structure enhancement propagation mechanism, without relying on parameter training or loss function optimization. It has the advantages of high computational efficiency, simple implementation and easy expansion, and is suitable for large-scale or dynamically changing graph data scenarios.
[0055] The proposed method is evaluated on two widely used real-world citation network datasets, CiteSeer-M10 and PubMed.
[0056] CiteSeer-M1 is a large-scale multi-class dataset built from the CiteSeer citation network. This dataset contains 38,996 paper nodes and 77,218 citation relationships. Node features are represented by a bag-of-words model, containing a total of 13,914 dimensions. Unlike the standard CiteSeer dataset, CiteSeer-M10 divides papers into 10 research domains, with a highly imbalanced class distribution; only about 10,000 nodes have labels for classification tasks. Due to its large size, more categories, and significant long-tail phenomenon, this dataset places higher demands on the model's structural modeling and robustness.
[0057] The PubMed dataset consists of 19,717 biomedical paper nodes, connected by 44,338 citation relationships. Each node is represented by a 500-dimensional feature vector, and all papers are divided into three categories. Compared to CiteSeer-M10, PubMed has fewer categories with a more balanced distribution, but the graph size is still large, making it an important benchmark for evaluating the overall classification ability of a model.
[0058] The task at hand is node classification. Given the graph structure and node attributes, the model needs to predict the class labels of unlabeled nodes.
[0059] To evaluate model performance, the F1-score was used as the evaluation metric. Specifically, the F1-score comprehensively considers both precision and recall, and can more fully reflect classification performance in imbalanced graphical data. All results are reported as the mean ± standard deviation of multiple randomized trials.
[0060] The proposed method is compared with the following representative baseline models: BANE: a hash-based attribute network embedding method that learns binary representations by jointly modeling node attributes and structural information. This method does not require deep neural network training, but it has certain limitations in modeling complex structures. GraphSAGE: a classic sampling-based graph neural network method that learns node representations by aggregating features of neighboring nodes. GraphSAGE effectively combines node attributes and local structural information and is a commonly used strong baseline model in the field of graph representation learning. The experimental results are shown in Table 1 below.
[0061] Table 1
[0062] This application also discloses an electronic device. (See reference...) Figure 2 , Figure 2 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. The electronic device 500 may include: at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, and at least one communication bus 502.
[0063] The communication bus 502 is used to enable communication between these components.
[0064] The user interface 503 may include a display screen, and optionally, the user interface 503 may also include a standard wired interface or a wireless interface.
[0065] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0066] This application also discloses a computer-readable storage medium storing multiple instructions adapted for loading by a processor to execute the above-described graph data representation method based on multiple virtual nodes and random hash propagation.
[0067] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure.
[0068] This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A graph data representation method based on multi-virtual nodes and random hash propagation, characterized in that, The method includes the following steps: S1: Perform node importance assessment and feature similarity clustering on the original graph to divide the nodes into multiple node clusters; S2: Introduce at least one virtual node for each node cluster, construct the connection relationship between the virtual node and all real nodes in the cluster, and form a structural enhancement graph; S3: On the structure enhancement graph, maintain a sketch vector of fixed dimension K for each real node and virtual node; S4: Based on a family of random hash functions, the sketch vector is propagated and updated in multiple rounds to generate a node representation that integrates node attributes and multi-level structural information; the node representation is then directly used for graph data processing tasks.
2. The method of claim 1, wherein, Step S1 includes: The node importance assessment uses the K-Shell algorithm, and the node feature clustering uses the K-Means algorithm. Node importance is incorporated as a weight during the clustering process, specifically including: Given original graph , represent nodes; represent edges; represent the number of clusters, represent the true nodes features, the corresponding label set , the sample set corresponding to the class cluster label ; For the picture The K-Shell algorithm is executed on each real node to determine the importance of each real node. For each real node : For each cluster, calculate the weighted feature mean as the initial center: in, Indicates the first The set of real nodes for each set of candidate nodes; Indicates the first The weighted feature vector of each cluster center.
3. The graph data representation method based on multiple virtual nodes and random hash propagation as described in claim 2, characterized in that, Step S1 includes: For the picture For each real node, standard K-Means clustering is performed to minimize the distance distribution between the node and the center: And iteratively update the cluster centers: in Represents the real node The cluster label to which it belongs; This indicates the cluster index corresponding to the minimum distance; Indicates the first Cluster centers.
4. The graph data representation method based on multiple virtual nodes and random hash propagation as described in claim 3, characterized in that, Step S2 includes: After clustering is completed, virtual nodes are initialized as follows: For each subgraph The virtual nodes are initially represented by the average feature value of their real nodes: in Indicates the first Virtual nodes generated from each subgraph It is the first The total number of real nodes in each subgraph; Let the original diagram be... After clustering, it is divided into m subgraphs, which can be formalized as follows: For each subgraph The corresponding virtual nodes are generated according to the mean initialization strategy. Each virtual node It is considered the center node of the subgraph and is directly related to the subgraph it belongs to. Connect all real nodes in the subgraph; if the subgraph have If there are 1 real node, then the virtual node will be with A number of real nodes are formed New border ; After adding the virtual nodes, the original graph Updated to a structural enhancement diagram ,as follows: in For all newly added virtual nodes; This adds an edge between the virtual node and the real node.
5. The graph data representation method based on multiple virtual nodes and random hash propagation as described in claim 1, characterized in that, Step S3 includes: The sketch vector is generated by a family of random hash functions and is used to characterize the structural and attribute features of a node in the current propagation stage.
6. The graph data representation method based on multiple virtual nodes and random hash propagation as described in claim 1, characterized in that, Step S3 also includes: The family of random hash functions includes: At least one set of hash functions for mapping neighbor information; At least one set of hash functions for preserving the node's own information; In each round of propagation, real nodes merge the sketch vectors of neighboring nodes and virtual nodes through a stepwise minimum selection or hash competition rule; The graph data processing tasks include: node similarity calculation, cluster analysis, and relationship analysis.
7. An electronic device, characterized in that, The device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to enable the electronic device to perform the graph data representation method based on multiple virtual nodes and random hash propagation as described in any one of claims 1-6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a computer, perform the graph data representation method based on multiple virtual nodes and random hash propagation as described in any one of claims 1-6.