KR LEVEL Flashcards

1
Q

Perceiving, thinking, acting – what did we set
out to learn in this lecture?

A

Perceive
We didn‘t talk about this yet: Data and natural language as input
to artificial intelligence-enabled systems, or artificial intelligence
analytics methods
Think
Rules, logic, graphs: Different knowledge representations and
reasoning mechanism
We didn’t talk about this yet: machine learning.
Act
This comes up very indirectly throughout this course, in the sense
that system/algorithm output informs human users or is consumed
by other systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Knowledge Representation

A

Express and differentiate between:
▪ Facts (assertional axioms - logic, graphs)
▪ General knowledge (rules; terminological axioms – predicate
logic,graphs)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Reasoning

A

Logic, graph-based procedures: Infer new knowledge, check for
the correctness of specific statements, can find related entities
(spreading activation, shortest path), and characterize entities
with different graph measures

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Learning

A

(no learning yet)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Problems with knowledge representations
from symbolic AI

A

Symbolic AI – relies on expressing knowledge in terms of human-readable, high-level
symbolic expressions and concepts – in our lecture: rules, logic, and semantic
networks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Suitability to real-world problems:

A

: It is difficult to describe complex
entities in logic-based, symbolic KR formalisms (graph representations
help to some degree)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Modelling effort:

A

Symbolic knowledge representations are typically
manually engineered (rules, object-oriented KR, knowledge graphs)
➢ Vocabulary and formal KR needs to be modelled, is difficult to
derive automatically (loosening requirements on formality helps)

➢ Suitable for metadata and common characteristics (attributes,
properties, …)
➢ Suitable if formal description is sufficiently important – e.g., formal
verification of important systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Reasoning:

A

New inferences, validation, consistency checking.
Scalability and decidability can be an issue.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Representation

A

Goal: Computationally
represent books, e.g., Harry
Potter and the Half-Blood
Prince.
Definition: A representation
Y conforms in a systematic
manner to X , preserving
pre-selected characteristics
of X.
A representation always
loses something, it is an
approximation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Represent this book in predicate logic:

A

Book(Harry-potter-hbp).
▪ hasCoverColor(Harry-potter-hbp, green)
▪ isGenre(Harry-potter-hbp, fantasy-novel)
▪ isGenre(Harry-potter-hbp, young-adult-novel)
▪ …
▪ Fictional-Character(Harry)
▪ Fictional-Character(Hermione)
▪ Fictional-Character(Ron).
▪ appearsIn(Harry,Harry-potter-hbp)
▪ …
▪ is-friend-of(Harry,Hermione)
▪ is-friend-of(Harry,Ron)
▪ ..

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How suitable is predicate logic as a
knowledge representation formalism
to represent books?

A

+ Suitable for expressing meta-data, and
describing characteristics of the book that
are similar across books – facts and
knowledge ABOUT the book
▪ Imagine expressing the complete story of
Harry Potter in predicate logic!
▪ Yahoo! initially categorised web sites in a
web directory – required editors
~ Metadata could be extracted from a digital
version of the book with some heuristics, if
reasonable metadata schema exists a
priori (-> typical research/engineering goal
in NLP „fact extraction“, „slot filling“,
„named entity recognition“)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Idea: Vectors as numeric, non-symbolic
representation of complex entities

A

From items to vectors, and how to reason
using vectors
1. Choose knowledge representation (KR) formalism:
Vectors
2. Choose how to represent items into vectors (~feature
engineering).
▪ Choose relevant characteristics of the item!
KR perspective: An entity has a set of characteristics; in
machine learning these correspond approximately to
„features“; in statistics the term „variables“ is more typical.
▪ Choose easily computable characteristics of the item!
▪ …which are representable as real numbers.
3. Choose operations on the represented items
▪ Vector mathematics has a broad range of operations –
identify what do they mean in a given use case, and which
are useful

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Choosing operations on vectors for reasoning
- What questions do we want to ask?

A

For a given entity:
▪ What are similar entities?
▪ To which groups does an entity belong? (classification)
▪ What will we be able to observe about this entity in the future? (prediction)
Over a set of entities:
▪ What are meaningful sub-groups? (clustering)
▪ Is there a correlation between different entity characteristics?
▪ Does one characteristic cause another one? (attention – typically needs
specific study set-up to assert!)
▪ Is there a more compact representation – which variables carry most
information? (factor analysis)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Why is similarity interesting?

A

Recommendation: If you like book A, and book B is
similar to A, then you will probably also like book B.
▪ Information retrieval: If your question (query) is q,
then the answer to your question (a document) should
be similar to q.
▪ Classification: All members of a class are similar
w.r.t. to specific features
▪ Clustering: Build groups of entities that are more
similar to each other than they are to members of
other groups

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Vector Representations in this lecture

A

In this lecture, we will
▪ Compute similarities (today)
▪ Application example: information retrieval and
how to „translate“ natural language into vectors
(next lecture)
▪ Classification and clustering

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Discussion: Using vectors to represent
complex entities…

A

Allows us to use everything from simple to complex
functions to compute single entries in the vector
(„features“).
▪ Allows us to use vector mathematics as a way to reason
over knowledge
▪ Complex operations on vectors available – including the
whole field of statistics!
▪ Feature engineering is still knowledge-intensive…
▪ … but if easily computable features are chosen, once the
features are chosen, the representation of a concrete
entity is easy (typical: choose a representation that can be
created automatically)

16
Q

Is it a new way to structure knowledge, or is it
a data structure?

A

A single vector represents a data “point”, an instance
▪ The choice of which entities are represented is a
knowledge engineering choice
▪ … as is the choice of how to represent every single
instance
▪ sometimes called “feature set”, or “dictionary vector” in
information retrieval
▪ Underlying assumption: We can represent a complex
entity as a finite set of numbers.
➢We give up the capability to express general knowledge
formally – the general knowledge is hidden in the choice of
which entities to represent and in the choice of features.

17
Q

How similar are two entities?

A

What are characteristics for comparison?
-> Choice in representation

Harry Potter - Bible

How similar are two entities when they are
represented as vectors?

Cosine similarity – a widely used measure of
similarity between two vectors

Cosine similarity – values it takes
Values are between [-1;1]
▪ Angle is 0°=> Cos(0°)=1
▪ Vectors have the same direction, and are maximally
similar. Cosine doesn’t measure vector equality!!!
▪ Angle is 90 °=> Cos(90°)=0
▪ Vectors are orthogonal; they are not similar at all.
▪ Angle is 180°=> Cos(180°)=-1
▪ Vectors show into the opposite direction, they are
inverse.

18
Q

Cosine similarity - formula

A

▪ Independent of the lengths (magnitude) – normalizes
vectors.
▪ Measures direction

sim(a,b) = cos(theta) =

   a * b \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ ||a|| * ||b||