38
arXiv:cs/0312043v1 [cs.DB] 18 Dec 2003 Under consideration for publication in Theory and Practice of Logic Programming 1 On A Theory of Probabilistic Deductive Databases LAKS V. S. LAKSHMANANDepartment of Computer Science Concordia University Montreal, Canada and K.R. School of Information Technology IIT – Bombay Mumbai, India (e-mail: [email protected]) FEREIDOON SADRIDepartment of Mathematical Sciences University of North Carolina Greensboro, NC, USA (e-mail: [email protected]) Abstract We propose a framework for modeling uncertainty where both belief and doubt can be given independent, first-class status. We adopt probability theory as the mathematical for- malism for manipulating uncertainty. An agent can express the uncertainty in her knowl- edge about a piece of information in the form of a confidence level, consisting of a pair of intervals of probability, one for each of her belief and doubt. The space of confidence levels naturally leads to the notion of a trilattice, similar in spirit to Fitting’s bilattices. Intuitively, the points in such a trilattice can be ordered according to truth, information, or precision. We develop a framework for probabilistic deductive databases by associating confidence levels with the facts and rules of a classical deductive database. While the trilattice structure offers a variety of choices for defining the semantics of probabilistic deductive databases, our choice of semantics is based on the truth-ordering, which we find to be closest to the classical framework for deductive databases. In addition to proposing a declarative semantics based on valuations and an equivalent semantics based on fixpoint theory, we also propose a proof procedure and prove it sound and complete. We show that while classical Datalog query programs have a polynomial time data complexity, certain query programs in the probabilistic deductive database framework do not even terminate on some input databases. We identify a large natural class of query programs of practi- cal interest in our framework, and show that programs in this class possess polynomial time data complexity, i.e. not only do they terminate on every input database, they are guaranteed to do so in a number of steps polynomial in the input database size. * Research was supported by grants from the Natural Sciences and Engineering Research Council of Canada and NCE/IRIS. Research was supported by grants from NSF and UNCG.

OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

arX

iv:c

s/03

1204

3v1

[cs

.DB

] 1

8 D

ec 2

003

Under consideration for publication in Theory and Practice of Logic Programming 1

On A Theory of Probabilistic Deductive

Databases

LAKS V. S. LAKSHMANAN∗

Department of Computer Science

Concordia University

Montreal, Canada

and

K.R. School of Information Technology

IIT – Bombay

Mumbai, India

(e-mail: [email protected])

FEREIDOON SADRI†

Department of Mathematical Sciences

University of North Carolina

Greensboro, NC, USA

(e-mail: [email protected])

Abstract

We propose a framework for modeling uncertainty where both belief and doubt can begiven independent, first-class status. We adopt probability theory as the mathematical for-malism for manipulating uncertainty. An agent can express the uncertainty in her knowl-edge about a piece of information in the form of a confidence level, consisting of a pairof intervals of probability, one for each of her belief and doubt. The space of confidencelevels naturally leads to the notion of a trilattice, similar in spirit to Fitting’s bilattices.Intuitively, the points in such a trilattice can be ordered according to truth, information,or precision. We develop a framework for probabilistic deductive databases by associatingconfidence levels with the facts and rules of a classical deductive database. While thetrilattice structure offers a variety of choices for defining the semantics of probabilisticdeductive databases, our choice of semantics is based on the truth-ordering, which we findto be closest to the classical framework for deductive databases. In addition to proposinga declarative semantics based on valuations and an equivalent semantics based on fixpointtheory, we also propose a proof procedure and prove it sound and complete. We show thatwhile classical Datalog query programs have a polynomial time data complexity, certainquery programs in the probabilistic deductive database framework do not even terminateon some input databases. We identify a large natural class of query programs of practi-cal interest in our framework, and show that programs in this class possess polynomialtime data complexity, i.e. not only do they terminate on every input database, they areguaranteed to do so in a number of steps polynomial in the input database size.

∗ Research was supported by grants from the Natural Sciences and Engineering Research Councilof Canada and NCE/IRIS.

† Research was supported by grants from NSF and UNCG.

Page 2: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

2 Laks V. S. Lakshmanan and Fereidoon Sadri

1 Introduction

Knowledge-base systems must typically deal with imperfection in knowledge, in

particular, in the form of incompleteness, inconsistency, and uncertainty. With

this motivation, several frameworks for manipulating data and knowledge have

been proposed in the form of extensions to classical logic programming and deduc-

tive databases to cope with imperfections in available knowledge. Abiteboul, et al.

(Abiteboul et al., 1991), Liu (Liu, 1990), and Dong and Lakshmanan (Dong & Lakshmanan, 1992)

dealt with deductive databases with incomplete information in the form of null

values. Kifer and Lozinskii (Kifer & Lozinskii, 1989; Kifer & Lozinskii, 1992) have

developed a logic for reasoning with inconsistency. Extensions to logic programming

and deductive databases for handling uncertainty are numerous. They can broadly

be categorized into non-probabilistic and probabilistic formalisms. We review previ-

ous work in these fields, with special emphasis on probabilistic logic programming,

because of its relevance to this paper.

Non-probabilistic Formalisms

(1) Fuzzy logic programming: This was essentially introduced by van Emden in his

seminal paper on quantitative deduction (van Emden, 1986), and further developed

by various researchers, including Steger et al. (Steger et al., 1989), Schmidt et al.

(Schmidt et al., 1989).

(2) Annotated logic programming: This framework was introduced by Subrahma-

nian (Subrahmanian, 1987), and later studied by Blair and Subrahmanian (Blair & Subrahmanian, 1989a;

Blair & Subrahmanian, 1989b), and Kifer and Li (Kifer & Li, 1988). While Blair

and Subrahmanian’s focus was paraconsistency, Kifer and Li extended the frame-

work of (Subrahmanian, 1987) into providing a formal semantics for rule-based sys-

tems with uncertainty. Finally, this framework was generalized by Kifer and Subrah-

manian into the generalized annotated programming (GAP) framework (Kifer & Subrahmanian, 1992)).

All these frameworks are inherently based on a lattice-theoretic semantics. Anno-

tated logic programming has also been employed with the probabilistic approach,

which we will discuss further below.

(3) Evidence theoretic logic programming: This has been mainly studied by Bald-

win and Monk (Baldwin & Monk, 1987) and Baldwin (Baldwin, 1987)). They use

Dempster’s evidence theory as the basis for dealing with uncertainty in their logic

programming framework.

Probabilistic Formalisms

Indeed, there has been substantial amount of research into probabilistic logics ever

since Boole (Boole, 1854). Carnap (Carnap, 1962) is a seminal work on probabilis-

tic logic. Fagin, Halpern, and Megiddo (Fagin et al., 1990) study the satisfiability

of systems of probabilistic constraints from a model-theoretic perspective. Gaifman

(Gaifman, 1964) extends probability theory by borrowing notions and techniques

from logic. Nilsson (Nilsson, 1986) uses a “possible worlds” approach to give model-

theoretic semantics for probabilistic logic. Hailperin’s (Hailperin, 1984) notion of

probabilistic entailment is similar to that of Nilsson. Some of the probabilistic logic

programming works are based on probabilistic logic approaches, such as Ng and

Page 3: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 3

Subrahmanian’s work on probabilistic logic programming (Ng & Subrahmanian, 1992)

and Ng’s recent work on empirical databases (Ng, 1997). We discuss these works

further below. We will not elaborate on probabilistic logics any more and refer the

reader to Halpern (Halpern, 1990) for additional information.

Works on probabilistic logic programming and deductive databases can be cate-

gorized into two main approaches, annotation-based, and implication based.

Annotation Based Approach: Ng and Subrahmanian (Ng & Subrahmanian, 1992)

were the first to propose a probabilistic basis for logic programming. Their syntax

borrows from that of annotated logic programming (Kifer & Subrahmanian, 1992),

although the semantics are quite different. The idea is that uncertainty is always

associated with individual atoms (or their conjunctions and disjunctions), while the

rules or clauses are always kept classical.

In (Ng & Subrahmanian, 1992), uncertainty in an atom is modeled by associ-

ating a probabilistic truth value with it, and by asserting that it lies in an in-

terval. The main interest is in characterizing how precisely we can “bound” the

probabilities associated with various atoms. In terms of the terminology of belief

and doubt, we can say, following Kifer and Li (Kifer & Li, 1988), that the com-

bination of belief and doubt about a piece of information might lead to an in-

terval of probabilities, as opposed a precise probabilities. But, as pointed out in

(Ng & Subrahmanian, 1992), even if one starts with precise point probabilities for

atomic events, probabilities associated with compound events can only be calcu-

lated to within some exact upper and lower bounds, thus naturally necessitating

intervals. But then, the same argument can be made for an agent’s belief as well as

doubt about a fact, i.e. they both could well be intervals. In this sense, we can say

that the model of (Ng & Subrahmanian, 1992) captures only the belief. A second

important characteristic of this model is that it makes a conservative assumption

that nothing is known about the interdependence of events (captured by the atoms

in an input database), and thus has the advantage of not having to make the often

unrealistic independence assumption. However, by being conservative, it makes it

impossible to take advantage of the (partial) knowledge a user may have about the

interdependence among some of the events.

From a technical perspective, only annotation constants are allowed in (Ng & Subrahmanian, 1992).

Intuitively, this means only constant probability ranges may be associated with

atoms. This was generalized in a subsequent paper by Ng and Subrahmanian

(Ng & Subrahmanian, 1993) to allow annotation variables and functions. They

have developed fixpoint and model-theoretic semantics, and provided a sound and

weakly complete proof procedure. Guntzer et al. (Guntzer et al., 1991) have pro-

posed a sound (propositional) probabilistic calculus based on conditional proba-

bilities, for reasoning in the presence of incomplete information. Although they

make use of a datalog-based interface to implement this calculus, their framework

is actually propositional. In related works, Ng and Subrahmanian have extended

their basic probabilistic logic programming framework to capture stable negation

in (Ng & Subrahmanian, 1994), and developed a basis for Dempster-Shafer theory

in (Ng & Subrahmanian, 1991).

Page 4: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

4 Laks V. S. Lakshmanan and Fereidoon Sadri

Implication Based Approach: While many of the quantitative deduction frame-

works (van Emden (van Emden, 1986), Fitting (Fitting, 1988; Fitting, 1991), De-

bray and Ramakrishnan (Debray & Ramakrishnan, 1994),1 etc.) are implication

based, the first implication based framework for probabilistic deductive databases

was proposed in (Lakshmanan & Sadri, 1994b). The idea behind implication based

approach is to associate uncertainty with the facts as well as rules in a deductive

database. Sadri (Sadri, 1991b; Sadri, 1991a) in a number of papers developed a hy-

brid method called Information Source Tracking (IST) for modeling uncertainty in

(relational) databases which combines symbolic and numeric approaches to model-

ing uncertainty. Lakshmanan and Sadri (Lakshmanan & Sadri, 1994a; Lakshmanan & Sadri, 1997)

pursue the deductive extension of this model using the implication based approach.

Lakshmanan (Lakshmanan, 1994) generalizes the idea behind IST to model un-

certainty by characterizing the set of (complex) scenarios under which certain

(derived) events might be believed or doubted given a knowledge of the appli-

cable belief and doubt scenarios for basic events. He also establishes a connec-

tion between this framework and modal logic. While both (Lakshmanan, 1994;

Lakshmanan & Sadri, 1994a) are implication based approaches, strictly speaking,

they do not require any commitment to a particular formalism (such a probability

theory) for uncertainty manipulation. Any formalism that allows for a consistent

calculation of numeric certainties associated with boolean combination of basic

events, based on given certainties for basic events, can be used for computing the

numeric certainties associated with derived atoms.

Recently, Lakshmanan and Shiri (Lakshmanan & Shiri, 1997) unified and gener-

alized all known implication based frameworks for deductive databases with uncer-

tainty (including those that use formalisms other than probability theory) into a

more abstract framework called the parametric framework. The notions of conjunc-

tions, disjunctions, and certainty propagations (via rules) are parameterized and

can be chosen based on the applications. Even the domain of certainty measures

can be chosen as a parameter. Under such broadly generic conditions, they proposed

a declarative semantics and an equivalent fixpoint semantics. They also proposed a

sound and complete proof procedure. Finally, they characterized conjunctive query

containment in this framework and provided necessary and sufficient conditions for

containment for several large classes of query programs. Their results can be applied

to individual implication based frameworks as the latter can be seen as instances

of the parametric framework. Conjunctive query containment is one of the central

problems in query optimization in databases. While the framework of this paper

can also be realized as an instance of the parametric framework, the concerns and

results there are substantially different from ours. In particular, to our knowledge,

this is the first paper to address data complexity in the presence of (probabilistic)

uncertainty.

1 The framework proposed in (Debray & Ramakrishnan, 1994) unifies Horn clause based com-putations in a variety of settings, including that of quantitative deduction as proposed by vanEmden (van Emden, 1986), within one abstract formalism. However, in view of the assumptionsmade in (Debray & Ramakrishnan, 1994), not all probabilistic conjunctions and disjunctions arepermitted by that formalism.

Page 5: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 5

Other Related Work

Fitting (Fitting, 1988; Fitting, 1991) has developed an elegant framework for quan-

titative logic programming based on bilattices, an algebraic structure proposed by

Ginsburg (Ginsburg, 1988) in the context of many-valued logic programming. This

was the first to capture both belief and doubt in one uniform logic programming

framework. In recent work, Lakshmanan et al. (Lakshmanan et al., 1997) have pro-

posed a model and algebra for probabilistic relational databases. This framework

allows the user to choose notions of conjunctions and disjunctions based on a fam-

ily of strategies. In addition to developing complexity results, they also address

the problem of efficient maintenance of materialized views based on their proba-

bilistic relational algebra. One of the strengths of their model is not requiring any

restrictive independence assumptions among the facts in a database, unlike pre-

vious work on probabilistic relational databases (Barbara et al., 1992). In a more

recent work, Dekhtyar and Subrahmanian (Dekhtyar & Subrahmanian, 1997) de-

veloped an annotation based framework where the user can have a parameterized

notion of conjunction and disjunction. In not requiring independence assumptions,

and being able to allow the user to express her knowledge about event interde-

pendence by means of a parametrized family of conjunctions and disjunctions,

both (Dekhtyar & Subrahmanian, 1997; Lakshmanan et al., 1997) have some simi-

larities to this paper. However, chronologically, the preliminary version of this paper

(Lakshmanan & Sadri, 1994b) was the first to incorporate such an idea in a prob-

abilistic framework. Besides, the frameworks of (Dekhtyar & Subrahmanian, 1997;

Lakshmanan et al., 1997) are substantially different from ours. In a recent work Ng

(Ng, 1997) studies empirical databases, where a deductive database is enhanced

by empirical clauses representing statistical information. He develops a model-

theoretic semantics, and studies the issues of consistency and query processing in

such databases. His treatment is probabilistic, where probabilities are obtained from

statistical data, rather than being subjective probabilities. (See Halpern (Halpern, 1990)

for a comprehensive discussion on statistical and subjective probabilities in logics

of probability.) Ng’s query processing algorithm attempts to resolve a query us-

ing the (regular) deductive component of the database. If it is not successful, then

it reverts to the empirical component, using the notion of most specific reference

class usually used in statistical inferences. Our framework is quite different in that

every rule/fact is associated with a confidence level (a pair of probabilistic inter-

vals representing belief and doubt), which may be subjective, or may have been

obtained from underlying statistical data. The emphasis of our work is on (i) the

characterization of different modes for combining confidences, (ii) semantics, and,

in particular, (iii) termination and complexity issues.

The contributions of this paper are as follows.

• We associate a confidence level with facts and rules (of a deductive database).

A confidence level comes with both a belief and a doubt2 (in what is being

2 We specifically avoid the term disbelief because of its possible implication that it is the comple-

Page 6: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

6 Laks V. S. Lakshmanan and Fereidoon Sadri

asserted) [see Section 2 for a motivation]. Belief and doubt are subintervals

of [0, 1] representing probability ranges.

• We show that confidence levels have an interesting algebraic structure called

trilattices as their basis (Section 3). Analogously to Fitting’s bilattices, we

show that trilattices associated with confidence levels are interlaced, making

them interesting in their own right, from an algebraic point of view. In addi-

tion to providing an algebraic footing for our framework, trilattices also shed

light on the relationship between our work and earlier works and offer useful

insights. In particular, trilattices give rise to three ways of ordering confidence

levels: the truth-order, where belief goes up and doubt comes down, the in-

formation order, where both belief and doubt go up, and the precision order,

where the probability intervals associated with both belief and doubt become

sharper, i.e. the interval length decreases. This is to be contrasted with the

known truth and information (called knowledge there) orders in a bilattice.

• A purely lattice-theoretic basis for logic programming can be constructed

using trilattices (similar to Fitting (Fitting, 1991)). However, since our focus

in this paper is probabilistic uncertainty, we develop a probabilistic calculus

for combining confidence levels associated with basic events into those for

compound events based on them (Section 4). Instead of committing to any

specific rules for combining confidences, we propose a framework which allows

a user to choose an appropriate “mode” from a collection of available ones.

• We develop a generalized framework for rule-based programming with prob-

abilistic knowledge, based on this calculus. We provide the declarative and

fixpoint semantics for such programs and establish their equivalence (Section

5). We also provide a sound and complete proof procedure (Section 6).

• We study the termination and complexity issues of such programs and show:

(1) the closure ordinal of TP can be as high as ω in general (but no more), and

(2) when only positive correlation is used for disjunction3, the data complexity

of such programs is polynomial time. Our proof technique for the last result

yields a similar result for van Emden’s framework (Section 7).

• We also compare our work with related work and bring out the advantages

and generality of our approach (Section 7).

2 Motivation

In this section, we discuss the motivation for our work as well as comment on our

design decisions for this framework. The motivation for using probability theory

as opposed to other formalisms for representing uncertainty has been discussed

at length in the literature (Carnap, 1962; Ng & Subrahmanian, 1992). Probability

theory is perhaps the best understood and mathematically well-founded paradigm

in which uncertainty can be modeled and reasoned about. Two possibilities for

ment of belief, in some sense. In our framework, doubt is not necessarily the truth-functionalcomplement of belief.

3 Other modes can be used (for conjunction/disjunction) in the “non-recursive part” of the pro-gram.

Page 7: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 7

associating probabilities with facts and rules in a DDB are van Emden’s style of

associating confidences with rules as a whole (van Emden, 1986), or the annota-

tion style of Kifer and Subrahmanian (Kifer & Subrahmanian, 1992). The second

approach is more powerful: It is shown in (Kifer & Subrahmanian, 1992) that the

second approach can simulate the first. The first approach, on the other hand,

has the advantage of intuitive appeal, as pointed out by Kifer and Subrahma-

nian (Kifer & Subrahmanian, 1992). In this paper, we choose the first approach. A

comparison between our approach and annotation-based approach with respect to

termination and complexity issues is given in Section 7.

A second issue is whether we should insist on precise probabilities or allow inter-

vals (or ranges). Firstly, probabilities derived from any sources may have tolerances

associated with them. Even experts may feel more comfortable with specifying

a range rather than a precise probability. Secondly, Fenstad (Fenstad, 1980) has

shown (also see (Ng & Subrahmanian, 1992)) that when enough information is not

available about the interaction between events, the probability of compound events

cannot be determined precisely: one can only give (tight) bounds. Thus, we asso-

ciate ranges of probabilities with facts and rules.

A last issue is the following. Suppose (uncertain) knowledge contributed by an

expert corresponds to the formula F . In general, we cannot assume the expert’s

knowledge is perfect. This means he does not necessarily know all situations in

which F holds. Nor does he know all situations where F fails to hold (i.e. ¬F

holds). He models the proportion of the situations where he knows F holds as

his belief in F and the proportion of situations where he knows ¬F holds as his

doubt. There could be situations, unknown to our expert, where F holds (or ¬F

holds). These unknown situations correspond to the gap in his knowledge. Thus,

as far as he knows, F is unknown or undefined in these remaining situations. These

observations, originally made by Fitting (Fitting, 1988), give rise to the following

definition.

Definition 2.1

(Confidence Level) Denote by C[0, 1] the set of all closed subintervals over [0, 1].

Consider the set Lc =def C[0, 1]× C[0, 1]. A Confidence Level is an element of Lc.

We denote a confidence level as 〈[α, β], [γ, δ]〉.

In our approach confidence levels are associated with facts and rules. The in-

tended meaning of a fact (or rule) F having a confidence 〈[α, β], [γ, δ]〉 is that α

and β are the lower and upper bounds of the expert’s belief in F , and γ and δ

are the lower and upper bounds of the expert’s doubt in F . These notions will be

formalized in Section 4.

The following example illustrates such a scenario. (The figures in all our examples

are fictitious.)

Example 2.1

Consider the results of Gallup polls conducted before the recent Canadian federal

elections.

1. Of the people surveyed, between 50% and 53% of the people in the age group 19

Page 8: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

8 Laks V. S. Lakshmanan and Fereidoon Sadri

to 30 favor the liberals.

2. Between 30% and 33% of the people in the above age group favor the reformists.

3. Between 5% and 8% of the above age group favor the tories.

The reason we have ranges for each category is that usually some tolerance is

associated with the results coming from such polls. Also, we do not make the pro-

portion of undecided people explicit as our interest is in determining the support

for the different parties. Suppose we assimilate the information above in a prob-

abilistic framework. For each party, we compute the probability that a randomly

chosen person from the sample population of the given age group will (not) vote

for that party. We transfer this probability as the subjective probability that any

person from that age group (in the actual population) will (not) vote for the party.

The conclusions are given below, where vote(X,P ) says X will vote for party P ,

age-group1(X) says X belongs to the age group specified above. liberals, reform,

and tories are constants, with the obvious meaning.

1. vote(X, liberals)〈[0.5,0.53],[0.35,0.41]〉< age-group1(X).

2. vote(X, reform):〈[0.3,0.33],[0.55,0.61]〉< age-group1(X).

3. vote(X, tories):〈[0.05,0.08],[0.8,0.86]〉< age-group1(X).

As usual, each rule is implicitly universally quantified outside the entire rule.

Each rule is expressed in the form

A〈[α, β], [γ, δ]〉

< Body

where α, β, γ, δ ∈ [0, 1]. We usually require that α ≤ β and γ ≤ δ. With each

rule, we have associated two intervals. [α, β] ([γ, δ]) is the belief (doubt) the expert

has in the rule. Notice that from his knowledge, the expert can only conclude

that the proportion of people he knows favor reform or tories will not vote for

liberals. Thus the probability that a person in the age group 19-30 will not vote for

liberals, according to the expert’s knowledge, is in the range [0.35, 0.41], obtained by

summing the endpoints of the belief ranges for reform and tories. Notice that in this

case α+ δ (or β+ γ) is not necessarily 1. This shows we cannot regard the expert’s

doubt as the complement (with respect to 1) of his belief. Thus, if we have to model

what necessarily follows according to the expert’s knowledge, then we must carry

both the belief and the doubt explicitly. Note that this example suggests just one

possible means by which confidence levels could be obtained from statistical data.

As discussed before, gaps in an expert’s knowledge could often directly result in

both belief and doubt. In general, there could be many ways in which both belief

and doubt could be obtained and associated with the basic facts. Given this, we

believe that an independent treatment of both belief and doubt is both necessary

and interesting for the purpose of obtaining the confidence levels associated with

derived facts. Our approach to independently capture belief and doubt makes it

possible to cope with incomplete knowledge regarding the situations in which an

event is true, false, or unknown in a general setting.

Kifer and Li (Kifer & Li, 1988) and Baldwin (Baldwin, 1987) have argued that

incorporating both belief and doubt (called disbelief there) is useful in dealing

Page 9: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 9

with incomplete knowledge, where different evidences may contradict each other.

However, in their frameworks, doubt need not be maintained explicitly. For suppose

we have a belief b and a disbelief d associated with a phenomenon. Then they can

both be absorbed into one range [b, 1 − d] indicating that the effective certainty

ranges over this set. The difference with our framework, however, is that we model

what is known definitely, as opposed to what is possible. This makes (in our case)

an explicit treatment of belief and doubt mandatory.

3 The Algebra of Confidence Levels

Fitting (Fitting, 1991) has shown that bilattices (introduced by Ginsburg (Ginsburg, 1988))

lead to an elegant framework for quantified logic programming involving both belief

and doubt. In this section, we shall see that a notion of trilattices naturally arises

with confidence levels. We shall establish the structure and properties of trilattices

here, which will be used in later sections.

Definition 3.1

Denote by C[0, 1] the set of all closed subintervals over [0, 1]. Consider the set

Lc =def C[0, 1]×C[0, 1]. We denote the elements of Lc as 〈[α, β], [γ, δ]〉. Define the

following orders on this set. Let 〈[α1, β1], [γ1, δ1]〉, 〈[α2, β2], [γ2, δ2]〉 be any two

elements of Lc.

〈[α1, β1], [γ1, δ1]〉 ≤t 〈[α2, β2], [γ2, δ2]〉 iff α1 ≤ α2, β1 ≤ β2 and γ2 ≤ γ1, δ2 ≤ δ1〈[α1, β1], [γ1, δ1]〉 ≤k 〈[α2, β2], [γ2, δ2]〉 iff α1 ≤ α2, β1 ≤ β2 and γ1 ≤ γ2, δ1 ≤ δ2〈[α1, β1], [γ1, δ1]〉 ≤p 〈[α2, β2], [γ2, δ2]〉 iff α1 ≤ α2, β2 ≤ β1 and γ1 ≤ γ2, δ2 ≤ δ1

Some explanation is in order. The order ≤t can be considered the truth ordering:

“truth” relative to the expert’s knowledge increases as belief goes up and doubt

comes down. The order ≤k is the knowledge (or information) ordering: “knowledge”

(i.e. the extent to which the expert commits his opinion on an assertion) increases as

both belief and doubt increase. The order ≤p is the precision ordering: “precision”

of information supplied increases as the probability intervals become narrower. The

first two orders are analogues of similar orders in bilattices. The third one, however,

has no counterpart there. It is straightforward to see that each of the orders ≤t,

≤k, and ≤p is a partial order. Lc has a least and a greatest element with respect to

each of these orders. In the following, we give the definition of meet and join with

respect to the ≤t order. Operators with respect to the other orders have a similar

definition.

Definition 3.2

Let 〈Lc,≤t,≤k,≤p〉 be as defined in Definition 3.1. Then the meet and join corre-

sponding to the truth, knowledge (information), and precision orders are defined as

follows. The symbols ⊗ and ⊕ denote meet and join, and the subscripts t, k, and p

represent truth, knowledge, and precision, respectively.

1. 〈[α1, β1], [γ1, δ1]〉⊗t〈[α2, β2], [γ2, δ2]〉 =

〈[min{α1, α2},min{β1, β2}], [max{γ1, γ2},max{δ1, δ2}]〉.

Page 10: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

10 Laks V. S. Lakshmanan and Fereidoon Sadri

2. 〈[α1, β1], [γ1, δ1]〉⊕t〈[α2, β2], [γ2, δ2]〉 =

〈[max{α1, α2},max{β1, β2}], [min{γ1, γ2},min{δ1, δ2}]〉.

3. 〈[α1, β1], [γ1, δ1]〉⊗k〈[α2, β2], [γ2, δ2]〉 =

〈[min{α1, α2},min{β1, β2}], [min{γ1, γ2},min{δ1, δ2}]〉.

4. 〈[α1, β1], [γ1, δ1]〉⊕k〈[α2, β2], [γ2, δ2]〉 =

〈[max{α1, α2},max{β1, β2}], [max{γ1, γ2},max{δ1, δ2}]〉.

5. 〈[α1, β1], [γ1, δ1]〉⊗p〈[α2, β2], [γ2, δ2]〉 =

〈[min{α1, α2},max{β1, β2}], [min{γ1, γ2},max{δ1, δ2}]〉.

6. 〈[α1, β1], [γ1, δ1]〉⊕p〈[α2, β2], [γ2, δ2]〉 =

〈[max{α1, α2},min{β1, β2}], [max{γ1, γ2},min{δ1, δ2}]〉.

The top and bottom elements with respect to the various orders are as follows.

The subscripts indicate the associated orders, as usual.

⊤t = 〈[1, 1], [0, 0]〉, ⊥t = 〈[0, 0], [1, 1]〉,

⊤k = 〈[1, 1], [1, 1]〉, ⊥k = 〈[0, 0], [0, 0]〉,

⊤p = 〈[1, 0], [1, 0]〉, ⊥p = 〈[0, 1], [0, 1]〉.

⊤t corresponds to total belief and no doubt; ⊥t is the opposite. ⊤k represents

maximal information (total belief and doubt), to the point of being probabilisti-

cally inconsistent: belief and doubt probabilities sum to more than 1; ⊥k gives

the least information: no basis for belief or doubt; ⊤p is maximally precise, to the

point of making the intervals empty (and hence inconsistent, in a non-probabilistic

sense); ⊥p is the least precise, as it imposes only trivial bounds on belief and doubt

probabilities.

Fitting (Fitting, 1991) defines a bilattice to be interlaced whenever the meet and

join with respect to any order of the bilattice are monotone with respect to the

other order. He shows that it is the interlaced property of bilattices that makes

them most useful and attractive. We say that a trilattice is interlaced provided the

meet and join with respect to any order are monotone with respect to any other

order. We have

Lemma 3.1

The trilattice 〈Lc,≤t,≤k,≤p〉 defined above is interlaced.

Proof. Follows directly from the fact that max and min are monotone functions.

We show the proof for just one case. Let 〈[α1, β1], [γ1, δ1]〉 ≤p 〈[α3, β3], [γ3, δ3]〉

and 〈[α2, β2], [γ2, δ2]〉 ≤p 〈[α4, β4], [γ4, δ4]〉. Then

〈[α1, β1], [γ1, δ1]〉⊗t〈[α2, β2], [γ2, δ2]〉 =

〈[min{α1, α2},min{β1, β2}], [max{γ1, γ2},max{δ1, δ2}]〉

〈[α3, β3], [γ3, δ3]〉⊗t〈[α4, β4], [γ4, δ4]〉 =

〈[min{α3, α4},min{β3, β4}], [max{γ3, γ4},max{δ3, δ4}]〉

Since α1 ≤ α3, β3 ≤ β1, α2 ≤ α4, β4 ≤ β2, we havemin{α1, α2} ≤ min{α3, α4}, and

min{β3, β4} ≤ min{β1, β2}. Similarly,min{γ1, γ2} ≤ min{γ3, γ4} andmin{δ3, δ4} ≤

min{δ1, δ2}. This implies

〈[α1, β1], [γ1, δ1]〉⊗t〈[α2, β2], [γ2, δ2]〉 ≤p 〈[α3, β3], [γ3, δ3]〉⊗t〈[α4, β4], [γ4, δ4]〉

Other cases are similar.

Page 11: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 11

Trilattices are of independent interest in their own right, from an algebraic point

of view. We also stress that they can be used as a basis for developing quanti-

fied/annotated logic programming schemes (which need not be probabilistic). This

will be pursued in a future paper.

In closing this section, we note that other orders are also possible for confidence

levels. In fact, Fitting has shown that a fourth order, denoted by ≤f in the following,

together with the three orders defined above, forms an interlaced “quadri-lattice”

(Fitting, 1995). He also pointed out that this “quadri-lattice” can be generated as

the cross product of two bilattices. Intuitively, a confidence level increases according

to this fourth ordering, when the precision of the belief component of a confidence

level goes up, while that of the doubt component goes down. That is,

〈[α1, β1], [γ1, δ1]〉 ≤f 〈[α2, β2], [γ2, δ2]〉 iff α1 ≤ α2, β2 ≤ β1 and γ2 ≤ γ1, δ1 ≤ δ2

In our opinion, the fourth order, while technically elegant, does not have the same

intuitive appeal as the three orders – truth, knowledge, and precision – mentioned

above. Hence, we do not consider it further in this paper. The algebraic properties of

confidence levels and their underlying lattices are interesting in their own right, and

might be used for developing alternative bases for quantitative logic programming.

This issue is orthogonal to the concerns of this paper.

4 A Probabilistic Calculus

Given the confidence levels for (basic) events, how are we to derive the confi-

dence levels for compound events which are based on them? Since we are work-

ing with probabilities, our combination rules must respect probability theory. We

need a model of our knowledge about the interaction between events. A simplis-

tic model studied in the literature (e.g. see Barbara et al. (Barbara et al., 1990))

assumes independence between all pairs of events. This is highly restrictive and

is of limited applicability. A general model, studied by Ng and Subrahmanian

(Ng & Subrahmanian, 1992; Ng & Subrahmanian, 1993) is that of ignorance: as-

sume no knowledge about event interaction. Although this is the most general

possible situation, it can be overly conservative when some knowledge is available,

concerning some of the events. We argue that for “real-life” applications, no single

model of event interaction would suffice. Indeed, we need the ability to “parameter-

ize” the model used for event interaction, depending on what is known about the

events themselves. In this section, we develop a probabilistic calculus which allows

the user to select an appropriate “mode” of event interaction, out of several choices,

to suit his needs.

Let L be an arbitrary, but fixed, first-order language with finitely many constants,

predicate symbols, infinitely many variables, and no function symbols 4. We use

(ground) atoms of L to represent basic events. We blur the distinction between an

event and the formula representing it. Our objective is to characterize confidence

4 In deductive databases, it is standard to restrict attention to function free languages. Sinceinput databases are finite (as they are in reality), this leads to a finite Herbrand base.

Page 12: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

12 Laks V. S. Lakshmanan and Fereidoon Sadri

levels of boolean combinations of events involving the connectives ¬,∧,∨, in terms

of the confidence levels of the underlying basic events under various modes (see

below).

We gave an informal discussion of the meaning of confidence levels in Section

2. We use the concept of possible worlds to formalize the semantics of confidence

levels.

Definition 4.1

(Semantics of Confidence Levels) According to the expert’s knowledge, an event

F can be true, false, or unknown. This gives rise to 3 possible worlds. Let 1, 0,⊥

respectively denote true, false, and unknown. Let Wi denote the world where the

truth-value of F is i, i ∈ {0, 1,⊥}, and let wi denote the probability of the world

Wi Then the assertion that the confidence level of F is 〈[α, β], [γ, δ]〉, written

conf (F ) = 〈[α, β], [γ, δ]〉, corresponds to the following constraints:

α ≤ w1 ≤ β

γ ≤ w0 ≤ δ

wi ≥ 0, i ∈ {1, 0,⊥}

Σiwi = 1

(1)

where α and β are the lower and upper bounds of the belief in F , and γ and δ are

the lower and upper bounds of the doubt in F .

Equation (1) imposes certain restrictions on confidence levels.

Definition 4.2

(Consistent confidence levels) We say a confidence level 〈[α, β], [γ, δ]〉 is consistent

if Equation (1) has an answer.

It is easily seen that:

Proposition 4.1

Confidence level 〈[α, β], [γ, δ]〉 is consistent provided (i) α ≤ β and γ ≤ δ, and (ii)

α+ γ ≤ 1.

The consistency condition guarantees at least one solution to Equation (1). How-

ever, given a confidence level 〈[α, β], [γ, δ]〉, there may be w1 values in the [α, β]

interval for which no w0 value exists in the [γ, δ] interval to form an answer to

Equation (1), and vice versa. We can “trim” the upperbounds of 〈[α, β], [γ, δ]〉 as

follows to guarantee that for each value in the [α, β] interval there is at least one

value in the [γ, δ] interval which form an answer to Equation (1).

Definition 4.3

(Reduced confidence level) We say a confidence level 〈[α, β], [γ, δ]〉 is reduced if for

all w1 ∈ [α, β] there exist w0, w⊥ such that w1, w0, w⊥ is a solution to Equation

(1), and for all w0 ∈ [γ, δ] there exist w1, w⊥ such that w1, w0, w⊥ is a solution to

Equation (1).

It is obvious that a reduced confidence level is consistent.

Page 13: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 13

Proposition 4.2

Confidence level 〈[α, β], [γ, δ]〉 is reduced provided (i) α ≤ β and γ ≤ δ, and (ii)

α+ δ ≤ 1, and β + γ ≤ 1.

Proposition 4.3

Let c = 〈[α, β], [γ, δ]〉 be a consistent confidence level. Let β′ = 1 − γ and δ′ =

1 − α. Then, the confidence level c′ = [α,min(β, β′)], [γ,min(δ, δ′)] is a reduced

confidence level. Further, c and c′ are probabilistically equivalent, in the sense that

they produce exactly the same answer sets to Equation (1).

Data in a probabilistic deductive database, that is, facts and rules that comprise

the database, are associated with confidence levels. At the atomic level, we require

the confidence levels to be consistent. This means each expert, or data source,

should be consistent with respect to the confidence levels it provides. This does not

place any restriction on data provided by different experts/sources, as long as each

is individually consistent. Data provided by different experts/sources should be

combined, using an appropriate combination mode (discussed in next section). We

will show that the combination formulas for the various modes preserve consistent

as well as reduced confidence levels.

4.1 Combination Modes

Now, we introduce the various modes and characterize conjunction and disjunction

under these modes. Let F and G represent two arbitrary ground (i.e. variable-free)

formulas. For a formula F , conf (F ) will denote its confidence level. In the following,

we describe several interesting and natural modes and establish some results on the

confidence levels of conjunction and disjunction under these modes. Some of the

modes are well known, although care needs to be taken to allow for the 3-valued

nature of our framework.

1. Ignorance: This is the most general situation possible: nothing is assumed/known

about event interaction between F and G. The extent of the interaction between

F and G could range from maximum overlap to minimum overlap.

2. Independence: This is a well-known mode. It simply says (non-)occurrence of one

event does not influence that of the other.

3. Positive Correlation: This mode corresponds to the knowledge that the occur-

rences of two events overlap as much as possible. This means the conditional prob-

ability of one of the events (the one with the larger probability) given the other is

1.

4. Negative Correlation: This is the exact opposite of positive correlation: the oc-

currences of the events overlap minimally.

5. Mutual Exclusion: This is a special case of negative correlation, where we know

that the sum of probabilities of the events does not exceed 1.

We have the following results.

Page 14: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

14 Laks V. S. Lakshmanan and Fereidoon Sadri

Proposition 4.4

Let F be any event, and let conf (F ) = 〈[α, β], [γ, δ]〉. Then conf (¬F ) = 〈[γ, δ], [α, β]〉.

Thus, negation simply swaps belief and doubt.

Proof. Follows from the observation that conf (F ) = 〈[α, β], [γ, δ]〉 implies that

α ≤ w1 ≤ β and γ ≤ w0 ≤ δ, where w1 (w0) denotes the probability of the possible

world where event F is true (false).

The following theorem establishes the confidence levels of compound formulas as

a function of those of the constituent formulas, under various modes.

Theorem 4.1

Let F and G be any events and let conf (F ) = 〈[α1, β1], [γ1, δ1]〉 and conf (G) =

〈[α2, β2], [γ2, δ2]〉. Then the confidence levels of the compound events F ∧ G and

F ∨G are given as follows. (In each case the subscript denotes the mode.)

conf (F ∧ig G) =

〈[max{0, α1 + α2 − 1},min{β1, β2}], [max{γ1, γ2}, min{1, δ1 + δ2}]〉.

conf (F∨igG) = 〈[max{α1, α2},min{1, β1+β2}], [max{0, γ1+γ2−1},min{δ1, δ2}]〉.

conf (F ∧indG) = 〈[α1×α2, β1×β2], [1− (1−γ1)× (1−γ2), 1− (1− δ1)× (1− δ2)]〉.

conf (F ∨indG) = 〈[1− (1−α1)× (1−α2), 1− (1−β1)× (1−β2)], [γ1×γ2, δ1× δ2]〉.

conf (F ∧pc G) = 〈[min{α1, α2},min{β1, β2}], [max{γ1, γ2},max{δ1, δ2}]〉.

conf (F ∨pc G) = 〈[max{α1, α2},max{β1, β2}], [min{γ1, γ2},min{δ1, δ2}]〉.

conf (F ∧nc G) =

〈[max{0, α1 + α2 − 1},max{0, β1 + β2 − 1}], [min{1, γ1 + γ2},min{1, δ1 + δ2}]〉.

conf (F ∨nc G) =

〈[min{1, α1 + α2},min{1, β1 + β2}], [max{0, γ1 + γ2 − 1},max{0, δ1 + δ2 − 1}]〉.

conf (F ∧me G) = 〈[0, 0], [min{1, γ1 + γ2},min{1, δ1 + δ2}]〉.

conf (F ∨me G) = 〈[α1 + α2, β1 + β2], [max{0, γ1 + γ2 − 1},max{0, δ1 + δ2 − 1}]〉.

Proof. Each mode is characterized by a system of constraints, and the confidence

level of the formulas F ∧ G,F ∨ G are obtained by extremizing certain objective

functions subject to these constraints.

The scope of the possible interaction between F and G can be characterized as

follows (also see (Frechet, M., 1935; Ng & Subrahmanian, 1992)). According to the

expert’s knowledge, each of F,G can be true, false, or unknown. This gives rise to

9 possible worlds. Let 1, 0,⊥ respectively denote true, false, and unknown. Let Wij

denote the world where the truth-value of F is i and that of G is j, i, j ∈ {1, 0,⊥}.

E.g. , W10 is the world where F is true and G is false, while W0⊥ is the world

where F is false and G is unknown. Suppose wij denotes the probability associated

with world Wij . Then the possible scope of interaction between F and G can be

characterized by the following constraints.

Page 15: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 15

α1 ≤ w10 + w1⊥ + w11 ≤ β1

γ1 ≤ w00 + w0⊥ + w01 ≤ δ1α2 ≤ w01 + w⊥1 + w11 ≤ β2

γ2 ≤ w00 + w⊥0 + w10 ≤ δ2wij ≥ 0, i, j ∈ {1, 0,⊥}

Σi,jwij = 1

(2)

The above system of constraints must be satisfied for all modes. Specific con-

straints for various modes are obtained by adding more constraints to those in

Equation (2). In all cases, the confidence levels for F ∧G and F ∨G are obtained

as follows.

conf (F ◦G) = 〈[min(ΣWij |=F◦Gwij),max(ΣWij |=F◦Gwij)],

[min(ΣWij 6|=F◦Gwij),max(ΣWij 6|=F◦Gwij)]〉

where ◦ is ∧ or ∨.

Case 1: Ignorance.

The constraints for ignorance are exactly those in Equation (2). The solution to

the above linear program can be shown to be

conf (F ∧G) = 〈[max{0, α1+α2−1},min{β1, β2}], [max{γ1, γ2}, min{1, δ1+δ2}]〉,

conf (F ∨G) = 〈[max{α1, α2},min{1, β1+β2}], [max{0, γ1+γ2−1}, min{δ1, δ2}]〉.

The proof is very similar to the proof of a similar result in the context of belief

intervals (no doubt) by Ng and Subrahmanian (Ng & Subrahmanian, 1992).

Case 2: Independence.

Independence of events F and G can be characterized by the equation P (F |G) =

P (F ), where P (F |G) is the conditional probability of the event F given event G.

More specifically, since in our model an event can be true, false, or unknown, (in

other words, we model belief and doubt independently) we have 5:

P (F is true | G is true) = P (F is true)

P (F is true | G is false) = P (F is true)

P (F is false | G is true) = P (F is false)

P (F is false | G is false) = P (F is false)

(3)

Then the constraints characterizing independence is obtained by adding the follow-

ing equations to the system of constraints (2).

w11 = (w10 + w1⊥ + w11)× (w01 + w⊥1 + w11)

w10 = (w10 + w1⊥ + w11)× (w00 + w⊥0 + w10)

w01 = (w00 + w0⊥ + w01)× (w01 + w⊥1 + w11)

w00 = (w00 + w0⊥ + w01)× (w00 + w⊥0 + w10)

(4)

The belief in F ∧indG, and doubt in F ∨indG can be easily verified from the system

5 We have nine equations, but it can be shown that the other five are dependent on these four

Page 16: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

16 Laks V. S. Lakshmanan and Fereidoon Sadri

of constraints 2 and 4 6

α1 × α2 ≤ w11 ≤ β1 × β2

γ1 × γ2 ≤ w00 ≤ δ1 × δ2(5)

To obtain the doubt in F ∧ind G we need to compute the minimum and maximum

of w00 + w0⊥ + w01 + w10 + w⊥0. It is easy to verify that:

γ1 + γ2 − γ1 × γ2 ≤ w00 + w0⊥ + w01 + w10 + w⊥0 ≤ δ1 + δ2 − δ1 × δ2

The belief in F ∨ind G is obtained similarly (in the dual manner.) Thus, we have

verified that

conf (F ∧indG) = 〈[α1×α2, β1×β2], [1− (1−γ1)× (1−γ2), 1− (1− δ1)× (1− δ2)]〉.

conf (F ∨indG) = 〈[1− (1−α1)× (1−α2), 1− (1−β1)× (1−β2)], [γ1×γ2, δ1× δ2]〉.

Case 3: Positive Correlation:

Two events F and G are positively correlated if they overlap as much as possible.

This happens when either (i) occurrence of F implies occurrence of G, or (ii)

occurrence of G implies occurrence of F . In our framework we model belief and

doubt independently, and positive correlation is characterized by 4 possibilities:

(a) Occurrence of F implies occurrence of G, and non-occurrence of G implies non-

occurrence of F .

(b) Occurrence of F implies occurrence of G, and non-occurrence of F implies non-

occurrence of G.

(c) Occurrence of G implies occurrence of F , and non-occurrence of G implies non-

occurrence of F .

(d) Occurrence of G implies occurrence of F , and non-occurrence of F implies

non-occurrence of G.

Each of these four condition sets generates its own equations. For example, (a)

can be captured by adding the following equations to the system of constraints 2.

w1⊥ = 0

w10 = 0

w⊥0 = 0

(6)

Hence, for condition (a), the system of constraints 2 becomes

α1 ≤ w11 ≤ β1

γ1 ≤ w00 + w0⊥ + w01 ≤ δ1α2 ≤ w01 + w⊥1 + w11 ≤ β2

γ2 ≤ w00 ≤ δ2wij ≥ 0, i, j ∈ {1, 0,⊥}

Σi,jwij = 1

(7)

The analysis is further complicated by the fact that the confidence levels of

6 such duality results exist with respect to conjunction and disjunctions lower and upper bounds(and vice versa).

Page 17: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 17

F and G determine which of these cases apply, and it may be different for the

lowerbound and upperbound probabilities. For example, if α1 > α2 (β1 > β2), then

the lowerbound (upperbound) for belief in F ∧pc G is obtained when occurrence of

F implies occurrence of G. Otherwise, these bounds are obtained when occurrence

of G implies occurrence of F .

The solution to these linear programs can be shown to be

conf (F ∧pc G) = 〈[min{α1, α2},min{β1, β2}], [max{γ1, γ2},max{δ1, δ2}]〉, and

conf (F ∨pc G) = 〈[max{α1, α2},max{β1, β2}], [min{γ1, γ2},min{δ1, δ2}]〉.

A more intuitive approach to the derivation of confidence levels for conjunction

and disjunction of positively correlated events is to rely on the observation that

these events overlap to the maximum extent possible. In our framework it means the

worlds where F is true and those where G is true overlap maximally, and hence, one

is included in the other. Similarly, since we model belief and doubt independently,

the worlds where F is false and those where G is false also overlap maximally. The

combination formulas can be derived directly using these observations.

Case 4: Negative Correlation:

Negative correlation is an appropriate mode to use whenever we know that events

F and G overlap as little as possible. This is to be contrasted with positive corre-

lation, where the extent of overlap is the greatest possible. Mutual exclusion, is a

special case of negative correlation where the sum of the probabilities of the two

events does not exceed 1. In this case the two events do not overlap at all.

In the classical framework, mutual exclusion of two events F and G is character-

ized by the statement: (i) occurrence of F implies non-occurrence of G, and vice

versa. On the other hand, if the two events F and G are negatively correlated but

not mutually exclusive, we have: (ii) non-occurrence of F implies occurrence of G,

and vice versa. In Case (i) the sum of the probabilities of the two events is at most

1, while in Case (ii) this sum exceeds 1 and hence the two events cannot be mu-

tually exclusive. In our framework we model belief and doubt independently, and

each of the above conditions translates to two conditions as follows. Note that in

our framework, “not true” means “false or unknown”, and “not false” means “true

or unknown”.

Case (i):

(a) Event F is true implies G is not true, and vice versa. This condition generates

the equation w11 = 0.

(b) The dual of condition (a), when the non-occurrence of the two events don’t

overlap. Event F is false implies G is not false, and vice versa. This condition

generates the equation w00 = 0.

Case (ii):

(c) Event F is not true implies G is true, and vice versa. This condition generates

the equations w00 = 0, w⊥0 = 0, w0⊥ = 0, and w⊥⊥ = 0.

(d) The dual of (c), F is not false impliesG is false, and vice versa, which generates

the equations w11 = 0, w⊥1 = 0, w1⊥ = 0, and w⊥⊥ = 0.

Page 18: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

18 Laks V. S. Lakshmanan and Fereidoon Sadri

Similar to the case for positive correlation, the confidence levels of F and G

determine which of these cases apply. For example, if α1 + α2 > 1, then case (c)

should be used to determine the lowerbound for belief in F ∧nc G.

Alternatively, and more intuitively, we can characterize negative correlation by

observing that the worlds where F is true and those where G is true overlap min-

imally, and the worlds where F is false and those where G is false also overlap

minimally. The confidences of F ∧ G and F ∨ G can be obtained using the equa-

tions, or directly from the alternative characterization:

conf (F ∧nc G) =

〈[max{0, α1 + α2 − 1},max{0, β1 + β2 − 1}], [min{1, γ1 + γ2},min{1, δ1 + δ2}]〉

conf (F ∨nc G) =

〈[min{1, α1 + α2},min{1, β1 + β2}], [max{0, γ1 + γ2 − 1},max{0, δ1 + δ2 − 1}]〉

Case 5: Mutual Exclusion:

Mutual exclusion is a special case of negative correlation. The main difference

is that it requires the sum of the two probabilities to be at most 1, which is not

necessarily the case for negative correlation (see the previous case). In the classical

framework, if two events are mutually exclusive, their negation are not necessarily

mutually exclusive. Rather, they are negatively correlated. In our framework, how-

ever, one or both conditions (a) and (b), discussed in the previous case, can hold.

The appropriate condition is determined by the confidence levels of the two mutu-

ally exclusive events, and the corresponding combination formula can be obtained

from the combination formulas of negative correlation. The following formulas, for

example, are for mutually exclusive events F and G where α1 + α2 ≤ β1 + β2 ≤ 1

(but no other restriction).

conf (F ∧me G) = 〈[0, 0], [min{1, γ1 + γ2},min{1, δ1 + δ2}]〉.

conf (F ∨meG) = 〈[α1+α2, β1+β2], [max{0, γ1+ γ2− 1},max{0, δ1+ δ2− 1}]〉.

Next, we show that the combination formulas for various modes preserve consis-

tent as well as reduced confidence levels. The case for reduced confidence levels is

more involved and will be presented first. The other case is similar, for which we

only state the theorem.

Theorem 4.2

Suppose F and G are any formulas and assume their confidence levels are reduced

(Definition 4.3). Then the confidence levels of the formulas F ∧ G and F ∨ G,

obtained under the various modes above are all reduced.

Proof. Let conf (F ) = 〈[α1, β1], [γ1, δ1]〉 and conf (G) = 〈[α2, β2], [γ2, δ2]〉. Since

the confidence levels of F and G are reduced, we have:

0 ≤ αi ≤ βi ≤ 1

0 ≤ γi ≤ δi ≤ 1

αi + δi ≤ 1

βi + γi ≤ 1

The consistency of the confidence levels of the combination events F ∧G and F ∨G

Page 19: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 19

in different modes as derived in Theorem 4.1 follow from the above constraints. For

example let us consider

conf (A∧igB) = 〈[max{0, α1+α2−1},min{β1, β2}], [max{γ1, γ2},min{1, δ1+δ2}]〉

We need to show

(1) max{0, α1 + α2 − 1} ≤ min{β1, β2}

(2) max{γ1, γ2} ≤ min{1, δ1 + δ2}

(3) max{0, α1 + α2 − 1}+min{1, δ1 + δ2} ≤ 1

(4) min{β1, β2}+max{γ1, γ2} ≤ 1

To prove (1): If max{0, α1 + α2 − 1} = 0 then (1) holds. Otherwise, assume,

without loss of generality, that min{β1, β2} = β1. We can write

α1 ≤ β1

α2 ≤ 1

and hence

α1 + α2 ≤ β1 + 1

and (1) follows.

Inequality (2) follows easily from γi ≤ δi ≤ 1.

To prove (3): If max{0, α1 + α2 − 1} = 0 then (3) holds. Otherwise, we can write

α1 + δ1 ≤ 1

α2 + δ2 ≤ 1

and hence

α1 + α2 − 1 + δ1 + δ2 ≤ 1

and (3) follows. Note that if δ1 + δ2 > 1 then α1 + α2 − 1 + 1 ≤ 1 follows from the

above constraint.

To prove (4) let min{β1, β2} = βj and max(γ1, γ2} = γk where j, k ∈ {1, 2}. Then

βj + γk ≤ βk + γk ≤ 1.

Proving the consistency of the confidence levels of other combinations and other

modes are similar and will not be elaborated here.

Theorem 4.3Suppose F and G are any formulas and assume their confidence levels are consistent

(Definition 4.2). Then the confidence levels of the formulas F∧G and F∨G, obtained

under the various modes above are all consistent.

Proof. Proof is similar to the previous theorem and is omitted.

5 Probabilistic Deductive Databases

In this section, we develop a framework for probabilistic deductive databases using

a language of probabilistic programs (p-programs). We make use of the probabilistic

calculus developed in Section 4 and develop the syntax and declarative semantics

for programming with confidence levels. We also provide the fixpoint semantics of

programs in this framework and establish its equivalence to the declarative seman-

tics. We will use the first-order language L of Section 4 as the underlying logical

language in this section.

Page 20: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

20 Laks V. S. Lakshmanan and Fereidoon Sadri

Syntax of p-Programs: A rule is an expression of the form Ac← B1, . . . , Bm, m ≥

0, where A,Bi are atoms and c ≡ 〈[α, β], [γ, δ]〉 is the confidence level associated

with the rule7. When m = 0, we call this a fact. All variables in the rule are assumed

to be universally quantified outside the whole rule, as usual. We restrict attention

to range restricted rules, as is customary. A probabilistic rule (p-rule) is a triple

(r; µr, µp), where r is a rule, µr is a mode indicating how to conjoin the confidence

levels of the subgoals in the body of r (and with that of r itself), and µp is a mode

indicating how the confidence levels of different derivations of an atom involving

the head predicate of r are to be disjoined. We say µr (µp) is the mode associated

with the body (head) of r, and call it the conjunctive (disjunctive) mode. We refer

to r as the underlying rule of this p-rule. When r is a fact, we omit µr for obvious

reasons. A probabilistic program (p-program) is a finite collection of p-rules such

that whenever there are p-rules whose underlying rules define the same predicate,

the mode associated with their head is identical. This last condition ensures different

rules defining the same predicate q agree on the manner in which confidences of

identical q-atoms generated by these rules are to be combined. The notions of

Herbrand universe HP and Herbrand base BP associated with a p-program P are

defined as usual. A p-rule is ground exactly when every atom in it is ground. The

Herbrand instantiation P ∗ of a p-program is defined in the obvious manner. The

following example illustrates our framework.

Example 5.1

People are assessed to be at high risk for various diseases, depending on factors such

as age group, family history (with respect to the disease), etc. Accordingly, high risk

patients are administered appropriate medications, which are prescribed by doctors

among several alternative ones. Medications cause side effects, sometimes harmful

ones, leading to other symptoms and diseases8. Here, the extent of risk, adminis-

tration of medications9, side effects (caused by medications), and prognosis are all

uncertain phenomena, and we associate confidence levels with them. The following

program is a sample of the uncertain knowledge related to these phenomena.

1. (high-risk(X,D)〈[0.65,0.65],[0.1,0.1]〉< midaged(X), family-history(X,D); ind, ).

2. (takes(X,M)〈[0.40,0.40],[0,0]〉

< high-risk(X,D), medication(D,M); ign, ).

3. (prognosis(X,D)〈[0.70,0.70],[0.12,0.12]〉< high-risk(X,D); ign, pc).

4. (prognosis(X,D)〈[0.20,0.20],[0.70,0.70]〉< takes(X,M), side-effects(M,D); ind, pc).

We can assume an appropriate set of facts (the EDB) in conjunction with the

above program. For rule 1, it is easy to see that each ground atom involving the

predicate high-risk has at most one derivation. Thus, a disjunctive mode for this

7 We assume only consistent confidence levels henceforth (see Section 4).8 Recent studies on the effects of certain medications on high risk patients for breast cancerprovide one example of this.

9 Uncertainty in this is mainly caused by the choices available and the fact that even underidentical conditions doctors need not prescribe the same drug. The probabilities here can bederived from statistical data on the relative frequency of prescriptions of drugs under givenconditions.

Page 21: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 21

rule will be clearly redundant, and we have suppressed it for convenience. A similar

remark holds for rule 2. Rule 1 says that if a person is midaged and the disease

D has struck his ancestors, then the confidence level in the person being at high

risk for D is given by propagating the confidence levels of the body subgoals and

combining them with the rule confidence in the sense of ∧ind. This could be based

on an expert’s belief that the factors midaged and family-history contributing

to high risk for the disease are independent. Each of the other rules has a similar

explanation. For the last rule, we note that the potential of a medication to cause

side effects is an intrinsic property independent of whether one takes the medication.

Thus the conjunctive mode used there is independence. Finally, note that rules 3 and

4, defining prognosis, use positive correlation as a conservative way of combining

confidences obtained from different derivations. For simplicity, we show each interval

in the above rules as a point probability. Still, note that the confidences for atoms

derived from the program will be genuine intervals.

A Valuation Based Semantics: We develop the declarative semantics of p-

programs based on the notion of valuations. Let P be a p-program. A probabilistic

valuation is a function v : BP→Lc which associates a confidence level with each

ground atom in BP . We define the satisfaction of p-programs under valuations, with

respect to the truth order ≤t of the trilattice (see Section 4)10. We say a valuation v

satisfies a ground p-rule ρ ≡ (Ac← B1, . . . , Bm; µr, µp), denoted |=v ρ, provided

c∧µrv(B1)∧µr

· · · ∧µrv(Bm) ≤t v(A). The intended meaning is that in order to

satisfy this p-rule, v must assign a confidence level to A that is no less true (in the

sense of ≤t) than the result of the conjunction of the confidences assigned to Bi’s

by v and the rule confidence c, in the sense of the mode µr. Even when a valuation

satisfies (all ground instances of) each rule in a p-program, it may not satisfy the

p-program as a whole. The reason is that confidences coming from different deriva-

tions of atoms are combined strengthening the overall confidence. Thus, we need to

impose the following additional requirement.

Let ρ ≡ (r ≡ Ac← B1, . . . , Bm; µr, µp) be a ground p-rule, and v a valuation.

Then we denote by rule-conf(A, ρ, v) the confidence level propagated to the head

of this rule under the valuation v and the rule mode µr, given by the expression

c∧µrv(B1)∧µr

· · · ∧µrv(Bm). Let P ∗ = P ∗

1 ∪· · ·∪P∗k be the partition of P ∗ such that

(i) each P ∗i contains all (ground) p-rules which define the same atom, say Ai, and

(ii) Ai and Aj are distinct, whenever i 6= j. Suppose µi is the mode associated with

the head of the p-rules in P ∗i . We denote by atom-conf(Ai, P, v) the confidence level

determined for the atom Ai under the valuation v using the program P . This is given

by the expression ∨µi{rule-conf(Ai, ρ, v)|ρ ∈ Pi∗}. We now define satisfaction of

p-programs.

Definition 5.1

Let P be a p-program and v a valuation. Then v satisfies P , denoted |=v P exactly

10 Satisfaction can be defined with respect to each of the 3 orders of the trilattice, giving rise todifferent interesting semantics. Their discussion is beyond the scope of this paper.

Page 22: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

22 Laks V. S. Lakshmanan and Fereidoon Sadri

when v satisfies each (ground) p-rule in P ∗, and for all atoms A ∈ BP , atom-

conf(A,P, v) ≤t v(A).

The additional requirement ensures the valuation assigns a strong enough confi-

dence to each atom so it will support the combination of confidences coming from

a number of rules (pertaining to this atom). A p-program P logically implies a p-

fact Ac←, denoted P |= A

c←, provided every valuation satisfying P also satisfies

Ac←. We next have

Proposition 5.1

Let v be a valuation and P a p-program. Suppose the mode associated with the

head of each p-rule in P is positive correlation. Then |=v P iff v satisfies each rule

in P ∗.

Proof. We shall show that if rule-conf(A, ρi, v) ≤t v(A) for all rules ρi defining a

ground atom A, then atom-conf(A,P, v) ≤t v(A), where the disjunctive mode for A

is positive correlation. This follows from the formula for ∨pc, obtained in Theorem

4.1. It is easy to see that c1 ∨pc c2 = c1⊕tc2. But then, rule-conf(A, ρi, v) ≤t

v(A) implies that⊕t{rule-conf(A, ρi, v)} ≤t v(A) and hence atom-conf(A,P, v) ≤t

v(A).

The above proposition shows that when positive correlation is the only disjunctive

mode used, satisfaction is very similar to the classical case.

For the declarative semantics of p-programs, we need something like the “least”

valuation satisfying the program. It is straightforward to show that the class of

all valuations Υ from BP to Lc itself forms a trilattice, complete with all the

3 orders and the associated meets and joins. They are obtained by a pointwise

extension of the corresponding order/operation on the trilattice Lc. We give one

example. For valuations u, v, u ≤t v iff ∀A ∈ BP , u(A) ≤t v(A); ∀A ∈ BP ,

(u⊗tv)(A) = u(A)⊗tv(A). One could investigate “least” with respect to each of

the 3 orders of the trilattice. In this paper, we confine attention to the order ≤t.

The least (greatest) valuation is then the valuation false (true) which assigns the

confidence level ⊥t (⊤t) to every ground atom. We now have

Lemma 5.1

Let P be any p-program and u, v be any valuations satisfying P . Then u⊗tv is

also a valuation satisfying P . In particular, ⊗t{v | |=v P} is the least valuation

satisfying P .

Proof. We prove this in two steps. First, we show that for any ground p-rule

ρ ≡ (r ≡ Ac← B1, . . . , Bm; µr, µp)

whenever valuations u and v satisfy ρ, so does u⊗tv. Secondly, we shall show that for

a p-program P , whenever atom-conf (A,P, u) ≤t u(A) and atom-conf (A,P, v) ≤t

v(A), then we also have atom-conf (A,P, u⊗tv) ≤t u⊗tv(A). The lemma will follow

from this.

(1) Suppose u |= ρ and v |= ρ. We prove the case where the conjunctive mode µr as-

sociated with this rule is ignorance. The other cases are similar. It is straightforward

to verify the following.

Page 23: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 23

(i) u⊗tv(B1) ∧ig · · · ∧ig u⊗tv(Bm) ≤t u(B1) ∧ig · · · ∧ig u(Bm) ≤t u(A).

(ii) u⊗tv(B1) ∧ig · · · ∧ig u⊗tv(Bm) ≤t v(B1) ∧ig · · · ∧ig v(Bm) ≤t v(A).

From (i) and (ii), we have u⊗tv(B1) ∧ig · · · ∧ig u⊗tv(Bm) ≤t u⊗tv(A), showing

u⊗tv |= ρ.

(2) Suppose u, v are any two valuations satisfying a p-program P . Let ρ1, . . . , ρn be

the set of all ground p-rules in P ∗ whose heads are A. Let ci = rule-conf (A, ρi, u)

and di = rule-conf (A, ρi, v). Since u |= P and v |= P , we have that ∨µp(ci | 1 ≤

i ≤ n) ≤t u(A) and ∨µp(di | 1 ≤ i ≤ n) ≤t v(A), where µp is the disjunctive

mode associated with A. Again, we give the proof for the case µp is ignorance as

the other cases are similar. Let ei = rule-conf (A, ρi, u⊗tv), 1 ≤ i ≤ n. Clearly,

ei ≤t ci and ei ≤t di. Thus, ∨µp(ei | 1 ≤ i ≤ n) ≤t ∨µp

(ci | 1 ≤ i ≤ n) ≤t u(A)

and ∨µp(ei | 1 ≤ i ≤ n) ≤t ∨µp

(di | 1 ≤ i ≤ n) ≤t v(A). It then follows that

∨µp(ei | 1 ≤ i ≤ n) ≤t u(A)⊗tv(A) = u⊗tv(A), which was to be shown.

We take the least valuation satisfying a p-program as characterizing its declara-

tive semantics.

Example 5.2

Consider the following p-program P .

1. (A〈[0.5,0.7], [0.3,0.45]〉< B; ind, pc). 2. (A

〈[0.6,0.8], [0.1,0.2]〉< C; ign, pc).

3. (B〈[0.9,0.95], [0,0.1]〉

< ; , ind). 4. (C〈[0.7,0.8], [0.1,0.2]〉

< ; , ind).

In the following we show three valuations v1, v2, v3, of which v1 and v3 satisfy P ,

while v2 does not. In fact, v3 is the least valuation satisfying P .

val B C A

v1 〈[0.9, 1], [0, 0]〉 〈[0.8, 0.9], [0.05, 0.1]〉 〈[0.5, 0.9], [0, 0]〉

v2 〈[0.9, 1], [0, 0]〉 〈[0.9, 1], [0, 0]〉 〈[0.5, 0.7], [0.1, 0.4]〉

v3 〈[0.9, 0.95], [0, 0.1]〉 〈[0.7, 0.8], [0.1, 0.2]〉 〈[0.45, 0.8], [0.1, 0.4]〉

For example, consider v1. It is easy to verify that v1 satisfies P . Rules 1 through

4 are satisfied by v1 since:

〈[0.5, 0.7], [0.3, 0.45]〉 ∧ind 〈[0.9, 1], [0, 0]〉 = 〈[0.45, 0.7], [0, 0]〉 ≤t 〈[0.5, 0.9], [0, 0]〉

〈[0.6, 0.8], [0.1, 0.2]〉 ∧ign 〈[0.8, 0.9], [0.05, 0.1]〉 =

〈[0.4, 0.8], [0.1, 0.3]〉 ≤t 〈[0.5, 0.9], [0, 0]〉

〈[0.9, 0.95], [0, 0.1]〉 ≤t 〈[0.9, 1], [0, 0]〉

〈[0.7, 0.8], [0.1, 0.2]〉 ≤t 〈[0.8, 0.9], [0.05, 0.1]〉

Further, the confidence level of A computed by the combination of rules 1 and 2

is also satisfied by v1, namely,

(〈[0.5, 0.7], [0.3, 0.45]〉 ∧ind 〈[0.9, 1], [0, 0]〉) ∨pc (〈[0.6, 0.8], [0.1, 0.2]〉

∧ign〈[0.8, 0.9], [0.05, 0.1]〉) = 〈[0.45, 0.8], [0, 0] ≤t 〈[0.5, 0.9], [0, 0]〉

Fixpoint Semantics: We associate an “immediate consequence” operator TP with

a p-program P , defined as follows.

Definition 5.2

Let P be a p-program and P ∗ its Herbrand instantiation. Then TP is a function

Page 24: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

24 Laks V. S. Lakshmanan and Fereidoon Sadri

TP : Υ→Υ, defined as follows. For any probabilistic valuation v, and any ground

atomA ∈ BP , TP (v)(A) = ∨µp{cA| there exists a p-rule (A

c← B1, . . . , Bm, µr, µp) ∈

P ∗, such that cA = c∧µrv(B1)∧µr

· · · ∧µrv(Bm)}.

Call a valuation v consistent provided for every atom A, v(A) is consistent, as

defined in Section 3.

Theorem 5.1

(1) TP always maps consistent valuations to consistent valuations. (2) TP is mono-

tone and continuous.

Proof. (1) This fact follows Theorem 4.3, where we have shown that the combina-

tion functions for all modes map consistent confidence levels to consistent confidence

levels. (2) This follows from the fact that the combination functions for all modes

are themselves monotone and continuous.

We define bottom-up iterations based on TP in the usual manner.

TP ↑ 0 = false (which assigns the truth-value ⊥t to every ground atom).

TP ↑ α = TP (TP ↑ α− 1), for a successor ordinal α.

TP ↑ α = ⊕t{TP ↑ β|β < α}, for a limit ordinal α.

We have the following results.

Proposition 5.2

Let v be any valuation and P be a p-program. Then v satisfies P iff TP (v) ≤t v.

Proof. (only if). If v satisfies P , then by Definition 5.1, for all atoms A ∈ BP ,

atom-conf(A,P, v) ≤t v(A) and hence TP (v) ≤t v.

(if). If TP (v) ≤t v, then by the definition of TP (Definition 5.2) for all atoms

A ∈ BP , atom-conf(A,P, v) ≤t v(A) and hence v satisfies P .

The following theorem is the analogue of the van Emden-Kowalski theorem for

classical logic programming.

Theorem 5.2

Let P be a p-program. Then the following claims hold.

(i) lfp(TP ) = ⊗t{v| |=v P} = the ≤t-least valuation satisfying P .

(ii) For a ground atom A, lfp(TP )(A) = c iff P |= Ac←.

Proof. Follows Lemma 5.1, Theorem 5.1 and Proposition 5.2. Proof is similar to

the analogous theorem of logic programming and details are omitted.

6 Proof Theory

Since confidences coming from different derivations of a fact are combined, we

need a notion of disjunctive proof-trees. We note that the notions of substitution,

unification, etc. are analogous to the classical ones. A variable appearing in a rule

is local if it only appears in its body.

Page 25: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 25

Definition 6.1

Let G be a(n atomic) goal and P a p-program. Then a disjunctive proof-tree (DPT)

for G with respect to P is a tree T defined as follows.

1. T has two kinds of nodes: rule nodes and goal nodes. Each rule node is labeled

by a rule in P and a substitution. Each goal node is labeled by an atomic goal. The

root is a goal node labeled G.

2. Let u be a goal node labeled by an atom A. Then every child (if any) of u is a

rule node labeled (r, θ), where r is a rule in P whose head is unifiable with A using

the mgu θ. We assume that each time a rule r appears in the tree, its variables are

renamed to new variables that do not appear anywhere else in the tree. Hence r in

the label (r, θ) actually represents a renamed instance of the rule.

3. If u is a rule node labeled (r, θ), then whenever an atom B occurs in the body

of r′ = rθ, u has a goal child v labeled B.

4. For any two substitutions π, θ occurring in T , π(V ) = θ(V ), for every variable

V . In other words, all substitutions occurring in T are compatible.

A node without children is called a leaf. A proper DPT is a finite DPT T such

that whenever T has a goal leaf labeled A, there is no rule in P whose head is

unifiable with A. We only consider proper DPTs unless otherwise specified. A rule

leaf is a success node (represents a database fact) while a goal leaf is a failure node.

Remarks:

(1) The definition of disjunctive proof tree captures the idea that when working

with uncertain information in the form of probabilistic rules and facts, we need

to consider the disjunction of all proofs in order to determine the best possible

confidence in the goal being proved.

(2) However, notice that the definition does not insist that a goal node A should

have rule children corresponding to all possible unifiable rules and mgu’s.

(3) We assume without loss of generality that all rules in the p-program are stan-

dardized apart by variable renaming so they share no common variables.

(4) A goal node can have several rule children corresponding to the same rule. That

is, a goal node can have children labeled (r, θ1), . . . , (r, θn), where r is (a renamed

version of) a rule in the program. But we require that r′i = rθi, i = 1, . . . , n, be

distinct.

(5) We require all substitutions in the tree to be compatible. The convention ex-

plained above ensures there will be no conflict among them on account of common

variables across rules (or different invocations of the same rule).

(6) Note that a DPT can be finite or infinite.

(7) In a proper DPT, goal leaves are necessarily failure nodes; this is not true in

non-proper DPTs.

(8) A proper DPT with no failure nodes has only rule leaves, hence, it has an odd

height.

Confidences are associated with (finite) DPTs as follows.

Definition 6.2

Let P be a p-program, G a goal, and T any finite DPT for G with respect to P .

Page 26: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

26 Laks V. S. Lakshmanan and Fereidoon Sadri

We associate confidences with the nodes of T as follows.

1. Each failure node gets the confidence 〈[0, 0], [1, 1]〉, the false confidence level

with respect to truth ordering, ⊥t (see Section 3). Each success node labeled (r, θ),

where r is a rule in P , and c is the confidence of rule r, gets the confidence c.

2. Suppose u is a rule node labeled (r, θ), such that the confidence of r is c, its

(conjunctive) mode is µr, and the confidences of the children of u are c1, . . . , cm.

Then u gets the confidence c∧µrc1∧µr

· · · ∧µrcm.

3. Suppose u is a goal node labeled A, with a (disjunctive) mode µp such that the

confidences of its children are c1, . . . , ck. Then u gets the confidence c1∨µp· · · ∨µp

ck.

We recall the notions of identity and annihilator from algebra (e.g. see Ullman

(Ullman, 1989)). Let c ∈ Lc be any element of the confidence lattice and ⊙ be any

operation of the form ∧µ or of the form ∨µ, µ being any of the modes discussed in

Section 4. Then c is an identity with respect to ⊙, if ∀d ∈ Lc, c⊙ d = d⊙ c = d.

It is an annihilator with respect to ⊙, if ∀d ∈ Lc, c⊙ d = d ⊙ c = c. The proof

of the following proposition is straightforward.

Proposition 6.1

The truth-value ⊥t = 〈[0, 0], [1, 1]〉 is an identity with respect to disjunction and an

annihilator with respect to conjunction. The truth-value ⊤t = 〈[1, 1], [0, 0]〉 is an

identity with respect to conjunction and an annihilator with respect to disjunction.

These claims hold for all modes discussed in Section 4.

In view of this proposition, we can consider only DPTs without failure nodes

without losing any generality.

We now proceed to prove the soundness and completeness theorems. First, we

need some definitions.

Definition 6.3

A branch B of a DPT T is a set of nodes of T , defined as follows. The root of T

belongs to B. Whenever a goal node is in B, exactly one of its rule children (if

any) belongs to B. Finally, whenever a rule node belongs to B, all its goal children

belong to B. We extend this definition to the subtrees of a DPT in the obvious way.

A subbranch of T rooted at a goal node G is the branch of the subtree of T rooted

at G.

We can associate a substitution with a (sub)branch B as follows. (1) The substi-

tution associated with a success node labeled (r, θ) is just θ. (2) The substitution

associated with an internal goal node is simply the substitution associated with its

unique rule child in B. (3) The substitution associated with an internal rule node u

in B which is labeled (r, θ) is the composition of θ and the substitutions associated

with the goal children of u.

The substitution associated with a branch is that associated with its root.

We say a DPT T is well-formed if it satisfies the following conditions: (i) T is

proper, (ii) For every goal node G in T , for any two (sub)branches B1, B2 of T

rooted at G, the substitutions associated with B1 and B2 are distinct.

The second condition ensures no two branches correspond to the same classical

“proof” of the goal or a sub-goal. Without this condition, since the probabilistic

Page 27: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 27

conjunctions and disjunctions are not idempotent, the confidence of the same proof

could be wrongly combined giving an incorrect confidence for the (root of the) DPT.

Henceforth, we will only consider well-formed DPTs, namely, DPTs that are

proper, have no failure nodes, and have distinct substitutions for all (sub) branches

corresponding to a goal node, for all goal nodes.

Theorem 6.1 (Soundness)

Let P be a p-program and G a (ground) goal. If there is a finite well-formed DPT

for G with respect to P with an associated confidence c at its root, then c ≤t

lfp(TP )(G).

Proof. First, we make the following observations regarding the combination func-

tions of Theorem 4.1:

(1) Conjunctive combination functions (all modes) are monotone.

(2) Disjunctive combination functions (all modes) are monotone.

(3) If F and G are confidence levels, then conf (F ∧µG) ≤t conf (F ) and conf (F ) ≤t

conf (F ∨µG) for all conjunctive and disjunctive combination functions (all modes).

We prove the soundness theorem by induction on the height of the DPT. Assume

the well-formed DPT T of height h is for the goal G. Note that T has an odd height,

h = 2k − 1 for some k ≥ 1, since it is a proper DPT with no failure nodes (see

Remark 7 at the beginning of this section).

Basis: k = 1. In this case the DPT consists of the goal root labeled G and one

child labeled (r, θ), where r is a rule in P whose head is unifiable with G. Note

that this child node is a success leaf. i.e. it represents a fact. Obviously, in the first

iteration of TP , conf (G) = cr, where cr is the confidence level of r. It follows from

the monotonicity of TP , that c = cr ≤t lfp(TP )(G).

Induction: k > 1. Assume the inductive hypothesis holds for every DPT of height

h′ = 2k′−1, where k′ < k. Consider the DPT T for G. The root G has rule children

Ri labeled (ri, θi). Each Ri is either a fact, or has goal children Gi1 , . . . , Gini.

Consider the subtrees of T rooted at these goal grand children ofG. By the inductive

hypothesis, the confidence levels cij associated with the goal grand children Gij

by the DPT are less than or equal to their confidence levels calculated by TP ,

i.e. , cij ≤t lfp(TP )(Gij ). Hence, by properties (1)-(3) above, the confidence level

associated to G by T is less than or equal to the confidence level of G obtained

by another application of TP , c ≤t TP (lfp(TP ))(G). Hence c ≤t lfp(TP )(G). Note

that T must be well-formed otherwise this argument is not valid.

Theorem 6.2 (Completeness)

Let P be a p-program and G a goal such that for some number k < ω, lfp(TP )(G) =

TP ↑ k(G). Then there is a finite DPT T for G with respect to P with an associated

confidence c at its root, such that lfp(TP )(G) ≤t c.

Proof. Let k be the smallest number such that TP ↑ k(G) = lfp(TP )(G). We shall

show by induction on k that there is a DPT T for G with respect to P such that

the confidence computed by it is at least lfp(TP )(G).

Page 28: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

28 Laks V. S. Lakshmanan and Fereidoon Sadri

Basis: k = 0. This implies lfp(TP )(G) = 〈[0, 0], [1, 1]〉. This case is trivial. The

DPT consists of a failure node labeled G.

Induction: Suppose the result holds for a certain number n. We show that it also

holds for n + 1. Suppose A is a ground atom such that lfp(TP )(A) = c = TP ↑

n+ 1(A). Now, TP ↑ n+ 1(A) = ∨µp{cr ∧µr

TP ↑ n(B1) ∧µr· · · ∧µr

TP ↑ n(Bm)|

There exists a rule r such that µr is the mode associated with its body, and µp is

the mode associated with its head, and there exists a ground substitution θ such

that rθ ≡ Acr←B1, . . . , Bm}.

Consider the DPT for A obtained as follows. Let the root be labeled A. The root

has a rule child corresponding to each rule instance used in the above computation of

TP ↑ n+1(A). Let v be a rule child created at this step, and suppose Acr←B1, . . . , Bm

is the rule instance corresponding to it and let θ be the substitution used to unify

the head of the original rule with the atom A. Then v hasm goal children with labels

B1, . . . , Bm respectively. Finally, by induction hypothesis, we can assume that (i)

a DPT for Bi is rooted at the node labeled Bi, and (ii) the confidence computed

by this latter tree is at least lfp(TP )(Bi) = TP ↑ n(Bi), 1 ≤ i ≤ m. In this case,

it readily follows from the definition of the confidence computed by a proof-tree

that the confidence computed by T is at least ∨µp{cr ∧µr

conf(body(r))|r is a rule

defining A, cr is the confidence associated with it, µr is the mode associated with

its head, and µp is the mode associated with its body}.

But this confidence is exactly TP ↑ n+ 1(A). The induction is complete and the

theorem follows.

Theorems 6.1 and 6.2 together show that the confidence of an arbitrary ground

atom computed according to the fixpoint semantics and using an appropriate dis-

junctive proof tree is the same. This in turn is the same as the confidence associ-

ated according to the (valuation based) declarative semantics. In particular, as we

will discuss in Section 7, when the disjunctive mode associated with all recursive

predicates is positive correlation, the theorems guarantee that the exact confidence

associated with the goal can be effectively computed by constructing an appropri-

ate finite DPT (according to Theorem 6.2) for it. Even when these modes are used

indiscriminately, we can still obtain the confidence associated with the goal with an

arbitrarily high degree of accuracy, by constructing DPTs of appropriate height.

7 Termination and Complexity

In this section, we first compare our work with that of Ng and Subrahmanian

(Ng & Subrahmanian, 1992; Ng & Subrahmanian, 1993) (see Section 1 for a gen-

eral comparison with non-probabilistic frameworks). First, let us examine the (only)

“mode” for disjunction used by them11. They combine the confidences of an atom

A coming from different derivations by taking their intersection. Indeed, the bot-

tom of their lattice is a valuation (called “formula function” there) that assigns the

11 Their framework allows an infinite class of “conjunctive modes”. Also, recall they represent onlybeliefs.

Page 29: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 29

interval [0, 1] to every atom. From the trilattice structure, it is clear that (i) their

bottom corresponds to ⊥p, and (ii) their disjunctive mode corresponds to ⊕p.

Example 7.1

r1: p(X,Y ) : [V1 × V3, V2 × V4]←e(X,Z) : [V1, V2], p(Z, Y ) : [V3, V4].

r2: p(X,Y ) : [V1, V2]←e(X,Y ) : [V1, V2].

r3: e(1, 2) : [1, 1].

r4: e(1, 3) : [1, 1].

r5: e(3, 2) : [0.9, 0.9].

This is a pf-program in the framework of Ng and Subrahmanian (Ng & Subrahmanian, 1993).

In a pf-rule each literal is annotated by an interval representing the lower-bound

and upper-bound of belief12. Variables can appear in the annotations, and the an-

notation of the head predicate is usually a function of body literals annotations.

The program in this example is basically the transitive closure program, with inde-

pendence as the conjunctive mode in the first rule. The disjunctive function for the

p predicate, as explained above, is interval intersection. Let us denote the operator

TP defined by them as TNSP for distinguishing it from ours. It is not hard to see

that this program is inconsistent in their framework, and lfp(TNSP )would assign an

empty probability range for p(1, 2). This is due to the existence of two derivations

for p(1, 2), with non-overlapping intervals. This is quite unintuitive. Indeed, there

is a definite path (with probability 1) corresponding to the edge e(1, 2). One may

wonder whether it makes sense to compare this approach with ours on an example

program which is inconsistent according to their semantics. The point is that in this

example, there is a certain path with probability [1,1] from 1 to 2, and an approach

that regards this program as inconsistent is not quite intuitive.

Now, consider the p-program corresponding to the annotated program {r1, . . . ,

r5}, obtained by stripping off atom annotations in r1, r2 and shifting the annotations

in r3, . . . , r5 to the associated rules. Also, associate the confidence level 〈[1, 1], [0, 0]〉

with r1, r2. For uniformity and ease of comparison, assume the doubt ranges are

all [0, 0]. As an example, let the conjunctive mode used in r1, r2 be independence

and let the disjunctive mode used be positive correlation (or, in this case, even

ignorance!). Then lfp(TP ) would assign the confidence 〈[1, 1], [0, 0]〉 to p(1, 2),

which agrees with our intuition. Our point, however, is not that intersection is

a “wrong” mode. Rather, we stress that different combination rules (modes) are

appropriate for different situations.

Example 7.2

Now consider the following pf-program (r1 and r2 are the same as previous exam-

ple):

r1: p(X,Y ) : [V1 × V3, V2 × V4]←e(X,Z) : [V1, V2], p(Z, Y ) : [V3, V4].

r2: p(X,Y ) : [V1, V2]←e(X,Y ) : [V1, V2].

r6: e(1, 2) : [0, 1].

r7: e(1, 1) : [0, 0.9].

12 To be precise, each basic formula, which is a conjunction or a disjunction of atoms, is annotated.

Page 30: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

30 Laks V. S. Lakshmanan and Fereidoon Sadri

In this case, the least fixpoint of TNSP is only attained at ω and it assigns the

range [0, 0] to p(1, 1) and p(1, 2). Again, the result is unintuitive for this example.

Since TNSP is not continuous, one can easily write programs such that no reasonable

approximation to lfp(TNSP ) can be obtained by iterating TNS

P an arbitrary (finite)

number of times. (E.g. , consider the program obtained by adding the rule r8:

q(X,Y ) : [1, 1] ← p(X,Y ) : [0, 0] to {r1, r2, r6, r7}.) Notice that as long as one

uses any arithmetic annotation function such that the probability of the head is

less than the probability of the subgoals of r1 (which is a reasonable annotation

function), this problem will arise. The problem (for the unintuitive behavior) lies

with the mode for disjunction. Again, we emphasize that different combination rules

(modes) are appropriate for different situations.

Now, consider the p-program corresponding to the annotated program {r1, r2, r6, r7},

obtained in the same way as was done in Example 7.1. Let the conjunctive mode

used in r1, r2 be independence and let the disjunctive mode be positive correla-

tion or ignorance. Then lfp(TP ) would assign the confidence level 〈[0, 1] [0, 0]〉 to

p(1, 2). This again agrees with our intuition. As a last example, suppose we start

with the confidence 〈[0, 0.1], [0, 0]〉 for e(1, 2) instead. Then under positive corre-

lation (for disjunction) lfp(TP )(p(1, 2)) = 〈[0, 0.1], [0, 0]〉, while ignorance leads to

lfp(TP )(p(1, 2)) = 〈[0, 1], [0, 0]〉. The former makes more intuitive sense, although

the latter (more conservative under ≤p) is obviously not wrong. Also, in the latter

case, the lfp is reached only at ω.

Now, we discuss termination and complexity issues of p-programs. Let the closure

ordinal of TP be the smallest ordinal α such that TP ↑ α = lfp(TP ). We have the

following

Fact 7.1

Let P be any p-program. Then the closure ordinal of TP can be as high as ω but

no more.

Proof. The last p-program discussed in Example 7.2 has a closure ordinal of ω.

Since TP is continuous (Theorem 5.1) its closure ordinal is at most ω.

Definition 7.1

(Data Complexity) We define the data complexity (Vardi, M.Y., 1985) of a p-program

P as the time complexity of computing the least fixpoint of TP as a function of the

size of the database, i.e. the number of constants occurring in P 13.

It is well known that the data complexity for datalog programs is polynomial.

An important question concerning any extension of DDBs to handle uncertainty is

whether the data complexity is increased compared to datalog. We can show that

under suitable restrictions (see below) the data complexity of p-programs is poly-

nomial time. However, the proof cannot be obtained by (straightforward extensions

of) the classical argument for the data complexity for datalog. In the classical case,

13 With many rule-based systems with uncertainty, we cannot always separate EDB and IDBpredicates, which explains this slightly modified definition of data complexity.

Page 31: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 31

once a ground atom is derived during bottom-up evaluation, future derivations of

it can be ignored. In programming with uncertainty, complications arise because

we cannot ignore alternate derivations of the same atom: the confidences obtained

from them need to be combined, reinforcing the overall confidence of the atom. This

calls for a new proof technique. Our technique makes use of the following additional

notions.

Define a disjunctive derivation tree (DDT) to be a well-formed DPT (see Section

6 for a definition) such that every goal and every substitution labeling any node

in the tree is ground. Note that the height of a DDT with no failure nodes is an

odd number (see Remark 7 at the beginning of Section 6). We have the following

results.

Proposition 7.1

Let P be a p-program and A any ground atom in BP . Suppose the confidence

determined for A in iteration k ≥ 1 of bottom-up evaluation is c. Then there exists

a DDT T of height 2k − 1 for A such that the confidence associated with A by T

is exactly c.

Proof. The proof is by induction on k.

Basis: k = 1. In iteration 1, bottom-up evaluation essentially collects together

all edb facts (involving ground atoms) and determines their confidences from the

program. Without loss of generality, we may suppose there is at most one edb fact

in P corresponding to each ground atom (involving an edb predicate). Let A be any

ground atom whose confidence is determined to be c in iteration 1. Then there is an

edb fact r : Ac← in P . The associated DDT for A corresponding to this iteration

is the tree with root labeled A and a rule child labeled r. Clearly, the confidence

associated with the root of this tree is c, and the height of this tree is 1 ( = 2k− 1,

for k = 1).

Induction: Assume the result for all ground atoms whose confidences are determined

(possibly revised) in iteration k. Suppose A is a ground atom whose confidence is

determined to be c in iteration k + 1. This implies there exist ground instances of

rules r1 : Acr1←B1, . . . , Bm; µ1, µA, · · ·; rk : A

crk←C1, . . . , Cn; µk, µA such that (i)

the confidence of Bi , . . . , Cj computed at the end of iteration k is ci (, . . . , dj),

and (ii) c = (cr1∧µ1 (∧µ1{c1, . . . , cm}) ∨µA

· · · ∨µA(crk ∧µk (

∧µk{d1, . . . , dn}),

where ∨µAis the disjunctive mode for the predicate A. By induction hypothe-

sis, there are DDTs TB1, . . . , TBm

, . . . , TC1, . . . , TCn

, each of height 2k − 1 or less,

for the atoms B1, . . . , Bm, . . . , C1, . . . , Cn which exactly compute the confidences

c1, . . . , cm, . . . , d1, . . . , dn respectively, corresponding to iteration k. Consider the

tree Tk+1 for A by (i) making r1, . . . , rk rule children of the root and (ii) making the

TB1, . . . , TBm

, (, . . . , TC1, . . . , TCn

) subtrees of r1 (, . . . , rk). It is trivial to see that

Tk+1 is a DDT for A and its height is 2+2k−1 = 2(k+1)−1. Further the confidence

Tk+1 computes for the root A is exactly (cr1∧µ1 (∧µ1{c1, . . . , cm}) ∨µA

· · · ∨µA

(crk ∧µk (∧µk{d1, . . . , dn}). This completes the induction and the proof.

Proposition 7.1 shows each iteration of bottom-up evaluation corresponds in an

essential manner to the construction of a set of DDTs one for each distinct ground

Page 32: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

32 Laks V. S. Lakshmanan and Fereidoon Sadri

atom whose confidence is determined (or revised) in that iteration. Our next ob-

jective is to establish a termination bound on bottom-up evaluation.

Definition 7.2 (Branches in DDTs)

DDT branches are defined similar to those of DPT. Let T be a DDT. Then a branch

of T is a subtree of T , defined as follows.

(i) The root belongs to every branch.

(ii) whenever a goal node belongs to a branch, exactly one of its rule children,

belongs to the branch.

(iii) whenever a rule node belongs to a branch, all its goal children belong to the

branch.

Definition 7.3 (Simple DDTs)

Let A be a ground atom and T any DDT (not necessarily for A). Then T is A-non-

simple provided it has a branch containing two goal nodes u and v such that u is

an ancestor of v and both are labeled by atom A. A DDT is A-simple if it is not

A-non-simple. Finally, a DDT is simple if it is A-simple for every atom A.

Let T be a DDT and Bi be a branch of T in which an atom A appears. Then we

define the number of violations of simplicity of Bi with respect to A to be one less

than the total number of times the atom A occurs in Bi. The number of violations

of the simplicity of the DDT T with respect to A is the sum of the number of

violations of the branches of T in which A occurs. Clearly, T is A-simple exactly

when the number of violations with respect to A is 0. Our first major result of this

section follows.

Theorem 7.1

Let P be a p-program such that only positive correlation is used as the disjunctive

mode for recursive predicates. Let max{height(TA) |A∈ BP , and TA is any simple

DDT for A} = 2k − 1, k ≥ 1. Then at most k + 1 iterations of naive bottom-up

evaluation are needed to compute the least fixpoint of TP .

Essentially, for p-programs P satisfying the conditions mentioned above, the the-

orem (i) shows that naive bottom-up evaluation of P is guaranteed to terminate,

and (ii) establishes an upper bound on the number of iterations of bottom-up eval-

uation for computing the least fixpoint, in terms of the maximum height of any

simple tree for any ground atom. This is the first step in showing that p-programs

of this type have a polynomial time data complexity. We will use the next three

lemmas (Lemmas 7.1–7.3) in proving this theorem.

Lemma 7.1

Let A ∈ BP be any ground atom, and let T be a DDT for A corresponding to

TP ↑ l, for some l. Suppose T is B-non-simple, for some atom B. Then there is a

DDT T ′ for A with the following properties:

(i) the certainty of A computed by T ′ equals that computed by T .

(ii) the number of violations of simplicity of T ′ with respect to B is less than that

of T .

Page 33: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 33

Proof. Let T be the DDT described in the hypothesis of the claim. Let A be the

label of the root u of T , and assume without loss of generality that B is identical

to A. (The case when B is distinct from A is similar.) Let v be the last goal node

from the root down (e.g. in the level-order), which is distinct from the root and is

labeled by A. Since T corresponds to applications of the TP operator, we have the

following.

(*) Every branch of v must be isomorphic to some branch of u which does not

contain the node v.

This can be seen as follows. Let p < l be the iteration such that the subtree of

T rooted at v, say Tv, corresponds to TP ↑ p. Then clearly, every rule applicable

in iteration p is also applicable in iteration k. This means every branch of Tv

constructed from a sequence of rule applications is also constructible in iteration

k and hence there must be a branch of T that is isomorphic to such a branch. It

follows from the isomorphism that the isomorphic branch of T cannot contain the

node v.

Associate a logical formula with each node of T as follows.

(i) The formula associated with each (rule) leaf is true.

(ii) The formula associated with a goal node with rule children r1, . . . , rm and

associated formulas F1, . . . , Fm, is F1 ∨ · · · ∨ Fm.

(iii) The formula associated with a rule parent with goal children g1, . . . , gq and

associated formulas G1, . . . , Gq is G1 ∧ · · · ∧Gq.

Let the formula associated with the node v be F . To simplify the exposition,

but at no loss of generality, let us assume that in T , every goal node has exactly

two rule children. Then the formula associated with the root u can be expressed as

E1 ∨ (E2 ∧ (E3 ∨ (· · ·Es−1 ∧ (Es ∨ F )) · · ·)).

By (*) above, we can see that F logically implies E1, F⇒E1. By the structure of

a DDT, we can then express E1 as (F ∨G), for some formula G. Construct a DDT

T ′ from T by deleting the parent of the node v, as well as the subtree rooted at v.

We claim that

(**) The formula associated with the root of T ′ is equivalent to that associated

with the root of T .

To see this, notice that the formula associated with the root of T can now be

expressed as (F ∨G)∨(E2∧(E3∨(· · ·Es−1∧(Es∨F )) · · ·)). By simple application

of propositional identities, it can be seen that this formula is equivalent to (F ∨

G)∨ (E2∧ (E3∨ (· · ·Es− 1∧ (Es)) · · ·)). But this is exactly the formula associated

with the root of T’, which proves (**).

Finally, we shall show that ∨pc, together with any conjunctive mode, satisfy the

following absorption laws:

a ∨pc (a ∧µ b) = a.

a ∧pc (a ∨µ b) = a.

The first of these laws follows from the fact that for all modes µ we consider in

this paper, (a ∧µ b) ≤t a, where ≤t is the lattice ordering. The second is the dual

of the first.

Page 34: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

34 Laks V. S. Lakshmanan and Fereidoon Sadri

In view of the absorption laws, it can be seen that the certainty for A computed

by T ′ above is identical to that computed by T . This proves the lemma, since T ′

has at least one fewer violations of simplicity with respect to A.

Lemma 7.2

Let T be a DDT for an atom A. Then there is a simple DDT for A such that the

certainty of A computed by it is identical to that computed by T .

Proof. Follows by an inductive argument using Lemma 7.1.

Lemma 7.3

Let A be an atom and 2h − 1 be the maximum height of any simple DDT for A.

Then certainty of A in TP ↑ l is identical to that in TP ↑ h, for all l ≥ h.

Proof. Let T be the DDT for A corresponding to TP ↑ l. Note that height(T ) =

2l−1. Let c represent the certainty computed by T for A, which is c = TP ↑ l(A). By

Lemma 7.2, there is a simple DDT, say T ′, for A, which computes the same certainty

for A as T . Clearly, height(T ′) ≤ 2h − 1. Let c′ represent the certainty computed

by T ′ for A, c = c′. By the soundness theorem, and monotonicity of TP , we can

write c′ ≤ TP ↑ h(A) ≤ TP ↑ l(A) = c. It follows that TP ↑ l(A) = TP ↑ h(A).

Now we can complete the proof of Theorem 7.1.

Proof of Theorem 7.1. Let 2k − 1 be the maximum height of any simple DDT

for any atom. It follows from the above Lemmas that the certainty of any atom in

TP ↑ l is identical to that in TP ↑ k, for all l ≥ k, from which the theorem follows.

It can be shown that the height of simple DDTs is polynomially bounded by the

database size. This makes the above result significant. This allows us to prove the

following theorem regarding the data complexity of the above class of p-programs.

Theorem 7.2

Let P be a p-program such that only positive correlation is used as the disjunctive

mode for recursive predicates. Then its least fixpoint can be computed in time poly-

nomial in the database size. In particular, bottom-up naive evaluation terminates

in time polynomial in the size of the database, yielding the least fixpoint.

Proof. By Theorem 7.1 we know that the least fixpoint model of P can be computed

in at most k + 1 iterations where h = 2k − 1 is the maximum height of any simple

DDT for any ground atom with respect to P (k iterations to arrive at the fixpoint,

and one extra iteration to verify that a fixpoint has been reached.) Notice that each

goal node in a DDT corresponds to a database predicate. Let K be the maximum

arity of any predicate in P , and n be the number of constants occurring in the

program. Notice that under the data complexity measure (Definition 7.1) K is a

constant. The maximum number of distinct goal nodes that can occur in any branch

of a simple DDT is nK . This implies the height h above is clearly a polynomial in

the database size n. We have thus shown that bottom-up evaluation of the least

fixpoint terminates in a polynomial number of iterations. The fact that the amount

of work done in each iteration is polynomial in n is easy to see. The theorem follows.

Page 35: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 35

We remark that our proof of Theorem 7.2 implies a similar result for van Em-

den’s framework. To our knowledge, this is the first polynomial time result for

rule-based programming with (probabilistic) uncertainty14. We should point out

that the polynomial time complexity is preserved whenever modes other than posi-

tive correlation are associated with non-recursive predicates (for disjunction). More

generally, suppose R is the set of all recursive predicates and N is the set of non-

recursive predicates in the KB, which are possibly defined in terms of those in R.

Then any modes can be freely used with the predicates in N while keeping the data

complexity polynomial. Finally, if we know that the data does not contain cycles, we

can use any mode even with a recursive predicate and still have a polynomial time

data complexity. We also note that the framework of annotation functions used

in (Kifer & Subrahmanian, 1992) enables an infinite family of modes to be used

in propagating confidences from rule bodies to heads. The major differences with

our work are (i) in (Kifer & Subrahmanian, 1992) a fixed “mode” for disjunction is

imposed unlike our framework, and (ii) they do not study the complexity of query

answering, whereas we establish the conditions under which the important advan-

tage of polynomial time data complexity of classical datalog can be retained. More

importantly, our work has generated useful insights into how modes (for disjunc-

tion) affect the data complexity. Finally, a note about the use of positive correlation

as the disjunctive mode for recursive predicates (when data might contain cycles).

The rationale is that different derivations of such recursive atoms could involve

some amount of overlap (the degree of overlap depends on the data). Now, positive

correlation (for disjunction) tries to be conservative (and hence sound) by assum-

ing the extent of overlap is maximal, so the combined confidence of the different

derivations is the least possible (under ≤t). Thus, it does make sense even from a

practical point of view.

8 Conclusions

We motivated the need for modeling both belief and doubt in a framework for

manipulating uncertain facts and rules. We have developed a framework for prob-

abilistic deductive databases, capable of manipulating both belief and doubt, ex-

pressed as probability intervals. Belief doubt pairs, called confidence levels, give

rise to a rich algebraic structure called a trilattice. We developed a probabilistic

calculus permitting different modes for combining confidence levels of events. We

then developed the framework of p-programs for realizing probabilistic deductive

databases. p-Programs inherit the ability to “parameterize” the modes used for

combining confidence levels, from our probabilistic calculus. We have developed

a declarative semantics, a fixpoint semantics, and proved their equivalence. We

have also provided a sound and complete proof procedure for p-programs. We have

shown that under disciplined use of modes, we can retain the important advantage

14 It is straightforward to show that the data complexity for the framework of(Ng & Subrahmanian, 1992) is polynomial, although the paper does not address this issue.However, that framework only allows constant annotations and is of limited expressive power.

Page 36: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

36 Laks V. S. Lakshmanan and Fereidoon Sadri

of polynomial time data complexity of classical datalog, in this extended frame-

work. We have also compared our framework with related work with respect to the

aspects of termination and intuitive behavior (of the semantics). The parametric

nature of modes in p-programs is shown to be a significant advantage with re-

spect to these aspects. Also, the analysis of trilattices shows insightful relationships

between previous work (e.g. Ng and Subrahmanian (Ng & Subrahmanian, 1992;

Ng & Subrahmanian, 1993)) and ours. Interesting open issues which merit further

research include (1) semantics of p-programs under various trilattice orders and var-

ious modes, including new ones, (2) query optimization, (3) handling inconsistency

in a framework handling uncertainty, such as the one studied here.

Acknowledgments

The authors would like to thank the anonymous referees for their careful reading

and their comments, many of which have resulted in significant improvements to

the paper.

References

Abiteboul, S., Kanellakis, P., & Grahne, G. (1991). On the representation and queryingof sets of possible worlds. Theoretical computer science, 78, 159–187.

Baldwin, J. F. (1987). Evidential support logic programming. Journal of fuzzy sets andsystems, 24, 1–26.

Baldwin, J. F., & Monk, M. R. M. (1987). Evidence theory, fuzzy logic, and logic pro-gramming. Tech. Report ITRC No. 109. University of Bristol, Bristol, UK.

Barbara, D., Garcia-Molina, H., & Porter, D. (1990). A probabilistic relational data model.Pages 60–64 of: Proc. advancing database technology, EDBT, 90.

Barbara, D., Garcia-Molina, H., & Porter, D. (1992). The management of probabilisticdata. IEEE transactions on knowledge and data engineering, 4(5), 487–502.

Blair, H. A., & Subrahmanian, V. S. (1989a). Paraconsistent foundations for logic pro-gramming. Journal of non-classical logic, 5(2), 45–73.

Blair, H. A., & Subrahmanian, V. S. (1989b). Paraconsistent logic programming. Theo-retical computer science, 68, 135–154.

Boole, G. (1854). The laws of thought. London: Mcmillan.

Carnap, R. (1962). The logical foundations of probability. University of Chicago Press.2nd. Edn.

Debray, S., & Ramakrishnan, R. (1994). Generalized Horn clause programs. manuscript.

Dekhtyar, A., & Subrahmanian, V. S. (1997). Hybrid probabilistic program. Pages 391–405 of: Proc. 14th intl. conf. on logic programming.

Dong, F., & Lakshmanan, L.V.S. (1992). Deductive databases with incomplete informa-tion. Pages 303–317 of: Joint intl. conf. and symp. on logic programming. (extendedversion available as Tech. Report, Concordia University, Montreal, 1993).

Fagin, R., Halpern, J., & Megiddo, N. (1990). A logic for reasoning about probabilities.Information and computation, 87(1/2), 78–128.

Fenstad, J. E. (1980). The structure of probabilities defined on first-order languages. Pages251–262 of: Jeffrey, R. C. (ed), Studies in inductive logic and probabilities, volume 2.University of California Press.

Page 37: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

On A Theory of Probabilistic Deductive Databases 37

Fitting, M. C. (1988). Logic programming on a topological bilattice. Fundamenta infor-maticae, 11, 209–218.

Fitting, M. C. (1991). Bilattices and the semantics of logic programming. Journal of logicprogramming, 11, 91–116.

Fitting, M. C. 1995 (February). Private Communication.

Frechet, M. (1935). Generalizations du theoreme des probabilities totales. Fund. math.,25, 379–387.

Gaifman, H. (1964). Concerning measures in first order calculi. Israel j. of math., 2, 1–17.

Ginsburg, M. (1988). Multivalued logics: A uniform approach to reasoning in artificialintelligence. Computational intelligence, 4, 265–316.

Guntzer, U., Kießling, W., & Thone, H. (1991). New directions for uncertainty reasoning indeductive databases. Pages 178–187 of: Proc. ACM SIGMOD intl. conf. on managementof data.

Hailperin, T. (1984). Probability logic. Notre dame j. of formal logic, 25(3), 198–212.

Halpern, J. Y. (1990). An analysis of first-order logics of probability. Journal of AI, 46,311–350.

Kifer, M., & Li, A. (1988). On the semantics of rule-based expert systems with uncertainty.Pages 102–117 of: Gyssens, M., Paradaens, J., & van Gucht, D. (eds), 2nd intl. conf.on database theory. Bruges, Belgium: Springer-Verlag LNCS-326.

Kifer, M., & Lozinskii, E. L. (1989). A logic for reasoning with inconsistency. Pages253–262 of: Proc. 4th IEEE symp. on logic in computer science (LICS). Asilomar, CA:IEEE Computer Press.

Kifer, M., & Lozinskii, E. L. (1992). A logic for reasoning with inconsistency. Journal ofautomated reasoning, 9(2), 179–215.

Kifer, M., & Subrahmanian, V. S. (1992). Theory of generalized annotated logic program-ming and its applications. Journal of logic programming, 12, 335–367.

Lakshmanan, L. V. S. (1994). An epistemic foundation for logic programming with uncer-tainty. Proc. intl. conf. on foundations of software technology and theoretical computerscience. Madras, India: Springer Verlag. Lecture Notes in Computer Science, vol. 880.

Lakshmanan, L. V. S., & Sadri, F. (1994a). Modeling uncertainty in deductive databases.Pages 724–733 of: Proc. intl. conf. on database and expert systems applications (DEXA’94). Athens, Greece: Springer-Verlag, LNCS-856.

Lakshmanan, L. V. S., & Sadri, F. (1994b). Probabilistic deductive databases. Pages254–268 of: Proc. intl. logic programming symposium. Ithaca, NY: MIT Press.

Lakshmanan, L. V. S., & Sadri, F. (1997). Uncertain deductive databases: A hybridapproach. Information Systems, 22(8), 483–508.

Lakshmanan, L. V. S., & Shiri, N. (1997). A parametric approach to deductive databaseswith uncertainty. Accepted to the IEEE transactions on knowledge and data engineer-ing. (A preliminary version appeared in Proc. Intl. Workshop on Logic in Databases(LID’96), Springer-Verlag, LNCS-1154, San Miniato, Italy).

Lakshmanan, L. V. S., N. Leone, R. Ross, & V. S. Subrahmanian. (1997). ProbView:A Flexible Probabilistic Database System. ACM Transactions on Database Systems,22(3), 419–469.

Liu, Y. (1990). Null values in definite programs. Pages 273–288 of: Proc. north americanconf. on logic programming.

Ng, R. T. (1997). Semantic, consistency, and query processing of empirical deductivedatabases. IEEE Transactions on Knowledge and Data Engineering, 9(1), 32–495.

Ng, R. T., & Subrahmanian, V. S. (1991). Relating Dempster-Shafer theory to stable se-mantics. Tech. Report UMIACS-TR-91-49, CS-TR-2647. Institute for Advanced Com-

Page 38: OnATheoryofProbabilisticDeductive Databases …On A Theory of Probabilistic Deductive Databases 3 Subrahmanian’sworkonprobabilisticlogicprogramming(Ng & Subrahmanian, 1992) and Ng’s

38 Laks V. S. Lakshmanan and Fereidoon Sadri

puter Studies and Department of Computer Science University of Maryland, CollegePark, MD 20742.

Ng, R. T., & Subrahmanian, V. S. (1992). Probabilistic logic programming. Informationand computation, 101(2), 150–201.

Ng, R. T., & Subrahmanian, V. S. (1993). A semantical framework for supporting subjec-tive and conditional probabilities in deductive databases. Automated reasoning, 10(2),191–235.

Ng, R. T., & Subrahmanian, V. S. (1994). Stable semantics for probabilistic deductivedatabases. Information and computation, 110(1), 42–83.

Nilsson, N. (1986). Probabilistic logic. AI journal, 28, 71–87.

Sadri, F. (1991a). Modeling uncertainty in databases. Pages 122–131 of: Proc. 7th IEEEintl. conf. on data engineering.

Sadri, F. (1991b). Reliability of answers to queries in relational databases. IEEE trans-actions on knowledge and data engineering, 3(2), 245–251.

Schmidt, H., Steger, N., Guntzer, U., Kießling, W., Azone, A., & Bayer, R. (1989). Com-bining deduction by certainty with the power of magic. Pages 103–122 of: Proc. 1stintl. conf. on deductive and object-oriented databases.

Steger, N., Schmidt, H., Guntzer, U., & Kießling, W. (1989). Semantics and efficientcompilation for quantitative deductive databases. Pages 660–669 of: Proc. IEEE intl.conf. on data engineering.

Subrahmanian, V. S. (1987). On the semantics of quantitative logic programs. Pages173–182 of: Proc. 4th IEEE symposium on logic programming.

Ullman, J. D. (1989). Principles of database and knowledge-base systems. Vol. II. Mary-land: Computer Science Press.

van Emden, M. H. (1986). Quantitative deduction and its fixpoint theory. Journal of logicprogramming, 4(1), 37–53.

Vardi, M.Y. (1985). Querying logical databases. Pages 57–65 of: Proc. 4th ACM SIGACT-SIGMOD symposium on principles of database systems.