Knowledge Representation

What are the main approaches to knowledge representation in AI?

A short answer to the main approaches to knowledge representation in AI: logic, semantic networks, frames, rules, Bayesian networks and learned models.

On this page
  1. The main approaches
  2. How to choose
  3. Common combinations

The main approaches to knowledge representation in AI are logic, semantic networks, frames, production rules, ontologies and knowledge graphs, Bayesian networks, and learned representations such as neural network embeddings. Each one stores knowledge in a different form, and each trades off precision, flexibility and ease of inspection in its own way.

The main approaches

  • Logic. Facts are written as formal statements, and a system draws conclusions using rules of inference. Propositional logic handles statements that are true or false. First-order predicate logic adds objects, properties and relations. For a worked example, see first order predicate logic in artificial intelligence examples.
  • Semantic networks. Concepts are nodes and relationships are labeled links, so “a canary is a bird” becomes a link between two nodes. Properties can be inherited along “is a” links. For small graphs, see semantic network in artificial intelligence examples.
  • Frames. Knowledge about a typical situation is held in a structure with named slots and default values. Frames suit situations that follow a familiar pattern, such as visiting a restaurant. For more on the idea, see frame based system in artificial intelligence examples.
  • Production rules. Knowledge is written as if-then rules, which a system applies to a set of facts. Rules are easy to read, but they can become hard to manage as the rule set grows.
  • Ontologies and knowledge graphs. An ontology defines the kinds of things in a domain and how they relate. A knowledge graph stores facts as subject, predicate and object triples, such as (Paris, capital of, France).
  • Bayesian networks. A graph of variables linked by probabilities, which can reason about uncertain situations. Readers who want the details can read explain bayesian network in detail.
  • Learned representations. Neural networks learn patterns from data, and their knowledge is held in numerical weights and vectors rather than readable statements. They are flexible and scale well with data, but they are hard to inspect.

How to choose

Several questions help narrow the choice:

  • Is the knowledge exact or uncertain? Logic suits exact statements, and Bayesian networks suit uncertain ones. Symbolic reasoning under uncertainty in artificial intelligence covers the bridge between the two.
  • Do people need to check the reasoning? Rules, frames and graphs are easier to read than learned weights.
  • Is there a lot of data? Learned representations often need large amounts of data to work well.
  • Does the knowledge need to be shared? Ontologies and knowledge graphs are built to be shared between systems.

Common combinations

Many real systems mix methods. One pattern pairs a learned model with a symbolic component that checks outputs against known facts or rules. The choice of method usually follows from the problem, not from a single best answer.

The complete guide to knowledge representation

Knowledge Representation Approaches in AI
Read the guide

Keep exploring

Guides from other topics

All topics →