Timp de citire: 16 minute

Knowledge is a strong concept, long debated by philosophers for millennia. It is a fundamental ingredient of human memory, it is something that may look objective, but at the same time, it is something that is stored subjectively by each individual and it is presented or described to others through the filter of own judgement and transported using various channels as natural or mathematical languages. Most of the concept that directly interacts with knowledge itself are recognized for their “capability” of altering the information and creating room for interpretation. Yet, humans are still hoping to preserve the knowledge intact, claiming to own the absolute knowledge or to transmit it to further generations using various mechanisms.

Being a core concept of human life, for entire human history, knowledge is also a subject of interest in machines’ world and over the years the development of the most advanced technologies became almost synonyms with the improvements machines got in terms of working with knowledge – how and how much they can store it, how they may transmit it or keep it safe etc.

In this article, we will explore the evolution of knowledge from the technical point of view and the models and mechanisms we use to work with knowledge when we build intelligent machines. The main topics presented in this article, are:

  • what knowledge is
  • how knowledge is represented
  • what knowledge agents are
  • the knowledge cycle
  • the types of knowledge we have in AI
  • the approaches we generally use for knowledge representation in software


What is knowledge?

So, before discussing knowledge representation, let’s see some definitions for knowledge.

According to Wikipedia, knowledge is familiarity or awareness, of someone or something, such as facts (descriptive knowledge), skills (procedural knowledge), or objects (acquaintance knowledge), often contributing to understanding. Knowledge of facts also referred to as propositional knowledge, is often defined as the true belief that is distinct from opinion or guesswork by virtue of justification. [1]

According to the English Cambridge dictionary, knowledge is understanding of or information about a subject that you get by experience or study, either known by one person or by people generally. [2]

We can conclude then that knowledge is the information about the domain that can be used to solve problems in that specific domain.

What is knowledge representation?

Solving numerous problems requires a large amount of knowledge and this knowledge must be represented on the computer. And for that, we must define how the knowledge will be represented. [3]

Knowledge representation and reasoning is the part of AI that is related to AI agents’ thinking and how their thinking contributes to the intelligent behaviour of agents. [4]

  • Knowledge representation is a study concerned with using symbols to represent a collection of propositions believed by some agents.
  • Knowledge reasoning is the formal manipulation of symbols representing a collection of belief propositions to produce representations of new ones.

Knowledge representation is responsible for representing the information about the real world so that a machine can understand and can use this knowledge for solving complex real-world problems, such as communicating with humans in their natural language or a diagnosis of a medical condition. Knowledge representation is not just about storing data in a database, but it also allows an intelligent machine to learn from that knowledge and obtained experience, so that it can behave intelligently, like any human being. [4]

Knowledge representation should be productive enough to express the knowledge needed to solve the problem. It should be natural, compact and maintainable. The knowledge representation method should be well enough to see the relationship between the domain and the representation represented so that it can be easily determined whether the knowledge which is represented is correct or not. A small variation in the query should result in a small change in the representation of the problem. [3]

Knowledge representation should be able to express elements of the problem that can be operated for the computational games and qualified to trade off the precision and calculation time. It must be able to be obtained from people’s data and past experiences.


The Knowledge-Based Agent

Basically, an intelligent agent (read more about intelligent agents in one of my previous articles here [5]) needs knowledge about the real world for making decisions and reasoning for acting precisely. Knowledge-based agents are the agents who have the skills of maintaining an internal state of knowledge, can reason over the knowledge, update their knowledge based on their observations and take actions accordingly. [6]

Knowledge-based agents can express the world with some formal representation and operate intelligently. A knowledge-based agent must be able to represent states, actions, etc. and can incorporate new percepts. An agent can update or deduce the internal representation of the world based on the problem defined.

Knowledge-based agents are generally composed of two main parts: a knowledge base and an inference system.

  • A knowledge base consists of a set of sentences that are written in knowledge representation language, not a sentence that is written in natural language. Knowledge representation language is used for representing assertions about the world in a concise manner that can be reasoned about more accurately. This is why we must be concerned with constructing our agents’ knowledge base and a knowledge representation language. The sentences that are derived from the knowledge base are said to be inferred, which means that they are not made up. They are inferred from the knowledge which is already known. It can be done through logical reasoning with a defined set of rules that come out from the knowledge representation of language naturally.
  • The second important part of a knowledge based agent is the inference system that generates new facts so that an agent can update the knowledge base. Inference generally means deriving new sentences from old ones. The inference system permits us to add a new sentence to the knowledge base. A sentence is a proposition about the world. The inference system applies logical rules to the knowledge base to extrapolate and deduce new information. The inference system generates new facts so that an agent can update the knowledge base. An inference system works mainly into rules which are forward and backward chaining. When one asks any inquiry to the knowledge base, the answer should follow from what has been told to the knowledge base previously, which is simply handled by the inference system.

Each time the agent program is called, it performs three operations such as TELL, ASK and ACT.

So first, the agent tells the knowledge base what it perceives, and then asks the knowledge base what action it should perform. In the process of answering the query, comprehensive reasoning is done about the outcomes of possible action outcomes, the current state of the world and so on. And lastly, the agent tells the knowledge base about the selected action, and the agent executes the action. The agent formats the request in the format in which the knowledge base expects that is in a knowledge representation language, and a knowledge base responds to such a request with the sentence that was either stored in the knowledge base or inferred from the information in the knowledge base, which guarantees that the response given by the knowledge base doesn’t contradict any of the knowledge held in the knowledge base previously.

Representation language details are usually hidden in three functions, named as to MAKE-PERCEPT-SENTENCE, MAKE-ACTION-QUERY and MAKE-ACTION-SENTENCE, that implements the interface between actuators incentives at the one end and the route representation and reasoning system on the other end. [7] The first function constructs a sentence claiming that the agent proceeds with the given percept at the given time. The second function makes query action construct a sentence that asks what action should be performed at the current time. And finally, the third function constructs a sentence claiming that the selection action was executed correctly.

Two approaches that are used to build a knowledge base agent are

  • declarative approach – a knowledge base agent can be built by telling him the information it needs to know. Initially, the agent has an empty knowledge base, and the information is provided in the form of sentences one by one until the agent knows how to operate and its environment and
  • procedural approach – the desired behaviors are directly encoded as program code.

The architecture of Knowledge-Based Agent

As we clarified the meaning and purpose of Knowledge-Based Agents, let’s understand now the generalized architecture of a knowledge-based agent.

Fig 1. Architecture of Knowledge-Based Agent

The knowledge-based agent takes input from the environment by perceiving the environment this input is accepted by the inference engine of the agent which communicates with the knowledge base to determine the action to be performed as per the knowledge stored in the knowledge base. The learning component of the knowledge base agent regularly updates the knowledge base by learning new knowledge from the input provided.

There are three levels of knowledge-based agent:

  • knowledge level – is the level where we need to specify what the agent knows and what its goals are, in order to fix its behaviour. For example, an self-driven care might have the goal of taking a passenger from Location A to Location B, and might know the only path between the two locations which is the Point P. So we can expect it to cross through Point P, as it knows that it will help him in achieving its goal. It is also known as the level where we need to describe what agent knows.
  • logical level – is the level where we understand how the knowledge representation of any knowledge is stored. Here sentences are encoded into different logics and encoding of knowledge into logical sentences occurs. For example, at the logical level, we can expect the self-driven car to reach the destination, which is Location B. It is also known as the level where knowledge is encoded into sentences in agent’s internal system of symbols.
  • implementation level – is the level of physical representation of logic and knowledge. At the implementation level, the agent performs actions as per the knowledge and the logical level. For example, the self-driven car actually implemented it knowledge and logic to reach Location B from Location A. It is also know as the physical representation of the sentence at the logical level.

Artificial Intelligence Cycle

The Artificial Intelligence Cycle has components named as perception, learning, knowledge representation and reasoning, planning, and execution for displaying intelligent behavior.

Fig 2. AI Cycle

The cycle shows how an AI system can interact with the real world and what the components are that help to show intelligence. AI system has the perception component by which it retrieves information from its environment. The information can be in the visual form, or it may be audio or in any other form of sensory output. The learning component is capable of learning from data captured by the perception component. [8]

Then we have knowledge representation and reasoning that are involved in proving the intelligence of machine-like humans. They are independent of each other but also coupled together. [8]

Then the planning and execution of the action depend on the analysis of knowledge representation and reasoning. [8]


Types of knowledge

Knowledge is generally classified as

  • declarative knowledge,
  • structural knowledge,
  • procedural knowledge,
  • meta knowledge and
  • heuristic knowledge.
Fig 3. Types of knowledge

Declarative knowledge

Declarative knowledge, also known as descriptive knowledge, is the type of knowledge that provides basic knowledge about something. It is more popular than procedural knowledge. That includes concepts, and facts in objects and can be expressed in declarative sentences. The declarative knowledge is data-oriented and can easily be communicated. Debugging and validation of declarative knowledge is very easy as compared to procedural knowledge. [9]

Structural knowledge

Structural knowledge is basic knowledge that is generally used in problem solving, and describing relationships within various concepts, such as part of, kind of, or grouping of something. It illustrates the relationship that exists between concepts or objects. [4]

Procedural knowledge

Procedural knowledge or imperative knowledge is the type of knowledge that clarifies how a particular thing can be accomplished. This knowledge cannot be communicated easily and it is process oriented in nature. Also, the process of debugging and validation is not so easy. Procedural knowledge can directly be applied to any task and it generally depends on the task on which it is applied. It includes rules, strategies, procedures, agendas, etc. [4]

Meta-knowledge

Meta-knowledge is knowledge about knowledge. It is used to describe things like models, taxonomies, and tags that are generally used to describe knowledge. [10]

Heuristic knowledge

Heuristic knowledge is the representation of knowledge of experts in a particular domain or about a certain topic. It is a rule of thumb based on previous experiences and awareness of approaches that are good to work but not guaranteed to provide better, more accurate outcomes. [11]


Approaches to knowledge representation

In general, there are four main approaches to knowledge representation, named as:

  • simple relational knowledge,
  • inheritable knowledge,
  • inferential knowledge and
  • procedural knowledge.

Simple relational knowledge

The simplest method of storing information which uses the relational method, where each piece of information is about a set of objects that is set up systematically in columns. Relational knowledge is generally famous in database systems, where the relationship between different entities is represented. The principle of storing information is very similar to that of storing data, whereas information is the result of analyzing and interpreting pieces of data.

Inheritable knowledge

In this case, the data is stored in a hierarchy of classes, where all classes are arranged in a predefined hierarchy. In this approach, we use inheritance property, where the elements inherit values from other members of a class. This method contains inheritable knowledge that shows a relation between an instance and a class known as instance relation. Every individual frame represents the collection of attributes along with its value, and objects and values are represented in box nodes. Arrows are used to point objects to their values. [4] It is an approach similar to the method we manipulate data and information using the Object Oriented Programming paradigm.

Inferential knowledge

The inferential knowledge approach represents knowledge in the form of formal logic and this approach is used to derive more facts. Therefore, it guaranteed correctness. [4]

For example, we can consider that if (Person H is a human) and we know that (All humans are vertebrates), then we will be able to derive that (Any Person X which is a human as Person H, Person X is also a vertebrate).

Procedural knowledge

The procedural knowledge approach uses small programs and codes that describe how to do specific things and how to proceed. Procedural knowledge uses the if-then rule methodology and is used for representing heuristic or domain-specific knowledge.

Knowledge representation techniques

The four techniques of knowledge representation are:

  • logical representation,
  • semantic network representation,
  • frame representation and
  • production rules.

Logical representation

Logical representation is a language with fascinating detailed rules that deal with propositions and has no ambiguity in representation. It means that drawing a conclusion based on various conditions, this representation sets some important communication rules and consists of precisely defined syntax and semantics, which supports sound inference. In this representation, each sentence can be translated into logic using syntax and semantics. The syntax is other rules that decide how to construct legal sentences in logic and determines which symbol can be used in knowledge representation, and how to write those symbols. Semantics are the rules by which that interpret the sentence in the logic and involves assigning a meaning to each sentence. [12]

Semantic network representation

Semantic networks are the alternative of predicate logic for knowledge representation, in which knowledge is represented in the form of graphs. The network consists of nodes representing objects, and arcs describe the relationship between those objects. They can categorize the objects in different forms, and can also link those objects. This representation is to understand and can be easily extended. It consists mainly of two types of relations: is-a relation and kind-of relation. Semantic networks take more computational time as we need to traverse the complete network tree to answer some questions. It might be possible in the worst-case scenario, that after traversing the entire tree, we find out that the solution does not exist and the network and storing a vast semantic network is not possible. [12]

Frame representation

The frame is a document-like structure that consists of a collection of attributes along its values to define an entity. Basically, frames are the data structure in AI that divides knowledge into substructures for representing stereotypical conditions. It consists of slots and slot values, where slots can be of any size and time. Slots have names and values known as facets. Facets are the various aspects of a slot. They are the features of frames that enable users to put constraints on the frames.

A frame may consist of multiple slots, a slot that contain any number of facets, and the facets have any number of values. These frames are also known as slot-filler knowledge representation. They’re derived from semantic networks and later evolved into modern-day classes and objects.

A single frame is not very useful. Frames system consists of a collection of frames that are connected together. In a frame knowledge about an event or object can be stored together in the knowledge base. The frame is a type of technology that is used widely in various applications, including NLP and computer vision.

Frame representation is flexible and used by many applications and AI. Adding the slot for new attributes in relations is very easy. It is also easy to include the fault data and search for missing values. [12]

Production rules

Production rules consist of condition-action pairs, which means that if the condition exists, then a particular action is performed. It is divided into three parts:

  • the set of production rules,
  • working memory and
  • the recognized act cycle.

In this type of knowledge representation, the agent checks for the condition and if the condition exists, then the production role shots an action corresponding to that production rule is carried out. The condition part of the rule defines which rule is applied to the specific problem, whereas the action part carries out the associated problem-solving steps. And this complete process is called recognized-act-cycle (RAC).

The working memory comprises a description of the current state of problem-solving. And the rules can write knowledge to the working memory. The knowledge matches the conditions and trigger the rules. If any new state generates then multiple production rules will be triggered together, known as a conflict set. And at this point, the agent needs to select a rule from the steps known as conflict resolution. [12]


In order to prepare this article, I studied the lectures from GlobalTechCouncil. They served me as a great source of inspiration and guidance through the process of discovering and understanding AI technologies.

Below, you can also find some valuable materials on this topic.

References

[1] https://en.wikipedia.org/wiki/Knowledge/
[2] https://dictionary.cambridge.org/dictionary/english/knowledge/
[3] https://artint.info/html/ArtInt_8.html/
[4] https://www.javatpoint.com/knowledge-representation-in-ai/
[5] https://neuroaugmentare.ro/ai2-intelligent-agents-en/
[6] https://www.javatpoint.com/knowledge-based-agent-in-ai/
[7] https://www.ques10.com/p/48092/knowledge-based-agents-1/
[8] https://www.javatpoint.com/knowledge-representation-in-ai/
[9] https://www.geeksforgeeks.org/difference-between-procedural-and-declarative-knowledge/
[10] https://simplicable.com/new/meta-knowledge/
[11] https://www.umsl.edu/~joshik/msis480/chapt11.htm/
[12] https://www.javatpoint.com/ai-techniques-of-knowledge-representation/