Top Banner
The Random Subgraph Model for the Analysis of an Ecclesiastical Network in Merovingian Gaul Charles Bouveyron Laboratoire MAP5, UMR CNRS 8145 Université Paris Descartes This is a joint work with Y. Jernite, P. Latouche, P. Rivera, L. Jegou & S. Lamassé 1
76

The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Jul 17, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The Random Subgraph Model for the Analysis of anEcclesiastical Network in Merovingian Gaul

Charles Bouveyron

Laboratoire MAP5, UMR CNRS 8145Université Paris Descartes

This is a joint work withY. Jernite, P. Latouche, P. Rivera, L. Jegou & S. Lamassé

1

Page 2: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Outline

Introduction

The stochastic block model (SBM)

The random subgraph model (RSM)

Model inference

Numerical experiments

Analysis of an ecclesiastical network

(Analysis of a maritime flow network)

Conclusion

2

Page 3: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Introduction

The analysis of networks:� is a recent but increasingly important field in statistical learning,� with applications in domains ranging from biology to history:

� biology: analysis of gene regulation processes,� social sciences: analysis of political blogs,� history: visualization of medieval social networks.

Two main problems are currently well addressed:� visualization of the networks,� clustering of the network nodes.

Network comparison:� is a still emerging problem is statistical learning,� which is mainly addressed using graph structure comparison,� but limited to binary networks.

3

Page 4: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Introduction

The analysis of networks:� is a recent but increasingly important field in statistical learning,� with applications in domains ranging from biology to history:

� biology: analysis of gene regulation processes,� social sciences: analysis of political blogs,� history: visualization of medieval social networks.

Two main problems are currently well addressed:� visualization of the networks,� clustering of the network nodes.

Network comparison:� is a still emerging problem is statistical learning,� which is mainly addressed using graph structure comparison,� but limited to binary networks.

3

Page 5: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Introduction

Figure : Clustering of network nodes: communities (left) vs. structures with hubs(right).

4

Page 6: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Introduction

Key works in probabilistic models:� stochastic block model (SBM) by Nowicki and Snijders (2001),� latent space model by Hoff, Handcock and Raftery (2002),� latent cluster model by Handcock, Raftery and Tantrum (2007),� mixed membership SBM (MMSBM) by Airoldi et al. (2008),� mixture of experts for LCM by Gormley and Murphy (2010),� MMSBM for dynamic networks by Xing et al. (2010),� overlapping SBM (OSBM) by Latouche et al. (2011).

A good overview is given in:� M. Salter-Townshend, A. White, I. Gollini and T. B. Murphy, “Review of

Statistical Network Analysis: Models, Algorithms, and Software”,Statistical Analysis and Data Mining, Vol. 5(4), pp. 243–264, 2012.

5

Page 7: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Introduction: the historical problem

Our colleagues from the LAMOP team were interested in answering thefollowing question:

Was the Church organized in the same waywithin the different kingdoms in Merovingian Gaul?

To this end, they have build a relational database:� from written acts of ecclesiastical councils that took place in Gaul during

the 6th century (480-614),� those acts report who attended (bishops, kings, dukes, priests, monks, ...)

and what questions (regarding Church, faith, ...) were discussed,� they also allowed to characterize the type of relationship between the

individuals,� it took 18 months to build the database.

6

Page 8: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Introduction: the historical problem

Our colleagues from the LAMOP team were interested in answering thefollowing question:

Was the Church organized in the same waywithin the different kingdoms in Merovingian Gaul?

To this end, they have build a relational database:� from written acts of ecclesiastical councils that took place in Gaul during

the 6th century (480-614),� those acts report who attended (bishops, kings, dukes, priests, monks, ...)

and what questions (regarding Church, faith, ...) were discussed,� they also allowed to characterize the type of relationship between the

individuals,� it took 18 months to build the database.

6

Page 9: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Introduction: the historical problem

The database contains:� 1331 individuals (mostly clergymen) who

participated to ecclesiastical councils inGaul between 480 and 614,

� 4 types of relationships betweenindividuals have been identified (positive,negative, variable or neutral),

� each individual belongs to one of the 5regions of Gaul:� 3 kingdoms: Austrasia, Burgundy and

Neustria,� 2 provinces: Aquitaine and Provence.

� additional information is also available: social positions, familyrelationships, birth and death dates, hold offices, councils dates, ...

7

Page 10: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Introduction: the historical problem

Neustria Provence Unknown Aquitaine Austrasia Burgundy

Figure : Adjacency matrix of the ecclesiastical network (sorted by regions).8

Page 11: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Introduction

Expected difficulties:� existing approaches can not analyze networks with categorical edges and

a partition into subgraphs,� comparison of subgraphs has, up to our knowledge, not been addressed in

this context,� a “source effect” is expected due to the overrepresentation of some places

(Neustria through “Ten History Book” of Gregory of Tours) or individuals(hagiographies).

Our approach:� we consider directed networks with typed (categorical) edges and for

which a partition into subgraphs is known,� we base our comparison on the cluster organization of the subgraphs,� we propose an extension of SBM which takes into account typed edges

and subgraphs,� subgraph comparison is possible afterward using model parameters.

9

Page 12: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Introduction

Expected difficulties:� existing approaches can not analyze networks with categorical edges and

a partition into subgraphs,� comparison of subgraphs has, up to our knowledge, not been addressed in

this context,� a “source effect” is expected due to the overrepresentation of some places

(Neustria through “Ten History Book” of Gregory of Tours) or individuals(hagiographies).

Our approach:� we consider directed networks with typed (categorical) edges and for

which a partition into subgraphs is known,� we base our comparison on the cluster organization of the subgraphs,� we propose an extension of SBM which takes into account typed edges

and subgraphs,� subgraph comparison is possible afterward using model parameters.

9

Page 13: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Outline

Introduction

The stochastic block model (SBM)

The random subgraph model (RSM)

Model inference

Numerical experiments

Analysis of an ecclesiastical network

(Analysis of a maritime flow network)

Conclusion

10

Page 14: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The stochastic block model (SBM)The SBM (Nowicki and Snijders, 2001) model assumes that the network(represented by its adjacency matrix X) is generated as follows:

� each node i is associated with an (unobserved) group among Kaccording to:‌

Zi ∼M(α),

where α ∈ [0, 1]K and∑Kk=1 αk = 1,

� then, each edge Xij is drawn according to:

Xij |ZikZjl = 1 ∼ B(πkl),

where πkl ∈ [0, 1].

� this model is therefore a mixture model:

Xij ∼K∑

k=1

K∑

`=1

αkα`B(πkl).

11

Page 15: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The stochastic block model (SBM)The SBM (Nowicki and Snijders, 2001) model assumes that the network(represented by its adjacency matrix X) is generated as follows:

� each node i is associated with an (unobserved) group among Kaccording to:‌

Zi ∼M(α),

where α ∈ [0, 1]K and∑Kk=1 αk = 1,

� then, each edge Xij is drawn according to:

Xij |ZikZjl = 1 ∼ B(πkl),

where πkl ∈ [0, 1].

� this model is therefore a mixture model:

Xij ∼K∑

k=1

K∑

`=1

αkα`B(πkl).

11

Page 16: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The stochastic block model (SBM)The SBM (Nowicki and Snijders, 2001) model assumes that the network(represented by its adjacency matrix X) is generated as follows:

� each node i is associated with an (unobserved) group among Kaccording to:‌

Zi ∼M(α),

where α ∈ [0, 1]K and∑Kk=1 αk = 1,

� then, each edge Xij is drawn according to:

Xij |ZikZjl = 1 ∼ B(πkl),

where πkl ∈ [0, 1].

� this model is therefore a mixture model:

Xij ∼K∑

k=1

K∑

`=1

αkα`B(πkl).

11

Page 17: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The stochastic block model (SBM)

Table : A SBM network.

12

Page 18: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The stochastic block model (SBM)

Inference of the SBM model (maximum likelihood):� log-likelihood:

log p(X|α,Π) = log

{∑

Z

p(X,Z|α,Π)

},

↪→ KN terms!

� Expectation Maximization (EM) algorithm requires the knowledge ofp(Z|X,α,Π),

� Problem: p(Z|X,α,Π) is not tractable (no conditional independence)!

Solutions:� Variational EM (Daudin et al., 2008) + ICL (Biernacki et al., 2003),� Variational Bayes EM + ILvb criterion (Latouche et al., 2012).

13

Page 19: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The stochastic block model (SBM)

Inference of the SBM model (maximum likelihood):� log-likelihood:

log p(X|α,Π) = log

{∑

Z

p(X,Z|α,Π)

},

↪→ KN terms!

� Expectation Maximization (EM) algorithm requires the knowledge ofp(Z|X,α,Π),

� Problem: p(Z|X,α,Π) is not tractable (no conditional independence)!

Solutions:� Variational EM (Daudin et al., 2008) + ICL (Biernacki et al., 2003),� Variational Bayes EM + ILvb criterion (Latouche et al., 2012).

13

Page 20: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The stochastic block model (SBM)

Inference of the SBM model (maximum likelihood):� log-likelihood:

log p(X|α,Π) = log

{∑

Z

p(X,Z|α,Π)

},

↪→ KN terms!

� Expectation Maximization (EM) algorithm requires the knowledge ofp(Z|X,α,Π),

� Problem: p(Z|X,α,Π) is not tractable (no conditional independence)!

Solutions:� Variational EM (Daudin et al., 2008) + ICL (Biernacki et al., 2003),� Variational Bayes EM + ILvb criterion (Latouche et al., 2012).

13

Page 21: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Outline

Introduction

The stochastic block model (SBM)

The random subgraph model (RSM)

Model inference

Numerical experiments

Analysis of an ecclesiastical network

(Analysis of a maritime flow network)

Conclusion

14

Page 22: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The random subgraph model (RSM)

Before the maths, an example of an RSM network:

Figure : Example of an RSM network.

We observe:� the partition of the network intoS = 2 subgraphs (node form),

� the presence Aij of directed edgesbetween the N nodes,

� the type Xij ∈ {1, ..., C} of theedges (C = 3, edge color).

We search:� a partition of the node into K = 3

groups (node color),� which overlap with the partition

into subgraphs.

15

Page 23: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The random subgraph model (RSM)

Before the maths, an example of an RSM network:

Figure : Example of an RSM network.

We observe:� the partition of the network intoS = 2 subgraphs (node form),

� the presence Aij of directed edgesbetween the N nodes,

� the type Xij ∈ {1, ..., C} of theedges (C = 3, edge color).

We search:� a partition of the node into K = 3

groups (node color),� which overlap with the partition

into subgraphs.

15

Page 24: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The random subgraph model (RSM)

The network (represented by its adjacency matrix X) is assumed to begenerated as follows:� the presence of an edge between nodes i and j is such that:

Aij ∼ B(γsisj )

where si ∈ {1, ..., S} indicates the (observed) subgraph of node i,

� each node i is as well associated with an (unobserved) group among Kaccording to:

Zi ∼M(αsi)

where αs ∈ [0, 1]K and∑Kk=1 αsk = 1,

� each edge Xij can be finally of C different (observed) types and suchthat:

Xij |AijZikZjl = 1 ∼M(Πkl)

where Πkl ∈ [0, 1]C and∑Cc=1 Πklc = 1.

16

Page 25: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The random subgraph model (RSM)

The network (represented by its adjacency matrix X) is assumed to begenerated as follows:� the presence of an edge between nodes i and j is such that:

Aij ∼ B(γsisj )

where si ∈ {1, ..., S} indicates the (observed) subgraph of node i,� each node i is as well associated with an (unobserved) group among K

according to:Zi ∼M(αsi)

where αs ∈ [0, 1]K and∑Kk=1 αsk = 1,

� each edge Xij can be finally of C different (observed) types and suchthat:

Xij |AijZikZjl = 1 ∼M(Πkl)

where Πkl ∈ [0, 1]C and∑Cc=1 Πklc = 1.

16

Page 26: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The random subgraph model (RSM)

The network (represented by its adjacency matrix X) is assumed to begenerated as follows:� the presence of an edge between nodes i and j is such that:

Aij ∼ B(γsisj )

where si ∈ {1, ..., S} indicates the (observed) subgraph of node i,� each node i is as well associated with an (unobserved) group among K

according to:Zi ∼M(αsi)

where αs ∈ [0, 1]K and∑Kk=1 αsk = 1,

� each edge Xij can be finally of C different (observed) types and suchthat:

Xij |AijZikZjl = 1 ∼M(Πkl)

where Πkl ∈ [0, 1]C and∑Cc=1 Πklc = 1.

16

Page 27: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The random subgraph model (RSM)

4 Y. JERNITE ET AL.

Notations Description

X Adjacency matrix. Xij ! {0, . . . , C} indicates the edge typeA Binary matrix. Aij = 1 indicates the presence of an edgeZ Binary matrix. Zik = 1 indicates that i belongs to cluster kN Number of vertices in the networkK Number of latent clustersS Number of subgraphsC Number of edge types! !sk is the proportion of cluster k in subgraph s! !klc is the probability of having an edge of type c

between vertices of clusters k and l" "rs probability of having an edge between vertices of subgraphs r and s

Table 1Summary of the notations used in the paper.

the model, we also consider the binary matrix A with entries Aij such thatAi,j = 1 !" Xi,j #= 0.

We also emphasize that the observed partition P induces a decompositionof the graph into subgraphs where each class of vertices corresponds to aspecific subgraph. We introduce the variable si which takes its values in{1, . . . , S} and is used to indicate in which of the subgraphs vertex i belongs,for i $ {1, . . . , N}.

2.1. The probabilistic model. The data is assumed to be generated inthree steps. First, the presence of an edge from vertex i to vertex j is sup-posed to follow a Bernouilli distribution whose parameter depends on thesubgraphs si and sj only:

Ai,j % B(!si,sj).

Each vertex i is then associated to a latent cluster with a probability de-pending on si. In practice, if we assume for now that the number K of latentclusters is known, the variable Zi is drawn from a multinomial distribution:

Zi % M(1;!si),

where

&s $ 1, . . . , S,

K!

k=1

"sk = 1.

A notable point of the model is that we allow each subgraph to have di!erentmixing proportions !s for the latent clusters. We denote hereafter ! =(!1, . . . ,!S). Finally, if an edge between i and j is present, i.e. Aij = 1,its type Xij is sampled from a multinomial distribution with parameters

Table : Summary of the notations.

17

Page 28: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The random subgraph model (RSM)

XijΠ

ZiZj

α

XijΠ

ZiZj Aij γ

α

Xij

P

(a) SBM (b) RSM

Figure : SBM model vs. RSM model.

18

Page 29: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The random subgraph model (RSM)

Remark 1:� the RSM model separates the roles of the known partition and the latent

clusters,� this was motivated by historical assumptions on the creation of

relationships during the 6th century,� indeed, the possibilities of connection were preponderant over the type of

connection and mainly dependent on the geography.

Remark 2:� an alternative approach would consist in allowing Xij to directly depend

on both the latent clusters and the partition,� however, this would dramatically increase the number of model

parameters (K2S2(C + 1) + SK instead of S2 +K2C + SK),� if S = 6, K = 6 and C = 4, then the alternative approach has 6 516

parameters while RSM has only 216.

19

Page 30: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The random subgraph model (RSM)

Remark 1:� the RSM model separates the roles of the known partition and the latent

clusters,� this was motivated by historical assumptions on the creation of

relationships during the 6th century,� indeed, the possibilities of connection were preponderant over the type of

connection and mainly dependent on the geography.

Remark 2:� an alternative approach would consist in allowing Xij to directly depend

on both the latent clusters and the partition,� however, this would dramatically increase the number of model

parameters (K2S2(C + 1) + SK instead of S2 +K2C + SK),� if S = 6, K = 6 and C = 4, then the alternative approach has 6 516

parameters while RSM has only 216.

19

Page 31: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The random subgraph model (RSM)

We consider a Bayesian framework:� the previous model is fully defined by its joint distribution:

p(X,A,Z|α, γ,Π) = p(X|A,Z,Π)p(A|γ)p(Z|α),

� which we complete with conjuguate prior distributions for modelparameters:� the prior distribution for α is:

p(γrs) = Beta(ars, brs),

� the prior distribution for γ is:

p(αs) = Dir(χs),

� the prior distribution for Π is:

p(Πkl) = Dir(Ξkl).

20

Page 32: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The random subgraph model (RSM)

Xij Π

ZiZj Aij

γα

Xij

Pχ a, b

Ξ

Figure : A graphical representation of the RSM model.

21

Page 33: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Outline

Introduction

The stochastic block model (SBM)

The random subgraph model (RSM)

Model inference

Numerical experiments

Analysis of an ecclesiastical network

(Analysis of a maritime flow network)

Conclusion

22

Page 34: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Model inference

Due to the Bayesian framework introduces above:� we aim at estimating the posterior distribution p(Z,α, γ,Π|X,A), which

in turn will allow us to compute MAP estimates of Z and (α, γ,Π),� as expected, this distribution is not tractable and approximate inference

procedures are required,� the use of MCMC methods is obviously an option but MCMC methods

have a poor scaling with sample sizes.

We chose to use variational approaches:� because they allow to deal with large networks (N > 1000),� recent theoretical results (Celisse et al., 2012; Mariadassou and Matias,

2013) gave new insights about convergence properties of variationalapproaches in this context.

23

Page 35: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Model inference

Due to the Bayesian framework introduces above:� we aim at estimating the posterior distribution p(Z,α, γ,Π|X,A), which

in turn will allow us to compute MAP estimates of Z and (α, γ,Π),� as expected, this distribution is not tractable and approximate inference

procedures are required,� the use of MCMC methods is obviously an option but MCMC methods

have a poor scaling with sample sizes.

We chose to use variational approaches:� because they allow to deal with large networks (N > 1000),� recent theoretical results (Celisse et al., 2012; Mariadassou and Matias,

2013) gave new insights about convergence properties of variationalapproaches in this context.

23

Page 36: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The VBEM algorithmWe aim at estimating the posterior distribution p(Z, θ|X):� we use the decomposition of the marginal log-likelihood:

log(p(X)) = L(q(Z, θ)) +KL(q(Z, θ)||p(Z, θ|X)),

where:� L(q(Z, θ)) =

∑Z

∫θq(Z, θ) log(p(X,Z, θ)/q(Z, θ))dθ is a lower bound of

the log-likelihood,� KL(q(Z, θ)||p(Z, θ|X)) = −∑

Z

∫θq(Z, θ) log(p(Z, θ|X)/q(Z, θ))dθ is the

KL divergence between q(Z, θ) and p(Z, θ|X).

� we also assume that q factorizes over Z and θ:

q(Z, θ) =∏

i

qi(Zi)qθ(θ).

The VBEM algorithm:� VB-E step: qθ(θ) is fixed and L is maximized over the qi⇒ log q∗j (Zj) = Ei 6=j,θ[log p(X,Z, θ)] + c

� VB-M step: all qi(Zi) are now fixed and L is maximized over qθ⇒ log q∗θ(θ) = EZ [log p(X,Z, θ)] + c

24

Page 37: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The VBEM algorithmWe aim at estimating the posterior distribution p(Z, θ|X):� we use the decomposition of the marginal log-likelihood:

log(p(X)) = L(q(Z, θ)) +KL(q(Z, θ)||p(Z, θ|X)),

where:� L(q(Z, θ)) =

∑Z

∫θq(Z, θ) log(p(X,Z, θ)/q(Z, θ))dθ is a lower bound of

the log-likelihood,� KL(q(Z, θ)||p(Z, θ|X)) = −∑

Z

∫θq(Z, θ) log(p(Z, θ|X)/q(Z, θ))dθ is the

KL divergence between q(Z, θ) and p(Z, θ|X).

� we also assume that q factorizes over Z and θ:

q(Z, θ) =∏

i

qi(Zi)qθ(θ).

The VBEM algorithm:� VB-E step: qθ(θ) is fixed and L is maximized over the qi⇒ log q∗j (Zj) = Ei 6=j,θ[log p(X,Z, θ)] + c

� VB-M step: all qi(Zi) are now fixed and L is maximized over qθ⇒ log q∗θ(θ) = EZ [log p(X,Z, θ)] + c24

Page 38: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The VBEM algorithm for RSM

Variational Bayesian inference in our case:� we aim at approximating the posterior distribution p(Z,α, γ,Π|X,A)

� we therefore search the approximation q(Z,α, γ,Π) which maximizesL(q) where:

log p(X,A) = L(q) +KL(q||p(.|X,A)),

� and q is assumed to factorize as follows:

q(Z,α, γ,Π) =∏

q(Zi)∏

q(αs)∏

q(γst)∏

q(Πkl).

The VBEM algorithm for RSM:� E step: compute the update parameter τi for q(Zi),� M step: compute the update parameters χ, γ, Ξ for respectively q(αs),q(γst) and q(Πkl).

25

Page 39: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The VBEM algorithm for RSM: the M step

The M step of the VBEM algorithm: the VBEM update step for thedistributions q(αs) is:

log q∗(αs) = EZ,α\s,γ,Π[log p(X,A,Z, α, γ,Π)] + c

=

K∑

k=1

log(αsk)

{χ0sk +

N∑

i=1

δ(ri = s)τik − 1

}+ c,

which is the functional form for a Dirichlet distribution:

q(αs) = Dir(αs;χs),∀s ∈ {1, . . . , S}

where χsk = χ0sk +

∑Ni=1 δ(ri = s)τik,∀k ∈ {1, . . . ,K}.

26

Page 40: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The VBEM algorithm for RSM: the M step

The M step of the VBEM algorithm: the VBEM update step for thedistributions q(αs) is:

log q∗(αs) = EZ,α\s,γ,Π[log p(X,A,Z, α, γ,Π)] + c

=

K∑

k=1

log(αsk)

{χ0sk +

N∑

i=1

δ(ri = s)τik − 1

}+ c,

which is the functional form for a Dirichlet distribution:

q(αs) = Dir(αs;χs),∀s ∈ {1, . . . , S}

where χsk = χ0sk +

∑Ni=1 δ(ri = s)τik,∀k ∈ {1, . . . ,K}.

26

Page 41: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The VBEM algorithm for RSM: the M step

The M step of the VBEM algorithm: the VBEM update step for thedistributions q(αs), q(γst) and q(Πkl) are:

� q(αs) = Dir(αs;χs),∀s ∈ {1, . . . , S},� q(γrs) = Beta(γrs; ars, brs),∀(r, s) ∈ {1, . . . , S}2,� q(Πkl) = Dir(Πkl; Ξkl),∀(k, l) ∈ {1, . . . ,K}2,

where:� χsk = χ0

sk +∑Ni=1 δ(ri = s)τik,∀k ∈ {1, . . . ,K},

� ars = a0rs +

∑ri=r,rj=s(Aij), brs = b0rs +

∑ri=r,rj=s(1−Aij),

� Ξklc = Ξ0klc +

∑Ni6=j δ(Xij = c)τikτjl,∀c ∈ {1, . . . , C}.

27

Page 42: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The VBEM algorithm for RSM: the E stepThe E step of the VBEM algorithm: the VBEM update step for thedistribution q(Zi) is given by:

log q∗(Zi) = EZ\i,α,γ,Π[log p(X,A,Z, α, γ,Π)] + c

which implies that

q(Zi) =M(Zi; 1, τi), ∀i = 1, ..., N

where

τik ∝ exp

(ψ(χri,k)− ψ(

K∑

l=1

χri,l)

)

+ exp

N∑

j 6=i

C∑

c=1

K∑

l=1

δ(Xij = c)τjl

(ψ(Ξklc)− ψ(

C∑

u=1

Ξklu)

)

+ exp

N∑

j 6=i

C∑

c=1

K∑

l=1

δ(Xji = c)τjl

(ψ(Ξlkc)− ψ(

C∑

u=1

Ξlku)

) .

28

Page 43: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Initialization and choice of K

Initialization of the VBEM algorithm:� the VBEM is known to be sensitive to its initialization,� we propose a strategy based on several k-means algorithms with a

specific distance:

d(i, j) =

N∑

h=1

δ(Xih 6= Xjh)AihAjh +

N∑

h=1

δ(Xhi 6= Xhj)AhiAhj .

Choice of the number K of groups:� once the VBEM algorithm has converged, the lower bound L(q) is a

good approximation of the integrated log-likelihood log p(X,A),� we thus can use L(q) as a model selection criterion for choosing K,� if computed right after the M step,

L(q) =

S∑r,s

log(B(ars, brs)

B(a0rs, b0rs)

) +

S∑s=1

log(C(χs)

C(χ0s)

) +

K∑k,l

log(C(Ξkl)

C(Ξ0kl)

)−N∑

i=1

K∑k=1

τik log(τik).

29

Page 44: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Initialization and choice of K

Initialization of the VBEM algorithm:� the VBEM is known to be sensitive to its initialization,� we propose a strategy based on several k-means algorithms with a

specific distance:

d(i, j) =

N∑

h=1

δ(Xih 6= Xjh)AihAjh +

N∑

h=1

δ(Xhi 6= Xhj)AhiAhj .

Choice of the number K of groups:� once the VBEM algorithm has converged, the lower bound L(q) is a

good approximation of the integrated log-likelihood log p(X,A),� we thus can use L(q) as a model selection criterion for choosing K,� if computed right after the M step,

L(q) =S∑r,s

log(B(ars, brs)

B(a0rs, b0rs)

) +

S∑s=1

log(C(χs)

C(χ0s)

) +

K∑k,l

log(C(Ξkl)

C(Ξ0kl)

)−N∑

i=1

K∑k=1

τik log(τik).

29

Page 45: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Outline

Introduction

The stochastic block model (SBM)

The random subgraph model (RSM)

Model inference

Numerical experiments

Analysis of an ecclesiastical network

(Analysis of a maritime flow network)

Conclusion

30

Page 46: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Experimental setup

We considered 3 different situations:� S1 : network without subgraphs and

with a preponderant proportion ofedges of type 1,

� S2 : network without subgraphs andwith balanced proportions of the threeedge types,

� S3 : network with 3 subgraphs andwith balanced proportions of the threeedge types.

Global setup:� in all cases, the number of (unobserved) groups is K = 3 and the

network size is N = 100,� we use the adjusted Rand index (ARI) for evaluating the clustering

quality (and thus the model fitting).

31

Page 47: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Choice of the number K of groups

First, a model selection study:

� we aim at validating the use of L(q) as model selection criteria,

� we simulated 50 RSM networks according to scenario 1 and withN = 100,

� and applied our VB-EM algorithm for different values of K (K = 2, ..., 5),

� the actual value of K is K = 3.

32

Page 48: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Choice of the number K of groups12 Y. JERNITE ET AL.

2 3 4 5

−2515

−2510

−2505

−2500

−2495

−2490

Criterion L

K

L

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

ARI repartition

KAR

I2 3 4 5

Fig 4. Repartition of the criterion (left panel) and ARI (right panel) over 50 networksgenerated with the parameters of the first scenario.

data drawn according to its generative process. We were interested in thecomparison with the following models:

• binary SBM (presence): We fit a binary SBM using the R packagemixer (?) on the data by considering only the presence of the edgesand not the type of the edges.

• binary SBM (type 1, 2 or 3): We fit a binary SBM, still using theMixer package, on the graphs defined by taking only the edges of onetype.

• typed SBM : We consider here a SBM with discrete edges. AlthoughSBM was originally proposed in ? with discrete edges, existing soft-wares only propose to fit a SBM on binary networks. We thereforehad to implement a version of the SBM which supports typed edges.Note that, in this case, the types of edges are in {0, . . . , C}, where 0corresponds to the absence of a relation.

• RSM : We run the VBEM algorithm, that we proposed in Section 2 forthe inference of the RSM model, with the available subgraph partitionand with 5 random initializations for each run.

Table ?? presents the average ARI values and standard deviations on50 simulated graphs for each scenario and with binary SBM, typed SBMand RSM. We point out that the inference is done with the actual numberof clusters and this for each method. One can observe that, for the firstscenario, the binary SBM based on the link presences and the type 2 SBMalways fail whereas type 1, type 3 and typed SBM work pretty well. Those

Table : Lower bound L and ARI averaged over 50 networks simulated according tothe RSM model.

33

Page 49: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Comparison with other SBM-based approaches

Second, a comparison with other SBM-based methods:� binary SBM: the original SBM algorithm was applied on a collapsed

version of the data (only the presence of edges); the mixer package wasused,

� binary SBM (type 1, 2 or 3): the original SBM algorithm was applied ona collapsed version of the data (only edges of type 1, 2 or 3); the mixerpackage was used,

� typed SBM: we had to implement the categorical version of SBM since itis not available in existing software; this version of SBM will be availablein mixer soon,

� the studied methods were applied to the the three scenarii and results areaveraged over 50 networks.

34

Page 50: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Comparison with other SBM-based approaches

Method Scenario 1 Scenario 2 Scenario 3binary SBM (presence) 0.001 ± 0.012 0.001 ± 0.013 0.239 ± 0.061binary SBM (type 1) 0.976 ± 0.071 0.494 ± 0.233 -0.372 ± 0.262binary SBM (type 2) 0.001 ± 0.006 -0.003 ± 0.006 0.179 ± 0.097binary SBM (type 3) 0.959 ± 0.121 0.519 ± 0.219 0.367 ± 0.244Typed SBM 0.694 ± 0.232 0.472 ± 0.339 0.360 ± 0.162RSM 1.000 ± 0.000 0.981 ± 0.056 0.939 ± 0.097

Table : ARI averaged over 50 networks simulated according to the threeconsidered situations.

35

Page 51: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Outline

Introduction

The stochastic block model (SBM)

The random subgraph model (RSM)

Model inference

Numerical experiments

Analysis of an ecclesiastical network

(Analysis of a maritime flow network)

Conclusion

36

Page 52: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The ecclesiastical network

The data:� 1331 individuals (mostly clergymen) who

participated to ecclesiastical councils inGaul between 480 and 614,

� 4 types of relationships betweenindividuals have been identified (positive,negative, variable or neutral),

� each individual belongs to one of the 5regions (3 kingdoms et 2 provinces).

Our modeling allows a multi-level analysis:� Z allows to characterize the found clusters through social positions of the

individuals,� parameter Π describes the relations between the found clusters,� parameter γ describes the connections between the subgraphs,� parameter α describes the cluster repartition in the subgraphs.

37

Page 53: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

RSM results: the latent clusters

Bishop Priest Abbot Earl Duke Monk Deacon King Queen Archdeacon

Cluster 1

05

01

00

15

02

00

25

0

Bishop Priest Abbot Earl Duke Monk Deacon King Queen Archdeacon

Cluster 2

02

46

8

Bishop Priest Abbot Earl Duke Monk Deacon King Queen Archdeacon

Cluster 3

05

01

00

15

0

Bishop Priest Abbot Earl Duke Monk Deacon King Queen Archdeacon

Cluster 4

01

23

45

6

Bishop Priest Abbot Earl Duke Monk Deacon King Queen Archdeacon

Cluster 5

05

10

15

20

Bishop Priest Abbot Earl Duke Monk Deacon King Queen Archdeacon

Cluster 6

01

02

03

04

0

Figure : Characterization of the K = 6 clusters found by RSM.38

Page 54: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

RSM results: the latent clusters

The latent clusters from the historical point of view:

� clusters 1 and 3 correspond to local, provincial of diocesan councils,mostly interested in local issues (ex: council of Arles, 554),

� clusters 2 and 6 correspond to councils dedicated to political questions,usually convened by a king (ex: Orleans, 511),

� clusters 4 and 5 correspond to aristocratic assemblies, where queens andduke and earls are present (ex: Orleans, 529).

39

Page 55: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

RSM results: the relationships between clusters

positive

cluster 1

cluster 2

cluster 3

cluster 4

cluster 5

cluster 6

negative

cluster 1

cluster 2

cluster 3

cluster 4

cluster 5

cluster 6

Figure : Characterization of the relationships between clusters (parameter Π).

40

Page 56: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

RSM results: the relationships between clusters

variable

cluster 1

cluster 2

cluster 3

cluster 4

cluster 5

cluster 6

neutral

cluster 1

cluster 2

cluster 3

cluster 4

cluster 5

cluster 6

Figure : Characterization of the relationships between clusters (parameter Π).

41

Page 57: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

RSM results: the relationships between clusters

The clusters relationships from the historical point of view:

� positive relations between clusters 3, 5 and 6 mainly corresponds topersonal friendships between bishops (source effect),

� negative and variable relations betweens clusters 4, 5 and 6 report theconflicts in the hierarchy of the power,

� neutral relations between clusters 1, 3 and 6 were expected because theydeal with different issues (local / political).

42

Page 58: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

RSM results: the relationships between regions

Neustria Provence Unknown Aquitaine Austrasia Burgundy

Neustr

iaP

rovence

Unknow

nA

quitain

eA

ustr

asia

Burg

undy

1

2

3

4

5

6

1 2 3 4 5 6

−3.5

−3.0

−2.5

−2.0

−1.5

Figure : Characterization of the relationships between the regions (parameter γ inlog scale).

43

Page 59: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

RSM results: comparison of the regions

Neustria Provence Unknown Aquitaine Austrasia Burgundy total

Pro

port

ions

0.0

0.1

0.2

0.3

0.4

0.5

cluster 1

cluster 2

cluster 3

cluster 4

cluster 5

cluster 6

Figure : Characterization of regions through cluster repartition (parameter α).44

Page 60: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

RSM results: comparison of the regions

−1 0 1 2 3

−1.

5−

1.0

−0.

50.

00.

5

Comp.1

Com

p.2

Neustria

Provence

Unknown

Aquitaine

Austrasia

Burgundy

Figure : PCA for compositional data on the parameter α.45

Page 61: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Outline

Introduction

The stochastic block model (SBM)

The random subgraph model (RSM)

Model inference

Numerical experiments

Analysis of an ecclesiastical network

(Analysis of a maritime flow network)

Conclusion

46

Page 62: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

A maritime flow network

We considered the data from Ducruet (2013):

� data from Lloyd’s List (Voyage Record) covering the periodOctober-November 2004,

� huge work to extract from paper versions and complement the lacks(capacity, ...),

� the data contains 28277 vessels between 1815 ports,� 4 types of relations between ports are considered: liquid bulk, passengers,

containers and solid bulk.

The softwares:

� package Mixer for R which implements SBM,� package Rambo for R which implements RSM.

47

Page 63: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

A maritime flow network

Data organized by continent

Figure : Adjacency matrix organized by continent with categorical edges(containers, solid bulk, liquid bulk and passengers).

48

Page 64: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Results of SBM

●●

●● ●

●●

●●

●●

●●

5 10 15 20

−19

500

−18

000

−16

500

Integrated Classification Likelihood

Number of classes

ICL

Reorganized Adjacency matrix

classes

clas

ses

Degree distribution

degrees

Den

sity

0 50 100 150 200

0.00

0.04

0.08

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

Inter/intra class probabilities

Figure : Output from the mixer package (SBM).

49

Page 65: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Results of SBM

Inter/intra class probabilities

Figure : Connection probabilities between groups (matrix Π).

50

Page 66: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Results of SBM

−3 −1 1 2 3

−1.0

−0.5

0.0

0.5

1.0

Group 1

V5

V6

●●

●●●

●●

●●●

●●●●

●●

●●

−3 −1 1 2 3

−1.0

−0.5

0.0

0.5

1.0

Group 2

V5

V6

●●

●●

●●

●●●●

●●●

●●●●

−3 −1 1 2 3

−1.0

−0.5

0.0

0.5

1.0

Group 3

V5

V6

●●

●●●●

●●●

●●

●●●

●●

●●

●●

●●

●●●

●●●●

●●●

●●

●●

●●●●●

●●●●●

−3 −1 1 2 3

−1.0

−0.5

0.0

0.5

1.0

Group 4

V5

V6

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●●

● ●

●●

●●

●●●

●●

●●

●●

●●

−3 −1 1 2 3

−1.0

−0.5

0.0

0.5

1.0

Group 5

V5

V6

●●

●●

●●

●●

●●●

●●

●●

−3 −1 1 2 3

−1.0

−0.5

0.0

0.5

1.0

Group 6

V5

V6

●●

●●

●●

●●

●●

●●

●●

−3 −1 1 2 3

−1.0

−0.5

0.0

0.5

1.0

Group 7

V5

V6

●●

●●

●●

●●

−3 −1 1 2 3

−1.0

−0.5

0.0

0.5

1.0

Group 8

V5

V6

●●●

−3 −1 1 2 3

−1.0

−0.5

0.0

0.5

1.0

Group 9

V5V6

●●

●●

−3 −1 1 2 3

−1.0

−0.5

0.0

0.5

1.0

Group 10

V5

V6

●●●

Figure : Geography of the clusters.

51

Page 67: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Results of SBM

Figure : Adjacency matrix organized according to the SBM groups (containers,solid bulk, liquid bulk and passengers).

52

Page 68: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Results of RSM

● ●●

2 3 4 5 6

−59

500

−58

000

Lower bound

Number of classes

Low

er b

ound

crit

erio

n

subgraph 1 subgraph 2 subgraph 3 subgraph 4 subgraph 5 subgraph 6 subgraph 7

cluster 1

cluster 2

cluster 3

cluster 4

cluster 5

Repartition of clusters into subgraphs

Pro

port

ions

0.0

0.2

0.4

Figure : Output of the Rambo package (RSM).

53

Page 69: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Results of RSM

−3 −2 −1 0 1 2 3

−1.

00.

00.

51.

0Group 1

V5

V6

●●

●●

●●

●●●

●●

●●

●●

●●●

●●

●● ●●

−3 −2 −1 0 1 2 3

−1.

00.

00.

51.

0

Group 2

V5

V6 ●

●●

●●

● ●

●●

●●

● ●

● ●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●●

●●● ●

●●

●●

●●●●

−3 −2 −1 0 1 2 3

−1.

00.

00.

51.

0

Group 3

V5

V6

●●

●●

●●

●●

●●

●●

● ●●

●●

●●●

●●

●●

● ●●

−3 −2 −1 0 1 2 3

−1.

00.

00.

51.

0

Group 4

V5

V6

●●

●●

●●

●●

●●●●

●●●

●●●

●●

● ●●

●●

●● ●

●●

●●

●●

●●

● ●

●●

●●

●●●

●●

● ●

●●

●●

●●

● ●

●● ●

●●

●●

●●

●● ●●

●●●

●●

●●

●●

●●●

●●

●●

● ●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●●

Figure : Geography of the clusters.

54

Page 70: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Results of RSM

Figure : Adjacency matrix organized according to the RSM groups (containers,solid bulk, liquid bulk and passengers).

55

Page 71: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

Outline

Introduction

The stochastic block model (SBM)

The random subgraph model (RSM)

Model inference

Numerical experiments

Analysis of an ecclesiastical network

(Analysis of a maritime flow network)

Conclusion

56

Page 72: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

ConclusionOur contribution:� the model takes into account an existing partition into subgraphs,� this modeling allows afterward a comparison of the subgraphs,� inference is done in a Bayesian framework using a VBEM algorithm.

Interesting problems to address:� temporality of the network (evolution of relations, offices or social

positions),� visualization of this kind of networks.

Software:

package Rambo for the R software is available on the CRAN

Publication:

C. Bouveyron, L. Jegou, Y. Jernite, S. Lamassé, P. Latouche & P. Rivera,The random subgraph model for the analysis of an ecclesiastical network inmerovingian Gaul, The Annals of Applied Statistics, 8(1), 377-405, 2014.

http://arxiv.org/abs/1212.5497

57

Page 73: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

ConclusionOur contribution:� the model takes into account an existing partition into subgraphs,� this modeling allows afterward a comparison of the subgraphs,� inference is done in a Bayesian framework using a VBEM algorithm.

Interesting problems to address:� temporality of the network (evolution of relations, offices or social

positions),� visualization of this kind of networks.

Software:

package Rambo for the R software is available on the CRAN

Publication:

C. Bouveyron, L. Jegou, Y. Jernite, S. Lamassé, P. Latouche & P. Rivera,The random subgraph model for the analysis of an ecclesiastical network inmerovingian Gaul, The Annals of Applied Statistics, 8(1), 377-405, 2014.

http://arxiv.org/abs/1212.549757

Page 74: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The EM, VEM and VBEM algorithmsFirst, it necessary to write the log-likelihood as:

log(p(X|θ)) = L(q(Z); θ) +KL(q(Z)||p(Z|X, θ)),

where:� L(q(Z); θ) =

∑Z q(Z) log(p(X,Z|θ)/q(Z)) is a lower bound of the

log-likelihood,� KL(q(Z)||p(Z|X, θ)) = −∑Z q(Z) log(p(Z|X, θ)/q(Z)) is the KL

divergence between q(Z) and p(Z|X, θ).

The EM algorithm:� E step: θ is fixed and L is maximized over q ⇒ q∗(Z) = p(Z|X, θ)� M step: L(q∗(Z), θold) is now maximized over θ

L(q∗(Z), θold) =∑

Z

p(Z|X, θold) log(p(X,Z|θ)/p(Z|X, θold))

= E[log(p(X,Z|θ)|θold] + c.

58

Page 75: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The EM, VEM and VBEM algorithms

The variational approach:� let us now suppose that p(X,Z|θ) is, for some reason, intractable,� the variational approach restrict the range of functions for q such that

the problem is tractable,� a popular variational approximation is to assume that q factorizes:

q(Z) =∏

i

qi(Zi).

The VEM algorithm:� V-E step: θ is fixed and L is maximized over q ⇒

log q∗j (Zj) = Ei 6=j [log p(X,Z|θ)] + c

� V-M step: L(q∗(Z), θold) is now maximized over θ

59

Page 76: The Random Subgraph Model for the Analysis of an ......Therandomsubgraphmodel(RSM) 4 Y.JERNITEETAL. Notations Description X Adjacencymatrix. X ij! {0,...,C} indicatestheedgetype A

The EM, VEM and VBEM algorithms

We consider now the Bayesian framework:� we aim at estimating the posterior distribution p(Z, θ|X),� we have here the relation:

log(p(X)) = L(q(Z, θ)) +KL(q(Z, θ)||p(Z, θ|X)),

� we also assume that q factorizes over Z and θ:

q(Z, θ) =∏

i

qi(Zi)qθ(θ).

The VBEM algorithm:� VB-E step: qθ(θ) is fixed and L is maximized over the qi ⇒

log q∗j (Zj) = Ei 6=j,θ[log p(X,Z, θ)] + c

� VB-M step: all qi(Zi) are now fixed and L is maximized over qθ ⇒log q∗θ(θ) = EZ [log p(X,Z, θ)] + c

60