Ch1. Knowledge Graph
Ch1. Knowledge Graph
2023/09/15
Jinyoung Yeo
Department of Artificial Intelligence
Yonsei University 1980
6. Wrap up!
2
What is Knowledge Graph?
3
What is Knowledge Graph?
4
What is Knowledge Graph?
Relation
Subject, Object, Tail entity
Head entity
5
What is Knowledge Graph?
6
What is Knowledge Graph?
<<More technical>>
7
What is Knowledge Graph?
• Motivation
• Represents the world knowledge on the web
8
What is Knowledge Graph?
Application of Knowledge Graph
https://www.youtube.com/watch?v=D9AdXzypM9w 9
What is Knowledge Graph?
• A set of standards
• Defines best practices for sharing data over the web for use by
applications
10
What is Knowledge Graph?
• Semantic descriptions of entities and their relationships
✓ Uses a knowledge representation formalism
(RDF, RDF-Schema, OWL)
11
Example of Knowledge Graph
12
Knowledge Graph @ Google
13
Knowledge Graph @ Google
14
Knowledge Graph @ Google
15
Knowledge Graph @ Google
16
Knowledge Graph @ Google
• Key benefits
✓ Find the right thing
✓ Get the best summary
✓ Go deeper and broader
17
Knowledge Graph @ Amazon
18
Knowledge Graph @ Amazon
19
Knowledge Graph @ Microsoft
• Key benefits
✓ Enterprise KG provides connected data supporting
people at work
✓ Personalized search
20
The Rise of Knowledge Graphs
21
The Rise of Knowledge Graphs
• Many Semantic Web components (e.g. RDF and SPARQL) are used in various domains:
22
Knowledge Graph API
Open-sourced KGs
or
Private KGs
https://developers.google.com/knowledge-graph/
23
Data Model in Knowledge Graph
24
Why Graphs?
25
Semantic Networks
26
Pros/Cons of Semantic Networks
27
Knowledge Graph: Going Beyond Semantic Network
• Key KG Standards:
✓ KG standard: RDF
✓ KG schema standard: OWL, based on Description Logics (DL)
✓ KG query language standard: SPARQL
• An Example knowledge graph in DL:
✓ Abox (data): tom:Koala, (tom,tim):friend, (tom,e1):eat
✓ Tbox (schema/ ontology): Koala ⊑ ∀eat.Plant
✓ This KB infers that e1:Plant
• Expressiveness: mainly based on TBox
28
Knowledge Graph: Going Beyond Semantic Network
29
Technology Stack
30
Resource Description Framework (RDF)
31
RDF Model
[URI] [URI- Prefixed Form]
<http://dbpedia.org/resource/Muhammad_Ali> OR :Muhammad_Ali
Triple Structure [Resource]
:name
denotes a named thing 1-17-1942^^xsd:date [Resource]
[Literal - Date]
32
Namespaces
• URI’s allow defining distinct identities to RDF
resources
Vocabularies
• Vocabulary (i.e. new URI’s) can be created or resused
34
RDF Model
35
Web Ontology Language (OWL)
• An ontology is a formal definition of set of vocabulary that define relationships between vocabulary
terms and class members
• Ontologies are used to describe domain knowledge (e.g. biology) so that users are able to more
formally share and understand data
36
Knowledge Graph Construction
37
Knowledge Graph Construction
Information
Extraction
https://www.youtube.com/watch?v=D9AdXzypM9w 38
Knowledge Graph Construction
• Information Extraction *
✓ Named Entity Recognition
✓ Relation Extraction
39
Knowledge Graph Construction
40
Knowledge Graph Construction
41
Knowledge Graph Construction
42
Knowledge Graph Construction
43
Knowledge Graph Construction
44
Knowledge Graph Construction: Wikidata
45
Knowledge Graph Construction: DBpedia
• Example (continued)
✓ dbpedia:Vince_Vaughn rdf:type
dbpedia-owl:Actor .
✓ dbpedia:Vince_vaughn foaf:name “Vince
Vaughn” @en .
✓ dbpedia:Vince_Vaughn dbpedia-
owl:birthplace dbpedia:Minneapolis .
46
Knowledge Graph Construction from (Web) Tables
47
NELL: Never Ending Language Learner
• Goals
✓ Extract information from Web texts to
construct KB
✓ Learn to read better than before
• Inputs
✓ Schema with 800 types and relations
✓ 10 – 20 seed examples for each
• Output: continuously growing KB
• Key methods
✓ Coupled Pattern Learner (CPL)
✓ Coupled SEAL (CSEAL)
✓ Coupled Morphological Classifier (CMC)
✓ Rule Learner (RL)
48
Applications of Knowledge Graph
49
Knowledge Graphs Enabling Intelligent Applications
50
Knowledge Graphs Enabling Intelligent Applications
51
Knowledge Graph Querying with SPARQL
• SPARQL is the standard query language of and standard protocol for querying KGs
52
Reasoning with Knowledge Graph
53
Reasoning with Knowledge Graph
54
Reasoning with Knowledge Graph
55
Question Answering over Knowledge Graphs
• Question: if we know Google bought YouTube, how could we make use of such
knowledge in NL form to answer questions like “Who owns YouTube?”
• Entailment graphs are needed for supporting the textual entailment
: company-1 buy company-2 |= company-1 own company-2
✓ There are meaning postulates, such as (buy sub-relation own)
✓ From Description Logic’s perspective, they are schema (rdfs:subPropertyOf) axioms
• Two major approaches
✓ Unsupervised methods: using machine reading (covering 100K relations)
✓ Supervised methods: using pre-trained language models (such as RoBERTa)
56
Question Answering over Knowledge Graphs
https://www.youtube.com/watch?v=D9AdXzypM9w 57
Question Answering over Knowledge Graphs
• Query Parsing
58
Knowledge Graph Embeddings
59
Knowledge Graph Embeddings
60
Evaluation of KG Embeddings
• Partial gold standard: some entities and relations are selected for manual annotation
✓ Pros: usually good quality
✓ Cons: Costly and only applicable to those with simple schema (if scheme is used)
• Silver standard: the KG is assumed to be perfect and used as a test dataset, widely
used for KG completion
✓ Pros: not expensive to get
✓ Cons: KGs are not perfect and thus quality is not as good as partial gold standard
61
Fake News Detection with Knowledge Graph
• Fake news detection based on KG: given a set of news triples g and a background
knowledge graph G
✓ True if g ∪ G is consistent
✓ Fake otherwise
• The embedding model M of entities and relations in G obtained by minimizing a
global loss function involving all entities and relations
• Model M can be used for reasoning
62
Wrap up!
63
Knowledge Graphs as Bridge Between Human and AI
Systems
• Human intelligence (e.g. to understand image)
✓ Perception: Dogs, happy, letters, numbers, red
✓ Knowledge: Dog year, Spring Festival, red for
celebration
✓ Reasoning: 2018 is a dog year, best wish for Spring
Festival
• How knowledge graphs help:
✓ Richer input for Machine Learning
✓ Explain Machine Learning
✓ Meta Learning: Guide learning with knowledge
64
KGs have become the epicentre of the AI hyperbole
65
Thank you!
66