SlideShare a Scribd company logo
Graph Kernel
CS15MTECH11011
THESIS(STAGE I)
Outline
oKernel
oGraph Kernel
oShortest Path Kernel
oGraphlet Kernel
oWL Kernel
oExperimentation
oResults
oConclusion
Kernels
 A kernel is a function of two objects that quantifies their similarity.
Any kernel methods solution comprises two parts: a module that performs the mapping into the
embedding or feature space and a learning algorithm designed to discover linear patterns in that
space.
K(X,X’)=(Φ(X),Φ(X’))
Where Φ is the feature space transformation.
Property: Symmetric Positive-Definite
C’KC≥0;
Graph Kernel
Outline
oKernel
oGraph Kernel
oShortest Path Kernel
oGraphlet Kernel
oWL Kernel
oExperimentation
oResults
oConclusion
Graph Kernel
Graph kernels are used to find similarity between two graphs.
It exploits graph topology but, restricts itself to comparing substructure of graph that are
computable in polynomial time.
Property: Symmetric positive-Definite.
Many Graph Kernels have been defined, we will focus on mainly following:
1. Shortest Path Kernel
2. Graphlet Kernel
3. Weisfeiler-Lehman Kernel.
GRAPH KERNEL
Outline
oKernel
oGraph Kernel
oShortest Path Kernel
oGraphlet Kernel
oWL Kernel
oExperimentation
oResults
oConclusion
Shortest Path Kernel
Task: Find the shortest path of all lengths among the graphs.
Working:
1. Floyd Transformation of graph.
2. Apply shortest path kernel over that transformed graph.
Complexity: O(n4)
GRAPH KERNEL
SP Kernel(Cont.)
Floyd Transformation:
 Contains same number of nodes as input graph.
 Unlike, there exist an edge between nodes in transformed graph if there exist a walk
between the nodes in input graph.
 Edge are marked as shortest distance
between nodes
 Complexity O(n3) Floyd-Warshall algorithm
GRAPH KERNEL
SP Kernel(Cont.)
GRAPH KERNEL
Kernel: Let S1(E1,V1), S2(E2,V2) be two graphs
SP Kernel (Cont.)
GRAPH KERNEL
Outline
oKernel
oGraph Kernel
oShortest Path Kernel
oGraphlet Kernel
oWL Kernel
oExperimentation
oResults
oConclusion
Graphlet Kernel
Task: Count number of graphlet because isomorphic graphs have same graphlet distribution.
Count the number of graphlets of specific size, for linear computation.
There are possible graphlet of size k.
Let G and G’ be 2 graphs and S and S’ be their respective subgraphs.
Complexity: O(ndk-1)
 d=maximum degree of node
 k= size of graphlet
GRAPH KERNEL
Graphlet Kernel
 computing 3-graphlet kernel for connected component (triangle, V shapes).
GRAPH KERNEL
Outline
oKernel
oGraph Kernel
oShortest Path Kernel
oGraphlet Kernel
oWL Kernel
oExperimentation
oResults
oConclusion
Weisfeiler-Lehman Kernel
WL Algorithm:
GRAPH KERNEL
WL Algorithm :iteration 1
Each Iteration of WL test comprises of following steps:-
1.Multiset label determination and sorting
◦ O(m) via Bucket Sort
GRAPH KERNEL
WL Algorithm :iteration 1
Each Iteration of WL test comprises of following steps:-
1.Multiset label determination and sorting
◦ O(m) via Bucket Sort
2.label compression
◦ O(m) via Radix Sort
GRAPH KERNEL
WL Algorithm :iteration 1
Each Iteration of WL test comprises of following steps:-
1.Multiset label determination and sorting
◦ O(m) via Bucket Sort
2.label compression
◦ O(m) via Radix Sort
GRAPH KERNEL
WL Algorithm :iteration 1
Each Iteration of WL test comprises of following steps:-
1.Multiset label determination and sorting
◦ O(m) via Bucket Sort
2.label compression
◦ O(m) via Radix Sort
3. Relabeling
◦ O(n)
GRAPH KERNEL
WL Algorithm :iteration 1
Each Iteration of WL test comprises of following steps:-
1.Multiset label determination and sorting
◦ O(m) via Bucket Sort
2.label compression
◦ O(m) via Radix Sort
3. Relabeling
◦ O(n)
4.Are the labels of G and G’ identical?
Yes, continue.
GRAPH KERNEL
WL Algorithm :iteration 2
Each Iteration of WL test comprises of following steps:-
1.Multiset label determination and sorting
◦ O(m) via Bucket Sort
GRAPH KERNEL
WL Algorithm :iteration 2
Each Iteration of WL test comprises of following steps:
1.Multiset label determination and sorting
◦ O(m) via Bucket Sort
GRAPH KERNEL
WL Algorithm :iteration 2
Each Iteration of WL test comprises of following steps:
1.Multiset label determination and sorting
◦ O(m) via Bucket Sort
2.label compression
◦ O(m) via Radix Sort
GRAPH KERNEL
WL Algorithm :iteration 2
Each Iteration of WL test comprises of following steps:
1.Multiset label determination and sorting
◦ O(m) via Bucket Sort
2.label compression
◦ O(m) via Radix Sort
GRAPH KERNEL
WL Algorithm :iteration 2
Each Iteration of WL test comprises of following steps:-
1.Multiset label determination and sorting
◦ O(m) via Bucket Sort
2.label compression
◦ O(m) via Radix Sort
3. Relabeling
◦ O(n)
GRAPH KERNEL
WL Algorithm :iteration 2
Each Iteration of WL test comprises of following steps:-
1.Multiset label determination and sorting
◦ O(m) via Bucket Sort
2.label compression
◦ O(m) via Radix Sort
3. Relabeling
◦ O(n)
4.Are the labels of G and G’ identical?
NO, output YES.
5.complexity O(hm) for h iteration
GRAPH KERNEL
WL Kernel
Feature{2 3 4 5 6 7 8 9 10}
Φ(G1)={3 2 1 0 1 2 2 0 1}
Φ(G2)={3 2 1 2 1 0 0 2 1 }
K{G1,G2}=16
GRAPH KERNEL
Outline
oKernel
oGraph Kernel
oShortest Path Kernel
oGraphlet Kernel
oWL Kernel
oExperimentation
oResults
oConclusion
EXPERIMENT
1. INPUT: We have generated 3 different kind of input graphs.
a)Edge Removed Graphs: We took a complete graph and removed 10 edges at a time
from that graph, iteratively generate new graph.
b)Degree Reduced Graph: We took a complete graph and reduced the degree of each
node by 1,iteratively generate new graph.
c)Node Removed Graph: We took a complete graph and removed 1 node at a time from
that graph to generate new graph iteratively.
GRAPH KERNEL
EXPERIMENT
NORMALIZATION:
GRAPH KERNEL
Graphlet Kernel norm.
GRAPH KERNEL
WL Kernel norm.
GRAPH KERNEL
Shortest Path Kernel norm.
GRAPH KERNEL
SVM
Graph Label Assignment:10 belong to each class, iteratively.
10 Fold SVM
Function Used: ‘rbf’
Gamma=0.00001
Accuracy: mean Accuracy output from all 10 folds.
GRAPH KERNEL
Outline
oKernel
oGraph Kernel
oShortest Path Kernel
oGraphlet Kernel
oWL Kernel
oExperimentation
oResults
oConclusion
GRAPH KERNEL
GRAPH KERNEL
GRAPH KERNEL
Outline
oKernel
oGraph Kernel
oShortest Path Kernel
oGraphlet Kernel
oWL Kernel
oExperimentation
oResults
oConclusion
Conclusion
Accuracy:
Graphlet Kernel > WL Kernel > Shortest Path Kernel
I. Graphlet Kernel Exploits the topology very effectively by considering graphlet distribution.
II. Shortest Path Kernel shows least accuracy because it computes the number of shortest path
while not considering the topology involved in graphs.
III. WL Kernel shows moderate performance on our dataset.
IV. As we increase number of nodes the accuracy decreases because number of false
classification increases.
GRAPH KERNEL
Conclusion (cont.)
Time
Graphlet Kernel > Shortest Path Kernel > WL Kernel
I. Graphlet Kernel has highest computation time O(ndk-1),since our dataset is pretty dense.
II. Shortest Path Kernel O(n4).
III. WL Kernel O(Nhm).
N=number of Graphs.
h=number of iterations.
m=number of distinct labels.
GRAPH KERNEL

More Related Content

PPTX
Deep learning presentation
PDF
Adria Recasens, DeepMind – Multi-modal self-supervised learning from videos
PDF
Multimodal Deep Learning
PDF
(2017/06)Practical points of deep learning for medical imaging
PDF
Machine Learning for dummies!
PPTX
Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering
PPTX
End to-end semi-supervised object detection with soft teacher ver.1.0
PDF
Robustness in deep learning
Deep learning presentation
Adria Recasens, DeepMind – Multi-modal self-supervised learning from videos
Multimodal Deep Learning
(2017/06)Practical points of deep learning for medical imaging
Machine Learning for dummies!
Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering
End to-end semi-supervised object detection with soft teacher ver.1.0
Robustness in deep learning

What's hot (20)

PDF
Deep learning for medical imaging
PPT
Perceptron
PPTX
Multiclass classification of imbalanced data
PPTX
Deep Learning With Neural Networks
PDF
Introduction to pattern recognition
PPTX
Machine Learning for Disease Prediction
PPTX
Neural Networks and Deep Learning: An Intro
PPTX
Diffusion models beat gans on image synthesis
PPTX
Brain Tumor Detection Using Deep Neural Network.pptx
PDF
Finding connections among images using CycleGAN
PPTX
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
PPTX
A survey on graph kernels
PPTX
Natural Language Processing (NLP) - Introduction
PDF
Introduction to Recurrent Neural Network
PPTX
Autoencoder
PPTX
Feature Selection in Machine Learning
PPT
Support Vector Machines
PPTX
Quantum Computing and AI
PDF
General introduction to AI ML DL DS
PPTX
DISEASE PREDICTION SYSTEM USING DATA MINING
Deep learning for medical imaging
Perceptron
Multiclass classification of imbalanced data
Deep Learning With Neural Networks
Introduction to pattern recognition
Machine Learning for Disease Prediction
Neural Networks and Deep Learning: An Intro
Diffusion models beat gans on image synthesis
Brain Tumor Detection Using Deep Neural Network.pptx
Finding connections among images using CycleGAN
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
A survey on graph kernels
Natural Language Processing (NLP) - Introduction
Introduction to Recurrent Neural Network
Autoencoder
Feature Selection in Machine Learning
Support Vector Machines
Quantum Computing and AI
General introduction to AI ML DL DS
DISEASE PREDICTION SYSTEM USING DATA MINING
Ad

Viewers also liked (15)

PDF
Metodo Monte Carlo -Wang Landau
PDF
Webinar: Moving to Office 365? What You Need to Know!
PDF
Broadcast Release
PDF
DOC
Lei rerestrutura cms finalizada
PDF
Public cloud on System z
DOC
Regimento interno do conselho municipal de saúde de jequié
PPTX
Welcome To The Collaborative economy
PDF
PDF
The Biochemica Genesis_vol 12
PPTX
ONE Championship - Introduction
ODP
Partes de un ordenador Rosi
PPTX
La bella durmiente
PDF
APE Bootcamp 2015
PDF
Portfolio
Metodo Monte Carlo -Wang Landau
Webinar: Moving to Office 365? What You Need to Know!
Broadcast Release
Lei rerestrutura cms finalizada
Public cloud on System z
Regimento interno do conselho municipal de saúde de jequié
Welcome To The Collaborative economy
The Biochemica Genesis_vol 12
ONE Championship - Introduction
Partes de un ordenador Rosi
La bella durmiente
APE Bootcamp 2015
Portfolio
Ad

Similar to Graph Kernelpdf (20)

PDF
Glocalized Weisfeiler-Lehman Graph Kernels: Global-Local Feature Maps of Graphs
PDF
Convolutional networks and graph networks through kernels
PDF
Bump Hunting in the Dark - ICDE15 presentation
PDF
Recent Advances in Kernel-Based Graph Classification
PDF
Weisfeiler and Leman Go Neural: Higher-order Graph Neural Networks
PDF
Graph Kernels for Chemical Informatics
PPTX
NS-CUK Seminar: H.E.Lee, Review on "Weisfeiler and Leman Go Neural: Higher-O...
PDF
Scalable Global Alignment Graph Kernel Using Random Features: From Node Embed...
PPTX
ML_in_QM_JC_02-10-18
PDF
Graph kernels
PPTX
240408_Thuy_Labseminar[Weisfeiler and Lehman Go Cellular: CW Networks+Weisfei...
PDF
Semi-Supervised Classification with Graph Convolutional Networks @ICLR2017読み会
PDF
High-Performance Graph Analysis and Modeling
PDF
Learning Convolutional Neural Networks for Graphs
PPTX
NS-CUK Joint Journal Club : S.T.Nguyen, Review on "Graph Neural Networks for ...
PPTX
Graph Representation Learning
PPTX
Weisfeiler and Leman Go Neural: Higher-order Graph Neural Network.pptx
PDF
Using Local Spectral Methods to Robustify Graph-Based Learning
PPTX
Weisfeiler and Leman Go Neural: Higher-order Graph Neural Networks, arXiv e-...
PPTX
ICDE-2015 Shortest Path Traversal Optimization and Analysis for Large Graph C...
Glocalized Weisfeiler-Lehman Graph Kernels: Global-Local Feature Maps of Graphs
Convolutional networks and graph networks through kernels
Bump Hunting in the Dark - ICDE15 presentation
Recent Advances in Kernel-Based Graph Classification
Weisfeiler and Leman Go Neural: Higher-order Graph Neural Networks
Graph Kernels for Chemical Informatics
NS-CUK Seminar: H.E.Lee, Review on "Weisfeiler and Leman Go Neural: Higher-O...
Scalable Global Alignment Graph Kernel Using Random Features: From Node Embed...
ML_in_QM_JC_02-10-18
Graph kernels
240408_Thuy_Labseminar[Weisfeiler and Lehman Go Cellular: CW Networks+Weisfei...
Semi-Supervised Classification with Graph Convolutional Networks @ICLR2017読み会
High-Performance Graph Analysis and Modeling
Learning Convolutional Neural Networks for Graphs
NS-CUK Joint Journal Club : S.T.Nguyen, Review on "Graph Neural Networks for ...
Graph Representation Learning
Weisfeiler and Leman Go Neural: Higher-order Graph Neural Network.pptx
Using Local Spectral Methods to Robustify Graph-Based Learning
Weisfeiler and Leman Go Neural: Higher-order Graph Neural Networks, arXiv e-...
ICDE-2015 Shortest Path Traversal Optimization and Analysis for Large Graph C...

Graph Kernelpdf

  • 2. Outline oKernel oGraph Kernel oShortest Path Kernel oGraphlet Kernel oWL Kernel oExperimentation oResults oConclusion
  • 3. Kernels  A kernel is a function of two objects that quantifies their similarity. Any kernel methods solution comprises two parts: a module that performs the mapping into the embedding or feature space and a learning algorithm designed to discover linear patterns in that space. K(X,X’)=(Φ(X),Φ(X’)) Where Φ is the feature space transformation. Property: Symmetric Positive-Definite C’KC≥0; Graph Kernel
  • 4. Outline oKernel oGraph Kernel oShortest Path Kernel oGraphlet Kernel oWL Kernel oExperimentation oResults oConclusion
  • 5. Graph Kernel Graph kernels are used to find similarity between two graphs. It exploits graph topology but, restricts itself to comparing substructure of graph that are computable in polynomial time. Property: Symmetric positive-Definite. Many Graph Kernels have been defined, we will focus on mainly following: 1. Shortest Path Kernel 2. Graphlet Kernel 3. Weisfeiler-Lehman Kernel. GRAPH KERNEL
  • 6. Outline oKernel oGraph Kernel oShortest Path Kernel oGraphlet Kernel oWL Kernel oExperimentation oResults oConclusion
  • 7. Shortest Path Kernel Task: Find the shortest path of all lengths among the graphs. Working: 1. Floyd Transformation of graph. 2. Apply shortest path kernel over that transformed graph. Complexity: O(n4) GRAPH KERNEL
  • 8. SP Kernel(Cont.) Floyd Transformation:  Contains same number of nodes as input graph.  Unlike, there exist an edge between nodes in transformed graph if there exist a walk between the nodes in input graph.  Edge are marked as shortest distance between nodes  Complexity O(n3) Floyd-Warshall algorithm GRAPH KERNEL
  • 9. SP Kernel(Cont.) GRAPH KERNEL Kernel: Let S1(E1,V1), S2(E2,V2) be two graphs
  • 11. Outline oKernel oGraph Kernel oShortest Path Kernel oGraphlet Kernel oWL Kernel oExperimentation oResults oConclusion
  • 12. Graphlet Kernel Task: Count number of graphlet because isomorphic graphs have same graphlet distribution. Count the number of graphlets of specific size, for linear computation. There are possible graphlet of size k. Let G and G’ be 2 graphs and S and S’ be their respective subgraphs. Complexity: O(ndk-1)  d=maximum degree of node  k= size of graphlet GRAPH KERNEL
  • 13. Graphlet Kernel  computing 3-graphlet kernel for connected component (triangle, V shapes). GRAPH KERNEL
  • 14. Outline oKernel oGraph Kernel oShortest Path Kernel oGraphlet Kernel oWL Kernel oExperimentation oResults oConclusion
  • 16. WL Algorithm :iteration 1 Each Iteration of WL test comprises of following steps:- 1.Multiset label determination and sorting ◦ O(m) via Bucket Sort GRAPH KERNEL
  • 17. WL Algorithm :iteration 1 Each Iteration of WL test comprises of following steps:- 1.Multiset label determination and sorting ◦ O(m) via Bucket Sort 2.label compression ◦ O(m) via Radix Sort GRAPH KERNEL
  • 18. WL Algorithm :iteration 1 Each Iteration of WL test comprises of following steps:- 1.Multiset label determination and sorting ◦ O(m) via Bucket Sort 2.label compression ◦ O(m) via Radix Sort GRAPH KERNEL
  • 19. WL Algorithm :iteration 1 Each Iteration of WL test comprises of following steps:- 1.Multiset label determination and sorting ◦ O(m) via Bucket Sort 2.label compression ◦ O(m) via Radix Sort 3. Relabeling ◦ O(n) GRAPH KERNEL
  • 20. WL Algorithm :iteration 1 Each Iteration of WL test comprises of following steps:- 1.Multiset label determination and sorting ◦ O(m) via Bucket Sort 2.label compression ◦ O(m) via Radix Sort 3. Relabeling ◦ O(n) 4.Are the labels of G and G’ identical? Yes, continue. GRAPH KERNEL
  • 21. WL Algorithm :iteration 2 Each Iteration of WL test comprises of following steps:- 1.Multiset label determination and sorting ◦ O(m) via Bucket Sort GRAPH KERNEL
  • 22. WL Algorithm :iteration 2 Each Iteration of WL test comprises of following steps: 1.Multiset label determination and sorting ◦ O(m) via Bucket Sort GRAPH KERNEL
  • 23. WL Algorithm :iteration 2 Each Iteration of WL test comprises of following steps: 1.Multiset label determination and sorting ◦ O(m) via Bucket Sort 2.label compression ◦ O(m) via Radix Sort GRAPH KERNEL
  • 24. WL Algorithm :iteration 2 Each Iteration of WL test comprises of following steps: 1.Multiset label determination and sorting ◦ O(m) via Bucket Sort 2.label compression ◦ O(m) via Radix Sort GRAPH KERNEL
  • 25. WL Algorithm :iteration 2 Each Iteration of WL test comprises of following steps:- 1.Multiset label determination and sorting ◦ O(m) via Bucket Sort 2.label compression ◦ O(m) via Radix Sort 3. Relabeling ◦ O(n) GRAPH KERNEL
  • 26. WL Algorithm :iteration 2 Each Iteration of WL test comprises of following steps:- 1.Multiset label determination and sorting ◦ O(m) via Bucket Sort 2.label compression ◦ O(m) via Radix Sort 3. Relabeling ◦ O(n) 4.Are the labels of G and G’ identical? NO, output YES. 5.complexity O(hm) for h iteration GRAPH KERNEL
  • 27. WL Kernel Feature{2 3 4 5 6 7 8 9 10} Φ(G1)={3 2 1 0 1 2 2 0 1} Φ(G2)={3 2 1 2 1 0 0 2 1 } K{G1,G2}=16 GRAPH KERNEL
  • 28. Outline oKernel oGraph Kernel oShortest Path Kernel oGraphlet Kernel oWL Kernel oExperimentation oResults oConclusion
  • 29. EXPERIMENT 1. INPUT: We have generated 3 different kind of input graphs. a)Edge Removed Graphs: We took a complete graph and removed 10 edges at a time from that graph, iteratively generate new graph. b)Degree Reduced Graph: We took a complete graph and reduced the degree of each node by 1,iteratively generate new graph. c)Node Removed Graph: We took a complete graph and removed 1 node at a time from that graph to generate new graph iteratively. GRAPH KERNEL
  • 33. Shortest Path Kernel norm. GRAPH KERNEL
  • 34. SVM Graph Label Assignment:10 belong to each class, iteratively. 10 Fold SVM Function Used: ‘rbf’ Gamma=0.00001 Accuracy: mean Accuracy output from all 10 folds. GRAPH KERNEL
  • 35. Outline oKernel oGraph Kernel oShortest Path Kernel oGraphlet Kernel oWL Kernel oExperimentation oResults oConclusion
  • 39. Outline oKernel oGraph Kernel oShortest Path Kernel oGraphlet Kernel oWL Kernel oExperimentation oResults oConclusion
  • 40. Conclusion Accuracy: Graphlet Kernel > WL Kernel > Shortest Path Kernel I. Graphlet Kernel Exploits the topology very effectively by considering graphlet distribution. II. Shortest Path Kernel shows least accuracy because it computes the number of shortest path while not considering the topology involved in graphs. III. WL Kernel shows moderate performance on our dataset. IV. As we increase number of nodes the accuracy decreases because number of false classification increases. GRAPH KERNEL
  • 41. Conclusion (cont.) Time Graphlet Kernel > Shortest Path Kernel > WL Kernel I. Graphlet Kernel has highest computation time O(ndk-1),since our dataset is pretty dense. II. Shortest Path Kernel O(n4). III. WL Kernel O(Nhm). N=number of Graphs. h=number of iterations. m=number of distinct labels. GRAPH KERNEL