Top Banner
The Sigma Knowledge Engineering Environment: An environment for developing large theories in first- and higher-order logic Adam Pease, Articulate Software [email protected] http://www.ontologyportal.org/ 1
41

Sigma Knowledge Engineering Environment

Jan 15, 2015

Download

Technology

Presentation given by Adam Pease at Ontology 2013 Summit
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Sigma Knowledge Engineering Environment

The Sigma Knowledge Engineering Environment:

An environment for developing large theories in first- and higher-order logic

Adam Pease, Articulate [email protected]

http://www.ontologyportal.org/

1

Page 2: Sigma Knowledge Engineering Environment

Sigma

● An IDE for SUMO● Browsing, inference, debugging● Some information extraction

2

Page 3: Sigma Knowledge Engineering Environment

Suggested Upper Merged Ontology

●1000 terms, 4000 axioms, 750 rules

●Mapped by hand to all of WordNet 1.6● then ported to 3.0

●Associated domain ontologies totalling 20,000 terms and 80,000 axioms

●Mapped to all of YAGO – millions of facts

●Free● SUMO is owned by IEEE but basically public domain

● Domain ontologies are released under GNU

● www.ontologyportal.org

3

Page 4: Sigma Knowledge Engineering Environment

SUMO+Domain OntologyStructuralOntology

BaseOntology

Set/ClassTheory

Numeric Temporal Mereotopology

Graph Measure Processes Objects

Qualities

SUMO

Mid-Level

Military

Geography

Elements

Terrorist Attack Types

Communications

People

TransnationalIssues

FinancialOntology

TerroristEconomy

NAICSTerroristAttacks

France

AfghanistanUnitedStates

DistributedComputing

BiologicalViruses

WMD

ECommerceServices

Government

Transportation

WorldAirports

Total Terms Total Axioms Rules

20977 88257 4730

Relations: 1280

4

Page 5: Sigma Knowledge Engineering Environment

Why Expressive Logic?

5

Page 6: Sigma Knowledge Engineering Environment

Taxonomy

● What's an automobile?– truck or sedan

– Alone it might be taken as not including trucks

– Does truck include 18-wheelers?

automobile

truck

AdamsHonda

sedan

6

Page 7: Sigma Knowledge Engineering Environment

Automation

● if d is an a, a can't be a d (usually)a

b

d

c

7

Page 8: Sigma Knowledge Engineering Environment

Fixing Meaning

Horse

8

Page 9: Sigma Knowledge Engineering Environment

Fixing Meaning

Horse is a mammal

9

Page 10: Sigma Knowledge Engineering Environment

Fixing Meaning

Horse is a mammal that has four legs

10

Page 11: Sigma Knowledge Engineering Environment

Fixing Meaning

Horse is a mammal that has four legs and is

capable of carrying ahuman rider that largely

controls its actions

11

Page 12: Sigma Knowledge Engineering Environment

Fixing Meaning

Caballo

12

Page 13: Sigma Knowledge Engineering Environment

Call it by another name

● But is it the same?● One might assert the term is the same

– is it?

● If definitions are shared but shallow, what might be missing?

● If definitions are different are they consistent?– How do you determine consistency?

13

Page 14: Sigma Knowledge Engineering Environment

Inferential Closure

● (subclass Horse Mammal)

(instance Horse MrEd) ->

(instance MrEd Mammal)

● (=>

(instance ?X Mammal)

(exists (?H)

(and

(instance ?H Head)

(part ?H ?X))))

14

Page 15: Sigma Knowledge Engineering Environment

Inferential Closure

15

Page 16: Sigma Knowledge Engineering Environment

Inferential Closure

16

Page 17: Sigma Knowledge Engineering Environment

Inferential Closure

17

Page 18: Sigma Knowledge Engineering Environment

Text Processing

18

Page 19: Sigma Knowledge Engineering Environment

Sentiment Analysis

● Emotional content of text● Pilot project combining

– Sentiment analysis (computational linguistics)

– Concept extraction (linguistic semantics/ontology)

● Note this is just a pilot project and the computational linguistic method used is really basic, not state of the art

● Applications: – Fine grained search by features

– Ratings by review, not by stars, and integrated across sources

– Merge hotel ratings from different services that have different scales by using sentiment

19

Page 20: Sigma Knowledge Engineering Environment

Meadowood, St. Helena: Restaurant:10“In recent years the elegant but unstuffy dining room has won rave reviews, becoming a destination restaurant.“

Marys Lake Lodge and Resort, CO: Roadway: -8“Not to mention it is very expensive and located in a place that doesn't get much sun so it's icy and cold; and the maintenance of roads is terrible in winter.”

20

Page 21: Sigma Knowledge Engineering Environment

Sigma

21

Page 22: Sigma Knowledge Engineering Environment

Sigma Functions

KBsMapping&Merging

BrowseTerm

BrowseWord

Ask/Tell

Load/SaveAs

ConsistencyCheck

SimplifiedBrowse

KBDiagnostics

WordNetDiagnostics

BrowseWordNet

Graph Local Remote

Mapping, merging and translation Browsing

and displayAnalysis and debugging

Inference

22

Page 23: Sigma Knowledge Engineering Environment

● Simple string distance-based merging tool– More complicated algorithms seemed to

have little practical effect– Most of the value was in a convenient

GUI

– Most ontologies to be merged have so little to match on

● Supported Languages– SUO-KIF

– OWL– Prolog

– TPTP

– THF

Mapping&Merging

Load/SaveAs

Mapping, merging and translation

23

Page 24: Sigma Knowledge Engineering Environment

KBs

BrowseTerm

BrowseWord

SimplifiedBrowse

BrowseWordNet

Graph

Browsing and display

24

Page 25: Sigma Knowledge Engineering Environment

25

Page 26: Sigma Knowledge Engineering Environment

ConsistencyCheck

KBDiagnostics

WordNetDiagnostics

Analysis and debugging

● Consistency check– Attempt to prove

inconsistency

– Incomplete

● Rootless term● No documentation● Term with no axioms● Disjoint parents● File dependency● WordNet-SUMO

hierarchy compare

26

Page 27: Sigma Knowledge Engineering Environment

● Local inference engines– KIF-Vampire, LEO-II, Metis,

SInE

– 40+ TPTP engines remote at U Miami

Ask/Tell

Local Remote

Inference

27

Page 28: Sigma Knowledge Engineering Environment

● Pre- and post- processing to interface with standard provers

● Metis needed for answer extraction and proof presentation with many provers

PredicateVariables

Higher Order

ArithmeticFunctions

Row VariableExpansion

PredicateRenaming

VampireSortPrefixing

TPTPWorld Metis

ProofSimplification

SUMO+Query

Answer+Proof

AnswerExtraction

28

Page 29: Sigma Knowledge Engineering Environment

29

Page 30: Sigma Knowledge Engineering Environment

SUO-KIF

● variant of the KIF language (Genesereth, 1991)

● LISP-like syntax● only logical operators in the language itself

– Original KIF had ”definition” and class-forming operators

30

Page 31: Sigma Knowledge Engineering Environment

SUO-KIF (continued)● “free” syntax

– variables in the predicate position – quantification over formulas– predicates and instances may share names

● empty conjunctions etc not allowed● Variables denoted by “?” character● Sequence variables● “forall”, “exists”, “=>” and “<=>”● quantified variables have no explicit sort

syntax 31

Page 32: Sigma Knowledge Engineering Environment

Class and Instance Creation Predicates

(instance Adam Human)(subclass Human Mammal)

not

(Human Adam)(Mammal Human)

32

Page 33: Sigma Knowledge Engineering Environment

Sigma Inference

● Since 2002 using a customized version of Vampire– Treat sequence variables as macros

– Quantification of free variables

– Quoting second order

– “holds” prefixes (for functions too)

– Adding explicit sorts (* new)

33

Page 34: Sigma Knowledge Engineering Environment

Sequence Variables● Useful convenience for knowledge engineer

(=> (and (subrelation ?REL1 ?REL2) (?REL1 @ROW)) (?REL2 @ROW))

becomes(=> (and (subrelation ?REL1 ?REL2) (?REL1 ?ARG1)) (?REL2 ?ARG1))(=> (and (subrelation ?REL1 ?REL2) (?REL1 ?ARG1 ?ARG2)) (?REL2 ?ARG1 ?ARG2))

etc.34

Page 35: Sigma Knowledge Engineering Environment

Quantify Free Variables

● Universal quantification in assertion, existential in query

(=> (and (subrelation ?REL1 ?REL2) (?REL1 ?ARG1)) (?REL2 ?ARG1))

becomes(forall (?REL1 ?REL2 ?ARG1) (=> (and (subrelation ?REL1 ?REL2) (?REL1 ?ARG1)) (?REL2 ?ARG1)))

35

Page 36: Sigma Knowledge Engineering Environment

“holds” prefixing● Prepend a “dummy” predicate to every

clause with a non-logical operator● Forces any predicate variables into the first

argument● A single predicate name ruins performance● Including number of arguments in name

helps (and use apply_ for functions)

(=> (inverse ?REL1 ?REL2) (forall (?INST1 ?INST2) (<=> (?REL1 ?INST1 ?INST2) (?REL2 ?INST2 ?INST1))))

(=> (holds_3__ inverse ?REL1 ?REL2) (forall (?INST1 ?INST2) (<=> (holds_3__ ?REL1 ?INST1 ?INST2) (holds_3__ ?REL2 ?INST2 ?INST1))))

36

Page 37: Sigma Knowledge Engineering Environment

Quoting Second Order

● Unification still works

(believes Mary (likes Mary Bill)) ;; fact

(believes Mary (likes ?X Bill)) ;; query

(likes Mary Bill) ;; result

(believes Mary (and (likes Mary Bill) (likes Sue Bill)))

(believes Mary (likes ?X Bill)) ;; query doesn't unify

● But logical operators lose their meaning

37

Page 38: Sigma Knowledge Engineering Environment

Sortals

(=> (and (instance ?TRANSFER Transfer) (agent ?TRANSFER ?AGENT) (patient ?TRANSFER ?PATIENT)) (not (equal ?AGENT ?PATIENT)))

(=> (and (instance ?AGENT Agent) (instance ?PATIENT Object)) (=> (and (instance ?TRANSFER Transfer) (agent ?TRANSFER ?AGENT) (patient ?TRANSFER ?PATIENT)) (not (equal ?AGENT ?PATIENT)))

● Use argument type signatures to define variable sorts

(domain agent 2 Agent)(domain patient 2 Object)

38

Page 39: Sigma Knowledge Engineering Environment

TPTP Syntax Translation(forall (?REL ?OBJ ?PROCESS) (=> (and (holds_3__ instance ?REL CaseRole) (holds_3__ instance ?OBJ Object) (holds_3__ ?REL ?PROCESS ?OBJ)) (exists (?TIME) (holds_3__ overlapsSpatially (apply_3__ WhereFn ?PROCESS ?TIME) ?OBJ))))

fof(name,axiom, ! [V_REL,V_OBJ,V_PROCESS] : ( ( holds_3__(s_instance,V_REL,s_CaseRole) & holds_3__(s_instance,V_OBJ,s_Object) & holds_3__(V_REL,V_PROCESS,V_OBJ) ) => ? [V_TIME] : holds_3__(s_overlapsSpatially, apply_3__(s_WhereFn,V_PROCESS,V_TIME),V_OBJ) )).

39

Page 40: Sigma Knowledge Engineering Environment

Optimization – Predicate Variable Instantiation

● Instantiate predicate variables to eliminate “holds”

(=> (instance ?REL TransitiveRelation) (forall (?INST1 ?INST2 ?INST3) (=> (and (?REL ?INST1 ?INST2) (?REL ?INST2 ?INST3)) (?REL ?INST1 ?INST3))))

(=> (instance subclass TransitiveRelation) (forall (?INST1 ?INST2 ?INST3) (=> (and (subclass ?INST1 ?INST2) (subclass ?INST2 ?INST3)) (subclass ?INST1 ?INST3))))

40

Page 41: Sigma Knowledge Engineering Environment

Optimization

● Cache transitive relations● (subclass A B) (subclass B C)

– Cache (subclass A C)

41