A knowledge acquisition method and system based on causal inference

By constructing a causal graph and introducing a dominant entity recognition model, combined with the Lattice-BERT model and multilayer perceptron, the problem of low accuracy in knowledge acquisition caused by neglecting causal relationships in existing technologies is solved, achieving more efficient knowledge acquisition and improved accuracy.

CN119476470BActive Publication Date: 2025-12-26PEKING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411381593.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-12-26
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

Existing knowledge acquisition methods neglect the causal relationships between events in process texts, leading to reduced accuracy in knowledge acquisition.

Method used

By constructing a causal graph between events, and combining the Lattice-BERT model and multilayer perceptron, the causal relationship between candidate steps and process text and the probability of dominant entities are calculated. A negative class threshold is set to accurately identify missing steps.

Benefits of technology

It improves the accuracy and reliability of knowledge acquisition, ensures that the insertion steps conform to causal logic, and enhances the accuracy and intelligence level of the system's judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476470B_ABST
    Figure CN119476470B_ABST
Patent Text Reader

Abstract

The application discloses a kind of knowledge acquisition method and system based on causal inference, belong to natural language processing field.The application first constructs causal graph by identifying the causal dependency between events in text.Then input process text containing missing steps and candidate steps, extract events and judge whether there is causal relationship by causal graph, and take relevant causal information as additional features.Calculate the probability of containing and not containing leading entity in candidate steps respectively, encode by two kinds of models, and calculate the probability of candidate steps as missing steps by combining multilayer perceptron.Finally, compare the probability of all candidate steps with negative class threshold, determine the candidate step that meets the conditions or judge that there is no correct step.The application additionally introduces the causal relationship between events, so as to realize more accurate knowledge acquisition capability.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of natural language processing, and particularly relates to a knowledge acquisition method and system based on causal inference. BACKGROUND

[0002] The knowledge acquisition method aims to mine useful information, such as events meeting specific restrictions, from a large amount of text. One of the difficulties in the field of knowledge acquisition is how to extract missing events in process text.

[0003] Process text is a description of a process, i.e. the movement or change of one or more entities within a period of time. Process text widely exists in daily life, and common popular science articles, product instruction manuals, and recipes that describe a scientific phenomenon are standard process text. These texts are usually composed of sentences arranged in chronological order, and each sentence represents a specific event. Therefore, process text can be regarded as a sequence of events related to one or more entities. Process text often has a missing problem, and the use of a knowledge acquisition method to extract missing events can help downstream systems better utilize process text to complete planning, question answering, and other tasks.

[0004] In process text, different events are arranged in chronological order, and events related to the same entity usually have a causal relationship, i.e. the necessary condition for the occurrence of a subsequent event is that the prerequisite event has been completed. However, existing knowledge acquisition methods usually ignore this causal relationship and only use semantic information of the text to achieve extraction, which can reduce the accuracy of knowledge acquisition. In order to obtain a more accurate knowledge acquisition method, it is necessary and effective to introduce the causal relationship between events. SUMMARY

[0005] In view of the technical problems in the prior art, the purpose of the present application is to provide a more effective knowledge acquisition method and system. The method combines causal inference technology, first constructs a causal graph between different events through a large amount of existing process text, and fully considers the causal relationship between the event and other events in the process text when extracting a missing event in a process text, thereby achieving more accurate knowledge acquisition capability.

[0006] The technical solution adopted by the present application to achieve the above purpose is as follows:

[0007] A knowledge acquisition method based on causal inference, comprising the following steps:

[0008] (1) Collect process text, identify the causal dependency relationship between events in the process text, and construct a causal graph of events;

[0009] (2) input a process text containing missing steps and a corresponding candidate step, extract events in the process text and the candidate step, determine whether there is a causal relationship between the candidate event and the existing event in the process text according to the extracted events and the causal graph, and if there is, the event is taken as an additional feature;

[0010] (3) calculate the probability of containing a dominant entity and not containing a dominant entity in each candidate step; for the case of not containing a dominant entity in the candidate step, encode the splicing result of the process text containing missing steps and the candidate step through a Lattice-BERT model, and then calculate the probability of the candidate step being a missing step in the process text through a multilayer perceptron; for the case of containing a dominant entity in the candidate step, encode the splicing result of the process text containing missing steps, the candidate step and the embedded representation of the additional feature through another Lattice-BERT model, and then calculate the probability of the candidate step being a missing step in the process text through a multilayer perceptron; combine all the probabilities of the two cases to obtain the final probability of each candidate step being a missing step in the process text;

[0011] (4) determine the size of the final probability corresponding to each candidate step and the preset negative class threshold value, if the final probability corresponding to all candidate steps is less than the negative class threshold value, it is determined that all candidate steps are not missing steps in the process text, otherwise the candidate step corresponding to the maximum final probability greater than the negative class threshold value is determined as the missing step in the process text.

[0012] Further, the step of identifying the causal dependency relationship between events in step (1) comprises:

[0013] Taking event a as the result, find all other events a' appearing before event a in the process text, and estimate the average causal effect ψ of events a and a' using the propensity score matching method a′,a , if ψ a′,a is greater than a preset threshold τ c , it is determined that event a' is the cause event of event a;

[0014] Taking event a as the cause, find all other events a' appearing after event a in the process text, and estimate the average causal effect ψ of events a and a' using the propensity score matching method a′,a , if ψ a′,a is greater than a preset threshold τ c , it is determined that event a' is the result event of event a;

[0015] Determine the causal dependency relationship between events according to the determined cause event and result event.

[0016] Further, in step (2), verbs in the process text and candidate steps are extracted, and entities and tools that accompany the action processing are extracted, and the extracted verbs, entities and tools constitute the event.

[0017] Furthermore, in step (2), each sentence in the process text is syntactically analyzed, and each verb in the syntax tree is treated as an event; if the verb has a nominal child node in the syntax tree, then the child node is the entity and tool of the action.

[0018] Furthermore, step (2) of determining whether there is a causal relationship between the candidate event and the existing events in the process text includes:

[0019] Extract events from the process text, including the set A of all events contained in steps preceding the missing step. before And the set A of all events contained in the steps following the missing step. after ;

[0020] Event a in the candidate extraction step choice Find a from the cause-effect graph choice Corresponding set of cause events and result event set

[0021] A before and Perform event matching; if a match is successful, it is assumed that there is a cause event for a candidate step in the process text.

[0022] Will and A after Perform event matching; if a match is successful, it is assumed that there is a result event of a candidate step in the process text.

[0023] The events that were successfully matched above will be treated as additional features.

[0024] Furthermore, step (3) involves calculating the probability of each candidate step containing a dominant entity and not containing a dominant entity, including:

[0025] Identify entities contained in all steps of the process text and use them as candidate dominant entities;

[0026] Using a pre-trained dominant entity recognition model, predict the probability P of each candidate dominant entity becoming the dominant entity. e ;

[0027] Each entity e in the candidate steps c Match with all candidate dominant entities, and select the entity e that matches each candidate dominant entity in the candidate step. c The entity e with the highest matching degreep Entity pairs (e) c ,e p Each entity e in the candidate steps c Corresponding to an entity pair (e) c ,e p );

[0028] For each entity pair (e c ,e p )), and the entity e p The corresponding probability P e As entity e c The probability of the dominant entity; the probability P of all entity pairs. e The highest probability is taken as the probability P(ing∈C) of containing the dominant entity in each candidate step. i );

[0029] The probability that no dominant entity is included in each candidate step.

[0030] Furthermore, in step (3), the additional features are encoded by a causal prefix encoder to generate corresponding embedding representations, which are then introduced into another Lattice-BERT model using a soft prompt during concatenation.

[0031] Furthermore, in step (3), all probabilities of the two cases are combined to obtain the final probability formula for each candidate step being a missing step in the process text:

[0032]

[0033] Wherein, ing represents the dominant entity, P(ing∈C) i ) indicates candidate step C i The probability of including the dominant entity; Indicates candidate step C i The probability that it does not include the dominant entity; P(C i |ing∈C i ) indicates that in candidate step C i Given the presence of a dominant entity, candidate step C i As the probability of a missing step; Indicating in candidate step C i Without a dominant entity, candidate step C i As the probability of a missing step.

[0034] Furthermore, in step (4), the negative class threshold is set to 0.4.

[0035] A knowledge acquisition system based on causal inference includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0036] The beneficial effects obtained by the present application are as follows:

[0037] 1.) The present application constructs a causal graph of events through a causal estimation method based on propensity score matching, accurately captures the causal dependency relationship between events, and avoids the incorrect event association that may be caused by relying only on time sequence or context information in traditional methods.

[0038] 2.) In the knowledge acquisition process, the causal guidance effectively verifies the rationality of the candidate steps, ensures that the inserted steps have antecedents and consequences that conform to the causal logic when filling in the missing steps in the process text, thereby improving the correctness of the reasoning result.

[0039] 3.) The present application introduces a dominant entity recognition model to evaluate whether the candidate steps contain a dominant entity, effectively improving the accuracy of candidate step matching, and further improving the accuracy of system judgment when the missing steps are related to the dominant entity.

[0040] 4.) The present application introduces the causal relationship between events in addition to the traditional knowledge acquisition method, increases causal guidance in the knowledge acquisition process by constructing a causal graph in a large number of process texts, enhances the understanding of causal information by the model, and improves the accuracy of missing step prediction and knowledge acquisition.

[0041] 5.) The present application accurately handles the "no correct answer" situation by setting a negative class threshold, avoids system errors in predicting steps, and further improves the reliability and intelligent level of the overall prediction. BRIEF DESCRIPTION OF DRAWINGS

[0042] Figure 1 A flowchart of the knowledge acquisition method based on causal inference in the embodiments. DETAILED DESCRIPTION

[0043] The present application will be further described in detail below in conjunction with the accompanying drawings, and the embodiments are only used to explain the present application and are not intended to limit the scope of the present application.

[0044] The present embodiment specifically discloses a knowledge acquisition method based on causal inference, the main process of which is as shown in Figure 1 The specific processing steps are explained as follows.

[0045] I. Causal graph construction:

[0046] In a reasonable procedure text, the order of events is not arbitrary because events affect the state of entities, such as shape and temperature. This method not only generates the necessary events but also places them in the correct positions. Specifically, it determines the correctness of the positions based on order constraints, that is, checking which events should be placed before the inserted event and which events should be placed after the inserted event. In other words, for each event 'a' to be inserted, it should be placed in the set of cause events. The set of subsequent and resulting events Previously, order constraints could be viewed as causal dependencies: The event in is the cause of a. The action in is the result of a.

[0047] This method, using sufficient pre-collected process text, employs a causal estimation technique based on propensity score matching to identify causal dependencies between events and construct a causal graph of events. Specifically, for two events a and a′ that have appeared in the recipe dataset, the average causal effect ψ between them is calculated. a′,a It can be calculated using the following formula:

[0048]

[0049] in This represents the instance in the opposite group of i that is most similar to i (here, an instance is a specific recipe). i a′ represents the value of the outcome of instance i. i z represents the value of the intervention for instance i. i L(z) represents the value of the confusion factor (Confounder) for instance i. i ) represents the propensity score for instance i.

[0050] Propensity score L(z) = P(a′) i =1|Z=z) is the intervention a′ given a set of observable confounding factors z. i The probability of taking a value of 1. In this method, events that appear before both events a and a' within any process text in the set are considered potential obfuscation factors, and an obfuscation factor set Z is constructed. For a specific process text instance i, the obfuscation factor z of instance i can be obtained by detecting whether the event in Z appears in i. i This method uses logistic regression to fit the L(z) function.

[0051] Calculate the average causal effect ψ of events a and a' a′,a After that, if ψ a′,a >τ c , put a' into as the result event. According to the results of the pre-experiment, this embodiment sets τ c to 0.1. The construction of the result event set is also similar, that is, taking event a as the cause, exhaustively taking every other event a' appearing after a in all process texts as a candidate result, and then repeating the above tendency scoring matching process to determine the result event and put it into .

[0052] II. Causal Guidance:

[0053] After the causal graph of events is constructed in the previous step, the causal graph can be used to judge whether the candidate option is reasonable when processing a specific process text.

[0054] After receiving the process text and the candidate step (Candidate Step), first normalize them into event sequences respectively. Each event can be formally written as (v, igs, tools), that is, taking a verb v as the core, usually accompanied by the entity igs and the tool tools of the action process. Specifically, this method will perform syntactic analysis on each sentence in the process text, and take each verb on the syntactic tree as an event. If this verb has a noun node on the syntactic tree, then these nodes are the entity and tool of the action. For example, the phrase "cut onions" will be converted into the action (cut, onion, ).

[0055] Input a process text missing a certain step and the corresponding candidate step, and record the events in the candidate step as a achoice , in the input process text, the set of all events in the step before the missing step is A before , and the set of all events contained in the step after the missing step is A after . In the causal graph constructed in the previous step, find the corresponding cause event set choice and the result event set . In order to explore whether there are potential cause events before the candidate step, match the events in A before and , as long as there is a match, it is considered that there is a cause event of the current candidate step in the original process text, which can be formally written as:

[0056]

[0057] The same method can be used to determine whether the result event of the current candidate step exists in the original process text:

[0058]

[0059] I cause and I effect This will be used as an additional feature in the regression prediction step below.

[0060] III. Entity-based guidance:

[0061] Missing steps in the process text are highly likely to contain entities that change state; in other words, if a candidate step does not contain a dominant entity, its likelihood of being a missing step in the input process text is significantly reduced. To model this dependency, candidate step C... i The probability P(C) of being the correct answer (i.e., the missing step) i The equation can be broken down into two parts: one containing the dominant entity and one not containing the dominant entity, as shown in the following formula:

[0062]

[0063] The above expression can be further expressed as the following expansion:

[0064]

[0065] Wherein, ing represents the dominant entity, P(C i ,ing∈C i ) represents a candidate step C containing the dominant entity. i The probability of it being the correct answer; Candidate step C that does not contain a dominant entity. i The probability of being the correct answer; P(ing∈C) i ) indicates candidate step C i The probability of including the dominant entity; Indicates candidate step C i The probability that it does not include the dominant entity; P(C i |ing∈C i ) indicates that in candidate step C i Given the presence of a dominant entity, candidate step C i As the probability of a missing step; Indicating in candidate step C i Without a dominant entity, candidate step C i As the probability of a missing step.

[0066] P(ing∈C iThe calculation steps of the probability P(Cing∈C) are as follows: first, all entities involved in the steps in the process text are identified, and these entities are listed as candidate leading entities. Then, a pre-trained leading entity identification model, i.e., a model trained based on Lattice-BERT, is applied to quantitatively evaluate the possibility of each candidate leading entity becoming a leading entity, and the probability P e of becoming a leading entity is obtained. i Then, the entities e c in the candidate step C c are analyzed to determine whether these entities match the entities in all steps in the process text. The matching adopts a comparative analysis method by comparing the entities in the candidate step with the entities in all steps in the process text to find the entity pair (e p , e c ) with the highest matching degree. For each selected entity pair (e p , e e ), the probability P i of the candidate leading entity becoming a leading entity is taken as the probability of the corresponding entity in the candidate step being a leading entity. Finally, since the candidate step may contain multiple entities, the possibility of all entities in the candidate step being leading entities needs to be considered. For this purpose, a maximum probability method is adopted, that is, the maximum value is selected from the probabilities of all entities being leading entities, and this maximum value represents the comprehensive probability of the candidate step containing a leading entity, i.e., P(ing∈C i ).

[0067] For the two cases of the candidate step C i containing and not containing a leading entity, two different Lattice-BERT models are used to model and P(C i |ing∈C i ), respectively.

[0068] For the case that the candidate step C i does not contain a leading entity, the process text containing a missing step and the candidate step are spliced together as the input of the Lattice-BERT model. Then, the sentence representation coded by the model is input into a multi-layer perceptron (MLP) for regression prediction to obtain the probability

[0069] For the case that the candidate step C cause contains a leading entity, in addition to the method of splicing the process text and the candidate step, an additional feature I effect and I, i.e. whether there exists a cause event or a result event of the event in the candidate step in the current process text, which is computed in the previous cause-guided step. This feature is introduced in the way of using Soft prompt. Soft prompt is a technique in natural language processing (NLP) used to guide large pre-trained language models (such as the GPT series). This method involves creating and using trainable embeddings as part of the model input to achieve specific guidance on the model's behavior. Specifically, the I cause and I effect are put into a causal prefix encoder CausalPrefix Emb as input, and the corresponding embedding representation is obtained, considering I cause and I effect The values of I cause and I effect are 0 or 1, so there are four different embedding representations, i.e. (I cause , I effect ) = (0, 0), (0, 1), (1, 0) or (1, 1). After concatenating the corresponding embedding representation with the word representation of the process text and the candidate step, they are put into another Lattice-BERT model for encoding. The sentence representation obtained after encoding is passed through an MLP for regression prediction to obtain the probability P(C i |ing∈C i ).

[0070] According to the four probabilities obtained by entity guidance and regression prediction, they are substituted into the expansion formula above, and the final probability P(C i ) of each candidate step as the missing step can be calculated.

[0071] IV. NA result prediction:

[0072] In the previous step, the probability of each candidate step as the correct answer was calculated, but this does not apply to the NA (Not Applicable) type of candidate step, i.e. none of the candidate steps is the correct answer (i.e. the missing step). Therefore, this method needs to handle this type separately during training and prediction. Specifically, this method sets a negative class threshold. When the probability of all non-NA candidate steps as the correct answer is less than this threshold, the model directly predicts "all the above answers are incorrect". Only when there is a candidate step with a probability greater than this threshold as the correct answer, that candidate step is taken as the final prediction result. When there are multiple candidate steps with a probability greater than this threshold as the correct answer, the one with the highest prediction probability among all candidate steps is taken as the final prediction result. This negative class threshold is a hyperparameter, and in this embodiment it is empirically set to 0.4.

[0073] Experimental test - knowledge extraction ability test:

[0074] The test data set used in this test is a process text based event extraction data set, which is in the form of multiple choice questions, choosing the missing event from four candidate event options. The test index is the extraction accuracy (Accuracy), that is, the frequency of the option with the highest prediction score as the standard answer. The test results are shown in Table 1.

[0075] Table 1) Effect of knowledge extraction method on process text based event extraction data set

[0076] Method Extraction accuracy Randomly selected answers 25% Baseline method (Lattice-Bert) 62.2% The invention 81.8%

[0077] From the test results in Table 1, it can be seen that the extraction accuracy of the causal inference based knowledge extraction method of the present application is as high as 81.8%, which is significantly improved compared with the accuracy of 25% of the baseline method of randomly selecting answers, and the accuracy of 62.2% of the baseline method using Lattice-BERT neural network but not introducing causal inference.

[0078] Although specific embodiments of the present application are disclosed for the purpose of illustrating the present application and enabling its practice by persons skilled in the art, it will be understood that various substitutions, changes and modifications can be made by those skilled in the art without departing from the spirit and scope of the present application and the appended claims. Therefore, the present application should not be limited to the disclosed best mode, and the scope of the present application is defined by the scope of the claims.

Claims

1. A method for knowledge acquisition based on causal inference, characterized by the steps of Comprise: (1) Collecting process text, identifying the causal dependency relationship between events in the process text, and constructing a causal graph of the events; (2) input a process text containing a missing step and a corresponding candidate step, extract events in the process text and the candidate step, and determine whether there is a causal relationship between the candidate event and the existing event in the process text according to the extracted events and the causal graph; wherein, extracting events in the process text includes extracting all event sets A before contained in the steps before the missing step after and all event sets A choice contained in the steps after the missing step; extracting events a choice in the candidate step, finding the corresponding cause event set a and the result event set a from the causal graph, performing event matching on A before and a , if the matching is successful, it is considered that there is a cause event of the candidate step in the process text, and the formal representation is performing event matching on a and A after , if the matching is successful, it is considered that there is a result event of the candidate step in the process text, and the formal representation is I cause and I effect are taken as additional features; (3) Calculate the probability of each candidate step containing a dominant entity and not containing a dominant entity; For the case where the candidate step does not contain the dominant entity, the splicing result of the process text containing the missing step and the candidate step is encoded by a Lattice-BERT model, and then a multilayer perceptron is used to calculate the probability that the candidate step is the missing step in the process text; For the case where the candidate step contains the dominant entity, the splicing result of the process text containing the missing step, the candidate step and the embedding representation of the additional features is encoded by another Lattice-BERT model, the additional features are encoded by a causal prefix encoder to generate corresponding embedding representation, and the embedding representation is introduced into another Lattice-BERT model using soft prompt; Then a multilayer perceptron is used to calculate the probability that the candidate step is the missing step in the process text; Merge all probabilities of the two cases to get the final probability that each candidate step is the missing step in the process text; (4) Determine the size of the final probability corresponding to each candidate step and the preset negative class threshold value, if the final probability corresponding to all candidate steps is less than the negative class threshold value, it is determined that all candidate steps are not missing steps in the process text, otherwise the candidate step corresponding to the maximum final probability greater than the negative class threshold value is determined as the missing step in the process text.

2. The method of claim 1, wherein, The step of identifying the causal dependency relationship between events in step (1) comprises: With event a as the result, find all the process text appearing before event a of each other event a', using the propensity score matching method to estimate the average causal effect ψ of event a and a' a′,a If ψ a′,a is greater than a preset threshold τ c , then determine event a' as the cause event of event a; Find all other events a' that occur after event a in the process text, and estimate the average causal effect ψ of event a and a' using the propensity score matching method a′,a If ψ a′,a is greater than a preset threshold τ c , then determine that event a' is a result event of event a; Determine the causal dependency relationship between events according to the determined cause event and result event.

3. The method of claim 1, wherein, In step (2), extract the verbs in the process text and the candidate step, and extract the entities and tools accompanying the action processing, and form events from the extracted verbs, entities and tools.

4. The method of claim 3, wherein, In step (2), perform syntactic analysis on each sentence in the process text, and take each verb on the syntactic tree as an event; If the verb has a noun node on the syntactic tree, the node is the entity and tool of the action.

5. The method of claim 1, wherein, The step of calculating the probability of each candidate step containing a dominant entity and not containing a dominant entity in step (3) comprises: Identify all entities contained in the steps in the process text as candidate dominant entities; using a pre-trained dominant entity recognition model, predicting a probability P that each candidate dominant entity is a dominant entity e ; Selecting the candidate step with the highest matching degree c Selecting the candidate step with the highest matching degree c Selecting the candidate step with the highest matching degree p Selecting the candidate step with the highest matching degree c Selecting the candidate step with the highest matching degree p Selecting the candidate step with the highest matching degree c Selecting the candidate step with the highest matching degree c Selecting the candidate step with the highest matching degree p Selecting the candidate step with the highest matching degree For each entity pair (e c ,e p ), and the entity e p The corresponding probability P e As entity e c The probability of the dominant entity; the probability P of all entity pairs. e The highest probability is taken as the probability P(ing∈C) of containing the dominant entity in each candidate step. i ), ing indicates the dominant entity, C i Indicate each candidate step; Probability that no dominant entity is included in each candidate step 6. The method of claim 1, wherein, In step (3), the formula for merging all probabilities of the two cases to get the final probability that each candidate step is the missing step in the process text is: Wherein, ing represents the dominant entity; P(ing∈C) i ) indicates candidate step C i The probability of including the dominant entity; Indicates candidate step C i The probability that it does not include the dominant entity; P(C i |ing∈C i ) indicates that in candidate step C i Given the presence of a dominant entity, candidate step C i As the probability of a missing step; Indicating in candidate step C i Without a dominant entity, candidate step C i As the probability of a missing step.

7. The method of claim 1, wherein, In step (4), the negative class threshold value is set to 0.

4.

8. A causal inference based knowledge acquisition system, characterized by, A computer program product comprising a memory storing a computer program and a processor for executing the computer program to implement the steps of the method of any one of claims 1-7. A computer program product comprising a memory storing a computer program and a processor for executing the computer program to implement the steps of the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Method and system for extracting causal relationships between affairs

    CN113822043A

  • Causal event pair processing method and device, computer equipment and storage medium

    CN117094391A