CN117808084A - Pre-selection method based on graph reduction brief representation and graph neural network - Google Patents
Pre-selection method based on graph reduction brief representation and graph neural network Download PDFInfo
- Publication number
- CN117808084A CN117808084A CN202311490926.9A CN202311490926A CN117808084A CN 117808084 A CN117808084 A CN 117808084A CN 202311490926 A CN202311490926 A CN 202311490926A CN 117808084 A CN117808084 A CN 117808084A
- Authority
- CN
- China
- Prior art keywords
- graph
- node
- information
- candidate
- walk
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 27
- 238000010187 selection method Methods 0.000 title claims abstract description 17
- 230000009467 reduction Effects 0.000 title claims description 9
- 239000013598 vector Substances 0.000 claims abstract description 42
- 238000010586 diagram Methods 0.000 claims abstract description 25
- 238000003062 neural network model Methods 0.000 claims abstract description 18
- 230000007246 mechanism Effects 0.000 claims abstract description 16
- 238000011176 pooling Methods 0.000 claims abstract description 8
- 230000006870 function Effects 0.000 claims description 19
- 238000000034 method Methods 0.000 claims description 15
- 230000004931 aggregating effect Effects 0.000 claims description 7
- 230000002776 aggregation Effects 0.000 claims description 7
- 238000004220 aggregation Methods 0.000 claims description 7
- 238000012546 transfer Methods 0.000 claims description 6
- 239000002243 precursor Substances 0.000 claims description 5
- 230000008569 process Effects 0.000 claims description 3
- 238000013473 artificial intelligence Methods 0.000 abstract description 4
- PLRACCBDVIHHLZ-UHFFFAOYSA-N 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine Chemical compound C1N(C)CCC(C=2C=CC=CC=2)=C1 PLRACCBDVIHHLZ-UHFFFAOYSA-N 0.000 description 7
- 101001135571 Mus musculus Tyrosine-protein phosphatase non-receptor type 2 Proteins 0.000 description 7
- 101100202428 Neopyropia yezoensis atps gene Proteins 0.000 description 5
- 238000012549 training Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000010410 layer Substances 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000004880 explosion Methods 0.000 description 1
- 230000007787 long-term memory Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000006403 short-term memory Effects 0.000 description 1
- 239000002356 single layer Substances 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/01—Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
- G06N5/013—Automatic theorem proving
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/042—Knowledge-based neural networks; Logical representations of neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/09—Supervised learning
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Computing Systems (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to the technical field of artificial intelligence, in particular to a graph-reduction-representation-and-graph-neural-network-based pre-selection method, which comprises the following steps: step one: obtaining a simplified first-order logic formula diagram by judging and deleting continuous repeated graduated words; step two: based on a simplified logic formula diagram, a term walk diagram neural network model with an attention mechanism is provided, the model aggregates node information positioned at the upper part, the middle part and the lower part of a term walk triplet according to a term walk mode, the attention mechanism is introduced to calculate term walk characteristic weights of nodes, the weights are combined with the node information to generate a new node embedded vector, and the final formula diagram characteristic vector is obtained through global average pooling; and thirdly, inputting the candidate preconditions and the given guess graph feature vectors into a binary classifier, and further classifying the candidate preconditions. The invention can preferably make precondition selection.
Description
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a graph reduction profile and graph neural network based pre-selection method.
Background
The automatic theorem proves (Automated Theorem Provers, ATPs) is a core and leading direction in the field of artificial intelligence, and is widely applied to the fields of expert systems, circuit designs, compilers, software verification and the like as an important component of an artificial intelligence system. ATPs first formalize the guesses and premises into logical formulas, which are then input into an automatic theorem prover, thereby enabling the guesses to be automatically deduced from the premises. ATPs achieve new problem certification by constantly iterating through all sets of clauses to be processed in the question bank, which can lead to problems with exponential explosion of the search space in the question bank of larger scale. The premise option provides a new way to solve the problem, namely to determine and select a formula that helps to prove the conclusion of a given problem before inputting the logical formula into the ATPs.
The effective pre-selection method can greatly improve the capability of ATPs. Early precondition selection methods were primarily a manually designed heuristic based on symbol comparison analysis that screened preconditions in a precondition set that were more relevant to conclusions by comparing the depth of clauses extracted from the input formulas, symbol count, etc., and structural features, which are limited to manually designed features. With the development of computer capability, some machine learning methods become an effective alternative to the pre-selection methods, and naturally convert the problems into classification or sorting problems, and compared with the original methods, the deep features of logic formulas, such as convolutional neural networks, long-term and short-term memory neural networks, gated circular neural networks and the like, can be captured.
On the basis, the logic formula can be naturally expressed as a graph, and the characteristics of the logic formula can be fully embodied by fusing the characteristics of the topological structure information of the graph, so that the combination of the graph neural network and the automatic theorem proving becomes a current popular research subject. The existing graph neural network-based precursor selection method can improve the capability of precursor selection classification to a certain extent, but still has some defects:
(1) The logic formula graph contains rich grammar and semantic properties, and most of the pre-selection methods neglect the influence of different graph representation methods of the logic formula on the graph neural network model, so that the graph neural network cannot capture the internal and external information of the logic formula well;
(2) Existing graph neural network models often generate features that preserve more logical formula information by aggregating information from neighboring nodes or other nodes, which often contain a large amount of node information, which may result in the generated formula features being affected by non-important information on the graph, thereby failing to adequately represent the graph features of the logical formula information.
Disclosure of Invention
The invention provides a graph-based brief representation and graph neural network-based pre-selection method, which can allocate different weights for nodes on a graph so as to better encode first-order logic formula graph characteristics.
The graph reduction presentation and graph neural network based precondition selection method according to the invention comprises the following steps:
step one: obtaining a simplified first-order logic formula diagram by judging and deleting continuous repeated graduated words;
step two: based on a simplified logic formula diagram, a term walk diagram neural network model with an attention mechanism is provided, the model aggregates node information positioned at the upper part, the middle part and the lower part of a term walk triplet according to a term walk mode, the attention mechanism is introduced to calculate term walk characteristic weights of nodes, the weights are combined with the node information to generate a new node embedded vector, and the final formula diagram characteristic vector is obtained through global average pooling;
and thirdly, inputting the candidate preconditions and the given guess graph feature vectors into a binary classifier, and further classifying the candidate preconditions.
Preferably, in the first step, the adjectives satisfying the same and continuous condition are combined on the basis of the directed acyclic graph DAGs, thereby obtaining a simplified first-order logic formula graph.
Preferably, in the second step, a neural network model of the term walk graph with a attention mechanism specifically includes:
(1) Inputting a graph g= (V, E), wherein V is all nodes on the graph and E is all edges on the graph; first, each node V e V is assigned an initial embedding x v Node state vector generated through k rounds of iterationImplementing a messaging process, where K e {1, …, K };
wherein,is a fixed-size initial state vector, +.>Embedding the output dimension of the vector for the node, F V Is a lookup table;
(2) Aggregating node information according to the term walk pattern, setting T for each node V of the input graph g= (V, E) u (v),T m (v) And T l (v) Item walk feature sets representing that the node v is located at the upper, middle, and lower portions, respectively, have:
T u (v)={(v,u,w)|(v,u),(u,w)∈E},
T m (v)={(u,v,w)|(u,v),(v,w)∈E},
T l (v)={(u,w,v)|(u,w),(w,v)∈E}
wherein u and w are any nodes on the graph;
to distinguish nodes v from different positions of the item walk feature, T is respectively calculated u (v),T m (v) And T l (v) The vectors in the triples are stitched and then the model is directed to T u (v),T m (v) And T l (v) Aggregation function F u ,F m And F l Aggregating node v information from different locations;
wherein, the semicolons in the formula represent the concatenation of different node state vectors; i T u (v)|,|T m (v) I and T m (v) I respectively represent the set T u (v),T m (v) And T l (v) The sum of all triples in the database;
model-induced attention mechanism to balance node state informationItem walk feature information with nodesAnd->To reduce the complexity of the model structure +.>And->Attention score of term walk characteristic information to node information, and attention score is normalized through softmax function to obtain attention weight alpha vu ,α vm And alpha vl Finally use the aggregation function F U ,F M And F L Obtain balanced node information->And->
Wherein alpha is vu ,α vm And alpha vl Respectively representing node item wander characteristic informationAnd->Node information->Is that the concentration weights of (v), vu, vm and vl represent nodes located at the upper, middle and lower parts of the item walk triplet, respectively;
finally, node v aggregates from set T u (v),T m (v) And T l (v) Balance node information of (a)And->Is summarized as->
(3) Using data from set T u (v),T m (v) And T l (v) Is adjusted node total informationAnd node v state vector of the last step +.>For node vector->Carrying out transfer and updating;
wherein F is sum A node information transfer function;
(4) Performing average pooling operation AvgPool on all nodes on the logic formula diagram, and embedding a vector h into the final formula diagram G The method comprises the following steps:
wherein,AvgPool is the average pool.
Preferably, in step three, the candidate preconditions and the map of the given guess are embedded in a vector pair (h p ,h c ) Input to classification function F class Obtaining usefulness scores of candidate preconditions under guesses;
z=F class ([h p ;h c ])
wherein z is E R 2 A score representing the candidate preconditions as useful and useless for guessing;
the model normalizes the candidate preconditions using a softmax function to guess the useful and useless scores and divides the candidate preconditions by score size:
wherein,representing normalized precondition useful and useless scores, z i For the i-th element in z, +.>Is->If the candidate precondition useful score and the useless score correspond to different tag attributes, determining the tag attribute of the candidate precondition according to the dividing result, and comparing the tag attribute with the existing tag, thereby realizing classification.
The beneficial effects of the invention are as follows:
1) The simplified first-order logic formula graph representation method for deleting the repeated metering words can prevent different graph representations of the logic formulas from influencing the graph neural network model, so that the graph neural network can well capture the internal and external information of the logic formulas;
2) The invention provides a term walk graph neural network model with an attention mechanism, and the term walk graph neural network model is applied to the problem of pre-selection. The model can prevent formula features in the graph neural network from being influenced by unimportant information on the graph, and can allocate different weights for nodes on the graph, so that the first-order logic formula graph features are better encoded.
Drawings
FIG. 1 is a flow chart illustrating a method of pre-selection based on a graph reduction profile and a graph neural network in an embodiment.
Detailed Description
For a further understanding of the present invention, the present invention will be described in detail with reference to the drawings and examples. It is to be understood that the examples are illustrative of the present invention and are not intended to be limiting.
Examples
As shown in fig. 1, the present embodiment provides a graph-reduction-profile-and-graph neural network-based pre-selection method, which includes the following steps:
step one: obtaining a simplified first-order logic formula diagram by judging and deleting continuous repeated graduated words; the first-order logic formula diagram comprises a first-order logic precondition formula diagram and a first-order logic guess formula diagram;
the general expression of logical formulas to diagrams is usually an extended Directed Acyclic Graph (DAGs), and the general steps are as follows: 1) Converting the logic formula into a grammar parsing tree similar to a programming language; 2) Merging the same sub-expressions and leaf nodes on the parse tree; 3) Renaming variables in the logical formula.
In order to reduce the size of graph data and to allow DAGs to contain more logical properties, the present invention proposes a directed acyclic graph (Simplified-DAGs) based on the deletion of duplicate words to represent a first order logical formula. The simple-DAGs operation is equivalent to combining the adjectives satisfying the same and continuous condition on the basis of the original DAGs.
Step two: based on a simplified logic formula diagram, a term walk graph neural network model (Attention-TW-GNN) with an Attention mechanism is provided, the model aggregates node information positioned at the upper part, the middle part and the lower part of a term walk triplet according to a term walk mode, the term walk characteristic weight of a node is calculated by introducing the Attention mechanism, the weight and the node information are combined to generate a new node embedded vector, and the final formula diagram characteristic vector is obtained through global average pooling;
in the second step, according to the working flow of the graph neural network model, the term walk graph neural network model with the attention mechanism iteratively updates node embedded information through a graph node vector initialization stage, a graph node information aggregation stage, a graph node information transmission stage and a graph feature reading stage (graph pooling) to obtain a final first-order logic formula graph vector. The method comprises the following steps:
(1) Inputting a graph g= (V, E), wherein V is all nodes on the graph and E is all edges on the graph; first, each node V e V is assigned an initial embedding x v Node state vector generated through k rounds of iterationImplementing a messaging process, where K e {1, …, K };
wherein,is a fixed-size initial state vector, +.>Embedding the output dimension of the vector for the node, F V Is a lookup table;
(2) Aggregating node information according to the term walk pattern, setting T for each node V of the input graph g= (V, E) u (v),T m (v) And T l (v) Item walk feature sets representing that the node v is located at the upper, middle, and lower portions, respectively, have:
T u (v)={(v,u,w)|(v,u),(u,w)∈E},
T m (v)={(u,v,w)|(u,v),(v,w)∈E},
T l (v)={(u,w,v)|(u,w),(w,v)∈E}
wherein u and w are any nodes on the graph;
to distinguish nodes v from different positions of the item walk feature, T is respectively calculated u (v),T m (v) And T l (v) The vectors in the triples are stitched and then the model is directed to T u (v),T m (v) And T l (v) Aggregation function F u ,F m And F l Aggregating node v information from different locations;
wherein, the semicolons in the formula represent the concatenation of different node state vectors; i T u (v)|,|T m (v) I and T m (v) I respectively represent the set T u (v),T m (v) And T l (v) The sum of all triples in the database;
model-induced attention mechanism to balance node state informationItem walk feature information with nodesAnd->To reduce the complexity of the model structure +.>And->Attention score (contribution) of the term walk feature information to the node information, which is normalized by a softmax function to obtain an attention weight alpha vu ,α vm And alpha vl Finally use the aggregation function F U ,F M And F L Obtain balanced node information->And->
Wherein alpha is vu ,α vm And alpha vl Respectively representing node item wander characteristic informationAnd->Node informationIs that the concentration weights of (v), vu, vm and vl represent nodes located at the upper, middle and lower parts of the item walk triplet, respectively;
finally, node v aggregates from set T u (v),T m (v) And T l (v) Balance node information of (a)And->Is summarized as->
(3) Using data from set T u (v),T m (v) And T l (v) Is adjusted node total informationAnd node v state vector of the last step +.>For node vector->Carrying out transfer and updating;
wherein F is sum A node information transfer function; f (F) sum Is a simple single-layer MLPs.
(4) Average pooling (AvgPool) is performed on all nodes on the logical formula, and the final formula embeds the vector h G The method comprises the following steps:
wherein,AvgPool is the average pool.
And thirdly, inputting the candidate preconditions and the given guess graph feature vectors into a binary classifier, and further classifying the candidate preconditions.
Embedding the graph of candidate premises and given guesses into a vector pair (h p ,h c ) Input to classification function F class Obtaining usefulness scores of candidate preconditions under guesses;
z=F class ([h p ;h c ])
wherein z is E R 2 A score representing the candidate preconditions as useful and useless for guessing;
the model normalizes the candidate preconditions using a softmax function to guess the useful and useless scores and divides the candidate preconditions by score size:
wherein,representing normalized precondition useful and useless scores, z i For the i-th element in z, +.>Is->If the candidate precondition useful score and useless score correspond to different tag attributes (1 or 0), determining the tag attribute of the candidate precondition according to the dividing result (the maximum score), and comparing with the existing tag, thereby realizing classification.
Experiment
(1) Data set
In this embodiment, two data sets, namely an original (MPTP) data set and a Conjunctive Normal Form (CNF) data set, are established based on the MPTP2078 question library, and are used for testing the prediction classification effect of the model. The MPTP data set is a logic formula in an MPTP2078 question bank, and the CNF data set is a conjunctive normal form corresponding to the logic formula in the MPTP2078 question bank. The question bank contains 1469 hypotheses and 24087 hypotheses for proving the hypotheses.
The present embodiment builds MPTP datasets for training, validation and testing (40996, 13990 and 14068 samples), where each dataset is shaped as a triplet (precondition, hypothesis, label), provided that the label is either 0 or 1 in the binary classification (1 represents the precondition useful, 0 represents the precondition useless) given the candidate precondition of the hypothesis; meanwhile, the CNF data set distribution constructed in this embodiment is the same as the MPTP data set.
(2) Model arrangement
According to the embodiment, a logic formula is converted into a simplified logic formula diagram based on the deletion of repeated adjectives according to a data set, and diagram information (node id, node name, father node id and child node id) of each simplified logic formula is obtained. And then, the logic formula graph is transmitted into a graph neural network, and the characteristic vector of the formula graph is obtained. The model of the graph neural network is specifically set as follows:
in the graph neural network model of the present embodiment, the initial one thermal vector of each node has d v Dimension. F (F) V Is an embedded network which will d v Initial one of the thermal vectors of the dimension is embedded intoThe node initial state vector of the dimension. F (F) u 、F m 、F l Are identical in configuration, they are of the input dimension +.>And output dimension->Is a fully connected layer (FC). F (F) sum 、F U 、F M And F L Configuration and F of (2) u Similarly, since it only changes the input dimension +.>F class There are two fully connected layers: the first is the dimension +.>FC and Batch Normalization (BN); the second is by FC with dimension 2 containing softmax. Notably, d v 793, which represents 793 node labels, among which we collectively represent the variable as "Var".
(3) Experimental setup
The model parameters of the present embodiment are set as follows:
(a) Training the model using the default settings of the adaptive moment estimation Adam optimizer;
(b) Batch size was set to 32;
(c) Regularization parameter set to 0.0001;
(d) The initial learning rate is set to 0.01;
(e) The model automatically adjusts the learning rate using the reduce lronplateau strategy in the Pytorch library.
(f) Model training model using cross entropy loss function
(4) Experimental results and analysis
The present embodiment evaluates a pre-selection model based on the Attention-TW-GNN on both the MPTP dataset and the CNF dataset and compares the model to some mainstream methods. From this it can be seen that:
the pre-selection method based on the graph neural network model can obtain better classification precision, and is superior to some mainstream graph neural network models. For example: the Accuracy index of the model GCN, GAT, SGC and the like under the MPTP data set is 86.25%,85.38% and 85.67% respectively. This means that the mainstream graph neural network can only simply capture the topological structure of the logic formula graph, and cannot capture the deep information of the logic formula.
In other baseline methods, the graph neural networks PC-GCN and TW-GNN based on the manual design features are obviously superior to the mainstream graph neural networks. For example: f1 indexes of the PC-GCN and TW-GNN models under the CNF data set are 83.98% and 83.72%, respectively. One reasonable explanation is that these graph neural network models aggregate information from more distant nodes in addition to neighboring node information.
The precondition selection model based on the Attention-TW-GNN of the embodiment can surpass the prior other precondition selection models based on the graph neural network in most cases in classification accuracy. For example: under MPTP data set, the Attention-TW-GNN is improved by at least 2% compared with the main flow graph neural network, and is improved by 0.5% compared with other baseline methods; under the CNF data set, the attribute-TW-GNN is improved by 3% compared with the main flow graph neural network model. The graph neural network after the attention mechanism adjustment is added can better represent the grammar and semantic information of the first-order logic formula, and meanwhile, the graph representation of the first-order logic formula also affects the classification effect of the model to a certain extent.
The invention and its embodiments have been described above by way of illustration and not limitation, and the invention is illustrated in the accompanying drawings and described in the drawings in which the actual structure is not limited thereto. Therefore, if one of ordinary skill in the art is informed by this disclosure, the structural mode and the embodiments similar to the technical scheme are not creatively designed without departing from the gist of the present invention.
Claims (4)
1. The pre-selection method based on the graph reduction brief representation and the graph neural network is characterized by comprising the following steps of: the method comprises the following steps:
step one: obtaining a simplified first-order logic formula diagram by judging and deleting continuous repeated graduated words;
step two: based on a simplified logic formula diagram, a term walk diagram neural network model with an attention mechanism is provided, the model aggregates node information positioned at the upper part, the middle part and the lower part of a term walk triplet according to a term walk mode, the attention mechanism is introduced to calculate term walk characteristic weights of nodes, the weights are combined with the node information to generate a new node embedded vector, and the final formula diagram characteristic vector is obtained through global average pooling;
and thirdly, inputting the candidate preconditions and the given guess graph feature vectors into a binary classifier, and further classifying the candidate preconditions.
2. The graph reduction profile and graph neural network based precursor selection method of claim 1, wherein: in the first step, the adjectives satisfying the same and continuous condition are combined on the basis of the directed acyclic graph DAGs, so that a simplified first-order logic formula graph is obtained.
3. The graph reduction profile and graph neural network based precursor selection method of claim 2, wherein: in the second step, a term walk graph neural network model with an attention mechanism specifically comprises:
(1) Inputting a graph g= (V, E), wherein V is all nodes on the graph and E is all edges on the graph; first, each node V e V is assigned an initial embedding x v Node state vector generated through k rounds of iterationImplementing a messaging process, where K e {1, …, K };
wherein,is a fixed-size initial state vector, +.>Embedding the output dimension of the vector for the node, F V Is a lookup table;
(2) Aggregating node information according to the term walk pattern, setting T for each node V of the input graph g= (V, E) u (v),T m (v) And T l (v) Item walk feature sets representing that the node v is located at the upper, middle, and lower portions, respectively, have:
T u (v)={(v,u,w)|(v,u),(u,w)∈E},
T m (v)={(u,v,w)|(u,v),(v,w)∈E},
T l (v)={(u,w,v)|(u,w),(w,v)∈E}
wherein u and w are any nodes on the graph;
to distinguish nodes v from different positions of the item walk feature, T is respectively calculated u (v),T m (v) And T l (v) The vectors in the triples are stitched and then the model is directed to T u (v),T m (v) And T l (v) Aggregation function F u ,F m And F l Aggregating node v information from different locations;
wherein, the semicolons in the formula represent the concatenation of different node state vectors; i T u (v)|,|T m (v) I and T m (v) I respectively represent the set T u (v),T m (v) And T l (v) The sum of all triples in the database;
model-induced attention mechanism to balance node state informationItem wander characteristic information of node->And->To reduce the complexity of the model structure +.>And->Attention score of term walk characteristic information to node information, and attention score is normalized through softmax function to obtain attention weight alpha vu ,α vm And alpha vl Finally use the aggregation function F U ,F M And F L Obtain balanced node information->And->
Wherein alpha is vu ,α vm And alpha vl Respectively representing node item wander characteristic informationAnd->Information about node->Is that the concentration weights of (v), vu, vm and vl represent nodes located at the upper, middle and lower parts of the item walk triplet, respectively;
finally, node v aggregates from set T u (v),T m (v) And T l (v) Balance node information of (a)And->Is summarized as->
(3) Using data from set T u (v),T m (v) And T l (v) Is adjusted node total informationAnd node v state vector of the last step +.>For node vector->Carrying out transfer and updating;
wherein F is sum A node information transfer function;
(4) Performing average pooling operation AvgPool on all nodes on the logic formula diagram, and embedding a vector h into the final formula diagram G The method comprises the following steps:
wherein,AvgPool is the average pool.
4. The graph reduction profile and graph neural network based precursor selection method of claim 3, wherein: in step three, the candidate preconditions and the map of the given guess are embedded into vector pairs (h p ,h c ) Input to classification function F class Obtaining usefulness scores of candidate preconditions under guesses;
z=F class ([h p ;h c ])
wherein z is E R 2 A score representing the candidate preconditions as useful and useless for guessing;
the model normalizes the candidate preconditions using a softmax function to guess the useful and useless scores and divides the candidate preconditions by score size:
wherein,indicating normalized precondition useful and useless scores, zi being the i-th element in z, ++>Is->If the candidate precondition useful score and the useless score correspond to different tag attributes, determining the tag attribute of the candidate precondition according to the dividing result, and comparing the tag attribute with the existing tag, thereby realizing classification.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311490926.9A CN117808084A (en) | 2023-11-09 | 2023-11-09 | Pre-selection method based on graph reduction brief representation and graph neural network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311490926.9A CN117808084A (en) | 2023-11-09 | 2023-11-09 | Pre-selection method based on graph reduction brief representation and graph neural network |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117808084A true CN117808084A (en) | 2024-04-02 |
Family
ID=90432464
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311490926.9A Pending CN117808084A (en) | 2023-11-09 | 2023-11-09 | Pre-selection method based on graph reduction brief representation and graph neural network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117808084A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210150373A1 (en) * | 2019-11-15 | 2021-05-20 | International Business Machines Corporation | Capturing the global structure of logical formulae with graph long short-term memory |
CN115204372A (en) * | 2022-07-20 | 2022-10-18 | 成都飞机工业(集团)有限责任公司 | Precondition selection method and system based on item walking graph neural network |
-
2023
- 2023-11-09 CN CN202311490926.9A patent/CN117808084A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210150373A1 (en) * | 2019-11-15 | 2021-05-20 | International Business Machines Corporation | Capturing the global structure of logical formulae with graph long short-term memory |
CN115204372A (en) * | 2022-07-20 | 2022-10-18 | 成都飞机工业(集团)有限责任公司 | Precondition selection method and system based on item walking graph neural network |
Non-Patent Citations (1)
Title |
---|
兰咏琪等: "面向前提选择的新型图约简表示与图神经网络模型", 《计算机科学》, 26 September 2023 (2023-09-26), pages 193 - 199 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110263227B (en) | Group partner discovery method and system based on graph neural network | |
US11334791B2 (en) | Learning to search deep network architectures | |
CN111582443B (en) | Recommendation method based on Mask mechanism and level attention mechanism | |
CN111061856A (en) | Knowledge perception-based news recommendation method | |
CN114841257B (en) | Small sample target detection method based on self-supervision comparison constraint | |
CN112100392B (en) | Equipment fault tracing method based on reinforcement learning and knowledge graph | |
CN111310063A (en) | Neural network-based article recommendation method for memory perception gated factorization machine | |
CN110826639B (en) | Zero sample image classification method trained by full data | |
CN113807422A (en) | Weighted graph convolutional neural network score prediction model fusing multi-feature information | |
CN110659363A (en) | Web service mixed evolution clustering method based on membrane computing | |
CN111723285A (en) | Depth spectrum convolution collaborative filtering recommendation method based on scores | |
CN113326384A (en) | Construction method of interpretable recommendation model based on knowledge graph | |
CN114332519A (en) | Image description generation method based on external triple and abstract relation | |
CN115952456A (en) | Method, system, program product and storage medium for determining fault diagnosis model | |
CN115828143A (en) | Node classification method for realizing heterogeneous primitive path aggregation based on graph convolution and self-attention mechanism | |
CN116306923A (en) | Evaluation weight calculation method based on knowledge graph | |
CN115269861A (en) | Reinforced learning knowledge graph reasoning method based on generative confrontation and imitation learning | |
CN117194771B (en) | Dynamic knowledge graph service recommendation method for graph model characterization learning | |
CN117951375A (en) | Project recommendation method based on multi-task training project attribute diagram | |
CN117808084A (en) | Pre-selection method based on graph reduction brief representation and graph neural network | |
CN114925190B (en) | Mixed reasoning method based on rule reasoning and GRU neural network reasoning | |
CN115599918A (en) | Mutual learning text classification method and system based on graph enhancement | |
CN111813837B (en) | Method for intelligently detecting data quality | |
CN114862518A (en) | Intelligent clothing recommendation model establishing method and intelligent clothing recommendation method | |
CN114820074A (en) | Target user group prediction model construction method based on machine learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |