SlideShare a Scribd company logo
8/11/21 Heiko Paulheim 1
Using Knowledge Graphs in Data Science –
From Symbolic to Latent Representations
and a few Steps Back
Heiko Paulheim
University of Mannheim
Heiko Paulheim
8/11/21 Heiko Paulheim 2
Brief Introduction
2006 2008 2011 2013 2014 2017
Pre PhD Years PhD Years PostDoc Years Assistant Prof. Full Prof.
SDType
rdf2vec
ReNewRS
Kare§KoKI
MELT
8/11/21 Heiko Paulheim 3
Knowledge Graphs: At a Glance
• Graph shaped knowledge representation
– nodes: entities
– edges: relations
University of Mannheim
Mannheim
Baden-
Württemberg
Germany
Heiko Paulheim
DWS Group
employer
a
f
f
il
i
a
t
io
n
part of
residence
s
t
a
t
e
part of
8/11/21 Heiko Paulheim 4
Knowledge Graphs in Organizations
• Knowledge Graphs are used…
• …in companies and
organizations
– collect, organize,
and integrate knowledge
– link isolated
information sources
– make information
searchable and findable
Masuch et al., 2016
8/11/21 Heiko Paulheim 5
Public Knowledge Graphs
• Knowledge Graphs are used…
• …as (free), public resources
– collect common knowledge
– general purpose, not task specific
– make it easy to build knowledge-intensive applications
8/11/21 Heiko Paulheim 6
Usage of Public Knowledge Graphs
OK, Google, when will the final
season of Money Heist be on Netflix?
The fifth season of Money Heist
will be released on September 3rd
.
8/11/21 Heiko Paulheim 7
Usage of Public Knowledge Graphs
2021-09-03
2020-04-03
release date
release date
has part
h
a
s
p
a
r
t
OK, Google, when will the final season
Money Heist be on Netflix?
.
.
.
8/11/21 Heiko Paulheim 8
Usage of Public Knowledge Graphs
2021-09-03
2020-04-03
release date
release date
creator
has part
h
a
s
p
a
r
t
cast
c
a
s
t
creator
c
a
s
t
Are there any other series
by the same creator?
creator
cast
cast .
.
.
.
.
.
8/11/21 Heiko Paulheim 9
History: CyC
• The beginning
– Encyclopedic collection of knowledge
– Started by Douglas Lenat in 1984
– Estimation: 350 person years and 250,000 rules
should do the job
of collecting the essence of the world’s knowledge
• The present (as of June 2017)
– ~1,000 person years, $120M total development cost
– 21M axioms and rules
– Declared “ready to use” in 2017
8/11/21 Heiko Paulheim 10
History: Freebase
• The 2000s
– Freebase: collaborative editing
– Schema not fixed
• Present
– Acquired by Google in 2010
– Powered first version
of Google’s Knowledge Graph
– Shut down in 2016
– Partly lives on in Wikidata (see in a minute)
8/11/21 Heiko Paulheim 11
History: Wikidata
• The 2010s
– Wikidata: launched 2012
– Goal: centralize data from Wikipedia languages
– Collaborative
– Imports other datasets
• Present
– One of the largest
public knowledge graphs
– Includes rich provenance
8/11/21 Heiko Paulheim 12
History: DBpedia & co.
• The 2010s
– DBpedia: launched 2007
– YAGO: launched 2008
– Extraction from Wikipedia
using mappings & heuristics
• Present
– Two of the most used knowledge graphs
– ...with Wikidata catching up
8/11/21 Heiko Paulheim 13
History: NELL
• The 2010s
– NELL: Never ending language learner
– Input: ontology, seed examples, text corpus
– Output: facts, text patterns
– Large degree of automation,
occasional human feedback
• Until 2018
– Continuously ran for ~8 years
– New release every few days
http://rtw.ml.cmu.edu/rtw/overview
8/11/21 Heiko Paulheim 14
Knowledge Graph Creation
• Sources for generating knowledge graphs:
– Manual (also: crowd sourcing) curation
• Cyc, Freebase, Wikidata, ...
– (Semi-)structured knowledge (Wikis, databases, …)
• DBpedia, YAGO, BabelNet, ...
– Unstructured text or web page collections
• NELL, DeepDive, ReVerb, …
8/11/21 Heiko Paulheim 15
Knowledge Graph Creation – Ongoing Projects
• WebIsA & WebIsALOD
– 400M hypernyms extracted from a Web Crawl
Seitner et al. (2016): A Large DataBase of Hypernymy Relations Extracted from the Web
8/11/21 Heiko Paulheim 16
Knowledge Graph Creation – Ongoing Projects
• DBkWik
– Harvesting data from 400k Wikis
Paulheim & Hertling (2018): DBkWik: A consolidated knowledge graph from thousands of Wikis
8/11/21 Heiko Paulheim 17
Knowledge Graph Creation – Ongoing Projects
• CaLiGraph
– Learning analogies, e.g., from lists
Heist (2018): Towards Knowledge Graph Construction from Entity Co-occurrence
8/11/21 Heiko Paulheim 18
Use Cases for Knowledge Graphs
• Background Knowledge
– e.g., company data (address, CEO, branch, …)
→ SAP CRM (BSc thesis 2019)
– e.g., geographic regions (demographics)
→ for example, sales data prediction
– data interpretation (e.g., Excel tables, business models)
→ PhD thesis under supervision
• Data Integration
– unified view of different data sources
– relating business entities in different systems
– cross-source data visualization and analytics
8/11/21 Heiko Paulheim 19
Knowledge Graphs in Data Science
• Typical cases:
– predictive modeling, information retrieval, recommendation, …
• For all of those, there’s sophisticated implementations
– but...
?
8/11/21 Heiko Paulheim 20
Wanted: A Bridge between Both Worlds
8/11/21 Heiko Paulheim 21
Wanted: A Bridge between Both Worlds
• Data Science tools for prediction etc.
– Python, Weka, R, RapidMiner, …
– Algorithms that work on vectors, not graphs
• Bridges built over the past years:
– FeGeLOD (Weka, 2012), RapidMiner LOD Extension (2015),
Python KG Extension (2021)
?
8/11/21 Heiko Paulheim 22
Wanted: A Bridge between Both Worlds
• Transformation strategies (aka propositionalization)
– e.g., types: type_horror_movie=true
– e.g., data values: year=2011
– e.g., aggregates: nominations=7
?
8/11/21 Heiko Paulheim 23
Wanted: A Bridge between Both Worlds
• Observations with simple propositionalization strategies
– Even simple features (e.g., add all numbers and types)
can help on many problems
– More sophisticated features often bring additional improvements
• Combinations of relations and individuals
– e.g., movies directed by Steven Spielberg
• Combinations of relations and types
– e.g., movies directed by Oscar-winning directors
• …
– But
• The search space is enormous!
• Generate first, filter later does not scale well
8/11/21 Heiko Paulheim 24
Wanted: A Bridge between Both Worlds
• Excursion: word embeddings
– word2vec proposed by Mikolov et al. (2013)
– predict a word from its context or vice versa
• Idea: similar words appear in similar contexts, like
– Jobs, Wozniak, and Wayne founded Apple Computer Company in April
1976
– Google was officially founded as a company in January 2006
– usually trained on large text corpora
• projection layer: embedding vectors
8/11/21 Heiko Paulheim 25
From Word Embeddings to Graph Embeddings
• Basic idea:
– extract random walks from an RDF graph:
Mulholland Dr. David Lynch US
– feed walks into word2vec algorithm
• Order of magnitude (e.g., DBpedia)
– ~6M entities (“words”)
– start up to 500 random walks per entity, length up to 8
→ corpus of >20B tokens
• Result:
– node embeddings
– most often outperform other propositionalization techniques
director nationality
8/11/21 Heiko Paulheim 26
A First Glance at RDF2vec Embeddings
• Observation: close projection of similar entities
8/11/21 Heiko Paulheim 27
Random vs. non-random
• Maybe random walks are not such a good idea
– They may give too much weight on less-known entities and facts
• Strategies:
– Prefer edges with more frequent predicates
– Prefer nodes with higher indegree
– Prefer nodes with higher PageRank
– …
– They may cover less-known entities and facts too little
• Strategies:
– The opposite of all of the above strategies
• External signals (e.g., human notions of importance)
– generally work better than graph-internal signals
Cochez et al. (2017): Biased Graph Walks for RDF Graph Embeddings
Al Taweel and Paulheim (2020): Towards Exploiting Implicit Human Feedback for Improving RDF2vec
Embeddings
8/11/21 Heiko Paulheim 28
Local Embeddings
• Recap: order of magnitude (e.g., DBpedia)
– ~6M entities (“words”)
– start up to 500 random walks per entity, length up to 8
→ corpus of >20B tokens
– “Train once, reuse often”
• In some cases, only a small subset (of 6M) is of interest
– RDF2vec light: “train when needed”
– Runtime: minutes instead of days
Portisch et al. (2020): RDF2Vec Light – A Lightweight Approach for Knowledge
Graph Embeddings
8/11/21 Heiko Paulheim 29
RDF2vec: Example Applications
• Data Model Matching with WebIsA and RDF2vec
Portisch et al. (2019): Evaluating ontology matchers on real-world financial services
data models.
8/11/21 Heiko Paulheim 30
RDF2vec: Example Applications
• Entity disambiguation: linking texts to a knowledge graph
Türker et al. (2019): Knowledge-Based Short Text Categorization
Using Entity and Category Embedding
8/11/21 Heiko Paulheim 31
RDF2vec: Example Applications
• Finding related research papers on CoViD-19
Steenwinckel et al. (2020): Facilitating COVID-19 Meta-analysis Through a Literature
Knowledge Graph
8/11/21 Heiko Paulheim 32
RDF2vec: Example Applications
• Table search by keyword
Zhang and Balog (2018): Ad Hoc Table Retrieval using Semantic Similarity.
8/11/21 Heiko Paulheim 33
RDF2vec: Example Applications
• Predicting biological interactions
Sousa et al. (2021): Supervised Semantic Similarity.
8/11/21 Heiko Paulheim 34
RDF2vec: Example Applications
• Zero-Shot Image Classification
Tristan Hascoet et al. (2017): Semantic Web and Zero-Shot Learning of Large Scale
Visual Classes.
8/11/21 Heiko Paulheim 35
Embeddings for Link Prediction
• RDF2vec example
– similar instances form clusters, direction of relation is ~stable
– link prediction by analogy reasoning (Japan – Tokyo ≈ China – Beijing)
Ristoski & Paulheim: RDF2vec: RDF Graph Embeddings for Data Mining. ISWC, 2016
8/11/21 Heiko Paulheim 36
Embeddings for Link Prediction
• In RDF2vec, relation preservation is a by-product
• TransE (and its descendants): direct modeling
– Formulates RDF embedding as an optimization problem
– Find mapping of entities and relations to Rn
so that
• across all triples <s,p,o>
Σ ||s+p-o|| is minimized
• try to obtain a smaller error
for existing triples
than for non-existing ones
Bordes et al: Translating Embeddings for Modeling Multi-relational Data. NIPS 2013.
Fan et al.: Learning Embedding Representations for Knowledge Inference on Imperfect and Incomplete
Repositories. WI 2016
8/11/21 Heiko Paulheim 37
Link Prediction vs. Node Embedding
• Hypothesis:
– Embeddings for link prediction also cluster similar entities
– Node embeddings can also be used for link prediction
Portisch et al. (under review): Knowledge Graph Embedding for Data Mining vs. Knowledge Graph
Embedding for Link Prediction - Two Sides of the Same Coin?
8/11/21 Heiko Paulheim 38
Similarity vs. Relatedness
• Closest 10 entities to Angela Merkel in different vector spaces
Portisch et al. (under review): Knowledge Graph Embedding for Data Mining vs. Knowledge Graph
Embedding for Link Prediction - Two Sides of the Same Coin?
8/11/21 Heiko Paulheim 39
Similarity vs. Relatedness
• (s-)RDF2vec allows an explicit trade off w/ different walk strategies
Mannheim
Baden-
Württemberg
Germany
Adler
Mannheim
SAP Arena
Reiss-
Engelhorn
-Museum
location
location
location
federal
state
country
location
city
stadium
Knowledge Graph
Walk Generation
Adler_Mannheim → city → Mannheim → country → Germany
Adler_Mannheim → stadium → SAP_Arena → location → Mannheim
SAP_Arena → location → Mannheim → country → Germany
...
“Classic” RDF2vec walks
city → Mannheim → country
stadium → SAP_Arena → location
location → Mannheim → country
...
s-RDF2vec walks
+
RDF2vec “union walks”
RDF2vec “classic”
RDF2vec “edge”
concatenated
vector
Global PCA
Test Cases
concatenated
vector
(task-specific
subset)
w
2
w
1
(weighted)
local PCA
Portisch et al. (under review): s-RDF2vec: Injecting Knowledge Graph Structure Into RDF2vec Entity
Embeddings.
8/11/21 Heiko Paulheim 40
Similarity vs. Relatedness
• s-RDF2vec
– using different walk strategies
– combining different vector spaces (weighted combinations are possible)
• 10 closest neighbors to Mannheim:
Portisch et al. (under review): s-RDF2vec: Injecting Knowledge Graph Structure Into RDF2vec Entity
Embeddings.
8/11/21 Heiko Paulheim 41
Similarity vs. Relatedness
• Recap word embeddings:
– Jobs, Wozniak, and Wayne founded Apple Computer Company in April
1976
– Google was officially founded as a company in January 2006
• Graph walks:
– Hamburg → country → Germany → leader → Angela_Merkel
– Germany → leader → Angela_Merkel → birthPlace → Hamburg
– Hamburg → leader → Peter_Tschentscher → residence → Hamburg
Germany
Angela_Merkel Hamburg
birthPlace
country
leader
Peter_Tschentscher
leader
residence
country
8/11/21 Heiko Paulheim 42
Similarity vs. Relatedness
• Surrounding entities indicate relatedness
– Hamburg → country → Germany → leader → Angela_Merkel
– Germany → leader → Angela_Merkel → birthPlace → Hamburg
• Same entities in similar positions indicate similarity
– Germany → leader → Angela_Merkel → birthPlace → Hamburg
– Hamburg → leader → Peter_Tschentscher → residence → Hamburg
• Someone is a leader vs. something has a leader
• Solution approach: use embedding approach that respects positions
– CWINDOW / Structured Skip-ngram
Portisch and Paulheim (2021): Putting RDF2vec in Order.
8/11/21 Heiko Paulheim 43
Similarity vs. Relatedness
• Why bother?
– Use case: table interpretation (a special case of entity disambiguation)
related
similar
8/11/21 Heiko Paulheim 44
Back to Interpretability
• Hot topic: Explainable AI
– Knowledge Graphs are a favorable ingredient
– Human/machine interpretable knowledge → explainable systems
• However:
– Embeddings replace interpretable axioms
with numeric vectors over non-interpretable dimensions
– Where did the semantics go?
Paulheim (2018): Make Embeddings Semantic Again!
8/11/21 Heiko Paulheim 45
Towards Semantic Vector Space Embeddings
cartoon
superhero
Paulheim (2018): Make Embeddings Semantic Again!
8/11/21 Heiko Paulheim 46
Towards Semantic Vector Space Embeddings
cartoon
superhero
• Approach 1: learn interpretation function
• Each dimension of the embedding model
is a target for a separate learning problem
• Learn a function to explain the dimension
• E.g.:
• Just an approximation used for explanations and justifications
y≈−|∃character .Superhero|
8/11/21 Heiko Paulheim 47
Towards Semantic Vector Space Embeddings
cartoon
superhero
• Approach 2: learn inherently
interpretable embeddings
• Step 1: learn typical patterns
that exist in a knowledge graph
– e.g., graph pattern learning
– e.g., Horn clauses
• Step 2a: use those patterns
as embedding dimensions
– probably not low dimensional
• Step 2b: compact the space
– e.g., use dimensions for mutually exclusive patterns
8/11/21 Heiko Paulheim 48
Towards Semantic Vector Space Embeddings
• Different angle: learn interpretation for similarity function
~similar
type
~same
country
~connected
to same
entity
8/11/21 Heiko Paulheim 49
Summary
• Knowledge Graphs are a versatile ingredient for AI
– Integrated view on data
– Large-scale free source of background knowledge
• Knowledge Graph Embeddings
– Effective processing of large-scale knowledge sources
– Encoding of similarity and/or relatedness
• RDF2vec: explicit trade-off is possible!
– Additional insights that are not explicit in the graph
• aka latent semantics
8/11/21 Heiko Paulheim 50
More on RDF2vec
• Collection of
– Implementations
– Pre-trained models
– >40 use cases
in various domains
8/11/21 Heiko Paulheim 51
Thank you!
http://www.heikopaulheim.com
@heikopaulheim
8/11/21 Heiko Paulheim 52
Using Knowledge Graphs in Data Science –
From Symbolic to Latent Representations
and a few Steps Back
Heiko Paulheim
University of Mannheim
Heiko Paulheim

More Related Content

What's hot (20)

PPT
Knowledge discovery thru data mining
Devakumar Jain
 
PPT
Module 1 introduction of Dspace
Shehzad Ali
 
PPTX
Data mining , Knowledge Discovery Process, Classification
Dr. Abdul Ahad Abro
 
PPTX
Data mining an introduction
Dr-Dipali Meher
 
PDF
Big Data Architecture and Design Patterns
John Yeung
 
PPT
Metadata harvesting Tools
Veer Rengu korku Govt. College Khaknar
 
PDF
Crisp dm
Navirita
 
PPTX
QR codes in libraries (By Gaurav Boudh)
Library and Information Science Blog
 
PPTX
An intro to Azure Data Lake
Rick van den Bosch
 
PDF
Big Data Architecture
Guido Schmutz
 
PPTX
Metadata standards
makammer
 
PDF
Climbing the Ontology Mountain to Achieve a Successful Knowledge Graph
Enterprise Knowledge
 
PDF
Metadata Standards
Aditya Ranjan
 
PPT
Introduction to Data Mining
Sushil Kulkarni
 
PPT
DB security
ERSHUBHAM TIWARI
 
PPTX
Oracle Database Security
Troy Kitch
 
PDF
AstraZeneca - Re-imagining the Data Landscape in Compound Synthesis & Management
Neo4j
 
PPTX
FAIRy stories: the FAIR Data principles in theory and in practice
Carole Goble
 
PPTX
Information security principles an understanding
HelpWithAssignment.com
 
PPTX
Healthcare and Cyber security
Brian Matteson, CISSP CISA
 
Knowledge discovery thru data mining
Devakumar Jain
 
Module 1 introduction of Dspace
Shehzad Ali
 
Data mining , Knowledge Discovery Process, Classification
Dr. Abdul Ahad Abro
 
Data mining an introduction
Dr-Dipali Meher
 
Big Data Architecture and Design Patterns
John Yeung
 
Metadata harvesting Tools
Veer Rengu korku Govt. College Khaknar
 
Crisp dm
Navirita
 
QR codes in libraries (By Gaurav Boudh)
Library and Information Science Blog
 
An intro to Azure Data Lake
Rick van den Bosch
 
Big Data Architecture
Guido Schmutz
 
Metadata standards
makammer
 
Climbing the Ontology Mountain to Achieve a Successful Knowledge Graph
Enterprise Knowledge
 
Metadata Standards
Aditya Ranjan
 
Introduction to Data Mining
Sushil Kulkarni
 
DB security
ERSHUBHAM TIWARI
 
Oracle Database Security
Troy Kitch
 
AstraZeneca - Re-imagining the Data Landscape in Compound Synthesis & Management
Neo4j
 
FAIRy stories: the FAIR Data principles in theory and in practice
Carole Goble
 
Information security principles an understanding
HelpWithAssignment.com
 
Healthcare and Cyber security
Brian Matteson, CISSP CISA
 

Similar to Using Knowledge Graphs in Data Science - From Symbolic to Latent Representations (and a Few Steps Back) (20)

PDF
New Adventures in RDF2vec
Heiko Paulheim
 
ODP
Machine Learning with and for Semantic Web Knowledge Graphs
Heiko Paulheim
 
PDF
Knowledge Matters! The Role of Knowledge Graphs in Modern AI Systems
Heiko Paulheim
 
PDF
New Adventures in RDF2vec
Heiko Paulheim
 
PDF
The discovery of knowledge graphs and their utility in biotech
ssuserf695691
 
ODP
Knowledge Graphs on the Web
Heiko Paulheim
 
ODP
Machine Learning & Embeddings for Large Knowledge Graphs
Heiko Paulheim
 
PDF
What_do_Knowledge_Graph_Embeddings_Learn.pdf
Heiko Paulheim
 
PDF
Towards Knowledge Graph Profiling
Heiko Paulheim
 
PDF
Web Data Engineering - A Technical Perspective on Web Archives
Helge Holzmann
 
PDF
Observations on Annotations – From Computational Linguistics and the World Wi...
Georg Rehm
 
ODP
Data-driven Joint Debugging of the DBpedia Mappings and Ontology
Heiko Paulheim
 
PPTX
CNI fall 2009 enhanced publications john_doove-SURFfoundation
John Doove
 
PDF
Linguistic Linked Open Data, Challenges, Approaches, Future Work
Sebastian Hellmann
 
PPTX
MDST 3703 F10 Seminar 11
Rafael Alvarado
 
PPTX
20110830 Introducing the Social Media Research Foundation
Marc Smith
 
PDF
FAIR data: LOUD for all audiences
Alessandro Adamou
 
PPTX
Semantic Technologies for the Web of Linked Data
Nick Bassiliades
 
PPTX
SWSIG wlic2016
Figoblog
 
PPTX
IASSIST 2012 - DDI-RDF - Trouble with Triples
Dr.-Ing. Thomas Hartmann
 
New Adventures in RDF2vec
Heiko Paulheim
 
Machine Learning with and for Semantic Web Knowledge Graphs
Heiko Paulheim
 
Knowledge Matters! The Role of Knowledge Graphs in Modern AI Systems
Heiko Paulheim
 
New Adventures in RDF2vec
Heiko Paulheim
 
The discovery of knowledge graphs and their utility in biotech
ssuserf695691
 
Knowledge Graphs on the Web
Heiko Paulheim
 
Machine Learning & Embeddings for Large Knowledge Graphs
Heiko Paulheim
 
What_do_Knowledge_Graph_Embeddings_Learn.pdf
Heiko Paulheim
 
Towards Knowledge Graph Profiling
Heiko Paulheim
 
Web Data Engineering - A Technical Perspective on Web Archives
Helge Holzmann
 
Observations on Annotations – From Computational Linguistics and the World Wi...
Georg Rehm
 
Data-driven Joint Debugging of the DBpedia Mappings and Ontology
Heiko Paulheim
 
CNI fall 2009 enhanced publications john_doove-SURFfoundation
John Doove
 
Linguistic Linked Open Data, Challenges, Approaches, Future Work
Sebastian Hellmann
 
MDST 3703 F10 Seminar 11
Rafael Alvarado
 
20110830 Introducing the Social Media Research Foundation
Marc Smith
 
FAIR data: LOUD for all audiences
Alessandro Adamou
 
Semantic Technologies for the Web of Linked Data
Nick Bassiliades
 
SWSIG wlic2016
Figoblog
 
IASSIST 2012 - DDI-RDF - Trouble with Triples
Dr.-Ing. Thomas Hartmann
 
Ad

More from Heiko Paulheim (20)

PDF
Knowledge Graph Generation from Wikipedia in the Age of ChatGPT: Knowledge ...
Heiko Paulheim
 
PDF
From Wikis to Knowledge Graphs
Heiko Paulheim
 
PPT
Beyond DBpedia and YAGO – The New Kids on the Knowledge Graph Block
Heiko Paulheim
 
PPT
Big Data, Smart Algorithms, and Market Power - A Computer Scientist’s Perspec...
Heiko Paulheim
 
ODP
From Wikipedia to Thousands of Wikis – The DBkWik Knowledge Graph
Heiko Paulheim
 
ODP
Big Data, Smart Algorithms, and Market Power - A Computer Scientist's Perspec...
Heiko Paulheim
 
ODP
Make Embeddings Semantic Again!
Heiko Paulheim
 
ODP
How much is a Triple?
Heiko Paulheim
 
ODP
Weakly Supervised Learning for Fake News Detection on Twitter
Heiko Paulheim
 
ODP
Fast Approximate A-box Consistency Checking using Machine Learning
Heiko Paulheim
 
PPT
Serving DBpedia with DOLCE - More Than Just Adding a Cherry on Top
Heiko Paulheim
 
ODP
Combining Ontology Matchers via Anomaly Detection
Heiko Paulheim
 
PPT
Gathering Alternative Surface Forms for DBpedia Entities
Heiko Paulheim
 
ODP
What the Adoption of schema.org Tells about Linked Open Data
Heiko Paulheim
 
ODP
Linked Open Data enhanced Knowledge Discovery
Heiko Paulheim
 
ODP
Mining the Web of Linked Data with RapidMiner
Heiko Paulheim
 
ODP
Data Mining with Background Knowledge from the Web - Introducing the RapidMin...
Heiko Paulheim
 
PDF
Detecting Incorrect Numerical Data in DBpedia
Heiko Paulheim
 
PDF
Identifying Wrong Links between Datasets by Multi-dimensional Outlier Detection
Heiko Paulheim
 
ODP
Type Inference on Noisy RDF Data
Heiko Paulheim
 
Knowledge Graph Generation from Wikipedia in the Age of ChatGPT: Knowledge ...
Heiko Paulheim
 
From Wikis to Knowledge Graphs
Heiko Paulheim
 
Beyond DBpedia and YAGO – The New Kids on the Knowledge Graph Block
Heiko Paulheim
 
Big Data, Smart Algorithms, and Market Power - A Computer Scientist’s Perspec...
Heiko Paulheim
 
From Wikipedia to Thousands of Wikis – The DBkWik Knowledge Graph
Heiko Paulheim
 
Big Data, Smart Algorithms, and Market Power - A Computer Scientist's Perspec...
Heiko Paulheim
 
Make Embeddings Semantic Again!
Heiko Paulheim
 
How much is a Triple?
Heiko Paulheim
 
Weakly Supervised Learning for Fake News Detection on Twitter
Heiko Paulheim
 
Fast Approximate A-box Consistency Checking using Machine Learning
Heiko Paulheim
 
Serving DBpedia with DOLCE - More Than Just Adding a Cherry on Top
Heiko Paulheim
 
Combining Ontology Matchers via Anomaly Detection
Heiko Paulheim
 
Gathering Alternative Surface Forms for DBpedia Entities
Heiko Paulheim
 
What the Adoption of schema.org Tells about Linked Open Data
Heiko Paulheim
 
Linked Open Data enhanced Knowledge Discovery
Heiko Paulheim
 
Mining the Web of Linked Data with RapidMiner
Heiko Paulheim
 
Data Mining with Background Knowledge from the Web - Introducing the RapidMin...
Heiko Paulheim
 
Detecting Incorrect Numerical Data in DBpedia
Heiko Paulheim
 
Identifying Wrong Links between Datasets by Multi-dimensional Outlier Detection
Heiko Paulheim
 
Type Inference on Noisy RDF Data
Heiko Paulheim
 
Ad

Recently uploaded (20)

PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PDF
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
PPTX
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
 
PDF
Executive Business Intelligence Dashboards
vandeslie24
 
PPTX
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
PPTX
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
DOCX
Import Data Form Excel to Tally Services
Tally xperts
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
PPTX
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PPTX
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
PDF
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
 
Executive Business Intelligence Dashboards
vandeslie24
 
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
Import Data Form Excel to Tally Services
Tally xperts
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 

Using Knowledge Graphs in Data Science - From Symbolic to Latent Representations (and a Few Steps Back)

  • 1. 8/11/21 Heiko Paulheim 1 Using Knowledge Graphs in Data Science – From Symbolic to Latent Representations and a few Steps Back Heiko Paulheim University of Mannheim Heiko Paulheim
  • 2. 8/11/21 Heiko Paulheim 2 Brief Introduction 2006 2008 2011 2013 2014 2017 Pre PhD Years PhD Years PostDoc Years Assistant Prof. Full Prof. SDType rdf2vec ReNewRS Kare§KoKI MELT
  • 3. 8/11/21 Heiko Paulheim 3 Knowledge Graphs: At a Glance • Graph shaped knowledge representation – nodes: entities – edges: relations University of Mannheim Mannheim Baden- Württemberg Germany Heiko Paulheim DWS Group employer a f f il i a t io n part of residence s t a t e part of
  • 4. 8/11/21 Heiko Paulheim 4 Knowledge Graphs in Organizations • Knowledge Graphs are used… • …in companies and organizations – collect, organize, and integrate knowledge – link isolated information sources – make information searchable and findable Masuch et al., 2016
  • 5. 8/11/21 Heiko Paulheim 5 Public Knowledge Graphs • Knowledge Graphs are used… • …as (free), public resources – collect common knowledge – general purpose, not task specific – make it easy to build knowledge-intensive applications
  • 6. 8/11/21 Heiko Paulheim 6 Usage of Public Knowledge Graphs OK, Google, when will the final season of Money Heist be on Netflix? The fifth season of Money Heist will be released on September 3rd .
  • 7. 8/11/21 Heiko Paulheim 7 Usage of Public Knowledge Graphs 2021-09-03 2020-04-03 release date release date has part h a s p a r t OK, Google, when will the final season Money Heist be on Netflix? . . .
  • 8. 8/11/21 Heiko Paulheim 8 Usage of Public Knowledge Graphs 2021-09-03 2020-04-03 release date release date creator has part h a s p a r t cast c a s t creator c a s t Are there any other series by the same creator? creator cast cast . . . . . .
  • 9. 8/11/21 Heiko Paulheim 9 History: CyC • The beginning – Encyclopedic collection of knowledge – Started by Douglas Lenat in 1984 – Estimation: 350 person years and 250,000 rules should do the job of collecting the essence of the world’s knowledge • The present (as of June 2017) – ~1,000 person years, $120M total development cost – 21M axioms and rules – Declared “ready to use” in 2017
  • 10. 8/11/21 Heiko Paulheim 10 History: Freebase • The 2000s – Freebase: collaborative editing – Schema not fixed • Present – Acquired by Google in 2010 – Powered first version of Google’s Knowledge Graph – Shut down in 2016 – Partly lives on in Wikidata (see in a minute)
  • 11. 8/11/21 Heiko Paulheim 11 History: Wikidata • The 2010s – Wikidata: launched 2012 – Goal: centralize data from Wikipedia languages – Collaborative – Imports other datasets • Present – One of the largest public knowledge graphs – Includes rich provenance
  • 12. 8/11/21 Heiko Paulheim 12 History: DBpedia & co. • The 2010s – DBpedia: launched 2007 – YAGO: launched 2008 – Extraction from Wikipedia using mappings & heuristics • Present – Two of the most used knowledge graphs – ...with Wikidata catching up
  • 13. 8/11/21 Heiko Paulheim 13 History: NELL • The 2010s – NELL: Never ending language learner – Input: ontology, seed examples, text corpus – Output: facts, text patterns – Large degree of automation, occasional human feedback • Until 2018 – Continuously ran for ~8 years – New release every few days http://rtw.ml.cmu.edu/rtw/overview
  • 14. 8/11/21 Heiko Paulheim 14 Knowledge Graph Creation • Sources for generating knowledge graphs: – Manual (also: crowd sourcing) curation • Cyc, Freebase, Wikidata, ... – (Semi-)structured knowledge (Wikis, databases, …) • DBpedia, YAGO, BabelNet, ... – Unstructured text or web page collections • NELL, DeepDive, ReVerb, …
  • 15. 8/11/21 Heiko Paulheim 15 Knowledge Graph Creation – Ongoing Projects • WebIsA & WebIsALOD – 400M hypernyms extracted from a Web Crawl Seitner et al. (2016): A Large DataBase of Hypernymy Relations Extracted from the Web
  • 16. 8/11/21 Heiko Paulheim 16 Knowledge Graph Creation – Ongoing Projects • DBkWik – Harvesting data from 400k Wikis Paulheim & Hertling (2018): DBkWik: A consolidated knowledge graph from thousands of Wikis
  • 17. 8/11/21 Heiko Paulheim 17 Knowledge Graph Creation – Ongoing Projects • CaLiGraph – Learning analogies, e.g., from lists Heist (2018): Towards Knowledge Graph Construction from Entity Co-occurrence
  • 18. 8/11/21 Heiko Paulheim 18 Use Cases for Knowledge Graphs • Background Knowledge – e.g., company data (address, CEO, branch, …) → SAP CRM (BSc thesis 2019) – e.g., geographic regions (demographics) → for example, sales data prediction – data interpretation (e.g., Excel tables, business models) → PhD thesis under supervision • Data Integration – unified view of different data sources – relating business entities in different systems – cross-source data visualization and analytics
  • 19. 8/11/21 Heiko Paulheim 19 Knowledge Graphs in Data Science • Typical cases: – predictive modeling, information retrieval, recommendation, … • For all of those, there’s sophisticated implementations – but... ?
  • 20. 8/11/21 Heiko Paulheim 20 Wanted: A Bridge between Both Worlds
  • 21. 8/11/21 Heiko Paulheim 21 Wanted: A Bridge between Both Worlds • Data Science tools for prediction etc. – Python, Weka, R, RapidMiner, … – Algorithms that work on vectors, not graphs • Bridges built over the past years: – FeGeLOD (Weka, 2012), RapidMiner LOD Extension (2015), Python KG Extension (2021) ?
  • 22. 8/11/21 Heiko Paulheim 22 Wanted: A Bridge between Both Worlds • Transformation strategies (aka propositionalization) – e.g., types: type_horror_movie=true – e.g., data values: year=2011 – e.g., aggregates: nominations=7 ?
  • 23. 8/11/21 Heiko Paulheim 23 Wanted: A Bridge between Both Worlds • Observations with simple propositionalization strategies – Even simple features (e.g., add all numbers and types) can help on many problems – More sophisticated features often bring additional improvements • Combinations of relations and individuals – e.g., movies directed by Steven Spielberg • Combinations of relations and types – e.g., movies directed by Oscar-winning directors • … – But • The search space is enormous! • Generate first, filter later does not scale well
  • 24. 8/11/21 Heiko Paulheim 24 Wanted: A Bridge between Both Worlds • Excursion: word embeddings – word2vec proposed by Mikolov et al. (2013) – predict a word from its context or vice versa • Idea: similar words appear in similar contexts, like – Jobs, Wozniak, and Wayne founded Apple Computer Company in April 1976 – Google was officially founded as a company in January 2006 – usually trained on large text corpora • projection layer: embedding vectors
  • 25. 8/11/21 Heiko Paulheim 25 From Word Embeddings to Graph Embeddings • Basic idea: – extract random walks from an RDF graph: Mulholland Dr. David Lynch US – feed walks into word2vec algorithm • Order of magnitude (e.g., DBpedia) – ~6M entities (“words”) – start up to 500 random walks per entity, length up to 8 → corpus of >20B tokens • Result: – node embeddings – most often outperform other propositionalization techniques director nationality
  • 26. 8/11/21 Heiko Paulheim 26 A First Glance at RDF2vec Embeddings • Observation: close projection of similar entities
  • 27. 8/11/21 Heiko Paulheim 27 Random vs. non-random • Maybe random walks are not such a good idea – They may give too much weight on less-known entities and facts • Strategies: – Prefer edges with more frequent predicates – Prefer nodes with higher indegree – Prefer nodes with higher PageRank – … – They may cover less-known entities and facts too little • Strategies: – The opposite of all of the above strategies • External signals (e.g., human notions of importance) – generally work better than graph-internal signals Cochez et al. (2017): Biased Graph Walks for RDF Graph Embeddings Al Taweel and Paulheim (2020): Towards Exploiting Implicit Human Feedback for Improving RDF2vec Embeddings
  • 28. 8/11/21 Heiko Paulheim 28 Local Embeddings • Recap: order of magnitude (e.g., DBpedia) – ~6M entities (“words”) – start up to 500 random walks per entity, length up to 8 → corpus of >20B tokens – “Train once, reuse often” • In some cases, only a small subset (of 6M) is of interest – RDF2vec light: “train when needed” – Runtime: minutes instead of days Portisch et al. (2020): RDF2Vec Light – A Lightweight Approach for Knowledge Graph Embeddings
  • 29. 8/11/21 Heiko Paulheim 29 RDF2vec: Example Applications • Data Model Matching with WebIsA and RDF2vec Portisch et al. (2019): Evaluating ontology matchers on real-world financial services data models.
  • 30. 8/11/21 Heiko Paulheim 30 RDF2vec: Example Applications • Entity disambiguation: linking texts to a knowledge graph Türker et al. (2019): Knowledge-Based Short Text Categorization Using Entity and Category Embedding
  • 31. 8/11/21 Heiko Paulheim 31 RDF2vec: Example Applications • Finding related research papers on CoViD-19 Steenwinckel et al. (2020): Facilitating COVID-19 Meta-analysis Through a Literature Knowledge Graph
  • 32. 8/11/21 Heiko Paulheim 32 RDF2vec: Example Applications • Table search by keyword Zhang and Balog (2018): Ad Hoc Table Retrieval using Semantic Similarity.
  • 33. 8/11/21 Heiko Paulheim 33 RDF2vec: Example Applications • Predicting biological interactions Sousa et al. (2021): Supervised Semantic Similarity.
  • 34. 8/11/21 Heiko Paulheim 34 RDF2vec: Example Applications • Zero-Shot Image Classification Tristan Hascoet et al. (2017): Semantic Web and Zero-Shot Learning of Large Scale Visual Classes.
  • 35. 8/11/21 Heiko Paulheim 35 Embeddings for Link Prediction • RDF2vec example – similar instances form clusters, direction of relation is ~stable – link prediction by analogy reasoning (Japan – Tokyo ≈ China – Beijing) Ristoski & Paulheim: RDF2vec: RDF Graph Embeddings for Data Mining. ISWC, 2016
  • 36. 8/11/21 Heiko Paulheim 36 Embeddings for Link Prediction • In RDF2vec, relation preservation is a by-product • TransE (and its descendants): direct modeling – Formulates RDF embedding as an optimization problem – Find mapping of entities and relations to Rn so that • across all triples <s,p,o> Σ ||s+p-o|| is minimized • try to obtain a smaller error for existing triples than for non-existing ones Bordes et al: Translating Embeddings for Modeling Multi-relational Data. NIPS 2013. Fan et al.: Learning Embedding Representations for Knowledge Inference on Imperfect and Incomplete Repositories. WI 2016
  • 37. 8/11/21 Heiko Paulheim 37 Link Prediction vs. Node Embedding • Hypothesis: – Embeddings for link prediction also cluster similar entities – Node embeddings can also be used for link prediction Portisch et al. (under review): Knowledge Graph Embedding for Data Mining vs. Knowledge Graph Embedding for Link Prediction - Two Sides of the Same Coin?
  • 38. 8/11/21 Heiko Paulheim 38 Similarity vs. Relatedness • Closest 10 entities to Angela Merkel in different vector spaces Portisch et al. (under review): Knowledge Graph Embedding for Data Mining vs. Knowledge Graph Embedding for Link Prediction - Two Sides of the Same Coin?
  • 39. 8/11/21 Heiko Paulheim 39 Similarity vs. Relatedness • (s-)RDF2vec allows an explicit trade off w/ different walk strategies Mannheim Baden- Württemberg Germany Adler Mannheim SAP Arena Reiss- Engelhorn -Museum location location location federal state country location city stadium Knowledge Graph Walk Generation Adler_Mannheim → city → Mannheim → country → Germany Adler_Mannheim → stadium → SAP_Arena → location → Mannheim SAP_Arena → location → Mannheim → country → Germany ... “Classic” RDF2vec walks city → Mannheim → country stadium → SAP_Arena → location location → Mannheim → country ... s-RDF2vec walks + RDF2vec “union walks” RDF2vec “classic” RDF2vec “edge” concatenated vector Global PCA Test Cases concatenated vector (task-specific subset) w 2 w 1 (weighted) local PCA Portisch et al. (under review): s-RDF2vec: Injecting Knowledge Graph Structure Into RDF2vec Entity Embeddings.
  • 40. 8/11/21 Heiko Paulheim 40 Similarity vs. Relatedness • s-RDF2vec – using different walk strategies – combining different vector spaces (weighted combinations are possible) • 10 closest neighbors to Mannheim: Portisch et al. (under review): s-RDF2vec: Injecting Knowledge Graph Structure Into RDF2vec Entity Embeddings.
  • 41. 8/11/21 Heiko Paulheim 41 Similarity vs. Relatedness • Recap word embeddings: – Jobs, Wozniak, and Wayne founded Apple Computer Company in April 1976 – Google was officially founded as a company in January 2006 • Graph walks: – Hamburg → country → Germany → leader → Angela_Merkel – Germany → leader → Angela_Merkel → birthPlace → Hamburg – Hamburg → leader → Peter_Tschentscher → residence → Hamburg Germany Angela_Merkel Hamburg birthPlace country leader Peter_Tschentscher leader residence country
  • 42. 8/11/21 Heiko Paulheim 42 Similarity vs. Relatedness • Surrounding entities indicate relatedness – Hamburg → country → Germany → leader → Angela_Merkel – Germany → leader → Angela_Merkel → birthPlace → Hamburg • Same entities in similar positions indicate similarity – Germany → leader → Angela_Merkel → birthPlace → Hamburg – Hamburg → leader → Peter_Tschentscher → residence → Hamburg • Someone is a leader vs. something has a leader • Solution approach: use embedding approach that respects positions – CWINDOW / Structured Skip-ngram Portisch and Paulheim (2021): Putting RDF2vec in Order.
  • 43. 8/11/21 Heiko Paulheim 43 Similarity vs. Relatedness • Why bother? – Use case: table interpretation (a special case of entity disambiguation) related similar
  • 44. 8/11/21 Heiko Paulheim 44 Back to Interpretability • Hot topic: Explainable AI – Knowledge Graphs are a favorable ingredient – Human/machine interpretable knowledge → explainable systems • However: – Embeddings replace interpretable axioms with numeric vectors over non-interpretable dimensions – Where did the semantics go? Paulheim (2018): Make Embeddings Semantic Again!
  • 45. 8/11/21 Heiko Paulheim 45 Towards Semantic Vector Space Embeddings cartoon superhero Paulheim (2018): Make Embeddings Semantic Again!
  • 46. 8/11/21 Heiko Paulheim 46 Towards Semantic Vector Space Embeddings cartoon superhero • Approach 1: learn interpretation function • Each dimension of the embedding model is a target for a separate learning problem • Learn a function to explain the dimension • E.g.: • Just an approximation used for explanations and justifications y≈−|∃character .Superhero|
  • 47. 8/11/21 Heiko Paulheim 47 Towards Semantic Vector Space Embeddings cartoon superhero • Approach 2: learn inherently interpretable embeddings • Step 1: learn typical patterns that exist in a knowledge graph – e.g., graph pattern learning – e.g., Horn clauses • Step 2a: use those patterns as embedding dimensions – probably not low dimensional • Step 2b: compact the space – e.g., use dimensions for mutually exclusive patterns
  • 48. 8/11/21 Heiko Paulheim 48 Towards Semantic Vector Space Embeddings • Different angle: learn interpretation for similarity function ~similar type ~same country ~connected to same entity
  • 49. 8/11/21 Heiko Paulheim 49 Summary • Knowledge Graphs are a versatile ingredient for AI – Integrated view on data – Large-scale free source of background knowledge • Knowledge Graph Embeddings – Effective processing of large-scale knowledge sources – Encoding of similarity and/or relatedness • RDF2vec: explicit trade-off is possible! – Additional insights that are not explicit in the graph • aka latent semantics
  • 50. 8/11/21 Heiko Paulheim 50 More on RDF2vec • Collection of – Implementations – Pre-trained models – >40 use cases in various domains
  • 51. 8/11/21 Heiko Paulheim 51 Thank you! http://www.heikopaulheim.com @heikopaulheim
  • 52. 8/11/21 Heiko Paulheim 52 Using Knowledge Graphs in Data Science – From Symbolic to Latent Representations and a few Steps Back Heiko Paulheim University of Mannheim Heiko Paulheim