An efficient data-driven theory revision system

Abstract: A computer system takes as input an initial fault hierarchy KB 0 and a set of annotated session transcripts C = {〈π j , r j 〉 } and is given a specified set of revision operators T = { i } where each  i ∈ T maps a fault hierarchy KB to a slightly different hierarchy  i ( KB ). The computer system uses T to hill climb from the initial fault hierarchy KB 0 , through successive hierarchies, KB 1 ... KB m , with successively higher empirical accuracies over C. At each stage, to go from a fault hierarchy KB k to its neighbor KB k+1 , the computer system must evaluate KB k 's accuracy over C , as well as the accuracy of each KB ' ∈ N( KB k ). The computer system provides an efficient way of evaluating the accuracy of KB k , and each  i ( KB k ), towards determining which, if any,  i ( KB k ) is more accurate than KB k . It exploits a few key observations. First, as each transformation used to map one hierarchy to a related one performs only local changes to the hierarchy, it will have only minor and easily computed effects on any instance. Second, most transformations will have no effect on many instances. Finally, one can bound how much the accuracy score for a knowledge base can change based on any instance, which means branch-and-bound techniques can be used to avoid computing the accuracy scores for various hierarchies that cannot be optimal.

Description: Background of the Invention Field of the Invention The present invention relates to a part of a "theory revision" system that identifies a revision which produces a theory with highest accuracy and more particularly, to a system that efficiently uses a given set of annotated session transcripts and a given set of possible theory-to-theory revision operators to modify a given theory, encoded as a fault hierarchy, to form a new theory that is optimally accurate. Description of the Prior Art Many expert systems use a fault hierarchy to propose a repair for a device based on a set of reported symptoms test values. Unfortunately, such systems may return the wrong repair if their underlying hierarchies are incorrect. A theory revision system uses a set, C , of "labeled session transcripts" (each transcript includes answers to the tests posed by the expert system and the correct repair as supplied by a human expert) to modify the incorrect fault hierarchy, to produce a new hierarchy that will be more accurate. Typical revision systems compare the initial hierarchy, KB , with each of its neighbors in N(KB) = { KB k }, where each KB k is formed from KB by performing a single simple revision, such as deleting a connection between a pair of fault nodes, or altering the order in which some fault nodes are considered. These revision systems will climb from KB to a neighboring KB* ∈ N ( KB ) if KB *'s empirical accuracy over C is significantly higher than KB 's. There are many theory revision systems described in the machine learning literature. Most resemble the present invention by using a set of transformations to convert one theory to another. Many of the other systems, however, focus on Horn clause knowledge bases or decision trees; representations that are not particularly suited to deployed application systems. It is an object of the present invention to use the widely deployed fault hierarchy representation. Further, the modifications suggested by existing theory revision systems could result in theories which would be rejected by domain experts. It is a further object of the present invention to suggest modifications which preserve the structure of the fault hierarchy, and so are more likely to be acceptable to domain experts. Finally, these prior art systems assume that the training data (i.e., the annotated session transcripts), used to decide which knowledge base is most accurate, will include answers to all relevant tests. This is not realistic in many standard situations, where each training instance includes only the minimal amount of information required to reach an answer, relative to a particular theory. In contrast, the DELTADELTA system of the present invention is designed to evaluate any theory's accuracy, even with incomplete data. Moreover few of these systems are concerned with computational efficiency. In particular, the obvious way to implement each hill climbing step involves first empirically evaluating the initial KB and each KB i ∈ N ( KB ), over the entire set of case reports. However, it can be very expensive to evaluate a single hierarchy on a single report, and worse, there can be a great many reports and huge number of neighbors. It is an object of the present invention to provide an efficient way to determine which KB i ∈ N(KB) has the highest empirical accuracy, if that accuracy is great than KB's . ARTIFICIAL INTELLIGENCE, vol. 35, no. 2, June 1988, pages 197-226, XP000052393 GINSBERG A ET AL: 'AUTOMATIC KNOWLEDGE BASE REFINEMENT FOR CLASSIFICATION SYSTEMS' discloses an automatic knowledge base refinement for classification systems. This refinement is carried out (normally for medical diagnosis) by first selecting which given diagnosis is to be refined, refining rules used to arrive at the diagnosis and then incorporating the refinement with the best results in the knowledge base. The invention is defined in the independent claims, to which reference should now be made. Further advantageous features are detailed in the dependent claims. Summary of the Invention The present invention is a computer system, known as DELTADELEA, which takes as input an initial fault hierarchy KB 0 and a set of annotated session transcripts C = { 〈π,r j 〉 }, where π j includes the answers to all tests presented to the expert system, and the correct repair r j is supplied by a human expert. The present invention is given a specified set of revision operators T = { i } where each  i ∈ T maps a fault hierarchy KB to a slightly different hierarchy  i ( KB ). This revised fault hierarchy  i ( KB ) is called a neighbor of KB , and the set of all neighbors of KB , N( KB )={ i ( KB )}, is KB 's neighborhood. The present invention uses T to hill climb from the initial fault hierarchy KB 0 , through successive hierarchies, KB 1 ... KB m , with successively higher empirical accuracies over C; the final hierarchy, KB m , is a local optimum in the space defined by the revision operators. At each stage, to go from a fault hierarchy KB k to its neighbor KB k+1 , the present invention must evaluate KB k 's accuracy over C, as well as the accuracy of each KB ' ∈ N( KB k ). Let KB* be the hierarchy with the largest empirical accuracy. If this KB* is more accurate than KB k , this KB* hierarchy becomes the new standard, labeled KB k+1 , and the theory revision process iterates, seeking a neighbor of this KB k+1 , that is more accurate than KB k+1 over the set of examples C, and so forth. Otherwise, if no KB' is more accurate than KB k , the hill climbing process will return this KB k , and terminate. The present invention differs from the Delta system, described in intermediate document EP-A-0783151 by providing an efficient means for evaluating the accuracy of a set of knowledge bases, KB ' ∈ N( KB k ). If the labeled session transcripts C = {〈π j ,r j 〉} are complete (that is, each c j ∈ C contains answers to every possible test in KB ) then it is straightforward to evaluate KB 's empirical accuracy over C . In practice, however, C is typically incomplete, as each π j contains only a small subset of the test values in KB . The theory revision system of the present invention provides a way of evaluating the empirical accuracy of KB , and each KB' ∈ N( KB ), even when C is incomplete. Moreover, the evaluator (within the theory revision system) of the present invention provides an efficient way of evaluating the accuracy of KB k , and each  i (KB k ), towards determining which, if any,  i ( KB k ) is more accurate than KB k . It exploits a few key observations. First, as each transformation used in the present invention to map one hierarchy to a related one performs only local changes to the hierarchy, it will have only minor, and easily computed, effects on any instance. Second, most transformations will have no effect on many instances. Finally, one can bound how much the accuracy score for a knowledge base can change based on any instance, which means branch-and-bound techniques can be used to avoid computing the accuracy scores for various hierarchies that cannot be optimal. For these reasons, a straightforward analysis allows for the system to avoid a great deal of brute-force empirical computation. Brief Description of the Drawings Figure 1 illustrates an overall theory revision task that utilizes the present invention. Figure 2 illustrates the structure of a fault hierarchy ( KB 0 ) used by one embodiment of the present invention. Figure 3 illustrates the EVALKB and EVALNODE Subroutines of one embodiment of the present invention. Figure 4 illustrates the AccKB Subroutine of one embodiment of the present invention. Figure 5 illustrates that nodes can be dependent, even if distinct tests are independent. AccNODE* will correct this problem. Figure 6 illustrates the AccNODE* Subroutine of one embodiment of the present invention. Figure 7 illustrates the dependencies between parent and child nodes, which will cause AccNODE* Subroutine to produce incorrect response. Figure 8 illustrates the DELTADELTA Subroutine of one embodiment of the present invention. Figure 9 illustrates the RTP and RTM Subroutines of one embodiment of the present invention. Figure 10 illustrates the initial KB before and the subsequent KB after hierarchies used by one embodiment of the present invention. Figure 11 illustrates the RTI_ELIGIBLE and associated Subroutines of one embodiment of the present invention. Figure 12 illustrates the information required by any single step in the theory revision process. Detailed Description of the Invention Figure 1 illustrates the overall theory revision task. The overall task is also described in U.S Patent Application, Serial No.08/583,249, entitled "The Delta Learning System For Using Expert Advice To Revise Diaqnostic Expert System Fault Hierarchies", Filed January 5, 1996, assigned to the same assignee as the present invention (or intermediate document equivalent EP-A-0783151) to which reference may be made. Given a knowledge base 11 KB and user feedback (a set of training examples, each a session transcript 12 annotated by a correct answer) a theory revision system 13 produces a new knowledge base KB' which exhibits better performance over the training examples. In more detail, session transcripts 12 are collected after deploying the expert system 14 to field users 15. Each transcript 12 will include answers to the tests requested by the expert system 14 as well as the repair suggested by the expert system 14. When appropriate (such as when the suggested repair is incorrect), a domain expert 16 will annotate these transcripts to indicate missing tests and appropriate repairs. The theory revision system 13 (such as the present invention) uses these annotated transcripts as training data to suggest revisions to the knowledge base 11. Finally, the domain expert 16 evaluates these revisions to decide whether to incorporate them into the knowledge base 11 which can then be redeployed. Many currently deployed expert systems use a fault hierarchy to propose a repair for a device, based on a set of reported symptoms. Unfortunately, due to modifications of the basic devices, new distribution of faults as the device ages and the installation of new devices, as well as errors in the original knowledge base, these proposed repairs may not always be the correct repair. A "theory revision" system uses a set of "labeled session transcripts" to modify the incorrect fault hierarchy to produce a new hierarchy that is more accurate. As no efficient algorithm is guaranteed to find the globally-optimal hierarchy, many projects implement their theory revision systems as a hill-climbing process that climbs, in a series of steps, to a hierarchy whose accuracy is locally optimal. On each step, each such system computes the empirical accuracy, relative to the given set C of labeled session transcripts, of the current hierarchy KB and each of KB 's "neighbors", N(KB) = {KB k } , where each neighbor KB k ∈ N(KB) is a slight modification of KB . The theory revision system then selects the neighbor KB* ∈ N(KB) with the highest empirical accuracy and if KB* 's accuracy is greater than KB 's, the theory revision process iterates. It then compares this KB* with each of its neighbors and climbs to any neighbor that is better. If the labeled session transcripts C = {〈π j , r j 〉}, are complete (that is, each c j ∈ C contains answers to every possible test in KB ) then it is straightforward to evaluate KB 's empirical accuracy over C . In practice, however, C is typically incomplete, as each π j contains only a small subset of the test values in KB . The theory revision system of the present invention provides a way of evaluating empirical accuracy of a fault hierarchy and each of its neighbors, relative to a given set of labeled session transcripts, even when the transcripts are incomplete. The present invention provides an efficient way of evaluating the empirical accuracy of a fault hierarchy and each of its neighbors, relative to a given set of labeled case reports. This application will provide the framework for the present invention, by describing the operation of the underlying expert system and summarizing the theory revision task. It will next describe ways of implementing a theory revision system for this task: first summarizing the obvious exhaustive algorithm, then providing the insights that lead to a more efficient "data-driven" theory revision system and finally describing the DELTADELTA algorithm of the present invention. The following defines the structures of both fault hierarchies and of problem instances and then describes how a fault-hierarchy-based expert system works: by evaluating a hierarchy in the context of an instance to produce a repair. Each fault hierarchy KB = 〈 N , E, TS, R, t (·), r(·), child(·,·)> is a directed-acyclic forest 〈 N , E 〉, whose nodes, N , represent faults, and whose edges, E , connect faults to subordinate faults. Each node n ∈ N is labeled with a test t(n)=t or t(n)= ¬ t, where t ∈ TS. In addition, each leaf node is also labeled with a "repair", r(n)=r ∈ R . The arcs under each internal node are ordered; child(n,i) refers to the " i th child of n ". To simplify the notation, let the k:N → Z + function map each node to its number of children, and let the l: N → Z + function map each node to its number of parents. For example, consider the hierarchy shown in Figure 2, where the test associated with the node χ is T χ . Hence, the test associated with the A node is T A , etc. The r χ expression is the repair labeling the associated leaf node χ. Hence, the repair associated with the node D, whose test is T D , is r D . A 's children are, in order, C, D and E. Hence child(A, 1)=C, child(A, 2)=D and child (A, 3)=E . Here, k(A)= 3. Similarly, l (A) = 1. When run, the expert system that uses the KB hierarchy, called S KB , will ask the user a series of questions. These questions correspond to a depth-first, left-to-right, no-backtrack traversal of (part of) the KB structure. Here, S KBo begins at the root, and asks the question associated with that node; here "Is T z true?". If the user answers "yes", S KBo descends to consider Z 's children, in left-to-right order, here next asking "Is T A true?". If the user responds "Yes", S KBo will descend to A 's children. If the user answers T c with "No", S KBo will continue to C 's sibling D, and ask about T D . Assuming the user responds "Yes" here, S KBo will return the repair associated with that leaf node, D, here r D . On the other hand, if the user had responded "No" to T D , S KBo would have continued to ask about T E . If this answer was "Yes", S KBo would return r E . Otherwise, if this answer was also "No", S KBo would return the "No-Repair-Found" answer, r ⊥. N.b. , S KBo will not then continue to B; answering T A with "Yes" means the user will only consider tests and repairs under this node. Ignoring the details of the actual user-interaction, each "total problem instance" is an assignment π : TS → {+,-} that maps each test to one of {+,-}, where "+" means the test was confirmed (passed), and "-" means the test was disconfirmed (failed). Given an instance π, S KB will return a repair r ∈ R, written as EVALKB( KB , π)= r. This r is the value returned by EVALNode (ROOT (KB), π), using the EVALNode subroutine shown in Figure 3, where n root = ROOT(KB) is KB 's root. On calling EVALNode, it is assumed that the test associated with n root has already been confirmed, i.e., that π(t(n root )) = +. This test t(n root ) is viewed as the symptom or triggering information. S KB only considered using this subtree after it observed this test value. It is also assumed that the root's test has been confirmed when dealing with the AccKB subroutine defined below. The accuracy of the hierarchy KB for the instance π is where the correct answer to the instance is r cor ∈ R . (This r cor repair is often supplied by a human expert.) In general, such a pair 〈π ,r cor 〉 will be referred to as a "labeled (total) problem instance". Over a set of labeled instances (a.k.a. session transcripts) C = {〈π i , r i 〉} i , KB's (empirical) accuracy is The average accuracy is this value divided by the number of examples, | C |. These computations assume that S KB is always able to obtain answers to all relevant tests. This is not always true in the theory revision context. Here, the theory revision system may only know some of the required answers. To allow us to consider the results an expert system might produce in such contexts, we use a "partial problem instance" π : TS → {+,-,?} where "π( t ) = ?" means that the value of the test t is not known. Each such partial instance π really corresponds to some total instance π', where certain test values are not observed. To state this more precisely, say that the total problem instance π': TS → { +,- } is a completion of π if π' agrees with π whenever π( t ) is categorical (i.e., is not "?"): π' completes π iff [π( t) ≠ ? ⇒ π'( t )=π(t)] Hence the total instance π T1 = {T Z / +, T A / +, T B / -, T C / - , T D / +, T E / +, T F / - } is a completion of the partial instance π P1 = {T Z / +, T A / +, T B / ?, T C / -, T D / +, T E / ?, T F / ?} . Let omplete(π) = {π': TS → {+,-}| π' completes π} refer to the set of total instances that complete a given partial instance. In general, the probability Pr [π'|π] that the observed partial instance π corresponds to the total instance π'∈ Complete(π) depends on the probability that each unobserved test t (i.e. where π( t ) = "?") has the specified value π'( t ). Here, the probability that the observed π P1 corresponds to the actual total π T1 depends on the probabilities that T B = -, T E = + and T F = -. It will be assumed that these tests are independent (of each other and other context) which means this conditional probability can be expressed in terms of the probability function p:TS →[0,1], where p ( t ) is the probability that the unobserved test t would succeed, if only it had been run and reported. Notice that each π' ∈ Complete(π) has an associated repair, r π , = EVALKB ( KB ,π'); we can therefore use the p (·) values to compute the probability that S KBo will return each r π' , given the observed values π. In general, we will need to compute the probability that S KBo will return the correct repair r cor , Pr [ S KBo returns r cor |π observed]. As this quantity corresponds to acc(KB, 〈π, r cor 〉) when π is a total instance, acc (·,·) can be extended to be this probability value in general, even when π is a partial instance. (The p (·) function is implicit in this acc(KB, 〈π, r cor 〉) description.) The AccKB subroutine illustrated in Figure 4 computes this accuracy score, for a partial problem instance π. It returns the correct value whenever the tests associated with the nodes are independent; i.e., if the event that one node's test t(n) is confirmed is independent of whether any of the other node's test t(n') was confirmed. Unfortunately, this is not always the case. If all nodes are labelled with different tests (i.e., n ≠ n' implies t (n) ≠ t(n')) , then this condition holds whenever the tests are independent - which can be assumed. However, this independent node condition can fail if different nodes are labelled with the same test, even if the tests are independent. For example, consider the structure shown in Figure 5, where n 1 = child(n,1) is labeled with the test t 1 , n 2 = child(n,2) is labled with test ¬t 1 and n 3 's repair is the correct r cor ; and assume S KB has reached and traversed this top n with probability 1 ( i.e. , the t 0 test is known to succeed). Here AccKB will compute that the probability of reaching n 3 = child (n, 3) is (1- p (t 1 )) x p (t 1 ), which suggests the probability of success is p (t 3 )x[(1- p (t 1 ))x p (t 1 )]. Of course, the real probability of this event is 0. Unfortunately, for general dag-structures, the task of computing the probability of reaching any particular repair and hence of computing acc ( KB , c ) is NP-hard. It cannot be expected to have an efficient algorithm that will compute the correct answer in every situation. Instead, algorithms can be utilized that work correctly in many typical situations. The present invention therefore uses a slight extension to the AccKB subroutine, called AccKB* and shown in Figure 6, that maintains the dependencies across sibling nodes, and so will correctly handle the case mentioned above. However, it does not maintain other dependencies, meaning it may not return the correct answer if, say, both n and n 1 = child (n, 1) are each labeled with t 1 , where π(t 1 ) = "?" as shown in Figure 7. Here AccKB*, like AccKB, would claim that the probability of reaching the r cor repair, assuming it reached n , is p(t 1 ) x p(t 1 ); the correct value of course is simply p(t 1 ) . The following will describe the theory revision task. The main DELTADELTA routine (Figure 8) takes as input an initial hierarchy KB 0 and a set of labeled session transcripts, C = { c j }. DELTADELTA uses a set of transformations, T = { k }, where each  k maps one hierarchy to another. DELTADELTA considers four classes of revision operators: each Delete par,n revision operator deletes the existing link between the node par and its child node n. Hence, Delete B,E (KB 0 ) is a hierarchy KB 1 that includes all of the nodes of KB 0 and all of its arcs except the arc from B to E . Hence, in KB 1 , child(B, 1) = F. Notice that this deletion implicitly redefines the child(·,·) function. each Add par,n,i revision operator adds a new link between par and n as the i th arc under par. Hence, the hierarchy KB 2 = Add A,F,2 ( KB 0 ) includes all of the nodes and arcs in KB 0 and an additional arc from A to F, coming after 〈 A,C 〉 and before 〈 A,D 〉. Hence, in KB 2 , child (A, 1)=C, child(A,2)=F, child (A, 3)=D and child(A, 4)=E. Notice, Delete A,F (Add A,F,2 (KB 0 )) ≡ KB 0 . each Move par1,par2,n,1 revision operator both deletes the existing link between par1 and n, and then adds a link from par2 to n , as the i th arc under par2 . Hence, Move par1,par2,n,i (KB) = Add par2,n,i (Delete par1,n (KB)) . each Switch par,n1,n2 revision operator switches the order of the links from par to n1 , and from par to n2 . Notice each Switch n1,n2,par revision operator corresponds to at most two move revision operators. Figure 10 illustrates the effects of applying the revision operator Add A,B,1 to the fault hierarchy, KB before · Notice that each operator has an associated operator that can undo the effects of the operator. For instance applying the operator Delete A,B to KB after in Figure 10, will restore the fault hierarchy to KB before . Let N(KB) = { 1 (KB) |  1 ∈ T) be the set of KB 's neighbors. DELTADELTA begins each hill climbing step with a particular knowledge base, KB_i. It then needs to determine whether any KB ' ∈ N(KB_i) is better than KB_i; that is, whether any KB' has a higher empirical accuracy, over a set of labeled instances C = {〈π j , r j 〉}. (If so, DELTADELTA will climb from KB_i to the KB* ∈ N(KB) with the highest empirical accuracy.) Computing this optimal KB* implicitly requires obtaining the | C | values of { acc(KB, c j )} cj ∈ C to compute acc(KB, C), and also computing the | C | x |T| values of {acc( 1 ( KB ), c J )} for each  i ∈ T and each c j in C , to compute the |T| values of {acc( i ( KB ), C )} i , and then determining which (if any) of these values exceeds acc(KB, C). One algorithm for this task, would first load in the KB hierarchy, then use the resulting S KB to evaluate EvalKB (KB,π j ) for each (π j , r j ) ∈ C to compute first the values of acc(KB, π j ) and then their sum acc(KB,C) = Σ j acc ( KB ,〈π j , r j 〉). It would then build KB 1 =  1 ( KB ) by applying the first revision operator  1 to KB , then load in this hierarchy to obtain S KB1 , and once again consider the |C| instances {〈 π j ,r j 〉} to compute acc ( KB 1 , C ). Next, it would produce KB 2 =  2 ( KB ), and go through all | C | instances to produce acc(KB 2 , C); and so forth, for all | T | transformations. In essence, this involves sequentially computing each row of the matrix shown in Figure 12. The revision algorithm would then determine the largest of these KB* = argmax i {acc(KB i , C) } , and climb to this KB* hierarchy if acc(KB*, C) > acc( i (KB),C) . This can be very expensive as (1)computing each acc(KB i 〈π j ,r j 〉), requires evaluating a hierarchy on an instance, which can be expensive; and worse,(2) both | T | and | C | can be huge, e.g., in one study, values of | T | ≈ 10,000 were often found. There are two basic ideas for improving the efficiency: The first is to evaluate fewer of the { acc ( i ( KB ), c j )} i,j entries; below are three techniques for this. The second is to provide a more efficient way to compute this quantity. For reasons explained below, we will actually use the equally-useful values diff'(, c) = acc (  ( KB ), c ) - acc ( KB, c) Diff(, k ) = Σ j = l .. k diff'[, c j ) which is the difference in accuracy between (KB) and KB , on instance c (resp., the relative score for the transformed (KB ) knowledge base, after k instances). The resulting DELTADELTA system is sketched in Figure 8. The first idea, called RT I , is to restrict the transformations, based on instance 〈π j , r j 〉 being considered. This idea exploits the particular set of transformations that are being considered. This is done by using observations that, for almost every π j , the value of acc( i ( KB ), 〈π j , r j 〉) is equal to acc ( KB, 〈π j , r j 〉) for a great many  i 's. This means that most transformations  i do not influence whether a hierarchy will be correct on an instance. As an illustration, consider the KB 0 hierarchy (Figure 2) and the partial instance π 1 = { t (Z)/+, t (A)/+, t (C)/-, t (D)/+} that confirms t (Z), t (A), and t (D) and disconfirms t (C); here, S KBo returns r D = EVALKB( KB 0 ,π 1 ). (Notice S KBo would only ask about these 4 tests, and only record their values. The other tests would not be asked, as their values do not matter here; hence, π 1 maps each other test to "?".) Now consider the Delete B,E transformation that deletes the 〈 B,E 〉 arc, and observe that, as the original KB 0 arrives at its answer ( r D ) before ever reaching B , this new KB 1 = Delete B,E ( KB 0 ) will also reach the same decision; here r D . As EVALKB( KB 0 , π 1 ) = EVALKB ( KB 1 , π 1 ), clearly acc ( KB 0 ,〈π 1 ,r〉) = acc ( Delete B,E ( KB 0 ),〈π 1 ,r〉). (Notice this does not depend on whether r D was the correct answer: if KB 0 was correct on π 1 , then so is KB 1 ; likewise, if KB 0 was incorrect on π 1 , then so is KB 1 .). Now consider other deletions, such as deleting either the 〈 B,F 〉 or the 〈 A,E 〉 arc; by the above argument, we see immediately that acc 〈KB 0 , 〈π 1 , r 〉) = acc ( Delete B,F ( KB 0 ), 〈π 1 , r 〉) = acc ( Delete A,E ( KB 0 ), 〈π 1 , r 〉). Notice that deleting 〈A,C 〉 has no effect, as the C node was disconfirmed anyway. (Here, as we are only considering the accuracy of the hierarchy, and not its efficiency, evaluating the extra T c test is not an issue.) It should be clear that the only deletions that might make a difference here (i.e., produce a hierarchy KB ' = Delete(KB 0 ) whose accuracy on π 1 might be different than KB 0 's) are deleting 〈Z,A〉 and 〈A,D 〉. (Of course, it is still possible that acc(Delete z,A (KB 0 ) , 〈π 1 ,r 〉 = acc(KB 0 , 〈π 1 ,r 〉). For example, if the correct repair r c , then both systems will have the score of 0. This can also happen if there are several paths in the initial hierarchy that lead to the same correct node, or if the hierarchy includes different nodes with the same repair, etc.) Similar claims for adding new links can also be considered. As S KB0 never reached B , a new hierarchy that includes a new link from B to anything will return the same r D in instance π 1 , meaning acc ( Add B, χ1,χ2 (KB 0 ) , 〈π 1 , r 2 〉)= acc ( KB 0 , 〈π 1 , r 2 〉) for any node χ 1 and index χ 2 . Similarly, as S KB0 descends to A's second child, Add A,χ,3 also has no effect, for any new child χ. There is also no effect if we add a link from A to some other node, say W , if W 's test fails (i.e., if π 1 (t(W))=-), independent of where Add A,W ,i adds this new link. Here, the only addition transformations Add that might make a difference are the ones that produce new hierarchies KB 2 = Add ( KB 0 ) that cause the S KB 2 to take a different path, by descending from a node that could be reached (such as Z or A) to a node that could be confirmed. Similarly, most Move and Switch transformations have no effect as well, in particular, Move par1,par2,n,i is guaranteed to have no effect whenever both Delete par1, n and Add par2,n,i have no effect. Stated more precisely, DELTADELTA will only consider the subset of the transformations, returned by the RTI_ELIGIBLE routine, call them RT I (T,N,c k ), which excludes many transformations  for which diff' (, c j ) = 0. In one embodiment of the present invention, the RTI_ELIGIBLE subroutine (see Figure 11) returns a set of transformations, based on the initial fault hierarchy KB and annotated case <π, r>, which includes: Delete(par, n) whenever n is currently a child of par, the status of the test associated with par (resp., n) is either + or ? (ie, π( t(par) ) ∈ {+, ?}), and par will be reached (ie, τ(par) > 0, using the τ(.) function defined below). Add(par, n, i) whenever the status of the test associated with par (resp., n) is either + or ? i is between 0 and k(par), par will be reached (ie, τ(par) > 0) n is not already a child of par, and adding n under par will not cause a cycle. Switch(par, n1, n2) whenever both n1 and n2 are children of par the status of the test associated with par (resp., n1, n2) is either + or ? par will be reached (ie, τ(par) > 0). Move(par1, par2, n, i) whenever Add(par2, n, i) is legal, based on above specifications Delete(par1, n) is legal, based on above specifications In addition, Move(par1, par2, n, i) is allowed even if a cycle is introduced by the Add(par2, n, i), provided it is broken by the Delete(par1, n) operation. The second insight, called RT P for "restricting the transforms based on a positive score", comes from two observations: First, DELTADELTA will only climb from KB to the transformed theory KB * = ( KB ) if KB *'s empirical score, after all M instances, is strictly greater than KB 's; ie if Diff(, M ) > 0. Second, as acc (( KB ), c k ) ≤ 1, the difference between Diff( i , k ) and Diff( i , k-1 ) can be at most Diff(, k ) - Diff ( ,k-1 ) = acc (  ( KB ), c k ) - acc ( KB, c k ) ≤ 1- acc ( KB , c k ) This trivially means that Diff(  , M ) ≤ Diff(  , k ) + Err_k, where Err k = Σ M j=κ+1 (1 .. acc ( KB, 〈π j , r j 〉)) is the total error of KB on the remaining M-k instances. If Diff(, k ) ≤ - Err k , then clearly Diff( , M ) ≤ 0, which means DELTADELTA will not climb to  ( KB ). Hence, RT P ( KB,N ,Err k ,Diff(· ,k )} = { i ∈ N | Diff( i , k ) > - Err k } This is implemented by the RT P subroutine, shown in Figure 9. The third insight, called RT M for "restricting the transforms based on maximal score", is related to the RT P filter presented above, and is also based on dynamic programming. It uses two observations: First; DELTADELTA will only climb from KB to the transformed version KB * =  '( KB ) if KB* 's empirical score is the largest over all members of N ( KB ); ie., if ∀ i ∈ N , Diff(  *, M ) ≥ Diff(  i , M ). Second, for any  g ,  h ∈ N, the difference between Diff( g , k ) - Diff( h , k ) and Diff(  g , k - 1 ) - Diff(  h , k - 1 ) can be at most 1. This trivially means that Diff(  g , M ) - Diff ( h ,M) ≤ Diff( g, k ) - Diff( h , k ) + (M-k) and so if Diff(  g ,k) < Diff( h , k ) - (M-k), then Diff(  g ,M ) < Diff( h , M ), which means DELTADELTA will not climb to  g ( KB ). Letting Best k = max  ∈ N {Diff(  , k )} be the largest empirical (relative) score, over the transformations, after k samples, we define RT M ( KB,N,k,M ,Diff(·,k)) = { i ∈ N | Diff( 1 ,k ) > Best k - ( M - k )}. This is implemented by the RTM subroutine, shown in Figure 9. The following will describe the final idea, QE (for "quick evaluation"). Given the above analysis, we need only compute the values of acc ( i ,c k ) for only a subset of the transformations; i.e., only for  i in the set RT I ( KB,N,c k ) ∩ RT P ( KB,N, Err k ,Diff(·, k )) ∩RT M ( KB,N,k,M ,Diff(·, k )). We could compute these acc ( i ( KB ), c k ) values by first synthesizing each KB i =  i ( KB ), and then "running" each KB i on each c j = 〈π j ,r j 〉 instance to get their respective repairs and associated accuracy scores. The DELTADELTA algorithm, however, uses a more effective way of computing these accuracy scores. Notice first that it is sufficient to compute diff' ( m ,c), rather than acc ( m ( KB ), c); this quantity turns out to be relatively easy to compute (especially as diff' ( m , c) = 0 holds for many < m ,c> pairs; see above discussion of RT I ). Given a (partial) instance π and the correct repair r cor , the QE_COMPUTERHOTAU subroutine identifies, with each node n in the initial KB , the probability ρ(n) that S KB would reach r cor , given that it has reached n . Notice that acc(KB, 〈π,r cor 〉 ) = ρ ( n root ), where n root is the root of KB ; and also that ρ( n ) = p'(n) x AccKB*( n , π, r cor ), using QE_COMPUTERHOTAU also identifies each arc a in KB with the probability that S KB will reach and traverse this arc, τ(a) ; and also each node n with the probably of reaching n. Clearly τ(n root ) = 1. Given an internal node n with children n i = child(n,i) , let e i = 〈 n,n i 〉 be the arc connecting n to n i . Then recursively define τ( e 1 ) = τ( n ) x p'(n) τ( e j+1 ) = τ( e j ) x (1- p' ( n j )) Finally, to compute each τ ( n j ), just add up the τ-values of the arcs reaching n j ; i.e., in general τ(m) = Σ <n,m>∈ E τ(〈 n,m 〉). Notice that this can be computed in time linear in the size of the hierarchy. Then, for each transformation  ∈ T, QE_DIFF uses these ρ(·)and τ(·) values to compute diff' (, 〈π, r cor 〉), in essentially constant time. (The time is really bounded by the largest number of arcs descending from any node which is assumed to be a small constant.) N.b., the DELTADELTA revision algorithm does not produce an explicit S j(KB) performance system, nor does it explicitly compute the value acc ( j ( KB ),π) on the instance π. Instead, it uses the ρ (·) and τ(·) values to produce the information it needs, directly. The following will describe the way that QE_DIFF computes the values of diff' (τ k , c ) = acc ( k ( KB ), c ) - acc(KB, c). For each "Delete-Link" transformation Delete a,b , let KB' = Delete a,b ( KB ) be the hierarchy produced by deleting from KB the link connecting node a to node b . Clearly acc ( KB' , <π, r> ) = acc (KB, <π, r >) whenever either π (t(a)) = - or π (t(b)) = -. It is therefore necessary to deal only with situations when π(t(a))∈{+,?} and π(t(b))∈{+,?} . Without loss of generality, we can write acc(KB, 〈π,r cor 〉) = P [success before <a,b>] + τ [〈 a,b 〉] x ρ (b) + τ [〈 a,b 〉](1-p'( b ))x P [success after 〈 a,b 〉|reached 〈a,b〉 ] + τ[ a ](1-p'( a )) P [success after a ] where P [success before 〈 a,b 〉] is the probability of reaching r cor following the arcs that occur strictly before reaching the 〈 a,b 〉 arc (in the obvious traversal of KB ); P [success after 〈 a,b 〉|reached 〈 a,b 〉] is the probability of reaching r cor following the arcs that occur strictly after the 〈a,b〉 arc, given that S KB has reached the 〈 a , b 〉 arc; and P [success after a ] is the probability of reaching r cor following the arcs that occur strictly after the a node. For example, using KB 0 from Figure 2, identify the a with the fault node "A" and b with "E" . Then P [success before〈 a,b 〉] is the probability either (1) T Z , T A and T C all succeed and the correct repair is r C , or (2) T Z , T A and T D all succeed, T C fails, and the correct repair is r D . Here, P [success after 〈 a,b 〉| reached 〈 a,b 〉] is 0, as this is the probability of reaching a success node under A, strictly after reaching and traversing 〈 a,b 〉 ≡ 〈A,E〉 . (Notice that E has no "left-siblings" under A .) Finally, P [success after a ] is the probability that T A fails, T B succeeds and either T E succeeds and the correct repair is r E , or T E fails, T F succeeds and the correct repair is r F . Similarly, acc ( KB' ,〈π, r cor 〉) = P [success before 〈a,b 〉] + τ [〈 a,b 〉] x P [success after 〈 a,b 〉|reached 〈 a , b 〉] + τ[ a ] (1- p ' (a))P (success after a ] Subtracting these quantities, it is found that diff' (Delete a,b , 〈π, r cor )〉= τ [〈 a,b 〉] {[ p'(b)xP' ]- ρ(b) } where P' = P [success after 〈a,b 〉|reached 〈a,b 〉]. The only remaining challenge is computing this P ': Assume that b is the m th child of a , and a has k ≥ m children, {a 1 ,...,a m = b, a m+1 ,...,a k }. Here, P ' = Σ k l-m+1 τ[〈a, a 1 〉 x ρ ( a 1 )/ τ [〈 a,b 〉]. Notice the time required to compute this quantity is bounded by k , the number of children under node a . To compute diff' (, c) where  is an "Add-Link" transformations, let KB' = Add a,b,1 ( KB ) be the hierarchy produced by adding to KB a link that makes b the i th child of a . As before, acc ( KB ', 〈π, r 〉) = acc(KB, 〈π, r 〉) whenever either π ( t ( a )) = - or π( t ( b )) = -, and so we will consider only π ( t ( a )) ∈ { +,? } and π( t ( b )) ∈ {+,?}. Assume a 's i th child in the original KB is n i ; notice it will be the i+1 st child in KB '. (If a only had i-1 children in KB , then assume this n i is a degenerate node that leads immediately to the r ⊥ repair.) Then acc(KB , 〈π, r cor 〉) = P [success before 〈 a,n i 〉] + τ[〈 a,n i 〉] x ρ[success after 〈 a,n i 〉|reached 〈a,n i 〉 ] + τ[ a ] ( 1 - p'(a)) P [success after a ] and acc(KB',〈π, r cor 〉 ) = P [success before 〈 a,n i 〉] + τ[〈 a,n i 〉]x ρ(b) + τ[〈 a,n i 〉 ] ( 1-p' ( b )) )P[success after 〈 a,n i 〉|reached 〈 a,n i 〉] + τ[ a ] (1-p'(a)) P[success after a ] meaning diff' ( Add a,b,i , c )= τ[〈 a,n i 〉x(ρ( b)p'(b) x P[success after 〈 a,n i 〉|reached 〈 a,n i 〉] where again P[success after 〈 a,n i 〉|reached 〈 a,n i 〉] = Σ k l=i+1 [〈 a,a i 〉] x ρ( a i ) [〈 a,n i 〉]. Of course, this approach is implicitly based on the earlier "partial evaluation" ideas, as embodied in the AccKB* subroutine; and in particular, as mentioned earlier, complete correctness for efficiency has been sacrificed, based on the observation that computing the correct accuracy score is intractable when considering general DAG-structured hierarchies. To see a potential problem, observe that adding a new link can easily produce a new DAG-instance within the hierarchy, which in turn may cause the computation to produce an incorrect answer. For example, consider the KB before hierarchy (shown in Figure 10), and let KB after = Add A,B,1 ( KB before ) include a link from A to B that makes B , A's first child. Now consider a labeled instance c = 〈π 2 ,r B 〉 in which π 2 = { T A / +, T c / +, T B / ?, T D / + }, and the correct repair is r B . Let p B = p(T B ) be the probability that T B , the test at the B node, succeeds. Clearly acc(KB before , c) = p B , and the correct answer to acc(KB after , c) = p B . However, AccKB*( A, π 2 , r B ) would produce the incorrect answer p B + (1-p B ) x p B . (Recall that computing the correct answer, for DAGs in general, is NP-hard). Hence, if we used AccKB* to produce the accuracy scores, diff ' ( Add A,B,1 , c) = [p B + (1-p B )x p B ] - p B = (1-p B ) xp B ; as this is greater than 0, this transformation would seem like a good idea. However, this transformation should not be considered a good idea, for this instance. There is a simple way to correct for this particular error. Here, it is necessary to observe that the only way S KBafter can reach C is if the T B test fails. Hence, it is necessary to only propagate the information that reaching C means T B fails when computing the accuracy score on the post- B part of the hierarchy. While it is NP-hard to compute even this score correctly in general, we can easily address this particular common occurrence. Associate with each node n in KB the set of all tests occurring under it; hence, AllTests ( A ) = {T A ,T B ,T C ,T D } , AllTests ( C ) = ( T C , T B ,T D }, etc. Now when adding a new link, here adding B with test T B , under A , before DELTADELTA computes the value of diff' ( Add A,B,1 , c ), it would first walk through the other children of the new parent (associated with the transformation) A, and potentially recompute the ρ-value of these children, given the new constraint that S KBafter will only reach such children if the T B test fails. To do this, DELTADELTA first matches the test T B against the tests in C 's AllTests (.)-list. If T B ∈ AllTests ( C ), then DELTADELTA can simply use ρ ( C ); no further work would be required. Notice, however, that T B ∈ AllTests ( C ) here. DELTADELTA will therefore recompute ρ ( C ), in the context of a slightly modified c = 〈π 2 ,r〉 labeled instance, where π 2 includes the assignment T B /-: hence, π 2 = { T A / +, T C /+, T B / -, T D / + }. Under this new assignment, ρ ( B ) = 0, meaning ρ( C ) = 0, and so ρ(A) = acc(Add A,B,1, c ) = ρ B , as desired. The following will describe how to handle "Move-Link" Transformations. To deal with KB ' = Move par,par2,n,i ( KB ) , notice that KB' = Add par2,n,i ( KB 1 ) where KB 1 = Delete par1,n ( KB ). Hence, diff' ( Move par , par2,n, i , c )= acc(Move par,par2,n,i (KB),c ) - acc ( KB,c ) = ( acc ( Add par2,n,i ( KB 1 ), c ) - acc ( KB 1 , c )) + ( acc ( KB 1 , c) - acc ( KB , c }) = diff' KB 1 ( Add par2,n,i , c ) + diff' KB ( Delete par1,n, c ), each of which were described above. In the above, the superscript identifies the hierarchy involved. The following will describe "Switch-Link Transformations" Switch par,n1, n2 : Using n 1 = child ( par,i 1 ) and n 2 = child ( par, i 2 ), observe that Switch par,n1,n2 ( KB ) = Move par,par,n1,i2 ( KB 1 ) where KB 1 = Move par,par,n2,i1 ( KB ). (Where the first transformation, Move par,par,n1,i2 ( KB 1 ) is ignored if | i 1 - i 2 | = 1) . Hence, diff' ( Switch par,n1,n2, c ) = acc(Switch par,n1,n2 (KB ), c ) -acc ( KB, c ) = ( acc(Move par,par,n1,i2 ( KB 1 ), c ) - acc ( KB 1 , c ))+( acc ( KB 1 , c ) - acc ( KB , c )) = diff' KB1 ( Move par,par,n1,i2 }, c ) + diff ' KB ( Move par,par,n2,i1 }, c ). The above descriptions all implicitly assume that the underlying expert system will traverse fault hierarchy in the manner shown above; and in particular, will stop when reaching a repair. Some expert systems will allow the user to "verify" that the proposed repair worked effectively, and will then continue suggesting alternative repairs, if the first repair failed. This is called "verify after repair" (VAR). The present invention is also able to propose appropriate theory revisions for theories that use VAR. It is not intended that this invention be limited to the software arrangement, or operational procedures shown disclosed. This invention includes all of the alterations and variations thereto as encompassed within the scope of the claims as follows.

Claims: An efficient data-driven theory revision system comprising: efficient learning means (13) for revising a fault hierarchy of the expert system using a plurality of revision operators to produce a revised fault hierarchy; expert system means (14) interfaced with said efficient learning means and capable of receiving input from a domain expert, compile means connected to said expert system means; field user (15) input means connected to said compile means; and session transcript (12) means connected between said field user input means and said efficient learning means (13); wherein the learning means has improved efficiency in that it selectively evaluates the fault hierarchies and/or computes the difference in accuracy between the fault hierarchies. An efficient data-driven theory revision system as claimed in claim 1 wherein said efficient learning means (13) comprises: RTI_ELIGIBLE means for excluding revision operators which have no effect on the accuracy of the fault hierarchy; RTP means for restricting the revision operators based on a positive score; RTM means for restricting the revision operators based on maximal score; and COMPUTERHOTAU means for computing the difference in accuracy between the fault hierarchies. An efficient data-driven theory revision system as claimed in claim 2 wherein said RTI_ELIGIBLE means comprises: a plurality of revision operators with each of said plurality of revision operators operating on an initial knowledge base (KB) within said expert system means and efficiently producing a revised knowledge base, (KB) a collection of all revised knowledge bases being a neighborhood of said initial knowledge base. An efficient data-driven theory revision system as claimed in claim 3 wherein said plurality of revision operators comprises: an add operator (RTIADD) which adds a new link between two nodes; a delete operator (RTIDELETE) which deletes an existing link between a node and its child node; a move operator (RTIMOVE) which deletes an existing link and adds a new link; and, a switch operator (RTISWITCH) which switches the order of the child nodes. An efficient data-driven theory revision system as claimed in claim 3 or 4 wherein: said plurality of revision operators move through a space of fault hierarchies (KB) with each of said plurality of revision operators efficiently mapping one hierarchy to a slightly different hierarchy. A computer-implemented efficient data-driven theory revision method comprising the steps of: utilizing learning means (13) interfaced with expert system means (14) connected to compile means connected to field user (15) input means connected to session transcript means which is connected to said learning means, wherein utilizing learning means (13), comprises the steps of efficiently revising a fault hierarchy using the training example data and a plurality of revision operators by utilizing a RTI-ELIGIBLE subroutine for excluding revision operators which have no effect on the accuracy of the fault hierarchy; utilizing a RTP subroutine for restricting the revision operators based on a positive score; utilizing a RTM subroutine for restricting the revision operators based on maximal score; and utilizing a COMPUTERHOTAU subroutine for computing the difference in accuracy between the fault hierarchies. A computer-implemented efficient data-driven theory revision method as claimed in claim 6 wherein utilizing a RTI_ELIGIBLE subroutine comprises the step of: utilizing a plurality of revision operators with each of said plurality of revision operators operating efficiently on a knowledge base within said expert system means and producing said neighborhood that includes a revised knowledge base. A computer-implemented efficient data-driven theory revision method as claimed in claim 7 wherein utilizing a plurality of revision operators comprises the steps of: utilizing an add operator (RTIADD) which adds a new link between two nodes; utilizing a delete operator (RTIDELETE) which deletes an existing link between a node and its child node; utilizing a move operator (RTIMOVE) which deletes an existing link and adds a new link; and, utilizing a switch operator (RTISWITCH) which switches the order of the child nodes. A computer-implemented efficient data-driven theory revision method as claimed in claim 7 or 8 wherein utilizing a plurality of revision operators comprises the step of: moving efficiently through a space of fault hierarchies with each of said plurality of revision operators mapping one hierarchy to a slightly different hierarchy. A computer program for implementation of the system according to any of claims 1 to 5 and/or the method according to any of claims 6 to 9.

Inventors: GREINER RUSSELL, MEREDITH GLENN A, RAO R BHARAT, GREINER, RUSSELL, MEREDITH, GLENN A., RAO, R. BHARAT
Applicants: SIEMENS CORP RES INC, SIEMENS CORPORATE RESEARCH, INC.
Application year: 1997
Main classification: G06F9
IPC codes: G06N5