1 of 45

Dynamic Graph clustering

Nov 3rd 2022

BMI/CS 775 Computational Network Biology�Fall 2022

Sushmita Roy

https://compnetbiocourse.discovery.wisc.edu

2 of 45

Goals for this lecture

  • Network dynamics and dynamic modules on networks
  • Classes of algorithms for identifying dynamic modules
  • Dynamic Stochastic block models
  • Spectral clustering and smoothing

3 of 45

Network dynamics

  • What does modeling “dynamics” mean?
    • The activity of nodes change over time and we want to model how this happens
    • The network (structure or parameters) changes with time
      • Structure can change due to changes at the node or edge level
  • Local changes in connectivity could result in more global changes in community structure
  • How to model changes in the community structure?

4 of 45

Dynamic modules

Sun et al., Entropy 2020

5 of 45

How might network modules change over time?

Adding nodes

Deleting nodes

Adding edges

Deleting edges

Sun et al., Entropy 2020

6 of 45

Notation

  • T: denotes time points
  • G1.. GT denotes a set of graphs across time
  • E1..ET denotes the set of adjacency matrices across time
  • Z1.. ZT denotes the set of communities

7 of 45

Problem definition

  • Given
    • G1.. GT representing graphs across time, where Gt denotes the graph at the tth time point
  • Do
    • Identify the communities, Z1.. ZT for each time point
    • (optionally) identify how communities change over time

8 of 45

Different ways of dynamic module identification

  • Modularity based
    • DynaMo, Zhuang et al., 2019
    • See review https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7516902
  • Dynamic Stochastic block models
    • DSBM
    • HSBM
    • Extended Kalman Filtering
  • Spectral clustering and smoothing
    • PisCES (Liu et al., 2017)
    • Spectral fusion (Huang et al., 2018)

9 of 45

Goals for this lecture

  • Network dynamics and dynamic modules on networks
  • Classes of algorithms for identifying dynamic modules
  • Dynamic Stochastic block models
  • Spectral clustering and smoothing

10 of 45

Stochastic block model (SBM)

  • Let G={V,E} be a graph, with vertex set V and edge set E
  • Let M denote the membership of v in one of K groups
  • SBM is a generative model of the edges given M for G
  • Using an SBM we can compute a likelihood of a given module assignment to V
  • We will use “hole” to denote the absence of an edge

Park and Bader BMC Bioinformatics 2011

11 of 45

SBM notation

  •  

12 of 45

Probability of a grouping structure from the stochastic block model

eij: Number of edges between groups i and j

tij: Number of possible edges between groups i and j

hij: Number of holes between groups i and j

hij = tij - eij

Probability of edge and hole patterns between group i and j

Groups

Probability of edge-hole pattern for all groups:

Park and Bader BMC Bioinformatics 2011

13 of 45

Stochastic block model for flat clustering for K=3 groups

Group 3 (7 vertices)

Group 1 (7 vertices)

Group 2 (6 vertices)

14 of 45

Stochastic block model for flat clustering for K=3 groups

Group 3

Group 1

Group 2

Probability of observing these interaction patterns

15 of 45

Learning an SBM

  •  

16 of 45

Maximum likelihood Parameter estimation

  •  

cluster of node i

Total number of vertices

number of edges between clusters k and l

number of holes between clusters k and l

17 of 45

Expectation maximization

  • An framework to learn probability distribution parameters where there are hidden variables
  • E step
    • Estimate the “expected” values of hidden variables given the observed data
  • M step
    • Estimate the parameters given expected values

18 of 45

Inference

  •  

19 of 45

Dynamic stochastic block models

  • SBMs are meant for static networks
  • Dynamic SBMs extend SBMs to model dynamic membership
    • Dynamic Stochastic Block Model. Yang et al 2011
    • Extended Kalman Filter. Xu et al., 2014
      • Gaussian approximation of the probabilities
    • Hierarchical Stochastic block model. Amini et al 2021

20 of 45

Dynamic Stochastic Block Model

  • Extends SBMs to handle dynamically evolving modules over time
  • General idea:
    • Assume we have the communities/clusters for time t
    • Evolve the community assignment at t+1 from the previous time point
    • We will need a “transition” matrix to model this evolution
  • Fully Bayesian approach

Yang et al, Machine learning 2011

21 of 45

DSBM notation

  •  

22 of 45

DSBM generative model

How the modules change

How the edges get generated

23 of 45

DSBM Likelihood

Graphs at each time point

Module membership at each time point

Edge generation

Community/cluster evolution

24 of 45

DSBM Likelihood

Edge generation/Emission probability

Transition probability

Probability of observing interactions between communities k and l

25 of 45

DSBM learning

  •  

26 of 45

Simulated block structure at different noise levels

  • 128 nodes, 4 communities
  • Noise controlled by changing the intra and inter community probabilities
  • To simulate dynamics, community assignment of 10% of the nodes were changed at each time point from the previous

27 of 45

Comparing DSBM to other algorithms

28 of 45

Extended Kalman Filters

  • Dynamic stochastic blockmodels for time-evolving social networks
  • Works with the logit of the module interaction probabilities
  • Approximates the state and emissions with Gaussians

Xu et al, 2014

Module assignments

Adjacency matrices

Parameters of a Gaussian

29 of 45

Hierarchical Stochastic Block model

  • A general approach based on SBMs to handle “multi-type” networks
  • Each type could be a time point
  • Similarity of module memberships between time points modeled via prior distributions

Amini et al, 2021

Adjacency matrices

Module interactions

Module assignment

30 of 45

HSBM compared to other algorithms

Results on simulated networks with different transition probabilities

31 of 45

Goals for this lecture

  • Network dynamics and dynamic modules on networks
  • Classes of algorithms for identifying dynamic modules
  • Dynamic Stochastic block models
  • Spectral clustering and smoothing

32 of 45

PisCES: Global spectral clustering in dynamic networks

  • Based on spectral clustering and eigen vector smoothing framework
  • The number of clusters per time point could vary

33 of 45

PisCES notation

  • n: Number of nodes in the graph
  • Vt : n X K denote the matrix of K eigen vectors of the graph Laplacian at time t
  • Ut=Vt*Vt’ denotes a reconstructed graph of nodes

 

 

 

n

n

n

k

n

n

34 of 45

How to obtaining smoothly varying clusters over time?

Kmeans objective

 

 

Mean of cluster zt(i)

mismatch in cluster assignment

This is in general hard to optimize. However, we can obtain a relaxed version of this as:

N

K

35 of 45

PisCES algorithm

  • PisCES uses an iterative algorithm to find the constrained clustering solution:

Extracts eigen vectors and gets an outer product

First time point

Last time point

All other time points

36 of 45

PisCES algorithm key steps

  •  

37 of 45

Evaluation on simulated data

38 of 45

Application to real data

  • Gene expression time course developing rhesus monkey
    • Six pre-natal stages and four postnatal stages
  • Samples were further divided into different brain regions
    • The authors focused only on the medial pre-frontal cortex (mPFC)
  • Goal: study changes in co-expression patterns over time
  • Infer co-expression networks with WGCNA and then apply PisCES to the time-point specific networks

39 of 45

Identification of temporal modules in macaque brain co-expression networks

40 of 45

Zooming into a pair of time points

41 of 45

Finding module level differences

E40

E50

1. Some clusters exhibit a big change in density, e.g. cluster 2->3, 3->6, 9->10, 9->16.

2. Genes in some dense clusters, e.g. 7, 8, 13 move to 9

42 of 45

A gene subnetwork exhibiting substantial rewiring

NPG: Neural projection guidance

43 of 45

Conclusions

  • Many social and biological networks are dynamic
  • Dynamic module identification requires us to infer the network modules at each time point
  • Algorithms differ based on
    • Optimization framework
    • Allowing variable number of communities
    • Explicit model of community dynamics
  • Dynamic Stochastic Block models are based on a probabilistic model of community structure
  • PisCES used a spectral smoothing approach

44 of 45

Concluding remarks for graph clustering

  • We talked about graph clustering and different types of extensions
  • Standard classical algorithms
    • Optimize modularity
    • Kmeans on Graph Laplacian
  • Graph neural networks and module detection
    • AE based methods: Graphs with no attributes
    • GCN based methods: Graphs with attributes
  • Clustering graphs over time

45 of 45

References

  • General review
    • Sun Z, Sheng J, Wang B, Ullah A, Khawaja F. Identifying Communities in Dynamic Networks Using Information Dynamics. Entropy (Basel). 2020;22(4):E425. doi:10.3390/e22040425
  • Spectral smoothing:
    • Liu F, Choi D, Xie L, Roeder K. Global spectral clustering in dynamic networks. Proc Natl Acad Sci USA. 2018;115(5):927-932. doi:10.1073/pnas.1718449115
    • Huang Q, Zhao C, Zhang X, Yi D. Community discovering in temporal network with spectral fusion. Chaos. 2019;29(4):043122. doi:10.1063/1.5086769
  • Stochastic block models
    • Amini AA, Paez MS, Lin L. Hierarchical Stochastic Block Model for Community Detection in Multiplex Networks. arXiv:190405330 [cs, stat]. Published online August 11, 2021. Accessed November 11, 2021. http://arxiv.org/abs/1904.05330
    • Xu KS, Hero III AO. Dynamic stochastic blockmodels for time-evolving social networks. IEEE J Sel Top Signal Process. 2014;8(4):552-562. doi:10.1109/JSTSP.2014.2310294
    • Yang T, Chi Y, Zhu S, Gong Y, Jin R. Detecting communities and their evolutions in dynamic social networks—a Bayesian approach. Mach Learn. 2011;82(2):157-189. doi:10.1007/s10994-010-5214-7
    • Matias, C. & Miele, V. Statistical clustering of temporal networks through a dynamic stochastic block model. at http://arxiv.org/abs/1506.07464 (2016).