Explaining Graph Neural Networks
Fabrizio Silvestri
Artificial Intelligence for Biomedical Applications - AI4BA 2024
25 Giugno 2024
Introduction to Machine Learning
Where we recap, quickly, what ML is and why it is important…
AI4BA 2024 - June 25, 2024
Computer Programming
AI4BA 2024 - June 25, 2024
Computer Programming
AI4BA 2024 - June 25, 2024
010011011
110111001
…
010110001
Encoding of
Computable Function f
Solution/Algorithm
explicitly designed by human
Problem
Computer Programming
AI4BA 2024 - June 25, 2024
Y = f(X)
Output
Y
01001101
…
01011001
Input
X
f
Can We Always Do That?
AI4BA 2024 - June 25, 2024
Chihuahua or Muffin?
AI4BA 2024 - June 25, 2024
Chihuahua or Muffin?
AI4BA 2024 - June 25, 2024
Well…
AI4BA 2024 - June 25, 2024
Well…
AI4BA 2024 - June 25, 2024
Well…
AI4BA 2024 - June 25, 2024
Programming vs. Learning
AI4BA 2024 - June 25, 2024
Programming vs. "Training" a Computer
Machine Learning
AI4BA 2024 - June 25, 2024
Problem
Labeled Data
Machine Learning
AI4BA 2024 - June 25, 2024
Problem
Labeled Data
Machine Learning
AI4BA 2024 - June 25, 2024
Problem
Labeled Data
Solution/Algorithm
learned by computer from data: (input, output) pairs
Machine Learning
AI4BA 2024 - June 25, 2024
Problem
Labeled Data
01001101
11011100
…
01011000
Encoding of
Computable Function f
Solution/Algorithm
learned by computer from data: (input, output) pairs
Machine Learning
AI4BA 2024 - June 25, 2024
Problem
Labeled Data
01001101
11011100
…
01011000
Encoding of
Computable Function f
Solution/Algorithm
learned by computer from data: (input, output) pairs
Eventually, the function f is learned by the learning algorithm from a (large) set of labeled data
Machine Learning
AI4BA 2024 - June 25, 2024
Machine Learning
AI4BA 2024 - June 25, 2024
"The field of study that gives computers the ability to learn without being explicitly programmed"
Arthur Samuel
Machine Learning
AI4BA 2024 - June 25, 2024
"A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E"
Tom Mitchell
"The field of study that gives computers the ability to learn without being explicitly programmed"
Arthur Samuel
Machine Learning: A Taxonomy
AI4BA 2024 - June 25, 2024
Supervised Learning
AI4BA 2024 - June 25, 2024
Supervised Learning
Where we introduce the tasks that are amongst the most used …
AI4BA 2024 - June 25, 2024
Supervised Learning
AI4BA 2024 - June 25, 2024
The Pipeline
AI4BA 2024 - June 25, 2024
0. Be sure your problem needs actually to be tackled using Machine Learning techniques
(i.e., there is no point in adopting any fancy ML solution if it can be solved “directly”!)
The Pipeline
AI4BA 2024 - June 25, 2024
0. Be sure your problem needs actually to be tackled using Machine Learning techniques
(i.e., there is no point in adopting any fancy ML solution if it can be solved “directly”!)
1. Data collection: get data from your domain of interest
The Pipeline
AI4BA 2024 - June 25, 2024
0. Be sure your problem needs actually to be tackled using Machine Learning techniques
(i.e., there is no point in adopting any fancy ML solution if it can be solved “directly”!)
1. Data collection: get data from your domain of interest
2. Feature extraction: represent data in a “machine-friendly” format
The Pipeline
AI4BA 2024 - June 25, 2024
0. Be sure your problem needs actually to be tackled using Machine Learning techniques
(i.e., there is no point in adopting any fancy ML solution if it can be solved “directly”!)
1. Data collection: get data from your domain of interest
2. Feature extraction: represent data in a “machine-friendly” format
3. Model training: “build” one (or more) learning models
The Pipeline
AI4BA 2024 - June 25, 2024
0. Be sure your problem needs actually to be tackled using Machine Learning techniques
(i.e., there is no point in adopting any fancy ML solution if it can be solved “directly”!)
1. Data collection: get data from your domain of interest
2. Feature extraction: represent data in a “machine-friendly” format
3. Model training: “build” one (or more) learning models
4. Model selection/evaluation: pick the best-performing model according to some quality metrics
Feature Extraction
AI4BA 2024 - June 25, 2024
Collected data need to be encoded with a machine-readable format
Domain Objects
…
Feature Extraction
AI4BA 2024 - June 25, 2024
0.27 | 3.8 | 1.12 | … | 4.75 | … | … | 56.9 |
0.0 | 3.65 | 0.04 | … | 6.81 | … | … | 1.0 |
Collected data need to be encoded with a machine-readable format
Domain Objects
6.94 | 5.4 | 0.9 | ... | 3.92 | ... | ... | 8.2 |
i-th object
Each domain object is translated into a n-dimensional vector of features
Feature Extraction
AI4BA 2024 - June 25, 2024
0.27 | 3.8 | 1.12 | … | 4.75 | … | … | 56.9 |
0.0 | 3.65 | 0.04 | … | 6.81 | … | … | 1.0 |
Collected data need to be encoded with a machine-readable format
Domain Objects
6.94 | 5.4 | 0.9 | ... | 3.92 | ... | ... | 8.2 |
i-th object
Each domain object is translated into a n-dimensional vector of features
j-th feature
AI4BA 2024 - June 25, 2024
The Manifold Hypothesis
High dimensional data (e.g., images) lie on low-dimensional manifolds
(i.e., sub-space) embedded in the high-dimensional space
The Manifold Hypothesis
AI4BA 2024 - June 25, 2024
Random samples from 400-d space
True digits living in a
400-d space
The Manifold Hypothesis
AI4BA 2024 - June 25, 2024
Estimating Generalization Performance
AI4BA 2024 - June 25, 2024
How Much Data?
AI4BA 2024 - June 25, 2024
source: https://xkcd.com/1838/
Model Zoo
AI4BA 2024 - June 25, 2024
KNN
K-means
LogReg
LinReg
MLP
LSTM
CNN
Random
Forest
SVM
GNN
DBSCAN
No Free Lunch Theorem
AI4BA 2024 - June 25, 2024
Deep Learning
Where we introduce (deep) neural networks and the features they learn …
AI4BA 2024 - June 25, 2024
Model Training
AI4BA 2024 - June 25, 2024
Hypothesis Space
AI4BA 2024 - June 25, 2024
Hypothesis Space
AI4BA 2024 - June 25, 2024
Trade-off
Put some constraints on H, e.g., limit the search space only to linear functions
Loss Functions
AI4BA 2024 - June 25, 2024
The Learning Algorithm
AI4BA 2024 - June 25, 2024
Learning f as an optimization problem
AI4BA 2024 - June 25, 2024
Gradient Descent
AI4BA 2024 - June 25, 2024
for t=0… (until convergence) {
}
Shallow Neural Networks
AI4BA 2024 - June 25, 2024
Shallow Neural Networks
AI4BA 2024 - June 25, 2024
Shallow Neural Networks
AI4BA 2024 - June 25, 2024
a[-] activation func.
Shallow Neural Networks
AI4BA 2024 - June 25, 2024
Linear layers
ReLU
AI4BA 2024 - June 25, 2024
Shallow Neural Networks
AI4BA 2024 - June 25, 2024
Shallow Neural Networks
AI4BA 2024 - June 25, 2024
Deep Neural Networks
AI4BA 2024 - June 25, 2024
Example: 3 Hidden Layer NN
AI4BA 2024 - June 25, 2024
Decision Boundary
AI4BA 2024 - June 25, 2024
The Effect of Depth in Learning
AI4BA 2024 - June 25, 2024
Inductive Biases
AI4BA 2024 - June 25, 2024
1920x1080
Inductive Biases
AI4BA 2024 - June 25, 2024
Graph Learning
Where we show an important inductive bias in Neural Network design …
AI4BA 2024 - June 25, 2024
Data vs. Architectures
AI4BA 2024 - June 25, 2024
Data vs. Architectures
AI4BA 2024 - June 25, 2024
Data vs. Architectures
AI4BA 2024 - June 25, 2024
Data vs. Architectures
AI4BA 2024 - June 25, 2024
Data vs. Architectures
AI4BA 2024 - June 25, 2024
node
edge
Graph-shaped Data
AI4BA 2024 - June 25, 2024
Graph-shaped Data
AI4BA 2024 - June 25, 2024
Graph-shaped Data
AI4BA 2024 - June 25, 2024
Graph-shaped Data
AI4BA 2024 - June 25, 2024
Some Notation
AI4BA 2024 - June 25, 2024
Node Features
AI4BA 2024 - June 25, 2024
Node Representation with Node Features
AI4BA 2024 - June 25, 2024
AI4BA 2024 - June 25, 2024
AI4BA 2024 - June 25, 2024
Permutations of Node Indices
AI4BA 2024 - June 25, 2024
AI4BA 2024 - June 25, 2024
What is a Graph Neural Network
AI4BA 2024 - June 25, 2024
Tasks on Graphs
AI4BA 2024 - June 25, 2024
Tasks on Graphs
AI4BA 2024 - June 25, 2024
Graph-Level Tasks
AI4BA 2024 - June 25, 2024
Node-Level Tasks
AI4BA 2024 - June 25, 2024
Edge-Level Tasks
AI4BA 2024 - June 25, 2024
Take Home Message
What have we learnt, so far…
AI4BA 2024 - June 25, 2024
Remember Remember…
AI4BA 2024 - June 25, 2024