Node Importance Estimation Method Based on Multi-view Graph Hint Learning
Through the multi-view graph prompt learning method, combined with semantic and structural prompt diagrams, multi-view comparison learning is used to solve the problem of pre-training and downstream tasks inconsistency, improving the accuracy and consistency of node importance estimation, and enhancing the ability to identify key nodes.
Patent Information
- Application Number
- CN202510838187.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-06-23
AI Technical Summary
In the existing node importance estimation method, there is inconsistency between pre-training and downstream tasks, resulting in a negative migration effect, making it difficult to effectively identify and distinguish key nodes in the graph.
The multi-view diagram prompt learning method is adopted, and the semantic and structural prompt diagrams are constructed, combined with soft prompts and structural prompts, and multi-view comparison learning is used to unify pre-training and downstream tasks, enhancing the model's ability to identify important nodes in the network.
Effectively integrating the semantic and structural information of nodes improves the accuracy and consistency of the model's node importance estimation, enhances the ability to identify key nodes, and narrows the gap between pre-training and downstream tasks.
Smart Images

Figure CN120354320B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, relates to the field of web page importance technology, and in particular to a node importance estimation method based on multi-view graph prompt learning. Background Art
[0002] Node importance evaluation (NIE) aims to determine the importance (e.g., significance, prominence, or popularity) of nodes in a graph and has been widely used in network demolition, recommendation systems, and internet search. Node importance estimation plays a crucial role in web search, and through continuous optimization and innovation, it can significantly improve the quality of search results and user experience. In web search, node importance estimation treats web pages as nodes and influences the ranking of search results by evaluating their importance. Through continuous optimization and innovation, node importance estimation can significantly improve the quality of search results and user experience.
[0003] Methods for node importance estimation (NIE) can be broadly categorized into centrality-based methods and neural network-based methods. Early research, in particular, primarily employed centrality metrics such as degree centrality and page ranking, which assess node importance based on the number and quality of edges. Recently, there has been a growing trend toward using neural networks, particularly graph neural networks (GNNs), to tackle this task. To supervise model training, some nodes are assumed to be labeled in advance. The learned model projects the network into a low-dimensional vector space, known as node embeddings, which are then used to predict node importance.
[0004] Recent work in this area involves pre-training based on node importance levels and feeding the learned node embeddings into a downstream classic NIE model. Notably, the pre-training stage constitutes a classification task, requiring the model to predict the importance levels of a number of labeled nodes; in contrast, the subsequent stage is a regression task, essentially predicting an importance score for each node. In other words, the former qualitatively classifies nodes, while the latter quantitatively evaluates them. Consequently, there is a significant gap between the objectives of these two stages, and potential negative transfer effects have been a well-known challenge. Furthermore, this gap is further exacerbated by the difference in granularity, as pre-training focuses on broadly classifying node importance at the graph level, while the downstream task emphasizes learning embeddings for individual nodes.
[0005] Node importance estimation involves assigning a global importance score to each node in a graph, which is crucial for subsequent tasks including recommendation and network disassembly. Previous studies have used node labels and structural information to pre-train for classification tasks, and then compute node importance scores as a downstream regression task. However, due to the inconsistency between pre-training and downstream tasks, a gap exists, which often imposes negative transfer. Summary of the Invention
[0006] Inspired by hinting techniques in natural language processing, there has been some pioneering work on graph hinting in network representation learning, attempting to unify pre-training and downstream tasks to achieve superior performance. In particular, most existing graph hinting methods use link prediction as a pre-training task and node classification as a downstream task. These objectives differ significantly from NIEs, and therefore, hint designs suitable for NIEs remain lacking.
[0007] Specifically, there are two types of information that are considered crucial for deriving node importance - semantics and structure. In this regard, this application constructs two types of hints accordingly, which are used to capture these features for comprehensive importance assessment. For semantic features, for example, in a citation graph, the title of the paper node should also be properly considered in the node view for effective hinting. In the graph view, some nodes may have fewer direct connections but belong to structurally complex and critical subgraphs. Therefore, it is not enough to only focus on their one-hop neighbors in the node view; the entire subgraph structure and the complex relationships therein must be considered for effective hinting. In short, there are two obstacles to overcome. The first is how to effectively integrate structural and semantic node information in the node view to generate hints that are helpful for NIE. The second is how to insert hints in the graph view to enhance the model's ability to accurately identify important nodes.
[0008] In the node view, this application generates soft hints from the semantic information of the nodes, enabling the model to learn structural information in a semantic context. This approach unifies the scoring functions of pre-training and downstream tasks by combining soft hints with the original graph embedding. In the graph view, similar to words in natural language processing, this application uses virtual nodes to provide structural hints in the graph. Connections between virtual nodes are created in a learnable way to combine hint graphs. These hint graphs are then inserted into the original graph based on the importance of the nodes, thereby increasing the importance scores of important nodes during the propagation process and enhancing the model's ability to identify important nodes. At the same time, the information of the introduced hint graph is incorporated into the downstream task to learn node features, which helps to keep it consistent with the graph-based pre-training task. Hints from the two views are fused through multi-view contrastive learning, enhancing the model's ability to effectively combine and represent node-level and graph-level information.
[0009] To achieve the above objectives, the present application discloses a node importance estimation method based on multi-view graph hint learning, comprising the following steps:
[0010] Build a graph neural network: Get multiple web pages and build a graph neural network with them, with each web page as a node in the graph neural network.
[0011] Pre-training: Introducing prior knowledge to start the model's learning of node importance, so that the model can generate a rough classification of node importance;
[0012] Multi-view hinting: Integrate the structural and semantic information of nodes to construct node view hints; construct a hint graph and integrate it into the original graph. The node embeddings obtained from the hint graph are aggregated to update the nodes in the original graph;
[0013] Multi-view contrastive learning: Utilizes soft hints and structural hints to bring similar nodes closer together and dissimilar nodes farther apart. Soft hints guide the model through trainable hint tags in the node view, enabling it to exploit semantic information. Structural hints leverage topological information in the graph view to capture relationships and dependencies between nodes.
[0014] Webpage ranking: Sort webpage search results based on estimated node importance.
[0015] Preferably, the structural hint includes virtual information to enhance the model's ability to prioritize key nodes in the network, and to construct a subgraph by exploring the R-hop neighbors of each node; specifically, the following steps are involved:
[0016] Create M virtual nodes for each subgraph and establish connections between them in a trainable way to form a hint graph;
[0017] The important nodes are then inserted into the original graph based on their confidence levels;
[0018] In the subsequent propagation step, the aggregation of virtual nodes further improves the embedding of high-importance nodes, increasing their importance scores in the model learning process.
[0019] Preferably, pre-training is performed using a GNN encoder and classification contrastive learning, and the pre-training specifically includes:
[0020] First, GCN is used as a neighborhood-aware encoder to derive the initial embedding of the node, denoted as Z. l The operation of the layer is as follows: First, GCN is used as a neighborhood-aware encoder to derive the initial embedding of the node, denoted as Z. l The layer operations are as follows: ,in Represents the node feature matrix. , . I is an identity matrix. represents an adjacency matrix. W represents a learnable parameter. D is a degree matrix. σ is an activation function. After L layers of GCN, the initial representation Z of the graph is obtained.
[0021] By leveraging node embeddings and performing contrastive learning with node labels, the goal is to qualitatively distinguish the importance of nodes rather than quantifying the degree of difference between nodes.
[0022] Specifically, based on node labels and an importance ratio Φ (which is a hyperparameter), we first divide the nodes into “important” and “unimportant” groups. Embedding of midpoints and their central embeddings are considered as positive examples, while nodes from the discriminative group are used as negative examples. The central embedding is obtained by averaging the representations of all nodes in the “important” group;
[0023] Second, the “important” group was broken down into several subgroups Np, , y represents the total number of subgraphs;
[0024] This process introduces an attention mechanism to adjust the weights of different subgroups α , aims to distinguish the node embeddings in important subgroups from those in less important subgroups; nodes within important subgroups and central nodes are regarded as positive samples, while nodes from different subgroups are regarded as negative samples;
[0025] The comparison pre-training loss function is as follows:
[0026] ,in, is a scoring function and τ represents the InfoNCE temperature parameter. z i is a node Embedded, c p and c q is the central node of the subgroup within the “important” group, obtained by averaging the representations of all nodes within each group. y represents the total number of subgroups.
[0027] Preferably, the step of integrating the structure and semantic information of a node to construct a node view prompt includes:
[0028] Construct a two-hop neighborhood graph to exploit high-order structural relationships to learn node embeddings, including: first, construct a two-hop connectivity matrix , 2 n For the size of the matrix rows and columns, the initial node view soft hint S is obtained by using the inherent semantic information H through the following formula: , where S represents a high-order semantic relationship hint, n and d Represent the size of the rows and columns of the matrix respectively;
[0029] Finally, the soft hint is obtained by feeding S into a two-layer perceptron: , where W1 and W2 are trainable weights, b1 and b2 are biases, and β is the activation function.
[0030] Preferably, the soft hint insertion method is matched with the scoring function, which is as follows: ,in, w i and u i Use the softmax function to aggregate nodes v i The weight projection obtained by the neighborhood of . σ is the activation function, and x i ,y i are nodes obtained by different embedding methods v i Using a similar aggregation method, the generated soft hints are integrated into the structural embedding of the node. , where λ ∈ [ 0 ,1] is a hyperparameter for controlling the soft hint ratio. Preferably, the constructing hint graph and integrating the hint graph into the original graph, and the node embeddings obtained from the hint graph are aggregated to update the nodes in the original graph, including: for the initial graph , is a collection of nodes, v 1 , v 2 , v n The 1st, 2nd and n nodes, is a set of edges; first, extract the neighbors R of each node -hop Construct the subgraph and then build the prompt graph , To introduce the prompt node, To introduce a hint edge; if the similarity between two hint nodes is lower than a certain threshold , then create an edge between them: ,in δ is an activation function, where i Hint Node Hedi j Hint Node There is a learnable feature vector;
[0031] Next, the hint graph is integrated into the original graph to obtain a new graph; specifically, the nodes in the hint graph are embedded into Multiply by the node embeddings in the original graph z i , represents the association between nodes in two graphs, k It is the first k nodes; then use the softmax function to normalize these relationships into a probability distribution, where each element represents the strength of the association between two nodes; nodes with high association strength are considered to have high importance, so an edge is added between the prompt node and the original graph node; an insertion method based on the importance of nodes in the embedding is used to better adapt to the NIE task, which is mathematically described as follows: Where η is a node importance threshold;
[0032] Finally, the node embeddings obtained from the hint graph are aggregated to update the nodes in the original graph: , w ik is the weight, m is the total number of node embeddings. For each node, get the embedding of its subgraph and convolve it into a vector using a GNN layer. , as the structural hint embedding of the node, the vector is composed of structural hints , is the total number of vectors.
[0033] Preferably, the multi-view contrast learning includes: the positive samples in the multi-view contrast learning are composed of nodes The soft hints and structural hints of The soft prompts from nodes and prompts from other nodes;
[0034] The contrastive learning objectives under soft prompting are defined as:
[0035] ,in, For the i A soft prompt is embedded. For the i Structural hint embedding, is a scoring function that measures the similarity between two embeddings, with a similarity metric and a multi-layer perceptron layer , Is an indicator function that returns 1 when the condition is met;
[0036] The target loss for multi-view contrastive learning is: , The loss function for structured cue contrastive learning uses the same method as soft cue contrastive learning, where N is the number of nodes;
[0037] The obtained soft hints and structural hints are aggregated to achieve a holistic node representation, which serves as the input of downstream methods, i.e. , where θ ∈ [ 0 ,1] is a hyperparameter that controls the soft hint and structural hint proportion.
[0038] The beneficial effects of this application are as follows:
[0039] This application uses a combination of soft cues and structural cues using high-order information to identify key nodes;
[0040] This application generates soft hints that combine high-level information with semantic aspects of nodes to construct structural information that is contextually aligned with the semantic environment;
[0041] This application introduces virtual nodes to construct a structural hint graph, and enhances the model's ability to distinguish important nodes through propagation.
[0042] This application proposes to narrow the gap in node importance estimation by implementing multi-view hint learning technology, including a node view for context and a graph view for structure. Specifically, in the node view, this application designs a soft hint by encoding node information, enabling the model to capture structural features in a semantic context; thereafter, the downstream node regression task is kept consistent with pre-training by inserting hint patterns. In the graph view, this application introduces virtual nodes that can be learned to be inserted based on node importance to create a hint graph. High-importance nodes in the original graph are connected to more virtual nodes, thereby improving their embedding in subsequent propagation steps. This enhancement improves their importance scores in downstream tasks, effectively improving the model's ability to distinguish important nodes. In addition, hints from different views are fused through multi-view contrastive learning to further enhance the expressiveness of node embeddings. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 Flowchart of the evaluation method for this application. DETAILED DESCRIPTION
[0044] The present invention will be further described below with reference to the accompanying drawings, but the present invention is not limited in any way. Any changes or substitutions made based on the teachings of the present invention fall within the scope of protection of the present invention.
[0045] Artificial intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also involves studying the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.
[0046] Natural language processing (NLP) is a key area of research in computer science and artificial intelligence. It studies the theories and methods that enable effective communication between humans and computers using natural language. Natural language processing (NLP) integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language—the language we use in everyday life—and is closely linked to the study of linguistics. Natural language processing technologies typically include text processing, semantic understanding, machine translation, robotic question answering, and knowledge graphs.
[0047] The technical solutions provided in the embodiments of this application involve technologies such as machine learning and natural language processing of artificial intelligence, and are specifically introduced and explained through the following embodiments.
[0048] Before introducing the embodiments of the present application, some terms involved in the present application are explained.
[0049] 1. Graph Neural Networks (GNNs): Graph Neural Networks (GNNs) adopt a message passing paradigm where nodes iteratively update their states by aggregating features from their neighbors. Graph Convolutional Networks (GCNs) simplify the convolution process on graphs by using a local first-order approximation of spectral graph convolutions. Graph SAGEs adopt an inductive approach to generate node representations by aggregating information from surrounding neighbors in various ways. RGCNs extend GCNs by modeling multiple relationships.
[0050] 2. Node Importance Evaluation (NIE): Early methods on NIE mainly focused on isomorphic graphs. PageRank is a NIE-based method based on random walks. It evaluates the importance of nodes by performing random walks on the graph, propagating node importance scores, and utilizing the topological structure of the graph. The personalized PageRank model is an extension of the PageRank algorithm based on user-specific preferences, generating personalized importance scores for each user or node. Random Walk Restart (RWR) evaluates the importance and relevance of nodes by performing random walks between nodes and periodically resetting to the starting node. In addition, various centrality concepts are adopted to illustrate the importance of nodes, such as degree centrality, closeness centrality, betweenness centrality, harmonic centrality, and eigenvector centrality. HAR extends the traditional concepts of hub and authority to multi-relational data, evaluating nodes on multi-relational graphs by simultaneously considering hub, authority, and relevance scores. However, these methods face high computational complexity when dealing with large-scale networks and are easily disturbed by local features;
[0051] 3. Graph Hints: Compared to the fine-tuning paradigm, the advantage of hints lies in their lightweight parameter adjustment and the minimal number of hint samples required. When extended to the graph domain, reformulating the downstream task as a pre-training task can eliminate the need for extensive model tuning and effectively extract the necessary knowledge. The most basic form of graph hints can add additional features to the original graph embedding through hint vectors. The current pipeline of graph hints includes hint tokens, token structure, and insertion mode. The design of graph hints can be divided into "hints as tokens" and "hints as graphs". The former usually involves appending the hint vector to the original graph feature vector, while the latter adds nodes and edges as a hint graph.
[0052] In one embodiment, the present application defines the node importance estimation (NIE) problem as follows: Let Represents a node set, represents the edge set, Represents the set of predicates in the graph. In the context of , equipped with a set of known node importance scores S, the goal of node importance evaluation (NI) is to derive a prediction function γ aims to predict the importance score S of each node based on the embedded structural and semantic properties, thereby evaluating The importance of each node in .
[0053] This application consists of three stages: pre-training, multi-view prompting, and downstream tasks. In the pre-training stage, this application introduces prior knowledge to start the model's learning of node importance, which enables the model to generate a rough classification of node importance.
[0054] Entering the multi-view hinting stage, a soft hint mechanism promotes the interaction between the structure and context of each node. This process enables the model to learn how to interpret structural hints in the context of the semantic environment, enhancing its understanding of the subtle relationships between nodes.
[0055] Furthermore, this application introduces structural hints, which include virtual information to enhance the model's ability to prioritize key nodes in the network. A subgraph is constructed by exploring each node's R-hop neighborhood. For each subgraph, this application creates M virtual nodes and establishes trainable connections between them to form a hint graph, which is then inserted into the original graph based on the confidence level of the important nodes. In the subsequent propagation step, the aggregation of virtual nodes further improves the embedding of high-importance nodes, increasing their importance scores during model learning.
[0056] To promote the fusion of cue information from different views, this application adopts multi-view contrastive learning, which enables the model to effectively integrate and coordinate features from node view and graph view representations.
[0057] refer to Figure 1 In one embodiment, a node importance estimation method based on multi-view graph hint learning comprises the following steps:
[0058] Build a graph neural network: Get multiple web pages and build a graph neural network with them, with each web page as a node in the graph neural network.
[0059] Pre-training: Introducing prior knowledge to start the model's learning of node importance, so that the model can generate a rough classification of node importance;
[0060] Multi-view hinting: Integrate the structural and semantic information of nodes to construct node view hints; construct a hint graph and integrate it into the original graph. The node embeddings obtained from the hint graph are aggregated to update the nodes in the original graph;
[0061] Multi-view contrastive learning: Soft and structural cues are used to bring similar nodes closer together and pull dissimilar nodes apart. Soft cues guide the model through trainable cue tags in the node view, allowing it to exploit semantic information. Structural cues use topological information in the graph view to capture dependencies between nodes.
[0062] Webpage ranking: Sort webpage search results based on estimated node importance.
[0063] In one embodiment, the steps for building a graph neural network for a web page are as follows:
[0064] 1. Data collection and preprocessing:
[0065] 1.1 Web crawling: Use web crawler tools (such as Scrapy, BeautifulSoup, Selenium, etc.) to crawl web pages from the Internet and obtain the HTML source code, text content, metadata (such as title, description, keywords), link information, etc.
[0066] 1.2 Constructing a webpage graph: Each webpage is considered a node, and node attributes may include the URL, title, body content, metadata, etc. Hyperlinks between webpages are considered edges, and edge weights can be adjusted based on the importance of the link (e.g., anchor text, location, etc.). Representing the webpage graph as an adjacency matrix or edge list facilitates subsequent processing.
[0067] 1.3 Data cleaning: remove duplicate web pages and invalid links, unify URL formats, handle relative paths and other issues, and remove irrelevant web pages (such as advertising pages, 404 error pages, etc.).
[0068] 2. Feature extraction:
[0069] Extract text features, such as the TF-IDF algorithm, which calculates the term frequency-inverse document frequency (TFM-IDF) in a web page to measure the importance of words.
[0070] Extract structural features: Calculate degree centrality: calculate the in-degree and out-degree of each node to measure its number of connections; Calculate clustering coefficient: calculate the local clustering coefficient to reflect the closeness of the node in its neighborhood;
[0071] 3. Graph construction: Represent the graph as a list of all edges, where each edge consists of two node IDs. Build a node feature matrix, where features can be text embeddings, structural features, etc.
[0072] 4. Choose a suitable graph neural network model. Choose a suitable GNN model based on the specific task. Common GNN models include: Graph Convolutional Networks (GCN), Graph Attention Networks (GAT), and Graph Isomorphism Network (GIN).
[0073] In one embodiment, labeled contrastive pre-training includes:
[0074] In graph data, some nodes inherently have importance scores (e.g., movie ratings, paper citation counts, etc.), and it is desirable to effectively utilize this information during pre-training. In order to fully utilize node labels in NIE, the pre-training task is designed as a simple and transferable framework.
[0075] In one embodiment, the present application utilizes a classic GNN encoder and classification contrastive learning for pre-training. First, illustratively, the present application uses GCN as a neighborhood-aware encoder to derive the initial embedding of the node, denoted as Z. The GCN operation for layer L is as follows: ,in Represents the node feature matrix. , . I is an identity matrix. represents an adjacency matrix. W represents a learnable parameter. D is a degree matrix. σ is an activation function. After L layers of GCN, the initial representation Z of the graph is obtained.
[0076] By leveraging node embeddings and performing contrastive learning with node labels, the goal is to qualitatively distinguish the importance of nodes rather than quantifying the degree of difference between nodes.
[0077] Specifically, based on node labels and an importance ratio Φ (which is a hyperparameter), we first divide the nodes into “important” and “unimportant” groups. Embedding of midpoints and their central embeddings The centered embedding is obtained by averaging the representations of all nodes in the “important” group.
[0078] Second, the “important” group was broken down into several subgroups Np, 。
[0079] This process introduces an attention mechanism to adjust the weights of different subgroups α, The goal is to distinguish node embeddings in important subgroups from those in less important subgroups. This application further applies contrastive learning to these subgroups. Nodes within important subgroups and central nodes are considered positive samples, while nodes from different subgroups are considered negative samples.
[0080] The total comparison pre-training loss function is as follows:
[0081] ,in, is a scoring function and τ represents the InfoNCE temperature parameter. z i is a node Embedded, c p and c qis the central node of the subgroup within the “important” group, obtained by averaging the representations of all nodes within each group. y represents the total number of subgroups.
[0082] The pre-training task helps the model roughly distinguish the importance of nodes for different categories, while the downstream task is a regression task. There is a gap between these upstream and downstream tasks. Next, this application aims to narrow this gap using a multi-view hinting method.
[0083] In one embodiment, the soft prompt generation of the node perspective includes: after pre-training, introducing a soft prompt generation module to construct the node view prompt by integrating the structural and semantic information of the node.
[0084] Since the two-hop neighborhood captures a large number of structural relationships, this application constructs a two-hop neighborhood graph to exploit high-order structural relationships to learn node embeddings.
[0085] First, this application constructs a two-hop connectivity matrix The initial node view soft hint S is obtained by using the inherent semantic information H (without pre-training) through the following formula:
[0086] ; where S represents a high-order semantic relationship hint. Finally, by inputting S into a two-layer perceptron, a soft hint is obtained: , where W1 and W2 are trainable weights, b1 and b2 are biases, and β is the activation function.
[0087] To bridge the gap between pre-training and downstream tasks, this application matches the soft hint insertion method with the scoring function of the downstream task. In the downstream task, the scoring function is as follows:
[0088] ,in, w i and u i Use the softmax function to aggregate nodes v i The weight projection obtained by the neighborhood of . σ is the activation function, and x i ,y i are nodes obtained by different embedding methods v i Using a similar aggregation method, the generated soft hints are integrated into the structural embedding of the node. , where λ ∈ [ 0 ,1] is a hyperparameter used to control the proportion of soft prompts, .
[0089] In one embodiment, generating structured hints from a graph perspective involves further distinguishing node importance after obtaining comprehensive node features. In natural language processing (NLP), hint words can be added to the input to connect pre-training tasks with downstream tasks. This can be analogized to adding virtual hint nodes in the field of node importance analysis.
[0090] The initial image is , is a collection of nodes, is a set of edges, and the initial feature of each node is First, this application extracts the neighbors R of each node - hop Construct the subgraph and then build the prompt graph , the introduction prompt node is , where each hint node has a learnable feature vector A learnable method determines the edges in the hint graph. If the similarity between two hint nodes is below a certain threshold , then create an edge between them ,in δ is an activation function. If the embedding vectors of two nodes are significantly different, adding an edge between them can encourage the model to pay more attention to the connection between them during the learning process, thereby improving the effectiveness of node embedding learning.
[0091] Next, consider how to integrate the hint graph into the original graph to obtain a new graph Specifically, embed the nodes in the prompt graph into Multiply by the node embeddings in the original graph z i , represents the association between the nodes in the two graphs. These relationships are then normalized into a probability distribution using the softmax function, where each element represents the strength of the association between the two nodes. Nodes with high association strength are considered to have high importance. Therefore, an edge is added between the hint node and the original graph node. This application designs an insertion method based on the importance of nodes in embedding to better adapt to the NIE task. Mathematically, , where η is a node importance threshold.
[0092] Finally, the node embeddings obtained from the hint graph are aggregated to update the nodes in the original graph: For each node, we get the embedding of its subgraph and convolve it into a vector using the GNN layer , as the structural hint embedding of the node, the vector is composed of structural hints , is the total number of vectors.
[0093] In one embodiment, multi-view contrastive learning includes:
[0094] Soft hints guide the model through trainable hint labels in the node view, enabling it to leverage semantic information. Structural hints exploit topological information in the graph view, which is crucial for capturing relationships and dependencies between nodes. Multi-view contrastive learning leverages these two types of hints to enhance the model's discriminative capabilities by bringing similar nodes closer together and dissimilar nodes farther apart. This approach enables the model to more effectively distinguish between nodes of varying importance. Furthermore, it helps the model learn more general feature embeddings, improving generalization performance across different datasets or NIE methods.
[0095] Formally speaking, the positive samples in multi-view contrastive learning are composed of nodes Negative samples are composed of nodes The contrastive learning objective under soft hints is defined as:
[0096] ,in, is a scoring function used to measure the similarity between two embeddings, with a similarity metric and a multi-layer perceptron (MLP) layer . Is an indicator function that returns 1 when the condition is true.
[0097] When the brackets match, the result is 1; otherwise, it is 0. In a similar way, in the structure prompt The contrastive learning objective is obtained as follows. The target loss of multi-view contrastive learning is: .
[0098] The obtained soft hints and structural hints are aggregated to achieve a holistic node representation, which serves as the input of downstream methods, namely: , where θ ∈ [ 0 ,1] is a hyperparameter that controls the ratio of soft cues and structural cues.
[0099] The complete training process of this application is as follows: Input the original image and prompt image With L layer GNN Model and dimension d. The pre-training phase generates node embedding Z*= f (Z E ,A). During pre-training, the time complexity of node grouping is , the time complexity of contrastive learning is ,in, represents the negative sampling ratio, Indicates the importance ratio. Soft hint Z soft=g soft ( Z* ),need , insert soft prompt need .
[0100] Structural Tips Z structure need , Subsequently, multi-view contrastive learning between soft cues and structural cues is used to optimize node embeddings, which requires Finally, the prompts are aggregated and the embedding Z is updated. Training requires The time complexity of .
[0101] In one embodiment, this application follows the protocol of previous node importance research. Experiments are evaluated on three real-world webpage datasets from the encyclopedia, citation, and movie domains: FB15K, GA16K, and TMDB5K, as shown below. The datasets are split into training, validation, and test subsets in a 7:1:2 ratio.
[0102] 1) FB15K, a subset of the extensive Freebase1 knowledge base. In this case, the metric page views is used as the basic criterion for determining node importance.
[0103] 2) GA16K is derived from a part of the GAKG2 knowledge graph. It is worth noting that the citation count is used as a benchmark to evaluate the importance of a single node.
[0104] 3) TMDB5K3 is a subset of the TMDB movie knowledge graph. In this dataset, the metric used to determine the importance of each node is based on the popularity score of the movie.
[0105] To verify the effectiveness of this application, we compared it with traditional network analysis, machine learning, and graph neural network (GNN)-based methods.
[0106] 1) Traditional network analysis methods: Page Rank (PR) and Personalized Page Rank (PPR) are based on graph random walk models, which assign a positive number to each web page to indicate its importance.
[0107] 2) Machine Learning Methods: Linear regression (LR) uses a straight line to represent the relationship between variables, while the Multilayer Perceptron (MLP) is a neural network with a multi-layer structure that can learn complex nonlinear patterns in data.
[0108] 3) Graph Neural Network (GNN)-based methods: These include three well-known GNN models: GCN, RGCN, and GraphSAGE, which are used to learn graph features and calculate node importance. Furthermore, this application compares this method with three classic node importance representation models: GENI, RGTN, and LICAP.
[0109] To evaluate the performance of our application in assessing node importance through score prediction and importance ranking, we adopt a dual approach, utilizing both ranking and regression metrics.
[0110] 1) Ranking indicators
[0111] Normalized Discounted Cumulative Gain (NDCG), derived from Discounted Cumulative Gain (DCG), is an advanced ranking evaluation metric. NDCG considers both the ranking position of a node and its corresponding score, providing a comprehensive assessment of ranking quality. , nodes are ranked according to their prediction scores, and Si The true importance score of the node ranked i. By normalizing DCG, NDCG ensures that the evaluation is not affected by the scale of the true score, thus enabling fair comparison across different datasets and tasks. ,IDCG, i.e. ideal discounted cumulative gain, represents the maximum DCG score that can be achieved for a given set of nodes.
[0112] The Spearman rank correlation coefficient (SPEARMAN) is used to evaluate the monotonic relationship between two variables. It will predict the score and the true score All converted to hierarchical order and , and then calculate their correlation. and Represents a set and N is the total number of nodes. , the overlap rate (OVER) measures the important node set of the prediction With the real set of important nodes The closer the OVER value is to 1, the more consistent the predicted important nodes are with the real important nodes, reflecting the effectiveness of the model in accurately identifying key nodes. .
[0113] 2) Regression indicators:
[0114] The root mean square error (RMSE) is used to evaluate the average difference between the predicted value and the true value, that is, the difference between the predicted value of node I and the true value. It represents the magnitude of the prediction error in the model, and the lower the RMSE value, the higher the prediction accuracy. The calculation formula of RMSE is as follows: , the median absolute error (MedAE) evaluates the predictive ability of the regression model by calculating the median of all absolute differences between the predicted and actual values: .
[0115] In one embodiment, this application uses GCN with contrastive learning for pre-training, combining soft and structural cues for downstream NIE methods. The node and cues dimensions vary across datasets: 768 for FB15K, 32 for GA16K, and 64 for TMDB5K, with further experiments exploring different cues dimensions. Training continues for 10,000 iterations, with early stopping triggered after 1,000 cycles of no improvement. The combined weights of soft and structural cues are set to 0.8 and 0.2, respectively, with an importance ratio of 0.1. This application uses a cued graph consisting of 10 virtual nodes, the impact of which will be discussed later. τ is 0.86. The learning rate is initialized to 0.005, and hyperparameters, including λ and θ, are fine-tuned for each dataset individually to achieve optimal performance.
[0116] Node importance estimation is a challenging task, especially for real-world knowledge graphs with complex structures and semantic information. The method of this application utilizes multi-view hints to enhance the effect of node importance estimation (NIET) task and bridge the gap between pre-training as a classification task and downstream tasks as regression tasks. First, this application uses real-world importance labels from node classification tasks for pre-training, enabling the model to learn prior knowledge. Secondly, this application generates soft hints with semantic information to integrate the comprehensive embedding of nodes, and introduces structural hint graphs to distinguish node importance. Finally, this application applies multi-view contrastive learning between hints to enhance node hint representation.
[0117] As used herein, the word "preferred" is intended to serve as an example, instance, or illustration. Any aspect or design described herein as "preferred" is not necessarily to be construed as advantageous over other aspects or designs. Rather, the use of the word "preferred" is intended to present concepts in a concrete manner. As used in this application, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or." That is, unless otherwise specified or clear from the context, "X employs A or B" is intended to mean any of the naturally inclusive permutations. That is, if X employs A; X employs B; or X employs both A and B, then "X employs A or B" is satisfied in any of the foregoing examples.
[0118] Moreover, although the present disclosure has been shown and described with respect to one or implementations, those skilled in the art will think of equivalent variations and modifications based on reading and understanding of this specification and the accompanying drawings. The present disclosure includes all such modifications and variations and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the above-mentioned components (such as elements, etc.), the terms used to describe such components are intended to correspond to any component (unless otherwise indicated) that performs the specified function of the component, even if structurally not equivalent to the disclosed structure that performs the function in the exemplary implementation of the present disclosure shown herein. In addition, although the specific features of the present disclosure have been disclosed with respect to only one of several implementations, such features can be combined with one or other features of other implementations that may be desired and advantageous for a given or specific application. Moreover, insofar as the terms "including", "having", "containing" or their variations are used in specific embodiments or claims, such terms are intended to be included in a manner similar to the term "comprising".
[0119] The functional units in the embodiments of the present invention may be integrated into a single processing module, or each unit may exist physically separately, or multiple or more units may be integrated into a single module. The aforementioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The aforementioned storage medium may be a read-only memory, a magnetic disk, or an optical disk, etc. The aforementioned devices or systems may execute the storage method in the corresponding method embodiment.
[0120] In summary, the above embodiment is one implementation method of the present invention, but the implementation method of the present invention is not limited to the described embodiment. Any other changes, modifications, substitutions, combinations, and simplifications that deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the scope of protection of the present invention.
Claims
1. A node importance estimation method based on multi-view graph hint learning, characterized by: The following steps are involved: Build a graph neural network: Get multiple web pages and build a graph neural network with them, with each web page as a node in the graph neural network. Pre-training: Introducing prior knowledge to start the model's learning of node importance, so that the model can generate a rough classification of node importance; Multi-view hints: Integrate the structural and semantic information of nodes to construct node view hints; Construct a hint graph and integrate it into the original graph. The node embeddings obtained from the hint graph are aggregated to update the nodes in the original graph. Multi-view contrastive learning: using soft cues and structural cues to bring similar nodes closer together and pull dissimilar nodes apart; The soft hints guide the model through trainable hint tags in the node view to make use of semantic information; the structural hints use the topological information in the graph view to capture the dependencies between nodes; Web page ranking: sorting web page search results according to the estimated node importance; The step of integrating the structure and semantic information of a node to construct a node view prompt includes: Construct a two-hop neighborhood graph to exploit high-order structural relationships to learn node embeddings, including: First, construct a two-hop connectivity matrix , 2n is the size of the matrix rows and columns, and the initial node view soft hint S is obtained based on the inherent semantic information H. The specific formula is as follows: ; Where S represents the high-order semantic relationship hint, n and d represent the size of the rows and columns of the matrix respectively; Finally, the soft hint is obtained by feeding S into a two-layer perceptron: ; Where W1 and W2 are trainable weights, b1 and b2 are biases, and β is the activation function.
2. The node importance estimation method based on multi-view graph hint learning according to claim 1 is characterized in that The structural hints contain virtual information to enhance the model's ability to prioritize key nodes in the network, and to build a subgraph by exploring the R-hop neighbors of each node; Specifically include: Create M virtual nodes for each subgraph and establish connections between the virtual nodes in a trainable way to form a prompt graph; Insert important nodes into the original graph based on their confidence levels; In the subsequent propagation step, virtual nodes are aggregated to improve the embedding of important nodes and increase the importance score of the embedding of important nodes in the model learning process.
3. The node importance estimation method based on multi-view graph hint learning according to claim 2 is characterized in that: Pre-training is performed using a GNN encoder and classification contrastive learning. The pre-training specifically includes: First, GCN is used as a neighborhood-aware encoder to derive the initial embedding Z of the node. The operation of GCN for the lth layer is as follows: ; in represents the node feature matrix, , , I is an identity matrix, Represents an adjacency matrix, W represents a learnable parameter, D is a degree matrix, σ is an activation function, and after l layers of GCN, the initial representation Z of the graph is obtained. It is the degree matrix plus the unit matrix, l represents the lth layer of GCN, is the adjacency matrix plus the identity matrix; By using node embedding and node labels for classification contrast learning, the importance of nodes can be qualitatively distinguished. Specifically, based on node labels and importance ratio Φ, the nodes are first divided into "important" group and "unimportant" group; the "important" group Embedding of midpoints and center embedding As positive examples, the nodes from the discriminant group are taken as negative examples, and the center embedding is the average of the representations of all nodes in the "important" group; Second, the "important" group is broken down into several subgroups Np: ; y represents the total number of subgroups; The weights α of different subgroups are adjusted through the attention mechanism, aiming to distinguish the node embeddings in important subgroups from those in other subgroups; nodes in important subgroups and central nodes are positive samples, and nodes from other subgroups are negative samples; The comparison pre-training loss function is as follows: ; in, is the scoring function, τ represents the InfoNCE temperature parameter, z i Is an "important" group node Embedding, z j Is the "unimportant" group node Embedding, c p and c q is the central node of the subgroup within the "important" group, obtained by averaging the representations of all nodes within each group.
4. The node importance estimation method based on multi-view graph hint learning according to claim 3 is characterized in that Match the soft hint insertion method with the scoring function, which is as follows: ; Among them, w i and u i is to use the softmax function to aggregate nodes v i The weight projection obtained from the neighborhood of i ,y i is the node v obtained by different embedding methods i The structural and semantic information of n is the number of nodes; the generated soft hints are integrated into the structural embedding of the nodes using an aggregation method: ; Among them, λ ∈ [0,1] is a hyperparameter used to control the proportion of soft hints, It's a soft prompt.
5. The node importance estimation method based on multi-view graph hint learning according to claim 4 is characterized in that: The construction of the hint graph and integration of the hint graph into the original graph, where the node embeddings obtained from the hint graph are aggregated to update the nodes in the original graph, includes: For the initial graph , is a collection of nodes, v1,v2,v n are the 1st, 2nd and nth nodes respectively, is a set of edges; first, extract the neighbor R-hop subgraph of each node, and then build the prompt graph , To introduce the prompt node, To introduce a hint edge; if the similarity between two hint nodes is lower than the threshold , then create an edge between the two hint nodes: ; Where δ is an activation function, the i-th prompt node and the jth hint node There is a learnable feature vector; Next, the hint graph is integrated into the original graph to obtain a new graph; specifically, the nodes in the hint graph are embedded into Multiply by the node embedding z in the original graph i , represents the association between nodes in the two graphs, and k is the kth node in the hint graph; these relationships are then normalized into a probability distribution using the softmax function, where each element represents the strength of the association between two nodes; nodes with association strength above a preset threshold have high importance, so an edge is added between the hint node and the original graph node; an insertion method based on the importance of nodes in the embedding is used, which is mathematically described as follows: ; Where η is the node importance threshold; Finally, the node embeddings obtained from the hint graph are aggregated to update the nodes in the original graph: ; w ik is the weight, m is the total number of node embeddings, for each node, get the embedding of its subgraph and convolve it into a vector using the GNN layer , as the structural hint embedding of the node, the vector is composed of structural hints , is the total number of vectors.
6. The node importance estimation method based on multi-view graph hint learning according to claim 5, characterized in that: The multi-view contrast learning includes: Positive samples in multi-view contrastive learning are composed of nodes The soft hints and structural hints of The soft prompts and prompts from other nodes are composed of; the contrastive learning objective under soft prompts is defined as: ; in, is the i-th soft hint embedding, is the i-th structural hint embedding, is the jth soft hint embedding, is the jth structural hint embedding, is a scoring function that measures the similarity between two embeddings, with a similarity metric and a multi-layer perceptron layer , Is an indicator function that returns 1 when the condition is met; The target loss for multi-view contrastive learning is: ; The loss function for structured cue contrastive learning uses the same method as soft cue contrastive learning, where N is the number of nodes; The obtained soft hints and structural hints are aggregated to achieve a holistic node representation, which serves as the input of downstream methods, i.e. ; Here, θ ∈ [0,1] is a hyperparameter that controls the ratio of soft cues to structural cues.
Citation Information
Patent Citations
Heterogeneous information network node classification method based on prompt learning
CN116304066A
Complex network disassembling method based on graph contrast learning and multi-hop aggregation
CN118036671A