Link prediction method, system and device of graph network and storage medium

By using an adaptive subgraph-motif selection framework, the optimal subgraph extraction strategy and motif structure are dynamically selected. Combined with a GNN encoder, this solves the problems of high computational overhead and insufficient generalization ability of existing methods in large and complex networks, and achieves efficient link prediction.

CN121682148APending Publication Date: 2026-03-17LANZHOU UNIVERSITY OF TECHNOLOGY
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-12
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing graph neural network link prediction methods suffer from high computational and memory overhead in large and complex networks, and are difficult to adapt to the diverse topological characteristics of networks, resulting in limited generalization ability and prediction performance.

Method used

The adaptive subgraph-motif selection (ASMS) framework is adopted. The optimal subgraph extraction strategy, motif structure and GNN encoder are dynamically selected through a three-dimensional search space model. Combined with differentiable architecture search technology, closed subgraphs are adaptively extracted and node annotation and feature fusion are performed to generate an efficient link prediction model.

Benefits of technology

It significantly improves the generalization ability and prediction performance in different real-world networks, overcomes the rigid configuration problem of traditional methods, and improves the accuracy and efficiency of link prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121682148A_ABST
    Figure CN121682148A_ABST
Patent Text Reader

Abstract

The invention provides a link prediction method, system and device for a graph network and a storage medium, and belongs to the crossing field of a graph neural network and machine learning, and the method comprises the steps: firstly, constructing a three-dimensional joint search space composed of a sub-graph extraction strategy, a motif structure type and a graph neural network architecture, and through a differentiable architecture search technology, carrying out the three-dimensional joint search of the sub-graph extraction strategy, the motif structure type and the graph neural network architecture; automatically learning an optimal analysis combination for a specific network structure; the optimal analysis combination is used for prediction, the system fuses local adjacency information based on the self-adaptive subgraph and a high-order structure mode based on the selected motif, the optimized graph neural network is used for coding and aggregation, and finally the high-precision link existence probability is output. Experimental verification shows that the method achieves remarkable and stable performance improvement on isomorphic and heterogeneous data sets, the limitation of a traditional method under different topological structures is effectively overcome, and a universal, robust and efficient solution is provided for a link prediction task in a complex network.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of graph neural networks and machine learning, and particularly relates to a link prediction method, system, device and storage medium of a graph network. BACKGROUND

[0002] Link prediction is a fundamental task in graph learning, aiming to reveal the underlying connection patterns in network structures by predicting the connections between node pairs that are currently missing or likely to form in the future. With its strong ability in structure completion and relationship inference, link prediction has been widely applied and verified in many real scenarios. For example, in the field of bioinformatics, link prediction is used to infer potential protein-protein interactions. In social networks, it provides support for personalized friend recommendation systems by predicting hidden connections between users. In addition, link prediction has also been widely applied in knowledge graph completion, recommendation systems, drug discovery and other fields.

[0003] In recent years, graph neural networks (GNNs) have become the mainstream method for link prediction and have shown strong representation learning ability. By fusing node features and neighborhood structure, GNNs can effectively model complex topological and semantic relationships, thereby improving prediction performance. However, most existing GNN-based methods highly rely on modeling the entire graph. In large and complex networks, such methods will bring significant computational and memory overheads, and may introduce irrelevant information, thereby reducing the discriminative ability of the model.

[0004] To solve these problems, researchers have proposed subgraph-based GNN methods. Local subgraph methods construct an enclosing subgraph around the target node pair and limit the computation within its neighborhood range, thereby reducing the interference of irrelevant nodes and significantly reducing the computational and memory overheads, such as SEAL and S3GRL. However, most existing methods rely on fixed neighborhood ranges and mainly capture low-order structural information, which makes them difficult to adapt to the diverse node distribution and structure density in the network. Therefore, these limitations can lead to information loss or redundancy and hinder effective modeling of high-order structural patterns in subgraphs.

[0005] To address the deficiency of subgraph methods in capturing high-order structure patterns, researchers introduced higher-order motifs to enhance the perception of complex topological semantics. Higher-order motifs are small, repetitive subgraph patterns that occur more frequently than expected in random networks. They can reveal potential association patterns and local topological semantics of node pairs, especially when the differences between node pairs mainly manifest in high-order structures. By simultaneously convolving simple graphs and motif graphs, low-order connectivity and high-order motif features are fused. Although the introduction of motifs compensates for the deficiencies of subgraph methods in high-order information capture, existing motif methods still have limitations. These methods largely rely on fixed motif structures and lack the ability to dynamically select optimal motifs based on different network and subgraph characteristics, thereby limiting their expressive ability in diverse graph types.

[0006] Existing link prediction methods rely on fixed neighborhood ranges for subgraph extraction, fixed motif types for feature enhancement, and fixed network architectures (such as GCN or GAT) for encoding learning. This rigid configuration mode makes it difficult for the model to adapt to the topological characteristics of different networks, thereby limiting its generalization ability and prediction performance in diverse real-world networks. SUMMARY

[0007] To solve the above background problems, the present application provides a link prediction method, system, device and storage medium for graph networks.

[0008] To achieve the above purpose, the present application provides a link prediction method for graph networks, comprising: Collecting network connection information of the target graph network, and determining a target node pair whose link connection relationship needs to be predicted by using the network connection information; the network connection information includes a node set in the network, an edge set of connected nodes, and a node feature matrix.

[0009] A three-dimensional search space model is jointly constructed from a preset subgraph extraction strategy space, a motif structure space, and a GNN encoding search space; the subgraph extraction strategy space contains M candidate subgraph extraction functions, the motif structure space includes N candidate motif structures, and the GNN encoding search space includes R candidate GNN encoders; the optimal combination model of the subgraph extraction function, the motif structure, and the GNN encoder in the three-dimensional search space model is determined by sampling a differentiable architecture search technology.

[0010] The subgraph extraction function of the optimal combination model is used to extract the closed subgraph of the target node pair. A subgraph adjacency matrix is ​​generated based on the closed subgraph. The nodes in the closed subgraph are labeled with double radii to generate a subgraph feature matrix. Based on the subgraph adjacency matrix, a motif adjacency matrix is ​​constructed using the motif structure of the optimal combination model. The subgraph adjacency matrix and the motif adjacency matrix are fused to obtain a combined adjacency matrix. The combined adjacency matrix and the subgraph feature matrix are encoded using the GNN encoder of the optimal combination model to generate a subgraph representation. The subgraph representation is pooled to obtain the overall representation of the node pair. The overall representation of the node pair is processed by a multilayer perceptron to obtain the edge existence probability of the target node pair.

[0011] The link connections of the target graph network are obtained by using the edge existence probability.

[0012] Preferably, the step of determining the optimal combination model of subgraph extraction function, phantom structure, and GNN encoder in the 3D search space model through sampling differentiable architecture search technology specifically includes: assigning a learnable architecture weight parameter to each candidate component in the subgraph extraction strategy space, phantom structure space, and GNN encoding search space; during the 3D search space model training phase, converting the architecture weight parameters of each candidate component into corresponding selection probabilities using a temperature-coefficient controlled Softmax function; weighting and fusing the outputs of each candidate component according to the selection probabilities to form a continuously differentiable forward propagation path; iteratively optimizing the architecture weight parameters using a gradient backpropagation algorithm; and after reaching the required number of iterations, selecting the candidate component with the largest architecture weight parameter value in each of the three spaces to form the optimal combination model.

[0013] Preferably, the M candidate subgraph extraction functions are used to adaptively extract local structural contexts with differentiated neighborhood ranges from the global network, centered on the target node pair; the N candidate motif structures are used to identify and quantify recurring higher-order connection patterns based on the local structural context; and the R candidate GNN encoders are used to predict the combined structure that integrates local structural context and higher-order connection patterns.

[0014] Preferably, the M candidate subgraph extraction functions are specifically 9 types, where i and j in each combination (i, j) are independently selected from the set {1, 2, 3}, representing the neighborhood extraction radii starting from the two nodes in the target node pair, respectively; the N candidate phantom structures are specifically 8 types, covering 3-node phantoms and 4-node phantoms; the 3-node phantoms include triangular phantoms and three-path phantoms, and the 4-node phantoms include 4-cluster phantoms, 4-loop phantoms, 3-star phantoms, 4-chain phantoms, 4-star phantoms, and tail triangle phantoms; the R candidate GNN encoders are specifically 3 types, namely GCN encoder, GAT encoder, and GraphSAGE encoder; wherein, M, N, and R decrease in descending order.

[0015] Preferably, the step of constructing a modal adjacency matrix based on the subgraph adjacency matrix and utilizing the modal structure of the optimal combination model specifically includes: counting the number of times each element in the subgraph adjacency matrix participates in the optimal modal structure, using the number as the element value at the corresponding position in the modal adjacency matrix, and forming a modal adjacency matrix from all elements.

[0016] Preferably, the step of generating a subgraph adjacency matrix based on a closed subgraph specifically includes: extracting the connection relationships of nodes inside the closed subgraph to generate a subgraph adjacency matrix; the step of performing double-radius node labeling on nodes in the closed subgraph to generate a subgraph feature matrix specifically includes: calculating the shortest path distance from any node v in the closed subgraph to the two nodes in the target node pair, assigning a unique label to node v based on the shortest path distance, and generating a subgraph feature matrix based on the label and the node feature matrix, wherein the labels of the two nodes in the target node pair are fixed at 1, and the labels of nodes outside the closed subgraph are 0; the step of fusing the subgraph adjacency matrix and the motif adjacency matrix to obtain a combined adjacency matrix specifically includes: adding the elements of the subgraph adjacency matrix and the motif adjacency matrix to obtain a combined adjacency matrix integrating low-order structural information and high-order structural information.

[0017] Preferably, it further includes: generating an AUC metric and an AUPR metric from the edge existence probability of the target node pair, wherein the AUC metric is used to evaluate the ability of the GNN encoder to distinguish between positive and negative samples of the target node pair, and the AUPR metric is used to evaluate the performance of the GNN encoder in a scenario where the number of positive and negative samples of the target node pair is unbalanced.

[0018] The present invention also provides a link prediction system for graph networks, comprising: The data acquisition module is used to collect network connection information of the target graph network and use the network connection information to determine the target node pairs whose link connection relationship needs to be predicted; the network connection information includes the set of nodes in the network, the set of edges of connected nodes, and the node feature matrix.

[0019] The model building module is used to jointly construct a three-dimensional search space model from a preset subgraph extraction strategy space, phantom structure space, and GNN encoding search space. The subgraph extraction strategy space contains M candidate subgraph extraction functions, the phantom structure space contains N candidate phantom structures, and the GNN encoding search space contains R candidate GNN encoders. The optimal combination model of subgraph extraction functions, phantom structures, and GNN encoders in the three-dimensional search space model is determined by sampling differentiable architecture search technology.

[0020] The model prediction module is used to extract closed subgraphs of target node pairs using the subgraph extraction function of the optimal combination model, generate a subgraph adjacency matrix based on the closed subgraph, label the nodes in the closed subgraph with double radii, and generate a subgraph feature matrix. Based on the subgraph adjacency matrix, a motif adjacency matrix is ​​constructed using the motif structure of the optimal combination model. The subgraph adjacency matrix and the motif adjacency matrix are fused to obtain a combined adjacency matrix. The combined adjacency matrix and the subgraph feature matrix are encoded using the GNN encoder of the optimal combination model to generate a subgraph representation. The subgraph representation is pooled to obtain a total representation of the node pairs. The total representation of the node pairs is processed by a multilayer perceptron to obtain the edge existence probability of the target node pairs. The link connection relationship of the target graph network is obtained using the edge existence probability.

[0021] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any one of the link prediction methods for the graph network.

[0022] The present invention also provides a computer-readable storage medium storing a computer program that, when loaded by a processor, is capable of executing any of the steps in the link prediction method for the graph network.

[0023] The link prediction method for graph networks provided by this invention has the following advantages: First, this invention defines a three-dimensional search space consisting of M seed graph extraction strategies, N motif structures, and an R-type GNN encoder. The optimal combination of these three elements is automatically learned through a differentiable architecture search technique. For each pair of target nodes to be predicted, the system dynamically extracts its closed subgraph based on the learned optimal combination and performs double-radius node labeling, generating subgraph features and an adjacency matrix. Next, the most relevant motif structure is automatically selected, and a motif adjacency matrix is ​​constructed based on the subgraph adjacency matrix, merging the two into a combined adjacency matrix. Subsequently, an adapted GNN encoder is used to encode this combined adjacency matrix and subgraph features to obtain the subgraph representation, and finally, the connection probability is output. This method achieves adaptive selection of subgraph range, higher-order motif types, and encoding architecture through a model, thereby overcoming the rigid configuration problem of traditional methods and significantly improving generalization ability and prediction performance in different real-world networks. Attached Figure Description

[0024] To more clearly illustrate the embodiments and design schemes of the present invention, the accompanying drawings required for this embodiment will be briefly described below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a flowchart of a link prediction method for graph networks according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating the ASMS link prediction process according to an embodiment of the present invention. Figure 3 This is a diagram of the three-dimensional search space model architecture of an embodiment of the present invention; Figure 4 This is a comparison chart of the robustness experiments of the AUC index for different datasets in this invention embodiment; Figure 4 (a) is the Chameleon dataset. Figure 4 (b) is a Wiki dataset. Figure 4 (c) is the Cora dataset. Figure 4 (d) represents the Citeseer dataset. Figure 4 (e) is the Actor dataset. Figure 4 (f) represents the Photo dataset. Figure 4 (g) represents the Computers dataset. Figure 4 (h) is the CS dataset. Figure 4 (i) is the PubMed dataset; Figure 5 This is a comparison chart of the robustness experiments of the AUPR index for different datasets in this embodiment of the invention;Figure 5 (a) is the Chameleon dataset. Figure 5 (b) is a Wiki dataset. Figure 5 (c) is the Cora dataset. Figure 5 (d) represents the Citeseer dataset. Figure 5 (e) is the Actor dataset. Figure 5 (f) represents the Photo dataset. Figure 5 (g) represents the Computers dataset. Figure 5 (h) is the CS dataset. Figure 1 (i) is the PubMed dataset. Detailed Implementation

[0026] To enable those skilled in the art to better understand and implement the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.

[0027] This invention provides a link prediction method for graph networks, specifically as follows: Figure 2 As shown, it includes: S1. Collect network connection information of the target graph network, and use the network connection information to determine the target node pairs whose link connection relationship needs to be predicted; the network connection information includes the set of nodes in the network, the set of edges of connected nodes, and the node feature matrix.

[0028] Automatically identifying the optimal subgraph extraction strategy, motif structure, and network architecture in diverse network topologies remains a key challenge in link prediction. To address this, this invention proposes an Adaptive Subgraph-Motif Selection (ASMS) framework, aiming to determine a globally optimal configuration for the entire network. ASMS enhances its ability to capture complex topological structures and high-order semantic relationships. Specifically, ASMS constructs a search space containing multiple candidate components and collaboratively optimizes these components through a differentiable architecture search strategy. During training, the framework dynamically adjusts component weights and fuses the subgraph adjacency matrix with the motif adjacency matrix, effectively capturing both low-order and high-order structural information. Ultimately, ASMS automatically selects the optimal combination for each network, significantly improving link prediction performance.

[0029] This invention first introduces the basic knowledge and symbolic representations used in its embodiments, followed by an overview of the overall framework. The embodiments of this invention propose a novel framework designed to automatically search for meaningful subgraphs and motif structures, thereby improving the performance of link prediction.

[0030] An undirected and unweighted network is represented as G=(V,E,X), where V represents the set of nodes, E represents the set of edges, and X represents the node feature matrix. X∈R N×F Where F is the feature dimension, N is the total number of nodes, and R represents that X is an N×F dimensional real matrix. The adjacency matrix of network G is denoted as A∈R. N×N Let R represent A as an N×N dimensional real matrix. When there is an edge between node i and node j, A... ij =1, otherwise A ij =0. The link prediction task aims to estimate the probability of the existence of unobserved or missing edges between node pairs using observed network topology and node attributes.

[0031] A motif refers to a small subgraph with a specific connection pattern that recurs in a complex network, exhibiting a significantly higher frequency than in random networks. Eight representative motif structures, each consisting of three or four nodes, are described. Motif structures can capture the interactions between multiple nodes, thereby enhancing the representation of complex network structures. Let M represent the set of motif structures considered within the framework of this invention. k ∈M represents a specific motif, and k represents the index of a certain motif type. Each motif is indexed by the number of nodes it contains and their order within that size. For example, M 32 This represents the second module among all three-node modules. This is used to construct a module-based adjacency matrix. Each of its elements ( ) ij Defined as node v i and v j Jointly participate in the phantom M k The number of times. For example, if node v i and v j In phantom M 32 The CCP has appeared three times, then ( ) ij =3.

[0032] Graph Neural Networks (GNNs) are a class of deep learning-based graph representation learning methods that aggregate structural and feature information from neighbors through a message-passing mechanism to update node representations. Formally, the representation of node v at layer l can be defined as: ; in, Let {v} represent the set of neighbors of node v, and {v} represent node v itself. AGG(·) represents the set of node v itself combined with N(v). This is to preserve the node's own characteristics when aggregating neighbor information, preventing its information from being washed away during message passing. AGG(·) is an aggregation function (such as sum, mean, or max), and W...(l) Let be the trainable weight matrix of the l-th layer, and σ(·) be the non-linear activation function. Let u represent the neighboring nodes of node v. This represents the node representation vector of neighbor node u at layer l-1. By stacking multiple layers of message passing and aggregation, GNN can effectively capture the local structural context of nodes, thereby generating more expressive node embeddings.

[0033] S2. A three-dimensional search space model is jointly constructed from a preset subgraph extraction strategy space, phantom structure space, and GNN encoding search space. The subgraph extraction strategy space contains M candidate subgraph extraction functions, the phantom structure space contains N candidate phantom structures, and the GNN encoding search space contains R candidate GNN encoders. The optimal combination model of subgraph extraction functions, phantom structures, and GNN encoders in the three-dimensional search space model is determined by sampling differentiable architecture search technology.

[0034] Traditional subgraph-based link prediction methods rely on fixed subgraph extraction and predefined motifs, making them unsuitable for diverse network structures. Fixed neighborhood radii may overlook key dependencies or introduce noise, while static motif templates and hand-designed GNN architectures limit flexibility and expressiveness. To overcome these limitations, this invention proposes the ASMS framework, which jointly optimizes subgraphs, motifs, and network architectures in a unified search space. By leveraging differentiable graph neural network architecture search, ASMS adaptively identifies the optimal combination of these components to capture high-order structural patterns and improve link prediction performance.

[0035] The overall framework of ASMS consists of three parts: (a) a subgraph-motif fusion framework, (b) construction of a joint search space, and (c) a joint search for link prediction. In component (a), closed subgraphs are adaptively collected for target node pairs, and corresponding adaptive motif adjacency matrices are constructed based on their adjacency structures. These matrices are then fused to obtain a comprehensive adjacency matrix. The adaptive encoder performs low-dimensional embedding learning on the closed subgraphs while iteratively updating the model weights using binary cross-entropy loss. In component (b), a unified search space is constructed, comprising nine subgraph extraction functions, eight motif adjacency matrix construction functions, and three GNN encoder functions. In component (c), the optimal combination obtained through the search process is used to perform the link prediction task.

[0036] The candidate subgraph extraction function is used to adaptively extract local structural context with differentiated neighborhood ranges from the global network, centered on the target node pair, thereby avoiding information redundancy or loss caused by fixed neighborhoods; the candidate motif structure is used to identify and quantify recurring higher-order connection patterns based on the local structural context, enhancing the perception of complex topological semantics; the candidate GNN encoder is used to predict the combined structure that integrates local structural context and higher-order connection patterns, improving representation learning ability.

[0037] like Figure 3 As shown, this invention uses the Cora dataset as an example to demonstrate the complete execution process of the ASMS adaptive link prediction framework. Its core lies in a search space-driven, multi-branch decision-making process: after data loading and sample partitioning, the framework uses three parallel learnable decision modules: an adaptive subgraph extraction function (determining the extraction range and method), a motif construction function (determining whether and how to use higher-order structures), and a GNN encoding function (determining the feature aggregation mechanism) for each target node. Subsequently, the system extracts closed subgraphs according to the selected strategy, constructs and merges the subgraph adjacency matrix and the motif adjacency matrix, generates a subgraph representation through a specified GNN encoder, and finally completes link prediction through pooling and a classifier. This process demonstrates how ASMS transforms a traditional fixed process into a structure-aware adaptive decision-making process to dynamically match the topological characteristics of different networks.

[0038] like Figure 3 The diagram illustrates the overall processing flow and information transmission path of the ASMS (Adaptive Subgraph-Motif Selection) framework constructed according to an embodiment of the present invention when performing a link prediction task. The diagram visually presents how, after determining the optimal component combination through a differentiable architecture search, the ASMS framework utilizes the selected optimal subgraph extraction function, optimal motif structure, and optimal GNN encoder to complete the end-to-end computation process for link prediction inference. Specifically, Figure 3 The six components in this process correspond sequentially to the instantiation and execution of the three-dimensional search space in the ASMS framework: the first part is the original input network G; the second part is the subgraph extraction function selected from the subgraph candidate space, used to extract the closed subgraph of the target node pair; the third part is to construct the subgraph adjacency matrix based on the closed subgraph to represent local low-order structural information; the fourth part is to construct the phantom adjacency matrix constructor selected from the phantom candidate space, used to construct the phantom adjacency matrix reflecting the high-order structural pattern; the fifth part is to fuse the phantom adjacency matrix with the subgraph adjacency matrix to form a combined adjacency matrix that integrates low-order and high-order information; the sixth part is the GNN encoding function selected from the encoding candidate space, which learns the vectorized representation of the subgraph based on the combined adjacency matrix and node features. Figure 4It clearly reveals how the ASMS framework transforms the joint search space of theory into operable computational steps, enabling adaptive fusion of multi-level information and efficient representation learning of graph structures.

[0039] Taking the Cora citation network as an example, the specific implementation process of the graph network link prediction method of the present invention is as follows: (1) Dataset loading and graph construction. An undirected and unweighted Cora citation network G=(V,E,X) is directly obtained from a public dataset, where X represents the original feature matrix of the citation network. Nodes V in this network represent academic papers, and edges E represent the citation relationships between papers, thus generating the adjacency matrix of the citation network G. Where N represents the number of papers in the network, and if there is an edge between paper m and paper n, then =1, if there is no edge between paper m and paper n, then =0. Furthermore, X∈ Let X represent the node feature matrix, where f is the dimension of the node features, N is the number of papers in the citation network, and R indicates that X is an N×f dimensional real matrix. A pair of non-directly connected paper nodes (m, n) is randomly selected as the target node pair to be predicted.

[0040] (2) Search Space Construction. For any two papers (m, n) in the citation network, a comprehensive search space is constructed, expressed as: ,in Choose a space for the subgraph. Choose a space for the phantom. The encoder search space contains nine subgraph extraction functions, denoted as: , The extraction function is defined as follows: `sub` represents the candidate space for subgraph search, and `i` and `j` represent the extraction of `i-hop` and `j-hop` closed subgraphs for the source node and target node, respectively. This represents the hop count combination for extracting closed subgraphs from source and target nodes. The motif extraction space contains eight motif extraction functions, denoted as... = The encoding space contains three types of GNN encoding functions, denoted as follows: ={ , , }. Learnable architectural weight parameters are introduced for each candidate operation using a differentiable architecture search technique. During the training phase, the temperature coefficient is used... The controlled Softmax function transforms the weights into selection probabilities. Based on these probabilities, the outputs of each candidate operation are weighted and fused to form a continuously differentiable forward propagation path. The weight parameters are then iteratively optimized using a gradient backpropagation algorithm. After training, the optimal combined model is obtained on the Cora dataset.

[0041] (3) Subgraph extraction and motif construction. A jump count extraction function is selected from the search space. Extract the i-hop neighborhood of source paper m and the j-hop neighborhood of target paper n to form a closed subgraph. Thus, the adjacency matrix of the subgraph is obtained. And select the modal adjacency matrix constructor from the search space. To construct the adjacency matrix of the triangular motif Considering the limitations of using only low-order adjacency matrices or only motif adjacency matrices—the former ignoring high-order semantic information and the latter ignoring low-order information contained in subgraphs—this invention combines the two into a comprehensive adjacency matrix, expressed as follows: This serves as the structural information for subsequent encoding input. For each node v in the closed subgraph, calculate its shortest path distances d(v,m) and d(v,n) to the target nodes m and n, respectively. Assign a unique label to each node according to the Double-Radius Node Labeling (DRNL) formula. The label calculation can be expressed as: The label of each node is converted into a one-hot vector and concatenated with the original node features to form a subgraph feature matrix.

[0042] (4) Differentiable architecture search and joint optimization. To achieve joint optimization of the three candidate subspaces, learnable weight parameters are introduced for each candidate operation. Operating temperature Controlling the softmax normalization weights: , This represents the probability that, within the search space of the current subgraph extraction module `sub`, the structural combination of using an `i`-hop subgraph for the source node `m` and a `j`-hop closed subgraph for the target node `m` is selected. Here, (i,j) represents the hop count combination of a candidate combination. ,j ) represents the hop count combinations of all candidates. To achieve continuous modeling of discrete architecture selection, learnable architecture parameters are introduced. This is used to characterize the model's preference strength for structural combinations constructed from the i-hop source subgraph and the j-hop target closed subgraph, through the softmax function. Normalization is performed to transform the discrete subgraph structure selection into a continuously differentiable probabilistic form. Among these, Represented as temperature Continuous relaxation under control. This invention describes the search process for the subgraph subspace; the search for the motif subspace and the architecture candidate space is similar. During training, continuous optimization of the subgraph, motif, and encoding function is achieved through weighted fusion of candidate operations.

[0043] (5) Optimal Architecture Application and Link Prediction. After the search phase, the candidate operation with the highest weight is selected as the optimal architecture: , The hop count is represented by the combination of hop counts for extracting closed subgraphs from the source and target nodes, and argmax is used to extract continuously learnable architectural parameters. The candidate substructure with the largest weight is selected as the final optimal subgraph structure. For any pair of target nodes (m, n), construct a fused adjacency matrix using the searched optimal architecture. The input is fed into the optimal two-layer GNN encoder for representation learning to obtain the subgraph representation. By aggregating the subgraph representation using max pooling, we obtain the representation of node pairs: The probability of link existence is predicted using a multilayer perceptron (MLP) classifier: (m,n)=MLP( ), This represents the target node pair. The probability value represents the area under the ROC curve. The model is then trained by minimizing the cross-entropy loss function. This invention can generate the AUC (Area Under the ROC Curve) and AUPR (Area Under the Precision-Recall Curve) metrics from the edge existence probability of target node pairs. The AUC metric represents the sum of the areas under the ROC curve, and the AUPR metric represents the sum of the areas under the Precision-Recall curve. They are used to evaluate the ability of the GNN encoder to distinguish between positive and negative samples and its performance in scenarios of positive-negative sample imbalance, respectively. Experimental results show that ASMS significantly outperforms traditional heuristic methods, embedding methods, and fixed-structure GNN methods on the Cora dataset.

[0044] To better capture the local and higher-order structural patterns of each network, subgraph-based link prediction typically extracts a fixed neighborhood for the entire network and encodes node features using a GNN. However, a fixed subgraph radius may miss important structural information or introduce noise. To address these issues, this invention proposes a unified modeling framework that integrates subgraph extraction, motif construction, and GNN encoding into a joint search space. This framework flexibly models the neighborhood range, introduces higher-order topological semantics, and effectively aggregates multi-level structural information. The optimal combination of these components can significantly improve representation performance and model generalization ability. Specifically, the framework comprises three main steps: first, adaptively extracting subgraphs for all target node pairs in the network; second, constructing a corresponding motif-based adjacency matrix for each subgraph and encoding its features using a GNN; and finally, calculating cross-entropy loss to optimize network parameters.

[0045] S3. Extract the closed subgraph of the target node pair using the subgraph extraction function of the optimal combination model. Generate a subgraph adjacency matrix based on the closed subgraph. Label the nodes in the closed subgraph with double radii to generate a subgraph feature matrix. Based on the subgraph adjacency matrix, construct a motif adjacency matrix using the motif structure of the optimal combination model. Fuse the subgraph adjacency matrix and the motif adjacency matrix to obtain a combined adjacency matrix. Encode the combined adjacency matrix and the subgraph feature matrix using the GNN encoder of the optimal combination model to generate a subgraph representation. Perform pooling processing on the subgraph representation to obtain the overall representation of the node pair. Process the overall representation of the node pair using a multilayer perceptron to obtain the edge existence probability of the target node pair. Use the edge existence probability to obtain the link connection relationship of the target graph network.

[0046] Extracting the adaptive subgraph of the target nodes for each target node pair in the original network G The embodiments of the present invention use a unified subgraph extraction function. This is used to obtain their closed subgraphs. Specifically, the function adaptively extracts the i-hop neighborhood of node m and the j-hop neighborhood of node n, and then combines them to form the final closed subgraph. This process can be formally represented as: ; Where G represents the original network, and m and n represent the source node and the target node, respectively. This indicates that the function takes the original network G as input and performs operations on a given node pair. Under the conditions of link prediction task. and Let i and j represent the subgraphs centered at nodes m and n, respectively. Subgraph extraction function. Shared across all target node pairs to ensure that each node pair is processed under the same extraction strategy.

[0047] To further capture the node pairs relative to the target node in the closed subgraph To assess the relative structural importance, this embodiment of the invention employs the Double-Radius Node Labeling (DRNL) method, assigning a unique label to each node. Without such labeling, the GNN may struggle to distinguish between two target nodes, leading to the loss of crucial structural information. Specifically, for any node v in a closed subgraph, its label is calculated using the following formula: ; in, This represents the function that takes the minimum value. and represents the shortest path distance from node v to target nodes m and n, respectively. The two target nodes themselves are assigned a fixed label of 1, while nodes outside the subgraph are labeled with 0. This labeling scheme encodes the relative structural roles of nodes in the subgraph, enabling the GNN to more effectively capture the topological relationships between target node pairs.

[0048] Based on the extracted closed subgraph This embodiment of the invention further derives the adjacency matrix A and the characteristic matrix X from the original graph G=(X,A). Let id represent... The set of indices of the nodes in the subgraph. Subgraph adjacency matrix. and characteristic matrix Defined as: ; Where id is the index of the subgraph node, This represents the features of the subgraph nodes extracted from the original feature matrix, used to represent the original features of the nodes in the subgraph. This represents the DRNL value of each node in the subgraph. || represents feature concatenation, used to concatenate the original features and DRNL values ​​of each node in the subgraph, resulting in a feature for each node in the subgraph. Therefore, the closed subgraph centered on the target node pair (m,n) is represented as... =( ), Used to represent feature information in a subgraph Used to represent the structural information of a subgraph.

[0049] While constructing a modal-based adjacency matrix can effectively capture local low-order topological information around a target node pair (m,n), relying solely on the low-order adjacency matrix often fails to distinguish the structural roles of nodes in higher-order patterns. This limitation may lead to homogenization of node representations, thereby reducing the discriminative power of potential link prediction. To enhance the representation capability of complex high-order topologies while retaining the advantages of subgraph neighborhood modeling, this embodiment of the invention is based on the original adjacency matrix of each closed subgraph. Construct a motif-based adjacency matrix. Specifically, use a motif adjacency construction function. (·) is used to fuse higher-order motif structures and generate a motif-based adjacency matrix. : ; in, The higher-order structural connections in the subgraph are encoded.

[0050] Using only low-order adjacency matrices It may not be able to capture high-order semantic structures. Instead, the motif adjacency matrix... Local details may be overlooked. Therefore, the two are added together to construct a combined adjacency matrix. : ; in, This represents a combined adjacency matrix that integrates low-order and high-order structural information.

[0051] The subgraph representation is learned through GNN encoding based on the constructed combinatorial adjacency matrix. and the corresponding feature matrix A two-layer GNN encoder is used to learn the structural and semantic representations of closed subgraphs. Formally, the subgraph representation... Defined as: ; in, (·) represents a two-layer GNN encoding function that aggregates node features under the guidance of low-order and high-order structure dependencies. This represents the subgraph embedding learned for the target node pair (m,n).

[0052] Subgraph representation Perform pooling operations to obtain the overall representation of the node pairs: ; Pool(·) represents the aggregation of node embeddings into a single vector. , is used to represent node pairs.

[0053] The probability of an edge existing Prediction is made using a multilayer perceptron (MLP) classifier: =MLP( ); In this context, MLP is used as a predictor to predict the probability of link existence. This represents the probability that there is an edge between nodes m and n.

[0054] To achieve joint optimization of subgraph extraction, motif construction, and GNN encoding, this embodiment of the invention designs a unified search space S, which consists of three key components: an adaptive subgraph extraction function... Module adjacency construction function and GNN encoding function Each component defines a set of candidate operations to capture different structural or semantic features of the network. Formally, the overall search space can be represented as: ; in, Represents the subgraph search space, controlling the neighborhood radius and subgraph extraction strategy; Represent the motif search space and determine the higher-order motif types used to enhance subgraph connectivity; The corresponding encoding search space specifies nodes that represent the message passing and aggregation operations learned.

[0055] 1) Search space for subgraph extraction function To adaptively capture neighborhood ranges and extraction strategies in different networks, embodiments of this invention define a subgraph extraction function search space. This space contains a set of candidate operations, each operation corresponding to a distinct (i,j)-hop combination of nodes m and n. Formalized as: ; Each of them Let represent a subgraph extraction function, where i and j represent the hop counts for extracting the closed subgraph from the source node and the target node, respectively. It combines the i-hop neighborhood of node m with the j-hop neighborhood of node n to form a closed subgraph. There are nine candidate subgraph extraction functions, each corresponding to an ordered combination of hop counts selected from the set {1,2,3} centered on the two nodes in the target node pair: (1,1), (1,2), (1,3), (2,1), (2,2), (2,3), (3,1), (3,2), and (3,3).

[0056] 2) Search space for motif adjacency construction functions To capture diverse higher-order topological semantics, the module adjacency construction function searches the space. It is designed to include eight classic motif types, covering three-node and four-node structures. Formal representation: = ; Each of them Indicates the corresponding specific motif type The module adjacency construction function. These modules include typical three-node patterns (such as triangles and three paths) and four-node patterns (such as 4-cluster, 4-loop, 3-star, 4-chain, 4-star, and tail triangle modules), which together enrich the higher-order structural representation of the subgraph.

[0057] 3) GNN encoding function search space To explore diverse subgraph representations and learn message passing and aggregation mechanisms, the GNN encoding function search space is employed. A set of candidate GNN layers with different structural properties is defined. Formalized as: ={ , , }; Each of them (·) denotes a specific type of GNN encoding layer. These candidate encoders differ in their message-passing strategies and aggregation mechanisms, providing complementary capabilities for structural and semantic representation learning. Furthermore, the search space of this embodiment is scalable, seamlessly accommodating more complex GNN architectures. Additional models can be introduced as plug-in components, while employing a simple and efficient GNN configuration to ensure clarity and computational efficiency.

[0058] In the joint optimization of link prediction, after constructing a unified search space, this embodiment of the invention employs a differentiable architecture search strategy to jointly optimize three key components. Each candidate operation in the three subspaces corresponds to a learnable architecture parameter α, and its importance coefficient π is calculated using a temperature-controlled softmax function, where the temperature is... : ; ; ; in, , and These represent the learnable architecture parameters for the corresponding candidate operations. This represents the probability of selecting the k-type phantom combination for each subgraph within the current motif search space. The motif represents the current probability within the search space of the phantom extraction module. The learnable weight parameters represent the strength of preference for constructing the k-type phantom structure. represents all candidate motif types, and k represents a candidate motif structure in the candidate combination. This represents the use of softmax to transform discrete structural choices into continuously differentiable forms. This represents the probability of selecting the l-type GNN encoder structure combination for each mixing matrix within the current GNN encoder search space, where GNN indicates that the current probability is within the search space of the GNN encoding module. The learnable weight parameters represent the strength of the preference for the l-type GNN encoder. Represents the types of all candidate GNN encoders, where l represents a candidate encoder from the candidate combinations. This means using softmax to transform discrete structures into continuously differentiable forms.

[0059] After training, the optimal architecture configuration is determined by selecting the candidate operation with the highest architecture weight. Formalized as: ; ; ; in, , and Let represent the optimal subgraph extraction function, phantom construction function, and GNN encoding function, respectively. Here, (i,j) represents the hop count combination of a candidate in the subgraph candidate space, (k) represents the phantom type of a candidate in the phantom candidate space, and (l) represents the encoder type of a candidate in the GNN encoder candidate space. This represents the optimal combination of hop counts for a given network. This represents the index of the selected optimal motif structure. This represents the selected optimal network architecture. Within the unified modeling framework, the optimal function obtained through the search is used as the final subgraph extraction, motif construction, and GNN encoding function, i.e. , , And used to learn the optimal subgraph representation. This enables adaptive integration and efficient modeling of multi-level structural information. argmax is used to extract information from continuously learnable architectural parameters. , , The candidate substructures with the largest weights are selected to determine the final optimal sub-candidate architecture.

[0060] After obtaining the optimal subgraph representation generated by the selected subgraph extraction, motif construction, and GNN encoding function, a link prediction classifier is trained by minimizing the cross-entropy loss: ; in, The set of node pairs (including positive and negative samples) in the training data. ∈{0,1} represents the true label. The predicted edge probability is represented by log, which is used to construct the binary cross-entropy loss to measure the difference between the edge probability predicted by the model and the true label.

[0061] In each iteration, the ASMS framework of this invention extracts an adaptive subgraph for each target node pair to obtain its subgraph adjacency matrix and node features. Subsequently, an adaptive motif adjacency matrix construction module generates a motif adjacency matrix matching the subgraph structural features, which is then merged with the original adjacency matrix to form a comprehensive adjacency matrix. Finally, the link prediction loss is calculated, and the weight parameters are optimized through backpropagation and gradient descent. After the pre-training phase, the framework continues to calculate the link prediction loss through multiple rounds of training and iteratively updates the parameters until the model converges.

[0062] To evaluate the effectiveness of the proposed method, experiments were conducted on nine benchmark network datasets, including Cora, Citeseer, PubMed, Chameleon, Wiki, Actor, Computers, Photo, and CS. Detailed statistical information for these datasets is summarized in Table 1.

[0063] 1) Citation networks include Cora, Citeseer, and PubMed. Nodes represent academic papers, and edges represent citation relationships between papers. Matrix node features are typically extracted by using a bag-of-words (BoW) or TF-IDF representation of the paper text content. Each node is associated with a predefined category label.

[0064] 2) The Wikipedia network includes Chameleon and Wiki. Nodes correspond to Wikipedia pages, and edges represent hyperlinks between pages. Node features are derived from the text content of the pages. The generated graph has a complex and highly heterogeneous structure.

[0065] 3) The co-occurrence network includes Actors. Nodes represent actors, and an edge is established between two actors if they both appear in the same movie. Node features are generated using Bag-of-Words (BoW) representation based on text descriptions from the IMDb dataset. This graph structure captures collaboration patterns in the film industry.

[0066] 4) The co-purchasing network includes Photo and Computers. Nodes represent products on the e-commerce platform, and edges represent two products that are frequently purchased together. This graph reflects user purchasing behavior and the relationships between products.

[0067] 5) Co-authorship networks refer to Computer Science (CS). Nodes represent researchers in the field of computer science, and edges represent relationships involving collaborative publications. Node features are derived from keywords extracted from their published papers to indicate research interests.

[0068] Table 1. Basic information of the 9 real datasets

[0069] This invention describes five representative baseline methods for comparison with ASMS. These methods include heuristic methods, embedding methods, graph neural network-based methods, subgraph representation learning-based methods, and motif representation learning methods.

[0070] Heuristic methods rely on statistical features of network topology for prediction. Common Neighbors (CN) measures the likelihood of an edge forming between two nodes by calculating the number of common neighbors. More common neighbors increase the probability of a connection. Resource Allocation (RA) evaluates the contribution of shared neighbors between two nodes. Common neighbors with lower degrees have a greater impact on the connection probability. Katz calculates node similarity based on the weighted sum of all paths connecting two nodes, thus capturing deeper potential relationships; however, its high computational complexity limits its scalability in large-scale networks. Heuristic methods depend on manually defined statistical features, lack learning capabilities, cannot adapt to different network structures, have limited expressive power, and struggle to capture complex semantic relationships.

[0071] Embedded methods learn node vector representations through random walks. DeepWalk generates node sequences by performing uniform random walks on the graph and uses the Word2Vec model to learn node embeddings. This method effectively captures local structural features and has good scalability, making it suitable for large-scale graph representation learning. Node2Vec, building on DeepWalk, introduces a flexible biased random walk strategy, balancing breadth-first and depth-first search behaviors. This allows for joint modeling of node structural roles and community affiliation, resulting in more expressive and informative node representations. Such methods typically perform walks across the entire graph, do not explicitly model the local structure of target node pairs for link prediction tasks, and cannot flexibly adapt to the topological differences of different networks.

[0072] Graph neural network-based methods learn node representations through message passing mechanisms. Among them, the Graph Convolutional Network (GCN) updates node representations by aggregating and transforming features of neighboring nodes at each layer. It effectively captures local structural information in the graph and is widely used in semi-supervised node classification and link prediction tasks. The Graph Attention Network (GAT) introduces an attention mechanism on top of GCN, adaptively assigning weights to different neighboring nodes to capture differences in neighbor importance, thus enhancing the model's expressive power and flexibility. Graph SAGE proposes a neighbor sampling and aggregation framework to achieve efficient representation learning on large-scale graphs, while also supporting inductive learning, enabling the model to generalize to unseen nodes. These methods typically operate on the entire graph, potentially introducing redundant information unrelated to the target link, and do not explicitly model high-order structural patterns, limiting their discriminative ability in complex topologies.

[0073] In existing technologies, subgraph-based representation learning methods construct subgraphs around target node pairs to conduct link prediction research. Among them, the SEAL method extracts closed subgraphs of target node pairs and uses graph neural networks to learn the internal structural patterns of the subgraphs, effectively improving the accuracy of link prediction. The LGLP method first transforms the original graph into a line graph (each edge in the line graph corresponds to a node), then constructs a subgraph around the nodes corresponding to the target nodes in the line graph, and uses GNNs to learn edge representations, transforming the link prediction task into a binary classification problem. The PS2 method introduces a personalized subgraph selection mechanism, adaptively selecting the most informative structural perspective for each target node pair, thereby enhancing the expressive power and robustness of the link prediction model. However, most of these methods employ fixed subgraph extraction strategies (such as fixed neighborhood hop counts), making it difficult to adaptively adjust the neighborhood range according to differences in network density and node distribution. Furthermore, they generally ignore high-order motif structural information, limiting the model's adaptability to complex network topologies.

[0074] Motif-based representation learning methods enhance high-order semantic modeling by introducing motif structures: MGNN integrates various motif structures into a neighborhood aggregation framework, effectively combining node representations from different motif perspectives through motif redundancy minimization operators and injection-based combination functions, thereby improving the model's ability to capture high-order structural patterns and optimizing prediction performance; MD-GCN designs a multi-level graph convolutional architecture, performing convolution operations on both the original graph and the motif-guided graph, achieving effective fusion of low-order and high-order structural semantics, thus improving the accuracy and robustness of link prediction. However, these methods typically rely on predefined motif types, lack the ability to adaptively select the optimal motif based on different network topology characteristics, and do not perform joint optimization with subgraph extraction strategies, resulting in limited generalization performance.

[0075] In summary, existing methods generally suffer from "rigid configuration" in subgraph extraction, motif selection, and network architecture design, making it difficult to adapt to diverse network structures. In contrast, the ASMS framework proposed in this invention constructs a unified three-dimensional search space and employs differentiable architecture search technology to achieve adaptive joint optimization of subgraph extraction strategies, motif structure types, and GNN encoders, thereby significantly improving the generalization ability and robustness of link prediction.

[0076] The experiments in this embodiment of the invention were conducted on an NVIDIA RTX A6000 GPU. The learning rate was set to 0.001, and the output dimension of all methods was 128. This embodiment of the invention uses a two-layer GCN to learn node representations. Each dataset was independently split 50 times to reduce the bias caused by random splitting, and the average results were reported.

[0077] To comprehensively evaluate the performance of the link prediction model, this embodiment of the invention uses the area under the receiver operating characteristic curve (AUC) and the area under the precision-recall curve (AUPR) as the main evaluation metrics. AUC is used to evaluate the ability to distinguish between positive and negative samples at different decision thresholds. A higher value indicates a stronger ability of the model to distinguish between present and non-present edges. AUC is calculated based on the relationship between the true positive rate (TPR) and the false positive rate (FPR), and is defined as follows: ; ; in, , , and These represent true positives, false positives, false negatives, and true negatives, respectively. The variable θ represents the decision threshold used to classify the prediction as either positive or negative. Indicates the area under the ROC curve. Calculated using the following formula: ; AUPR emphasizes the trade-off between precision and recall at different thresholds, and is particularly suitable for tasks with a high imbalance between positive and negative samples. Its definition is as follows: ; ; The area under the precision-recall (PR) curve is obtained by the following formula: ; Where TP, FP, and FN represent true positives, false positives, and false negatives, respectively, and θ represents the decision threshold used for classification prediction results.

[0078] Table 2. AUC results comparing ASMS with baseline methods

[0079] To comprehensively evaluate the performance of the proposed ASMS method, this embodiment of the invention conducted comparative experiments with thirteen baseline methods on nine public datasets. Each dataset was randomly divided into a training set (80%), a validation set (10%), and a test set (10%), and the experiments were repeated 50 times to ensure the stability of the results. The results summarized in Tables 2 and 3 show that ASMS achieved the best performance on all datasets except Citeseer, where "-" indicates no results. This demonstrates its effectiveness and generalization ability.

[0080] Graph neural networks typically possess stronger expressive power because they learn node representations through neighborhood aggregation. However, since these methods operate across the entire graph, they often introduce redundant information unrelated to the target link, thus reducing prediction accuracy. Subgraph-based link prediction methods construct local structures around the target node pair, enabling more targeted relationship modeling. Some methods further integrate motif-based adjacency matrices to introduce higher-order structural information. However, their dependence on predefined motifs limits adaptability and results in unstable performance on graphs with sparse or heterogeneous motif distributions.

[0081] Table 3. AUPR results comparing ASMS with the baseline method.

[0082] Compared to traditional heuristics, ASMS exhibits stronger robustness on structurally complex graphs. This suggests that strategies based on fixed similarity metrics cannot capture the underlying structural relationships within networks. While embedded-based methods can capture some structural and semantic information through random walks and contextual learning, their performance in link prediction tasks remains limited due to the lack of modeling mechanisms for node pairs.

[0083] ASMS introduces an adaptive mechanism based on local structural features. It can dynamically select the subgraph neighborhood range and motif combination, flexibly adjusting the modeling strategy for each node pair. This mechanism effectively captures high-order semantic relations while reducing redundant noise, thereby improving representational power and generalization performance.

[0084] Table 4 summarizes the subgraph neighborhoods, motif structures, and network architectures selected by ASMS for each dataset, showing significant differences. Citeseer prefers asymmetric hop counts [1,3] and selects motif M. 43 More regular networks like Cora and CS prefer symmetric hop counts [2,2] and choose motif M. 32The choice of encoder also varies, including combinations of SAGE (GraphSAGE), GCN, and GAT, reflecting the heterogeneous requirements of structural modeling. These results highlight the importance of targeted structural configurations and validate the effectiveness of joint search of subgraph neighborhoods, motifs, and encoders.

[0085] Table 4. Results of optimal combinations searched using GraphNAS on different datasets.

[0086] To evaluate the effectiveness and robustness of the proposed method under limited training data, this embodiment of the invention randomly sampled 30%, 40%, 50%, 60%, 70%, and 80% of the edges from the original network as the training set, with the remaining edges used for validation and testing of the AUC and AUPR metrics. This embodiment of the invention analyzed the model's performance under different training ratios, comparing ASMS with three representative baseline methods, and the results are as follows: Figure 5 As shown, this invention was tested on nine datasets. ASMS demonstrated strong robustness across different training ratios, consistently outperforming other methods even with limited training data. On the Citeseer dataset, MD-GCN's AUC was slightly higher than ASMS. This is likely because the sparsity of the Citeseer graph limits the diversity of higher-order motifs in local subgraphs. MD-GCN models motifs at the global level and employs multi-layer convolutions, making it more effective at capturing global semantic structure.

[0087] like ​As shown, this invention was tested on nine datasets. ASMS achieved the best performance on AUPR, demonstrating its stronger ability to identify key edges even with uneven sample distribution. With increasing training ratio, the available structural information becomes richer, and the performance of each method improves. PS2 and LGLP showed relatively stable performance on most datasets. However, these two methods rely solely on subgraph structure and do not explicitly introduce higher-order motif information, which limits their performance on complex graphs. In contrast, ASMS combines adaptive subgraph neighborhood with higher-order motif modeling, effectively mitigating semantic loss and representation bias in traditional subgraph learning. ASMS achieved superior performance under various training configurations. This invention provides an in-depth analysis of the role of motif structure in link prediction. Robustness analysis results show that when the training ratio is low, ASMS only achieves marginal improvement compared to other models. However, when the training ratio increases to 80%, ASMS exhibits a significant performance advantage. This observation suggests that the coverage of motif information may have a significant impact on model performance. Since motif extraction relies on structural information in the training graph, limited training data reduces the number of available motifs, which further limits the ability to capture rich structural patterns.

[0088] To verify this hypothesis, this embodiment of the invention fixes the training ratio at 80% and introduces a phantom ratio r to control the construction of the phantom adjacency matrix. Used at time Number of type motifs. Specifically, if the training graph contains | | For a given type of motif, the motif proportion r∈[0,1] corresponds to randomly selecting r| from it. | Use a mod to construct The embodiments of the present invention evaluated a variety of settings, including r=0, r=0.2, r=0.4, r=0.6, r=0.8, and r=1.0, where r=1.0 indicates the use of all available phantoms, and r=0 indicates the introduction of no higher-order phantom structures.

[0089] Experimental results show that link prediction performance gradually improves with increasing motif numbers. Specifically, when r=1.0, all available motifs are used, and the model achieves the highest performance, indicating that richer motif information provides stronger structural signals, thus enhancing link prediction capabilities. In contrast, when r=0, no higher-order motif structures are introduced, resulting in the lowest performance, further validating the crucial role of higher-order motifs in improving link prediction accuracy. For example, on the Cora dataset, increasing the motif ratio from 0.2 to 1.0 increases the AUC from 91.02 to 92.71, demonstrating the complementary role of motif structures in capturing complex network relationships. However, on datasets such as Chameleon, CS, and Photo, a lower motif ratio r=0.2 sometimes performs slightly worse than r=0, possibly due to the heterogeneity or structural irregularities of these graphs. When only a small number of motifs are introduced, sampling motifs may introduce unstable or biased higher-order signals, temporarily affecting learning performance. Only when the motif ratio is sufficiently high can higher-order structural semantics be fully utilized. Furthermore, when training data is limited or graph structures are sparse, reasonable phantom design and appropriate scaling are crucial for enhancing structure perception and generalization capabilities.

[0090] In this dataset, 80% of the links were randomly selected for training, with the remainder used for validation and testing. Comparative analysis on nine public datasets demonstrated that the joint application of adaptive subgraphs, adaptive motif structures, and adaptive encoder modules significantly improves link prediction performance. Using fixed subgraph neighborhoods (without adaptive motifs) ignores differences in structural complexity and semantic patterns across different networks, potentially introducing redundant information or missing key semantics, thus weakening subgraph representation capabilities and reducing performance. Furthermore, fixed neighborhoods lack adaptability to diverse network structures, limiting the model's generalization and robustness. Experimental results show that the model equipped with adaptive subgraph neighborhoods consistently achieves better results compared to variants without adaptive subgraph strategies (e.g., without motifs).

[0091] Different motif structures emphasize different aspects of higher-order semantic relations in the graph. To evaluate the contribution of each motif type to higher-order semantic modeling, ablation experiments were conducted in this embodiment of the invention, sequentially removing each motif from the search space. The results show that a single fixed motif is generally insufficient to capture the heterogeneity of the real graph, highlighting the importance of adaptive motif selection in improving generalization and expressiveness. Models using fixed motif structures perform relatively poorly, possibly due to the over-prevalence of certain motifs, leading to structural redundancy and semantic noise, thereby reducing generalization ability. However, most fixed motifs still outperform variants without motif modeling, indicating that introducing higher-order motifs can enhance the expressiveness and predictive performance of subgraph structures. Similarly, models using fixed encoders generally perform worse than models using adaptive encoding strategies, indicating that static feature extraction cannot adequately capture the diversity and semantic variability of subgraph structures, thus limiting expressiveness and generalization ability.

[0092] Different datasets exhibit significant differences in structural density and connectivity, leading to varying requirements for subgraph neighborhood depth, motif structure, and encoder configuration. Compact or highly connected graphs tend to select shallower neighborhoods, indicating that local structural information is sufficient and further aggregation may introduce redundancy. Conversely, sparse or highly heterogeneous graphs tend to select deeper neighborhoods to enhance structural representation. Regarding motif structure, a single motif may weaken the capture of key semantics due to redundancy, while more discriminative motifs perform well on multiple datasets, further validating the necessity of motif adaptation. In terms of encoder selection, the adaptive encoder dynamically selects the most suitable aggregation mechanism based on subgraph characteristics, effectively extracting semantic information. Overall, the synergistic optimization of adaptive subgraph neighborhood, motif structure, and encoder can significantly improve generalization and representation capabilities on diverse graph datasets.

[0093] This invention proposes a novel link prediction framework, ASMS, based on adaptive subgraph and motif structure search. ASMS constructs a unified search space encompassing subgraph neighborhood, motif structure, and neural network architecture. Through a differentiable architecture search strategy, the discrete search space is transformed into a continuous space, thereby efficiently identifying the optimal structure combination. In addition to utilizing low-order topological information, ASMS also integrates high-order motif structures to guide the message passing process of the GNN, thus learning more discriminative node representations and mitigating the oversmoothing problem caused by structural similarity. Experimental results based on nine benchmark datasets demonstrate that ASMS exhibits excellent robustness and generalization ability.

[0094] This invention proposes an Adaptive Subgraph-Motif Selection (ASMS) framework, aiming to determine a globally optimal configuration for the entire network. ASMS enhances its ability to capture complex topological structures and high-order semantic relationships. Specifically, ASMS constructs a search space containing multiple candidate components and collaboratively optimizes these components through a differentiable architecture search strategy. During training, the framework dynamically adjusts component weights and fuses the subgraph adjacency matrix with the motif adjacency matrix, thereby effectively capturing low-order and high-order structural information. Finally, ASMS automatically selects the optimal combination for each network, significantly improving link prediction performance. The main contributions of this invention are summarized as follows: 1. This invention proposes an innovative ASMS framework, which constructs a unified search space encompassing subgraph neighborhoods, motif structures, and network architectures. By mapping the discrete search space to continuous differentiable parameters, ASMS enables efficient search for differentiable architectures, thereby enhancing automated optimization capabilities.

[0095] 2. This invention integrates adaptive high-order motif structures into subgraph modeling by dynamically selecting motifs suitable for different network topologies. By fusing low-order adjacency matrices with motif-based adjacency matrices, this framework effectively captures both low-order and high-order topological information, thereby improving node representation and model expressiveness in link prediction tasks.

[0096] 3. This invention evaluates ASMS on multiple publicly available datasets from various domains and compares it with state-of-the-art baseline methods. The results show that this method offers a significant performance improvement in link prediction tasks, demonstrating strong generalization and adaptability across diverse network architectures.

[0097] Based on the same inventive concept, this invention also provides a link prediction system for graph networks, comprising: The data acquisition module is used to collect network connection information of the target graph network and use the network connection information to determine the target node pairs whose link connection relationship needs to be predicted; the network connection information includes the set of nodes in the network, the set of edges of connected nodes, and the node feature matrix.

[0098] The model building module is used to jointly construct a three-dimensional search space model from a preset subgraph extraction strategy space, phantom structure space, and GNN encoding search space. The subgraph extraction strategy space contains M candidate subgraph extraction functions, the phantom structure space contains N candidate phantom structures, and the GNN encoding search space contains R candidate GNN encoders. The optimal combination model of subgraph extraction functions, phantom structures, and GNN encoders in the three-dimensional search space model is determined by sampling differentiable architecture search technology.

[0099] The model prediction module is used to extract closed subgraphs of target node pairs using the subgraph extraction function of the optimal combination model, generate a subgraph adjacency matrix based on the closed subgraph, label the nodes in the closed subgraph with double radii, and generate a subgraph feature matrix. Based on the subgraph adjacency matrix, a motif adjacency matrix is ​​constructed using the motif structure of the optimal combination model. The subgraph adjacency matrix and the motif adjacency matrix are fused to obtain a combined adjacency matrix. The combined adjacency matrix and the subgraph feature matrix are encoded using the GNN encoder of the optimal combination model to generate a subgraph representation. The subgraph representation is pooled to obtain a total representation of the node pairs. The total representation of the node pairs is processed by a multilayer perceptron to obtain the edge existence probability of the target node pairs. The link connection relationship of the target graph network is obtained using the edge existence probability.

[0100] This invention also provides a computer device. At the hardware level, the computer device includes a processor, an internal bus, a network interface, memory, and non-volatile memory, and may also include other hardware required for various services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the link prediction method for graph networks provided above.

[0101] The present invention also provides a computer-readable storage medium storing a computer program that can be used to execute the link prediction method for graph networks provided above.

[0102] For specific limitations on the computational system of the link prediction method for graph networks, please refer to the limitations on the link prediction method for graph networks mentioned above, which will not be repeated here. Each module in the above-mentioned link prediction system for graph networks can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independent of the processor in a computer device, or stored in software in the memory of a computer device, so that the processor can call and execute the corresponding operations of each module.

[0103] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. Furthermore, the above embodiments only illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for link prediction of a graph network, characterized in that, The application relates to a method for predicting link connection relationships in a target graph network. The method comprises the following steps: Collecting network connection information of the target graph network, and determining a target node pair requiring a predicted link connection relationship by using the network connection information; The network connection information comprises a node set in the network, an edge set of connected nodes and a node feature matrix; A three-dimensional search space model is jointly constructed by using a preset subgraph extraction strategy space, a motif structure space and a GNN encoding search space; the subgraph extraction strategy space comprises M candidate subgraph extraction functions, the motif structure space comprises N candidate motif structures, and the GNN encoding search space comprises R candidate GNN encoders; An optimal combination model of the subgraph extraction function, the motif structure and the GNN encoder in the three-dimensional search space model is determined by using a sampling differential architecture search technology; A closed subgraph of the target node pair is extracted by using the subgraph extraction function of the optimal combination model, a subgraph adjacency matrix is generated based on the closed subgraph, double-radius node labeling is performed on the nodes in the closed subgraph, and a subgraph feature matrix is generated; A motif adjacency matrix is constructed by using the motif structure of the optimal combination model based on the subgraph adjacency matrix, and a combined adjacency matrix is obtained by fusing the subgraph adjacency matrix and the motif adjacency matrix; The combined adjacency matrix and the subgraph feature matrix are encoded by using the GNN encoder of the optimal combination model to generate a subgraph representation; the node pair overall representation is obtained by performing pooling processing on the subgraph representation, the edge existence probability of the target node pair is obtained by processing the node pair overall representation through a multilayer perceptron, and the link connection relationship of the target graph network is obtained by using the edge existence probability.

2. The method of link prediction of a graph network according to claim 1, wherein, The method for determining the optimal combination model of the subgraph extraction function, the motif structure and the GNN encoder in the three-dimensional search space model by using the sampling differential architecture search technology comprises the following steps:

3. The method of link prediction of a graph network according to claim 1, wherein, A learnable architecture weight parameter is assigned to each candidate component in the subgraph extraction strategy space, the motif structure space and the GNN encoding search space; in the training stage of the three-dimensional search space model, the architecture weight parameter of each candidate component is converted into a corresponding selection probability by using a temperature coefficient controlled Softmax function; the outputs of the candidate components are weighted and fused to form a continuous and differential forward propagation path according to the selection probability; the architecture weight parameter is iteratively optimized by using a gradient back propagation algorithm; and when the iteration number reaches a preset value, the candidate components with the maximum architecture weight parameter value in the three spaces are selected to form the optimal combination model. The M candidate subgraph extraction functions are used for adaptively extracting local structure contexts with different neighborhood ranges from the global network centering on the target node pair; the N candidate motif structures are used for identifying and quantifying repeatedly appearing high-order connection modes on the basis of the local structure contexts; and the R candidate GNN encoders are used for predicting the combined structure fused with the local structure contexts and the high-order connection modes.

4. The method of link prediction of a graph network according to claim 1, wherein, The M candidate subgraph extraction functions are specifically 9, and i and j in each combination (i, j) are independently selected from the set {1, 2, 3}, representing the neighborhood extraction radius starting from two nodes in the target node pair; the N candidate motif structures are specifically 8, covering 3-node motifs and 4-node motifs; the 3-node motif includes a triangular motif and a three-path motif, and the 4-node motif includes a 4-clique motif, a 4-cycle motif, a 3-star motif, a 4-chain motif, a 4-star motif and a tail triangle motif; the R candidate GNN encoders are specifically 3, which are a GCN encoder, a GAT encoder and a GraphSAGE encoder; wherein M, N and R decrease in turn.

5. The method of link prediction of a graph network according to claim 1, wherein, The motif adjacency matrix is constructed based on the subgraph adjacency matrix and the motif structure of the optimal combination model, specifically including: counting the number of times each element in the subgraph adjacency matrix participates in the optimal motif structure, and taking the number of times as the element value of the corresponding position in the motif adjacency matrix, and the motif adjacency matrix is composed of all elements.

6. The method of link prediction of a graph network according to claim 1, wherein, The subgraph adjacency matrix is generated based on the closed subgraph, specifically including: extracting the connection relationship of the internal nodes of the closed subgraph to generate the subgraph adjacency matrix; the nodes in the closed subgraph are double-radius node labeled to generate the subgraph feature matrix, specifically including: calculating the shortest path distance of any node v in the closed subgraph to the two nodes in the target node pair, assigning a unique label to the node v based on the shortest path distance, and generating a subgraph feature matrix based on the label and the node feature matrix, wherein the labels of the two nodes in the target node pair are fixed as 1, and the labels of the nodes outside the closed subgraph are 0; the subgraph adjacency matrix and the motif adjacency matrix are fused to obtain a combined adjacency matrix, specifically including: adding the elements of the subgraph adjacency matrix and the motif adjacency matrix to obtain a combined adjacency matrix that integrates low-order and high-order structure information.

7. The method of link prediction of a graph network according to claim 1, wherein, Further comprising: The AUC index and the AUPR index are generated by the edge existence probability of the target node pair, the AUC index is used to evaluate the ability of the GNN encoder to distinguish positive and negative samples of the target node pair, and the AUPR index is used to evaluate the performance of the GNN encoder in the positive and negative sample quantity imbalance scenario.

8. A link prediction system of a graph network, characterized in that, Comprising: A data acquisition module is configured to acquire network connection information of a target graph network, and determine a target node pair for which link connection relationship needs to be predicted based on the network connection information; The network connection information includes a node set in the network, an edge set of connected nodes and a node feature matrix; A model construction module is configured to jointly construct a three-dimensional search space model from a preset subgraph extraction strategy space, a motif structure space and a GNN encoding search space; the subgraph extraction strategy space contains M candidate subgraph extraction functions, the motif structure space includes N candidate motif structures, and the GNN encoding search space includes R candidate GNN encoders; An optimal combination model of the subgraph extraction function, the motif structure and the GNN encoder in the three-dimensional search space model is determined by a sampling differentiable architecture search technology. The model prediction module is configured to extract a closed subgraph of the target node pair by using a subgraph extraction function of the optimal combination model, generate a subgraph adjacency matrix based on the closed subgraph, perform double-radius node labeling on the nodes in the closed subgraph, and generate a subgraph feature matrix; Based on the subgraph adjacency matrix, a motif adjacency matrix is constructed by using a motif structure of the optimal combination model, and the subgraph adjacency matrix and the motif adjacency matrix are fused to obtain a combined adjacency matrix; The GNN encoder of the optimal combination model is used to encode the combined adjacency matrix and the subgraph feature matrix to generate a subgraph representation, the subgraph representation is subjected to pooling processing to obtain a node pair overall representation, the node pair overall representation is processed by a multilayer perceptron to obtain an edge existence probability of the target node pair, and the link connection relationship of the target graph network is obtained by using the edge existence probability.

9. A computer device comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program comprises instructions that, when executed by the processor, cause the processor to perform the method of any one of claims 1-8. The processor executes the computer program to implement the steps of the method of any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program can implement the steps of the method of any one of claims 1 to 7 when loaded by the processor.

Citation Information

Patent Citations

  • Searching method and device of multi-task graph architecture, behavior prediction method and product

    CN116739053A

  • Graph neural network optimal architecture construction method and system

    CN118536542A

  • Ensemble learning method based on evolutionary graph neural architecture search and application of ensemble learning method in graph mining

    CN120218165A

  • System and method for structure learning for graph neural networks

    US20220101103A1