1 / 28

Semantic Networks

Semantic Networks. CIS 479/579 Bruce R. Maxim UM-Dearborn. Decomposition. Most complex sets of objects can be decomposed into smaller subsets These decompositions often contain two types of relations “isa” and “ispart” dog isa pet isa animal isa living thing

Download Presentation

Semantic Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Semantic Networks CIS 479/579 Bruce R. Maxim UM-Dearborn

  2. Decomposition • Most complex sets of objects can be decomposed into smaller subsets • These decompositions often contain two types of relations “isa” and “ispart” dog isa pet isa animal isa living thing finger ispart hand ispart body

  3. Inverse Relations • Sometimes it is also useful to define inverse relationships “ako” (a kind of) as inverse of “isa” “haspart” as inverse of “ispart” dog ako pet ako animal ako living thing finger haspart hand haspart body

  4. Inheritance • These relations form a partial ordering of the network • This allows us to use transitivity relations to aid in search • Storage of information is more efficient since inheritance can be used to “copy” information from a class to its subclasses

  5. Abstraction • Choosing a level of abstraction can be tricky since you need to use between a small number of low-level primitives or a large number of broader labels • Advantage of low-level primitives • allows inferences rules to be written very succinctly • not concerned with the many ways that knowledge may have appeared orginally

  6. Abstraction • Disadvantages of low-level primitives • takes a lot of work to convert each high level fact to its primitive form • simple high-level facts require lots of storage when broken down into primitives • not always clear which low-level primitives are important (e.g. how do you reperesnt cousin using primitives like mom, dad, son, daughter)

  7. Finding the Right Knowledge Structures • How do you perform an initial selection of the most appropriate structure? • How do you fill in appropriate details from current situation? • How do you find a better structure if the first one chosen turns out to be bad? • What do you do if none of the available structures is appropriate? • When do you create and remember a new structure?

  8. Semantic Networks • A declarative representation in which complex entities are described as collections of attributes and associated values • Sometimes called a “slot and filler” type structure • To assist in there implementation AI languages provide for some type of associative memory in which object can be stored as OAV triples

  9. OAV Triples in Lisp • An object could be represented using a symbol and its attributes and values could be stored as properties (putprop ‘dog ‘animal ‘isa) • Most likely the “isa” property would contain a list of classes that “dog” belongs to

  10. Associative Memory • Takes lots of storage • It is fast and very flexible • These links are one way only • Inverse links need to be defined individually (putprop ‘animal ‘dog ‘ako)

  11. Associative Memory • To maintain a list of facts efficiently would require definition of operations like Add-to-set Add-to-superset Add-to-subset

  12. Animal Hierarchy

  13. Searching Hierarchy ; is “x” realted to “y” with “n” or fewer links (defun isatest (x y n) (cond ((eq x y) T) ((zerop n) nil) ((member y (get x ‘isa)) T) (T (any mapcar #’lambda (xx) (isatest xx y) (1– n)) (get x ‘isa)))) (defun any (lst) (cond ((null lst) nil) ((car lst) T) (T (any (cdr lst))))

  14. Semantic Nets • How do semantic networks differ from ordinary directed graphs? • In semantic networks there must be some underlying meaning associated with the representation (especially the edge or link labels)

  15. Semantic Network has has feathers wings bird isa isa eagle falcon

  16. Semantic Nets in C++

  17. Inheritance

  18. Value Inheritance Form a queue consisting of node F and all class nodes found in F’s “isa” slot Until queue is empty or value found if queue front has value in slot S then value found else remove first queue element and add nodes related by “isa” slot If value found then report value found in slot S else announce failure.

  19. Inheritance • Some people prefer to create a special link (e.g. “instance”) to distinguish between instances and classes • How do you deal with exceptions (e.g. Jumbo has 1 tusk)? • One strategy is to record the exception on the instance node and only record instances that apply to class members on the class nodes

  20. Comparisons • Sometimes difficult to represent unambiguously (e.g. is Dumbo inferior to Jumbo or does he weigh less) Dumbo Jumbo weight weight less than 1.5 tons 2 tons

  21. If-needed Inheritance • Rather than checking for a value in a slot, there may be times when a procedure would be called if needed • For example, you would rarely store all three values (mass, volume, and density) on a node since one value could be computed from the other two

  22. If-needed Inheritance Form a queue consisting of node F and all class nodes found in F’s “isa” slot Until queue is empty or if-needed procedure found if procedure exist and value produced then value found else remove first queue element and add nodes related by “isa” slot If procedure found then report value found for F’s slot S else announce failure.

  23. Default Inheritance • Sometimes it is reasonable to reduce the search time by include default facets for slots • This may need to happen when knowledge needed to compute a value is missing or uncertain

  24. Default Inheritance Form a queue consisting of node F and all class nodes found in F’s “isa” slot Until queue is empty or value found if queue front has default value for S then value found else remove first queue element and add nodes related by “isa” slot If value found then report default value found for slot S else announce failure.

  25. N Inheritance • Use value inheritance procedure to search entire network • Use if-needed inheritance procedure to search entire network • Use default inheritance procedure to search entire network

  26. Z Inheritance • General inheritance algorithm is used • At each of the three facets are examined in the order: value, if-needed, and default

  27. Semantic Net Considerations • Which slot facets (value, if-neede, default) are to be used? • Which inheritance strategies (if any) are to be used? • Is the use of perspectives needed? (i.e. block from toy perspective versus block from construction perspective)

  28. Problems with Semantic Nets • When do you have enough semantic primitives? • How do you know the selected primitives are correct? • What is the smallest number of link types needed to span all human knowledge? • How do you represent quantified knowledge?

More Related