What a frame-based system is
A frame-based system stores knowledge as frames. A frame is a structured record that describes one thing, such as a type of object, a place or an event. It keeps that thing’s properties in named slots. A system that holds many linked frames can answer questions by looking up what it knows about the thing being asked about.
Marvin Minsky proposed the idea in a 1974 paper, “A Framework for Representing Knowledge.” He wanted a way to represent typical situations, so a program could fill in details it had not been told by assuming what usually happens.
Frame-based systems belong to symbolic AI. People write the structure and the facts into the system, and the system reasons over them. They do not learn patterns from data the way a neural network does, although they can be combined with learned models.
The parts of a frame
A typical frame has a few parts. The table below uses a Dog frame as an example.
| Part | What it does | Example in a Dog frame |
|---|---|---|
| Frame name | Names the thing being described | Dog |
| Slot | A named property | legs, sound |
| Filler | The value stored in a slot | 4, bark |
| Facet | A rule about a slot, such as a default value or the kind of value it accepts | sound defaults to bark |
| Link | Connects frames in a hierarchy | Dog is-a Mammal; Rex is an instance of Dog |
| Attached procedure | Code that runs when a slot is read or changed | none in this example |
Facet names differ from one system to another, so treat the names here as common examples rather than a fixed standard.
The most important links are is-a and instance-of. An is-a link connects a more specific frame to a more general one, such as Dog to Mammal. An instance-of link connects one particular example, such as Rex, to the frame that describes its type.
A worked example: vehicles and bicycles
Suppose a system has three frames:
- Vehicle has slots for wheels (default 4), has-engine (default yes) and owner (empty).
- Bicycle is-a Vehicle. It overrides two slots: wheels is 2, and has-engine is no.
- My bike is an instance of Bicycle. Its color slot is blue.
Now ask the system three questions about My bike.
- How many wheels does it have? The My bike frame has no wheels value, so the system checks Bicycle. Bicycle says 2, so the answer is 2.
- Does it have an engine? Bicycle says no. That overrides the default of yes in Vehicle.
- Who owns it? No frame in the chain names an owner, so the answer is unknown. The system does not say that it has no owner.
The example shows two things frame systems do well. Inheritance lets a frame get values from the more general frames above it. Overriding lets a more specific frame replace a general value.
How the system looks up an answer
Real frame systems differ, but a simplified lookup works like this:
- Check the frame itself for a value in the slot. If one is there, use it.
- If not, follow the is-a or instance-of link to the parent frame and check again. Keep going up the chain.
- If a default is stored along the way, the system can use it.
- If the slot has an if-needed procedure attached, run it to produce a value.
- If none of these gives an answer, report that the value is unknown.
Following links to reach an answer is one simple form of inference. For the broader picture, see types of inference in artificial intelligence.
Defaults, exceptions and attached procedures
Defaults. A frame can say what usually holds. A Bird frame might set can-fly to yes as a default. A Penguin frame that is-a Bird sets can-fly to no. If the system is asked about Pingu, an instance of Penguin, the answer is no, because the more specific frame wins. If the system knows only that Pingu is a bird, it can assume Pingu flies until it learns more.
This is called default reasoning. It is useful, but it brings a difficulty: a conclusion drawn from a default may have to be withdrawn when a new fact arrives.
Attached procedures. Some slots are better computed than stored. A Person frame could have a birth-year slot and an age slot with an if-needed procedure. When the age is requested, the procedure subtracts the birth year from the current year. The value is worked out only when it is needed, so it stays current. An if-added procedure works the other way, running when a value is set. For example, setting a new birth year could update related slots.
Frames compared with other ways to represent knowledge
Frames are one of several knowledge representation approaches in ai. The table below sets the main ones side by side.
| Approach | How it stores knowledge | Strength | Weakness |
|---|---|---|---|
| Frames | Records with slots, defaults and inheritance | Describe typical objects and situations well | Defaults and exceptions can get complicated |
| Semantic networks | Nodes for concepts, with labeled links for relations | Show how concepts connect | Harder to see all of one concept’s properties at once |
| If-then rules | Conditions and conclusions | Easy to follow for expert reasoning | Hard to organize large bodies of knowledge |
| Predicate logic | Formal statements about objects and relations | Precise, and suited to proofs | Can be hard to read at scale |
Frames and semantic networks overlap a lot, and many systems mix the two. For the graph-based approach, see semantic network in artificial intelligence examples. Many frame statements can also be written as logic statements, which is one reason the two are often compared. For the logic side, see first order predicate logic in artificial intelligence examples.
Frames also share ideas with object-oriented programming, such as classes, attributes and inheritance. The difference is mostly in purpose. Frames were built to represent knowledge and reason with it, including defaults and attached procedures. Programming classes are mainly used to organize code.
Where frame-based systems were used
Frame ideas were widely explored in the 1970s and 1980s. A few uses stand out.
- Expert systems. Many early expert systems stored domain knowledge in frames and combined them with rules.
- Language understanding. Researchers used frame-like structures to represent typical situations, such as a visit to a restaurant. A program could then fill in steps that a text left out. Related structures, called scripts, were developed by Roger Schank and Robert Abelson.
- Frame semantics in linguistics. Charles Fillmore’s frame semantics describes word meanings in terms of the situations words evoke, such as buying, selling or giving. FrameNet, a lexical resource built on this idea, is used in language research.
Limits of frame-based systems
Frame systems have real limits. They are a main reason the field moved toward learned models for many tasks.
- Hand-built knowledge. People have to decide the slots, defaults and hierarchy, and then enter the facts. This takes expertise and time.
- Brittleness. When a new case does not fit the template, the system may fail or apply a default that is wrong.
- Hard to maintain. Changing a general frame can affect many specific frames, and each new exception adds complexity.
- No learning on its own. A frame system does not improve from data unless people or other programs add to it. For the learning-from-examples side of the story, see inductive learning in artificial intelligence example.
- Uncertainty. Basic frames store facts, not degrees of confidence. Handling doubt takes extra machinery, which is the subject of symbolic reasoning under uncertainty in artificial intelligence.
Frame-like ideas today
Pure frame-based systems are less common in new projects. Their ideas still appear in several places:
- Object-oriented programming, where classes have attributes and inherit from parent classes.
- Ontologies and knowledge graphs, where concepts have properties and sit in hierarchies.
Some modern systems combine learned models with structured knowledge, though the details vary a lot from one system to another.
Two other meanings of “frame” in AI
The word “frame” has other meanings in AI, and it helps to keep them apart.
- The frame problem is a question from logic-based AI, raised by John McCarthy and Patrick Hayes in 1969. It asks how a system can know which facts remain true after an action, without listing every fact that stays the same. It is a different problem from frame-based systems.
- AI-generated frames are video images made by a model, such as the in-between pictures used to smooth motion in video or games. That is a separate topic from the knowledge-based meaning of frame used in this article.
Key takeaways
- A frame-based system stores knowledge in frames: records with named slots, values and links to other frames.
- Inheritance lets a specific frame reuse values from general ones, and overriding lets it change them.
- Defaults let a system assume what usually holds, and attached procedures compute values when they are needed.
- Frame systems were important in early AI, but they are hand-built and hard to scale, which is why learned models became central for many tasks.