Abstract:
A delta learning system takes as an initial fault hierarchy (KB 0 ) and a set of annotated session transcripts, and is given a specified set of revision operators where each operator within a group maps a fault hierarchy (KB) to a slightly different or revised fault hierarchy (θ i  (KB)). The revised fault hierarchy (θ i  (KB)) is called a neighbor of the fault hierarchy (KB), and a set of all neighbors (N(KB)) is considered the fault hierarchy neighborhood. The system uses the revision operators to hill climb from the initial fault hierarchy (KB 0 ), through successive hierarchies (KB 1  . . . KB m ), with successively higher empirical accuracies over the annotated session transcripts. 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 i ) to its neighbor (KN i+1 ), the accuracy of the fault hierarchy (KB i ) is evaluated over the annotated session transcripts, and the accuracy of each fault hierarchy (KB*) belonging to the set of all neighbors (N(KB i )) is also evaluated. If any fault hierarchy (KB*) is found to be more accurate than the fault hierarchy (KB i ), then this fault hierarchy (KB*) becomes the new standard labeled KB i+1 .

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a &#34;theory revision&#34; system that identifies a sequence of revisions which produces a theory with highest accuracy and more particularly, to a system that 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. 
     2. 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 &#34;labeled session transcripts&#34; (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* .di-elect cons. N(KB) if KB*&#39;s empirical accuracy over C is significantly higher than KB&#39;s. 
     There are many theory revision systems described in the machine learning literature. They all use the same basic idea of using a set of transformations to convert one theory to another. Most of these systems focus on Horn clause knowledge bases or decision trees. These representations are not particularly suited to deployed application systems. By contrast, the Delta system uses a fault hierarchy representation which is widely deployed. Further, the modifications suggested by existing theory revision systems could result in theories which would be rejected by domain experts. By contrast, the Delta system suggests modifications which preserve the structure of the fault hierarchy, and thus are more likely to be acceptable to domain experts. Finally, these 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 Delta system is designed to evaluate any theory&#39;s accuracy, even with incomplete data. 
     SUMMARY OF THE INVENTION 
     The present invention is a computer system, known as Delta, which takes as input an initial fault hierarchy KB 0  and a set of annotated session transcripts C={&lt;π j ,r j  &gt;}, where 90  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={θ j  } where each θ i  .di-elect cons. 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&#39;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 i+1 , the present invention must evaluate KB i  &#39;s accuracy over C, as well as the accuracy of each KB&#39; .di-elect cons. N(KB k ). If any KB&#39; is found to be 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&#39; is more accurate than KB k , the hill climbing process will return this KB k , and terminate. 
     If the labeled session transcripts C={&lt;π j ,r j  &gt;}are complete (that is, each C j  .di-elect cons. C contains answers to every possible test in KB) then it is straightforward to evaluate KB&#39;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&#39; .di-elect cons. N(KB), even when C is incomplete. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 illustrates an overall theory revision task that utilizes the present invention. 
     FIG. 2 illustrates the structure of a fault hierarchy (KB 0 ) used by one embodiment of the present invention. 
     FIG. 3 illustrates the EvalKB and EvalNode Subroutines of one embodiment of the present invention. 
     FIG. 4 illustrates the AccKB and EvalNode* Subroutines of one embodiment of the present invention. 
     FIG. 5 illustrates the PartialMatch and ProbCorrectPath Subroutines of one embodiment of the present invention. 
     FIG. 6 illustrates the Delta and ComputeBest Subroutines of one embodiment of the present invention. 
     FIG. 7 illustrates the initial KB before  and the subsequent KB after  hierarchies used by one embodiment of the present invention. 
     FIG. 8 illustrates the ComputeNeighborhood and associated Subroutines of one embodiment of the present invention. 
     FIG. 9 illustrates the information required by any single step in the theory revision process. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     FIG. 1 illustrates the overall theory revision task. 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&#39; which exhibits better performance over the training examples. In more detail, sesssion 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 sugggested 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 &#34;theory revision&#34; system uses a set of &#34;labeled session transcripts&#34; 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&#39;s &#34;neighbors&#34;, N(KB)={KB k  }, where each neighbor KB k  .di-elect cons. N(KB) is a slight modification of KB. The theory revision system then selects the neighbor KB* .di-elect cons. N(KB) with the highest empirical accuracy and if KB*&#39;s accuracy is greater than KB&#39;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={&lt;π j ,r j  &gt;}, are complete (that is, each C j  .di-elect cons. C contains answers to every possible test in KB) then it is straightforward to evaluate KB&#39;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 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=&lt;N, E, TS, R, t(•), r(•), child(•,•)&gt; is a directed-acyclic forest &lt;N,E&gt;, whose nodes, N, represent faults, and whose edges, E, connect faults to subordinate faults. Each node n .di-elect cons. N is labeled with a test t(n)=t or t(n)=t, where t .di-elect cons. TS. In addition, each leaf node is also labeled with a &#34;repair&#34;, r(n)=r .di-elect cons. R. The arcs under each internal node are ordered; child (n,i) refers to the &#34;i th  child of n&#34;. To simplify the notation, let the k:N→Z +   function map each node to its number of children, and let the 1:N→Z +  function map each node to its number of parents. 
     For example, consider the hierarchy shown in FIG. 2, where the test associated with the node χ is T.sub.χ. Hence, the test associated with the A node is T A , etc. The r.sub.χ  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&#39;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 parent (A, 1)=Z, and 1(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 KB .sbsb.0 begins at the root, and asks the question associated with that node; here &#34;Is T Z  true?&#34;. If the user answers &#34;yes&#34;, S KB .sbsb.0 descends to consider Z&#39;s children, in left-to-right order--here next asking &#34;Is T A  true?&#34;. If the user responds &#34;Yes&#34;, S KB .sbsb.0 will descend to A&#39;s children. If the user answers T C  with &#34;No&#34;, S KB .sbsb.0 will continue to C&#39;s sibling D, and ask about T D . Assuming the user responds &#34;Yes&#34; here, S KB .sbsb.0 will return the repair associated with that leaf node, D, here r D . On the other hand, if the user had responded &#34;No&#34; to T D , S KB .sbsb.0 would have continued to ask about T E . If this answer was &#34;Yes&#34;, S KB .sbsb.0 would return r E . Otherwise, if this answer was also &#34;No&#34;, S KB .sbsb.0 would return the &#34;No-Repair-Found&#34; answer, r.sub.⊥. N.b., S KB .sbsb.0 will not then continue to B; answering T A  with &#34;Yes&#34; means the user will only consider tests and repairs under this node. 
     Ignoring the details of the actual user-interaction, each &#34;total problem instance&#34; is an assignment π:TS→{+,-} that maps each test to one of {+,-}, where &#34;+&#34; means the test was confirmed (passed), and &#34;-&#34; means the test was disconfirmed (failed). Given an instance π, S KB  will return a repair r .di-elect cons. R, written as EVALKB(KB,π)=r. This r is the value returned by EVALNode(root(KB),π), using the EVALNode subroutine shown in FIG. 3, where n root  =root(KB) is KB&#39;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&#39;s test has been confirmed when dealing with the AccKB subroutine defined below. 
     The accuracy of the hierarchy KB for the instance π is ##EQU1## where the correct answer to the instance is r cor  .di-elect cons. R. (This r cor  repair is often supplied by a human expert.) In general, such a pair &lt;π,r cor  &gt; will be referred to as a &#34;labeled (total) problem instance&#34;. Over a set of labeled instances (a.k.a. session transcripts) C={&lt;π i ,r i  &gt;} i , KB&#39;s (empirical) accuracy is ##EQU2## 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 &#34;partial problem instance&#34; π:TS→{+,-,?} where &#34;π(t)=?&#34; means that the value of the test t is not known. 
     Each such partial instance π really corresponds to some total instance π&#39;, where certain test values are not observed. To state this more precisely, say that the total problem instance π&#39;:TS→{+,-} is a completion of π if π&#39; agrees with π whenever π(t) is categorical (i.e., is not &#34;?&#34;): 
     π&#39; completes π iff [π(t)≠?π&#39;(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 
     Complete(π)={π&#39;:TS→{+,-}|π&#39; completes π} 
     refer to the set of total instances that complete a given partial instance. 
     In general, the probability Pr[π&#39;|π] that the observed partial instance π corresponds to the total instance π&#39; .di-elect cons. Complete (π) depends on the probability that each unobserved test t (i.e. where π(t)=&#34;?&#34;) has the specified value π&#39;(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 π&#39; .di-elect cons. Complete (π) has an associated repair, r.sub.π&#39; =EVALKB(KB, π&#39;); we can therefore use the p(•) values to compute the probability that S KB .sbsb.0 will return each r.sub.π&#39;, given the observed values π. In general, we will need to compute the probability that S KB .sbsb.0 will return the correct repair r cor , Pr[S KB .sbsb.0 returns r cor  |π observed]. Using the observation that this quantity corresponds to acc(KB,&lt;,r cor  &gt;) 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, &lt;π,r cor  &gt;) description.) 
     The AccKB subroutine illustrated in FIG. 4 computes this probability for a partial problem instance π. The first step of Acckb is to call the EvalNode* subroutine (FIG. 4) which differs from the EvalNode subroutine (FIG. 3), in one important way. If the answers for all relevant tests are provided in the training example, the EvalNode* subroutine returns the repair which would be returned by EvalNode (i.e., by S KB ). In this event, AccKB returns 1 or 0 depending on whether EvalNode* has returned the correct repair. However, if EvalNode* encounters a test whose value is not provided in π, it terminates returning the value `?`. In this event, AccKB invokes the PartialMatch subroutine described in FIG. 5. 
     At this point it is necessary to introduce the notion of a path in a knowledge base. Let H(KB) be the set of all paths in a knowledge base. Then, a path, h .di-elect cons. H(KB), has the same syntax as a training instance, i.e., h=&lt;π, r&gt;, and satisfies the conditions, EvalNode*(root(KB),π)=r .di-elect cons. R, and every test in π is reached at least once by EvalNode*. In other words, π is a minimal set of tests and values such that S KB  will return the repair r, and removing any single test from π will result in EvalNode* returning `?`. (We do not consider any paths that terminate in r 195  , &#34;No Repair Found.&#34;) For instance, &lt;{T Z  /+, T A  /+, T C  /-, T D  /+}, r D ) is a path of the knowledge base shown in FIG. 2, as is &lt;{T Z  /+, T A  /-, T B  /+, T E  /+}, r E  &gt;. However, &lt;{T Z  /+, T A  /+, T B  /+, T C  /-, T D  /+}, r D  &gt;is not a path (as it includes the extra test T B ), nor is &lt;{T Z  /+, T A  /+, T D  /+}, r D ) (as it is missing test T B ), nor &lt;{T Z  /+, T A  /-, T C  /-, T D  /+}, r D  &gt; (T A  must be + for S KB  to return r D ), nor &lt;{T Z  /+, T A  /+, T C  /-, T D  /+}, r E ) (wrong repair). Note that if the same test occurs twice on the same path (two nodes may have the same test, or one&#39;s test may be the negation of the other), then the test is mentioned only once in the path; needless to say, the test must have the same result for both nodes. 
     If a fault hierarchy KB is a tree, H(KB) will have exactly as many paths as there are leaf nodes. If KB is not a tree but is a DAG (directed acyclic graph), the number of paths (in the worst case) can be exponential in the number of nodes which have multiple parents (for example, node E in FIG. 2). Fortunately, in practice, fault hierarchies tend to have few nodes with multiple parents. Note that H(KB) may have multiple paths which have the same repair, either due to KB being a DAG (as opposed to a tree), or due to more than one leaf node having the same repair. H(KB) can be easily computed by beginning at root(KB) and descending KB in a depth-first fashion and keeping track of the nodes visited. 
     Given a training case c=&lt;π,r cor  &gt;, the PartialMatch algorithm first selects all paths h i  =(π i ,r i ) in H (KB), such that r i  =r cor . Then, for each such path, the ProbCorrectPath subroutine (see FIG. 5) computes the probability that π will be the same as π i . This is done by comparing each test t in π i  with the value of the same test in π and determining the probability, p&#39;(t), that the test is correctly answered. This subroutine uses ##EQU3## to refer to the probability of a node succeeding, relative to the partial assignment n. Of course, if t&#39; is the negation of a test, i.e. t&#39;=t, then p(t&#39;)=p(t)=1-p(t) when π(t&#39;)=&#34;?&#34;. The ProbCorrectPath algorithm implicitly uses the fault hierarchy KB and the probability information p(•). 
     The following will describe the theory revision task. The main Delta routine (FIG. 6) takes as input an initial hierarchy KB 0  and a set of labeled session transcripts, C={c j  }. Delta uses a set of transformations, Θ={θ k  }, where each θ k  maps one hierarchy to another. Delta invokes the ComputeNeighborhood subroutine (FIG. 8) which 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 &lt;A,C&gt; and before &lt;A,D&gt;. 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,i 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. 
     FIG. 7 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 FIG. 7, will restore the fault hierarchy to Kb before . Let N(KB)={θ(KB)|θ.sub.ι  .di-elect cons. T} be the set of KB&#39;s neighbors, which is computed by the ComputeNeighborhood(KB) subroutine shown in FIG. 8. This subroutine in turn calls four other subroutines, each of which compute the neighborhood for one operator class (add, delete, move, switch). 
     The CNDeleteLink(KB) subroutine (FIG. 8) is the most straightforward: it accumulates all revisions that delete a link between every parent-node/child-node pair in KB. 
     The CNAddLink(KB) subroutine (FIG. 8) accumulates all revisions that add a link from any non-leaf node par to any other node n, provided par is not an existing child of n and provided adding this link does not create a cycle in KB. A fault hierarchy is said to have a cycle when its graph structure has a cycle (here there are a set of tests and values such that S KB  will never terminate). This acyclicity is confirmed by ensuring that the proposed revision will not result in a link being added from a node to one of its ancestors, as computed by the IsAncestor subroutine (FIG. 8). 
     The CNMoveNode(KB) subroutine (FIG. 8) accumulates all revisions that move a node n to any possible position under its parent, as well as revisions which move n to any possible positions under a different non-leaf node, provided this does not result in a cycle (FIG. 8). 
     The CNSwitchNodes(KB) (FIG. 8) subroutine accumulates all revisions that interchange the positions of two child nodes under the same parent. 
     The main Delta routine invokes the ComputeBest subroutine (FIG. 6) which uses the set of labeled instances C={&lt;π j ,r j  } to compute acc(KB, C) and acc(KB&#39;, C) for each KB&#39; .di-elect cons. N(KB). It then climbs from KB to a KB* .di-elect cons. N(KB) if acc(KB*, C)&gt;acc(KB, C). 
     The following will describe the theory revision system. Computing KB* implicitly requires obtaining the |C| values of {acc(KB, c j )} Cj .di-elect cons.C to compute acc(KB, C), and also computing the |C|×|T| values of {acc(θ i  (KB), c j )} i ,j 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 this S KB  to evaluate KB(π j ) for each (π j ,r j ) .di-elect cons. C in sequence to compute first the values of acc(KB, π j ) and then their sum acc(KB,C)=Σ j  acc(KB,&lt;π j ,r j  &gt;). 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 {&lt;π j ,r j  &gt;} 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 |θ| transformations. In essence, this involves sequentially computing each row of the matrix shown in FIG. 9. The revision algorithm would then take the largest of these values acc(KB*, C)=max i  {acc(KB i , C)}, and climb to this hierarchy if acc(KB*, C)&gt;acc(KB,C). 
     The Delta algorithm effectively does the above, but reduces the computations involved by noting that each revision constitutes a very small change, while different training examples constitute a big change. Delta begins by loading S KB  and the first example c 1 . It then proceeds to apply the first revision operator θ 1  (KB) and computes the accuracy of θ 1  (KB) on c 1 . Then it undoes θ 1  and applies the next operator θ 2  and proceeds in this manner until all operators have been applied. Finally, it unloads c 1  and loads in the next example c 2  and proceeds similarly. This reduces the computation in loading KB and the c j  &#39;s multiple times, without effecting the result. 
     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.