SlideShare une entreprise Scribd logo
1  sur  44
Télécharger pour lire hors ligne
Graph Partitioning II:
Spectral Methods
Class Algorithmic Methods of Data Mining
Program M. Sc. Data Science
University Sapienza University of Rome
Semester Fall 2015
Lecturer Carlos Castillo http://chato.cl/
Sources:
● Evimaria Terzi: “Clustering: graph cuts and spectral graph
partitioning” [link]
● Daniel A. Spielman: “The Laplacian” [link]
● Jure Leskovec: “Defining the graph laplacian” [link]
2
Graph projections
3
Graphs are nice, but ...
● They describe only local relationships
● We would like to understand a global structure
● Our objective is transforming a graph into a
more familiar object: a cloud of points in Rk
R1
4
Graphs are nice, but ...
● They describe only local relationships
● We would like to understand a global structure
● Our objective is transforming a graph into a
more familiar object: a cloud of points in Rk
R1
Distances should be somehow preserved
5
Simple 3D graph projection
● Start a BFS from a random node, that has x=1,
and nodes visited have ascending x
● Start a BFS from another random node, which
has y=1, and nodes visited have ascending y
● Start a BFS from yet another node, which has
z=1, and nodes visited have ascending z
● Project node n to position (xn, yn, zn)
How do you think this works in practice?
6
Eigenvectors of adjacency matrix
7
Adjacency matrix of G=(V,E)
● Matrix of size |V| x |V| such that:
● What is Ax? Think of x as a set of labels/values:
https://www.youtube.com/watch?v=YuKsZstrua4
Ax is a vector whose ith
coordinate
contains the sum of the xj
who are
in-neighbors of i
8
Properties of adjacency matrix
● How many non-zeros are in every row of A?
https://www.youtube.com/watch?v=YuKsZstrua4
9
Understanding the adjacency matrix
What is Ax? Think of x as a set of labels/values:
https://www.youtube.com/watch?v=YuKsZstrua4
Ax is a vector whose ith
coordinate contains
the sum of the xj
who are in-neighbors of i
10
Spectral graph theory
● The study of the eigenvalues and eigenvectors
of a graph matrix
– Adjacency matrix
– Laplacian matrix (next)
● Suppose graph is d-regular (every node has
degree d), what is the value of:
11
An easy eigenvector of A
● Suppose graph is d-regular, i.e. all nodes have
degree d:
● So [1, 1, …, 1]T is an eigenvector of eigenvalue d
12
Disconnected graphs
● Suppose graph is disconnected (still regular)
● Then matrix has block structure:
S S'
13
Disconnected graphs
● Suppose graph is disconnected (still regular)
S S'
14
Disconnected graphs
● Suppose graph is disconnected (still regular)
S S'
15
Disconnected graphs
● Suppose graph is disconnected (still regular)
● What happens if there are more than 2 connected
components?
S S'
16
In general
Disconnected graph Almost disconnected graph
Small “eigengap”
17
Graph Laplacian
18
Adjacency matrix
3
2
1
4
5
6
19
Degree matrix
3
2
1
4
5
6
20
Laplacian matrix
3
2
1
4
5
6
21
Laplacian matrix L = D - A
● Symmetric
● Eigenvalues non-negative and real
● Eigenvectors real and orthogonal
22
Constant vector is eigenvector of L
● The constant vector x=[1,1,...,1]T is again an
eigenvector, but this time has eigenvalue 0
23
If the graph is disconnected
● If there are two connected components, the
same argument as for the adjacency matrix
applies, and
● In general, the multiplicity of eigenvalue 0 is the
number of connected components
24
xT
Lx
25
Important property of xT
Lx
Think of this quantity as the “stress” produced by the assignment of node labels x
26
xT
Lx and graph cuts
● Suppose (S, S') is a cut of graph G
● Set
0
0
1
1
1
27
For symmetric matrices
● Important fact for symmetric matrices
https://en.wikipedia.org/wiki/Rayleigh_quotient
28
Second eigenvector
● Orthogonal to the first one:
● Normal:
29
What does this mean?
0
Nodes should be placed at both sides of 0 because
30
Example Graph 1
1
2
3
4
8
5
7
6
31
Example Graph 1
1
2
3
4
8
5
7
6
32
Example Graph 1, projected
1
2
3
4
8
5
7
6
0 0.247 0.383-0.383 -0.247
33
Example Graph 1, communities
1
2
3
4
8
5
7
6
0 0.247 0.383-0.383 -0.247
S S'
34
Example Graph 2
1
2
3
4
8
5
7
6
35
Example Graph 3
1
2
3
4
8
5
7
6
36
Example Graph 3, projected
0-0.057-0.246
-0.210
-0.364 0.5510.139
1
2
3
4
8
5
7
6
37
Example Graph 3, projected
how to partition?
1
2
3
4
8
5
7
6
0-0.057-0.246
-0.210
-0.364 0.5510.139
38
Example Graph 3, projected
1
2
3
4
8
5
7
6
0-0.057-0.246
-0.210
-0.364 0.5510.139
S S'
39
A more complex graph
https://www.youtube.com/watch?v=jpTjj5PmcMM
40
A graph with 4 “communities”
https://www.youtube.com/watch?v=jpTjj5PmcMM
41
Other eigenvectors
Second eigenvector Third eigenvector
Value in second eigenvector
Valueinthirdeigenvector
42
Other eigenvectors
Second eigenvector Third eigenvector
Value in second eigenvector
Valueinthirdeigenvector
43
Interesting application: image
segmentation [Shi & Malik 2000]
Transform into grid
graph with edge
weights proportional
to pixel similarity
44
Lots of examples, including one of
embedding streets in Rome
http://www.cs.yale.edu/homes/spielman/sgta/SpectTut.pdf

Contenu connexe

Tendances

Graph theory
Graph theoryGraph theory
Graph theory
Kumar
 
Matrix Representation Of Graph
Matrix Representation Of GraphMatrix Representation Of Graph
Matrix Representation Of Graph
Abhishek Pachisia
 
introduction to graph theory
introduction to graph theoryintroduction to graph theory
introduction to graph theory
Chuckie Balbuena
 

Tendances (20)

Finding Dense Subgraphs
Finding Dense SubgraphsFinding Dense Subgraphs
Finding Dense Subgraphs
 
Introduction to Hypergraphs
Introduction to HypergraphsIntroduction to Hypergraphs
Introduction to Hypergraphs
 
06. graph mining
06. graph mining06. graph mining
06. graph mining
 
word2vec, LDA, and introducing a new hybrid algorithm: lda2vec
word2vec, LDA, and introducing a new hybrid algorithm: lda2vecword2vec, LDA, and introducing a new hybrid algorithm: lda2vec
word2vec, LDA, and introducing a new hybrid algorithm: lda2vec
 
MATCHING GRAPH THEORY
MATCHING GRAPH THEORYMATCHING GRAPH THEORY
MATCHING GRAPH THEORY
 
Ai quantifiers
Ai quantifiersAi quantifiers
Ai quantifiers
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
BFS
BFSBFS
BFS
 
Application of Matrices
Application of MatricesApplication of Matrices
Application of Matrices
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Matrix Representation Of Graph
Matrix Representation Of GraphMatrix Representation Of Graph
Matrix Representation Of Graph
 
A note on word embedding
A note on word embeddingA note on word embedding
A note on word embedding
 
introduction to graph theory
introduction to graph theoryintroduction to graph theory
introduction to graph theory
 
CS6702 Unit III coloring ppt
CS6702   Unit III coloring pptCS6702   Unit III coloring ppt
CS6702 Unit III coloring ppt
 
Application of Discrete Mathematics in CSE
Application of Discrete Mathematics in CSE Application of Discrete Mathematics in CSE
Application of Discrete Mathematics in CSE
 
Deep Residual Hashing Neural Network for Image Retrieval
Deep Residual Hashing Neural Network for Image RetrievalDeep Residual Hashing Neural Network for Image Retrieval
Deep Residual Hashing Neural Network for Image Retrieval
 
Markov decision process
Markov decision processMarkov decision process
Markov decision process
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
Graph theory
Graph  theoryGraph  theory
Graph theory
 
Edge Coloring & K-tuple coloring
Edge Coloring & K-tuple coloringEdge Coloring & K-tuple coloring
Edge Coloring & K-tuple coloring
 

Similaire à Graph Partitioning and Spectral Methods

Spectral Clustering Report
Spectral Clustering ReportSpectral Clustering Report
Spectral Clustering Report
Miaolan Xie
 
Dimension Reduction Introduction & PCA.pptx
Dimension Reduction Introduction & PCA.pptxDimension Reduction Introduction & PCA.pptx
Dimension Reduction Introduction & PCA.pptx
RohanBorgalli
 
20070823
2007082320070823
20070823
neostar
 
Deformation 1
Deformation 1Deformation 1
Deformation 1
anashalim
 

Similaire à Graph Partitioning and Spectral Methods (20)

Notes on Spectral Clustering
Notes on Spectral ClusteringNotes on Spectral Clustering
Notes on Spectral Clustering
 
Spectral Clustering Report
Spectral Clustering ReportSpectral Clustering Report
Spectral Clustering Report
 
Dimension Reduction Introduction & PCA.pptx
Dimension Reduction Introduction & PCA.pptxDimension Reduction Introduction & PCA.pptx
Dimension Reduction Introduction & PCA.pptx
 
machine learning.pptx
machine learning.pptxmachine learning.pptx
machine learning.pptx
 
An Introduction to Spectral Graph Theory
An Introduction to Spectral Graph TheoryAn Introduction to Spectral Graph Theory
An Introduction to Spectral Graph Theory
 
Tensor Spectral Clustering
Tensor Spectral ClusteringTensor Spectral Clustering
Tensor Spectral Clustering
 
Embeddings the geometry of relational algebra
Embeddings  the geometry of relational algebraEmbeddings  the geometry of relational algebra
Embeddings the geometry of relational algebra
 
Lecture_note2.pdf
Lecture_note2.pdfLecture_note2.pdf
Lecture_note2.pdf
 
Network centrality measures and their effectiveness
Network centrality measures and their effectivenessNetwork centrality measures and their effectiveness
Network centrality measures and their effectiveness
 
20070823
2007082320070823
20070823
 
Matrices ppt
Matrices pptMatrices ppt
Matrices ppt
 
[Paper reading] L-SHAPLEY AND C-SHAPLEY: EFFICIENT MODEL INTERPRETATION FOR S...
[Paper reading] L-SHAPLEY AND C-SHAPLEY: EFFICIENT MODEL INTERPRETATION FOR S...[Paper reading] L-SHAPLEY AND C-SHAPLEY: EFFICIENT MODEL INTERPRETATION FOR S...
[Paper reading] L-SHAPLEY AND C-SHAPLEY: EFFICIENT MODEL INTERPRETATION FOR S...
 
Chapter 5(5.1~5.2) Orthogonality.pptx
Chapter 5(5.1~5.2) Orthogonality.pptxChapter 5(5.1~5.2) Orthogonality.pptx
Chapter 5(5.1~5.2) Orthogonality.pptx
 
DimensionalityReduction.pptx
DimensionalityReduction.pptxDimensionalityReduction.pptx
DimensionalityReduction.pptx
 
Webinar on Graph Neural Networks
Webinar on Graph Neural NetworksWebinar on Graph Neural Networks
Webinar on Graph Neural Networks
 
26 spanning
26 spanning26 spanning
26 spanning
 
Deformation 1
Deformation 1Deformation 1
Deformation 1
 
project report(1)
project report(1)project report(1)
project report(1)
 
Dancing Links: an educational pearl
Dancing Links: an educational pearlDancing Links: an educational pearl
Dancing Links: an educational pearl
 
Networking Assignment Help
Networking Assignment HelpNetworking Assignment Help
Networking Assignment Help
 

Plus de Carlos Castillo (ChaTo)

Plus de Carlos Castillo (ChaTo) (20)

Finding High Quality Content in Social Media
Finding High Quality Content in Social MediaFinding High Quality Content in Social Media
Finding High Quality Content in Social Media
 
When no clicks are good news
When no clicks are good newsWhen no clicks are good news
When no clicks are good news
 
Socia Media and Digital Volunteering in Disaster Management @ DSEM 2017
Socia Media and Digital Volunteering in Disaster Management @ DSEM 2017Socia Media and Digital Volunteering in Disaster Management @ DSEM 2017
Socia Media and Digital Volunteering in Disaster Management @ DSEM 2017
 
Detecting Algorithmic Bias (keynote at DIR 2016)
Detecting Algorithmic Bias (keynote at DIR 2016)Detecting Algorithmic Bias (keynote at DIR 2016)
Detecting Algorithmic Bias (keynote at DIR 2016)
 
Discrimination Discovery
Discrimination DiscoveryDiscrimination Discovery
Discrimination Discovery
 
Fairness-Aware Data Mining
Fairness-Aware Data MiningFairness-Aware Data Mining
Fairness-Aware Data Mining
 
Big Crisis Data for ISPC
Big Crisis Data for ISPCBig Crisis Data for ISPC
Big Crisis Data for ISPC
 
Databeers: Big Crisis Data
Databeers: Big Crisis DataDatabeers: Big Crisis Data
Databeers: Big Crisis Data
 
Observational studies in social media
Observational studies in social mediaObservational studies in social media
Observational studies in social media
 
Natural experiments
Natural experimentsNatural experiments
Natural experiments
 
Content-based link prediction
Content-based link predictionContent-based link prediction
Content-based link prediction
 
Link prediction
Link predictionLink prediction
Link prediction
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
 
Graph Evolution Models
Graph Evolution ModelsGraph Evolution Models
Graph Evolution Models
 
Link-Based Ranking
Link-Based RankingLink-Based Ranking
Link-Based Ranking
 
Text Indexing / Inverted Indices
Text Indexing / Inverted IndicesText Indexing / Inverted Indices
Text Indexing / Inverted Indices
 
Indexing
IndexingIndexing
Indexing
 
Text Summarization
Text SummarizationText Summarization
Text Summarization
 
Hierarchical Clustering
Hierarchical ClusteringHierarchical Clustering
Hierarchical Clustering
 
K-Means Algorithm
K-Means AlgorithmK-Means Algorithm
K-Means Algorithm
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
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...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 

Graph Partitioning and Spectral Methods