Abduction and Abductive Logic Programming

Finding Explanations for Observations

Computational Logic and Human Thinking. Chapter 10 (150-159), Appendix A6 (301-317) A6

Hypotheses in the form of facts... represent possible underlying causes of observations; and the process of generating them is known as abduction" (Computational Logic and Human Thinking, 151).

Reasoning from observations to explanations

Abduction is defeasible reasoning from effects to causes, e.g., from symptoms to disease. The idea is that given an observation (and a background theory), abduction is reasoning to an explanation. What counts as an explanation? That is a hard question to answer in detail, but the rough idea is that explanations provide information about causes.

Abduction is important for modeling the intelligence of a rational agent. The explanations of observations may trigger maintenance goals that the observations themselves do not trigger.

Suppose that the agent makes the observation that the grass is wet. The problem is to explain the observation. There are many possible explanations, but in this part of the world (Tempe, Arizona) the most likely alternatives are that it rained or that the sprinkler was on. How does the agent reason to these explanations?

One way to find these explanations is by reasoning backwards from the observation (treated as a goal) with beliefs about causal connections represented in the logic program in the form

effect if cause
effect if cause
effect if cause

"Notice that treating observations as goals extends the notion of goal, beyond representing the world as the agent would like it to be in the future, to explaining the world as the agent actually sees it. This is because the two kinds of reasoning, finding actions to achieve a goal and finding hypotheses to explain an observation, can both be viewed as special cases of the more abstract problem of finding assumptions to deductively derive conclusions" (Computational Logic and Human Thinking, 152).

Explaining why the is grass wet

Suppose that the beliefs about the casual connections are

the grass is wet if it rained.
the grass is wet if the sprinkler was on.

Hypothesis for abduction

In the logic program, the predicate wet is "closed." It has a (partial) definition. Something is wet if it rained or the sprinkler was on.

The predicates rained and was on are "open." They have no definition because they do not occur in the heads of clauses.

Open predicates provide the possible hypotheses for abduction.

"In abduction, we augment our beliefs with assumptions concerning instances of open predicates" (Computational Logic and Human Thinking, 159).

Finding possible explanations

Backward reasoning from the observation that the grass is wet results in two possible explanations: either it rained or the sprinkler was on.

The problem now is to decide which is the best explanation. In general, this is difficult to do.

One way to help decide between the explanations is to use forward reasoning. Forward reasoning from alternative explanations can sometimes derive additional consequences that can be confirmed by past or future observations. The greater the number of such additional observations a hypothesis explains, the better the explanation.

For example, the agent might think that if it rained last night, then there will be drops of water on the living room skylight. The agent then may observe that in fact there are drops of water on the skylight. In this case, the agent can think that it is likely that the grass is wet because it rained last night. This explanation is the more likely one because the assumption that it rained explains two independent observations, compared with the assumption that the sprinkler was on, which explains only one.

Integrity constraints

Another way to decide between possible explanations is in terms of the consistency of the explanation with observations. In the "grass is wet" example, there are two possible explanations of the grass is wet. It might be that it rained or that the sprinkler was on. Suppose, however, that the agent observes that there are clothes outside on the line and that the clothes are dry. The hypothesis that it rained does not explain why the clothes are dry. In fact, the hypothesis is inconsistent with this observation. This inconsistency eliminates it rained as an explanation.

One way to incorporate the consistency requirement on explanations is with the use of an integrity constraint.

Integrity constraints work like prohibitions. In the runaway trolley example (in the last lecture), the agent reasons forward from the items in the plan to consequences to determine if any of these consequences trigger a prohibition. If they do, the agent abandons the plan because the prohibition makes it impossible both to accept the plan and to not do something wrong. In the "grass is wet" example, the agent reasons forwards from possible explanations to consequences of those explanations. If any of these consequences are inconsistent with what the agent knows, the agent abandons the explanation because the integrity constraint makes it impossible both to accept the explanation and maintain the integrity of his knowledge base.

In the "grass is wet" example, let the integrity constraint be

if a thing is dry and the thing is wet, then false.

Now suppose the beliefs are

the clothes outside are dry.
the clothes outside are wet if it rained.

Suppose the hypothesis is

it rained.

Forward reasoning yields

the clothes outside are wet

Forward reasoning with this consequence and the constraint yields

if the clothes outside are dry, then false

Finally, more forward reasoning yields


The derivation of false eliminates the hypothesis that it rained as a candidate explanation of the observation that the grass is wet.

On the difficulty of reasoning backwards

"In solving a problem ... sort, the grand thing is to be able to reason backward. That is a very useful accomplishment, and a very easy one, but people do not practise it much. In the everyday affairs of life it is more useful to reason forward, and so the other comes to be neglected. There are fifty who can reason synthetically or one who can reason analytically."
"I confess, Holmes, that I do not quite follow you."
"I hardly expected that you would, Watson. Let me see if I can make it clearer. Most people, if you describe a train of events to them, will tell you what the result would be. They can put those events together in their minds, and argue from them that something will come to pass. There are few people, however, who, if you told them a result, would be able to evolve from their own inner consciousness what the steps were which led up to that result. This power is what I mean when I talk of reasoning backwards, or analytically" (Arthur Conan Doyle, A Study in Scarlet, 58).

"A primitive man wishes to cross a creek; but he cannot do so in the usual way because the water has risen overnight. Thus, the crossing becomes the object of a problem; “crossing the creek’ is the x of this primitive problem. The man may recall that he has crossed some other creek by walking along a fallen tree. He looks around for a suitable fallen tree which becomes his new unknown, his y. He cannot find any suitable tree but there are plenty of trees standing along he creek; he wishes that one of them would fall. Could he make a tree fall across the creek? There is a great idea and there is a new unknown; by what means could he tilt the tree over the creek?
This train of ideas ought to be called analysis if we accept the terminology of Pappus [of Alexandria, active in the 4th century CE]. If the primitive man succeeds in finishing his analysis he may become the inventor of the bridge and of the axe. What will be the synthesis? Translation of ideas into actions. The finishing act of the synthesis is walking along a tree across the creek.
The same objects fill the analysis and the synthesis; they exercise the mind of the man in the analysis and his muscles in the synthesis; the analysis consists in thoughts, the synthesis in acts. There is another difference; the order is reversed. Walking across the creek is the first desire from which the analysis starts and it is the last act with which the synthesis ends" (George Pólya, How to Solve it).

"If P = NP, then the ability to check the solutions to puzzles efficiently would imply the ability to find solutions efficiently. An analogy would be if anyone able to appreciate a great symphony could also compose one themselves!" (Scott Aaronson, "Why Philosophers Should Care About Computational Complexity").

What we have accomplished in this lecture

We considered abductive reasoning, its importance to rational agents, and how to incorporate this reasoning in the logic programming/agent model.

move on go back