summary-kr-vu-slides-and-practice-exam
summary-kr-vu-slides-and-practice-exam
Knowledge Representation
“Definition of intelligence”
•symbolic representations
•statistical representation
statistical:
– pattern recognition (images, sound, shapes)
– motor skills (robots)
– speech generation (sound)
– search engines
symbolic:
– planning (autonomous space missions)
– reasoning (diagnosis, design, decision support)
– language generation (conversations)
– search engines
1
Strengths & Weaknesses
Symbolic Connectionist
Construction Human effort Data hunger
Scaleable +/- (worse with more data) +/- (worse with less data)
Explainable + -
Generalisable Performance cliff Performance cliff
And all of this differs from application domain to application domain and even application to
application.
3) PROPOSITIONAL LOGIC
• In propositional logic, a knowledge base can have simple statements , and complex
statements.
• A simple statement states one fact about the world :
– Examples: it is hot , it is raining , it is humid
– In our examples we often just use a single letter for a a simple statement:
– Examples: P, Q, R.
2
The meaning of simple statements
3
Special statements: tautologies
4
Special statements: inconsistencies
Some terms
More terms
• A satisfiable sentence is a sentence that can be made true in at least one world ( i.e. is not
inconsistent)
• P entails Q , written P |= Q, means that whenever P is True, so is Q. In other words, all
models of P are also models of Q
In Propositional Logics (and in other Logics) those notions can often be reduced to each
other.
• E.g. P is satisfiable iff ¬ P is not valid
• Or P |= Q iff P & ¬Q is unsatisfiable
1. We now have language in which we can make simple and complex statements about
the world ( “propositional
2. We can formulate problems that we need to solve as complex statements in
propositional logic
3. We have a formal and unambiguous semantics to define if a statement can be satisfied
4. We have a method (e.g. Truth Tables) to determine which valuations for propositions
satisfies the problem statements (a calculus)
5. Such a “satisfying truth assignment” is then the solution to our problem.
Practice Problem
5
6
Problem solving by Satisfiability testing
Propositional Logic
• Propositions P and Q are interpreted to be either false or true (truth assignment, e.g.
I(P)=True or I(P)=1)
• Complex Sentences S can be calculated to be true or false according to an assignment
e.g. I(Rains --> Wet) is True iff I(Rains)=False (0) or I(Wet)=True (1)
• Inconsistent sentence S: always false (boring) I(S)=0 for all assignment functions I
• Valid sentences S (tautology): always true (boring) I(S)=0 for all assignment functions I
• Satisfiable sentence S: interesting!
There is an assignment I such that I(S)=1. This is also called a model .
This is the task of SAT solving: finding a “model”
7
• Finding a solution = finding a model (= find a truth assignment I that makes the sentence S
true, i.e. I(S)=1 )
8
9
Davis Putnam (DPLL)
• It was not developed by Davis & Putnam, but by Davis, Logemann & Loveland
• The original algorithm by Davis & Putnam used potentially exponential space
• The improved algorithm by DLL is now known as DP…
• It dates from the ‘60s, is (of course ) exponential in the worst case, but performs remarkably
well (if we add a few heuristics)
10
11
12
13
14
15
16
Heuristics for splitting
How to split
17
Sudokus in propositional logic
18
19
20
Logic, Hardness, GSAT, MaxSat
• Previously , you might have learned that Logics exist , how they are defined , what their
theoretical properties are, etc.
• Knowledge Representation is
• The field of using the right logic for the right AI task
• Evaluating logics w.r.t. a task or in general
• Analytically (e.g. soundess , completeness , decidability , complexity , etc
• Empirically (practical complexity , practical completeness
• Adapt existing logics for a task (we do that in the course)
• Develop new logics if needed
21
•Syntax
•Propositions P, Q
•SentencesS1, S2, … basedo n complex operators v, -
•Semantics
•Assignments I
•I(P) = True or False
•Assignment
•I(S1 v S2)=True iff I(S1)=True or I(S2)=True
•I(-S)=True iff I(S)=False
•Calculus and their properties
•Check with Truth Tables
•Check with DPLL
22
23
24
Propositionalizing
• Propositional letters only describe complete “states” of the world, we cannot talk about
“individuals” (e.g., Mary, 3)
• Can’t directly talk about properties of individuals or relations between individuals (e.g.,
“Bill is tall”)
• Generalizations, patterns, regularities can’t easily be represented (e.g., “all triangles have 3
sides”)
• First Order Logic (abbreviated FOL or FOPC) is expressive enough to concisely represent
this kind of information
FOL adds relations, variables, and quantifiers, e.g.,
•“Every elephant is x (elephant(x) gray(x))
•“There is a white x (alligator(X) ^ white(X))
Remember:
if S contains n symbols, we need to check ~1,681 n nodes
Complexity: if S is the result of propositionalising a FOL sentence, then n is exponential in
the number of individuals i in the domain
--> DPLL may have to check doubly exponentially many nodes: 1,6812𝑛
n=10 gives a truth table of size size10230
25
Hard Satisfiability Problems
• So far, we’ve been dealing with SAT problems that encode other problems
• Most not as hard as # of variables & clauses suggests
• Small crossword grid + medium sized dictionary may turn into a big formula … but still a
small puzzle at some level
• Unit propagation does a lot of work for you
• Clause learning picks up on the structure of the encoding
• But some random SAT problems really are hard!
• Fix the length (often 3)
• Vary the ratio between number of clauses l and number of variables n
• Problems < 0˚C are like ice; > 0˚C are like water
• Similar “phase transitions” for other NP hard problems
• job shop scheduling
• traveling salesperson
• exam timetables
• Boolean circuit synthesis
• Latin squares (alias sports scheduling)
26
Incomplete SAT methods (GSAT)
27
Decidability? Completeness?
• Decidability ≈ completeness guarantee to find an answer, or tell you it doesn’t exist, given
enough run time & memory
• Sources of incompleteness
• incompleteness of the input data
• insufficient run time to wait for the answer
Completeness is unachievable in practice anyway, regardless of the completeness of the
algorithm
28
Who cares about undecidability?
Chronological Backtracking
Backtracking to the highest decision level that has not been tried with both values
Originally proposed in the DLL paper in 1962
OK for randomly generated instances, bad for instances generated in practical applications
We can do better than that
29
Summarizing
1. We have “learned” a new clause that “ summarizes ” a potential conflict. Adding this
clause to the clause base will help us to avoid making the same mistake in other parts
of the search space.
2. We can make a bigger “jump back” in the search tree, replacing chronological
backtracking (= just undoing the most recent choice), with dependency directed
backtracking (= undoing the most recent choice that was involved in the conflict, ie
the most recent choice that mattered).
Σ = (S,A,γ)
l states S = {…, si,…}
l actions A = {…, ai,…}
l State-transition function
γ: S x A → 2S
u S = {s0, …, s5}
u A = {move1, move2, put, take, load, unload}
u γ: see the arrows
Planning Problem
P = (Σ, s0, sG)
• Description of Σ
• Initial state or set of states
Initial state = s0
• Objective
Goal state, set of goal states, set of tasks, “trajectory” of states, objective function, …
Goal state = s5
Plans
u Classical plan: a sequence of actions
π = 〈a0, a1, …, an–1〉
〈take, move1, load, move2〉
Policy: partial function from S into A
{(s0, take),
(s1, move1),
(s3, load),
(s4, move2)}
Solution length = 4
Overall Approach
Notation
Fluents
Formulas in Φ
Frame Axioms
l Frame axioms:
u Formulas describing what doesn’t change
between steps i and i+1
l Several ways to write these
l One way: explanatory frame axioms
u One axiom for every literal l
u Says that if l changes between si and si+1,
then the action at step i must be responsible:
(¬li ∧ li+1 ⇒ Va in A{ai | l ∈ effects+(a)})
∧ (li ∧ ¬li+1 ⇒ Va in A{ai | l ∈ effects–(a)})
Example
l Planning domain:
u one robot r1
u two adjacent locations l1, l2
u one operator (move the robot)
l Encode (P,n) where n = 1
u Initial state: {at(r1,l1)}
Encoding: at(r1,l1,0) ∧ ¬at(r1,l2,0)
u Goal: {at(r1,l2)}
Encoding: at(r1,l2,1) ∧ ¬at(r1,l1,1)
u Operator: see next slide
l Operator: move(r,l,l’)
precond: at(r,l)
effects: at(r,l’), ¬at(r,l)
Encoding:
move(r1,l1,l2,0) ⇒ at(r1,l1,0) ∧ at(r1,l2,1) ∧ ¬at(r1,l1,1)
move(r1,l2,l1,0) ⇒ at(r1,l2,0) ∧ at(r1,l1,1) ∧ ¬at(r1,l2,1)
move(r1,l1,l1,0) ⇒ at(r1,l1,0) ∧ at(r1,l1,1) ∧ ¬at(r1,l1,1){contradictions-
move(r1,l2,l2,0) ⇒ at(r1,l2,0) ∧ at(r1,l2,1) ∧ ¬at(r1,l2,1){easy to detect}
move(l1,r1,l2,0) ⇒ …{
move(l2,l1,r1,0) ⇒ … non-essential
move(l1,l2,r1,0) ⇒ …
move(l2,l1,r1,0) ⇒ … }
l How to avoid generating the last four actions?
u Assign data types to the constant symbols: order-sorted logic
l Locations: l1, l2
l Robots: r1
33
l Operator: move(r : robot, l : location, l’ : location)
precond: at(r,l)
effects: at(r,l’), ¬at(r,l)
Encoding:
move(r1,l1,l2,0) ⇒ at(r1,l1,0) ∧ at(r1,l2,1) ∧ ¬at(r1,l1,1)
move(r1,l2,l1,0) ⇒ at(r1,l2,0) ∧ at(r1,l1,1) ∧ ¬at(r1,l2,1)
l Complete-exclusion axiom:
¬move(r1,l1,l2,0) ∨ ¬move(r1,l2,l1,0)
Extracting a Plan
Key questions:
– Safety property: can system ever reach state S?
– Liveness property: will system always reach T after it gets to S?
Main idea:
– Encode “reachability” in a finite transition graph
– CNF encoding: in simple terms, “similar” to planning
Classical Planning
– Parallel step optimal plans
– E.g., SATPLAN-06 fastest in this
category at IPC-06 planning competition
Main idea:
– Create planning graph, unfolded up to T steps
– Encode legal transitions as CNF
• Variables: action vars, fact vars for each time step t
• Clauses encode action preconditions, effects, mutual exclusion, etc.
e.g., (actionA_(t+1) preA1_t AND preA2_t AND preA3_t),
(NOT actionA_t OR NOT actionB_t), …
Combinatorial Design
– Complex mathematical structures with desirable properties
• Latin squares
35
• Quasi groups
• Ramsey numbers
• Steiner systems
•…
– Highly useful for
• design of experiments
• coding theory, cryptography
• drug design and testing
• crop rotation schedules
Example
F = (¬x)1(x 2y)1(¬y)1(z 2w)
F is unsatisfiable, so no truth assignment can satisfy all 4 clauses.
Truth assignment u = {x,¬y, z,¬w} satisfies all clauses except (¬x). )
U(pie) is a solution to the MAXSAT problem F.
1)
B the knowledge base is unsatisfiable, which implies that the formula F must be entailed.
C the knowledge base KB and the negation of the formula are unsatisfiable.
D the formula F is unsatisfiable, which implies that it must be entailed by the KB.
2)
Logic Engineering
What is I(A*B*(C*A*B))?
3)
Fill in the truth value of the following formulas under the assumption that A,B,C and D are
all false. Fill in the truth values of the formulas (use the words "True, False").
(A & B) v -C v -D is : True
Conjunction, or, disjunction
__________
(A & B) v (-C & D) is True
Conjunction, or, conjunction
__________
(A ->B) v (C ->D) is True
Implies, or, implies _________
(-A ->B) v (-C ->D) is False
_________
4)
Semantics 2
B is valid
C is a contradiction
5)
Which of the following statements about the DPLL (Davis Putnam Logemann Loveland)
Algorithm and Search is correct?
A DPLL recursively searches through all possible variable assignments for a model, i.e. an
interpretation that satisfies all the clauses.
B DPLL iteratively searches through the set of all clauses for one that is satisfied by a given
interpretation.
6)
DPLL
1: ¬ p v q v r
2: p v ¬ q v ¬ r
3: ¬ p v ¬ q v ¬ r
4: p v q
5: p v r
6: ¬ p v ¬ q v r
and show whether the knowledge base is satisfiable or not using DPLL. Use the following
order: unit, pure, split alphabetic with a positive value.
Assign p =true
2: p v ¬ q v ¬ r
4: p v q
5: p v r
39
Assign q=true
1: ¬ p v q v r
4: p v q
7)
Properties of GSAT
GSAT: Local greedy search/algorithm of picking the next variable to flip which increases the
number of satisfied clauses the most (ties are broken randomly, note that flips will break also
some clauses).
A True
B False
Foundations
Introduction
Probabilistic Graphical Models is a major field in AI at the crossroads of KR, Statistics and
Learning.
• It has vast amount of applications:
• Decision Making
• Image Segmentation
• Medical Diagnoses
• Speech Recognition
• Natural Language Processing
40
41
42
43
Belief Dynamics
44
45
46
47
48
Independence
Conditional Independence
49
50
Bayes’ Rule
51
52
Exercise: False Positive
53
2nd Solution: Constructing the Belief State
Because we have only two events of interest, T and D, leading to only four worlds, this
solution is feasible.
54
Probabilistic Graphical Models 2
Introduction
55
Representing an expert knowledge in some domain, one needs to ensure some
correspondence between the independencies held by the distribution and those believed by
the expert.
The Bayesian network (BN) is a modelling tool to specify probability distribution which can,
in principle, address these challenges. A BN relies on the basic insight that independence
forms a significant aspect of beliefs and that it can be elicited relatively easily using the
language of graphs.
56
First introducing some notions:
Given a DAG G, and a variable V in G,
57
Then, each DAG G corresponds to a compact representation of the following independence
statements:
58
Bayesian Networks
Suppose, we would like to construct a probability distribution Pr that captures state of our
belief in a given domain.
This, indeed, constrains the possible choices, yet does not uniquely defines it.
The second step corresponds to constructing conditional probability table (CPT). This ensures
that Pr is unique.
59
Conditional Probability Tables
Bayesian Networks
60
61
Properties of Probabilistic Independence
In principle, a Bayesian network G might imply more independence statement than the ones
in Markov(G).
62
Properties of Probabilistic Independence: Symmetry
The first and the simplest property of probabilistic independence we consider is symmetry:
63
Decomposition
64
Another application:
Decomposition can simplify the initial chain rule.
65
Weak Union
66
Contraction
d-Separation
We have seen that deriving new independencies from Markov(G) is a non-trivial task.
Good news is that there is an easy graphical test called d-seperation which captures the
inferential power of graphoid axioms.
The intuition is similar to a water flow along a pipe (a path in the network) controlled by a set
of valves:
Two variables are independent if all the paths between them are blocked by a closed valve (to
be defined).
67
68
69
70
71
Pruning Method
Paths between sets of nodes can be exponentially many. The following method guarantees it
can be decided in linear time/space in the size of the graph.
72
73
Probabilistic Graphical Models 3
Variable Elimination:
A tool for Inference in Bayesian Networks
74
Factors
75
We will have two key operations on factors:
summing-out and multiplication.
76
77
The Process of Elimination
78
79
Computing Prior Marginals
80
Choosing an Order of Elimination
81
Interaction Graphs
It is simpler to visualize such width with interaction graphs which expresses the interactions
between CPTs of a BN.
The interaction graph G of the given factors , is an undirected graph constructed as follows:
f1,…, fn
82
A simple heuristic: Always choose the node with the smallest degree.
83
Another heuristic: Always choose the node whose elimination adds smallest number of edges.
Remark: Note that prior marginal is a special case of posterior marginal where e is empty.
84
Goal: Computing Pr(Q, e) and normalizing by e.
85
Example: Consider G4 once again.
86
All we explained so far (except normalisation by e):
1.
LAS8 In a proof by contradiction, such as DPLL or tableau, I can prove that a formula F
is entailed by a knowledge base KB by showing that
A: the knowledge base KB and the negation of the formula are unsatisfiable.
the formula F is unsatisfiable, which implies that it must be entailed by the KB.
the knowledge base is unsatisfiable, which implies that the formula F must be entailed.
2.
LAS5 A calculus is called complete w.r.t. the semantics of a logic if, and only, if
3.
LAS4 A formula is in clause normal form if it is a A: conjunction of A: disjunctions of A:
literals
CNF
87
4.
AS6 The semantics (meaning) of a formula in Propositional Logic is determined as:
multiple choice
a numeric value
set membership
A: a truth value
5.
Consider the sentence
((- A v -B) -> (A -> -B)) & (A v B)
Which of the following statements are true?
The sentence is neither valid, nor satisfiable, nor a contradiction
A: The sentence is satisfiable, but not valid
The sentence is valid, but not satisfiable
The sentence is not valid, and thus also not satisfiable
The sentence is not valid, and thus a contradiction
6.
LAC2 In the following truth table X1, X2 and X3 stand for possible truth values:
A B B->A A -> (B -> A)
88
X2 = True
X2 = False
7.
LAC1 Match formulas that are logically equivalent.
A -> (B & C)
A v (B & C)
A: (A v B) & (A v C)
A: -A v -B v -C
A & - (B & C)
A & (B -> C)
8.
9.
1. Simplification
Tautology: remove tautologies like P v -P from knowledge base (once in the beginning)
(X v Y v Z)
2. Split
3. pick a predicate and assume a truth value
4. – Heuristics of which literal to pick next can improve the efficiency of DPLL a lot
5. – DLCS (Dynamic Largest Combined Sum): Pick v with the largest count of positive and negative
6. occurrences: CP(v) + CN(v). If CP(v) > CN(v), choose v = 1, else v = 0
7. – DLIS (Dynamic Largest Individual Sum): Pick v with either largest CP or CN. Same truth
8. assignment as for DLCS.
9. – Jeroslow-Wang: weight of literal depends on the length of clauses it occurs in. Thereby, we
10. prefer small clauses. The score of a literal is J(v) =
11. P
12. c2Cv
13. 2jcj, and we pick the highest value.
14. One-sided JW looks at v and :v independently, whereas the two-sided approach looks at sum
15. of v and :v, and just picks the truth value based on J(v) J(:v) ) v = 1, else v = 0.
16. – MOMs (Maximum Occurrences in Clauses of Minimum Size): similar to JW, but we only look at
90
17. the smallest clauses in the knowledge base. The number of occurrences in those is indicates by
18. the function f. We choose the literal that maximizes [f(v) + f(:v)] 2k + f(v) f(:v). k is
19. a tuning parameter for the trade-off between the balanced distribution of v and :v and their
– Pure literals: set predicates that solely occur in their positive or negative form to the corresponding
truth value
– Unit clauses: set literals for which the knowledge base contain a unit clause to true (or the
10.
Give a pseudocode description of GSAT
Note that this algorithm tends to get stuck in local minimum (flipping a single variable does not increase
score). Thus, we perform random restarts to start new. That’s also why GSAT spends most time on
plateaus where score is not improved
11.
What are advantages of a short restart and a long restart?
More than 1 answer might be correct.
Advantage long restart: if we’ve randomly jumped to a part of the search space without
solutions, we will waste too much time on local walks
Advantage short restart: if we’ve randomly jumped to a part of the search space close
to a solution, we might still miss it because we didn’t do enough local exploration
A: Advantage short restart: if we’ve randomly jumped to a part of the search space
without solutions, we won’t waste to much time on local walks
A: Advantage long restart:if we’ve randomly jumped to a part of the search space close
to a solution, we are likely to actually find the solution because we’ll do enough local
exploration
91
12.
In Description Logics, a model is an interpretation function that assigns a value true or
false to each concept name.
- ontologies
-
True or false?
True
False
13.
In Description Logics a concept is called unsatisfiable if there is no model.
True or false?
True
False
14.
Description Logics are truly more expressive than Propositional Logics (i.e. everything
that can be said in PL can be said in all Description Logics).
True or false?
True
False
15.
Suppose that the concept names to use are Kid and Ice-Cream, and the role name is
likes.
Translate the following sentence from DL ALC to English
16.
Use a tableau to prove whether (∀r.A ⊓ ∀r.B) ⊑ ∀r.(A⊓B)
Explain the individual steps.
92
17.
18.
Given a Bayesian Network G, if two random variables X and Y are independent (w.r.t. to
the probability distribution induced by G) given a third random variable Z, then it follows
that X and Y are d-separated by Z.
True or false?
True
A: False
19.
A divergent valve (←W→) is closed iff neither variable W nor any of its descendants
appears in Z.
True or false?
True
False
20.
93
Group of answer choices
A: c) false
a) true
c) true
b) false
A: b) true
A: d) true
A: a) false
d) false
21.
94
IPr(D,emptyset,C) is True
A: IPr(C,{B,E},A) is False
A: IPr(E,{A},B) is False
IPr(E,{A},B) is True
A: IPr(D,emptyset,C) is False
IPr(C,{B,E},A) is True
IPr({BD},{A,c},E) is False
A: IPr({BD},{A,C},E) is True
95
22.
A: 0.0096
23.
96
A: 0.681
Probabilistic Graphical Models 4
97
Probabilistic Graphical Models 4
In this lecture, we will take a look at the problem of finding variable instantiations that have
maximal probability under some given evidence.
Example Scenario:
98
One can partition this population into four different groups:
• Suppose that all we know is a person took both tests and the test results agree (i.e., A =
true).
Then we may ask: What is the most likely group that this person belong to?
Network Pruning
Network structure has a major impact on the performance of variable elimination (and also on
the performance of most algorithms).
Intuition: The complexity of inference can be very much affected by the number and location
of query and evidence variables within the network structure.
Network Pruning is done in two parts: Node Pruning and Edge Pruning.
Node Pruning
Idea: Given a BN N and a query (Q, e), one can remove any leaf node (with its CPT) from the
network as long as it does not belong to variables Q ∪ E.
This does not affect the ability of the network to answer the query correctly, thanks to the
following result.
Remark that this can be done iteratively, possibly leading to further simplifications.
99
Edge Pruning
Idea: Given a Bayesian network N and a query (Q, e), one can eliminate some of the network
edges and reduce some of its CPTs without affecting its ability to compute the joint marginal
Pr(Q, e) correctly.
The two edges originating from node C were deleted and CPTs and were modified. ΘD|B,C ΘE|C
G
Remark the pruned network is only good for answering queries of the form Pr(q, C = false)
Otherwise pruned network and the original network may disagree.
100
Network Pruning: Example
Example: Pruning the network given the query Q = {D} and e : A=true, C = false Pruning
leads to removing node E and the edges originating from nodes A and C, and modifying the
CPTs, , and . ΘB|A ΘC|A ΘD|BC
MAP Queries
What is the most likely group that this person belong to?
=
What are the most likely instantiation of variables S and C given evidence A=yes
102
To calculate that, we can simply compute the posterior marginal (previous lecture) over MAP
variables and then select the instantiation that has a maximum one.
Remark:
Although likely to be different, sometimes this technique is used to approximate MAP
instances.
103
MAP & MPE Queries
104
105
Extended Factors
Idea: The extended factors which assign to each instantiation both a number and an
instantiation
MPE Algorithm
106
Computing MPE
Pruning edges and simplifying (omitting rows that are assigned with 0) gives the following.
107
108
109
Ontologies
What Is an ontology?
•“An ontology is a formal, explicit specification of a shared conceptualization.
110
Definition(s) of an ontology
"An ontology defines the terms used to describe and represent an area of knowledge" -Jeff
Heflin
"An ontology
-defines the basic terms and relations
-that form the vocabulary of a topic area
-as well as the rules for combining terms and relations
-to infer extensions to the vocabulary" -Neches ('91)
Ontology Elements
Class (concept,type)
-a name and a set of properties that describe a certain set of individuals in the domain
Example: person + name, birthdate, ID-nr, …
Instances
-the members of the sets defined by classes
Example: person45, name=Frank, birthdate=01-01-1960, ID-nr=12345
Property (relation)
-assert facts about the instances
Example: person45 is–father-of person256
111
An example of ontology
A Film Ontology
112
Real life examples
handcrafted
•music: Music ontology , MusicMoz(1073/7)
•biomedical: SNOMED(300k), Gene Ontology GO(43k terms)Emtree(45k+190kSystems
biology
•ranging from lightweight
•UNSPC, Open directory (400k) to heavyweight (Cyc (300k))
•ranging from small (METAR) to large (UNSPC)
METAR is the most common format in the world for the transmission of observational
weather data
113
The United Nations Standard Products and Services Code(UNSPSC) is a taxonomyof
products and services for use in eCommerce. It is a four-level hierarchy coded as an
eight-digit number, with an optional fifth level adding two more digits.
By classifying their products & services, businesses can assist their customers with:
Finding and Purchasing
Product discovery
Facilitates expenditure analysis.
Control and uniformity across the company
114
SNOMED: used in healthcare
115
Biomedical ontologies (a few..)
•Mesh
•Medical Subject Headings, National Library of Medicine
•22.000 descriptions
•EMTREE
•Commercial Elsevier, Drugs and diseases
•45.000 terms, 190.000 synonyms
•UMLS
•Integrates 100 different vocabularies
•SNOMED
•300.000 concepts, College of American Pathologists
•Gene Ontology
•15.000 terms in molecular biology
•NCBI Cancer Ontology:
•17,000 classes (about 1M definitions),
Gene Ontology
The Gene Ontology (GO) is a major bioinformatics initiative to unify the representation of
gene and gene product attributes across all species
Three domains:
cellular component
molecular function
biological process
116
Gene product: Actin… UniProtKB:P68032
GO term: heartcontraction; GO:0060047 (biologicalprocess)
Evidencecode: InferredfromMutant Phenotype(IMP)
Reference: PMID 17611253
Assignedby: UniProtKB, June6, 2008
117
Bio-medical ontologies in Bio-portal at Stanford
118
A logic for Ontologies
Whatlogic do we needforMesh?
•WhataboutGO?
F–PsychiatryandPsychologyF01–behavior and behavior mechanisms
F02–psychological phenomena and processes
F03–mental disorders
Classes + class-hierarchy
instances
slots/values
inheritance
•restrictions on slots (type, cardinality)
•properties of slots (symm., trans., …)
•relations between classes (disjoint, covers)
•reasoning tasks: classification, subsumption
119
Class Axioms -Equivalence and Complement
Equivalent Classes contain the same individuals, and have the same definition
The complement of a class contains all individuals that are not in the class
120
Class Axioms -Disjointness
The complement and disjointness allow us to infer that individuals are different.
121
A disjoint union is a union of mutually disjoint classes
122
You can enumerate all members of a class
All members of a class have at least somevalue from the specified class
"NobelPrizeWinnersis the class of Personswho have wona NobelPrize"
All members of a class have only values from one specified class
All members of a class must also be members of anotherClass (it is necessary for a
NobelPrizeWinnertohave been nominated for Nobel Price).
"NobelPrizeWinnersis exactly the class of all Personswho have wona NobelPrize"
The class is precisely specified by some other class (it is a necessary and sufficient
condition).
"NobelPrizeWinnersis the subset of all Personswho were nominatedFora NobelPrize"
then p(y,x)
123
Property Types -Asymmetric Property
if type(p,AsymmetricProperty) andp(x,y)
then p(x,z)
124
Property Types -Functional Property
Used to specify that a property has only onevalue for any particular instance
then y=z
125
Property Types -Reflexive Property
Used to specify that every individualis alwaysrelated to itselfby that property
if type(p,ReflexiveProperty)
then ∀x p(x,x)
126
Property Axioms -Inverse Property
•Now:But can we also make a logics for ontologies,so that computers can reason
automatically?
127
Description logic= logic for ontologies
Logic of Ontologies
Description logics are a formal language to describe such ontologies (if interpreted
sets-theoretically)
•Simple expressions are: Concepts (sets of objects) and roles (properties), and
Individuals(objects)
128
•Terminology/vocabulary (TBox)
•Complex expressions are 𝐶⊓𝐷,𝐶⊔𝐷,¬𝐶,∀𝑟.𝐶,∃𝑟.𝐶
•Knowledge Bases: C ⊑D, C = D,
•Assertions/Facts (ABox)
•Knowledge Bases: a: C , (a,b):r
•Semantics and Inference allows us to calculate hierarchies, consistently, instance relations,
etc….
Syntax (Concepts)
129
How to define complex concepts & roles?
131
132
Syntax (Knowledge Base)
133
134
A DL Knowledge Base for Art
Semantics (Concepts)
DL Semantics
Interpretation of a role (property) P= 𝑃𝐼=all pairs of individuals (X,Y) such that X has
property P with as value Y
Example: ℎ𝑎𝑠𝑃𝑎𝑖𝑛𝑡𝑒𝑑𝐼={𝑅𝑒𝑚𝑏𝑟𝑎𝑛𝑑𝑡,𝑛𝑖𝑔ℎ𝑡𝑤𝑎𝑡𝑐ℎ,𝑑𝑎𝑉𝑖𝑛𝑐𝑖,𝑀𝑜𝑛𝑎𝐿𝑖𝑠𝑎}
135
Example
136
Helpful graphical notation
137
Helpful graphical notation for roles
138
Semantics (Knowledge Bases)
139
ABoxReasoning Tasks
Consistency: A Knowledge Base KB=(T,A) is consistent if, and only if, there is a model for T
and A.
Instance checking:An object iis an instance of a concept C wrtaKnowledgeBaseKB (written
as KB ⊨i:C) if, and only if, iI∈CIfor every model I of KB.
140
141
The reasoning tasks are thus completely independent of the meaning of the atoms,
andonlyaboutthemodelsthatcapturethepossibleworldsthatare consistent
withtheconstraintsin theKnowledge Base.
142