Title: University Politehnica of Bucharest
1Artificial Intelligence
- University Politehnica of Bucharest
- 2008-2009
- Adina Magda Florea
- http//turing.cs.pub.ro/aifils_08
2Structured knowledge representation
Lecture No. 8
- Semantic Networks
- Units
- Specific inferences
- Problems with inheritance
- Semantic Web
3Semantic networks
- first model for structured knowledge
representation - describe semantics of natural language
- used extensively as a model for representing
knowledge in KBS
4Knowledge base
- Radu sent a letter to Maria.
- Radu is a student.
- Ioana is a schoolgirl.
- Radu's address is Luterana, 15.
- occupation (radu, student)
- occupation (ioana, schoolgirl)
- send (radu, ioana, letter)
- address (radu, luterana - 15)
5Group knowledge into entities
- Radu
- occupation (radu, student)
- send (radu, ioana, letter)
- address (radu, luterana - 15)
- Ioana
- occupation (ioana, schoolgirl)
- send (radu, ioana, letter)
Associate properties or attributes
Model 2 args predicates
Radu occupation student address
luterana-15 Ioana occupation schoolgirl
What about 3 args predicates?
6- use ISA predicate - use Skolemization to
eliminate existential quantifier
7Radu ISA Person Occupation student
Address luterana-15 Ioana ISA Person
Occupation schoolgirlT1 ISA Sending-event
Sender Radu Receiver Ioana Object letter
slots
8ISA introduces a class-instance relationship AKO
predicate introduces a subclass-class
relationship
9Sending-event AKO Event Sender Person Rec
eiver Person Object ObjectClassPerson AK
O living Thing Occupation (student, engineer,
) Address string
10Examples of SN
11Units
- Units
- MemberOf - ISA
- SubClass, SuperClass - AKO
12Facets
- Facets
- Features associated to slots
- Possible facets
- Value facet
- Value type facet
- Default facet
- If-needed procedure or function
- Demon facet
- Comment facet
13 Specific inferences in semantic networks
properties/attributes inheritance 1)
Inheritance of attributes along the ISA relation
2) Inheritance of attributes along the AKO
relation Attribute's value inheritance
14Attribute's value inheritance
15Algorithm Inheritance of attribute's value in a
class hierarchy The algorithm gets the value V
of an attribute A of the object OFindVal (O,
A, V)1. Create a list L with node O and all the
nodes linked to O by an ISA relationship2. while
L ! do 2.1. Remove first node N from L
2.2. if attribute A of node N has value, be it
V then 2.2.1. Place V as the value of
attribute A of object O 2.2.3. return
SUCCESS 2.3. Add all nodes linked by AKO to N at
the end of L3. return FAILend.
16Attribute's default value inheritance
17Algorithm Inheritance of attribute's default
value in a class hierarchy The algorithm gets
the default value V of an attribute A of the
object OFindDefault (O, A, V)1. Create a list L
with node O and all the nodes linked to O by an
ISA relationship2. while L !
do 2.1. Remove first node N from L 2.2. if
attribute A of node N has a default value, be it
V then 2.2.1. Place V as the value of
attribute A of object O 2.2.3. return
SUCCESS 2.3. Add all nodes linked by AKO to N at
the end of L3. return FAILend.
FindIfNeeded(O,A,V)
18Control strategy
- the control strategy of inheritance indicates the
order of considering the different facets - 2 basic strategies
- N strategy
- Z strategy
19Algorithm The algorithm gets the value V of an
attribute A of the object O using the N
strategyFindValN (O, A, V)1. if FindVal
(O,A,V) SUCCESS then return SUCCESS2. if
FindDefault (O,A,V) SUCCESS then return
SUCCESS3. if FindIfNeeded (O,A,V) SUCCESS
then return SUCCESS4. return FAILend
Strategy N
20Algoritm Strategia Z de determinare a valorii
unui atribut. Algoritmul determina valoarea
unui atribut A al unei instante O utilizind
strategia Z.DetValZ (O, A, V)1. Formeaza o
lista L cu nodul O si toate nodurile legate de
O prin relatia ISA2. cat timp L !
executa 2.1. Elimina primul nod, N, din lista
L 2.2. daca fateta valoare a atributului A a
nodului N este V then 2.2.1. Depune V
in nodul punctat de atributul A al
obiectului O 2.2.2. intoarce SUCCES
Strategy Z
21 2.3. daca fateta valoare implicita a atributului
A a nodului N este V atunci 2.3.1. Depune
V in nodul punctat de atributul A al
obiectului O 2.3.2. intoarce
SUCCES 2.4. daca fateta procedura necesara a
atributului A a nodului N este proc (A1,...,
An,V) atunci 2.4.1. Determina valorile
atributelor A1,..., An ale instantei
O 2.4.2. daca s-au gasit valori pentru A1,...,
An atunci i. executa proc (A1,...,
An,V) ii. Depune V in nodul punctat de
atributul A al obiectului O iii. intoarce
SUCCES3. intoarce INSUCCESsfarsit.
22Problems with inheritance
- DAG networks
- Multiple inheritance
23(No Transcript)
24Multiple inheritance
- Distance between units
- If we look for the value of an attribute A of a
unit U1 and find 2 paths U1?U2 and U1?U3 to U2
and U3 containing values for A - then compute the length of the alternate paths
from the instance/unit U1 to units U2 and U3 and
choose the value from the closest unit (shortest
path) - May cause semantic problems
25Shortest distance
Shortest inferential distance
Distance and inferential distance
26Multiple inheritance
- Inferential distance
- Unit1 is closer to Unit2 than to Unit3 if and
only if Unit1 has an inferential path to Unit3
which contains Unit2. - Unit1 is closer to Unit2 than to Unit3 if and
only if Unit2 is on an inferential path of ISA
and AKO relationships between Unit1 and Unit3
27Algorithm Inheritance of attribute's value in a
class hierarchy based on inferential
distanceFind the value V of slot S of unit
U1. Make a list L with unit U and all units to
which unit U is linked by an ISA/MemberOf2. Init
ialize a list CAND 3. while L !
do 3.1. remove first unit X from L 3.2. if slot
S of X has value then CAND CAND
?X 3.3. else add to L all units to which X is
linked by a AKO/SuperClass4. for each unit C ?
CAND do 4.1. Verify if there is another C ?
CAND having an inferential distance to U
shorter than to C 4.2. if such a C'
exists then remove C from CAND
285. if card (CAND) 0 then return FAIL / no
value for S /6. if card (CAND) 1 then
6.1. Be C the one element of CAND 6.2. Make
the value V of slot S of C the value of slot S
of U 6.3. return SUCCESS7. if card (CAND) gt 1
then return CONTRADICTIONend.
29Combined representationsKnowledge base
contains - declarative knowledge units -
procedural knowledge rules daca
Camion.Inaltime gt 2 si Camion.Culoare
rosu atunci Camion.Pret 1000
Inferences both specific to units and specific
to rules
30Semantic Web and Ontologies
31Semantic Web
- Web was invented by Tim Berners-Lee (amongst
others), a physicist working at CERN - TBLs original vision of the Web was much more
ambitious than the reality of the existing
(syntactic) Web - TBL (and others) have since been working towards
realising this vision, which has become known as
the Semantic Web - E.g., article in May 2001 issue of Scientific
American
32Where we are Today the Syntactic Web
Hendler Miller 02
33The Syntactic Web is
- A hypermedia, a digital library
- A library of documents called (web pages)
interconnected by a hypermedia of links - A database, an application platform
- A common portal to applications accessible
through web pages, and presenting their results
as web pages - A platform for multimedia
- BBC Radio 4 anywhere in the world! Terminator 3
trailers! - A naming scheme
- Unique identity for those documents
- A place where computers do the presentation
(easy) and people do the linking and interpreting
(hard). - Why not get computers to do more of the hard
work?
Goble 03
34Impossible (?) using the Syntactic Web
- Complex queries involving background knowledge
- Find information about animals that use sonar
but are not either bats or dolphins - Locating information in data repositories
- Travel enquiries
- Prices of goods and services
- Results of human genome experiments
- Delegating complex tasks to web agents
- Book me a holiday next weekend somewhere warm,
not too far away, and where they speak French or
English
35What is the Problem?
- Consider a typical web page
- Markup consists of
- rendering information (e.g., font size and
colour) - Hyper-links to related content
- Semantic content is accessible to humans but not
(easily) to computers
36What information can we see
- WWW2002
- The eleventh international world wide web
conference - Sheraton waikiki hotel
- Honolulu, hawaii, USA
- 7-11 may 2002
- 1 location 5 days learn interact
- Registered participants coming from
- australia, canada, chile denmark, france,
germany, ghana, hong kong, india, ireland, italy,
japan, malta, new zealand, the netherlands,
norway, singapore, switzerland, the united
kingdom, the united states, vietnam, zaire - Register now
- On the 7th May Honolulu will provide the backdrop
of the eleventh international world wide web
conference. This prestigious event - Speakers confirmed
- Tim berners-lee
- Tim is the well known inventor of the Web,
- Ian Foster
- Ian is the pioneer of the Grid, the next
generation internet
37What information can a machine see
- WWW2002
- The eleventh international world wide web
conference - Sheraton waikiki hotel
- Honolulu, hawaii, USA
- 7-11 may 2002
- 1 location 5 days learn interact
- Registered participants coming from
- australia, canada, chile denmark, france,
germany, ghana, hong kong, india, ireland, italy,
japan, malta, new zealand, the netherlands,
norway, singapore, switzerland, the united
kingdom, the united states, vietnam, zaire - Register now
- On the 7th May Honolulu will provide the backdrop
of the eleventh international world wide web
conference. This prestigious event - Speakers confirmed
- Tim berners-lee
- Tim is the well known inventor of the Web,
- Ian Foster
- Ian is the pioneer of the Grid, the next
generation internet
38Solution XML markup with meaningful tags?
- ltnamegtWWW2002
- The eleventh international world wide
webconlt/namegt - ltlocationgtSheraton waikiki hotel
- Honolulu, hawaii, USAlt/locationgt
- ltdategt7-11 may 2002lt/dategt
- ltslogangt1 location 5 days learn interactlt/slogangt
- ltparticipantsgtRegistered participants coming from
- australia, canada, chile denmark, france,
germany, ghana, hong kong, india, ireland, italy,
japan, malta, new zealand, the netherlands,
norway, singapore, switzerland, the united
kingdom, the united states, vietnam,
zairelt/participantsgt - ltintroductiongtRegister now
- On the 7th May Honolulu will provide the backdrop
of the eleventh international world wide web
conference. This prestigious event - Speakers confirmedlt/introductiongt
- ltspeakergtTim berners-leelt/speakergt
- ltbiogtTim is the well known inventor of the
Web,lt/biogt
39But What About
- ltconfgtWWW2002
- The eleventh international world wide
webconlt/confgt - ltplacegtSheraton waikiki hotel
- Honolulu, hawaii, USAlt/placegt
- ltdategt7-11 may 2002lt/dategt
- ltslogangt1 location 5 days learn interactlt/slogangt
- ltparticipantsgtRegistered participants coming from
- australia, canada, chile denmark, france,
germany, ghana, hong kong, india, ireland, italy,
japan, malta, new zealand, the netherlands,
norway, singapore, switzerland, the united
kingdom, the united states, vietnam,
zairelt/participantsgt - ltintroductiongtRegister now
- On the 7th May Honolulu will provide the backdrop
of the eleventh international world wide web
conference. This prestigious event - Speakers confirmedlt/introductiongt
- ltspeakergtTim berners-leelt/speakergt
- ltbiogtTim is the well known inventor of the Web,
40Must add semantics
- External agreement on meaning of annotations
- E.g., Dublin Core
- Agree on the meaning of a set of annotation tags
- Problems with this approach
- Inflexible
- Limited number of things can be expressed
- Use Ontologies to specify meaning of annotations
- Ontologies provide a vocabulary of terms
- New terms can be formed by combining existing
ones - Meaning (semantics) of such terms is formally
specified - Can also specify relationships between terms in
multiple ontologies
41Ontology in philosophy
- a philosophical disciplinea branch of philosophy
that - deals with the nature and the organisation of
reality - Science of Being (Aristotle, Metaphysics, IV, 1)
- Tries to answer the questions
- What characterizes being?
- Eventually, what is being?
42Ontology in Computer Science
- An ontology is an engineering artifact
- It is constituted by a specific vocabulary used
to describe a certain reality, plus - a set of explicit assumptions regarding the
intended meaning of the vocabulary. - Thus, an ontology describes a formal
specification of a certain domain - Shared understanding of a domain of interest
- Formal and machine manipulable model of a domain
of interest - An explicit specification of a
conceptualisation Gruber93
43Structure of an ontology
- Ontologies typically have two distinct
components - Names for important concepts in the domain
- Elephant is a concept whose members are a kind of
animal - Herbivore is a concept whose members are exactly
those animals who eat only plants or parts of
plants - Adult_Elephant is a concept whose members are
exactly those elephants whose age is greater than
20 years - Background knowledge/constraints on the domain
- Adult_Elephants weigh at least 2,000 kg
- All Elephants are either African_Elephants or
Indian_Elephants - No individual can be both a Herbivore and a
Carnivore
44Example of ontology
45Tools
- Description Logics
- OWL Web Ontological Language
- Protégé framework for building ontologies