Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group OntoMorph: A Translation System for Symbolic Knowledge Hans Chalupsky Loom/PowerLoom Group USC.

Similar presentations


Presentation on theme: "1 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group OntoMorph: A Translation System for Symbolic Knowledge Hans Chalupsky Loom/PowerLoom Group USC."— Presentation transcript:

1 1 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group OntoMorph: A Translation System for Symbolic Knowledge Hans Chalupsky Loom/PowerLoom Group USC Information Sciences Institute

2 2 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Overview Motivation Translation Problem OntoMorph Overview OntoMorph Applications Conclusions

3 3 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Motivation Observations  Ontology development collaborative but independent  Repeated merges/imports are the norm  Different tasks solved using different KR systems  different syntax, knowledge models, expressivity  Different tasks require different modeling styles Translation problem is ubiquitous  Merging of semantically overlapping ontologies  Distributed heterogeneous agent communication  Integration of independently developed K-based systems  Porting of K-based systems to different KR infrastructure

4 4 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Some Opinions “We need standards, KIF, OKBC, HPKB upper structure, etc. to minimize translation needs….” “We’ll never decide on that standard representation language, everybody has their own favorite…” “People will hack through any representation available…” “We better learn to live in a world where everybody represents things differently…” “What’s the big deal, I can write any X-to-KIF translator in 5 Prolog clauses/minutes” “Writing translators is not really difficult…” Sound familiar?

5 5 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group The Translation Problem Source KB Target KB   KBs describable in some linear syntax  sentence-based translation  single expression to whole KB  arbitrary semantic shift allowed  morphing

6 6 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Translation Dimensions KR language syntax  KIF, Loom, PowerLoom, MELD, SNePS, OntoLingua, … KR language expressivity  quantification, negation, defaults, sets, modals,... Modeling conventions  class distinction vs. attribute relations, argument order, argument reification, naming conventions,... Model coverage and granularity Representation paradigms  time, action, plans, causality, propositional attitudes,... Inference system bias  collections vs. individuals, subclass-of vs. =>,...

7 7 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Example: Syntax Differences Loom: (defconcept Automobile “The class of passenger cars.” :is-primitive Road-Vehicle) MELD: (#$isa #$Automobile #$Collection) (#$genls #$Automobile #$RoadVehicle) (#$comment #$Automobile “The class of passenger cars”) KIF: (defrelation Automobile (?x) “The class of passenger cars” :=> (Road-Vehicle ?x))

8 8 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Example: Model Differences Ontology AOntology B Vehicle WheeledVehicleTrackedVehicle M60M1HMMWVM151 (AngleRange -60 45) maxSlopeRange Automotive-Device tracked traction-type M-1 M-151 traction-type wheeled 45 max-gradient

9 9 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Traditional Translation Methods Manual translation is  slow  tedious  error-prone  hard to repeat  hard to document and trace  often simply not practical Special-purpose translators are  tedious to write  hard to maintain  not easily reusable

10 10 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Need: Translation Tool Desiderata:  Translate arbitrary KR languages  No fixed knowledge model  Concise, declarative specification of transformations  Support for automatic, repeatable translations

11 11 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Solution: OntoMorph Rapid and concise specification of KB translators  via Syntactic rewriting  pattern-directed rewrite rules  sentence-level transformation of syntax trees  based on pattern matching Semantic rewriting  modulates syntactic rewriting  uses integrated PowerLoom KR system  based on (partial) semantic models  uses logical inference

12 12 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group OntoMorph Rewrite Engine Pattern language and execution model similar to PLisp (Pattern Lisp), Lisp-70 Pattern Matcher Features  Rapid generation of ontology and KR language translators  Rewrites arbitrary syntax trees  Powerful pattern language for concise specification and destructuring of expressions  Full backtracking (can parse Type-0 languages)  Named rule sets provide modularization and search control  Seamless integration with PowerLoom facilitates semantic rewriting  Available in Lisp, C++ and Java (written in STELLA)

13 13 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Pattern Language Literals match themselves:  foo, hans, 2, (a (b c) d), etc. Variables match complete subtrees:  ?x, ?bar, ? Sequence variables match tree subsequences:  (??x foo ??y), ?? Grouping (AND) matches a sequence of tokens:  {a ?x c} Alternatives (OR) match alternative token sequences:  {a|(b ?x)|c d} Optionals match optional token sequences:  {a [b c]}

14 14 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Pattern Language, cont. Repetition matches a pattern multiple times:  {a|b}+, {a|b}*1-2 Binding input matched by a pattern to a variable:  ?x := {a|(b ?y)|c} matched against (b d) binds ?x to (b d).

15 15 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Example Pattern Match key-value pairs in any order: (defconcept ?name {?is := {:is | :is-primitive} ?def | :characteristic ?cha | :annotations ?ann := {(documentation ?doc) | (:and ?? (documentation ?doc) ??) | ?}}*0-3) Example pattern instance: (defconcept Dog :annotations (:and Object-Type (documentation “Canine”)) :is-primitve Animal)

16 16 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Basic Operation Rewrite Rule Syntax pattern => result Execution Model Example Rule: (isa ?i ?c) => (?c ?i) Input stream: ( isa car1 Ford ) ( speed car1 ………

17 17 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Basic Operation Rule Syntax pattern => result Execution Model Example Rule: (isa ?i ?c) => (?c ?i) Input stream: ( isa car1 Ford ) ( speed car1 ………

18 18 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Basic Operation Rule Syntax pattern => result Execution Model Example Rule: (isa ?i ?c) => (?c ?i) Input stream: ( Ford car1 ) ( speed car1 ………

19 19 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Named Rule Sets and Recursion Rule Set Syntax (defruleset name pattern 1 => result 1... pattern N => result N ) Function calls and rule recursion  Rule sets and functions can be invoked recursively  Arguments are consumed and results pushed back onto the input stream. { ?result}

20 20 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Rewrite Rule Example Rule definition: (defruleset Term (?op := {\+|-|\*|/} ?x ?y) => (?op ) (1\+ ?x) => (\+ 1) (1- ?x) => (- 1) (square ?x) => (\* ) ?x => ?x ) (defruleset Condition (lt ?x ?y) => (negative? (- )) (gt ?x ?y) => ) Rule application: (rewrite (gt (/ (1+ M) N) (square N)) Condition) => (negative? (- (* N N) (/ (+ M 1) N)))

21 21 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Rewrite Rule Example: Turing Machine (defruleset Turing (?p := (??x (?s ?h ?act ?ss) ??y) ?s (?l ?h ?r)) => )> (?prog ?state ((??l) ?h (??r))) => (??l ?h ??r) ) (defruleset Move-Head {R ((??l) ?h ())} => ((??l ?h) $ ()) {R ((??l) ?h (?r ??rt))} => ((??l ?h) ?r (??rt)) {L (() ?h (??r))} => (() $ (?h ??r)) {L ((??lt ?l) ?h (??r))} => ((??lt) ?l (?h ??r)) {?new (?l ?h ?r)} => (?l ?new ?r) ) Compute f(x) = x + 2: (rewrite ( ((s1 $ R s2) (s2 1 R s2) (s2 $ 1 s3) (s3 1 R s3) (s3 $ 1 s1)) s1 (() $ (1 1 1)) ) Turing) => ($ 1 1 1 1 1)

22 22 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Semantic Rewriting Syntactic rewriting very useful but limited: (defruleset Conflate-Truck-Types ({Light-Truck | Heavy-Truck |... } ?x) => (Truck ?x) ) Instead, use semantic test: (defruleset Conflate-Truck-Types {(?class ?x) } => (Truck ?x) ) Semantic rewriting via integration with PowerLoom KRS

23 23 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Two-Pass Translation Scheme Target KB Translation Rules PowerLoom KB Import Rules Source KB Pass 1: Pass 2:

24 24 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Rewriting Non-Lisp-Style Expressions Lisp-style s-expressions for tree representation. Rewriting not limited to Lisp-style languages. Rewrite engine operates on input stream of tokens. Currently, STELLA reader serves as tokenizer. Other tokenizers can easily be substituted. Rewrite engine could specify tokenizers.  special-purpose tokenizers will be much more efficient.

25 25 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group OntoMorph Application: Input Translation for COA Critiquer

26 26 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Input Translation for COA Critiquer OntoMorph

27 27 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Fusion Output to EXPECT: Translation Issues Different Names (defruleset Rename-Collection FixMilitaryTask => FIX {ProtectingSomething | Protecting…Region} => PROTECT Translation-LocationChange => MOVE … … …)

28 28 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Fusion Output to EXPECT: Translation Issues cont. Different Syntax: MELD/KIF => Loom  (isa task1 Fix-MilitaryTask) => (Fix task1)  (isa COAMt COASpecificationMicrotheory) => (COA COAMt)  (relationInstanceExistsCount subOrgsDirect unit1 ArmoredSpec) => (:about unit1 (:exactly 2 subOrgsDirect ArmoredSpec)) (defruleset Rewrite-Frame-Predicate (relationInstanceExistsCount ?rel ?inst ?type ?count) => (:ABOUT (:EXACTLY ?count )) )

29 29 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Fusion Output to EXPECT: Translation Issues cont. Different Representations  (taskHasPurpose BlueDivisionTask (thereExists ?p (isa ?p (CollectionSubsetFn ProtectingSomething (TheSetOf ?obj (and (objectTakenCareOf ?obj Boundary1) (performedBy ?obj BlueDivision1))))))) => (and (Protect protect-000) (Purpose-Action Protect-000) (purpose-of BlueDivisionTask Protect-000) (action-obj Protect-000 Boundary1) (who protect-000 BlueDivision1))

30 30 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Fusion Output to EXPECT: Translation Issues cont. (defruleset Rewrite-Purpose-Pattern1 {(taskHasPurpose ?task (thereExists ?var (isa ?var (CollectionSubsetFn ?type (TheSetOf ?action ?body))))) ?purpose} => (AND ( ?purpose) (PURPOSE-ACTION ?purpose) (PURPOSE-OF ?task ?purpose) )

31 31 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Fusion Output to EXPECT: Translation Issues cont. Missing Representations  Some COA structure was not explicitly represented  EXPECT critiquer needed task / subCOA associations  Some essential COA structure was embedded in comments (defruleset Track-COA-Assertion (unitAssignedToTask ?task ?unit) => ) (defruleset Get-Task-Assigned-To-Unit {?unit ?task} => )

32 32 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Fusion Output to EXPECT: Summary File-based translation of Fusion output - MELD to KIF to Loom Required ~30 rewrite rule sets Tree destructuring capability very useful for rewriting complex purpose representations Semantic rewriting needed to recover unrepresented COA structure

33 33 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Translation between Distributed Heterogeneous Agents

34 34 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Rosetta Translation Service Domain Model Operators PLANET Plan Ontology (HPKB) Agent Capabilities Ontology Agent Model Agent Models Mapping KB Operators Domain Model Rosetta CoABS Grid Agents a1 aN a2 a1 a2 aN M

35 35 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Rosetta Translation Service Agent2 Wrapper Agent1 Wrapper Rosetta KB of representation reformulation rules Requested service by Agent1 Capability of Agent2 Agent1 model Capabilities/ requests Agent2 model Capabilities/ requests

36 36 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group ForMAT to Prodigy Translation via Rosetta ForMAT request: (:goal (G-144 :send-hawk ((force 42nd-Hawk-Battalion) (geographic-location Big-Town)))) Format-To-Rosetta translation: (find (object Plans) (for (Objective-Based-Goal (send-unit (object 42nd-Hawk-Battalion) (to Big-Town))))) Rosetta goal representation translation: (find (object Plans) (for (State-Based-Goal (is-deployed (object 42nd-Hawk-Battalion) (at Big-Town))))) Rosetta-To-Prodigy translation: (:find-plans (is-deployed 42nd-Hawk-Battalion Big-Town))

37 37 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Using Rosetta with CoABS TIE 1: Ontology-Based Transformations Without Rosetta: helicopter wrappers had to turn route segments into areas and issue query in SQL message sent: :content select distinct s.LAT, s.LON from SAMSITE s where s.LAT 29.355 and s.LON 48.011 :receiver ARIADNE_TEAMCORE :sender TEAMARIADNE With Rosetta: helicopter wrappers form request using route segments message sent: :content find SAMSITES from DP_A to LZ_A :sender TEAMARIADNE :receiver Rosetta Problem: Diverse views and languages (e.g., helicopters had segments, SAMSITE finder queried with SQL about regions)

38 38 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group Conclusion Translation is a common problem with K-based systems OntoMorph tool makes it easier to write translators OntoMorph applications so far:  Within HPKB to translate Fusion output  Within CoABS/HPKB TIE to implement Rosetta ontology-based agent translation services (joint work with Y. Gil and J. Blythe) Future Work  Develop library of operators to support common transformations  Semi/Automatic generation of translators (some related work in database integration community, but larger schemas, higher expressivity, inconsistency, etc.)  Rewrite rule compiler


Download ppt "1 USC INFORMATION SCIENCES INSTITUTE Loom/PowerLoom Group OntoMorph: A Translation System for Symbolic Knowledge Hans Chalupsky Loom/PowerLoom Group USC."

Similar presentations


Ads by Google