Ontologies and Semantic Networks Sven Koenig, USC Russell and - - PDF document

ontologies and semantic networks
SMART_READER_LITE
LIVE PREVIEW

Ontologies and Semantic Networks Sven Koenig, USC Russell and - - PDF document

12/18/2019 Ontologies and Semantic Networks Sven Koenig, USC Russell and Norvig, 3 rd Edition, Section 12.5.1 These slides are new and can contain mistakes and typos. Please report them to Sven (skoenig@usc.edu). 1 Ontology Ontology = a


slide-1
SLIDE 1

12/18/2019 1

Ontologies and Semantic Networks

Sven Koenig, USC

Russell and Norvig, 3rd Edition, Section 12.5.1 These slides are new and can contain mistakes and typos. Please report them to Sven (skoenig@usc.edu).

Ontology

  • Ontology = a model for describing the world that consists of a set of

types, properties, and relationship types

1 2

slide-2
SLIDE 2

12/18/2019 2

Example: Taxonomic Knowledge

  • “All office machines get their energy from wall outlets.”
  • “All printers are office machines.”
  • “All laser printers are printers.”
  • “Hobbes is a laser printer.”

Example: Taxonomic Knowledge

  • Knowledge base in first-order logic
  • FORALL x IsOfficeMachine(x) IMPLIES EnergySource(x, WallOutlet)
  • FORALL x IsPrinter(x) IMPLIES IsOfficeMachine(x)
  • FORALL x IsLaserPrinter(x) IMPLIES IsPrinter(x)
  • IsLaserPrinter(Hobbes)
  • We can use resolution to show that the knowledge base entails
  • EnergySource(Hobbes, WallOutlet)
  • But the knowledge base and resolution are difficult to understand by

non-experts and resolution is often slow (and non-trivial to implement), so we are looking for alternative ways to represent knowledge and reason with it.

3 4

slide-3
SLIDE 3

12/18/2019 3

Semantic Networks

OfficeMachines Robots Printers DeliveryRobots CleaningRobots LaserPrinters InkjetPrinters R2D2 Hobbes WallOutlets isa isa isa isa isa isa isa isa EnergySource

Semantic Networks

OfficeMachines Robots Printers DeliveryRobots CleaningRobots LaserPrinters InkjetPrinters R2D2 Hobbes WallOutlets element element subset subset subset subset subset subset EnergySource

5 6

slide-4
SLIDE 4

12/18/2019 4

Semantic Networks

A B A B A B A B A B FORALL x (A(x) IMPLIES B(x)) B(A) R(A,B) FORALL x (A(x) IMPLIES R(x,B))

FORALL x (A(x) IMPLIES EXISTS y (B(y) AND R(x,y)))

Cats Mammals Bill Cats Bill 12 Birds 2 Birds Birds

subset element R R R subset element Age Legs Parent

Semantic Networks

  • How would you depict “R2D2 is not a cleaning robot”?
  • How would you depict “R2D2 is a delivery or cleaning robot”?

7 8

slide-5
SLIDE 5

12/18/2019 5

Semantic Networks

  • A special purpose reasoning procedure (“pointer following”) makes

reasoning about properties easy, using the inheritance of properties.

Semantic Networks

OfficeMachines Robots Printers DeliveryRobots CleaningRobots LaserPrinters InkjetPrinters R2D2 Hobbes WallOutlets element element subset subset subset subset subset subset EnergySource

  • What’s the energy source of Hobbes?

9 10

slide-6
SLIDE 6

12/18/2019 6

Semantic Networks

  • “Yesterday, I looked out of the window and saw a bird.”
  • Do you think that the bird I saw could (likely) fly?
  • Why do people jump to conclusions here? They reason with defaults.
  • “Let me continue. It had a broken wing and sat on the ground.”
  • If you thought that the bird could fly, you now need to revise your conclusion.
  • This cannot be done (in straight-forward ways) with first-order logic since

first-order logic is monotonic, meaning that KB AND KB’ ⊨ S whenever KB ⊨ S.

  • For example, IsBird(Tweety) AND BrokenWing(Tweety) ⊨ CanFly(Tweety) if

IsBird(Tweety) ⊨ CanFly(Tweety).

  • However, default reasoning can be done easily with semantic networks.

Semantic Networks

OfficeMachines Robots Printers DeliveryRobots CleaningRobots LaserPrinters InkjetPrinters R2D2 Hobbes Batteries WallOutlets element element subset subset subset subset subset subset EnergySource EnergySource

  • “R2D2 is an office machine.”

11 12

slide-7
SLIDE 7

12/18/2019 7

Semantic Networks

OfficeMachines Robots Printers DeliveryRobots CleaningRobots LaserPrinters InkjetPrinters R2D2 Hobbes Batteries WallOutlets element subset subset subset subset subset subset EnergySource EnergySource

  • “Let me continue. In fact, R2D2 is a delivery robot.”

element

Semantic Networks

  • Semantic networks can represent stories.
  • “John gave a book to Mary.”

Give Event John Event 7 Mary Book 23 Book element agent element

  • bject

beneficiary

13 14

slide-8
SLIDE 8

12/18/2019 8

Semantic Networks

  • Spreading activation (“marker passing”) can reason about stories

represented with semantic networks.

  • Activation is the arousal level of a node.
  • Nodes mentioned in the story are activated.
  • Whenever a node receives activation, a fraction of that activation spreads

with or against the semantic links connected to the node.

  • The higher the activation of a node, the more easily the corresponding

concept can be accessed from memory.

Warning

  • We use a suicide prevention example on the next couple of slides for

historic reasons: early AI researchers studied similar examples.

Chapter 6 by Hendler in “Models of Cognition: A Review of Cognitive Science” edited by Sharkey (page 147) This is a good time to point out the Statement on Academic Conduct and Support Systems on the class webpage, which includes resources for suicide prevention!

15 16

slide-9
SLIDE 9

12/18/2019 9

Semantic Networks

  • Background knowledge is represented as a huge semantic network.

Bankruptcy Event Terminally Ill Event Severe Depression Stabbing Oneself Event Hanging Oneself Event Suicide Event Precondition subset subset Causes Causes Knife Rope Tool Tool

Semantic Networks

  • “John went bankrupt. He bought a rope.”

Bankruptcy Event Terminally Ill Event Severe Depression Hanging Oneself Event Stabbing Oneself Event Suicide Event Precondition subset subset Causes Causes Rope Knife Tool Tool Event 1 Event 2 John

element agent agent

Rope 1

element

  • bject

17 18

slide-10
SLIDE 10

12/18/2019 10

Semantic Networks

  • “John went bankrupt. He bought a rope.”

Bankruptcy Event Terminally Ill Event Severe Depression Hanging Oneself Event Stabbing Oneself Event Suicide Event Precondition subset subset Causes Causes Rope Knife Tool Tool Event 1 Event 2 John

element agent agent

Rope 1

element

  • bject

Event Buying Event

subset element subset subset subset

Frames (very similar to semantic networks)

Printers SubsetOf: OfficeMachines SupersetOf: {LaserPrinters, InkjetPrinters} EnergySource: WallOutlet Creator: Sven Koenig Date: Sep 10, 2018 Hobbes ElementOf: LaserPrinters EnergyConsumption: 180 Watt/hour EnergyCostPerHour: Utility:EnergyCost * this:EnergyConsumption Creator: Sven Koenig Date: Feb 23, 2015 meta information spreadsheet-type calculation via “procedural attachment”

19 20

slide-11
SLIDE 11

12/18/2019 11

Semantic Networks and Frames

  • Properties (some versus first-order logic)
  • Knowledge base (appears) easy to understand by humans

but semantics is often not well defined in practice

  • Problems with multiple inheritance of incompatible properties
  • More expressive than first-order logic

with regard to default reasoning and procedural attachments

  • Less expressive (or more complicated) than first-order logic

with regard to some logical operators such as negation and disjunction

  • Reasoning easy to implement and efficient but limited in capability

due to special-purpose reasoning procedures

  • Some reasoning (such as inheritance) is easy to explain to non-experts

21