Abstract
Reasoning is the derivation of new knowledge from old. The reasoner must represent both the old and new knowledge. This representation will change as reasoning proceeds. This change will not just be the addition of the new knowledge. We claim that the representation of the old knowledge will also often change as a side effect of the reasoning process. For instance, the old knowledge may contain errors, be insufficiently detailed or require new concepts to be introduced. Representational change triggered by reasoning is a common feature of human reasoning but it has been neglected both in Cognitive Science and Artificial Intelligence. We aim to put that right. We exemplify this claim by analysing Imre Lakatos’s rational reconstruction of the evolution of mathematical methodology. We then describe the abduction, belief revision and conceptual change (ABC) theory repair system, which can automate such representational change. We further claim that the ABC system has a diverse range of applications to successfully repair faulty representations.
This article is part of a discussion meeting issue ‘Cognitive artificial intelligence’.
1. Lakatos’ proof and refutations
In his book [1], Imre Lakatos illustrates the evolution of mathematical methodology via a rational reconstruction of Euler’s ‘Theorem’ that in a polyhedron , where is the number of vertices, is the number of faces and is the number of edges. For instance, in a cube , and .
The setting is a classroom of incredibly bright students whose teacher leads a Socratic dialogue in which the students echo the positions of various prominent mathematicians during the history of this ‘Theorem’.
We have placed scare quotes around ‘Theorem’ because it rapidly becomes apparent that it has a wide variety of counterexamples. The evolution of mathematical methodology is illustrated by the different ways in which these counterexamples are regarded and the attempts to rescue the ‘Theorem’ in some form.
(a) Cauchy’s ‘proof’ and some counterexamples to it
Lakatos’ book starts with a ‘proof’, due to Cauchy, illustrated by figure 1.
Figure 1. Cauchy’s ‘Proof’ of Euler’s ‘Theorem’. (Redrawn by Predrag Janičić from Lakatos [1]). This ‘proof’ consists of a procedure. In Step 1, a face is removed from the polyhedron and it is stretched onto the plane. In Step 2, each face is triangulated. In Step 3, these triangles are successively removed until only one remains. There are two different cases of triangle removal, labelled (a) and (b). The last triangle has three vertices, three edges and one face, so . It is argued that this invariant is preserved by each step, except the first, which removes one face. So, working backwards, it has been shown that in the original polyhedron, . QED.
We have put scare quotes around ‘proof’ because Cauchy’s ‘Proof’ is no more a proof than Euler’s ‘Theorem’ is a theorem. It is claimed that this same procedure can be carried out on any polyhedron. But this claim has been shown to be false. Lakatos’ students soon come up with counterexamples. Two of these are depicted in figure 2.
Figure 2. The hollow cube, Kepler’s star polyhedron and pentagram (redrawn by Predrag Janičić from Lakatos [1]). The hollow cube has a cube-shaped hole in it, so the number of vertices, faces and edges is doubled: . The faces of Keplar’s star polyhedron are intersecting pentagrams. There are 12 of these faces, making 30 edges and 12 vertices, so . Note that, in neither counterexample, is it possible to remove one of their faces and stretch the remaining polyhedron flat on the plane.
(b) The changing definition of polyhedron
The students, however, are able to rescue these counterexamples and turn them into examples. They did this by choosing an appropriate definition of polyhedron or polygon. In the case of the hollow cube, they contrasted a solid structure with a plate structure.
Solid structure: | A polyhedron is a solid whose surface consists of polygonal faces. | ||||
Plate structure: | A polyhedron is a surface consisting of a system of polygons. |
In the case of the plate structure, the hollow cube becomes one cube nested within another. For each one .
Intersecting edges: | A polygon is a system of edges arranged in such a way that exactly two edges meet at each vertex. | ||||
Non-intersecting edges: | A polygon is a system of edges arranged in such a way that exactly two edges meet at each vertex and the edges have no points in common except the vertices. |
Lakatos calls this tactic of rejecting a counterexample via a change of definition, monster barring.
Now we are confronted by a conundrum:
How was it possible for Euler to state a conjecture about polyhedra and for Cauchy to claim to have proved that conjecture, if neither had a formal definition of polyhedra?
The answer is that both were generalizing from a finite set of examples. They knew about the five Platonic solids of a tetrahedron, cube, octahedron, dodecahedron, icosahedron and a few more. Euler’s conjecture and Cauchy’s proof both worked for them. There were others, however, for which whether it worked or not depended on definitions that they had not formulated.
We claim that this state of affairs is commonplace. Despite it imposing a strict discipline of formal definitions, representational change can even arise in modern mathematics. For instance, Robinson’s non-standard analysis [2] has extended the concept of ‘number’ to include infinite and infinitesimal numbers, and intuitionistic logic has divided the concept of ‘proof’ into ‘classical’ and ‘constructive’.
Reasoning based only on examples is a frequent cause of computer failures. A program may run successfully on a finite set of test examples then, but later encounter so-called, ‘edge cases’, on which they fail.
Formal verification of computer programs can avoid this problem because it proves the correctness of the program for the, potentially infinite, set of all cases. It requires, though, a formal logical definition of all cases and this is still error prone since it is a non-trivial task to formulate such a definition.
This motivated us to attempt to automate the repair of faulty logical theories. This is not just a matter of enlarging or reducing the axioms of a theory. It also entails refining the language in which they are expressed. We saw such language refinement in the case of polyhedra in the debate over whether they were solid or plate structured and over whether a polygon’s edges could intersect. In this spirit, we developed the ABC theory repair system [3,4].
2. The ABC theory repair system
The ABC system takes a faulty theory and a preferred structure . It uses and inference on to identify faults in . It then applies repair operations to in an attempt to correct the faults. If it terminates, it outputs all fault-free theories that it can find.
Theories are expressed in the Datalog language. See §2a for details. The preferred structure is a pair of sets of ground assertions representing observations of the environment. represents ground assertions that are observed and represents ground assertions that are observed to be false. Faults are either insufficiencies, where something in is not predicted or incompatibilities, where something in is predicted. By predicting a ground assertion we mean that it is a theorem of . To prove theorems we use selected literal (SL) resolution [5]. See §2b for details.
The flowchart of the ABC system is depicted in figure 3. The pre-process C1 reads and rewrites inputs into the internal format for later use. Then in C2, ABC applies SL to to detect incompatibility and insufficiency faults.
Figure 3. The flowchart of ABC. The green arrows deliver a set of theories one by one to the next process; the blue arrow delivers all faults of one theory as a set. When a faulty theory is not repairable, it will be dropped. Thus, the fault detection and repair generation is recursive until the repair process terminates with fault-free theories or finds no further repairs to apply.
We have claimed above that the ABC System has a diverse range of applications for successfully repairing faulty representations.
We evaluate this claim in §5 by presenting a diverse range of applications to which ABC has been successfully applied.
(a) Datalog theories
Datalog is a logic programming language consisting of Horn clauses in which there are no functions except constants [6]. We use this notation to define a subset of first-order logic that we also call Datalog. We choose Datalog because it is decidable under SL and ABC requires1 decidability in the detection of faults. We represent formulae in Datalog as clauses in Kowalski normal form, shown in definition 2.1 below.
Definition 2.1. (Datalog formulae)
Let the language of a Datalog theory be a triple , where are the propositions, are the constants and are the variables. We will adopt the convention that variables are written in lower case, and constants and predicates start with a capital letter.2
A proposition is a formula of the form , where for , i.e. there are no compound terms. Let and for in . Datalog clauses are of the four types in definition 2.2, is called the head of the clause and the conjunction of the s forms the body.
Definition 2.2.
Kowalski Form Horn clauses
Implication: | , where . These usually represent the rules of . | ||||
Assertion: | , i.e. the body is empty. When contains no variables the assertion is called ground. These ground assertions represent the facts of and the members of and . | ||||
Goals: | , i.e. the head is empty. These usually arise from the negation of the conjecture to be proved and from subsequent subgoals in a derivation. | ||||
Empty Clause: | , i.e. both the head and body are empty. This represents false, which is the target of a reductio ad absurdum proof. Deriving it, therefore, represents success in proving a conjecture. |
(b) Selected literal resolution
SL is a complete, reductio ad absurdum proof procedure for first-order logic expressed in clausal form [5]. When restricted to Datalog clauses, such as those defined in definition 2.2, SL is a decision procedure. This means that ABC can decide whether a given conjecture is or is not a theorem of a Datalog theory .
Definition 2.3. (A deductive step in SL)
A deductive step in SL is between a goal clause and either an assertion or a rule, which we will collectively call an axiom. A proposition in the goal clause and the head of the axiom must unify, that is it must be possible to instantiate each of them so that they are identical. An instantiation replaces variables by constants. We write to mean that proposition is instantiated by substitution . The substitution used in an SL step is called a most general unifier [8]. We will depict such an SL step as
Definition 2.4. (An SL refutation)
Because a proof in SL is by reductio ad absurdum, we call it a refutation. It consists of a series of SL steps. Each step takes as input the goal clauses produced by the previous step and outputs the goal clauses to be used in the next step. In the final step, one goal proposition remains and an assertion is unified with it to leave the empty goal clause . We can depict such a refutation as follows:
If an SL refutation proves a formula using the axioms from theory . We write .
(c) Types of fault
Given a preferred structure , a theory could have two kinds of faults:
Incompatibility: | Predictions that arise from the agent’s representation conflict with observations of their environment: . | ||||
Insufficiency: | The agent fails to predict observations of its environment: . |
Since SL is decidable for Datalog theories [9], ABC can exhaustively test all members of both and for theorem-hood. So it can detect all occurrences of insufficiency and incompatibility in a Datalog theory.
(d) ABC repair operations
An insufficiency may be repaired by unblocking a proof with additional necessary SL steps, while an incompatibility may be repaired by blocking all its proofs, which can be done by breaking one SL step in each of them [3]. ABC repairs faulty theories using 11 repair operations. There are five for repairing incompatibilities and six for repairing insufficiencies. These are defined in definitions 2.5 and 2.6.
Definition 2.5. (Repair operations for incompatibility)
In the case of incompatibility, the unwanted proof can be blocked by causing any of the SL steps to fail. Suppose the targeted SL step is between a goal, , and an axiom, , where each and pair can be unified. Possible repair operations are as follows:
Belief Revision 1: | Delete the targeted axiom: . | ||||
Belief Revision 2: | Add an additional precondition to the body of an earlier rule axiom which will become an unprovable subgoal in the unwanted proof. | ||||
Reformation 1c: | Rename in the targeted axiom to either a new predicate or a different existing predicate . | ||||
Reformation 2c: | Increase the arity of all occurrences in the axioms by adding a new argument. Ensure that the new arguments in the targeted occurrence of , are not unifiable. In Datalog, this can only be ensured if they are unequal constants at the point of unification. | ||||
Reformation 3c: | For some , suppose is . Since and unify, is either or a variable. Change to either a new constant or a different existing constant . |
Definition 2.6. (Repair operations for insufficiency)
In the case of insufficiency, the wanted but failed proof can be unblocked by causing a currently failing SL step to succeed. Suppose the chosen SL step is between a goal and an axiom , where either or for some , and cannot be unified. Possible repair operations are
Abduction 1: Add the goal as a new assertion and replace variables with constants.
Abduction 2: Add a new rule whose head unifies with the goal by analogizing an existing rule or formalizing a precondition based on a theorem whose arguments overlap with the ones of that goal.
Abduction 3: Locate the rule axiom whose precondition created this goal and delete this precondition from the rule.
Reformation 1s: Replace in the axiom with .
Reformation 2s: Suppose but and are not unifiable. Decrease the arity of all occurrences by 1 by deleting its th argument.
Reformation 3s: If but and are not unifiable, then they are unequal constants, say, and . Either (i) rename all occurrences of in the axioms to or (ii) replace the offending occurrence of in the targeted axiom by a new variable.
Belief Revision 1 is inherited from Gärdenfors [10]. Belief Revision 2 extends this by adding a precondition that will create a subgoal that will be unprovable in the unwanted proof. Similarly, Abduction 1 is inherited from Cox & Pietrzykowski [11] and Abduction 2 extends this by removing a precondition that has given rise to an unprovable subgoal. The various Reformation operations are adapted from Bundy & Mitrovic [7]. They break new ground by evolving the language of the faulty theory, e.g. by creating new predicates and constants. In [7], the different forms of Reformation arose by an exhaustive analysis of ways in which the first-order unification algorithm [8] could defeat or enable the matching of a goal to an axiom in an unwanted proof or a failed but wanted proof, respectively.
We are not claiming that these 11 repair operations are complete. Indeed, we doubt that a claim of completeness could be made of any set of theory repair operations. Human ingenuity is unbounded and no one could anticipate all possible forms that theory repair could take. Moreover, the forms of theory repair depend on the kind of logic that a theory is expressed in. In a sorted logic, for instance, manipulations of the type hierarchy offer additional opportunities [12]. In an equational logic, different forms of inference are required, but proofs can still be blocked or unblocked at the application of a matching operation [13]. In a probabilistic logic, the assigned probabilities can be changed [14]. Therefore, we can only make empirical claims about the range of applications of the ABC system.
(e) Related work
In §2d, we briefly discussed the relationship of the ABC repair operations to both belief revision [10] and abduction [11]. There is also a tradition of theory revision in Inductive Logic Programming. In [15], Shapiro presented an algorithm for debugging logic programs. Given a faulty logic program, it recurses through a failed execution of the program using an oracle to check the truth of each sub-routine call. If one of these is false, this process will eventually identify the root cause of the fault, namely a false clause. This clause can then be replaced. [16,17] subsequently built on this work. For instance, de Raedt’s RUTH system used integrity constraints to provide the oracle and repaired faulty programs by a combination of belief revision and abduction.
These theory revision programs focus on the identification of the faults. The ABC System uses the preferred structure to do this, by trying to prove assertions from both and . Success in proving an assertion in constitutes an incompatibility and failure to prove an assertion in constitutes an insufficiency. ABC’s novelty lies, though, in its repair operations, which go beyond belief revision and abduction, to include reformation. ABC does not just add or delete clauses but changes the language in which they are expressed. Thus systems such as RUTH and ABC are complementary and could be combined.
3. Pruning and ranking ABC repairs
In a faulty theory, there can be multiple faults and each fault can have multiple repairs. The basic search is shown in figure 4a, where repairs are applied individually and the fault detection and repair generation are recursive until the repair process terminates with fault-free theories or finds no further repairs to apply. So, if ABC outputs any repaired theories they are necessarily fault-free, but that does not make them equally good.
Figure 4. The search space for fault-free theories. (a) The Naive search space and (b) the reduced search space based on MSCRs. The length of each search branch can be different. By applying all repairs in one search branch, that branch terminates with a fault-free theory or with failure, if no repair is available to fix a detected fault.
We have, therefore, explored mechanisms for pruning implausible or sub-optimal repairs—or by ranking them. In §3a below, we describe one such mechanism and then mention two others.
(a) The optimal maximal set of commutative repairs
Commutative repairs are the ones that can be applied in any order, for instance, because they repair different parts of a theory to solve different faults. Thus, we refine the naive search method so that it computes only maximal sets of commutatives repairs (MSCRs). As the repairs in an MSCR can be applied together, the search space of fault-free theories using MSCR is reduced dramatically.
Not all repairs are commutative.
(i) | It is possible that after applying one repair , another repair will not be needed because has also solved the fault which targeted. | ||||
(ii) | On the other hand, may make inapplicable. For instance, may merge predicate with predicate . Then, if would have deleted an axiom of , it cannot find it after ’s application. |
The commutation between repairs and is defined in definition 3.1. represents the application of a repair to a theory .
Definition 3.1. (Commutative repairs)
Two repairs and are commutative if applying them in different orders to theory results in the same repaired theory.
Accordingly, the maximal set of commutative repairs is defined in definition 3.2.
Definition 3.2. (Maximal set of commutative repairs)
Given the whole set of all possible repairs for all detected faults in the theory , an MSCR is a maximum set of ’s commutative repairs if they avoid the scenarios illustrated in (i) and (ii). We can formalize this as follows:
There could be MSCRs, where , and a repair can belong to more than one MSCR. ABC computes all MSCRs and applies each MSCR separately to produce semi-repaired theories, which will be delivered for the next round of fault detection and repair generation. By applying repairs in an MSCR together, the search space is reduced because the search branches of grouped repairs are merged into one. The comparison of search spaces is drawn in figure 4.
Inspired by the sub-optimal pruning of ABC repairs based on Max-Sat [18], an optimal MSCR is defined as follows:
Definition 3.3. (Optimal MSCR)
An MSCR, , is optimal for the theory if and only its estimated cost is not bigger than any of the MSCRs of that theory, denoted as :
By only taking the optimal MSCRs to the remaining repair process, the search space of fault-free theories is further reduced. This method dramatically saves time and space.
(b) Other ranking mechanisms
Another ranking mechanism is inspired by Gärdenfors epistemic entrenchment [10]. This is defined to represent the informational value of a belief so that it can guide a repair system to change the beliefs of the least informational value while keeping the others untouched. Based on the idea of epistemic entrenchment, the vitality of an axiom or a precondition is defined as scores [19], which rank repaired theories so that the best ones are prioritized at the top. Also, the entrenchment of the theory’s signature3 is explored to rank repairs [20].
Another ranking mechanism is based on probability. In a probabilistic logic, a theory can be assigned an overall probability based on the probabilities assigned to its assertions and implications. A probabilistic version of ABC is described in [14].
In future work, we hope to explore the design of extensions to the preferred structure that might distinguish between alternative repairs. Consider, for instance, the use of ABC to diagnose what misconceptions about arithmetic might be the cause of a student’s errors, which we discuss below in §5e. More than one misconception might explain the observed errors. A teacher might set the student an arithmetic problem that would result in different outcomes depending on which misconception the student was suffering from.
4. Illustrative example: the black swan
In this section we illustrate the operation of ABC using the black swan theory, which is given in example 4.1. This example was drawn from the belief revision literature [21], where the proposed repair operations are to remove one of the four axioms: .
Let the theory in 4.1 be .
has both an incompatibility fault and an insufficiency one.
illustrates a limitation of relying on just belief revision for repairing faulty theories. None of the four axiom removal operations results in what we suggest is the most natural repair to its incompatibility fault. We think this fault arises from the ambiguity of : it could mean ‘ is a European variety’ or ‘ is resident in Europe’. In the first case, since is black then is false, but in the second case it could be true if is resident in Germany, e.g. in a zoo.4 ABC’s Reformation 2c repair adds an extra argument to predicate that enables this distinction.
We will start by repairing this incompatibility fault. To see that , consider the SL proof in figure 5.
Figure 5. SL resolution steps of the incompatibility. A different colour is used to highlight each pair of unifying propositions.
The proof in figure 5 can be broken at any of these four coloured unification steps. We will illustrate it being broken at the blue pair, i.e. between and . We choose the repair operation Reformation 2c, which will add a new argument to to distinguish its two possible meanings. ABC is not able to assign meanings to new constants, so we use to the instance in the goal clause and to that in the axiom.5 In this example, humans can interpret as ‘resident’ and as ‘variety’. Note that instances in other rules in , such as (TA1) are assigned a new variable. The resulting (and desired) repair of is given by example 4.2 with changes highlighted in red.
The incompatibility fault has been repaired, as the proof of in figure 5 is now broken.
We now illustrate ABC’s repair of the insufficiency. Its simplest repair is adding the preferred proposition as an axiom directly using Abduction 1. This is illustrated in example 4.3. The required proof of consists of one step between the goal and this new axiom.
This final repaired theory is fault-free with respect to . The repaired theory is generated by combining reformation and abduction, and the solution satisfies the claimed repair postulates.
ABC can find 39 ways to repair theory 4.1 by breaking the proof at different points and by choosing different repair operations to break it. Many of these repairs also support a meaningful interpretation. Our work on mechanisms for preferring one repair over another are described in §3.
5. Applications of theory repair
In §2, we claimed that:
The ABC system has a diverse range of applications in successfully repairing faulty representations.
Our evidence to support this claim is to present some diverse examples of faulty theories that the ABC system has successfully repaired. Is a claim of this kind refutable? Suppose we had found a significant set of applications of theory repair that could not be successfully addressed by ABC. This could be interpreted as a refutation of our claim. We did not find such a set. Indeed, each of the applications we attempted was successful. As mentioned in §2d, different logics present both new repair challenges and opportunities. In each logic we have examined, we have been able to make straightforward adaptations of ABC to enable it to successfully address these new repair challenges. In §6, we discuss the example of Lakatos’s monster barring repairs.
(a) Defeasible reasoning
Defeasible reasoning occurs when a rule is given, but there may be specific exceptions to it. We will call such a rule defeasible. In AI, defeasible reasoning has usually been formalized by some kind of non-monotonic logic [22]. Logical theories are normally6 monotonic, i.e. adding extra axioms to a theory increases its set of theorems. In a non-monotonic theory adding a new axiom can sometimes override some applications of a defeasible rule, so that of proofs of some theorems will no longer hold.
We offer an alternative mechanism using only monotonic logical theories, i.e. a monotonic theory containing a faulty rule is repaired into another monotonic theory in which the fault has been eliminated.
The classic example of defeasible reasoning is about the penguin: a non-flying bird. We have formalized both the original faulty theory and its repair in example 5.1.
The left hand theory has an incompatibility fault: but . The repair operation Reformation 2c is applied to add an additional argument to in all occurrences in theory and these are highlighted in red. This argument is given the value , or a variable. This prevents the unification of with , which is required to prove . The proofs of the members of are unaffected by this repair.
ABC also finds a repair in which Reformation 1c is used to rename in the axiom to a new predicate , representing flying birds, where now means non-flying ones. To avoid introducing an insufficiency, the axiom axiom now has to be duplicated for . This is a disadvantage of Reformation 1c over Reformation 2c in this case.
(b) Modelling virtual bargaining
Virtual Bargaining is a term coined by Cognitive Scientist, Nick Chater, to describe the extraordinary ability to cooperate with humans to reach a, sometimes complex, agreement with only minimal channels of communication. It relies on their ability to put themselves in the shoes of their partner to imagine how they will understand these minimal communications [23].
To illustrate virtual bargaining, Misyak et al. [23] invent a two-person cooperative game called bananas and scorpions. In this game, the human players need to guess or adjust the winning strategy based only on the others’ game moves. The two players are the sender and the receiver. There are three boxes of two kinds: the helpful (containing bananas) and the harmful (containing scorpions). The sender knows all the boxes’ contents and marks one of them to guide the receiver to choose a helpful box by marking only one box. On the other hand, the receiver only knows the number of each type of box, and which box is marked, and then aims to select as many helpful boxes as possible.
Two rounds of the game are illustrated in figure 6. In the first round (g1), only box is helpful and boxes and are harmful while the opposite is true in the second round (g2): and are helpful and is harmful.
Figure 6. Two rounds of the scorpions and bananas game. The sender’s view is at the top and the receiver’s at the bottom. The sender knows what is in each box, the receiver does not. The receiver does, however, know how many helpful and harmful boxes there are, indicated by the red or green diamonds at the bottom left. The sender marks one box with a tick and the receiver can see what was marked. The receiver can open as many boxes as they like but must avoid harmful ones while opening as many helpful ones as possible.
Given this limited bandwidth, each player has to imagine what the other is thinking and plan their play. In situation (g1), the sender has marked the only box marked ‘Help’. This is a natural strategy to adopt. It is akin to pointing at the box you want to have opened. But in the situation (g2), the strategy is less obvious. The sender could mark one of the two ‘Help’ boxes, but cannot mark both, as only one tick is allowed. The receiver could then open this box, but this is a sub-optimal outcome, as the best outcome would be to open both ‘Help’ boxes. Bearing this in mind, the sender has changed strategy to mark the single ‘Harm’ box, intending the receiver to open both ‘Help’ boxes. Remarkably, the human players of the game frequently and spontaneously adopted this strategy, thus confirming their ability to do virtual bargaining. They did not first have to experiment to see which strategy was being used.
In [24], our research group modelled this process. Our Datalog theories were logic programs that the sender and receiver would invent and the receiver could then use to select which boxes to open. The starting theory contains an insufficiency, which is easily repaired to solve g1. However, it would have failed completely on g2, because it would have opened a harmful box and would have failed to open either of the helpful ones.
The key rule in was
The insufficiency in is that . The proof fails because does not unify with , where is the leftmost and marked box. This insufficiency is easily fixed using Reformation 3s, by replacing with in axiom .
In , has both incompatibility and insufficiency faults, namely:
Instead, ABC repairs the faulty using the operation Belief Revision 2, namely adding extra preconditions to rule 5.1. This rule is duplicated and the two new rules are given different preconditions to distinguish the two situations: when there are more harmful than helpful boxes or the other way around. These two new rules are
(c) Root cause analysis
Root cause analysis (RCA) diagnoses faults in a network system using system logs,8 where single causes can trigger multiple failures. Taking the input theory, containing the information from system logs and domain rules, ABC can detect missing information (MI) that is essential to cause failures and then suggests repairs that fix root causes [25].
Figure 7a shows the damage caused by MI in RCA. All nodes are explicitly in the theory, which models the software system, except the dashed node.9 Due to MI, the green node will not be diagnosed as the root cause of all four failures, as it should be. Figure 7b depicts ABC’s workflow in RCA, where the faulty , which lacks MI, is repaired into to cover the previous missed information and then includes repairs that fix root causes.
Figure 7. ABC in root cause analysis. (a) Failed RCA due to MI. Triangles are propositions describing system failures; circle nodes are axioms or theorems representing system behaviours; an arrow starts from a behaviour’s representation to its logical consequences; the dashed node corresponds to the axiom that should be added to represent MI, which is not in the original theory describing the network system; (b) ABC’s flow of two-step RCA. RCA’s inputs are (i) theory ; (ii) the observed system failures as a set of assertions . RCA’s output is the repaired theory where the root cause is addressed. Here ABC’s inputs are a theory, and in turn: in the first step ; ABC outputs potential repairs , from which the selected is the input theory of the second step, where .
The example given by Li & Bundy [25] is about microservices in a network system. In the first step of RCA, ABC detects two insufficiencies in the original faulty theory, because the theory fails to predict two microservices failures. The first insufficiency is caused by the MI of a microservice session: that is built on a full board . Thus, the repair is to add the corresponding axiom (5.4) (in green). The other insufficiency is cased by the mismatch between the predicate in (5.5) and the predicate in (5.6) (in red). The repair is to merge them, e.g. rename to . In the second step of RCA, ABC changes the full board to not being full, which solves all system failures: two microservices and deployed on that board and another microservice depends on the failed according to rule (5.6).
In this example, the two insufficiencies are caused by the incompleteness of the system log: the information of (5.4) was missing, and the theory is formalized from multiple data sources which caused the mismatch between (5.5) and (5.6), respectively. Then the repair of the former reminds engineers to improve the log quality by adding the MI. The repair of renaming to contributes to aligning the knowledge from the different data sources. In addition, the repair of the second step of RCA provides the solution of fixing these system failures: ensuring that board is not full.
(d) New physics by analogy
For his 2016 MSc project, Cheng-Hao Cai applied reformation to the problem of correcting faulty analogies [13,26]. One of these faulty analogies was between gravitational attraction and electrostatic attraction/repulsion. In particular, an approximation to Coulomb’s law of electrostatic force can be generated from Newton’s law of universal gravitation
2016 predates ABC, so Cai applied just reformation. He also needed equational reasoning in addition to resolution, so adapted reformation to work with the Z3 solver [27]. The equivalents of Reformation 1s was used to change attraction to repulsion and Reformation 3s to change to .
(e) Modelling student misconceptions
When students learn arithmetic, they may make mistakes. Jovita Tang’s 2016 MSc project used reformation to model students’ misconceptions of arithmetic procedures [28]. The preferred structure was the students’ incorrect answers to arithmetic problems , with the correct mathematical calculation rules treated as the original faulty theory. ABC repaired into a theory that models the student’s incorrect mathematical calculation, i.e. theory is a logic program that derives the student’s miscalculations in as theorems. The repairs required to do this highlight the student’s misconceptions.
6. Conclusion
We have successfully evaluated our first claim that representational change is integral to the reasoning for both humans and computers. As arguments are fleshed out, faults are exposed by the reasoning process that then has to be repaired. Such repair frequently involves an elaboration of the representation on which the reasoning is based. New concepts must be defined or existing ones refined. Unexpected distinctions are required and the language of the representation is refined to attest to them. For instance, an analysis of Lakatos’ ‘Proofs and Refutations’ shows that, even in mathematical proofs, the objects of the reasoning are revealed to be vague and require elaboration.
To automate representational change, we have developed the ABC system, which combines abduction, belief revision and conceptual change (reformation) to repair faulty theories. We have successfully evaluated our second claim that the ABC system has a diverse range of successful applications to repair faulty representations. We describe diverse successful applications to defeasible reasoning, virtual bargaining, RCA, analogy repair and modelling student misconceptions. These applications include both technological and cognitive domains. It is sometimes necessary to model faults, e.g. in a 5G network or a student’s misconceptions. In these cases, ABC can be used to work backwards, from a theory of the ideal situation, via symptoms of the fault, to the faulty situation being modelled.
Lastly, the question naturally arises as to whether the examples of representational change in [1], that we discussed in §1, can be automated by the ABC system. The answer is yes, potentially. We explored this question in an unpublished note.10 Reformation 1c can be used to bar the three-dimensional interpretation of the hollow cube and Belief Revision 2 to bar the pentagon as a polygon. However, representing some of the concepts involved, such as a polyhedron, required existential quantification and unary functions, which takes us beyond Datalog. A full first-order version of ABC is, therefore, required, so this challenge remains for future work.
Data accessibility
The ABC system can be downloaded from GitHub at https://github.com/XuerLi/ABC_Datalog.
The data are provided in the electronic supplementary material [29].
Authors' contributions
A.B.: conceptualization, formal analysis, funding acquisition, methodology, project administration, resources, supervision, writing–original draft, writing–review and editing; X.L.: conceptualization, formal analysis, methodology, data curation, investigation, software, writing–original draft, writing–review and editing.
Both authors gave final approval for publication and agreed to be held accountable for the work performed therein.
Conflict of interest declaration
We declare we have no competing interests.
Funding
The EPSRC Human-Like Computing Network+ funded the work on virtual bargaining. Huawei project CIENG4721/LSC funded the further development of the ABC system and the application to root cause analysis. Also ELIAI (The Edinburgh Laboratory for Integrated Artificial Intelligence) EPSRC (grant no. EP/W002876/1) funded X.L.
Acknowledgements
Thanks to the co-authors on the papers and dissertations outlined in this survey: Chenghao Cai, Jovita Tang, Boris Mitrovic, Ruiqi Zhu, Jiayu Xue and Eugene Philalithis. Also to Xue’s other supervisors: Alan Smaill and Ewen Maclean. We gratefully acknowledge the support from Huawei, particularly Lei Xu, Stefano Mauceri and Zhenhao Zhou. Thanks to two anonymous reviewers for many helpful comments. We also thank Predrag Janičić for redrawing the diagrams in figures 1 and 2.
Footnotes
1 This requirement can be relaxed providing one is willing to accept a heuristic ABC. That is, proof attempts can be terminated with failure when some time or space threshold is exceeded. So, a difficult to prove theorem might be wrongly classified as unprovable. In fact, a predecessor of ABC was originally developed for the semi-decidable FOL [7].
6 Some logicians regard monotonicity as a defining property. For them, a non-monotonic logic is an oxymoron.
7 Note that, in order to stay within the Datalog grammar, is not the negation of , but a binary predicate in its own right with the same meaning.
8 To avoid misunderstanding, ‘system’ in this subsection only refers to the object where system failures occur, rather than the ABC repair system.