Modularity in static and dynamic networks
Sarah F. Muldoon University at Buffalo, SUNY OHBM – Brain Graphs Workshop June 25, 2017 Outline
1. Introduction: What is modularity?
2. Determining community structure (static networks)
3. Comparing community structure
4. Multilayer networks: Constructing multitask and temporal multilayer dynamic networks
5. Dynamic community structure
6. Useful references
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Introduction: What is Modularity?
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon What is Modularity?
Modularity (Community Structure) • A module (community) is a subset of vertices in a graph that have more connections to each other than to the rest of the network • Example social networks: groups of friends
Modularity in the brain: • Structural networks: communities are groups of brain areas that are more highly connected to each other than the rest of the brain
• Functional networks: communities are groups of brain areas with synchronous activity that is not synchronous with other brain activity
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon
Findings: The Brain is Modular
Structural networks: cortical thickness correlations
sensorimotor/spatial strategic/executive
mnemonic/emotion olfactocentric
auditory/language visual processing
Chen et al. (2008) Cereb Cortex
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Findings: The Brain is Modular
• Functional networks: resting state fMRI
He et al. (2009) PLOS One
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Findings: The Brain is Hierarchical
Modules are composed of modules
Meunier et al. (2009) Front. Neuroinform.
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Determining Community Structure
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon How to Determine Community Structure?
MANY methods (see Fortunato 2010 Phys Rep for a review)
Here we focus on method of modularity maximization
Define a quantity called modularity:
Or more generally: Resolution Parameter Adjacency For Module Standard Standard Matrix Size Community i Null Model Resolution Parameter
Null Model Community j Adjacency Matrix Newman (2006) PNAS; Bassett et al. (2013) Chaos
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Maximize Modularity Function!
Examine all possible partitions of communities – choose partition that has the highest modularity
Problem is NP-hard – need search algorithm: Louvain algorithm: Blondel et al. (2008) J of Stat Mech
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Importance of Multiple Optimizations
The modularity energy landscape has multiple near- degeneracies • Must run optimization algorithm many times (~100) and determine a consensus partition
• Consensus partitioning using Nodal Association Matrix – see Bassett et al. (2013) Chaos and Lancichinetti et al. (2012) Sci Rep
Good et al. (2010) Phys Rev E
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon The Resolution Parameter
Traditionally, γ=1 was used. However, changing γ changes the number of detected communities.
γ<1: fewer communities
γ>1: more communities
Determining γ: 1. Look for stable regime 2. Run consensus over multiple parameter choices
Alexander-Bloch et al. (2010) Front Syst Neurosci OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Summary: Static Community Detection
1. Construct brain network (structural or functional) 2. Compute modularity and determine community structure – determine choice of resolution parameter 3. Run community detection multiple times and determine a consensus partition. 4. INTERPRET the results!
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Comparing Community Structure
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Normalized Mutual Information
How do we tell if detected community structure is alike between conditions?
Compute NMI: 0 if partitions are independent 1 if the partitions are identical
Many different ways to be “wrong”
Can be adjusted for chance (see Vinh et al (2010))
Danon et al. (2005) J Stat Mech; Vinh et al. (2010) J of Mach Learn Res
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Dynamic Networks
Cognitive processes are dynamic! • Memory • Learning • Attention • Fatigue • etc… Medaglia et al. (2015) J Cogn Neurosci
How does network structure change and evolve over time? • Different tasks • As a function of learning • As people age • Progression of a disease Bassett et al. (2013) Chaos OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Introduction: Multilayer Networks
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Multilayer Networks • Each node belongs to any subset of the layers, and edges encompass pairwise connections between all possible combinations of nodes and layers
4 Nodes 4 Layers 2 Aspects (X,Y) 2 Elementary-Layer Sets {A,B}, {X,Y}
Edges can connect nodes in any layers.
• An aspect is a feature of the edge: for example, its definition, or the time in which it exists.
Kivelä et al. (2014) J Complex Networks
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Multilayer Networks: An Example
Network scientists who talked to each other or went to talks by each other across 3 different network science conferences/workshops.
Kivelä et al. (2014) J Complex Networks
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Multiplex Networks
• Sequential graphs Inter-layer identity links
Temporal data: layers coupled to layers adjacent in time
Categorical data: all-to-all layer coupling
Mucha et al. (2010) Science OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Multitask Networks • How are networks extracted from the brain at rest different from networks extracted during task conditions?
• How do task networks differ from one another? How are they similar?
• How does the brain transition between tasks in a large task battery?
Cole et al. (2014) Neuron
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Temporal Networks
• Perhaps the most common type of network in neuroscience
• How do connections evolve over time? • Learning • Development • Progression of disease • Resting state fluctuations
Bassett et al. (2013) PLoS Comp. Bio
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Constructing Multitask and Temporal Multilayer Dynamic Networks
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Multiplex Networks
• Sequential graphs Each layer is a single functional Inter-layer connectivity matrix identity links
Temporal Networks
1
2
3
Multitask Networks 4
Mucha et al. (2010) Science
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Multitask Networks
• Step 1: Create separate pairwise functional connectivity matrices for each task • Step 2: Couple each node to itself in every matrix (all-to- all between layer coupling)
Task 1 Task 2
Task 3 Task 4 Task 1
Task 2
Task 3
Task 4
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Temporal Networks
• Step 1: Choose a windowing scheme (can overlap) • Step 2: Create pairwise functional connectivity matrices for each time window • Step 3: Align matrices in time and couple each node to itself in the following matrix
Window 1 Window 2 Window 3 Window 4
Window 1
Window 2
Window 3
60 120 180 240 Window 4 Time (s)
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Dynamic Community Structure
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Multilayer Modularity
We can define a multilayer modularity to estimate the community structure in multilayer networks.
Resolution Parameter For Module Size For i and j Community Adjacency in same i in time Matrix community slice l
Null Model Resolution Community Adjacency Parameter j in time Matrix for Module slice r Dynamics
Optimize using a Louvain-like locally greedy algorithm. Blondel et al. 2008; Mucha et al. (2010) Science.
• Mucha et al. (2010) Science; Bassett et al. (2013) Chaos
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Community Assignment in Layers
Communities exist across layers (throughout time) and can come in and out of existence
Bassett et al. (2013) Chaos
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Flexibility and Promiscuity
Regional flexibility: The number of times a region changes its module allegiance normalized by possible number of changes
Regional promiscuity: The fraction of communities in which a region participates
Flexibility Promiscuity Region 1 0 0.25 Region 2 0.11 0.5 Region 3 0.33 1 Region 4 0.89 1 Region 5 0.11 0.5 Network (ave of regions) 0.29 0.65
Bassett et al. (2011) PNAS; Bassett et al. (2013) PLoS Comp Bio; Papadopoulos et al. (2016) Phys Rev E OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon
Flexibility Predicts Learning
• Regional flexibility changes over the course of learning • Higher flexibility predicted higher learning
Bassett et al. (2011) PNAS
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Module Allegiance Matrix
We can also create a module allegiance matrix which gives the probability of two nodes being assigned to the same community
Step 1: look across all partitions and make contingency tables Region 1 2 3 4 5 • 0 if assigned different communities • 1 if assigned same community 1 X 1 1 1 0 2 1 X 1 1 0 3 1 1 X 1 0 4 1 1 1 X 0 5 0 0 0 0 X Bassett et al. (2015) Nat Neuro
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Module Allegiance Matrix
Step 2: Average across all contingency tables (across all variables) Region 1 2 3 4 5 Region 1 2 3 4 5 Subjects 1 X 1 1 1 0 1 X .5 .1 .1 0 2 1 X 1 1 0 Time/task 2 .5 X .3 .4 .4 3 1 1 X 1 0 3 .1 .3 X .7 .3 4 1 1 1 X 0 4 .1 .4 .7 X .6 Optimizations 5 0 0 0 0 X 5 0 .4 .3 .6 X
Contingency table Module Allegiance Matrix
Bassett et al. (2015) Nat Neuro
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Recruitment and Integration
Measures interaction between larger scale groups (ex: visual and motor groupings) • Recruitment: strength of interaction within a group • Integration: strength of interaction between groups
Module Allegiance Matrix
Number of regions
in group ki
Recruitment if k1=k2 Integration if k1≠k2
Bassett et al. (2015) Nat Neuro
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Recruitment/Integration Describes Learning
• As individuals learn, systems become more/less integrated • Changes in integration/recruitment predict ability to learn
Bassett DS, Yang M, Wymbs NF, Grafton ST (2015) Nat Neuro
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Useful References General community detection: 1. Fortunato, S. (2010) Community detection in graphs. Physics Reports, 486:75–174. Modularity: 1. Newman, MEJ (2006) Modularity and community structure in networks. PNAS, 103(23):8577–8582. 2. Newman, MEJ & Girvan, M. (2004). Finding and evaluating community structure in networks. Physical Review E, 69(2 Pt 2): 026113. 3. Blondel, VD, Guillaume, J-L, Lambiotte, R, & Lefebvre, E (2008). Fast unfolding of communities in large networks. Journal of Statistical Mechanics, 2008(10):P10008. Consensus partitioning: 1. Lancichinetti, A., & Fortunato, S. (2012). Consensus clustering in complex networks. Scientific Reports, 2:336. 2. Bassett DS et al. (2013) Robust detection of dynamic community structure in networks. Chaos 23:013142.
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Useful References Comparing communities: 1. Danon, L., Diaz-Guilera, A., Duch, J., & Arenas, A. (2005). Comparing community structure identification. J. Stat. Mech., P09008. 2. Vinh, N. X., Epps, J., & Bailey, J. (2010). Information Theoretic Measures for Clusterings Comparison: Variants, Properties, Normalization and Correction for Chance. The Journal of Machine Learning Research. Multilayer networks: 1. Kivela M et al. (2014) Multilayer networks. Journal of Complex Networks 2:203–271. Community detection in multilayer networks: 1. Mucha PJ, Richardson T, Macon K, Porter MA, Onnela J-P (2010) Community structure in time-dependent, multiscale, and multiplex networks. Science 328:876–878. 2. Bassett DS et al. (2013) Robust detection of dynamic community structure in networks. Chaos 23:013142.
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Useful References
Flexibility: 1. Bassett, DS, Wymbs, NF, Porter, MA, Mucha, PJ, Carlson, JM, & Grafton, ST (2011). Dynamic reconfiguration of human brain networks during learning. PNAS, 108(18):7641–7646. Promiscuity: 1. Papadopoulos, L., Puckett, JG, Daniels, KE, & Bassett, DS. (2016). Evolution of network architecture in a granular material under compression. Physical Review E, 94(3):032908 . Module Allegiance Matrix: 1. Bassett, DS., Yang, M, Wymbs, NF, & Grafton, ST. (2015). Learning- induced autonomy of sensorimotor systems. Nature Neuroscience, 18(5):744–751.
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Useful Code (Matlab):
Static community detection and much more: https://sites.google.com/site/bctnet/measures/list#TOC-Clustering-and-Community- Structure (Brain connectivity toolbox)
Static and dynamic community detection: http://netwiki.amath.unc.edu/GenLouvain/GenLouvain (NetWiki, Peter Mucha)
Consensus partitioning, flexibility, promiscuity, NMI, and more: http://commdetect.weebly.com/ (Dani Bassett)
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon Questions?
Thanks to our funding sources and many collaborators…
OHBM 2017 – Brain Graphs Workshop – Sarah F. Muldoon