SlideShare une entreprise Scribd logo
1  sur  32
© 2023 Neo4j, Inc. All rights reserved.
© 2023 Neo4j, Inc. All rights reserved.
1
Demystifying Graph Neural
Networks (GNNs)
Zach Blumenfeld
Product Specialist,
Graph Data Science
© 2023 Neo4j, Inc. All rights reserved.
Agenda
• TL;DR
• Graph & Graph Machine Learning Overview
• GNN Overview
• Neo4j Graph Data Science & GNN Support
• Takeaways and Additional Resources
© 2023 Neo4j, Inc. All rights reserved.
TL;DR
• GNNs have a lot potential in certain use cases
and can provide wins over simpler approaches
• Neo4j has multiple features for supporting and
scaling GNNs
However…
• GNNs aren’t a panacea for Graph ML
• Many projects getting started with graph ML do
not need GNNs, there may even be bigger gains
to be had elsewhere
Disclaimer: 30 minutes, general audience, big/complex topic - I am going to oversimplify a few
things
© 2023 Neo4j, Inc. All rights reserved.
4
Graph & Graph Machine Learning
Overview
© 2023 Neo4j, Inc. All rights reserved.
What is a Graph?
Simply put, a graph consists of nodes connected by relationships
Graph data platforms, like Neo4j, structure and store data as graphs
© 2023 Neo4j, Inc. All rights reserved.
6
Node
Represents an entity in the graph
Relationship
Connect nodes to each other
Property
Describes a node or relationship:
e.g. name, age, weight etc
Property Graph Components
Person
Person
Car
LOVES
Nodes represent entities/objects in
the graph
© 2023 Neo4j, Inc. All rights reserved.
7
Node
Represents an entity in the graph
Relationship
Connect nodes to each other
Property
Describes a node or relationship:
e.g. name, age, weight etc
Person
Person
Car
LOVES
KNOWS
KNOWS
LIVES WITH
Nodes represent entities/objects in
the graph
Relationships represent
associations or interactions
between nodes
Property Graph Components
© 2023 Neo4j, Inc. All rights reserved.
8
Node
Represents an entity in the graph
Relationship
Connect nodes to each other
Property
Describes a node or relationship:
e.g. name, age, weight etc
Person
Person
Name: “Andre”
Born: May 29, 1970
Twitter: “@dan”
Name: “Mica”
Born: Dec 5, 1975
Car
Brand “Volvo”
Model: “V70”
Since:
Jan 10, 2011
LOVES
KNOWS
KNOWS
LIVES WITH
Nodes represent entities/objects in
the graph
Relationships represent
associations or interactions
between nodes
Properties represent attributes of
nodes and/or relationships
Property Graph Components
© 2023 Neo4j, Inc. All rights reserved.
9
• Directly leverage relationships
between data points to access
information that would otherwise
be difficult to obtain in other
formats
• If the context of relationships are
important for driving operations or
analytics, then graphs can be
valuable for you
Why Graph?
© 2023 Neo4j, Inc. All rights reserved.
What is Graph Machine Learning?
Graph Machine Learning is the
application of ML to graphs
specifically for predictive and
prescriptive tasks
One of the best ways to begin to understand graph machine learning is by
understanding the different types of tasks they cover
© 2023 Neo4j, Inc. All rights reserved.
Supervised Graph Machine Learning Tasks
Node Property Prediction
Link Prediction
Link Property Prediction Graph Property Prediction
Predict a discrete or continuous node
property, called node classification and
node regression respectively.
Predict if a relationship should exist
between two nodes. Binary classification
Predict a discrete or continuous property
of an existing relationship
Predict a discrete or continuous property
of a graph or subgraph
SIMILAR_TO
InhibitRep: 0
InhibitRep: 0
InhibitRep: 1
InhibitRep: 1
© 2023 Neo4j, Inc. All rights reserved.
12
Graph Machine Learning…the Main Thing
12
● Graphs can be be represented by adjacency matrices
● Small examples depicted below
● Not always symmetric and 0/1. Some graphs are directed and/or have relationship
weights
Compression is Key!
© 2023 Neo4j, Inc. All rights reserved.
13
Graph Machine Learning…the Main Thing
13
Compression is Key!
● As real-world graphs grow in size the become large sparse data structures
● Reduced dimensionality features are required for graph machine learning
One relationship traversal entails O(n2) complexity. Multiple, m, traversals entail O(nm+1)
Graph Structure
Adjacency Matrix Representation
© 2023 Neo4j, Inc. All rights reserved.
How to Accomplish Compression?
Embedding (non-GNN)
Classic Graph Algorithms Graph Neural Networks (GNN)
Low-dim vector representations of
nodes s.t similarity between vectors
approximates similarity between nodes
(can also be for links, paths, or graphs)
Results from algorithms like pagerank
for centrality, Louvain for community
detection, or node similarity
End-to-end solution for the ML task.
Compression happens in hidden layers
and is learned during model training
© 2023 Neo4j, Inc. All rights reserved.
15
Graph Neural Network Overview
© 2023 Neo4j, Inc. All rights reserved.
GNNs are a Generalization of Convolutional Neural
Networks (CNNs)
CNNs process data with a fixed grid-like topology, such as images, videos,
and audio
GNNs extend to topologies without fixed ordering, size, or patterns…a.k.a
graphs
© 2023 Neo4j, Inc. All rights reserved.
Convolutional Layers Have 2 Primary Components
1. Filtering or “kernels” collect and smooth
information across regions of the input.
a. output is called a “convolved feature”.
b. kernel function weights learned during
training
1. Filtering or “kernels” collect and smooth
information across regions of the input.
a. output is called a “convolved feature”.
b. kernel function weights learned during
training
1. Pooling aggregates the convolved feature
to reduce dimensionality while maintaining
important signals.
a. can be done via averaging, choosing the
max value, or other pooling function
Images from A Comprehensive Guide to Convolutional Neural Networks (Towards Data Science)
and http://deeplearning.stanford.edu/tutorial/supervised/Pooling/ respectively
© 2023 Neo4j, Inc. All rights reserved.
Stack Convolutional Layers with a Few Other Things =
CNN
Example CNN for Image Classification
Image from A Comprehensive Guide to Convolutional Neural Networks (Towards Data Science)
© 2023 Neo4j, Inc. All rights reserved.
GNN Layers are Similar with 2 Mirroring Components
1. Message Passing (MP) collects
information around a nodes
neighborhood 1) Message Passing
2) Aggregation
1. Message Passing (MP) collects
information around a nodes
neighborhood
1. Aggregation (Agg) aggregates
message passing information and
assign to each node* in the graph
Images adapted from https://uvadlc-
notebooks.readthedocs.io/en/latest/tutorial_notebooks/tutorial7/GNN_overview.html
© 2023 Neo4j, Inc. All rights reserved.
Stack These Layers with a Few Other Things = GNN
Example GNN for Node Classification
© 2023 Neo4j, Inc. All rights reserved.
Different Types of GNNs
• Graph Convolutional Network (GCN): Basic case that makes up a large number
of GNNs. Average and normalize representations from neighbor nodes
• Graph Sample and Aggregation (GraphSAGE): Uses sampling at different hops
before aggregating with pooling to help with scalability
• Graph Attention Network (GAT): Learns to weight node neighborhoods based
on importances using attention mechanism (similar to transformers)
…and more, see resources
© 2023 Neo4j, Inc. All rights reserved.
Graph Neural Networks (GNNs) Strengths and
Weaknesses
Strengths
● Can automatically learns important
signals in the graph
● Most recent GNNs are inductive (train a
model and predict on new graph data)
● Potential to handle deep complex graph
structure
● End-to-end solution for supervised
learning
Weaknesses
● Relatively complicated. Can still be
difficult to construct, tune, and avoid
overfitting. Requires high degree of
technical expertise.
● Can be difficult to scale. High time &
space complexity. Usually requires
accelerated hardware - like GPU.
● Limited depth. Usually “shallow” to
prevent over-smoothing and/or reaching
the diameter of the graph
● Low interpretability/explainability
© 2023 Neo4j, Inc. All rights reserved.
23
Neo4j Graph Data Science &
GNNs
© 2023 Neo4j, Inc. All rights reserved.
© 2023 Neo4j, Inc. All rights reserved.
24
Answer your Questions with
Neo4j Graph Data Science
Data Sources
Data Science and Analytics Tools
Explorative tools, rich algorithm library, and Integrated
supervised Machine Learning framework.
Native Graph Database
The foundation of the Neo4j platform; delivers enterprise-scale
and performance, security, and data integrity for transaction and
analytical workloads.
Development Tools & Frameworks
Tooling, APIs, query builder, multi-language support for
development, admin, modeling, and rapid prototyping needs.
Discovery & Visualization
Code-free querying, data modeling and exploration tools for data
scientists, developers, and analysts.
Graph Query Language Support
Cypher & openCypher; ongoing leadership and standards work
(GQL) to establish lingua franca for graphs.
Ecosystem & Integrations
Rich ecosystem of tech and integration partners. Ingestion tools
(JDBC, Kafka, Spark, BI Tools, etc.) for bulk and streaming needs.
Runs Anywhere
Deploy as-a-Service (AuraDS) or self-hosted within your cloud of
choice (AWS, GCP, Azure) via their marketplace, or on-premises.
Data Connectors
Transactions Analytics
Graph Database
Data Consolidation
Contextualization
Enterprise Ready Data
Science & MLOps
Graph Data Science
Neo4j
Bloom
Neo4j
Browser
BUSINESS
USERS
DEVELOPERS
DATA
SCIENTISTS
DATA
ANALYSTS
BI
Connectors
AutoML
Integrations
Language
interfaces
© 2023 Neo4j, Inc. All rights reserved.
Neo4j Graph Data Science
Algorithms, Procedures & ML
Graph Projections
Neo4j Database
Graph DS/ML Workspace
highly optimized, massively parallel, scalable
• Run graph algorithms to generate insights:
65+ algorithms across centrality, path finding,
community detection, similarity, and more
• Engineer graph features for ML: Leverage
relationship information with algorithms & node
embeddings
• Build graph native ML pipelines: Link
prediction, node classification & property
regression
• Integrate with external ML frameworks:
Python client, blazing fast import & export,
formatting for dataframes and tensors
© 2023 Neo4j, Inc. All rights reserved.
Sampling & Export for GNN Support
Graph Sampling: sample a
representative subgraph
from a larger graph for
training complex models
Graph Export: use our
projections in other graph
ML libraries like Deep Graph
Library (DGL), PyG, and
Tensorflow GNN
Image courtesy of Google Cloud
© 2023 Neo4j, Inc. All rights reserved.
Native GraphSAGE for Inductive Embedding
• Native training and prediction
• stored and tracked in model catalog: can be persisted, shared, and published
• Good candidate for situations where you want to predict on updated data or new graphs with
similar structure
A
A
010...01001l..00
11 ..n
1001l..001…..
010...n
...01001l..00
1...n
...01001l..00
1...n
A
SAMPLE AGGREGATE PREDICT
Solves a specific problem: Learn graph structure and generate embeddings
on new data in a fully inductive manner
© 2023 Neo4j, Inc. All rights reserved.
28
Neo4j & GNN Demos
© 2023 Neo4j, Inc. All rights reserved.
29
Additional Resources
© 2023 Neo4j, Inc. All rights reserved.
Technical Resources
GNN & Graph ML example notebooks + additional resources
neo4j-product-examples/graph-machine-learning-examples/gnns-with-neo4j
© 2023 Neo4j, Inc. All rights reserved.
Where to Get Neo4j Graph Data Science
Data Science as a Service
AuraDS
Self Managed
Neo4j
Deploy where you want, customized
architecture for your use case
We manage the infrastructure so you
can focus on data science
neo4j.com/aura-ds
neo4j.com/docs/graph-data-science/current/installation
© 2023 Neo4j, Inc. All rights reserved.
© 2023 Neo4j, Inc. All rights reserved.
32
Thank you!
Contact us at
sales@neo4j.com

Contenu connexe

Tendances

The Neo4j Data Platform for Today & Tomorrow.pdf
The Neo4j Data Platform for Today & Tomorrow.pdfThe Neo4j Data Platform for Today & Tomorrow.pdf
The Neo4j Data Platform for Today & Tomorrow.pdf
Neo4j
 
The Data Platform for Today’s Intelligent Applications
The Data Platform for Today’s Intelligent ApplicationsThe Data Platform for Today’s Intelligent Applications
The Data Platform for Today’s Intelligent Applications
Neo4j
 

Tendances (20)

SITA WorldTracer - Lost & Found Property
SITA WorldTracer -  Lost & Found PropertySITA WorldTracer -  Lost & Found Property
SITA WorldTracer - Lost & Found Property
 
Knowledge Graphs & Graph Data Science, More Context, Better Predictions - Neo...
Knowledge Graphs & Graph Data Science, More Context, Better Predictions - Neo...Knowledge Graphs & Graph Data Science, More Context, Better Predictions - Neo...
Knowledge Graphs & Graph Data Science, More Context, Better Predictions - Neo...
 
Technip Energies Italy: Planning is a graph matter
Technip Energies Italy: Planning is a graph matterTechnip Energies Italy: Planning is a graph matter
Technip Energies Italy: Planning is a graph matter
 
Modern Data Challenges require Modern Graph Technology
Modern Data Challenges require Modern Graph TechnologyModern Data Challenges require Modern Graph Technology
Modern Data Challenges require Modern Graph Technology
 
The art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptx
The art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptxThe art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptx
The art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptx
 
Graphs for Data Science and Machine Learning
Graphs for Data Science and Machine LearningGraphs for Data Science and Machine Learning
Graphs for Data Science and Machine Learning
 
How Graph Data Science can turbocharge your Knowledge Graph
How Graph Data Science can turbocharge your Knowledge GraphHow Graph Data Science can turbocharge your Knowledge Graph
How Graph Data Science can turbocharge your Knowledge Graph
 
Neo4j GraphSummit London March 2023 Emil Eifrem Keynote.pptx
Neo4j GraphSummit London March 2023 Emil Eifrem Keynote.pptxNeo4j GraphSummit London March 2023 Emil Eifrem Keynote.pptx
Neo4j GraphSummit London March 2023 Emil Eifrem Keynote.pptx
 
The path to success with Graph Database and Graph Data Science
The path to success with Graph Database and Graph Data ScienceThe path to success with Graph Database and Graph Data Science
The path to success with Graph Database and Graph Data Science
 
Making connections matter: 2 use cases on graphs & analytics solutions
Making connections matter: 2 use cases on graphs & analytics solutionsMaking connections matter: 2 use cases on graphs & analytics solutions
Making connections matter: 2 use cases on graphs & analytics solutions
 
ENEL Electricity Grids on Neo4j Graph DB
ENEL Electricity Grids on Neo4j Graph DBENEL Electricity Grids on Neo4j Graph DB
ENEL Electricity Grids on Neo4j Graph DB
 
The Neo4j Data Platform for Today & Tomorrow.pdf
The Neo4j Data Platform for Today & Tomorrow.pdfThe Neo4j Data Platform for Today & Tomorrow.pdf
The Neo4j Data Platform for Today & Tomorrow.pdf
 
Scoutbee - Knowledge graphs at Scoutbee with Neo4j
Scoutbee - Knowledge graphs at Scoutbee with Neo4jScoutbee - Knowledge graphs at Scoutbee with Neo4j
Scoutbee - Knowledge graphs at Scoutbee with Neo4j
 
Easily Identify Sources of Supply Chain Gridlock
Easily Identify Sources of Supply Chain GridlockEasily Identify Sources of Supply Chain Gridlock
Easily Identify Sources of Supply Chain Gridlock
 
The Art of the Possible with Graph - Sudhir Hasbe - GraphSummit London 14 Nov...
The Art of the Possible with Graph - Sudhir Hasbe - GraphSummit London 14 Nov...The Art of the Possible with Graph - Sudhir Hasbe - GraphSummit London 14 Nov...
The Art of the Possible with Graph - Sudhir Hasbe - GraphSummit London 14 Nov...
 
The Data Platform for Today’s Intelligent Applications
The Data Platform for Today’s Intelligent ApplicationsThe Data Platform for Today’s Intelligent Applications
The Data Platform for Today’s Intelligent Applications
 
Smarter Fraud Detection With Graph Data Science
Smarter Fraud Detection With Graph Data ScienceSmarter Fraud Detection With Graph Data Science
Smarter Fraud Detection With Graph Data Science
 
Workshop Introduction to Neo4j
Workshop Introduction to Neo4jWorkshop Introduction to Neo4j
Workshop Introduction to Neo4j
 
Workshop Tel Aviv - Graph Data Science
Workshop Tel Aviv - Graph Data ScienceWorkshop Tel Aviv - Graph Data Science
Workshop Tel Aviv - Graph Data Science
 
Workshop - Neo4j Graph Data Science
Workshop - Neo4j Graph Data ScienceWorkshop - Neo4j Graph Data Science
Workshop - Neo4j Graph Data Science
 

Similaire à Demystifying Graph Neural Networks

Amsterdam - The Neo4j Graph Data Platform Today & Tomorrow
Amsterdam - The Neo4j Graph Data Platform Today & TomorrowAmsterdam - The Neo4j Graph Data Platform Today & Tomorrow
Amsterdam - The Neo4j Graph Data Platform Today & Tomorrow
Neo4j
 
Nordics Edition - The Neo4j Graph Data Platform Today & Tomorrow
Nordics Edition - The Neo4j Graph Data Platform Today & TomorrowNordics Edition - The Neo4j Graph Data Platform Today & Tomorrow
Nordics Edition - The Neo4j Graph Data Platform Today & Tomorrow
Neo4j
 
La strada verso il successo con i database a grafo, la Graph Data Science e l...
La strada verso il successo con i database a grafo, la Graph Data Science e l...La strada verso il successo con i database a grafo, la Graph Data Science e l...
La strada verso il successo con i database a grafo, la Graph Data Science e l...
Neo4j
 

Similaire à Demystifying Graph Neural Networks (20)

GPT and Graph Data Science to power your Knowledge Graph
GPT and Graph Data Science to power your Knowledge GraphGPT and Graph Data Science to power your Knowledge Graph
GPT and Graph Data Science to power your Knowledge Graph
 
Workshop - Build a Graph Solution
Workshop - Build a Graph SolutionWorkshop - Build a Graph Solution
Workshop - Build a Graph Solution
 
The perfect couple: Uniting Large Language Models and Knowledge Graphs for En...
The perfect couple: Uniting Large Language Models and Knowledge Graphs for En...The perfect couple: Uniting Large Language Models and Knowledge Graphs for En...
The perfect couple: Uniting Large Language Models and Knowledge Graphs for En...
 
Amsterdam - The Neo4j Graph Data Platform Today & Tomorrow
Amsterdam - The Neo4j Graph Data Platform Today & TomorrowAmsterdam - The Neo4j Graph Data Platform Today & Tomorrow
Amsterdam - The Neo4j Graph Data Platform Today & Tomorrow
 
Using TensorFlow for Machine Learning
Using TensorFlow for Machine LearningUsing TensorFlow for Machine Learning
Using TensorFlow for Machine Learning
 
Neo4j: The path to success with Graph Database and Graph Data Science
Neo4j: The path to success with Graph Database and Graph Data ScienceNeo4j: The path to success with Graph Database and Graph Data Science
Neo4j: The path to success with Graph Database and Graph Data Science
 
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
 
El camino hacia el éxito con las bases de datos de grafos, la ciencia de dato...
El camino hacia el éxito con las bases de datos de grafos, la ciencia de dato...El camino hacia el éxito con las bases de datos de grafos, la ciencia de dato...
El camino hacia el éxito con las bases de datos de grafos, la ciencia de dato...
 
Government GraphSummit: Optimizing the Supply Chain
Government GraphSummit: Optimizing the Supply ChainGovernment GraphSummit: Optimizing the Supply Chain
Government GraphSummit: Optimizing the Supply Chain
 
SNAwithNeo4j
SNAwithNeo4jSNAwithNeo4j
SNAwithNeo4j
 
Nordics Edition - The Neo4j Graph Data Platform Today & Tomorrow
Nordics Edition - The Neo4j Graph Data Platform Today & TomorrowNordics Edition - The Neo4j Graph Data Platform Today & Tomorrow
Nordics Edition - The Neo4j Graph Data Platform Today & Tomorrow
 
Artificial intelligence in IoT-to-core network operations and management
Artificial intelligence in IoT-to-core network operations and managementArtificial intelligence in IoT-to-core network operations and management
Artificial intelligence in IoT-to-core network operations and management
 
Neo4j Generative AI workshop at GraphSummit London 14 Nov 2023.pdf
Neo4j Generative AI workshop at GraphSummit London 14 Nov 2023.pdfNeo4j Generative AI workshop at GraphSummit London 14 Nov 2023.pdf
Neo4j Generative AI workshop at GraphSummit London 14 Nov 2023.pdf
 
La strada verso il successo con i database a grafo, la Graph Data Science e l...
La strada verso il successo con i database a grafo, la Graph Data Science e l...La strada verso il successo con i database a grafo, la Graph Data Science e l...
La strada verso il successo con i database a grafo, la Graph Data Science e l...
 
Graph Data Science: The Secret to Accelerating Innovation with AI/ML
Graph Data Science: The Secret to Accelerating Innovation with AI/MLGraph Data Science: The Secret to Accelerating Innovation with AI/ML
Graph Data Science: The Secret to Accelerating Innovation with AI/ML
 
Einstieg in Neo4j Graph Data Science
Einstieg in Neo4j Graph Data ScienceEinstieg in Neo4j Graph Data Science
Einstieg in Neo4j Graph Data Science
 
Using Connected Data and Graph Technology to Enhance Machine Learning and Art...
Using Connected Data and Graph Technology to Enhance Machine Learning and Art...Using Connected Data and Graph Technology to Enhance Machine Learning and Art...
Using Connected Data and Graph Technology to Enhance Machine Learning and Art...
 
A Fusion of Machine Learning and Graph Analysis for Free-Form Data Entry Clus...
A Fusion of Machine Learning and Graph Analysis for Free-Form Data Entry Clus...A Fusion of Machine Learning and Graph Analysis for Free-Form Data Entry Clus...
A Fusion of Machine Learning and Graph Analysis for Free-Form Data Entry Clus...
 
The Path To Success With Graph Database and Analytics
The Path To Success With Graph Database and AnalyticsThe Path To Success With Graph Database and Analytics
The Path To Success With Graph Database and Analytics
 
Chug dl presentation
Chug dl presentationChug dl presentation
Chug dl presentation
 

Plus de Neo4j

Plus de Neo4j (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
QIAGEN: Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
QIAGEN: Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansQIAGEN: Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
QIAGEN: Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...
ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...
ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...
 
BBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafos
BBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafosBBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafos
BBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafos
 
Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...
Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...
Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Neo4j_Exploring the Impact of Graph Technology on Financial Services.pdf
Neo4j_Exploring the Impact of Graph Technology on Financial Services.pdfNeo4j_Exploring the Impact of Graph Technology on Financial Services.pdf
Neo4j_Exploring the Impact of Graph Technology on Financial Services.pdf
 
Rabobank_Exploring the Impact of Graph Technology on Financial Services.pdf
Rabobank_Exploring the Impact of Graph Technology on Financial Services.pdfRabobank_Exploring the Impact of Graph Technology on Financial Services.pdf
Rabobank_Exploring the Impact of Graph Technology on Financial Services.pdf
 
Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG time
 
Neo4j: Data Engineering for RAG (retrieval augmented generation)
Neo4j: Data Engineering for RAG (retrieval augmented generation)Neo4j: Data Engineering for RAG (retrieval augmented generation)
Neo4j: Data Engineering for RAG (retrieval augmented generation)
 
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdfNeo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
 
Enabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge GraphsEnabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge Graphs
 
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdf
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdfNeo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdf
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdf
 
Neo4j Jesus Barrasa The Art of the Possible with Graph
Neo4j Jesus Barrasa The Art of the Possible with GraphNeo4j Jesus Barrasa The Art of the Possible with Graph
Neo4j Jesus Barrasa The Art of the Possible with Graph
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Dernier (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Demystifying Graph Neural Networks

  • 1. © 2023 Neo4j, Inc. All rights reserved. © 2023 Neo4j, Inc. All rights reserved. 1 Demystifying Graph Neural Networks (GNNs) Zach Blumenfeld Product Specialist, Graph Data Science
  • 2. © 2023 Neo4j, Inc. All rights reserved. Agenda • TL;DR • Graph & Graph Machine Learning Overview • GNN Overview • Neo4j Graph Data Science & GNN Support • Takeaways and Additional Resources
  • 3. © 2023 Neo4j, Inc. All rights reserved. TL;DR • GNNs have a lot potential in certain use cases and can provide wins over simpler approaches • Neo4j has multiple features for supporting and scaling GNNs However… • GNNs aren’t a panacea for Graph ML • Many projects getting started with graph ML do not need GNNs, there may even be bigger gains to be had elsewhere Disclaimer: 30 minutes, general audience, big/complex topic - I am going to oversimplify a few things
  • 4. © 2023 Neo4j, Inc. All rights reserved. 4 Graph & Graph Machine Learning Overview
  • 5. © 2023 Neo4j, Inc. All rights reserved. What is a Graph? Simply put, a graph consists of nodes connected by relationships Graph data platforms, like Neo4j, structure and store data as graphs
  • 6. © 2023 Neo4j, Inc. All rights reserved. 6 Node Represents an entity in the graph Relationship Connect nodes to each other Property Describes a node or relationship: e.g. name, age, weight etc Property Graph Components Person Person Car LOVES Nodes represent entities/objects in the graph
  • 7. © 2023 Neo4j, Inc. All rights reserved. 7 Node Represents an entity in the graph Relationship Connect nodes to each other Property Describes a node or relationship: e.g. name, age, weight etc Person Person Car LOVES KNOWS KNOWS LIVES WITH Nodes represent entities/objects in the graph Relationships represent associations or interactions between nodes Property Graph Components
  • 8. © 2023 Neo4j, Inc. All rights reserved. 8 Node Represents an entity in the graph Relationship Connect nodes to each other Property Describes a node or relationship: e.g. name, age, weight etc Person Person Name: “Andre” Born: May 29, 1970 Twitter: “@dan” Name: “Mica” Born: Dec 5, 1975 Car Brand “Volvo” Model: “V70” Since: Jan 10, 2011 LOVES KNOWS KNOWS LIVES WITH Nodes represent entities/objects in the graph Relationships represent associations or interactions between nodes Properties represent attributes of nodes and/or relationships Property Graph Components
  • 9. © 2023 Neo4j, Inc. All rights reserved. 9 • Directly leverage relationships between data points to access information that would otherwise be difficult to obtain in other formats • If the context of relationships are important for driving operations or analytics, then graphs can be valuable for you Why Graph?
  • 10. © 2023 Neo4j, Inc. All rights reserved. What is Graph Machine Learning? Graph Machine Learning is the application of ML to graphs specifically for predictive and prescriptive tasks One of the best ways to begin to understand graph machine learning is by understanding the different types of tasks they cover
  • 11. © 2023 Neo4j, Inc. All rights reserved. Supervised Graph Machine Learning Tasks Node Property Prediction Link Prediction Link Property Prediction Graph Property Prediction Predict a discrete or continuous node property, called node classification and node regression respectively. Predict if a relationship should exist between two nodes. Binary classification Predict a discrete or continuous property of an existing relationship Predict a discrete or continuous property of a graph or subgraph SIMILAR_TO InhibitRep: 0 InhibitRep: 0 InhibitRep: 1 InhibitRep: 1
  • 12. © 2023 Neo4j, Inc. All rights reserved. 12 Graph Machine Learning…the Main Thing 12 ● Graphs can be be represented by adjacency matrices ● Small examples depicted below ● Not always symmetric and 0/1. Some graphs are directed and/or have relationship weights Compression is Key!
  • 13. © 2023 Neo4j, Inc. All rights reserved. 13 Graph Machine Learning…the Main Thing 13 Compression is Key! ● As real-world graphs grow in size the become large sparse data structures ● Reduced dimensionality features are required for graph machine learning One relationship traversal entails O(n2) complexity. Multiple, m, traversals entail O(nm+1) Graph Structure Adjacency Matrix Representation
  • 14. © 2023 Neo4j, Inc. All rights reserved. How to Accomplish Compression? Embedding (non-GNN) Classic Graph Algorithms Graph Neural Networks (GNN) Low-dim vector representations of nodes s.t similarity between vectors approximates similarity between nodes (can also be for links, paths, or graphs) Results from algorithms like pagerank for centrality, Louvain for community detection, or node similarity End-to-end solution for the ML task. Compression happens in hidden layers and is learned during model training
  • 15. © 2023 Neo4j, Inc. All rights reserved. 15 Graph Neural Network Overview
  • 16. © 2023 Neo4j, Inc. All rights reserved. GNNs are a Generalization of Convolutional Neural Networks (CNNs) CNNs process data with a fixed grid-like topology, such as images, videos, and audio GNNs extend to topologies without fixed ordering, size, or patterns…a.k.a graphs
  • 17. © 2023 Neo4j, Inc. All rights reserved. Convolutional Layers Have 2 Primary Components 1. Filtering or “kernels” collect and smooth information across regions of the input. a. output is called a “convolved feature”. b. kernel function weights learned during training 1. Filtering or “kernels” collect and smooth information across regions of the input. a. output is called a “convolved feature”. b. kernel function weights learned during training 1. Pooling aggregates the convolved feature to reduce dimensionality while maintaining important signals. a. can be done via averaging, choosing the max value, or other pooling function Images from A Comprehensive Guide to Convolutional Neural Networks (Towards Data Science) and http://deeplearning.stanford.edu/tutorial/supervised/Pooling/ respectively
  • 18. © 2023 Neo4j, Inc. All rights reserved. Stack Convolutional Layers with a Few Other Things = CNN Example CNN for Image Classification Image from A Comprehensive Guide to Convolutional Neural Networks (Towards Data Science)
  • 19. © 2023 Neo4j, Inc. All rights reserved. GNN Layers are Similar with 2 Mirroring Components 1. Message Passing (MP) collects information around a nodes neighborhood 1) Message Passing 2) Aggregation 1. Message Passing (MP) collects information around a nodes neighborhood 1. Aggregation (Agg) aggregates message passing information and assign to each node* in the graph Images adapted from https://uvadlc- notebooks.readthedocs.io/en/latest/tutorial_notebooks/tutorial7/GNN_overview.html
  • 20. © 2023 Neo4j, Inc. All rights reserved. Stack These Layers with a Few Other Things = GNN Example GNN for Node Classification
  • 21. © 2023 Neo4j, Inc. All rights reserved. Different Types of GNNs • Graph Convolutional Network (GCN): Basic case that makes up a large number of GNNs. Average and normalize representations from neighbor nodes • Graph Sample and Aggregation (GraphSAGE): Uses sampling at different hops before aggregating with pooling to help with scalability • Graph Attention Network (GAT): Learns to weight node neighborhoods based on importances using attention mechanism (similar to transformers) …and more, see resources
  • 22. © 2023 Neo4j, Inc. All rights reserved. Graph Neural Networks (GNNs) Strengths and Weaknesses Strengths ● Can automatically learns important signals in the graph ● Most recent GNNs are inductive (train a model and predict on new graph data) ● Potential to handle deep complex graph structure ● End-to-end solution for supervised learning Weaknesses ● Relatively complicated. Can still be difficult to construct, tune, and avoid overfitting. Requires high degree of technical expertise. ● Can be difficult to scale. High time & space complexity. Usually requires accelerated hardware - like GPU. ● Limited depth. Usually “shallow” to prevent over-smoothing and/or reaching the diameter of the graph ● Low interpretability/explainability
  • 23. © 2023 Neo4j, Inc. All rights reserved. 23 Neo4j Graph Data Science & GNNs
  • 24. © 2023 Neo4j, Inc. All rights reserved. © 2023 Neo4j, Inc. All rights reserved. 24 Answer your Questions with Neo4j Graph Data Science Data Sources Data Science and Analytics Tools Explorative tools, rich algorithm library, and Integrated supervised Machine Learning framework. Native Graph Database The foundation of the Neo4j platform; delivers enterprise-scale and performance, security, and data integrity for transaction and analytical workloads. Development Tools & Frameworks Tooling, APIs, query builder, multi-language support for development, admin, modeling, and rapid prototyping needs. Discovery & Visualization Code-free querying, data modeling and exploration tools for data scientists, developers, and analysts. Graph Query Language Support Cypher & openCypher; ongoing leadership and standards work (GQL) to establish lingua franca for graphs. Ecosystem & Integrations Rich ecosystem of tech and integration partners. Ingestion tools (JDBC, Kafka, Spark, BI Tools, etc.) for bulk and streaming needs. Runs Anywhere Deploy as-a-Service (AuraDS) or self-hosted within your cloud of choice (AWS, GCP, Azure) via their marketplace, or on-premises. Data Connectors Transactions Analytics Graph Database Data Consolidation Contextualization Enterprise Ready Data Science & MLOps Graph Data Science Neo4j Bloom Neo4j Browser BUSINESS USERS DEVELOPERS DATA SCIENTISTS DATA ANALYSTS BI Connectors AutoML Integrations Language interfaces
  • 25. © 2023 Neo4j, Inc. All rights reserved. Neo4j Graph Data Science Algorithms, Procedures & ML Graph Projections Neo4j Database Graph DS/ML Workspace highly optimized, massively parallel, scalable • Run graph algorithms to generate insights: 65+ algorithms across centrality, path finding, community detection, similarity, and more • Engineer graph features for ML: Leverage relationship information with algorithms & node embeddings • Build graph native ML pipelines: Link prediction, node classification & property regression • Integrate with external ML frameworks: Python client, blazing fast import & export, formatting for dataframes and tensors
  • 26. © 2023 Neo4j, Inc. All rights reserved. Sampling & Export for GNN Support Graph Sampling: sample a representative subgraph from a larger graph for training complex models Graph Export: use our projections in other graph ML libraries like Deep Graph Library (DGL), PyG, and Tensorflow GNN Image courtesy of Google Cloud
  • 27. © 2023 Neo4j, Inc. All rights reserved. Native GraphSAGE for Inductive Embedding • Native training and prediction • stored and tracked in model catalog: can be persisted, shared, and published • Good candidate for situations where you want to predict on updated data or new graphs with similar structure A A 010...01001l..00 11 ..n 1001l..001….. 010...n ...01001l..00 1...n ...01001l..00 1...n A SAMPLE AGGREGATE PREDICT Solves a specific problem: Learn graph structure and generate embeddings on new data in a fully inductive manner
  • 28. © 2023 Neo4j, Inc. All rights reserved. 28 Neo4j & GNN Demos
  • 29. © 2023 Neo4j, Inc. All rights reserved. 29 Additional Resources
  • 30. © 2023 Neo4j, Inc. All rights reserved. Technical Resources GNN & Graph ML example notebooks + additional resources neo4j-product-examples/graph-machine-learning-examples/gnns-with-neo4j
  • 31. © 2023 Neo4j, Inc. All rights reserved. Where to Get Neo4j Graph Data Science Data Science as a Service AuraDS Self Managed Neo4j Deploy where you want, customized architecture for your use case We manage the infrastructure so you can focus on data science neo4j.com/aura-ds neo4j.com/docs/graph-data-science/current/installation
  • 32. © 2023 Neo4j, Inc. All rights reserved. © 2023 Neo4j, Inc. All rights reserved. 32 Thank you! Contact us at sales@neo4j.com

Notes de l'éditeur

  1. Nodes can have labels Relationship have just one type Properties are a Key-value pair: String key; typed value (string, number, list, ...)
  2. Nodes can have labels Relationship have just one type Properties are a Key-value pair: String key; typed value (string, number, list, ...)
  3. Nodes can have labels Relationship have just one type Properties are a Key-value pair: String key; typed value (string, number, list, ...)
  4. Nodes can have labels Relationship have just one type Properties are a Key-value pair: String key; typed value (string, number, list, ...)