Frame (artificial intelligence)
A boy kicks a ball. Most people hearing that sentence picture a particular ball, probably a familiar soccer ball, rather than an abstract ball with no attributes. Frames in artificial intelligence were built on that habit of mind.
Marvin Minsky proposed frames in his 1974 article "A Framework for Representing Knowledge". A frame is a data structure that divides knowledge into substructures by representing "stereotyped situations". It fills in expected details before anyone supplies them.
Why would a machine need to guess at details nobody told it? What should happen when the guess turns out to be wrong? And how did a 1970s idea about everyday expectations end up influencing both the way software is written and the way the web might one day be organized?
A single frame carries instructions for its own use. It records how the frame should be used, what to expect next, and what to do when those expectations are not met.
Some of the information in a frame generally stays unchanged, while other information is stored in "terminals" that usually change. Terminals can be thought of as variables. Top-level frames hold information that is always true about the problem at hand, but terminals do not have to be true. Their values may change as new information arrives, and different frames may share the same terminals.
Each piece of information about a frame sits in a slot. A slot can hold facts or data, values called facets, or procedures, which are also called procedural attachments. It can hold default values, either for data or for procedures, and it can point to other frames or subframes. Two named procedures are IF-NEEDED, which defers evaluation until a value is wanted, and IF-ADDED, which updates linked information.
Russell and Norvig's textbook Artificial Intelligence: A Modern Approach describes structural representations as ones that assemble "facts about particular object and event types and arrange the types into a large taxonomic hierarchy analogous to a biological taxonomy". Frames were originally derived from semantic networks, so they count as structure-based knowledge representations. They are the primary data structure of AI frame languages, where they are stored as ontologies of sets.
The easiest way to watch all of this working is to meet a boy named Alex.
Alex lives at 100 Main St., has the birthdate 8/4/2000, and likes spaghetti. He climbs trees and has a wiry build. His frame names Boy as its parent frame, which makes him an instance of that more general type.
Alex's age is not stored anywhere. An IF-NEEDED procedure works it out by subtracting his birthdate from the current date. His sex, male, is inherited from Boy, and Boy in turn descends from a Person frame. The Boy frame limits age to under 12 years and sets the number of legs to a default of 2, inherited from Person.
Alex, however, has 1 leg. His frame records that as an exception, and the representation absorbs it without strain. This is a strength of frames over semantic networks, which do not allow exceptions in particular instances. The flexibility lets frames reflect real-world phenomena more accurately.
A Monkey frame, whose parent is Primate, sits beside Boy. It defaults its habitat to jungle and its favorite food to bananas. Because the slots carry similar names, a program can compare a boy and a monkey with almost no effort. That easy analogical reasoning is much prized in any intelligent agent.
Inheritance does further work. When a value is given to a slot that subframes inherit, it is updated into the matching slots through IF-ADDED, and new instances then feature that value as the default. Frames can also be queried by spreading activation, as semantic networks can. Given a set of frames, a semantic network can even be generated, though it lacks explicit arcs.
Monkey's sex slot is a procedural attachment that accepts either of two values, Male or Female.
Psychological research going back to the 1930s suggested that people use stored, stereotypical knowledge to interpret and act in new situations. Early work on frames was inspired by that finding. Minsky first used the term Frame as a paradigm for understanding visual reasoning and natural language processing.
In those problems, even the smallest case has an enormous space of possible solutions. Extracting phonemes from a raw audio stream is one example. Detecting the edges of an object is another. Tasks that seem trivial to humans turn out to be quite complex, and researchers probably did not grasp how hard they were until they tried to make computers solve them.
The initial notion was that a frame, also called a Script, would establish the context for a problem and so shrink the search space automatically. Schank and Abelson adopted the idea to show how an AI system could process common human interactions, such as ordering a meal at a restaurant. Each interaction became a frame with slots storing relevant information. Slots often had default values but still needed refining each time the scenario ran. A task began from a basic instance of the frame, and its values were then filled in and adjusted.
Frames were arranged in hierarchies, much like object classes. A basic frame might cover ordering at a restaurant. One instance of it would be Joe goes to Dairy Queen. A specialization, ordering at a fancy restaurant, would inherit the defaults but add slots or change values such as the expected price range.
A parallel effort began in linguistics. In the mid-1970s Charles J. Fillmore started working on his theory of frame semantics, motivated by reflections on human language and cognition. It later led to computational resources like FrameNet.
Minsky's own work, by contrast, generally lacks references to Noam Chomsky and his generative grammar of 1950.
Ron Brachman wanted something different from the psychologists. Much of the early frame research, including that of Schank and Abelson, was driven by experimental psychology. Those researchers cared less about mathematical formality, because they believed formalisms were not necessarily good models of how the average person thinks. The way humans use language, for example, is often far from truly logical.
Brachman and others wanted to give AI researchers the mathematical formalism and computational power associated with logic. Their aim was to map frame classes, slots, constraints, and rules onto set theory and logic. One benefit was that models could be validated, and even created, automatically with theorem provers and other automated reasoning tools. The drawback was that a model could be harder to specify in the first place in a language with formal semantics.
This split illustrates a classic divide in AI research known as "neats vs. scruffies". The neats valued mathematical precision, achievable through First Order Logic and Set Theory. The scruffies preferred representations that were intuitive and psychologically meaningful to humans.
The most notable formal approach was the KL-ONE language. Its formal semantics gave frame languages a new kind of automated reasoning, known as the classifier. The classifier is an engine that analyzes declarations such as the definition of sets, subsets, and relations. It can deduce additional relations and detect when parts of a model contradict each other. Many tasks that a forward or backward chaining inference engine would normally perform can be handled by the classifier instead.
The same divide later surfaced in Semantic Web research. It ended in the Linking Open Data community, whose focus was on exposing data on the Web rather than modeling it.
Set a table of frame terminology beside object-oriented terminology, and the two vocabularies line up almost term for term. A frame corresponds to an object class. A slot corresponds to an object property or attribute. A trigger corresponds to accessor and mutator methods, and a method in a frame language, as in Loom or KEE, is simply a method.
The design goals differed. Frames aimed at explicit and intuitive representation of knowledge, while objects aimed at encapsulation and information hiding. Frames came out of AI research and objects mostly out of software engineering. In practice their techniques overlap significantly. As the technologies moved from academic labs to the commercial world, developers cared little about philosophical issues. They took the best ideas from either camp. Both paradigms wanted to shrink the distance between real-world concepts and their software implementation, and both arranged primary objects in taxonomies running from very general types to more specific ones.
Encapsulation was the major point of difference. For object-oriented programming it was one of the most critical requirements, driven by the need to reduce interactions between components and so manage large, complex systems. Everything is controlled by methods and their visibility. Reading a property value, for instance, must go through an accessor method, which can validate the data type and constraints.
Frame languages cared less about that requirement than about offering a vast array of tools for rules, constraints, and programming logic. A trigger, which is procedural code attached to a slot, could fire before or after a value was set or retrieved. Rules could manage the same constraints. Slots could also be augmented with facets carrying constraint information.
Multiple inheritance, which lets a frame or class have two or more superclasses, was another dividing line. Frame languages required it, since human conceptualizations of the world seldom fall into rigid, non-overlapping taxonomies. Many object-oriented languages, especially in later years, preferred or required single inheritance. Multiple inheritance was seen as a possible step during analysis that should be eliminated in design and implementation, to protect encapsulation and modularity.
Early frame languages such as KRL had no message passing, but developer demand led later ones, including Loom and KEE, to add messages on frames. Standards on the object side eventually supplied equivalent functions. The Object Management Group standardized specifications for associating test data and constraints with objects, which parallels the common uses of facets, and for integrating rule engines.
The earliest frame-based languages were custom developed for specific research projects, and nobody packaged them as tools for other researchers. As with expert system inference engines, researchers soon saw the value of extracting the core infrastructure into general-purpose frame languages not tied to a single application. KRL was one of the first. KL-ONE was one of the most influential early languages, and it spawned several successors. One of the most widely used was Loom, developed by Robert MacGregor at the Information Sciences Institute.
During the 1980s, expert systems made artificial intelligence a subject of great interest in the business world. That led to many commercial products for building knowledge-based systems. They were usually written in Lisp and combined IF-THEN rules for logical reasoning with frame hierarchies for representing data.
One of the best known was the Knowledge Engineering Environment, or KEE, from Intellicorp. KEE offered a full frame language with multiple inheritance, slots, triggers, and default values. It also had a rule engine that supported backward and forward chaining. Like most early commercial AI software, KEE was first deployed in Lisp on Lisp machine platforms, and it was eventually ported to PCs and Unix workstations.
A much smaller example of a frame language at work is the Friend of A Friend ontology, known as FOAF. It was defined as part of the Semantic Web as a foundation for social networking and calendar systems. Its primary frame is a Person, with slots such as email, home page, and phone. Additional frames describe the space of business and entertainment domains, and they represent each person's interests.
A slot called knows links each person to other persons. That link lets default values for someone's interests be inferred from the web of people they are friends of.
Search the Internet today for "OWL" and most of the pages returned will be about the bird. The standard meant here is the Web Ontology Language. The name itself shows why a Semantic Web would help. A user could specify the concept "Web Ontology Language" without worrying about acronyms, synonyms, or birds of prey crowding the results.
The research agenda of the Semantic Web renewed interest in automatic classification and frame languages. OWL is a standard for describing information on the Internet, meant as a semantic layer on top of it. The goal is for the web to be organized by concepts in an ontology, like a directory structure, rather than searched by keywords the way Google and other engines do today.
The Internet is where the formalism of languages like KL-ONE proves most useful, which is an interesting result given how informal and unstructured its data is. It is simply not feasible to require every system to standardize on one data model. Terminology will inevitably appear in multiple inconsistent forms. The classifier's automatic classification gives developers a powerful toolbox for bringing order and consistency to this collection of data. Classification technology originally developed for frame languages is a key enabler of the Semantic Web.
Other standards and technologies influenced by frame languages include OIL and DAML. Protege, an open source tool from Stanford University, provides ontology editing built on OWL and has the full capabilities of a classifier. It ceased to explicitly support frames as of version 3.5, and the current version is 5.6.8 as of 2025. The stated reasoning was that OWL DL is more expressive and "industry standard".
Version 3.5 remains maintained for those who prefer a frame orientation.
Updated
Common questions
What are frames in artificial intelligence?
Frames are an artificial intelligence data structure that divides knowledge into substructures by representing "stereotyped situations". They are the primary data structure used in AI frame languages and are stored as ontologies of sets.
Who proposed frames in artificial intelligence and when?
Marvin Minsky proposed frames in his 1974 article "A Framework for Representing Knowledge". Frames were originally derived from semantic networks.
What is a slot in an artificial intelligence frame?
A slot holds each piece of information about a frame. It can contain facts or data, facets, procedural attachments such as IF-NEEDED and IF-ADDED, default values, or other frames and subframes.
How do frames in artificial intelligence differ from semantic networks?
Frames allow for exceptions in particular instances, which semantic networks do not. This lets a representation reflect real-world phenomena more accurately, such as a boy frame whose default of 2 legs is overridden by an instance with 1 leg.
How do frame languages differ from object-oriented languages?
Frame languages prioritize explicit, intuitive knowledge representation and require multiple inheritance. Object-oriented languages prioritize encapsulation and information hiding, and many prefer or require single inheritance.
Which early frame languages and tools used frames in artificial intelligence?
KRL was one of the first general-purpose frame languages, and KL-ONE was one of the most influential. Loom, developed by Robert MacGregor at the Information Sciences Institute, was a widely used successor to KL-ONE, and KEE from Intellicorp was a well-known commercial tool.
How are frames in artificial intelligence connected to the Semantic Web?
The Semantic Web renewed interest in frame languages and automatic classification. Standards such as OWL, OIL, and DAML were influenced by frame languages, and classification technology from frame languages is a key enabler of the Semantic Web.
All sources
20 references cited across the entry
- 1JournalA Framework for Representing KnowledgeMarvin Minsky — 1974
- 2FOAF
- 3JournalAn Overview of KRL: A Knowledge Representation LanguageD.G. Bobrow — 1977
- 4JournalA Structural Paradigm for Representing KnowledgeRon Brachman — 1978
- 5JournalUsing a description classifier to enhance knowledge representationRobert MacGregor — June 1991
- 6JournalAn Assessment of Tools for Building Large Knowledge-Based SystemsWilliam Mettrey — 1987
- 8The Unified Modeling LanguageEssential Strategies Inc. — 1999
- 9Retrospective on LoomRobert Macgregor — Information Sciences Institute — August 13, 1999
- 10OMG Formal SpecificationsObject Management Group
- 11BookRemembering: A Study in Experimental and Social PsychologyF. C. Bartlett — Cambridge University Press — 1932
- 12BookThe Psychology of Computer VisionMarvin Minsky — McGraw Hill — 1975
- 13BookScripts, Plans, Goals, and UnderstandingRoger Schank — Lawrence Erlbaum — 1977
- 14BookThe Handbook of Artificial Intelligence, Volume IIIEdward Feigenbaum — Addison-Wesley — September 1, 1986
- 15NewsCharles Fillmore, Discoverer of Frame Semantics, Dies in SF at 84: He Figured Out How Framing WorksGeorge Lakoff — 18 February 2014
- 16BookAI: The Tumultuous Search for Artificial IntelligenceDaniel Crevier — Basic Books — 1993
- 17JournalA Structural Paradigm for Representing KnowledgeRon Brachman — 1978
- 18JournalThe Semantic Web A new form of Web content that is meaningful to computers will unleash a revolution of new possibilitiesTim Berners-Lee — May 17, 2001
- 20JournalAn overview of the KL-ONE Knowledge Representation SystemR. Brachman et al. — 1985
- 21JournalThe role of frame-based representation in knowledge representation and reasoningR. E. Fikes et al. — 1985