41
Semantic Web Systems Ontologies Jacques Fleuriot School of Informatics 15 th January 2015

Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems

Ontologies

Jacques Fleuriot

School of Informatics

15th January 2015

Page 2: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

In the previous lecture

l  What is the Semantic Web? § Web of machine-readable data

l  Aims of the Semantic Web § Automated query-answering

§ Automated use of data

2

Page 3: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

In this lecture

l  What is an ontology?

l  Frame-based approaches

l  Folksonomy

3

Page 4: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

4

What is an ontology?

Page 5: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

What is an ontology? (1) Originally: a definitive account of what exists (derived from metaphysics).

Therefore, we can create a single ontology that describes the world – maybe dividing into smaller sub-ontologies as necessary.

But this is completely misconceived!

5

Page 6: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

6

Same worldview?

Page 7: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

A single ontology? l  A notion of relevant knowledge is highly

subjective §  Which parts of the world it is important to talk

about §  How to segregate and organise the world

§  What terms to use

l  Ontologies are designed by individuals: central control is impossible and undesirable

7

Page 8: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

…or several ontologies? l  But ontological differences are desirable and

essential: §  Freedom of expression

§  Ability to adapt to task §  Changing environment

l  Even direct contradictions can be desirable

l  Is a tomato a fruit or a vegetable? l  The crucial task is managing these differences

8

Page 9: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Ontology definitions “an explicit specification of a conceptualisation”

Gruber, 1993

“a formal, explicit specification of a shared conceptualisation” Studer et al, 1998

“an explicit representation of a shared understanding of the important concepts in some domain of interest”

Kalfoglou, 2002

“a set of types, properties and relationships” Wikipedia, 2010

But what does this mean? 9

Page 10: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

What is an ontology? (2) l  Essentially: a way of encoding domain

knowledge

l  But there are many different choices as to how this is done.

l  The word ontology is over-loaded: it means different things to different people.

l  Ontologies are also sometimes referred to as vocabularies. A vocabulary is typically a light-weight ontology.

10

Page 11: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Why Semantic Web ontologies? l  Data integration

11

Who is the creator of Crime and

Punishment?

The creator? What do you mean? The

publisher? The author?

Page 12: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Why Semantic Web ontologies? l  Data integration

l  Inference

12

William Burnes is the parent of Robert Burns.

William Burnes is the father of Robert Burns. … …

Father is a sublcass of Parent. … …

Page 13: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Why Semantic Web ontologies? l  Data integration

l  Inference

l  Automated query-answering

l  Automated use of data

13

Page 14: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Example ontologies

14 http://semanticweb.org/wiki/Ontology

Page 15: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Representation and Reasoning l  Long history of attempts in Artificial Intelligence to

develop knowledge-based systems. Given a knowledge base KB, is the sentence A true?

l  We can’t just look to see if A is contained in KB; typically need to do some inference.

l  First-order logic can represent pretty much everything, but intractable inference seen as a major barrier. In reality this depends on how complex the ontology is.

l  Much effort devoted to developing alternatives which were seen as more tractable.

15

Page 16: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

16

Frame-based approach

Page 17: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Hierarchies and Frames

17

Page 18: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Hierarchies and Frames

18

Page 19: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Hierarchies and Frames

19

Page 20: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Hierarchies and Frames

20

Page 21: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Hierarchies and Frames l  Frames are a way of describing classes or

concepts or types

l  Usual to think of classes in terms of sets of individuals

l  Frames contain slots with values l  Values can be restricted in various ways:

§  Integer, boolean or literal values

§  Enumerated values §  Instances of a specified class

21

Page 22: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Classes and Individuals

22

Page 23: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Classes and Individuals l  Ambiguity about nature of the edge in the

graph. Reflected in English: §  A lion is a carnivore

§  Jerome is a giraffe

l  Two different relations/labels: §  ISA: taxonomic — a lion is a kind of carnivore

•  Lion ⊆ Carnivore [∀x. Lion(x) → Carnivore(x)]

§  IO: instance-of/membership — Jerome is a member of the class of giraffes •  Jerome ∈ Giraffe [Giraffe(Jerome)]

23

Page 24: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Classes and Individuals

24

Page 25: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Inheritance How many legs does Jerome have? 4

⇒ Jerome is an instance of Giraffe ⇒ Every instance of Giraffe is an instance of Herbivore ⇒ Every instance of Herbivore is an instance of Mammal ⇒ Mammals have 4 legs

So the attribute of having 4 legs is inherited by Giraffe from Mammal

25

Page 26: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Assertion vs Terminology l  Assertions - simple facts about the world:

§  Joe is married to Sue §  Bill has a brother with no children §  Harry’s friends are Bill’s cousins

l  Terminology: §  ancestor is the transitive closure of parent §  brother is sibling restricted to males §  favourite-cousin is a special type of cousin

l  The KRYPTON system (Brachman, Fikes Levesque, 1983) proposed dividing KR system into two main components: §  ABox (assertions) §  TBox (terminological structure) 26

Page 27: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

27

Folksonomy

Page 28: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Folksonomy Folksonomy ⇐ Folk + Taxonomy l  Folksonomy emerged from growing practise of ad hoc tagging and labelling

§  e.g. Delicious, Flickr

§  tagging seemed to help the discovery of related resources “tagging that works”

l  Unlike most formal ontologies, collaborative tagging is not hierarchical or centrally controlled.

l  Folksonomy brings agents back into process of constructing meaning.

28

Page 29: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Tags on Flickr

29

16/11/2015

Page 30: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Tags on stackoverflow

30

Page 31: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Folksonomy – Vander Wal (2007) l  Result of personal free tagging of information

and objects for one’s own retrieval

l  Done in a social environment (usually open and shared)

l  Value is derived from people using their own vocabulary and adding explicit meaning

l  Not so much categorizing, as providing a means to connect items

31

Page 32: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Folksonomy vs Formal ontology

l  Vander Wal: folksonomy is not categorization

l  Shirky: folksonomy is a more robust and scalable approach to categorization than formal ontology

32

Page 33: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Folksonomy vs Formal ontology Formal Ontology Tagging

Domain Small corpus Large corpus Formal categories No formal categories Stable entities Unstable entities Restricted entities Unrestricted entities Clear edges No clear edges

Participants Expert catalogers Naïve catalogers Authoritative sources of judgement

No authority

Coordinated users Uncoordinated users Expert users Amateur users

33

Shirky (2005) ‘favourable characteristics’

Page 34: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Categorisation vs Classification – Jacob (2004)

division of world of experience into groups that share some perceptible similarity in a given context; context dependence provides categorisation with its power and flexibility

34

l  Distinction is not the same as common usage l  But formal ontologies aspire to classification, in the

above sense.

orderly assignment of each entity to one and only one class within a system of mutually exclusive and non-overlapping classes

Categorisation:

Classification:

Page 35: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Graph Structure of Tagging Systems

35

A tagging instance is a triple (user, tag, resource)

Page 36: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Tag distribution – Halpin et al (2007) l  What is the distribution of tags used to categorise a

specific resource (e.g. a Delicious bookmark)?

l  Observation: tagging distribution is stable in the sense that a small proportion of tags are consistently used to label the resource; and

l  New users tend to reinforce tags in the same frequency as the stable distribution.

l  Can be viewed as a ‘collective categorization scheme’; i.e. ontology can emerge from collaborative tagging.

36

Page 37: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Emergent Semantics – Mika (2005) l  Emergent semantics: interaction of large

number of agents leads to global semantic effects.

l  Ontology arises from activity within network as opposed to a fixed, limited contract.

l  Goal: more scalable and easily maintainable Semantic Web, incorporating social context.

37

Page 38: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

The bigger picture

38

Page 39: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Summary l  Ontology

§  No consensus on definition §  A formal, explicit specification of a shared conceptualisation §  Helps define concepts, relationships and constraints (more on this

next week!)

l  Frames §  A way of describing classes or concepts or types §  Contain slots with values §  ISA vs IO relations

l  Folksonomy §  Tagging that works

§  A scalable approach

39

Page 40: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Task

l  Look at the Flickr tags (slide 29)

l  Choose a subsection and try to mould it into a small formal ontology

40

Page 41: Semantic Web Systems Ontologies€¦ · Semantic Web Systems: Ontologies Representation and Reasoning ! Long history of attempts in Artificial Intelligence to develop knowledge-based

Semantic Web Systems: Ontologies

Reading

l  Chapter 2 in SWWO

l  W3C page on Ontology: http://www.w3.org/standards/semanticweb/ontology

l  Papers in MASWS Wiki on Folksonomy: http://sites.google.com/site/masws09/folksonomy

41