0% found this document useful (0 votes)
58 views

CS 224W 01-Intro

The course covers machine learning and representation learning for graph data using various graph neural network techniques. It includes topics like node embeddings, graph convolutional networks, knowledge graphs, and generative models for graphs. The course consists of lectures, assignments including homeworks and coding exercises, and a final project involving applying graph neural networks to a real-world problem.

Uploaded by

Jack Gala
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

CS 224W 01-Intro

The course covers machine learning and representation learning for graph data using various graph neural network techniques. It includes topics like node embeddings, graph convolutional networks, knowledge graphs, and generative models for graphs. The course consists of lectures, assignments including homeworks and coding exercises, and a final project involving applying graph neural networks to a real-world problem.

Uploaded by

Jack Gala
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 68

Note to other teachers and users of these slides: We would be delighted if you found our

material useful for giving your own lectures. Feel free to use these slides verbatim, or to modify
them to fit your own needs. If you make use of a significant portion of these slides in your own
lecture, please include this message, or a link to our web site: http://cs224w.Stanford.edu

CS224W: Machine Learning with Graphs


Jure Leskovec, Stanford University
http://cs224w.stanford.edu
CS224W: Machine Learning with Graphs
Jure Leskovec, Stanford University
http://cs224w.stanford.edu
We are going to explore Machine Learning and
Representation Learning for graph data:
§ Methods for node embeddings: DeepWalk, Node2Vec
§ Graph Neural Networks: GCN, GraphSAGE, GAT…
§ Graph Transformers
§ Knowledge graphs and reasoning: TransE, BetaE
§ Generative models for graphs: GraphRNN
§ Graphs in 3D: Molecules
§ Scaling up to large graphs
§ Applications to Biomedicine, Science, Technology
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 2
Date Topic Date Topic
1. Introduction to Machine Learning
Tue, 9/26 Tue, 10/31 11. GNNs for Recommenders
for Graphs
12. Deep Generative Models
Thu, 9/27 2. Node Embeddings Thu, 11/2
for Graphs
Tue, 10/3 3. Graph Neural Networks Tue, 11/7 13. Advanced Topics in GNNs

Thu, 10/5 4. Building blocks of GNNs Thu, 11/9 14. Graph Transformers

Tue, 10/10 5. GNN augmentation and training Tue, 11/14 15. Scaling up GNNs

Thu, 10/12 6. Theory of GNNs Thu, 11/16 16. Geometric Deep Learning

Tue, 10/17 7. Heterogenous graphs Tue, 11/28 17. Link Prediction and Causality

Thu, 10/19 8. Knowledge Graph Completion Thu, 11/30 18. Frontiers of GNN Research

19. Algorithmic reasoning with


Tue, 10/24 9. Complex Reasoning in KGs Tue, 12/5
GNNs
Thu, 10/26 10. Fast Neural Subgraph Matching Thu, 12/7 20. Conclusion

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 3


¡ The course is self-contained.
¡ No single topic is too hard by itself.
¡ But we will cover and touch upon many topics
and this is what makes the course hard.
§ Some background in:
§ Machine Learning
§ Algorithms and graph theory
§ Probability and statistics
§ Programming:
§ You should be able to write non-trivial programs (in Python)
§ Familiarity with PyTorch is a plus
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 4
¡ We use PyG (PyTorch Geometric):
§ The ultimate library for Graph Neural Networks
¡ We further recommend:
§ GraphGym: Platform for designing Graph Neural
Networks.
§ Modularized GNN implementation, simple hyperparameter
tuning, flexible user customization
§ Both platforms are very helpful for the course project
(save your time & provide advanced GNN
functionalities)
¡ Other network analytics tools: SNAP.PY, NetworkX
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 5
¡ The class meets Tue and Thu 3:00-4:20pm
Pacific Time in person
§ Videos of the lectures will be recorded and posted
on Canvas
¡ Structure of lectures:
§ ~80 minutes of a lecture
§ During this time you can ask questions
§ ~10 minutes of a live Q&A/discussion session at
the end of the lecture

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 6


11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 7
¡ http://cs224w.stanford.edu
§ Slides posted before the class
¡ Readings:
§ Graph Representation Learning Book by
Will Hamilton
§ Research papers
¡ Optional readings:
§ Papers and pointers to additional literature
§ This will be very useful for course projects

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 8


¡ Ed Discussion:
§ Access via link on Canvas
§ Please participate and help each other!
§ Don’t post code, annotate your questions, search for
answers before you ask
§ We will post course announcements to Ed (make
sure you check it regularly)
¡ Please don’t communicate with prof/TAs via
personal emails, but always use:
§ [email protected]
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 9
¡ OHs will be both in person and virtual
§ We will have OHs every day, starting from 2nd week
of the course
§ See http://web.stanford.edu/class/cs224w/oh.html
for Zoom links and link to QueueStatus
§ Schedule to be announced by end of week

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 10


¡ Final grade will be composed of:
§ Homework: 20%
§ 3 written homeworks, each worth 6.67%
§ Coding assignments: 15%
§ 5 coding assignments using Google Colab, each worth 3%
§ Exam: 35%
§ Course project: 30%
§ Proposal, Milestone, and Final report
§ Extra credit: Ed participation, PyG/GraphGym code
contribution
§ Used if you are on the boundary between grades
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 11
¡ How to submit?
§ Upload via Gradescope
§ You will be automatically registered to Gradescope once
you officially enroll in CS224W
§ Homeworks, Colabs (numerical answers), and
project deliverables are submitted on Gradescope
¡ Total of 2 Late Periods (LP) per student
§ Max 1 LP per assignment (no LP for the final report)
§ LP gives 4 extra days: assignments usually due on
Thursday (11:59pm) à with LP, it is due the following
Monday (11:59pm)
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 12
¡ Homeworks (20%, n=3)
§ Written assignments take longer and take time
(~10-20h) – start early!
§ A combination of theory, algorithm design, and math
¡ Colabs (15%, n=5)
§ We have more Colabs but they are shorter
(~3-5h); Colab 0 is not graded.
§ Get hands-on experience coding and training GNNs;
good preparation for final projects and industry

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 13


¡ Single exam: Wednesday, Nov 29 (35%)
§ Take-home, open-book, timed
§ Administered via Gradescope
§ Released at 5 PM PT on Wednesday, Nov 29, available
until 5 AM PT on Friday, Dec 1.
§ Once you open it, you will have 120 minutes to
complete the exam.
§ Content
§ Will have written questions (similar to Homeworks),
Will possibly have a coding section (similar to Colabs)
§ More details to come!

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 14


¡ Details will be posted soon:
§ Focus is on real-world applications of GNNs
¡ Logistics
§ Groups of up to 3 students
§ Groups of 1 or 2 are allowed (but discouraged); the team size
will be taken under consideration when evaluating the scope
of the project. But 3 person teams can be more efficient.
§ Google Cloud credits
§ We will provide $50 in Google Cloud credits to each student
§ You can also get $300 with Google Free Trial
(https://cloud.google.com/free/docs/gcp-free-tier)
¡ Read: http://cs224w.stanford.edu/info.html
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 15
Assignment Due on (11:59pm PT)

Colab 0 Not graded


Colab 1 Thu, 10/12 (week 3)
Project Proposal Tue, 10/17 (week 4)
Homework 1 Thu, 10/19 (week 4)
Colab 2 Thu, 10/26 (week 5)
Homework 2 Thu, 11/2 (week 6)
Colab 3 Thu, 11/9 (week 7)
Project Milestone Thu, 11/9 (week 7)
Homework 3 Thu, 11/16 (week 8)
EXAM Wed, 11/29 5pm – Fri, 12/1 5am (week 9)
Colab 4 Thu, 11/30 (week 9)
Colab 5 Tue, 12/5 (week 10)
Project Report Thu, 12/14 (No Late Periods!)
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 16
Make sure you read
and understand it!

¡ We strictly enforce the Stanford Honor Code


§ Violations of the Honor Code include:
§ Copying or allowing another to copy from one’s own paper
§ Unpermitted collaboration
§ Plagiarism
§ Giving or receiving unpermitted aid on a take-home examination
§ Representing as one’s own work the work of another
§ Giving or receiving aid on an assignment under circumstances in
which a reasonable person should have known that such aid was
not permitted
§ The standard sanction for a first offense includes a one-
quarter suspension and 40 hours of community service.
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 17
Two ways to ask questions during lecture:
¡ In-person (encouraged)
¡ On Ed:
§ At the beginning of class, we will open a new
discussion thread dedicated to this lecture
§ When to ask on Ed?
§ If you have a minor clarifying question
§ If we run out of time to get to your question live
§ Otherwise, try raising your hand first!

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 18
¡ Colabs 0 and 1 will be released on our course
website at 3pm Thursday (9/28)
¡ Colab 0:
§ Does not need to be handed-in
¡ Colab 1:
§ Due on Thursday 10/12 (2 weeks from today)
§ Submit written answers and code on Gradescope
§ Will cover material from Lectures 1-4, but you
can get started right away!

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 19
CS224W: Machine Learning with Graphs
Jure Leskovec, Stanford University
http://cs224w.stanford.edu
Why Graphs?
Graphs are a general
language for describing and
analyzing entities with
relations/interactions

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 21


Image credit: SalientNetworks

Event Graphs Computer Networks Disease Pathways

Image credit: Wikipedia Image credit: visitlondon.com


Image credit: Pinterest

Food Webs Particle Networks Underground Networks


11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 22
Image credit: Medium Image credit: Science Image credit: Lumen Learning

Social Networks Economic Networks Communication Networks

Image credit: Missoula Current News Image credit: The Conversation

Citation Networks Internet Networks of Neurons


11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 23
Image credit: Maximilian Nickel et al Image credit: ese.wustl.edu Image credit: math.hws.edu

Knowledge Graphs Regulatory Networks Scene Graphs

Image credit: ResearchGate Image credit: MDPI Image credit: Wikipedia

Code Graphs Molecules 3D Shapes


11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 24
Complex domains have a rich relational
structure, which can be represented as a
relational graph
By explicitly modeling relationships we
achieve better performance!
Main question:
How do we take advantage of
relational structure for better
prediction?
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 25
Images

Text/Speech

Modern deep learning toolbox is designed


for simple sequences & grids
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 26
Modern
deep learning toolbox
is designed for
sequences & grids

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 27


How can we develop neural networks
that are much more broadly
applicable?
Graphs are the new frontier
of deep learning
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 28
ICLR 2023 keywords

Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 29


11/14/23
Networks are complex.
¡ Arbitrary size and complex topological
structure (i.e., no spatial locality like grids)

vs.
Text

Networks Images
¡ No fixed node ordering or reference point
¡ Often dynamic and have multimodal features
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 30
CS224W: Machine Learning with Graphs
Jure Leskovec, Stanford University
http://cs224w.stanford.edu
Movie 1
friend
Actor 1 Actor 2 co-worker
Peter Mary
Movie 3 Actor 4
Movie 2
friend
Tom
brothers

Actor 3 Albert

Protein 1 Protein 2
Protein 5

Protein 9 |N|=4
|E|=4
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 32
¡ A heterogeneous graph is defined as
𝑮 = 𝑽, 𝑬, 𝑹, 𝑻
§ Nodes with node types 𝑣! ∈ 𝑉
§ Edges with relation types 𝑣! , 𝑟, 𝑣" ∈ 𝐸
§ Node type 𝑇 𝑣!
§ Relation type 𝑟 ∈ 𝑅
§ Nodes and edges have attributes/features

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 33
Biomedical Knowledge Graphs Academic Graphs
Example node: Migraine Example node: ICML
Example edge: (fulvestrant, Treats, Breast Neoplasms) Example edge: (GraphSAGE, NeurIPS)
Example node type: Protein Example node type: Author
Example edge type (relation): Causes Example edge type (relation): pubYear

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 34
¡ How to build a graph:
§ What are nodes?
§ What are edges?
¡ Choice of the proper network representation
of a given domain/problem determines our
ability to use networks successfully:
§ In some cases, there is a unique, unambiguous
representation
§ In other cases, the representation is by no means
unique
§ The way you assign links will determine the nature
of the question you can study
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 35
Undirected Directed
¡ Links: undirected ¡ Links: directed
(symmetrical, reciprocal)
L D
A B
F M C

I
D
E
B G G
A
H
F
C

¡ Other considerations:
§ Weights § Types
§ Properties § Attributes
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 36
¡ Bipartite graph is a graph whose nodes can A
be divided into two disjoint sets U and V such that
every link connects a node in U to one in V; that is, B
U and V are independent sets
C

¡ Examples: D
§ Authors-to-Papers (they authored)
E
§ Actors-to-Movies (they appeared in)
§ Users-to-Movies (they rated)
U V
§ Recipes-to-Ingredients (they contain)
¡ “Folded” networks:
§ Author collaboration networks
§ Movie co-rating networks
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 37
CS224W: Machine Learning with Graphs
Jure Leskovec, Stanford University
http://cs224w.stanford.edu
Node level

Graph-level
Community
prediction,
(subgraph)
Graph
level
generation

Edge-level

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 39


¡ Node-level prediction
¡ Link-level prediction
¡ Graph-level prediction

? Node-level Graph-level
Link-level
? B
F
?
A

D E

G
C

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 41
? ?

?
? Machine
Learning
?

Node classification

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 42
Goal: Characterize the structure and position of
a node in the network:
§ Node degree
§ Node importance & position
§ E.g., Number of shortest paths passing through a node
§ E.g., Avg. shortest path length to other nodes
§ Substructures around B
the node F
A

D E

G
C

H
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 43
Graphlet Degree Vector
et Degree
aphlet Vector
Degree Vector
An automorphism “orbit” takes into account the
symmetries
¡ Graphlets: of the graph vector of rooted subgraphs
A count
rphism “orbit”“orbit”
utomorphism takes into account
takes the
into account the
theat
smetries
of The ofathe
graphgiven
graphletgraphnode.
degree vector is a feature vector with
¡ Example:
the frequency of the node in each
All possible orbit on
graphlets position
up to 3 nodes
et degreedegree
graphlet vector vector
is a feature vector vector
is a feature with with
ncy of the node
frequency of theinnode
eachin orbit
eachposition
orbit position
𝑢

Graphlet instances of node u:


𝑎 𝑏 𝑐 𝑑
Graphlets of node 𝑢:
𝑎, 𝑏, 𝑐, 𝑑
[2,1,0,2]
Pedro Ribeiro

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 44
Algorithm Dataset
BlogCatalog PPI Wikipe
Spectral Clustering 0.0405 0.0681 0.039
DeepWalk 0.2110 0.1768 0.127
LINE 0.0784 0.1447 0.116
node2vec 0.2581 0.1791 0.155
node2vec settings (p,q) 0.25, 0.25 4, 1 4, 0.
Different ways to label nodes of the network: Gain of node2vec [%] 22.3 1.3 21.8

Table 2: Macro-F1 scores for multilabel classification on


Catalog, PPI (Homo sapiens) and Wikipedia word coo
rence networks with a balanced 50% train-test split.

labeled data with a grid search over p, q 2 {0.25, 0.50, 1,


Under the above experimental settings, we present our resu
two tasks under consideration.

4.3 Multi-label classification


In the multi-label classification setting, every node is ass
one or more labels from a finite set L. During the training phas
observe a certain fraction of nodes and all their labels. The t
to predict the labels for the remaining nodes. This is a challe
Figure 3: Complementary visualizations of Les Misérables co- task especially if L is large. We perform multi-label classifi
appearance network generated by node2vec with label colors on the following datasets:
Node features defined so
reflecting homophily (top) and structural equivalence (bottom). However, the features
• BlogCatalog [44]: This is a network of social relation
of the bloggers listed on the BlogCatalog website. T
far would allow to
also exclude a recent approach, GraRep [6], that generalizes LINE
defines so far would not
bels represent blogger interests inferred through the
data provided by the bloggers. The network has 10,312
distinguish
to incorporate information fromnodes in the
network neighborhoods beyond 2-
hops, but does not scale and hence, provides an unfair comparison
allow for distinguishing the
333,983 edges and 39 different labels.
• Protein-Protein Interactions (PPI) [5]: We use a sub
with other neuralabove example
embedding based feature learning methods. Apart above node labelling
of the PPI network for Homo Sapiens. The subgraph
from spectral clustering which has a slightly higher time complex-
responds to the graph induced by nodes for which we
ity since it involves matrix factorization, our experiments stand out
obtain labels from the hallmark gene sets [21] and rep
from prior work in the sense that all other
11/14/23 comparison
Jure Leskovec, Stanfordbenchmarks
CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 45
Computationally predict a protein’s 3D structure
based solely on its amino acid sequence:
For each node predict its 3D coordinates

Image credit: DeepMind


11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 46
Image credit: DeepMind
Image credit: SingularityHub

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 47


¡ Key idea: “Spatial graph”
§ Nodes: Amino acids in a protein sequence
§ Edges: Proximity between amino acids (residues)

Spatial graph Image credit: DeepMind


11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 48
CS224W: Machine Learning with Graphs
Jure Leskovec, Stanford University
http://cs224w.stanford.edu
¡ The task is to predict new/missing/unknown
links based on the existing links.
¡ At test time, node pairs (with no existing links)
are ranked, and top 𝐾 node pairs are predicted.
¡ Task: Make a prediction for a pair of nodes.

? B
F
A

D E

G
C
? H
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 50
Two formulations of the link prediction task:
¡ 1) Links missing at random:
§ Remove a random set of links and then
aim to predict them
¡ 2) Links over time:
§ Given 𝐺[𝑡# , 𝑡#$ ] a graph defined by edges
up to time 𝑡#$ , output a ranked list L
of edges (not in 𝐺[𝑡# , 𝑡#$ ]) that are
𝐺[𝑡! , 𝑡!" ]
predicted to appear in time 𝐺[𝑡% , 𝑡%$ ] 𝐺[𝑡# , 𝑡#" ]
§ Evaluation:
§ n = |Enew|: # new edges that appear during
the test period [𝑡!, 𝑡!"]
11/14/23
§ Take top n elements of L and count correct edges
Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 51
¡ Users interacts with items
§ Watch movies, buy merchandise, listen to music
§ Nodes: Users and items
§ Edges: User-item interactions
¡ Goal: Recommend items users might like
Users
Interactions

“You might also like”


Items
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 52
Ying et al., Graph Convolutional Neural Networks for Web-Scale Recommender Systems, KDD 2018

Task: Recommend related pins to users


Task: Learn node
embeddings 𝑧! such that
𝑑 𝑧+,-.%, 𝑧+,-./
< 𝑑(𝑧+,-.%, 𝑧01.,2.3 )
Query pin

Predict whether two nodes in a graph are related


𝑧

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 8


Prescribed
Many patients take multiple drugsDrug
to treat
drugs side effect
complex or co-existing diseases:
¡ 46% of people ages 70-79 take more than 5 drugs
¡ Many patients take more than 20 drugs to treat
heart disease, depression, insomnia, etc.
Task: Given a pair of drugs predict
adverse side effects

30%
, 65%
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs
prob. prob. 54
Zitnik et al., Modeling Polypharmacy Side Effects with Graph Convolutional Networks, Bioinformatics 2018

¡ Nodes: Drugs & Proteins Query: How likely


¡ Edges: Interactions will Simvastatin and
Ciprofloxacin, when
taken together,
break down muscle
tissue?

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 55


Zitnik et al., Modeling Polypharmacy Side Effects with Graph Convolutional Networks, Bioinformatics 2018

Drug c Drug d Evidence found

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 56


CS224W: Machine Learning with Graphs
Jure Leskovec, Stanford University
http://cs224w.stanford.edu
¡ Goal: We want make a prediction for an
entire graph or a subgraph of the graph.

¡ For example:
B
F
A

D E

G
C

H
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 58
¡ a

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 59


¡ Nodes: Road segments
¡ Edges: Connectivity between road segments
¡ Prediction: Time of Arrival (ETA)

Image credit: DeepMind

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 60


Predicting Time of Arrival with Graph Neural
Networks

¡ Used in Google Maps

Image credit: DeepMind


11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 61
¡ Antibiotics are small molecular graphs
§ Nodes: Atoms
§ Edges: Chemical bonds

Konaklieva, Monika I. "Molecular targets of β-lactam-based antimicrobials: Image credit: CNN


beyond the usual suspects." Antibiotics 3.2 (2014): 128-142.

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 62


Stokes et al., A Deep Learning Approach to Antibiotic Discovery, Cell 2020

¡ A Graph Neural Network graph classification model


¡ Predict promising molecules from a pool of candidates

Stokes, Jonathan M., et al. "A deep learning approach to antibiotic discovery."
Cell 180.4 (2020): 688-702.

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 63


Sanchez-Gonzalez et al., Learning to simulate complex physics with graph networks, ICML 2020

Physical simulation as a graph:


¡ Nodes: Particles
¡ Edges: Interaction between particles

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 64


Sanchez-Gonzalez et al., Learning to simulate complex physics with graph networks, ICML 2020

A graph evolution task:


¡ Goal: Predict how a graph will evolve over
time

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 65


https://medium.com/syncedreview/deepmind-googles-ml-based-graphcast-outperforms-the-world-s-best-medium-range-weather-
9d114460aa0c
11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 66
Node level

Graph-level
Community
prediction,
(subgraph)
Graph
level
generation

Edge-level

11/14/23 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs 67

You might also like