Knowledge Representation
Knowledge Representation
Overview
Course: CSC-4240/5240: ARTIFICIAL INTELLIGENCE
Instructor: Amr Hilal, Associate Professor
Date: 10/14/2025
First Order Definite Clauses
Definition: A clause that is a disjunction of literals with exactly one positive literal.
Example:
eg A \/
eg B \/
eg C \ / D (equivalent to )
Not all logical sentences can be expressed as definite clauses, limiting the use of Forward Chaining.
Structure of rules: Antecedent → Consequent covers various real-world systems.
Forward Chaining
Process:
Matching all rules against all known facts.
Example:
Challenges:
Conjunct Ordering: Finding the optimal order to match variables is NP-Hard.
Remedy: Use heuristics.
Rechecking every rule on each iteration.
Condition: New facts inferred must derive from at least one new fact inferred in the previous iteration.
Remedy: Only check rules where the premise includes a conjunct that unifies with newly inferred facts from the previous iteration.
Handling irrelevant facts (e.g., ).
Remedy: Use Backward Chaining.
Backward Chaining
Definition: Also applies to definite clauses, functioning in a reverse manner.
Process:
Proves each premise of a rule by attempting to satisfy the goal.
For each clause in the knowledge base whose positive literal unifies with the goal, a recursive call is created.
If the goal unifies with a known fact, no new subgoals are added, and the goal is resolved.
Utilizes a Depth-First Search (DFS) approach.
Application: Forms the basis for logic programming (e.g., Prolog).
Homework Example: Backward Chaining
Given statements:
Goal: Prove .
Resolution in First Order Logic (FOL)
Context: Forward and Backward chaining requires rules to be definite clauses; not all problems fit this model.
Resolution: Works for any knowledge base; applicable beyond definite clauses.
Example Clause Resolution: If given clauses and , we can derive .
Full Resolution in Propositional Logic (PL)
Example:
From and , we eliminate complementary literals (negations) to determine .
Conjunctive Normal Form (CNF): Clauses must be standardized so they share no variables.
Resolution Rule: In FOL, two clauses can resolve if they contain complementary literals (one must unify with the negation of the other).
Proof by Refutation Using Resolution
Concept: Prove that Knowledge Base (KB) entails α by proving that is unsatisfiable, which is done by deriving the empty clause.
Process Steps:
Convert each statement in KB to CNF.
Negate the goal statement and convert it to CNF.
Apply resolution repeatedly to generate new statements.
If an empty statement is generated, the proof is complete (KB entails α).
If no new clauses can be added, then KB does NOT entail α.
Relation to Propositional Logic: This methodology can also apply to PL.
Inference Completeness: Inference in FOL through resolution is complete.
Knowledge Representation (KR) Overview
Focused on enabling an agent with a knowledge base to make inferences for appropriate actions.
Previously, learned Predicate Logic (PL) and First Order Logic (FOL) for representing knowledge with limited examples.
This segment addresses how to effectively represent facts about the world in a structured and scalable manner.
Ontological Engineering
Objective: Develop more general and flexible knowledge representations.
FOL vs. PL: FOL better handles complex representations involving actions, time, physical objects, and beliefs.
Domains: Functional across various domains; OOP designs and patterns can be applied here.
Upper Ontology:
Defines a framework for general concepts.
Similar to how Wikipedia represents knowledge in graph forms.
Limitations: FOL has exceptions requiring specialized handling; no universally accepted general ontology exists, but special-purpose ontologies are present.
The Upper Ontology of the World
Categories Included:
Anything
Abstract Objects
Generalized Events
Sets, Numbers, Intervals, Places
Physical Objects, Processes, Categories
Sentences, Measurements, Moments
Times, Weights, Animals, Agents, Substances
General vs. Special-Purpose Ontologies
General-purpose ontology: Broadly useful across special-purpose domains with added domain-specific axioms.
Should facilitate reasoning and problem-solving across multiple disciplines.
Example considerations include: Categories, Measures, Time, Space, Change, Events, and Objects.
Categories and Objects in KR
Organization: KR requires the systematic organization of objects into categories.
Interaction primarily occurs at the object level; reasoning usually at the category level.
Inference Example:
Attributes inform category recognition.
If an object is identified as orange, made of leather, and has a diameter of 9.5”, it is inferred to be a basketball.
Formal Representation: Categories can be denoted as
Predicates:
Reification of Categories: (easier for ontological use).
Category Organization
Inheritance Relations: Defines the taxonomy of relationships.
Example: If all instances of food are edible, fruit is a subclass of food, hence, apples are edible.
FOL and Categories
An object belongs to a category:
A category may be a subclass of another:
Properties are attributed to all members of a category:
Recognizing properties by inference:
Properties at Category Level:
Relations Between Categories
Important to define relations among categories that are not subclasses of each other.
Disjoint Categories:
Two or more categories have no members in common:
Example:
Exhaustive Decomposition:
A set of categories constitutes an exhaustive decomposition if all members of a category are covered by that set:
Questions posed:
Is valid?
Is valid?
Further Relations Between Categories
Partition Definition: A partition represents a disjoint exhaustive decomposition.
Expressed as:
Query: Is a partition of North Americans?
Physical Composition
An object can be a part of another:
Transitive and Reflexive Properties:
Example Inference: is inferred.
Structural Relations Among Parts
Categories of composite objects often involve detailing structural relations among parts.
Example: A Biped is characterized as having specifically two legs.
Measurements
Objects possess attributes such as height, mass, cost, etc.
Measure Values:
Combine unit functions with numeric values:
Example:
Conversion:
No Scale Measurements
Some measures lack a scale (e.g., beauty, difficulty).
Key aspect: Measures can be ordered despite their numeric values.
Additional Representations and Reading
Suggested further reading:
Event Calculus: section 10.3
Mental Objects: section 10.4