0% found this document useful (0 votes)
11 views62 pages

Lectures KRR

The document discusses Knowledge Representation (KR) in AI, emphasizing its importance for storing, organizing, and using knowledge effectively. It explores various definitions of knowledge, types of reasoning, and the relationship between logic and reasoning, highlighting different reasoning types such as deductive, inductive, and abductive. Additionally, it contrasts Symbolic AI with modern neural networks and introduces the concept of Neuro-Symbolic AI as a solution to enhance knowledge representation.

Uploaded by

emilyroswell4947
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views62 pages

Lectures KRR

The document discusses Knowledge Representation (KR) in AI, emphasizing its importance for storing, organizing, and using knowledge effectively. It explores various definitions of knowledge, types of reasoning, and the relationship between logic and reasoning, highlighting different reasoning types such as deductive, inductive, and abductive. Additionally, it contrasts Symbolic AI with modern neural networks and introduces the concept of Neuro-Symbolic AI as a solution to enhance knowledge representation.

Uploaded by

emilyroswell4947
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 62

LECTURE 1

Knowledge
Representation
and Reasoning
What is Knowledge Representation?

• 🚀 Imagine AI as a Super Student!

• Think of an AI system as a student learning about the world. But how does it
store and use knowledge like humans? 🤔
• A student remembers facts 📚 (Islamabad is the capital of Pakistan).
• A chef knows recipes (Step-by-step cooking).
• A detective connects clues 🔍 (If it’s raining, the ground is wet).
• AI also needs a way to store, organize, and use knowledge—this is called Knowledge
Representation (KR).
What is Knowledge Representation?

• It’s the art of teaching AI how to think, by:


✅ Storing information in a structured way
✅ Understanding concepts and relationships
✅ Applying reasoning to make smart decisions
What is Knowledge Representation?

🌟 Why is it Important?
Without KR, AI would be like a parrot—just repeating data without understanding!
With KR, AI can:
🎯 Answer complex questions.
🔎 Solve problems logically.
🤖 Learn from experience.
What is Knowledge Representation?

💡 How Does AI Store Knowledge?


🔹 Logic & Rules (IF it rains, THEN take an umbrella)
🔹 Graphs & Ontologies (Family trees, knowledge graphs)
🔹 Neuro-Symbolic AI (Combining rules + deep learning)
What is Knowledge?

• At its core, knowledge is information that is understood, structured, and


usable for decision-making or problem-solving. It is more than just raw data—it
has meaning and context!
What is Knowledge?

Classical Definition (Plato & Justified True Belief - JTB)


📖 Definition:
"Knowledge is justified true belief."
📌 Reference: Plato, Theaetetus (~369 BC)
🔹 This classic definition suggests that knowledge is a belief that is true and
supported by justification. However, Gettier problems challenge this idea.
Fixing JTB: Beyond Justified True Belief

• The Gettier Problem comes from a famous paper by Edmund Gettier (1963),
which challenges the Justified True Belief (JTB) definition of knowledge.
1️⃣JTB Definition (Plato’s View)
• The traditional definition states that a person knows something if:
✅ Belief – The person believes the statement.
✅ Truth – The statement is actually true.
✅ Justification – The person has good reasons (justification) to believe it.
Gettier Problem

• Gettier provided counterexamples where someone has a justified true belief


but still lacks real knowledge due to luck. Here’s a famous example:
📖 Gettier’s Coin Example
1️⃣Smith has strong evidence (justification) that Jones will get a job (his boss told
him ;).
2️⃣Smith also knows that Jones has 10 coins in his pocket (he counted them).
3️⃣Based on this, Smith forms the belief:

"The person who will get the job has 10 coins in their pocket."
What happens actually!

4️⃣However, unexpectedly, Smith himself gets the job!


5️⃣And by pure coincidence, he also has 10 coins in his pocket.
Facts!

✅ Smith’s belief was true.


✅ Smith was justified in believing it.
❌ But Smith’s belief was true by accident, not due to real knowledge.

This shows that JTB alone is not enough—we need something more than
justification to eliminate luck.
2️⃣Knowledge as Information Processing (AI
& Cognitive Science)
📖 Definition:
• "Knowledge is information that is organized and actionable."
• 📌 Reference: Newell & Simon, Human Problem Solving (1972)
• 🔹 This view is widely used in Artificial Intelligence (AI), suggesting that
knowledge is not just raw data but structured information that can drive
decisions.
3️⃣Knowledge in Epistemology
(Contemporary View)
📖 Definition:
"Knowledge is a warranted, true belief acquired through reliable processes."
📌 Reference: Alvin Goldman, Epistemology and Cognition (1986)
🔹 Goldman introduced Reliabilism, arguing that knowledge is obtained through
cognitive processes that reliably lead to truth.
4️⃣Knowledge in Neuroscience & Cognitive
Science
📖 Definition:
• "Knowledge is the neural encoding of experience that enables prediction and
action."
• 📌 Reference: Eric Kandel, Principles of Neural Science (2000)
• 🔹 This definition connects knowledge to neural representations in the brain,
forming the basis for learning and intelligence.
5️⃣Knowledge in Artificial Intelligence
(Symbolic & Connectionist AI)
📖 Definition:
• "Knowledge is the explicit and implicit representations of the world that allow
reasoning and adaptation."
• 📌 Reference: Brachman & Levesque, Knowledge Representation and Reasoning
(2004)
• 🔹 This AI-based definition includes symbolic knowledge (rules, logic) and
connectionist knowledge (neural networks, deep learning).
6️⃣Pragmatic View of Knowledge (Practical
Perspective)
📖 Definition:
"Knowledge is the ability to predict, explain, and manipulate aspects of reality."
📌 Reference: Karl Popper, Objective Knowledge (1972)
🔹 This definition focuses on practical application—if a person or system can
make predictions or take effective actions, they possess knowledge.
7️⃣Knowledge in Data Science & AI (Modern
Computational Perspective)
📖 Definition:
• "Knowledge is an evolving model of reality, continuously updated with new
evidence."
• 📌 Reference: Judea Pearl, The Book of Why (2018)
• 🔹 This definition aligns with machine learning and causal inference, where
knowledge is always being refined based on new data.
Other formal definitions

• The fact or condition of knowing something with familiarity gained through


experience or association
• Acquaintance with or understanding of a science, art, or technique

• The range of one's information or understanding

• The circumstance or condition of apprehending truth or fact through reasoning

• The sum of what is known : the body of truth, information, and principles
acquired by mankind
• Knowledge applies to facts or ideas acquired by study, investigation, observation,
or experience
Types of Knowledge

1. Declarative Knowledge (Facts & Information)


2. Procedural Knowledge (How-To Knowledge)
3. Heuristic Knowledge (Rules of Thumb)
4. Structural Knowledge (Relationships & Concepts)
5. Meta-Knowledge (Knowledge About Knowledge)
6. Common Sense Knowledge
7. Ontological Knowledge (Conceptual Frameworks)
Other types may include

1. Priori knowledge
2. Posterior knowledge
3. Explicit knowledge
4. Implicit Knowledge
1. Declarative Knowledge (Facts &
Information)
What it is: Explicit or Implicit knowledge that can be stated as facts.
Examples:

"Paris is the capital of France."


"2 + 2 = 4.“
Procedural Knowledge

What it is: Steps or methods to perform tasks.


Examples:

Riding a bicycle.
Solving a Rubik’s cube.
Heuristic Knowledge (Rules of
Thumb)
What it is: Experience-based strategies for problem-solving.
Examples:

"If traffic is heavy, take an alternate route."


"In chess, control the center of the board."
4. Structural Knowledge (Relationships &
Concepts)
What it is: How different concepts are related.
Examples:

Family trees (relationships between people).


Taxonomies (classification of animals, plants, etc.).
5. Meta-Knowledge (Knowledge About
Knowledge)
What it is: Understanding how and when to use knowledge.
Examples:
A doctor knowing which test to perform based on symptoms.
AI deciding when to use deep learning vs. symbolic reasoning.
6. Common Sense Knowledge

• What it is: General world knowledge humans take for granted.

• Examples:

• "Water is wet."
• "People cannot walk through walls."
7. Ontological Knowledge (Conceptual
Frameworks)
What it is: Organized knowledge about categories and their properties.
• Examples:

• AI understanding what "animals" are and their subcategories like mammals,


birds, etc.
• A knowledge graph linking diseases, symptoms, and treatments.
Knowledge Pyramid
Meta-

Knowledge

Information

Data

Noise 28
Intelligence Human, judgemental

Contextual, tacit
Knowledge Transfer needs learning

Information
Codifiable, explicit
Easily transferable
Data
Symbolic AI (Good Old-Fashioned AI -
GOFAI)
• Symbolic AI is an approach where human knowledge is represented using
symbols and rules, allowing AI systems to reason logically.
Key Features:

• Uses symbols (words, objects, concepts) to represent knowledge.


• Follows rules (if-then logic, predicate logic) to process information.
• Human-interpretable (AI reasoning can be explained).
Examples of Symbolic AI

• Expert Systems (e.g., MYCIN for medical diagnosis)

• Knowledge Graphs (e.g., Google Knowledge Graph)

• Theorem Provers (e.g., Prolog-based AI systems)


Neural Networks
Symbolic AI vs. Modern AI (Neural
Networks):
Approach Rule-based reasoning Data-driven learning
Interpretability High (explainable) Low (black-box)
Flexibility Struggles with uncertainty Handles complex patterns well
Example Chess AI using Min-Max Deep Learning for image
recognition
Limitations of Symbolic AI:

Hard to handle uncertainty and ambiguity.


Requires manual rule creation, making it less scalable.
Struggles with tasks like speech and image recognition.
Solution

• Merging Deep Learning with Symbolic AI  Form Neuro-Symbolic AI

• Better KR
What is Reasoning?

1️⃣Reasoning is the process of drawing conclusions from available knowledge.


• It allows systems (or humans) to make sense of information and make decisions.

2️⃣Why is Reasoning Important?


Understanding: Helps in making sense of complex information.
Decision-Making: Used in AI, business, science, and daily life.
Problem-Solving: Crucial for logical thinking and problem-solving.
Reasoning

3️⃣Real-Life Examples of Reasoning


A doctor diagnosing a patient based on symptoms.
A detective solving a crime based on evidence.
AI recommending movies based on past choices.
Types of Reasoning

4️⃣Types of Reasoning
• Deductive Reasoning: From general rules to specific conclusions.

• Inductive Reasoning: From specific observations to general patterns.

• Abductive Reasoning: Best-guess explanations based on limited facts.


1️⃣Deductive Reasoning (Top-Down
Approach)
Moves from general principles to specific conclusions.
• If the premises are true, the conclusion must be true.
• Example:
• All humans are mortal.
• Socrates is a human.
• Therefore, Socrates is mortal.
🟢 General Rule → 🔵 Specific Case → 🔴 Conclusion
• ✅ Used in mathematics, logic, and AI systems like expert systems.
2️⃣Inductive Reasoning (Bottom-Up Approach)

Moves from specific observations to a general conclusion.


The conclusion is probable but not guaranteed to be true.
Example: Weather Prediction
Observation 1: It has rained every day this week.
Observation 2: The sky is cloudy again today.
Conclusion: It will probably rain today too.
🔵 Observation 1 + 🔵 Observation 2 → 🟢 General Pattern
✅ Used in scientific research, machine learning, and forecasting.
3️⃣Abductive Reasoning (Best-Guess
Approach)
Starts with an observation and finds the most likely explanation.
• Used when information is incomplete.

• Example:
• You wake up and see the road is wet.
• Likely Reason: It rained last night.
🔴 Observation → 🔵 Possible Explanation → 🟢 Best Guess

• ✅ Used in medical diagnosis, AI decision-making, and detective work.


4️⃣Analogical Reasoning (Comparison-
Based)
Solves problems by finding similarities with past situations.
• Example:
• If electric current flows like water in pipes, then resistance must act like friction in
pipes.

🔵 Problem A ↔ 🔵 Problem B (Similar Structure) → 🟢 Solution

• ✅ Used in AI, law, and engineering problem-solving.


What is Logic?

• Logic is the formal study of correct reasoning.

• It provides rules and principles to ensure conclusions follow logically from


premises.

🧠 Logic helps in:

✔ Understanding valid vs. invalid arguments.


✔ Building intelligent AI systems that make rational decisions.
✔ Designing algorithms for problem-solving.
🔹 Role of Logic in AI & Knowledge
Representation
• Logic is used to structure knowledge in a way that machines can process and
reason effectively.

📌 Examples in AI:
• Chatbots use logical rules to generate responses.
• Automated Theorem Proving verifies mathematical proofs.
• Self-driving cars use logic to make decisions (e.g., stop at red lights).
Logic Types in AI

1️⃣Propositional Logic (PL) - "True or False Logic"

Deals with statements that are either true or false.


Uses logical operators like AND (∧), OR (∨), NOT (¬).
Propositional Logic

✅ Example:
• If it is raining (P), then the ground is wet (Q).
• P → Q (Implication rule)

📌 AI Application: Rule-based expert systems.


Truth Table for Connectives

P Q ¬P P->Q PvQ PᴧQ P Q

True True False True True True True

True False False False True False False

False True True False True True False

False False True False False True True

47
Example of Truth Table

Let:

P = "You study"
Q = "You pass the exam"
P → Q (If you study, then you will pass the exam)
Truth Table

P (You study) Q (You pass the exam) P → Q (If P, then Q)


T (True) T (True) T (True) (Studied
and passed)
T (True) F (False) F (False) (Studied but still
failed)
F (False) T (True) T (True) (Did not study but
passed)
F (False) F (False) T (True) (Did not study and
failed)
Explaination

Explanation:

P OR Q (P ∨ Q): This is true if at least one of P or Q is true.


P AND Q (P ∧ Q): This is true only if both P and Q are true.
P EQUIV Q (P ↔ Q): This is true when P and Q have the same truth value (both
true or both false).
Equivalence

I Study (P) I Pass the Exam (Q) P ↔ Q (I Study If and Only If I Pass)
T T T
T F F
F T F
F F T
Equivalence Explaination

P is True and Q is True (I study and I pass):


The equivalence "I study if and only if I pass" is true because both P and Q are true.
If I study, then I pass, and vice versa. Result: T (True)
P is True and Q is False (I study but I don't pass):
The equivalence "I study if and only if I pass" is false because P is true but Q is
false. If I study, I should pass (but I didn’t), so the statement doesn’t hold. Result:
F (False)
P is False and Q is True (I don't study but I pass):
The equivalence "I study if and only if I pass" is false because P is false but Q is
First Order Logic (Objects, Relations, and
Quantifiers)
• First-Order Logic (FOL) – Expands on PL by adding objects, relations, and
quantifiers (e.g., "All humans are mortal").
• Example

• All humans are mortal. (General rule)

• Socrates is a human. (Specific case)

• Conclusion: Socrates is mortal. ✅


Fuzzy Logic (Degrees of Truth)

• Fuzzy Logic – Deals with degrees of truth (e.g., "The weather is somewhat
cold").

• Example:The tea is hot. (Traditional logic: True/False)

• The tea is somewhat hot (70% hot, 30% warm). (Fuzzy logic allows partial
truth!)
Relation Between Logic and
Reasoning
• Logic provides the rules, while reasoning applies them to derive conclusions.

• Without logic, reasoning can be flawed (e.g., assuming "All birds fly" when
penguins don’t).
• AI and computers use logic to make automated decisions and prove theorems.
Deductive Reasoning:
• This is the most common type of reasoning in FOL.

• Deductive reasoning allows you to start from general rules (axioms or theorems) and apply
them to specific cases.
• Example:

• Axiom 1: All humans are mortal. (∀x (Human(x) → Mortal(x)))


• Fact 1: Socrates is a human. (Human(Socrates))
• Conclusion: Socrates is mortal. (Mortal(Socrates))
• From the general statement (Axiom 1) and the fact about Socrates (Fact 1), you can deduce
that Socrates must be mortal using the rule of inference.
Modus Ponens (Affirming the
Antecedent):
• This is a rule of inference that works like this: if you know that "If A then B" is
true, and A is true, then you can conclude that B is true.
• Example:

• Axiom: If it is raining, the ground is wet. (Raining(x) → Wet(x))


• Fact: It is raining. (Raining(Today))
• Conclusion: The ground is wet. (Wet(Today))
What Does FOL Reasoning Allow Us to Do?

Inference: Derive new facts from existing facts using logical rules.
Consistency Checking: Determine if a set of facts is logically consistent (no
contradictions).
Query Answering: Given a set of facts, you can ask whether a particular
statement is true or false.
Problem Solving: Use logical reasoning to solve problems, such as finding a
sequence of actions to reach a goal (as in planning or AI).
.Universal and Existential Reasoning:

• Universal quantifier (∀) means something is true for all elements in a set.

• Existential quantifier (∃) means something is true for at least one element in a
set.
• Universal statement: "All students pass the test." (∀x (Student(x) → Passes(x,
Test)))
• From this, you can infer that if "Jamil" is a student, then Jamil passes the test.

• Existential statement: "There exists a student who failed the test." (∃x
(Student(x) ∧ ¬Passes(x, Test)))
• You can infer there is at least one student who failed.
What Does FOL Reasoning Allow Us
to Do?
• Inference: Derive new facts from existing facts using logical rules.

• Consistency Checking: Determine if a set of facts is logically consistent (no


contradictions).
• Query Answering: Given a set of facts, you can ask whether a particular
statement is true or false.
How Is FOL Used in AI?

• In AI, FOL is used in expert systems, automated theorem proving, natural


language understanding, and robot planning.
• It allows machines to reason about objects and relationships in a structured way,
mimicking how humans reason logically.
Types of Reasoning in FOL

• Deductive Reasoning:

• Modus Ponens (Affirming the Antecedent)

• Universal and Existential Reasoning

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy