1. Gyanastra
  2. Artificial Intelligence
  3. Knowledge Representation
  4. Semantic Networks Frames and Scripts
Free lesson, no account needed 12 min read 26 practice questions after it
Asked in past papers5 times
  • UGC NET20232016201520142013

Artificial Intelligence · Knowledge Representation

Semantic Networks Frames and Scripts

Overview

This lesson covers structured knowledge representation schemes used in Artificial Intelligence: semantic networks, frames, scripts, and conceptual dependency.
These schemes encode facts and relationships so that a machine can inherit properties, fill defaults, and understand stereotyped situations. The topic belongs to the Knowledge Representation area of the syllabus.
Before studying it, you should know the idea of a graph, class–subclass relationships, attributes and values, and the difference between declarative and procedural knowledge.
The exam tests definitions, matching of representation to knowledge type, inheritance, slot/facet vocabulary, and script components.

Key concepts

  • Knowledge representation is a structured medium for encoding facts, relations, and procedures so that reasoning can be performed.
    A good representation system is judged by four standard desiderata: representational adequacy (can it represent the required knowledge?), inferential adequacy (can it derive new knowledge?), inferential efficiency (can it reason efficiently?), and acquisitional efficiency (can new knowledge be added easily?). “Presentation adequacy” is not one of the standard four.
  • Semantic network: a directed graph whose nodes represent concepts, objects, events, or categories, and whose labelled arcs represent relations between concepts.
    Common links: IS-A (subclass/superclass or instance/class depending on convention), INSTANCE-OF (individual to class), HAS-PART (whole to part), HAS (property), and CAN (ability).
    Meaning is largely given by the pattern of links.
  • Inheritance in a semantic network: properties attached to a general node are inherited by more specific nodes through IS-A links. A value stored on a more specific node overrides one inherited from a more general node.
    Multiple inheritance conflict occurs when a node has two superclasses with conflicting values and no local override; a frame or network must use explicit precedence, local override, or cancellation to resolve it.
  • Frame: a record-like knowledge structure representing a stereotyped object, concept, or situation. A frame contains slots (attributes) and each slot has facets that specify how the slot is filled.
    Standard facets include VALUE (explicit value), DEFAULT (used if no explicit or inherited value), IF-NEEDED (a procedure run when the value is needed and absent), and IF-ADDED (a procedure run when a value is added).
    A slot filler is the value placed in a slot. A procedural attachment or demon is a procedure attached to a slot or frame, such as if-needed or if-added.
  • Frame inheritance: frames are arranged in an IS-A hierarchy. A more specific frame inherits slots from its parent.
    An explicit local value overrides an inherited value; a more specific default overrides a more general default; if no value is present, a default or if-needed procedure may supply one.
    Cancellation means a more specific frame blocks or removes an inherited slot value, often by storing a local value or a cancel marker.
  • Script: a structured representation of a stereotyped sequence of events in a familiar situation, such as visiting a restaurant, going to a doctor, or taking a train.
    A script typically specifies entry conditions (what must be true before the script starts), roles (people involved), props (objects used), scenes (sub-events or stages), tracks (alternative variants of the script), and results (state after the script ends).
    Scripts supply default expectations, so an agent can understand a story even when some steps are omitted.
  • Conceptual Dependency (CD): a representation theory, associated with Schank, that represents the meaning of natural-language sentences using a small set of primitive concepts and rules.
    It is language-independent and canonical: different sentences with the same meaning map to the same CD structure.
    Typical primitives include ATRANS (transfer of possession), PTRANS (physical transfer), MTRANS (transfer of information), INGEST, and PROPEL. CD is not a graph of arbitrary concepts; it uses primitive acts and dependency structures.
  • Declarative knowledge is knowledge of facts and relationships—knowing what. Procedural knowledge is knowledge of how to perform tasks—knowing how. Frames and semantic networks are mainly declarative; procedural attachment adds procedural knowledge to frames.
  • Primitive: a basic, non-decomposable concept or fact. In a rule-based setting, a premise that is not concluded by any rule can be treated as a primitive fact.
  • Taxonomy is a hierarchy of categories and subcategories. Ontology is a formal specification of concepts, relations, and constraints in a domain. Both rely on inheritance.
  • Slots and facets are used in frames. A slot is the attribute name; a facet describes how the slot’s value is obtained or used.

How it works

  1. Build a semantic network. Identify the concepts to be represented and make each concept a node.
    Add labelled arcs for relations: use IS-A for class/subclass links, INSTANCE-OF for an individual and its class, and HAS-PART for whole–part links. Attach properties to the most general node where they belong.
  2. Apply inheritance. When a node needs a property, search its local slots first. If absent, follow IS-A links upward. The nearest explicit value wins.
    If two parents give conflicting values, use a stated precedence rule, a local override, or cancellation; otherwise the network is ambiguous.
  3. Build a frame. Create a frame for each class or stereotyped object. List its slots.
    Fill facets: VALUE for an explicit fact, DEFAULT for a usual value, IF-NEEDED for a procedure that computes a value on demand, and IF-ADDED for a procedure triggered when a value is stored. Link frames by IS-A.
  4. Instantiate a frame. Create an instance frame for a particular object. Fill only the slots that differ from the class frame. Inherited slots are looked up along the IS-A chain.
    A more specific explicit value overrides a more general value; a more specific default overrides a more general default; if no value is found, use DEFAULT or run IF-NEEDED.
  5. Represent a script. Define entry conditions, roles, props, scenes, tracks, and results.
    For a restaurant script, roles include customer and waiter; props include table, menu, food, and bill; scenes include entering, ordering, eating, paying, and leaving.
    During story understanding, instantiate the script, bind roles to characters, and fill missing steps from default expectations.
  6. Use conceptual dependency. Map a sentence to primitive acts and dependency relations. Different English sentences with the same meaning should produce the same CD structure.
    Use inference rules over primitives to derive implicit information.

The diagram shows an IS-A hierarchy. Tweety is an instance under Penguin. Tweety inherits “wings yes” from Bird, but inherits “flies no” from Penguin because Penguin overrides Bird’s default. Polly inherits “flies default yes” from Bird.

Figure. Notice the hierarchy from Animal through Bird to specific birds, and the attached slots: Bird has wings and default flies, Penguin has flies no and swims yes, Tweety has color yellow.

Worked examples

Example 1 — semantic network inheritance.
A network has: Animal; Bird IS-A Animal; Penguin IS-A Bird; Tweety INSTANCE-OF Penguin. Slots: Bird has wings = yes; Bird has flies = DEFAULT yes; Penguin has flies = no; Animal has breathes = yes. What are Tweety’s values for wings, flies, and breathes?

  1. Tweety inherits from Penguin, then Bird, then Animal.
  2. Penguin stores an explicit flies = no, which overrides Bird’s default yes.
  3. Bird stores wings = yes, inherited by Penguin and Tweety.
  4. Animal stores breathes = yes, inherited down the chain.
    Final answer: wings = yes, flies = no, breathes = yes.

Example 2 — frame facets and default override.
A frame for Bird has slot flies with facet DEFAULT = yes. Penguin IS-A Bird and has flies with facet VALUE = no. Tweety IS-A Penguin and has no local flies slot. Under the convention that a more specific explicit value overrides an inherited default, what is Tweety’s flies value?

  1. Look for a local value on Tweety: none.
  2. Move to Penguin: Penguin has explicit VALUE = no.
  3. This explicit value overrides Bird’s DEFAULT = yes.
    Final answer: flies = no.

Example 3 — multiple inheritance conflict and cancellation.
Car IS-A Vehicle and has wheels = 4. Boat IS-A Vehicle and has wheels = 0. AmphibiousCar IS-A Car and IS-A Boat, with no local wheels slot. What is AmphibiousCar’s wheels value under simple inheritance?

  1. AmphibiousCar inherits from Car: wheels = 4.
  2. It also inherits from Boat: wheels = 0.
  3. The two parents are siblings, so neither is more specific than the other. Simple inheritance gives a conflict.
  4. A frame system must resolve this by an explicit local value, an explicit precedence rule, or cancellation of one inherited value.
    If AmphibiousCar has a local slot wheels VALUE = 4, the answer is 4.
    If it has a cancel marker for Boat’s wheels, the Car value wins. Without any such mechanism, the value is ambiguous.
    Final answer: conflict; resolved only by local override, precedence, or cancellation.

Example 4 — match-the-list style.
Match List-I with List-II. List-I: A. Semantic network, B. Frame, C. Script, D. Conceptual dependency. List-II: i. graph with nodes and labelled arcs; ii. record-like slots and slot values; iii. stereotyped event sequence; iv. primitive concepts and rules for natural language.

  1. Semantic network is a graph, so A–i.
  2. Frame stores knowledge in record-like slots and values, so B–ii.
  3. Script represents a stereotyped event sequence, so C–iii.
  4. Conceptual dependency uses primitive concepts and rules for natural language, so D–iv.
    Final answer: A–i, B–ii, C–iii, D–iv.

Comparison

RepresentationStructureBest suited forKey vocabulary
Semantic networkDirected graph with concept nodes and labelled arcsGeneral concept relations and inheritanceIS-A, INSTANCE-OF, HAS-PART, inheritance
FrameRecord-like structure with slots and facetsObjects, classes, stereotyped situations, default valuesslot, facet, VALUE, DEFAULT, IF-NEEDED, IF-ADDED
ScriptStructured event sequence with scenes and rolesStereotyped event sequences such as restaurant visitsentry conditions, roles, props, scenes, tracks, results
Conceptual DependencyPrimitive acts and dependency structuresMeaning of natural-language sentencesprimitive concepts, ATRANS, PTRANS, MTRANS
Link or termMeaningTrap
IS-ASubclass to superclass, or sometimes instance to class depending on conventionDo not reverse: subclass inherits from superclass
INSTANCE-OFIndividual to its classAn individual inherits class properties but is not itself a class
HAS-PARTWhole to partNot inheritance; parts are not subclasses
VALUE facetExplicit slot valueBeats an inherited value
DEFAULT facetUsed only if no explicit or inherited value appliesMore specific default can override more general default
IF-NEEDEDProcedure run when value is needed and absentProcedural attachment, not a stored fact
IF-ADDEDProcedure run when a value is addedTriggered by storage, not by retrieval
CANCELBlocks an inherited slot valueUsed to resolve or stop inheritance
Declarative vs proceduralMeaningExample
Declarative knowledgeKnowing what“Birds have wings”
Procedural knowledgeKnowing howA procedure to compute a bill or run IF-NEEDED

Revision summary

  • Script = stereotyped event sequence;
    Frame = record with slots/facets;
    Semantic network = graph;
    Conceptual Dependency = primitives.
  • A stereotyped situation such as a restaurant visit is represented by a script.
  • In a semantic network, nodes are concepts and arcs are relations; do not reverse them.
  • IS-A gives inheritance; INSTANCE-OF links an individual to a class; HAS-PART is whole–part.
  • More specific overrides more general; explicit VALUE beats DEFAULT.
  • Slots and facets belong to frames; common facets are VALUE, DEFAULT, IF-NEEDED, IF-ADDED, CANCEL.
  • Script components: entry conditions, roles, props, scenes, tracks, results.
  • Good knowledge representation needs representational adequacy, inferential adequacy, inferential efficiency, acquisitional efficiency; “presentation adequacy” is not standard.
  • Multiple inheritance with conflicting values is ambiguous unless a local override, precedence rule, or cancellation resolves it.
  • Conceptual Dependency represents natural-language meaning using primitive concepts and rules, not arbitrary graph links.
  • Declarative knowledge is knowing what; procedural knowledge is knowing how.

Previous-year exam insights

  • Direct definition questions ask which representation is a graph, which uses slots and facets, and which represents a stereotype situation.
    Check the exact structure before choosing.
  • Match-the-list questions pair representation names with descriptions.
    Learn one signature phrase for each: graph, record-like slots, stereotyped event sequence, primitive concepts for natural language.
  • Statement I/II questions test inheritance: a more specific value overrides a general value; defaults fill only when no explicit value is available; scripts supply omitted default steps.
  • Assertion–reason questions test whether inheritance and default reasoning are correctly explained.
    The reason must explain the assertion, not merely be true.
  • Numeric or two-step inheritance questions ask for the value of a slot after walking up a frame hierarchy.
    Always check local value, nearest inherited explicit value, then default.
  • Traps include reversing nodes and arcs in a semantic network, confusing IS-A with INSTANCE-OF, treating HAS-PART as inheritance, and calling a frame a script.
  • For frame questions, distinguish slot from facet: slot is the attribute; facet says how the value is obtained or used.
  • For script questions, check entry conditions and results; a script can infer missing steps because it supplies default expectations.

Practice at PARIKSHA

You are ready for the PARIKSHA tests of this sub-topic when you can:

  • Define semantic network, frame, script, and conceptual dependency in one precise line each.
  • Draw a small IS-A hierarchy and trace inherited values down the chain.
  • Explain why a more specific value overrides a more general value.
  • Resolve a simple multiple inheritance conflict using local override or cancellation.
  • List and distinguish the frame facets VALUE, DEFAULT, IF-NEEDED, and IF-ADDED.
  • Name all standard script components and use them to fill omitted steps in a familiar story.
  • Match each representation to its best-suited knowledge type without confusing frame and script.
  • Explain why “presentation adequacy” is not one of the four standard desiderata for a knowledge representation system.
  • Answer statement-type and assertion–reason questions on inheritance, defaults, and script expectations.

Attempt the sub-topic test first, then the subject test.

Pages 1–2 of 2