We continue from the earlier post. As in the earlier post, much of this post content are taken from Franz Baader’s lecture notes (freely available on the web) of which I claim no authorship whatsoever.
Knowledge-based programming can be generalized into an area called knowledge representation. More precisely, a prerequisite for knowledge-based programming is that the relevant knowledge needs, in some way, to be represented symbolically, and thus stored in a machine/computer. Obviously, the way knowledge is represented should enable a machine, or in this case, a general problem solver to process it and answer the queries given to it. Again, following Franz Baader’s lecture notes, the following are the important subtasks in knowledge representation:
- knowledge acquisition;
- symbolic representation;
- working with and applying the represented knowledge.
Knowledge acquisition is a difficult task because essentially, knowledge that we would like to represent is human’s knowledge. After all, the notion of knowledge makes much more sense when discussed within human context; it is arguably absurd to talk about knowledge of a table, knowledge of a stone, knowledge of a bird (well it may have something that resembles knowledge, but strictly speaking, we would call it instinct, rather than knowledge), or knowledge of a book (a book may contain knowledge, though in the end what it contains is human’s knowledge).
There are various ways to acquire knowledge about the application domain which is needed to solve the relevant problem, for example, by interviewing experts, mining documents, etc. Obviously, this implies that we have to start from a very informal, imprecise, and incomplete description of the domain to a more formal, machine processable specification. This topic is a very broad research area that overlaps with many other research area including learning and knowledge engineering. For our discussion, we will not deal with this issue explicitly. The reader are recommended to look at other literatures which can be easily found online. From now on, we simply assume that we have a way to acquire knowledge in an effective manner.
There are several meaning of the word “representation” if we look into dictionary. We do not intend to discuss them in details, but rather, we understand that representation indicates a connection between things in the real world and things that we use to depict them. For our discussion, symbolic representation is actually a depiction or description of some real world entity that is symbolic in nature. In the research area of knowledge representation and reasoning, the following questions are discussed [Baader, 2005].
- What is the exact connection between the symbolic representation and the real world entities it is supposed to describe?
- What formalism is used to represent the knowledge?
- What is the meaning (semantics) of the chosen formalism?
These questions give rise to a plethora of formalisms, methods, techniques, approaches, whatever — you name it, to represent knowledge. In a more general sense, knowledge representation can be classified into ones which are symbolic and ones which are not. The latter includes artificial neural network or connectionist systems and evolutionary computation. The other approaches like fuzzy systems and statistical-based systems, although heavily non-symbolic in nature, can be integrated with symbolic approaches in a rather seamless manner. The third question above is, in particular, frequently not applicable (at least in a rather straightforward way) to non-symbolic approaches like artificial neural network. It is undeniable that such systems do work and solve problems in applications robustly and efficiently. However, such systems typically lack semantics. For example, take any artificial neural network system which has been trained for some period of time to classify documents according to their topics. Presumably, the weights of connections between neurons in that system represent the knowledge necessary to perform the classification correctly. Unfortunately, there is no way for us to understand what is the relationship between certain configuration of numerical weights of connections between neurons and the fact that document A has topic X or document B has topic Y. Such a gap is very difficult to close, despite the efforts that have been made so far, e.g., research in neural-symbolic integration (see e.g., the 7th International Workshop on Neural-Symbolic Learning and Reasoning (NeSy’11), or the “Perspective of Neural Symbolic Integration” book).
For the purpose of our discussion here, we would only concern ourselves with symbolic based systems, more specifically, logic-based knowledge representation (LBKR) systems. Aside from the above three questions, research in LBKR also investigates the expressivity aspect, i.e., the adequacy of the expressive power of the chosen formalism. The question of expressive power essentially asks what statements can be formulated and what cannot within a given formalism which is restricted to the representational means defined for it. The more expressive a formalism is, the more knowledge can be presented. Of course, such a formalism can be considered adequate only when all the relevant knowledge can be presented. As an example, the sentence
There exists no prime number that is greater than every other prime number
cannot be adequately expressed using propositional Boolean logic that only uses connectives like conjunction (AND), disjunction (OR) and negation (NOT). This example illustrates that the expressive power of propositional logic formalism is not adequate to express the above sentence. On the other hand, it is also a common question to ask whether all of the representational means attributed to the formalism are really needed, that is, whether some of the representational means is redundant. For example, in propositional Boolean logic, it is sufficient to use only conjunction and negation to express all statements that can be expressed using propositional Boolean logic. In other words, the disjunction operator is redundant in the presence of conjunction and negation.
On the semantics, LBKR systems are expected not to depend solely on any procedural semantics. This means that the semantics should never depend on particular programs that are built to do whatever tasks which are assigned to the systems. If this is the case, then the semantics, i.e., the meaning, of knowledge would change if the program is changed. Instead, they should have declarative semantics, hence separating the representation and the programs that are used to process it. A declarative semantics essentially consists of an abstraction of the world that we want to represent together with a mapping from any symbolic expression allowed in the formalism to an element in the abstraction. Such an abstraction is often stated in a form of a set or other algebraic structures. Representational means of the formalism usually allows us to build more complex symbolic expressions from simpler ones. Thus, the mapping given by the semantics typically associates the representational means with some operations on the abstraction. In addition, declarative semantics specifies a notion of “truth” which is used to determine whether a symbolic expression is true in the world induced by the abstraction. Moreover, the relationship between representational means and operations on the abstraction allows for the “truth” of a symbolic expression to actually be computed.
Working with and applying the represented knowledge
LBKR systems, in addition to the above requirements, should allow users to do some kind of manipulation in the form of [Baader, 2005]:
- adding new knowledge to existing knowledge bases;
- removing knowledge from a knowledge base;
- accessing the explicitly stored knowledge;
- accessing the implicitly stored knowledge
The above activities can be viewed as knowledge management activities which similarly exist for database systems. In fact, in some sense, a (relational) database system can be considered as a form of knowledge-based system. This fact can be easily seen if we see a database as a set of relation which can be expressed as simple first-order logic statements. Also, queries to a database, say stated using SQL, are actually first-order logic statements whose truth are tested against the relations in the database. The feature that a standard database system lacks is the ability to access implicitly stored knowledge. This feature implies that a LBKR system should be able not only to retrieve knowledge that is stored explicitly, but also to deduce implicit knowledge that is implied by the explicitly stored knowledge. Such a feature is called inference mechanism or inference procedure. Referring to my earlier post on “Classical Programming vs. Knowledge-based Programming: Example“, the general problem solver mentioned there would be realized here as inference mechanisms. As an example, we use the one from that post; consider the following knowledge base:
directly-connected(a,b). directly-connected(a,c). directly-connected(b,d). directly-connected(b,e). directly-connected(c,e). connected(x,y) if directly-connected(x,y). connected(x,y) if directly-connected(x,z) and connected(z,y).
Here, directly-connected(a,b) is explicit knowledge because it is explicitly stated in the knowledge base above, whereas directly-connected(a,c) is implicit knowledge because it is implied and not explicitly stated by the knowledge base.
- Classical Programming vs. Knowledge-based Programming (krisnadhi.wordpress.com)
- Classical Programming vs. Knowledge-based Programming: Example (krisnadhi.wordpress.com)