A selective graph representation learning method and system based on root connected evidence subgraph beam search
Patent Information
- Application Number
- CN202611102829.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-10-09
AI Technical Summary
(1)固定邻域聚合在早期即混合所有邻居信息,容易把关键局部结构与无关背景结构混合,导致判别性子结构被稀释
(1)相较于标准消息传递图神经网络,本发明不再无条件聚合固定邻域,而是先选择紧凑连通证据子图,再对所选子图编码预测,因此能够减少无关背景节点对关键局部结构的早期污染。
Smart Images

Figure CN122889084A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of graph data processing technology, and in particular to a selective graph representation learning method and system based on root-connected evidence subgraph bundle search. Background Technology
[0002] Graph-structured data is widely found in scenarios such as molecular structures, biological interaction networks, knowledge graphs, social networks, and citation networks. The core objective of graph representation learning is to map nodes, edges, and their local or global structural relationships into numerical representations that can be used for classification, regression, retrieval, or prediction. Current mainstream approaches are based on message-passing graph neural networks. The basic idea is that each node aggregates the features of its neighboring nodes over several iterative layers, thus forming a node representation that includes local neighborhood information. This idea is related to the Weissfeller-Lyman graph isomorphic refinement paradigm, but neural network implementations typically compress the neighborhood multiset into a single continuous vector.
[0003] However, in real-world tasks, graph labels or node labels are often determined by small local structures, functional groups, network roles, or pattern subgraphs, while the complete neighborhood contains a large number of nodes and edges irrelevant to the current prediction. If the model does not distinguish between relevant and irrelevant neighbors, the discriminative signal may be mixed into the background structure at a shallow level, thereby reducing accuracy, robustness, and interpretability.
[0004] To address this, researchers have proposed several improvement schemes from different perspectives. The first category is standard message-passing graph neural networks, including graph convolutional networks, graph isomorphic networks, and inductive graph representation learning networks. Graph convolutional networks propagate neighbor features using normalized averaging, graph isomorphic networks enhance counting sensitivity through summation aggregation, and inductive graph representation learning networks can employ aggregation operators such as max pooling. Their common feature is unconditionally aggregating neighbors according to predefined neighborhood rules. The second category is attention-based graph learning and pooling methods. These methods assign weights to neighborhood information through edge attention or node scores, or retain a subset of nodes with higher scores. Their advantage is the introduction of selectivity, but this selection is usually still embedded in continuous aggregation or coarsening processes, lacking explicit connectivity evidence subgraph construction. The third category is predefined subgraph representation learning methods. These methods elevate nodes or graphs into several local subgraphs and encode them, such as fixed-radius root subgraphs, node-deleted subgraphs, edge-deleted subgraphs, or sets of subgraphs with node labels. Its advantage is enhanced graph representation capabilities, but subgraphs are generated by fixed rules and are not actively searched for based on individual samples or downstream tasks. The fourth category is graph neural network interpretation methods. These methods typically search for substructures that support predictions from a pre-trained predictor, belonging to a post-hoc interpretation mechanism.
[0005] In summary, the existing technology has the following main drawbacks: (1) Fixed neighborhood aggregation mixes all neighbor information in the early stage, which can easily mix key local structures with irrelevant background structures, resulting in the dilution of discriminative substructures.
[0006] (2) Attention weights and node pooling are usually soft selections or coarsening selections, making it difficult to form a connected evidence subgraph that can be directly checked.
[0007] (3) Fixed subgraph templates cannot adjust the expansion path according to different samples and different prediction targets, and lack flexibility when generalizing to heterogeneous graphs, molecular graphs or complex networks.
[0008] (4) The ex post interpretation method is separated from the prediction model, and the interpretation subgraph is not necessarily the input that the model actually uses for prediction.
[0009] (5) Existing solutions usually design structures for node classification or graph classification respectively, which lacks uniformity. Summary of the Invention
[0010] In view of this, the present invention provides a selective graph representation learning method and system based on root-connected evidence subgraph bundle search, which aims to predict the selected subgraph by using independent evidence subgraph encoders and classifiers to avoid unconditional aggregation of fixed neighborhoods; at the same time, it supports target root node search in node-level tasks, as well as multi-root node search and evidence aggregation in graph-level tasks.
[0011] This invention provides a selective graph representation learning method based on root-connected evidence subgraph bundle search, comprising: determining a root node based on the obtained molecular graph and node feature matrix of the molecule to be predicted; starting from the root node, maintaining multiple candidate evidence subgraph states using bundle search, and constructing a set of connected nodes as evidence subgraphs by progressively expanding the leading nodes, wherein the leading nodes are nodes adjacent to any node in the current evidence subgraph and not yet included in the current evidence subgraph; in each expansion step, scoring the current state and / or the new state after expansion through a policy network, and selecting to execute a stop action or select a node from the leading nodes to add to the current evidence subgraph based on the score; repeating the expansion until a preset stop condition is met to obtain at least one terminal evidence subgraph; encoding the terminal evidence subgraph to obtain an evidence subgraph embedding vector; and outputting the molecule category prediction result and the connected evidence subgraph supporting the molecule category prediction result based on the evidence subgraph embedding vector.
[0012] Optionally, determining the root node based on the obtained molecular graph and node feature matrix of the molecule to be predicted includes: converting the molecule to be predicted into graph structure data to obtain a molecular graph and a node feature matrix, wherein nodes in the molecular graph represent atoms, edges in the molecular graph represent chemical bonds between atoms, and each row in the node feature matrix corresponds to a feature vector of an atom; selecting one or more atoms from the molecular graph as root nodes according to atom degree, atom type, centrality, random sampling, neighborhood rules, or a learnable root node selection network.
[0013] Optionally, the method of maintaining multiple candidate evidence subgraph states using bundle search includes: maintaining multiple candidate evidence subgraph states with a width of B for each root node as the current active bundle; in each round of expansion, performing legal stop and add actions on each candidate evidence subgraph state in the current active bundle to generate new candidate states, and moving stopped or maximum-scale candidate states into the completion pool; sorting all newly generated incomplete candidate states according to cumulative scores, and retaining the B candidate states with the highest scores as the active bundle for the next round; after all root node searches are completed, selecting several terminal evidence subgraphs from the global completion pool according to a scoring function, where the scoring function is the cumulative policy probability, classification confidence, or the interval between the largest and second-largest categories.
[0014] Optionally, the step of scoring the current state and / or the expanded new state through the policy network, and selecting to execute a stop action or select a node from the frontier nodes to add to the current evidence subgraph based on the score, includes: encoding the current state to obtain a root center state representation, and outputting a stop action score by the policy network; encoding the new state formed after each candidate frontier node is added to the current evidence subgraph, and outputting an addition action score for that frontier node by the policy network; normalizing the stop action score with all legal addition action scores to obtain an action probability; and sampling or selecting the action with the highest score to execute based on the action probability.
[0015] Optionally, the stopping conditions include: the size of the current evidence subgraph reaches a preset maximum size threshold, or the policy network selects a stop action and the size of the current evidence subgraph has reached a preset minimum size threshold.
[0016] Optionally, encoding the terminal evidence subgraph to obtain the evidence subgraph embedding vector includes: taking the induced subgraph and corresponding node features of each terminal evidence subgraph in the original subgraph, and adding a root node binary label; based on the root node binary label, encoding the induced subgraph using an evidence subgraph encoder to obtain the evidence subgraph embedding vector.
[0017] Optionally, the step of outputting the molecular category prediction result and the connected evidence subgraph supporting the molecular category prediction result based on the evidence subgraph embedding vector includes: when selecting more than one atom as a root node from the molecular graph, generating one or more terminal evidence subgraphs for each root node; aggregating the evidence subgraph embedding vectors of all terminal evidence subgraphs through a permutation-invariant aggregation method to obtain a molecular-level representation, wherein the permutation-invariant aggregation method is at least one of mean, summation, maximum value, logarithmic summation exponent, attention pooling, or gated pooling; and based on the molecular-level representation, the classifier outputs the molecular category prediction result and simultaneously outputs one or more connected evidence subgraphs supporting the molecular category prediction result.
[0018] In another aspect, the present invention provides a selective graph representation learning system based on root-connected evidence subgraph bundle search, comprising: a graph data input module for acquiring a molecular graph and node feature matrix of a molecule to be predicted; a root node selection module for determining a root node based on the acquired molecular graph and node feature matrix of the molecule to be predicted; a bundle search module for maintaining multiple candidate evidence subgraph states starting from the root node; a state encoding module for encoding the current evidence subgraph or the expanded new state to obtain a root center state representation; a strategy scoring module for outputting a stopping action score and an joining action score for each frontier node based on the root center state representation; and an evidence subgraph expansion module for outputting the results from the strategy scoring module. The score determines whether to execute a stop action or select a node from the leading nodes to add to the current evidence subgraph, progressively expanding the constructed set of connected nodes as evidence subgraphs, repeating the expansion until a preset stopping condition is met, resulting in at least one terminal evidence subgraph; an evidence subgraph encoding module is used to encode the terminal evidence subgraphs to obtain evidence subgraph embedding vectors; an aggregation prediction module is used to output molecular category prediction results and connected evidence subgraphs supporting the molecular category prediction results based on the evidence subgraph embedding vectors; an evaluation module is used to calculate the structural intersection-union ratio difference, counterfactual deletion confidence difference, sufficiency, root feature occlusion sufficiency, and effective node ratio to verify the structural alignment, fidelity, and compactness of the evidence subgraphs.
[0019] In another aspect, the present invention provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, performs the steps of the method as described in any of the preceding claims. In another aspect, the present invention provides a computer storage medium storing a computer program that, when executed by a processor, implements the steps of the method as described in any of the preceding claims.
[0020] Compared with the prior art, the present invention has the following beneficial effects: (1) Compared with standard message passing graph neural networks, this invention no longer unconditionally aggregates fixed neighborhoods, but first selects compact connected evidence subgraphs and then encodes and predicts the selected subgraphs, thus reducing the early pollution of key local structures by irrelevant background nodes.
[0021] (2) Compared to attention-based methods, the present invention outputs an explicit set of nodes and its induced subgraph, providing verifiable and structurally complete evidence, rather than just continuous weights. Compared to fixed subgraph methods, the extension strategy of the present invention is obtained through task-supervised learning and can adaptively change with samples, root nodes, and graph structure.
[0022] (3) The method described in this invention achieves near-perfect classification accuracy on three control benchmarks with true orderings, and the selected evidence subgraphs are positively aligned with the true orderings; deleting the selected evidence nodes from the counterfactual evidence results in a significantly greater decrease in confidence, indicating that the prediction does indeed depend on the selected evidence.
[0023] (4) On real node classification data, the selected evidence subgraphs on average account for only a small proportion of the input graph, yet still achieve an accuracy that competes with or surpasses strong baselines; on real graph classification data, the method maintains a stable top-two performance on multiple molecular or protein graph benchmarks. Thus, the present invention combines predictive performance, evidence compactness, and interpretability.
[0024] (5) The decoupling of the search strategy from the encoder enables the present invention to reuse different graph neural network backbones, different root selection rules and different task losses, making engineering deployment flexible. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. By reading the detailed description of the embodiments below, the advantages and benefits of the solutions will become clear to those skilled in the art. The accompanying drawings are only for illustrating preferred embodiments and are not intended to limit the present invention. In the accompanying drawings: Figure 1 This is a flowchart of the steps of the method of the present invention.
[0026] Figure 2 This is a schematic diagram of the early mixing of existing neighborhood aggregation mechanisms.
[0027] Figure 3 The overall flowchart for searching the root-connected evidence subgraph bundle is shown.
[0028] Figure 4 This is a diagram illustrating the evidence subgraph and counterfactual deletion in the control baseline.
[0029] Figure 5 This is a schematic diagram of the modules of the system of the present invention.
[0030] Figure 6 A comparison diagram of the task processes for node classification and graph classification.
[0031] Figure 7 This is a training flowchart. Detailed Implementation
[0032] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and thoroughly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art should fall within the protection scope of the present invention.
[0033] See Figure 2 This diagram illustrates the early mixing of existing neighborhood aggregation mechanisms. It demonstrates the differences in information propagation on the molecular graph caused by Wesfield-Lyman refinement, mean aggregation, summation aggregation, and max-pooling aggregation, highlighting the problem of key functional group signals being mixed with background structures. This leads to the dilution of discriminative local substructures at a shallow level, making it difficult to directly output compact and verifiable structural evidence to support predictive decisions. To address the shortcomings of existing technologies, such as the dilution of key substructure signals, insufficient selectivity, and lack of verifiable evidence in prediction results due to unconditional aggregation of fixed neighborhoods, this invention proposes a selective graph representation learning method and system based on root-connected evidence subgraph bundle search. By actively searching for task-related connected evidence subgraphs and using them as the basis for prediction, early contamination by irrelevant background nodes is avoided, while ensuring the verifiability of the prediction basis.
[0034] See Figure 1 The present invention provides a selective graph representation learning method based on root-connected evidence subgraph bundle search, which mainly includes: S1. Based on the obtained molecular graph and node feature matrix of the molecule to be predicted, determine the root node; S2. Starting from the root node, use bundle search to maintain the state of multiple candidate evidence subgraphs. Construct a set of connected nodes as evidence subgraphs by gradually expanding the leading edge nodes. The leading edge nodes are nodes that are adjacent to any node in the current evidence subgraph and have not yet been included in the current evidence subgraph. S3. In each expansion step, the current state and / or the new state after expansion are scored through the policy network, and based on the score, either a stop action is executed or a node is selected from the frontier nodes to be added to the current evidence subgraph. S4. Repeat the expansion until the preset stopping condition is met to obtain at least one terminal evidence sub-graph; S5. Encode the terminal evidence subgraph to obtain the evidence subgraph embedding vector; S6. Based on the evidence subgraph embedding vector, output the molecular category prediction result and the connected evidence subgraph supporting the molecular category prediction result.
[0035] Optionally, determining the root node based on the obtained molecular graph and node feature matrix of the molecule to be predicted includes: converting the molecule to be predicted into graph structure data to obtain a molecular graph and a node feature matrix, wherein nodes in the molecular graph represent atoms, edges in the molecular graph represent chemical bonds between atoms, and each row in the node feature matrix corresponds to a feature vector of an atom; selecting one or more atoms from the molecular graph as root nodes according to atom degree, atom type, centrality, random sampling, neighborhood rules, or a learnable root node selection network.
[0036] Optionally, the method of maintaining multiple candidate evidence subgraph states using bundle search includes: maintaining multiple candidate evidence subgraph states with a width of B for each root node as the current active bundle; in each round of expansion, performing legal stop and add actions on each candidate evidence subgraph state in the current active bundle to generate new candidate states, and moving stopped or maximum-scale candidate states into the completion pool; sorting all newly generated incomplete candidate states according to cumulative scores, and retaining the B candidate states with the highest scores as the active bundle for the next round; after all root node searches are completed, selecting several terminal evidence subgraphs from the global completion pool according to a scoring function, where the scoring function is the cumulative policy probability, classification confidence, or the interval between the largest and second-largest categories.
[0037] Optionally, the step of scoring the current state and / or the expanded new state through the policy network, and selecting to execute a stop action or select a node from the frontier nodes to add to the current evidence subgraph based on the score, includes: encoding the current state to obtain a root center state representation, and outputting a stop action score by the policy network; encoding the new state formed after each candidate frontier node is added to the current evidence subgraph, and outputting an addition action score for that frontier node by the policy network; normalizing the stop action score with all legal addition action scores to obtain an action probability; and sampling or selecting the action with the highest score to execute based on the action probability.
[0038] Optionally, the stopping conditions include: the size of the current evidence subgraph reaches a preset maximum size threshold, or the policy network selects a stop action and the size of the current evidence subgraph has reached a preset minimum size threshold.
[0039] Optionally, encoding the terminal evidence subgraph to obtain the evidence subgraph embedding vector includes: taking the induced subgraph and corresponding node features of each terminal evidence subgraph in the original subgraph, and adding a root node binary label; based on the root node binary label, encoding the induced subgraph using an evidence subgraph encoder to obtain the evidence subgraph embedding vector.
[0040] Optionally, the step of outputting the molecular category prediction result and the connected evidence subgraph supporting the molecular category prediction result based on the evidence subgraph embedding vector includes: when selecting more than one atom as a root node from the molecular graph, generating one or more terminal evidence subgraphs for each root node; aggregating the evidence subgraph embedding vectors of all terminal evidence subgraphs through a permutation-invariant aggregation method to obtain a molecular-level representation, wherein the permutation-invariant aggregation method is at least one of mean, summation, maximum value, logarithmic summation exponent, attention pooling, or gated pooling; and based on the molecular-level representation, the classifier outputs the molecular category prediction result and simultaneously outputs one or more connected evidence subgraphs supporting the molecular category prediction result.
[0041] See Figure 5 In another aspect, the present invention provides a selective graph representation learning system based on root-connected evidence subgraph bundle search, comprising: The graph data input module is used to obtain the molecular graph and node feature matrix of the molecule to be predicted; The root node selection module is used to determine the root node based on the obtained molecular graph and node feature matrix of the molecule to be predicted. The beam search module is used to maintain the states of multiple candidate evidence subgraphs starting from the root node; The state encoding module is used to encode the current evidence subgraph or the new state after expansion to obtain the root center state representation; The strategy scoring module is used to output the stopping action score and the joining action score of each front node based on the root center state representation; The evidence subgraph expansion module is used to select either to execute a stop action or to select a node from the leading nodes to add to the current evidence subgraph based on the score output by the strategy scoring module. The module gradually expands and constructs a set of connected nodes as the evidence subgraph, repeating the expansion until a preset stop condition is met, thereby obtaining at least one terminal evidence subgraph. The evidence subgraph encoding module is used to encode the terminal evidence subgraph to obtain the evidence subgraph embedding vector; The aggregation prediction module is used to output the molecular category prediction result and the connected evidence subgraph supporting the molecular category prediction result based on the evidence subgraph embedding vector; The evaluation module is used to calculate the structural intersection-union ratio difference, counterfactual deletion confidence difference, sufficiency, root feature occlusion sufficiency, and effective node ratio to examine the structural alignment, fidelity, and compactness of the evidence subgraph.
[0042] Specifically, the solution of the present invention is further described with reference to the following examples: (a) Definition of Input, Output and Evidence Subgraph See Figure 6 This diagram compares the workflows of node classification and graph classification. Node classification uses the target node as the root; graph classification uses multiple roots for search and then performs global evidence aggregation.
[0043] Given a graph G=(V,E) and a node feature matrix X. For node classification tasks, select the target node to be classified as the root node r; for graph classification tasks, select one or more search anchor points from the graph as the root node set. Construct an evidence subgraph S starting from the root node r, requiring S to be a connected set of nodes, and r to be a subset of S. The size of the evidence subgraph is constrained by a lower bound m_min and an upper bound m_max, i.e., m_min <= |S| <= m_max. The model output is the node category or graph category obtained based on one or more evidence subgraphs.
[0044] (ii) Root-connected evidence subgraph search The search state is denoted as S_t, with an initial state of S_0 = {r}. The frontier node set of the current state consists of all nodes adjacent to any node in S_t but not yet included in S_t, i.e., F(S_t) = {u in V\S_t | there exists v in S_t, (u,v) in E}. At each step, the policy can either execute a stop action or select a node from the frontier nodes to add to the current evidence subgraph. If |S_t| has reached its minimum size, stopping is allowed; if |S_t| is less than its maximum size, adding a frontier node is allowed. The addition action produces S_{t+1} = S_t∪{u}. Since nodes are added only from the frontier each time, the resulting evidence subgraph naturally remains connected and includes the root node.
[0045] (III) Search Strategy Network The policy network receives the root center representation of the current state. This representation is obtained by stabilizing the node arrangement through a normalized breadth-first order starting from the root node, and by concatenating the induced subgraph structure statistics, distances from the root to each node, average degree, clustering coefficients, size information, and node feature projections. When the feature dimension is high, the original node features are first reduced in dimensionality through fixed projection to ensure the stability of the state representation dimension.
[0046] The policy network can employ a two-layer feedforward network. One linear head outputs the score for stopping actions, while the other linear head outputs the score for joining actions based on the new state formed after adding a leading node. The scores for stopping actions and all valid joining actions are normalized together to obtain the action probability distribution in the current state. Scoring joining actions based on the new state, rather than just the candidate node itself, helps the policy consider the quality of the local structure formed after the candidate node is added.
[0047] (iv) Training Objectives See Figure 7 This is a flowchart of the training process. It shows the sampling trajectory, evidence-by-evidence subgraph prediction, reward calculation, policy gradient update, and joint optimization of auxiliary loss and classification loss.
[0048] During the training phase, multiple search trajectories are sampled from the policy distribution. Each trajectory terminates to produce an evidence subgraph, which is then used by an evidence subgraph encoder to generate embeddings, and finally, a classifier outputs a prediction. A reward is assigned to each individual evidence subgraph; this reward can consist of negative cross-entropy and a size penalty, meaning the more accurate the prediction and the more compact the evidence, the higher the reward. Discrete policies can be trained using a score function estimator, and an exponential moving average baseline can be introduced to reduce variance. The overall loss may include aggregate prediction classification loss, evidence subgraph-by-evidence auxiliary loss, policy loss, size regularization term, and entropy regularization term.
[0049] (v) Evidence Subgraph Coding and Prediction For a terminal evidence subgraph S, its induced subgraph G[S] and corresponding node features X_S are taken, and the root node position is indicated by a binary root label. The encoder can adopt a graph isomorphic network, a graph isomorphic network with edge features, a graph convolutional network, a graph attention network, or other graph coding structures. The embedding of multiple evidence subgraphs is obtained by permutation-invariant aggregation functions such as mean, summation, maximum value, or logarithmic summation exponent to obtain instance-level representations, and finally the classifier outputs the class probability.
[0050] (vi) Bundle Search Reasoning See Figure 3 This is a flowchart of the overall process for searching the root-connected evidence subgraph. It shows that starting from the red root node, the strategy gradually adds leading nodes, with green arrows indicating retained extensions and gray arrows indicating pruned extensions, ultimately resulting in multiple candidate evidence subgraphs. Figure 4 This diagram illustrates the removal of evidence subgraphs and counterfactual elements in the control baseline. It can display true basis sequences such as five-node houses, six-node rings, and nine-node grids, as well as the different impacts of removing selected evidence nodes and removing random root subgraph nodes on prediction confidence.
[0051] The inference phase no longer uses random sampling; instead, a deterministic bundle search is performed. For each root node, a maximum of B candidate activity states are maintained. In each round, all activity states are expanded with legal stop and join actions. Candidates that have stopped or reached their maximum size are placed into the completion pool, and the B highest-scoring incomplete candidates are selected as the activity bundles for the next round. After all root node searches are completed, B_test evidence subgraphs are selected from the global completion pool according to a scoring function. The scoring function can be cumulative policy probability, classification confidence, or the interval between the largest and second-largest classes.
[0052] (vii) Unified implementation of node tasks and graph tasks In node classification, the root set degenerates into the target nodes themselves, and the model learns local evidence originating from the target nodes. In graph classification, multiple root nodes can be selected based on degree, centrality, random sampling, or learnable rules, and the evidence subgraphs from multiple roots are embedded and aggregated into a graph-level representation. Thus, the same search primitive simultaneously covers both node-level and graph-level predictions.
[0053] (viii) Implementation Module It can be implemented as follows: graph data input module, root node selection module, state encoding module, strategy scoring module, evidence subgraph expansion module, bundle search module, evidence subgraph encoding module, aggregation prediction module, and evaluation module. The evaluation module can calculate the structural intersection-union ratio difference, counterfactual deletion confidence difference, sufficiency, root feature occlusion sufficiency, and effective node ratio to verify the structural alignment, fidelity, and compactness of the evidence subgraph.
[0054] Example: Molecular property prediction scenario Taking molecular mutagenicity prediction as an example, the input, processing, and output of this invention are further explained. This embodiment is only used to illustrate one specific implementation of this invention in molecular graph classification tasks and does not limit the application of this invention in biological interaction networks, knowledge graphs, social networks, citation networks, and other graph structure data.
[0055] In this embodiment, the input is a molecular graph and a node feature matrix of the molecule to be predicted. Nodes in the molecular graph represent atoms, and edges represent chemical bonds between atoms. Each row in the node feature matrix corresponds to a feature vector of an atom, which includes, but is not limited to, atom category, valence state, aromaticity label, charge state, hybridization state, and whether it is in a ring structure. Edge features may include chemical bond type, whether it is an aromatic bond, and whether it is in a ring structure. The output is the predicted category of the molecule, such as whether it is mutagenic, toxic, or belongs to a specific molecular property category, and simultaneously outputs one or more connected evidence subgraphs supporting the prediction result.
[0056] The specific processing steps are as follows: Step 1: Input the molecular diagram and select the root node.
[0057] The molecule to be predicted is converted into graph-structured data, resulting in a molecular graph G=(V,E), a node feature matrix X, and an optional edge feature matrix. For graph classification tasks, one or more atoms are selected from the molecular graph as search root nodes. Root nodes can be determined based on atom degree, atom type, centrality, random sampling, neighborhood rules, or a learnable root node selection network. For example, atoms with high degree, heteroatoms, atoms in ring structures, or other atoms that may be related to molecular properties can be preferentially selected as the set of search root nodes.
[0058] Step 2: Construct the root-connected candidate evidence subgraph.
[0059] For each root node r, initialize the evidence subgraph node set S0 = {r}. At step t, calculate the frontier node set of the current evidence subgraph St. The frontier node set consists of all nodes adjacent to at least one node in St that are not yet included in St. At each step, the policy network selects an action from the legal actions, including stopping expansion and adding a frontier node. When adding a frontier node u, a new evidence subgraph St+1 = St∪{u} is obtained; when stopping or the evidence subgraph reaches a preset maximum size, a terminal evidence subgraph is obtained. Since only adding a frontier node is allowed each time, the resulting evidence subgraph always contains the root node and remains connected.
[0060] Step 3: State coding and policy scoring.
[0061] The current evidence subgraph or the new evidence subgraph after adding candidate frontier nodes is state-encoded to obtain a root center state representation. This state representation may include node features, edge connectivity, distances from the root node to each node, subgraph size, average degree, clustering coefficient, ring structure statistics, and node feature projection results of the current induced subgraph. The policy network outputs a stopping action score and a score for adding each frontier node based on the state representation, and normalizes these scores into action probabilities or action scores.
[0062] Step four: The beam search preserves multiple candidate evidence subgraphs.
[0063] During the inference phase, a candidate state set of preset width is maintained for each root node. In each round, a legal action expansion is performed on the candidate states, and they are sorted according to cumulative policy score, classification confidence, or the interval between the largest and second-largest categories. Several incomplete candidate states with high scores are retained, while candidate states that have stopped or reached their maximum size are added to the completion pool. After searching all root nodes, several evidence subgraphs with the highest scores are selected from the completion pool as candidate evidence subgraphs for that molecule.
[0064] Step 5: Evidence subgraph encoding and molecular category prediction.
[0065] For each terminal evidence subgraph, its induced subgraph and corresponding node features in the original molecular graph are extracted, and a binary label for the root node is added. The induced subgraph is then encoded using an evidence subgraph encoder to obtain the evidence subgraph embedding vector. The evidence subgraph encoder can employ a graph isomorphic network, a graph isomorphic network with edge features, a graph convolutional network, a graph attention network, a message-passing neural network, or a graph transformer. For multiple root nodes and multiple evidence subgraphs, permutation-invariant aggregation methods such as mean, summation, maximum value, logarithmic summation exponent, attention pooling, or gated pooling are used to obtain a molecular-level representation, which is then output by a classifier as the molecular category prediction result.
[0066] Through the steps described above, this embodiment can actively search for compact, connected evidence subgraphs related to molecular property prediction without unconditionally aggregating the entire molecular neighborhood. For example, in a mutagenicity prediction task, the model can start from a specific atom and search for evidence subgraphs containing nitro groups, nitrogen-containing structures, ring structures, or other local chemical structures related to mutagenicity, and complete classification predictions based on the selected evidence subgraphs. The final output includes the molecular category prediction result and one or more connected evidence subgraphs supporting the prediction result, thereby improving the verifiability of the prediction basis.
[0067] In summary, compared with the prior art, the present invention has the following beneficial effects: (1) Compared with standard message passing graph neural networks, this invention no longer unconditionally aggregates fixed neighborhoods, but first selects compact connected evidence subgraphs and then encodes and predicts the selected subgraphs, thus reducing the early pollution of key local structures by irrelevant background nodes.
[0068] (2) Compared to attention-based methods, the present invention outputs an explicit set of nodes and its induced subgraph, providing verifiable and structurally complete evidence, rather than just continuous weights. Compared to fixed subgraph methods, the extension strategy of the present invention is obtained through task-supervised learning and can adaptively change with samples, root nodes, and graph structure.
[0069] (3) The method described in this invention achieves near-perfect classification accuracy on three control benchmarks with true orderings, and the selected evidence subgraphs are positively aligned with the true orderings; deleting the selected evidence nodes from the counterfactual evidence results in a significantly greater decrease in confidence, indicating that the prediction does indeed depend on the selected evidence.
[0070] (4) On real node classification data, the selected evidence subgraphs on average account for only a small proportion of the input graph, yet still achieve an accuracy that competes with or surpasses strong baselines; on real graph classification data, the method maintains a stable top-two performance on multiple molecular or protein graph benchmarks. Thus, the present invention combines predictive performance, evidence compactness, and interpretability.
[0071] (5) The decoupling of the search strategy from the encoder enables the present invention to reuse different graph neural network backbones, different root selection rules and different task losses, making engineering deployment flexible.
[0072] Alternative solution: 1. Root node selection can be replaced by degree centrality, betweenness centrality, feature cluster centers, random sampling, domain knowledge anchors, or learnable root selection networks.
[0073] 2. The state encoding can be replaced by a state encoder based on a graph neural network, a subgraph transformer, a Laplace position encoding, random walk statistics, spectral features, structural role encoding, or a molecular descriptor.
[0074] 3. The search policy training can be replaced by policy gradient with advantage function, actor-critic method, proximal policy optimization, supervised imitation learning, differentiable relaxation search, Monte Carlo tree search, or heuristic search.
[0075] 4. Inference search can be replaced by greedy search, random multiple sampling, variable width beam search, cost-constrained search, best-first search, or reordering combined with uncertainty.
[0076] 5. The evidence subgraph encoder can be replaced by a graph convolutional network, graph attention network, graph isomorphic network, graph isomorphic network with edge features, message passing neural network, graph transformer, or task-specific molecular graph encoder.
[0077] 6. Multi-evidence aggregation can be replaced by mean, summation, maximum value, logarithmic summation exponent, attention pooling, gated pooling, or hierarchical aggregation.
[0078] 7. Size constraints can be replaced with fixed number of nodes, learnable budget, graph-scale adaptive budget, edge budget, diameter budget, or computational budget.
[0079] 8. This invention can be extended to graph learning tasks such as edge classification, link prediction, anomaly detection, molecular property prediction, knowledge graph reasoning, and biological network function prediction.
[0080] Another aspect of the present invention provides an electronic device, which includes a processor, a memory, a communication bus, and a communication interface.
[0081] in: The processor, memory, and communication interface communicate with each other via a communication bus.
[0082] A communication interface is used to communicate with other electronic devices or servers.
[0083] The processor is used to execute programs, specifically the steps of any of the methods described in the above embodiments.
[0084] Specifically, the program may include program code, which includes computer operation instructions.
[0085] The processor may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or they may be processors of different types, such as one or more CPUs and one or more ASICs.
[0086] Memory is used to store programs. Memory may include high-speed RAM, and may also include non-volatile memory, such as at least one disk drive.
[0087] Specifically, the program can be used to cause the processor to execute the steps of any of the methods described in the embodiments. The specific implementation of each step in the program can be found in the corresponding descriptions of the steps and units executed by any of the methods described above, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments.
[0088] An exemplary embodiment of this application also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the methods of various embodiments of this application.
[0089] The methods described above according to embodiments of the present invention can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored on a remote recording medium or a non-transitory machine-readable medium and subsequently stored on a local recording medium, downloaded via a network. Thus, the methods described herein can be processed by software stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the methods shown herein.
[0090] Specific embodiments of the present invention have now been described. Other embodiments are within the scope of the appended claims. In some cases, the actions described in the claims can be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result.
[0091] It should be noted that all directional indications (such as up, down, left, right, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship between the components in a certain order (as shown in the figure). If the specific order changes, the directional indication will also change accordingly.
[0092] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0093] It should be noted that although specific embodiments of the present invention have been described in detail with reference to the accompanying drawings, this should not be construed as limiting the scope of protection of the present invention. Various modifications and variations that can be made by those skilled in the art without inventive effort within the scope described in the claims still fall within the scope of protection of the present invention.
[0094] The examples of the embodiments of the present invention are intended to concisely illustrate the technical features of the embodiments of the present invention, so that those skilled in the art can intuitively understand the technical features of the embodiments of the present invention, and are not intended to be an improper limitation of the embodiments of the present invention.
[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A selective graph representation learning method based on root-connected evidence subgraph bundle search, characterized in that, include: The root node is determined based on the obtained molecular graph and node feature matrix of the molecule to be predicted. Starting from the root node, a bundle search is used to maintain the state of multiple candidate evidence subgraphs. A set of connected nodes is constructed as an evidence subgraph by gradually expanding the leading edge nodes. The leading edge nodes are nodes that are adjacent to any node in the current evidence subgraph and are not yet included in the current evidence subgraph. In each expansion step, the current state and / or the new state after expansion are scored through the policy network, and based on the score, either a stop action is executed or a node is selected from the frontier nodes to be added to the current evidence subgraph. Repeat the expansion until the preset stopping condition is met to obtain at least one terminal evidence subgraph; The terminal evidence subgraph is encoded to obtain the evidence subgraph embedding vector; Based on the evidence subgraph embedding vector, the molecular category prediction result and the connected evidence subgraph supporting the molecular category prediction result are output.
2. The method according to claim 1, characterized in that, The determination of the root node based on the obtained molecular graph and node feature matrix of the molecule to be predicted includes: The molecule to be predicted is converted into graph structure data to obtain the molecular graph and node feature matrix. The nodes in the molecular graph represent atoms, the edges in the molecular graph represent chemical bonds between atoms, and each row in the node feature matrix corresponds to the feature vector of an atom. The network selects one or more atoms from the molecular graph as root nodes based on atomic degree, atom type, centrality, random sampling, neighborhood rules, or learnable root nodes.
3. The method according to claim 1, characterized in that, The method of maintaining the states of multiple candidate evidence subgraphs using beam search includes: Maintain multiple candidate evidence subgraph states of width B for each root node, as the current activity bundle; In each round of expansion, legal stop and add actions are performed on each candidate evidence subgraph state in the current activity bundle to generate new candidate states, and candidate states that have been stopped or have reached the maximum size are moved into the completion pool. Sort all newly generated incomplete candidate states according to their cumulative scores, and retain the B candidate states with the highest scores as the activity bundle for the next round. After all root nodes have been searched, several terminal evidence subgraphs are selected from the global completion pool according to a scoring function, which is the cumulative policy probability, classification confidence, or the interval between the largest and second largest categories.
4. The method according to claim 1, characterized in that, The step of scoring the current state and / or the expanded new state through a policy network, and selecting to execute a stop action or select a node from the leading nodes to add to the current evidence subgraph based on the score, includes: The current state is encoded to obtain the root center state representation, and the policy network outputs the stop action score. The new state formed after each candidate front node is added to the current evidence subgraph is encoded, and the policy network outputs the score of the addition action of the front node. The score for the stop action is normalized to the scores for all legal join actions to obtain the action probability; The action is sampled based on the probability of the action or the action with the highest score is selected for execution.
5. The method according to claim 1, characterized in that, The stopping conditions include: The current evidence subgraph has reached the preset maximum size threshold, or the policy network has chosen to stop the action and the current evidence subgraph has reached the preset minimum size threshold.
6. The method according to claim 1, characterized in that, The process of encoding the terminal evidence subgraph to obtain the evidence subgraph embedding vector includes: Take the induced subgraph and corresponding node features of each terminal evidence subgraph in the original molecular graph, and add a binary label to the root node; Based on the binary label of the root node, the induced subgraph is encoded using an evidence subgraph encoder to obtain the evidence subgraph embedding vector.
7. The method according to claim 1, characterized in that, The step of outputting the molecular category prediction result and the connected evidence subgraph supporting the molecular category prediction result based on the evidence subgraph embedding vector includes: When one or more atoms are selected as root nodes from the molecular graph, one or more terminal evidence subgraphs are generated for each root node. The evidence subgraph embedding vectors of all terminal evidence subgraphs are aggregated through a permutation-invariant aggregation method to obtain a molecular-level representation. The permutation-invariant aggregation method is at least one of mean, summation, maximum value, logarithmic summation exponent, attention pooling, or gated pooling. Based on the molecular-level representation, the classifier outputs a molecular category prediction result, and simultaneously outputs one or more connected evidence subgraphs that support the molecular category prediction result.
8. A selective graph representation learning system based on root-connected evidence subgraph bundle search, characterized in that, include: The graph data input module is used to obtain the molecular graph and node feature matrix of the molecule to be predicted; The root node selection module is used to determine the root node based on the obtained molecular graph and node feature matrix of the molecule to be predicted. The beam search module is used to maintain the states of multiple candidate evidence subgraphs starting from the root node; The state encoding module is used to encode the current evidence subgraph or the new state after expansion to obtain the root center state representation; The strategy scoring module is used to output the stopping action score and the joining action score of each front node based on the root center state representation; The evidence subgraph expansion module is used to select either to execute a stop action or to select a node from the leading nodes to add to the current evidence subgraph based on the score output by the strategy scoring module. The module gradually expands and constructs a set of connected nodes as the evidence subgraph, repeating the expansion until a preset stop condition is met, thereby obtaining at least one terminal evidence subgraph. The evidence subgraph encoding module is used to encode the terminal evidence subgraph to obtain the evidence subgraph embedding vector; The aggregation prediction module is used to output the molecular category prediction result and the connected evidence subgraph supporting the molecular category prediction result based on the evidence subgraph embedding vector; The evaluation module is used to calculate the structural intersection-union ratio difference, counterfactual deletion confidence difference, sufficiency, root feature occlusion sufficiency, and effective node ratio to examine the structural alignment, fidelity, and compactness of the evidence subgraph.
9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the method as described in any one of claims 1 to 7.
10. A computer storage medium, characterized in that, The computer storage medium stores a computer program, which, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 7.