• Nenhum resultado encontrado

Ontologies with Data or: the death of the AI dream

N/A
N/A
Protected

Academic year: 2022

Share "Ontologies with Data or: the death of the AI dream"

Copied!
73
0
0

Texto

(1)

or:

the death of the AI dream

Enrico Franconi

Free University of Bozen-Bolzano, Italy

http://www.inf.unibz.it/ ∼ franconi

S˜ao Paulo, September 2015

(2)

◮ Defining the problem of dealing with data together with an ontology

◮ The problem is not trivial

◮ A novel framework to solve the problem

◮ The purpose of ontologies...

(3)

◮ An ontology is a formal conceptualisation of the world: a conceptual schema.

◮ An ontology specifies a set of constraints, which declare what should necessarily hold in any possible world.

◮ Any possible world should conform to the constraints expressed by the ontology.

◮ Given an ontology, a legal world description (or legal database instance) is a finite possible world satisfying the constraints.

c

(4)

Data Store Logical Schema Conceptual

Schema

(5)

Constraints

Data Store Logical Schema Conceptual

Schema

c

(6)

Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

(7)

Reasoning Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

c

(8)

Reasoning Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

(9)

Reasoning Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

c

(10)

Query

Result Reasoning

Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

(11)

Global Reasoning

Query

Result Reasoning

Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

c

(12)

Global Reasoning

Query

Result Reasoning

Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

(13)

Mediator

global

source

Global Reasoning

Query

Result Reasoning

Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

c

(14)

Mediator

global

source

Global Reasoning

Query

Result Reasoning

Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

←−Data Level

←−Information Level

←−Knowledge Level

(15)

the classical DB case

Manager

Employee Works-for

1..⋆

Project

c

(16)

the classical DB case

Manager

Employee Works-for

1..⋆

Project

Employee = { John, Mary, Paul } Manager = { John, Paul }

Works-for = { hJohn,Prj-Ai, hMary,Prj-Bi }

Project = { Prj-A, Prj-B }

(17)

the classical DB case

Manager

Employee Works-for

1..⋆

Project

Employee = { John, Mary, Paul } Manager = { John, Paul }

Works-for = { hJohn,Prj-Ai, hMary,Prj-Bi } Project = { Prj-A, Prj-B }

Q(X) :- Manager(X), Works-for(X,Y), Project(Y)

= ⇒ { John }

c

(18)

the DBox case

Manager

Employee Works-for

1..

Project

Manager = { John, Paul }

Works-for = { hJohn,Prj-Ai, hMary,Prj-Bi }

Project = { Prj-A, Prj-B }

(19)

the DBox case

Manager

Employee Works-for

1..

Project

Manager = { John, Paul }

Works-for = { hJohn,Prj-Ai, hMary,Prj-Bi } Project = { Prj-A, Prj-B }

Q(X) :- Employee(X)

c

(20)

the DBox case

Manager

Employee Works-for

1..

Project

Manager = { John, Paul }

Works-for = { hJohn,Prj-Ai, hMary,Prj-Bi } Project = { Prj-A, Prj-B }

Q(X) :- Employee(X)

= ⇒ { John, Paul, Mary }

(21)

the DBox case

Manager

Employee Works-for

1..

Project

Manager = { John, Paul }

Works-for = { hJohn,Prj-Ai, hMary,Prj-Bi } Project = { Prj-A, Prj-B }

Q(X) :- Employee(X)

= ⇒ { John, Paul, Mary }

= ⇒ Q’(X) :- Manager(X) ∪ Works-for(X,Y)

c

(22)

the ABox case

Employee Works-for

1..

Project

Works-for ⊇ { hJohn,Prj-Ai, hMary,Prj-Ai }

Project ⊇ { Prj-A, Prj-B }

(23)

the ABox case

Employee Works-for

1..

Project

Works-for ⊇ { hJohn,Prj-Ai, hMary,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

Q(X) :- Works-for(Y,X)

c

(24)

the ABox case

Employee Works-for

1..

Project

Works-for ⊇ { hJohn,Prj-Ai, hMary,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

Q(X) :- Works-for(Y,X)

= ⇒ { Prj-A, Prj-B }

(25)

the ABox case

Employee Works-for

1..

Project

Works-for ⊇ { hJohn,Prj-Ai, hMary,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

Q(X) :- Works-for(Y,X)

= ⇒ { Prj-A, Prj-B }

= ⇒ Q’(X) :- Project(X) ∪ Works-for(Y,X)

c

(26)

Employee Works-for

1..⋆

Project

(27)

Employee Works-for

1..⋆

Project

ABox:

Works-for ⊇ { hJohn,Prj-Ai, hMary,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

c

(28)

Employee Works-for

1..⋆

Project

ABox:

Works-for ⊇ { hJohn,Prj-Ai, hMary,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

DBox:

Works-for = { hJohn,Prj-Ai, hMary,Prj-Ai }

Project = { Prj-A, Prj-B }

(29)

Employee Works-for

1..⋆

Project

ABox:

Works-for ⊇ { hJohn,Prj-Ai, hMary,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

DBox:

Works-for = { hJohn,Prj-Ai, hMary,Prj-Ai } Project = { Prj-A, Prj-B }

= ⇒ INCONSISTENT

c

(30)

Employee Works-for Project

◮ Additional constraint as a standard view over the data:

Bad-Project = Project \ π

2

Works-for

∀x. Bad-Project(x)↔ Project(x)∧¬∃y.Works-for(y,x)

Bad-Project = Project⊓¬∃Works-for .⊤

(31)

Employee Works-for Project

◮ Additional constraint as a standard view over the data:

Bad-Project = Project \ π

2

Works-for

∀x. Bad-Project(x)↔ Project(x)∧¬∃y.Works-for(y,x) Bad-Project = Project⊓¬∃Works-for .⊤

◮ DBox:

Works-for = { hJohn,Prj-Ai, hMary,Prj-Ai } Project = { Prj-A, Prj-B }

◮ Q(X) :- Bad-Project(X)

◮ ABox:

Works-for ⊇ { hJohn,Prj-Ai, hMary,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

◮ Q(X) :- Bad-Project(X)

c

(32)

Employee Works-for Project

◮ Additional constraint as a standard view over the data:

Bad-Project = Project \ π

2

Works-for

∀x. Bad-Project(x)↔ Project(x)∧¬∃y.Works-for(y,x) Bad-Project = Project⊓¬∃Works-for .⊤

◮ DBox:

Works-for = { hJohn,Prj-Ai, hMary,Prj-Ai } Project = { Prj-A, Prj-B }

◮ Q(X) :- Bad-Project(X)

= ⇒ { Prj-B }

◮ ABox:

Works-for ⊇ { hJohn,Prj-Ai, hMary,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

◮ Q(X) :- Bad-Project(X)

(33)

Employee Works-for Project

◮ Additional constraint as a standard view over the data:

Bad-Project = Project \ π

2

Works-for

∀x. Bad-Project(x)↔ Project(x)∧¬∃y.Works-for(y,x) Bad-Project = Project⊓¬∃Works-for .⊤

◮ DBox:

Works-for = { hJohn,Prj-Ai, hMary,Prj-Ai } Project = { Prj-A, Prj-B }

◮ Q(X) :- Bad-Project(X)

= ⇒ { Prj-B }

◮ ABox:

Works-for ⊇ { hJohn,Prj-Ai, hMary,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

◮ Q(X) :- Bad-Project(X)

= ⇒ { } does not scale down to standard DB answer!

c

(34)

Employee Works-for

1..

Project

◮ ABox:

Works-for ⊇ { hJohn,Prj-Ai }

Project ⊇ { Prj-A, Prj-B }

(35)

Employee Works-for

1..

Project

◮ ABox:

Works-for ⊇ { hJohn,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

◮ Query as a standard view over the data:

Q(X) :- Works-for(Y,X) Q = π

2

Works-for

c

(36)

Employee Works-for

1..

Project

◮ ABox:

Works-for ⊇ { hJohn,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

◮ Query as a standard view over the data:

Q(X) :- Works-for(Y,X) Q = π

2

Works-for

Q = EVAL( π

2

Works-for)

Q = π

2

(EVAL(Works-for))

(37)

Employee Works-for

1..

Project

◮ ABox:

Works-for ⊇ { hJohn,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

◮ Query as a standard view over the data:

Q(X) :- Works-for(Y,X) Q = π

2

Works-for

Q = EVAL( π

2

Works-for)

= ⇒ { Prj-A, Prj-B }

Q = π

2

(EVAL(Works-for))

c

(38)

Employee Works-for

1..

Project

◮ ABox:

Works-for ⊇ { hJohn,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

◮ Query as a standard view over the data:

Q(X) :- Works-for(Y,X) Q = π

2

Works-for

Q = EVAL( π

2

Works-for)

= ⇒ { Prj-A, Prj-B }

Q = π

2

(EVAL(Works-for))

= ⇒ { Prj-A }

Queries are not compositional with an ABox

(39)

Manager Employee

Manager = { John, Paul }

c

(40)

Manager Employee

Manager = { John, Paul }

Q(X) :- Employee(X)

(41)

Manager Employee

Manager = { John, Paul }

Q(X) :- Employee(X) = ⇒ { John, Paul }

c

(42)

Manager Employee

Manager = { John, Paul }

Q(X) :- Employee(X) = ⇒ { John, Paul }

So are Managers and Employees the same?

(43)

Manager Employee

Manager = { John, Paul }

Q(X) :- Employee(X) = ⇒ { John, Paul}

c

(44)

Manager Employee

Manager = { John, Paul }

Q(X) :- Employee(X) = ⇒ { John, Paul}

Q 1 :- ¬Manager(George)

Q 2 :- ¬Employee(George)

(45)

Manager Employee

Manager = { John, Paul }

Q(X) :- Employee(X) = ⇒ { John, Paul}

Q 1 :- ¬Manager(George) = ⇒ TRUE Q 2 :- ¬Employee(George)

c

(46)

Manager Employee

Manager = { John, Paul }

Q(X) :- Employee(X) = ⇒ { John, Paul}

Q 1 :- ¬Manager(George) = ⇒ TRUE

Q 2 :- ¬Employee(George) = ⇒ FALSE

(47)

Manager Employee

Manager = { John, Paul }

Q(X) :- Employee(X) = ⇒ { John, Paul}

Q 1 :- ¬Manager(George) = ⇒ TRUE Q 2 :- ¬Employee(George) = ⇒ FALSE The result of the query can not be stored (as a view)

= ⇒ queries with an incomplete answer are not compositional

c

(48)

Given a conceptual schema and a DBox, a query which only gives

complete answers is called implicitly definable or determined by the DBox.

If a query is implicitly definable, then its evaluation depends only on the database, and vice-versa; therefore implicitly definable queries characterise exactly views.

Beth (1953) constructively proved that there is a way to check whether an

arbitrary query is determined by a DBox given a conceptual schema.

(49)

c

(50)

If a query is implicitly definable, Beth (1953) constructively proved that possible to rewrite the query using only the vocabulary of the DBox (and therefore independent on the conceptual schema, since the extension of the DBox is fixed).

This is its explicit definition.

(51)

c

(52)

For simplicity, let’s focus on atomic queries.

Our goals are

1. to check whether the answers to a given query under a conceptual schema are solely determined by the DBox and, if so,

2. to find an equivalent (first-order/SQL) rewriting of the query in terms of the DBox predicates to allow the use of standard database

technology for answering the query.

3. Indeed, this means we benefit from the low computational complexity – logarithmic space in the size of the data – of answering first-order queries on relational databases.

4. It is possible to pre-compute all the rewritings of all the determined

predicates as relational views, and to allow arbitrary SQL queries on

top of them.

(53)

Conceptual schema: Male .

= ¬Female DBox: Female = {mary}

Query: Q :- ¬∃x.Male(x)

Rewriting of the query: ∀x.Female(x)

c

(54)

Conceptual schema: Male .

= ¬Female DBox: Female = {mary}

Query: Q :- ¬∃x.Male(x)

Rewriting of the query: ∀x.Female(x)

◮ Answer to the query: NO

(55)

Conceptual schema: Male .

= ¬Female DBox: Female = {mary}

Query: Q :- ¬∃x.Male(x)

Rewriting of the query: ∀x.Female(x)

◮ Answer to the query: NO

◮ But if we fix the domain to include only the individual mary (namely, the active domain), then the answer would be YES

c

(56)

Conceptual schema: Male .

= ¬Female DBox: Female = {mary}

Query: Q :- ¬∃x.Male(x)

Rewriting of the query: ∀x.Female(x)

◮ Answer to the query: NO

◮ But if we fix the domain to include only the individual mary (namely, the active domain), then the answer would be YES

The query is not domain independent.

(57)

Theorem (- et al.)

If a conceptual schema is domain independent, then the rewriting of determined domain independent queries is also domain independent.

c

(58)

Manager Employee

Manager = { John, Paul }

Q(X) :- Employee(X)

Rewriting of Q:

(59)

Manager Employee

Manager = { John, Paul }

Q(X) :- Employee(X) Rewriting of Q: impossible.

c

(60)

Manager Employee

Manager = { John, Paul }

Q(X) :- Employee(X) Rewriting of Q: impossible.

Manager

≡ Employee

Manager = { John, Paul }

Q(X) :- Employee(X)

Rewriting of Q:

(61)

Manager Employee

Manager = { John, Paul }

Q(X) :- Employee(X) Rewriting of Q: impossible.

Manager

≡ Employee

Manager = { John, Paul }

Q(X) :- Employee(X) Rewriting of Q: Manager(X)

c

(62)

Manager Employee

Manager = { John, Paul }

Q(X) :- Employee(X) Rewriting of Q: impossible.

Manager

≡ Employee

Manager = { John, Paul }

Q(X) :- Employee(X)

Rewriting of Q: Manager(X)

The abduction is characterised by being the least committing extension of

the ontology such that the query becomes implicitly definable.

(63)

Do reusable ontologies exist?

c

(64)
(65)

Do you want to exploit conceptual schema knowledge (i.e., constraints or an ontology)

in your data intensive application?

c

(66)

Do you want to exploit conceptual schema knowledge (i.e., constraints or an ontology)

in your data intensive application?

Pay attention!

TURGIA

(67)

Employee

1..⋆

Works-for Project

◮ DBox:

Friend = {hJohn,Maryi,. . .}; Employee = {John,Mary,. . .}

Project = { Prj-A, Prj-B, Prj-C }

c

(68)

Employee

1..⋆

Works-for Project

◮ DBox:

Friend = {hJohn,Maryi,. . .}; Employee = {John,Mary,. . .}

Project = { Prj-A, Prj-B, Prj-C }

◮ Q :- Works-for(E1,P), Works-for(E2,P), Friend(E1,E2).

Is it unavoidable that there are two friends working for the same project?

(69)

Employee

1..⋆

Works-for Project

◮ DBox:

Friend = {hJohn,Maryi,. . .}; Employee = {John,Mary,. . .}

Project = { Prj-A, Prj-B, Prj-C }

◮ Q :- Works-for(E1,P), Works-for(E2,P), Friend(E1,E2).

Is it unavoidable that there are two friends working for the same project?

YES: in any legal database instance, there are at least two friends working for the same project.

c

(70)

Employee

1..⋆

Works-for Project

◮ DBox:

Friend = {hJohn,Maryi,. . .}; Employee = {John,Mary,. . .}

Project = { Prj-A, Prj-B, Prj-C }

◮ Q :- Works-for(E1,P), Works-for(E2,P), Friend(E1,E2).

Is it unavoidable that there are two friends working for the same project?

YES: in any legal database instance, there are at least two friends working for the same project.

NO: there is at least a legal database instance in which no two friends

work for the same project.

(71)

Employee

1..⋆

Works-for Project

◮ DBox:

Friend = {hJohn,Maryi,. . .}; Employee = {John,Mary,. . .}

Project = { Prj-A, Prj-B, Prj-C }

◮ Q :- Works-for(E1,P), Works-for(E2,P), Friend(E1,E2).

Is it unavoidable that there are two friends working for the same project?

YES: in any legal database instance, there are at least two friends working for the same project.

NO: there is at least a legal database instance in which no two friends work for the same project.

With ABox semantics the answer is always NO, since there is at least a legal database instance with enough distinct projects so that no two friends work for the same project.

c

(72)

Employee

1..⋆

Works-for Project

◮ DBox:

Friend = {hJohn,Maryi,. . .}; Employee = {John,Mary,. . .}

Project = { Prj-A, Prj-B, Prj-C }

◮ Q :- Works-for(E1,P), Works-for(E2,P), Friend(E1,E2).

Is it unavoidable that there are two friends working for the same project?

YES: in any legal database instance, there are at least two friends working for the same project.

NO: there is at least a legal database instance in which no two friends work for the same project.

With ABox semantics the answer is always NO, since there is at least a legal database instance with enough distinct projects so that no two friends work for the same project.

Query answering with DBoxes has exponential complexity

(73)

DL ∪ DBox ≃ DL ∪ nominals (⇒) Add completion and closure axioms:

◮ for every assertions involving A in the DBox A(a 1 ), . . . , A(a n ), add the axiom A ≡ ({a 1 } ⊔ · · · ⊔ {a n })

◮ for every assertions involving R and a in the DBox R(a, b 1 ), . . . , R(a, b n ), add the axioms

{a} ⊑ ∃R.{b 1 } ⊓ · · · ⊓ ∃R.{b n } and {a} ⊑ ∀R.({b 1 } ⊔ · · · ⊔ {b n })

◮ · · ·

(⇐) For every nominal {a}, add to the DBox the assertion A(a), where A is a new DBox concept name, and replace the occurrences of {a} with A.

c

Referências

Documentos relacionados

according to their MS 2 fragmentation as different isomers of p-coumaroyl quinic acid. Identities were assigned based on the patterns reported for the caffeoylquinic acid

Houve um falso negativo em que à citologia foi diagnosticado como lesão inflamatória e a biópsia mostrou tratar-se de um carcinoma epidermóide bem diferenciado, e dois falsos

NÓS E OS OUTROS EM/COM QUEM HABITAMOS Na atual sociedade do conhecimento, pautada por encontros inesperados com as mudanças da era digital e cimentada por múltiplas incertezas,

Em relação à inclusão verificámos que 34.9% dos indivíduos apresentavam os sisos inclusos, havendo uma maior prevalência nos terceiros molares mandibulares e 28.2% destes

observados com a suplementação de β- alanina não são diretamente causados pela ação da β-alanina, mas principalmente, por ela ser um intermediário da síntese de

The results showed that the higher effi ciency in light energy uptake, paired with better photochemical performance and better CO 2 fi xation in plants under direct sunlight

Constitui objeto deste contrato a prestação, pela CONTRATADA, de serviços de empresa de telecomunicações e comunicação de dados para a prestação de serviço “frame-relay” para

In ragione di queste evidenze, il BIM - come richiesto dalla disciplina comunitaria - consente di rispondere in maniera assolutamente adeguata alla necessità di innovazione dell’intera

Projeto Pedagógico do Curso de Ciências Contábeis da Fundação Universidade Federal de Rondônia (UNIR) -