Matthieu Latapy

Nathalie Peyrard

Fabrice Rossi

Je

Josette Valérie

Marc Hoffmann

Vincent Rivoirard

Béatrice Baeza

Ana Drumea

Christophe Ambroise

Mahendra Mariadassou

Julien Stoehr

J'ai

Philippe Saint-Pierre

Michel Delecroix

Olivier Zindy

Arnaud Guyader

Olivier Lopez

Frédéric Guilloux.... D' Jean-Patrick Baudry

Eric Sarah

Carlo

Nicolas, Michel, Flaminia, Suzanna Paul

Henri

Alexandra Florian

Olivier

Béatrice Thomas

Keywords: maximum likelihood estimation, dynamic network, dynamic stochastic block model, variational estimation, temporal network, Markov random field, Potts model, EM algorithm, spatial data, spatial network, mean field like approximation estimation du maximum de vraisemblance, réseau dynamique, modèle à blocs stochastiques dynamique, estimation variationnelle, champ aléatoire de Markov, modèle de Potts, algorithme EM, données spatiales, réseau spatial, approximation de type champ moyen

Voilà maintenant dix ans que j'étudie au campus Pierre et Marie Curie, et c'est avec un peu d'émotion que je réalise que cette étape de ma vie se termine avec cette thèse. De nombreuses personnes m'ont permis d'en arriver là, et je souhaite leur exprimer ma gratitude. Aux personnes que j'aurais oubliées, je suis désolée, et je vous remercie également.

La première personne que je souhaite remercier est bien évidemment Catherine, ma directrice de thèse. Catherine, merci pour la confiance que tu m'as accordée, pour ta patience, pour m'avoir laissé la liberté dont j'avais besoin, tout en étant disponible et en prenant le temps de lire et relire de nombreuses fois mon travail quand j'en avais besoin. J'ai eu la chance de pouvoir profiter pendant cette thèse de tes immenses connaissances et de ta rigueur, que j'avais déjà beaucoup appréciée lorsque j'ai suivi ton cours en master.

Résumé

Cette thèse porte sur le maximum de vraisemblance dans des extensions dynamiques et spatiales du modèle à blocs stochastiques (SBM), fondées respectivement sur des chaînes et champs de Markov cachés. Dans une première partie, on considère une version dynamique du modèle à blocs stochastiques, adaptée à l'observation de réseaux à différents pas de temps. Dans ce SBM dynamique, les noeuds sont répartis dans des groupes latents et la connexion entre deux noeuds suit une loi de Bernoulli dont le paramètre dépend du groupe de ces deux noeuds. L'évolution temporelle des appartenances aux groupes des noeuds est modélisée par une chaîne de Markov cachée. On prouve la consistance (lorsque les nombres de noeuds et de pas de temps augmentent) des estimateurs du maximum de vraisemblance et variationnels des paramètres du modèle, et on obtient des bornes supérieures pour le taux de convergence de ces estimateurs. On explore aussi le cas où le nombre de pas de temps est fixé et les paramètres de probabilités de connexion peuvent varier dans le temps. On obtient également des résultats concernant l'identifiabilité des paramètres dans ce SBM dynamique. Dans une seconde partie, on introduit une version spatiale du modèle à blocs stochastiques, adaptée à l'observation de réseaux dans différentes localisations spatiales. Dans ce SBM spatial, comme précédemment, les noeuds sont répartis dans des groupes latents et la connexion entre deux noeuds suit une loi de Bernoulli dont le paramètre dépend du groupe de ces deux noeuds. L'évolution spatiale des appartenances aux groupes des noeuds est modélisée par des champs de Markov cachés. On montre d'abord que le paramètre de ce modèle est génériquement identifiable sous certaines conditions. Pour l'estimation des paramètres, on propose d'adapter à notre modèle une variante de l'algorithme Espérance-Maximisation (EM) reposant sur une approximation de type champ moyen grâce à la simulation de configurations latentes.

Les graphes aléatoires constituent un outil adapté pour représenter et modéliser des réseaux, composés d'entités intéragissant entre elles. On s'intéresse dans cette thèse plus particulièrement au modèle à blocs stochastiques (Stochastic Block Model, SBM). On étudie des versions dynamique et spatiale du SBM, les données disponibles pouvant être composées de plusieurs graphes dépendant les uns des autres, notamment de façon temporelle ou spatiale.

On définit un graphe G = (V, E) comme étant un ensemble V de noeuds et un ensemble E d'arêtes entre ces noeuds. On s'intéresse dans cette thèse à des graphes binaires, c'est-à-dire dans lesquels une arête est présente ou absente (en opposition aux graphes valués, dans lesquels les arêtes ont des poids).

Le modèle à blocs stochastiques (SBM) est un modèle de graphe dans lequel n noeuds sont répartis dans Q groupes, cette répartition étant inconnue. Les appartenances aux groupes {Z i } 1≤i≤n sont des variables aléatoires latentes i.i.d. à valeurs dans {1, . . . , Q}, chaque noeud ayant une probabilité α q d'être dans le groupe q. La distribution des arêtes est caractérisée par les groupes auxquels appartiennent les deux noeuds. On considère le cas binaire, dans lequel une arête entre deux noeuds appartenant respectivement aux groupes q et l est présente avec une probabilité π ql . Le graphe observé a donc une matrice d'adjacence X = (X ij ) 1≤i,j≤n ∈ {0, 1} n 2 , où X ij représente l'arête entre les noeuds i et j. Un cas particulier est celui où les noeuds d'un même groupe sont fortement connectés entre eux, et peu connectés avec les noeuds des autres groupes. Une méthode d'estimation classique des paramètres du SBM repose sur l'utilisation de l'algorithme VEM (Variational Expectation-Maximisation), le maximum de vraisemblance ne pouvant pas être calculé directement, et l'algorithme EM (Expectation-Maximisation) ne pouvant pas être utilisé en raison de la complexité de la loi des observations X sachant les variables latentes (Z 1 , . . . , Z n ).

Dans une première partie, présentée dans le Chapitre 2 on étudie une version dynamique en temps discret du SBM [START_REF] Yang | Detecting communities and their evolutions in dynamic social networks-a Bayesian approach[END_REF][START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF]. Dans ce modèle, l'évolution temporelle de l'appartenance à un groupe de chacun des noeuds est xvi modélisée par une chaîne de Markov (non observée). À chaque pas de temps, les arêtes sont modélisées par un SBM binaire. Cela correspond au modèle de Yang et al. (2011). En se basant sur [START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF], on prouve la consistance (lorsque les nombres de noeuds et de pas de temps augmentent) de l'estimateur du maximum de vraisemblance π = {π ql } 1≤q,l≤Q du paramètre de probabilité de connexion entre groupes sous certaines hypothèses sur ces paramètres, et de celui de la matrice de probabilité de transition de la chaîne de Markov cachée avec une hypothèse supplémentaire sur la vitesse de convergence de π. On obtient également une borne pour la vitesse de convergence de ces estimateurs. En pratique, on ne peut pas calculer les estimateurs du maximum de vraisemblance, on prouve donc également la consistance (et on obtient des bornes sur la vitesse comme précédemment) des estimateurs variationnels, approximant le maximum de vraisemblance grâce à un algorithme VEM (maximisant en fait une borne inférieure de la vraisemblance). On prouve de même la consistance des estimateurs lorsque le nombre de noeuds tend vers l'infini (et on obtient des bornes sur la vitesse) dans le cas où le nombre de pas de temps est fixé et les probabilités de connexions peuvent changer au cours du temps (correspondant au modèle de [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF]). On obtient également des résultats concernant l'identifiabilité des paramètres dans ce SBM dynamique dans la Section 1.6.1.

Dans une deuxième partie, présentée dans le Chapitre 3, on propose une version spatiale du SBM. On considère une dépendance spatiale des graphes, modélisée par des champs de Markov. Pour chaque noeud i, les appartenances aux groupes suivent un champ de Markov, et plus précisément un modèle de Potts, basé sur un graphe G i = (V i , E i ) sur les L localisations. La loi des variables latentes d'appartenances aux groupes Z i = (Z 1 i , . . . , Z L i ) pour un noeud i s'écrit alors

P ψ (Z i ) =P ψ (Z 1 i , . . . , Z L i ) = 1 S i (α i , β i ) exp   Q q=1 α iq L l=1 1 Z l i =q + β i (l,l ′ )∈E i 1 Z l i =Z l ′ i  
avec ψ = (α, β) où α = (α iq ) 1≤i≤n,1≤q≤Q est le paramètre du champ externe et β = (β i ) 1≤i≤n le paramètre d'interaction entre les localisations voisines dans les graphes sur les localisations, et avec S i (α i , β i ) une constante de normalisation (qui n'est pas calculable, sauf pour un nombre L de localisations très petit). À chaque localisation l, les interactions suivent un SBM de paramètre de connexion π l = {π l qq ′ } 1≤q,q ′ ≤Q , c'est-à-dire que pour tout i et j dans {1, . . . , n},

X l ij | Z l i , Z l j ∼ B(π l Z l i Z l j
).

Résumé détaillé xvii

On prouve l'identifiabilité générique des paramètres de ce modèle sous certaines hypothèses, et on explore le cas particulier du modèle d'affiliation1 , ce cas étant exclu par une des hypothèses, et on montre que ses paramètres ne sont pas identifiables sans hypothèse supplémentaire. On s'intéresse également à l'estimation des paramètres ψ (du modèle de Potts) et π = {π l } 1≤l≤L (probabilités de connexion). L'estimateur du maximum de vraisemblance n'est pas calculable en raison des constantes de normalisation inconnue, et car la vraisemblance est une somme sur les Q nL configurations latentes possibles. L'algorithme EM ne peut pas non plus être utilisé, en raison de la complexité de la loi des variables latentes {Z l i } 1≤i≤n,1≤l≤L sachant les observations {X l ij } 1≤i,j≤n,1≤l≤L et des constantes de normalisation. On propose d'estimer les paramètres en se basant sur l'algorithme simulated EM [START_REF] Celeux | EM procedures using mean field-like approximations for Markov model-based image segmentation[END_REF], une variante de l'algorithme EM reposant sur une approximation de type champ moyen grâce à la simulation de configurations latentes. Plus précisément, on approxime la loi des variables latentes sachant les observations par une loi factorisée en négligeant pour chaque noeud à chaque localisation les fluctuations des localisations voisines et des autres noeuds à la même localisation, en les considérant fixées aux valeurs d'une configuration simulée avec un échantillonneur de Gibbs. Pour résoudre le problème de la constante de normalisation, on approxime également la loi des variables latentes par une loi factorisée en négligeant pour chaque localisation les fluctuations des localisations voisines. La méthode est illustrée sur des jeux de données synthétiques.

List of Figures

Chapter 1 Introduction

Random graphs are a suitable and widely used tool to model and describe interactions in many kinds of network datasets. A few examples are social networks (Facebook, Twitter, etc.), biological networks (neural networks, protein interaction networks, gene regulatory networks, etc.), ecological networks (food-webs, competition, interaction such as plant-pollinator networks, species contact networks), transport networks or computer networks.

Statistical analysis of random graphs has been intensively studied over the past decades. This research has focused on various methods, uses and applications, for example methods for sampling network data, describing characteristics of networks, inference problems or prediction.

In the real world, the data we observe may be more complex than just a single network. We often have to deal with multiple networks that are not independent, or graphs with interactions changing continuously for example, hence a need for statistical analysis methods and results for these kinds of complex networks. In this work, we are interested in the kind of complex data formed by a collection of graphs that are dependent, either over time or space. For example, some well-studied types of time-evolving networks are that of human proximity networks1 or communication networks2 . Regarding spaceevolving networks, we could be interested in the relations between different categories of people (different socio-economic classes, different animal species) at different geographical locations.

In this chapter, we are going to give definitions, basic concepts and a brief overview of methods and results on random graphs. We will focus on the methods of node clustering and particularly on the Stochastic Block Model (SBM) [START_REF] Holland | Stochastic blockmodels: First steps[END_REF][START_REF] Nowicki | Estimation and prediction for stochastic blockstructures[END_REF]

Undirected binary graph

Directed binary graph Undirected weighted graph Fig. 1.1 Representation of different types of graphs [START_REF] Snijders | The statistical evaluation of social network dynamics[END_REF]. Then we will talk about dynamic graphs, and particularly a dynamic version of the SBM, and finally give some context about Markov random fields in order to introduce a space dependency between graphs.

Graphs: definitions and notations

We are first going to give in this section a definition and basic concepts of random graphs, that will be useful in the following. Let us define a graph G by

G = (V, E)
where V is a set of vertices (also called nodes) and E is a set of edges, of which the elements are pairs of vertices, representing the connections between these vertices. In the following, we will consider a vertex set of the form V = {1, . . . , n} with n := |V | the cardinality of the set V (i.e. the number of nodes). The edges may be directed (or oriented) or not, and may be binary or weighted. The edges are said to be directed if an edge (i, j) is different from the edge (j, i) (with i, j ∈ V ), and the considered graph is then called a directed graph. If the edges are not directed, the graph is called undirected.

A graph is said to be binary if its edges are either present or absent. It is said to be weighted if the edges e ∈ E have a weight, i.e. a value associated to it (usually in R or even in R k ). See Figure 1.1 for the representation of three different types of graphs. A graph can be represented by its adjacency matrix X = (X ij ) 1≤i,j≤n , which is a n × n matrix defined as follows for a binary graph

X ij =    1 if (i, j) ∈ E 0 otherwise,
and as follows for a weighted graph

X ij =    w ij if (i, j) ∈ E with an associated weight w ij 0 if (i, j) / ∈ E.
This matrix is symmetric for an undirected graph. Note that in this work, we will consider graphs with no loops, i.e. no edge (i, i) with i ∈ V (leading to an adjacency matrix whose diagonal is equal to zero), and with no multiple edges, i.e. no more than one edge between two nodes. Such graphs are called simple. The graphs we will focus on will also be binary.

Let us introduce some vocabulary and define a few characteristics of graphs. The number of nodes n and the number of edges |E| are sometimes called respectively the order and the size of the graph. Note that a graph with no loops (i.e. no edge (i, i)) has at most n(n -1)/2 edges if it is undirected and n(n -1) if it is directed. We can then define the density ρ of a graph as the proportion of existing edges, i.e. the size of the graph over the maximum number of edges, that is ρ = |E|/(n(n -1)/2) in the undirected case and ρ = |E|/(n(n -1)) in the directed case. Two vertices i, j ∈ V are said to be adjacent (or neighbours) if there is an edge between i and j. Two edges are said to be adjacent if they have an endpoint in common. A vertex i ∈ V is said to be incident on an edge e ∈ E if i is an endpoint of e.

We define for a binary graph the degree d i of a vertex i as the number of edges incident on this vertex. For directed graphs, we talk about in-degree (d in i ) and out-degree (d out i ), respectively counting the number of edges pointing to a vertex and pointing out from a vertex. Note that we can obtain the degrees by summing rows or columns of the adjacency matrix of a binary graph as follows

d i = n j=1 X ij = n j=1
X ji for an undirected graph,

d in i =
Fig. 1.2 Bipartite graph i (resp. j) is an endpoint of e 1 (resp. e K ). A cycle is a path from a node i to itself. In particular, a cycle of size 3 (i.e. with 3 edges) is called a triangle.

Remark 1.1.1. The notion of path defined here does not take into account the direction of edges in the case of a directed graph. We can naturally define the notion of directed path in such graphs.

A graph

H = (V H , E H ) is a subgraph of the graph G = (V G , E G ) if it is a graph such that V H ⊆ V G and E H ⊆ E G .
The connected components of a graph are defined as maximally connected subgraphs (i.e. such that there is a path between any two nodes of the same connected component, and there is no path between a node in a connected component and a node outside of this connected component).

Types of graphs

A graph G = (V, E) is said to be complete if all the vertices are connected one to another, i.e. E = {(i, j)} i,j∈V,i̸ =j . We can then define a clique of a graph G, that is a complete subgraph of G. Note that a clique of 3 nodes is a triangle, as defined above. A graph is said to be connected if it contains a unique connected component, i.e. if there exists a path between any two nodes i, j ∈ V . A graph is said to be bipartite if the nodes are of one of two types, and they can be connected only to nodes of the other type, as in Figure 1.2

Regarding the density of a graph, we will talk about dense graphs for graphs with many edges, when the number of edges is of the order of the maximal number of edges (typically |E| ∼ cn 2 with c a positive constant) and of sparse graphs for graphs with relatively few edges, in which the number of edges is "much less" than the possible number of edges, for example is linear with respect to the number of nodes (typically |E| = O(n)).

path length, answering the question "What is the typical distance between two nodes?", can in particular determine if the observed network exhibit the small world property. This property, based on the suggestion of [START_REF] Milgram | The small world problem[END_REF] that we are separated from any other person on the planet by at most roughly six other people, refers to the fact that in some networks (even large ones), the distance between any two nodes is relatively small. It has been shown to hold for many types of networks by [START_REF] Watts | Collective dynamics of 'small-world' networks[END_REF].

For more details on descriptive analysis of graphs, see [START_REF] Kolaczyk | Statistical analysis of network data: Methods and Models[END_REF].

Comparison to a null model Using generative models of graph, we can assess network topology. We can compare the observed network with graphs generated from random models, for some chosen features. The models used can be for example the simple Erdős-Rényi graph model (see Section 1.3) which assumes that every edge has the same probability of presence, or a model of random graphs with preserved degree sequence (see the fixed degree sequence configuration model in Section 1.3). The compared characteristics can be for example the reciprocity (as in [START_REF] Moreno | Statistics of social configurations[END_REF] who compared the fraction of reciprocated links in their network with a random model), a clustering coefficient or the importance of occurrence of certain motifs in the graphs (for example triangles, cliques or cycles of a given size). It is possible to compute empirical p-values to perform hypothesis testing for the characteristic of interest, with H 0 the null hypothesis corresponding to the null model. See for example [START_REF] Zweig | Network analysis literacy: A Practical Approach to the Analysis of Networks[END_REF] for more details and references for the use of null models for random graphs.

Disease transmission

In epidemiology, we can use graphs to study the spread of an infectious disease. In such context, the graph represents the contacts between people or subpopulations (and thus a possible contamination), that can evolve over time or not. For example, the SIR (susceptible-infectious-recovered)3 model is widely used for that purpose. In such a model, if an infectious individual has a contact with a susceptible one, then the susceptible individual can become infectious, and will cease to be contagious after a certain period of time and be transferred to the recovered group that are then immune to the disease. Based on that model, some problematics can be tackled, such as the prediction of the existence and size of an outbreak. We can also study the effect of potential control measures on the epidemics. The use of graphs for the study of transmission dynamics has been applied for example to sexually transmitted infections [START_REF] Haraldsdottir | Preliminary studies of sexual networks in a male homosexual community in Iceland[END_REF][START_REF] Watts | The influence of concurrent partnerships on the dynamics of HIV/AIDS[END_REF], to the 2009 H1N1 influenza pandemic, using a subpopulation network where connections among subpopulations represent the individual fluxes [START_REF] Balcan | Seasonal transmission potential and activity peaks of the new influenza A (H1N1): a Monte Carlo likelihood analysis based on human mobility[END_REF][START_REF] Bajardi | Modeling vaccination campaigns and the fall/winter 2009 activity of the new A (H1N1) influenza in the northern hemisphere[END_REF], and more recently to the Covid-19 [START_REF] Prasse | Network-Based Prediction of the 2019-nCoV Epidemic Outbreak in the Chinese Province Hubei[END_REF].

Link prediction

The task of predicting the absence or presence of an edge in a network (see for example [START_REF] Martínez | A survey of link prediction in complex networks[END_REF]) is useful for example for recommendation systems, aiming at predicting probable links between nodes from an existing network, such as friendship (for example social media/Facebook) or the interest in a product (for example Amazon). Note that in the latter, i.e. in the case of product recommendation, the considered graphs are bipartite, the interest being the "interaction" between people and products, representing the interest in a product or the purchase of a product. The task of link prediction can be used when wanting to predict future links, or when a portion of the adjacency matrix is unobserved/missing (for example due to sampling issues). The methods used for link prediction can be based for example on score functions (that can be based on similarity measures, distance between the nodes, common neighbourhood...), by predicting the presence of an edge when the score is above a certain threshold, or on classification methods (for example based on logistic regression) to predict the missing values of the adjacency matrix with a classifier built from the observed values.

Node clustering A common interest when considering network data is the recovery of a clustering, i.e. a partition of the nodes into groups sharing the same connection behaviours. Indeed, the behaviour of entities (nodes) in a network is usually heterogeneous, and this approach allows to describe this heterogeneity and to obtain a summary of the network through groups with different behaviours. A particular case is that of community detection, when one wants to find groups of nodes that are highly connected between them, and less connected to nodes from other groups. We will talk about network clustering later.

Model fitting and testing

One can be interested in fitting a model to the observed network, and testing the goodness of fit of this model. This allows, if the model is interpretable, to describe some characteristics of the network. Moreover, fitting a model to different networks can enable us to compare these networks. In this work, we will be interested in particular in parameter estimation, and will give more details about it later.

Random graph models

Many random graph models have been introduced. We present here some of the commonly used ones. The simplest one is the Erdös-Rényi graph model, assuming a constant probability of presence for every possible edge. We also present the configuration model that is based on the degree sequence (either fixed or following a power-law distribution), the exponential random graph model (ERGM), based on exponential families of distributions, and the Barabási-Albert model that is based on a preferential attachment mechanism. We then talk about latent variables graph models, that are the stochastic block model, the latent block model and the W -graph model.

In this section, we consider graph models for the observation of a single network.

Erdős-Rényi graph model

The simplest graph model is the one introduced by Erdös and Rényi [START_REF] Erdős | On random graphs I[END_REF][START_REF] Erdős | On the evolution of random graphs[END_REF]. Denoted by G (n, p), this is a model of undirected binary graph with n vertices, where edges are present between pairs of nodes independently with probability p. The expected number of edges in this model is p n 2 = pn(n -1)/2. For any node i, its degree D i follows a binomial distribution with parameter (n -1, p),

P (D i = k) = n -1 k p k (1 -p) n-1-k .
For large n and small p (such that np is approximately constant), each degree D i then follows approximately a Poisson distribution of parameter (n -1)p. Note that we can allow p := p n to vary with the number of edges n (usually to converge to 0 as the number of nodes increases), otherwise the obtained graphs are dense, whereas most observed large real-world networks are sparse. This model is very convenient and easy to manipulate, in particular its parameter p can be simply estimated by the density of the observed graph, i.e. the proportion of existing edges (i.e. the number of edges in the graph over the maximum number of edges n(n -1)/2). However, a drawback of this model is that it is often unrealistic to assume that the edges are independent and equally likely. This idea is supported by the fact that, as we will talk about later, real-world networks usually exhibit degree sequences fitting a power-law distribution (see Section 1.3.2). Moreover, contrarily to most real-world networks, Erdős-Rényi graphs do not exhibit much clustering behaviour, the connection behaviour being too homogeneous among nodes. For example, using the transitivity coefficient defined in Section 1.2, that takes its values in [0, 1] (a coefficient of 0 meaning that the graph contains no triangle and a coefficient of 1 meaning that two adjacent edges always form a triangle), the expectation of this coefficient in an Erdős-Rényi graph is equal to p. As mentioned before, most large real-world networks are not dense and we usually consider p := p n converging to 0 (as the number of nodes increases) to model them. This leads to a clustering coefficient converging to 0, while the values have been found to be quite large in real-world networks.

Remark 1. Actually, this model is the version introduced by [START_REF] Gilbert | Random graphs[END_REF], it was a slightly different model that was originally introduced by Erdős and Rényi. The original model G(n, M ) is the collection of all the simple undirected graphs of order n and size M (i.e. with n nodes and M edges), with a uniform distribution on this collection. This collection contains n(n-1)/2 M different graphs. While these two models are not identical4 , they are equivalent under certain conditions for large n and if M ∼ pn(n -1)/2 (see [START_REF] Luczak | On the equivalence of two basic models of random graph[END_REF] or [START_REF] Frieze | Introduction to random graphs[END_REF]).

Configuration model

As we just said, the Erdős-Rényi graph model leads to unrealistic graphs, for instance regarding their degree sequence. One possible way to consider a graph is to consider directly its degree distribution or degree sequence. We first state the Erdős-Gallai theorem [START_REF] Erdős | Graphs with points of prescribed degree. (Graphen mit Punkten vorgeschriebenen Grades.)[END_REF], see also [START_REF] Berge | Graphs and hypergraphs[END_REF]) that gives necessary and sufficient conditions for a finite sequence of natural numbers to be the degree sequence of a simple undirected graph.

Theorem (Erdős-Gallai theorem). A sequence of non-negative integers d 1 ≥ • • • ≥ d n can be represented as the degree sequence of a finite simple graph on n vertices if and only if

d 1 + • • • + d n is even and k i=1 d i ≤ k(k -1) + n i=k+1 min(d i , k)
holds for every k in {1, . . . , n}.

Fixed degree sequence

We can consider a fixed degree sequence (d 1 ≥ • • • ≥ d n ) for the n nodes, and consider the collection of all the graphs of order n with this degree sequence 5 , with a uniform probability. Note that not any sequence of nonnegative integers can be used for this definition. Indeed, the sequence must satisfy the conditions stated in Erdős-Gallai theorem above to be the degree sequence of a simple undirected graph. It is possible to generate graphs from this model with a sequence satisfying the Erdős-Gallai theorem, for example with a matching or rewiring algorithm (Algorithms 1 and 2 respectively). More efficient algorithms have also been introduced (see for example [START_REF] Viger | Efficient and simple generation of random simple connected graphs with prescribed degree sequence[END_REF]). The matching algorithm starts from an empty graph (with no edges) and adds an edge at each iteration between two nodes whose degrees are not yet equal to their fixed degrees (in the considered degree sequence). It is not very efficient as it can create graphs with multiple edges or loops, "forcing" us to start over. The rewiring 13 while E contains loops or multiple edges; 14 return E algorithm starts from an initial graph with the considered degree sequence and at each iteration, replaces an edge with another without changing the degrees (provided that these new edges do not create multiple edges or loops). It is more efficient than the matching algorithm, but requires an initial graph with the expected degree sequence.

As mentioned earlier, to assess the significance of topological characteristics of an observed network, one can use a null model to compare the features of interest. The fixed degree configuration model is widely used for that, by generating random graphs with the same degree sequence as the observed one6 and comparing the feature in the observed and simulated graphs.

Algorithm 2: Rewiring algorithm input : A list of edges E of a graph with the considered degree sequence and a number of iterations T output : An updated list of edges E 1 for t = 1 to T do 2 Draw e 1 = {i 1 , j 1 } and e 2 = {i 2 , j 2 } uniformly from E;

3 if i 1 ̸ = j 2 , i 2 ̸ = j 1 and {i 1 , j 2 }, {i 2 , j 1 } / ∈ E then 4
Replace e 1 and e 2 with {i 1 , j 2 } and {i 2 , j 1 } in E; 5 end 6 end 7 return E Power-law degree distribution We can also assume that the degrees D 1 , . . . , D n are i.i.d. random variables following a power-law distribution with some parameter γ > 0, i.e. such that ∀i ∈ 1, n

P(D i = d) ∝ d -γ ,
where ∝ means "proportional to". To generate a graph from this model, we could start by drawing a degree sequence from the power-law distribution, and then generate a graph with this degree sequence, but the drawn degree sequence has no reason to satisfy the Erdős-Gallai theorem. Such a method could be very inefficient. [START_REF] Britton | Generating simple random graphs with prescribed degree distribution[END_REF] propose for example to circumvent this problem by using the matching algorithm (Algorithm 1) and removing loops and merging multiple edges into single edges in the generated graph to obtain a simple graph, thus obtaining a degree distribution slightly different from the wanted one, but with asymptotically the right degree distribution under certain conditions on the moments of the degree distribution (thus on the power law exponent). Some graph models exhibiting a power law degree distributions have however been introduced, for example generative network growth models have been introduced [START_REF] Barabási | Emergence of scaling in random networks[END_REF][START_REF] Kleinberg | The web as a graph: measurements, models, and methods[END_REF][START_REF] Kumar | Extracting large-scale knowledge bases from the web[END_REF][START_REF] Kumar | Stochastic models for the web graph[END_REF][START_REF] Aiello | Random evolution in massive graphs[END_REF], mainly for the analysis of the World Wide Web, such as the Barabábasi-Albert model (that we will describe in Section 1.3.3). The purpose of such models is to obtain graphs exhibiting a power law degree sequence for a large number of nodes n. Some other methods were introduced, such as an extension of the Erdős-Rényi graph model (referred to as the generalised random graph) with random edge probabilities, based on the introduction of node-specific random variables [START_REF] Britton | Generating simple random graphs with prescribed degree distribution[END_REF], Chapter 6 of [START_REF] Hofstad | Random Graphs and Complex Networks, volume 1 of Cambridge Series in Statistical and Probabilistic Mathematics[END_REF], [START_REF] Lee | Bayesian inference on random simple graphs with power law degree distributions[END_REF]). In particular, [START_REF] Lee | Bayesian inference on random simple graphs with power law degree distributions[END_REF] propose to use Bertoin-Fujita-Roynette-Yor random variables that satisfy the required conditions on the node-specific variables to lead to a power law distribution, and they propose a variational Bayesian inference approach to estimate the parameter.

Regarding the estimation of the exponent γ, different methods are used. A simple method is to perform linear regression on the logarithm of the observed proportion of vertices with degree d for any d (i.e. of the empirical degree distribution), with respect to the logarithm of d. However, such methods have been shown to yield inaccurate estimators for different reasons (for details, see [START_REF] Goldstein | Problems with fitting to the power-law distribution[END_REF]; [START_REF] Bauke | Parameter estimation for power-law distributions by maximum likelihood methods[END_REF] or [START_REF] Clauset | Power-law distributions in empirical data[END_REF]). Estimation of the exponent can also be based on the maximum likelihood [START_REF] Bauke | Parameter estimation for power-law distributions by maximum likelihood methods[END_REF][START_REF] Gao | On the asymptotic normality of estimating the affine preferential attachment network models with random initial degrees[END_REF][START_REF] Nettasinghe | Maximum likelihood estimation of powerlaw degree distributions using friendship paradox based sampling[END_REF], based on either discrete or continuous data (see details in [START_REF] Clauset | Power-law distributions in empirical data[END_REF]). In particular, the widely used Hill estimator introduced by [START_REF] Hill | A simple general approach to inference about the tail of a distribution[END_REF] is equivalent to the maximum likelihood estimator (MLE) when considering the data as continuous. Such methods have been proved to be consistent [START_REF] Gao | On the asymptotic normality of estimating the affine preferential attachment network models with random initial degrees[END_REF][START_REF] Wang | Consistency of Hill estimators in a linear preferential attachment model[END_REF] and asymptotically normal [START_REF] Gao | On the asymptotic normality of estimating the affine preferential attachment network models with random initial degrees[END_REF].

Other methods exist, for example based on the Kolmogorov-Smirnov statistic that is used for comparing a sample with a reference probability distribution [START_REF] Klaus | Statistical analyses support power law distributions found in neuronal avalanches[END_REF], or based on mean degrees [START_REF] Ikeda | Estimation of power-law exponent of degree distribution using mean vertex degree[END_REF]. One can see for example [START_REF] Clauset | Power-law distributions in empirical data[END_REF] for some methods for the estimation of the exponent of power-law distributions.

Note that one could choose other distributions for the degree sequences, but the power-law is a reasonable choice, as a lot of real networks have been shown to exhibit such a distribution. Some example are citation networks, some social networks including the collaboration network, networks in cell biology [START_REF] Albert | Scale-free networks in cell biology[END_REF], the World Wide Web, etc. See [START_REF] Barabási | Emergence of scaling in random networks[END_REF] for more detailed examples.

However, note that recently the adequacy of the power-law to many real-world networks has been questioned [START_REF] Clauset | Power-law distributions in empirical data[END_REF][START_REF] Latapy | Rigorous measurement of the internet degree distribution[END_REF][START_REF] Broido | Scale-free networks are rare[END_REF].

Barabási-Albert model (Preferential Attachment)

As mentioned in the previous section, the Barabási-Albert model, based on a preferential attachment mechanism, is a generative network growth model, the graph growing at each step of the algorithm. It was introduced by [START_REF] Barabási | Emergence of scaling in random networks[END_REF] and motivated by the growth of the World Wide Web.

The generation of a graph is as follows. We start with an initial graph G 0 = (V 0 , E 0 ). Then, at each step, a new node of degree m ≥ 1 is added to the network. It is connected to m existing nodes with a probability that is proportional to the degrees of the existing nodes. This model illustrates the concept Rich get richer, i.e. a positive feedback phenomenon in which the more connected a node is, the more likely it is to receive new connections. This hence tends to increase the difference of degrees between the nodes, and leads to a few nodes (called hubs) being very highly connected compared to the others. This is consistent with what we observe in numerous real world networks, including citation networks, some social networks, or the World Wide Web as mentioned above. Moreover, both phenomena of growth and preferential attachment are widely observed in real networks. This is rather rational, as when a new person (or entity) enters the network, it is more likely to become acquainted with one of the most visible people rather than with people with few connections.

This model exhibits an important property, which is that as the number of steps (and then of nodes) increases to infinity, the graphs generated by the Barabási-Albert model have degree distributions that tend to a power-law, i.e. P(D = d) ∝ d -γ [START_REF] Barabási | Emergence of scaling in random networks[END_REF], as most large real-world networks have been shown to exhibit, as mentioned above. [START_REF] Barabási | Emergence of scaling in random networks[END_REF] also show that in their model, both growth (of the number of nodes) and preferential attachment are needed to observe this degree distribution.

In practice, we work with a finite number of time steps/nodes, and the choice of the parameters can have an influence on the obtained graph. For example, see Figure 1.3 for the influence of m (nonetheless, note that the visualisation of a graph can be misleading, as the same graph can be represented in many different ways).

Note that other preferential attachment models exist. For example [START_REF] Gao | Consistent estimation in general sublinear preferential attachment trees[END_REF] and [START_REF] Gao | On the asymptotic normality of estimating the affine preferential attachment network models with random initial degrees[END_REF] use a more general model than the Barabási-Albert model, in which the degree of the new nodes m depends on the time step t, and a new node is connected to existing nodes with a probability that is proportional to a function of the degrees of the existing nodes (i.e. proportional to f (d i ) with a certain function f instead of d i for each existing node i).

Exponential Random Graph Models (ERGM)

ERGMs, also called p * models, (see [START_REF] Strauss | Pseudolikelihood estimation for social networks[END_REF]; [START_REF] Wasserman | Logit models and logistic regressions for social networks: I. an introduction to Markov graphs andp[END_REF]; [START_REF] Hunter | Inference in curved exponential family models for networks[END_REF]; [START_REF] Snijders | New specifications for exponential random graph models[END_REF], and also [START_REF] Frank | Markov graphs[END_REF] who introduced Markov random graphs, a particular sub-class of exponential random graph models) are based on exponential families of distributions. For a survey of this model, one can refer to Robins et al. (2007a); [START_REF] Wasserman | An introduction to random graphs, dependence graphs, and p[END_REF]; [START_REF] Goldenberg | A survey of statistical network models[END_REF], or to van der Pol (2019) for a more recent reference. This model assumes that the probability of a graph (i.e. of its adjacency matrix X) can be explained by a statistic S(X) as follows

P θ (X) = 1 c(θ) exp θ ⊤ S(X) ,
where c(θ) is a normalising constant, that we generally cannot compute in practice.

ERGMs are flexible models in the sense that they can be based on different types of statistics, according to the type of pattern or behaviour we are interested in. For example S can be or can include density-related statistics (for example the number of edges), degree-based statistics, number of triangles or cycles, etc. These models are in particular widely used in social networks (Robins et al., 2007a,b;[START_REF] Lusher | Exponential random graph models for social networks: Theory, methods, and applications[END_REF]. Indeed, an important feature of ERGMs is that the edges are dependent, which is appropriate to model social networks, in which it is not reasonable to assume independence of the relations. Note that such a model can be defined for both directed and undirected graphs.

Note that an advantage of the ERGM is that it allows the inclusion of covariates (on the nodes), also called actor attributes [START_REF] Robins | Network models for social selection processes[END_REF], influencing the nodes connection behaviour. It is also possible to add covariates on pairs of nodes. An extended version of the ERGM can also be defined for weighted graphs [START_REF] Robins | Logit models and logistic regressions for social networks: III. valued relations[END_REF][START_REF] Desmarais | Statistical inference for valued-edge networks: The generalized exponential random graph model[END_REF][START_REF] Krivitsky | Exponential-family random graph models for valued networks[END_REF], and for multigraphs [START_REF] Pattison | Logit models and logistic regressions for social networks: II. multivariate relations[END_REF].

When interested in the estimation of the parameter for the ERGM, it can be done by approximating the maximum likelihood, but there is a number of issues with this method, namely degeneracy (or near degeneracy) issues [START_REF] Handcock | Statistical models for social networks: Inference and degeneracy[END_REF][START_REF] Handcock | Assessing degeneracy in statistical models of social networks[END_REF][START_REF] Hunter | Goodness of fit of social network models[END_REF][START_REF] Rinaldo | On the geometry of discrete exponential families with application to exponential random graph models[END_REF][START_REF] Schweinberger | Instability, sensitivity, and degeneracy of discrete exponential families[END_REF][START_REF] Chatterjee | Estimating and understanding exponential random graph models[END_REF]. [START_REF] Handcock | Assessing degeneracy in statistical models of social networks[END_REF] defines this issue as occurring when only a few graphs do not have a very low probability, these graphs often being the full graph and the empty graph. Then, such models are not interesting for modeling real networks, and in addition, degeneracy is often associated with poor properties of estimation methods based on the likelihood, such as Markov chain Monte Carlo (MCMC) procedures.

An approximation of the maximum likelihood is required, because it is not tractable in this model. Some methods have been introduced, such as the use of the pseudolikelihood [START_REF] Besag | Statistical analysis of non-lattice data[END_REF][START_REF] Strauss | Pseudolikelihood estimation for social networks[END_REF] where the joint distribution is replaced by the product of the conditional distributions, but this method has been shown to not behave well, depending on the network [START_REF] Wasserman | An introduction to random graphs, dependence graphs, and p[END_REF][START_REF] Robins | Recent developments in exponential random graph (p*) models for social networks[END_REF][START_REF] Van Duijn | A framework for the comparison of maximum pseudo-likelihood and maximum likelihood estimation of exponential family random graph models[END_REF].

Another type of methods for this purpose, perhaps more used, is the use of MCMC techniques [START_REF] Snijders | Markov chain Monte Carlo estimation of exponential random graph models[END_REF][START_REF] Hunter | Inference in curved exponential family models for networks[END_REF][START_REF] Handcock | Statistical models for social networks: Inference and degeneracy[END_REF] in order to approximate the maximum likelihood estimator, for example by estimating likelihood ratios, using a Metropolis-Hastings algorithm to generate a sample of networks simulated from the ERGM. As mentioned earlier, such methods can behave badly, converging to degenerate graphs7 or failing to converge. New faster sampling techniques have been introduced [START_REF] Stivala | Exponential random graph model parameter estimation for very large directed networks[END_REF], allowing to perform these MCMC procedures more efficiently and on larger networks. Other methods for large graphs include computing estimators on snowball samples [START_REF] Goodman | Snowball sampling[END_REF] from the network [START_REF] Pattison | Conditional estimation of exponential random graph models from snowball sampling designs[END_REF][START_REF] Stivala | Snowball sampling for estimating exponential random graph models for large networks[END_REF].

Some methods have been introduced to tackle the difficulties due to degeneracy, for example the use of curved ERGMs [START_REF] Hunter | Inference in curved exponential family models for networks[END_REF][START_REF] Hunter | Curved exponential family models for social networks[END_REF] which generalises the ERGM (see [START_REF] Efron | Defining the curvature of a statistical problem (with applications to second order efficiency)[END_REF][START_REF] Efron | The geometry of exponential families[END_REF]). In particular [START_REF] Snijders | New specifications for exponential random graph models[END_REF] introduced a particular specification of ERGMs for the analysis of social networks, with new statistics to represent structural properties such as transitivity and heterogeneity of degrees, and which solves some of the problems of degeneracy. [START_REF] Caimo | Bayesian inference for exponential random graph models[END_REF] propose a MCMC algorithm in a Bayesian framework and give empirical evidence that the method quickly converges. [START_REF] Schweinberger | Local dependence in random graph models: characterization, properties and statistical inference[END_REF], [START_REF] Schweinberger | Concentration and consistency results for canonical and curved exponential-family models of random graphs[END_REF] and [START_REF] Schweinberger | Consistent structure estimation of exponential-family random graph models with block structure[END_REF] propose ERGMs with local dependence, adding an additional structure to the network by assuming that the graph nodes can be partitioned into subgraphs, and that dependence exists within subgraphs but not between subgraphs. They obtained consistency results in that context. Some other theoretical results have been obtained, such as Mukherjee (2020) who obtained a sufficient criterion for non-degeneracy for ERGMs on sparse graphs.

Stochastic Block Model (SBM)

Definition

We will focus on the Stochastic Block Model (SBM) [START_REF] Holland | Stochastic blockmodels: First steps[END_REF][START_REF] Frank | Cluster inference by using transitivity indices in empirical graphs[END_REF][START_REF] Nowicki | Estimation and prediction for stochastic blockstructures[END_REF], a widely used latent variables model. In this model, the vertices are partitioned into Q groups (or classes), the group memberships being represented by latent variables Z = (Z 1 , . . . , Z n ), and the connection between two nodes is drawn from a distribution depending on the classes of these two nodes. The latent variables are independent and identically distributed (i.i.d.) in {1, . . . , Q}, following the distribution α = (α 1 , . . . , α Q ) with α q ∈ (0, 1) for every q ∈ {1, . . . , Q}. We distinguish two types of SBM, the binary SBM and the weighted SBM, which has been introduced later [START_REF] Jiang | Community detection on weighted networks: A variational Bayesian method[END_REF][START_REF] Mariadassou | Uncovering latent structure in valued graphs: A variational approach[END_REF]. In the binary SBM (which will be our interest), conditional on the latent groups {Z i } 1≤i≤n , the edges {X ij } 1≤i,j≤n are independent Bernoulli random variables

X ij | Z i = q, Z j = l ∼ B(π ql ),
where π = (π ql ) 1≤q,l≤Q ∈ [0, 1] Q 2 is the connectivity parameter. Note that the matrix π is symmetric if we consider undirected graphs. In the weighted case, the weight associated with an edge follows a given parametric probability distribution, for example a Poisson or Gaussian distribution. We will denote by θ = (α, π) the parameter of the SBM.

The SBM allows to directly model the heterogeneity of the connection behaviours of the nodes. It is flexible in the sense that it can model any type of network that is characterised by the connection behaviours of groups of nodes, encompassing very different structures of networks. In particular, it can model networks with a community structure, i.e. composed of groups of nodes that are highly connected between them and less connected to nodes from other groups, as on the left of Figure 1.4. This kind of network exhibiting a community structure can be modeled by the affiliation model that is a particular case of the SBM, and that is described in the next paragraph. Other types of graphs that can be modeled by the SBM are graphs with hubs and peripheral nodes as in the middle of Figure 1.4 or graphs with groups of nodes interacting mainly with nodes from other groups (and in particular bipartite graphs) as on the right of Figure 1.4. It can model more generally any network structure with groups of nodes sharing a similar connection behaviour towards other nodes (in the same class or in any other class). We will talk in Section 1.4.4 about the use of SBM for clustering purposes, and we will talk in the same section and in the introduction of Chapter 2 about the estimation of the Particular case: the affiliation model A particular case of the SBM is the affiliation model, in which the connection parameter {π ql } 1≤q,l≤Q only takes two different values, that are the between-groups and the within-group connection probabilities. We then have, for any q, l ∈ {1, . . . , Q},

π ql =    π in if q = l π out if q ̸ = l.
In particular, assuming that π in is large and π out is small, the graphs generated by the affiliation model exhibit a community structure, such as the graph on the left in Figure 1.4. Inversely, assuming that we have π in small and larger π out , we obtain graphs such as the one on the right in Figure 1.4.

Weighted SBM Let us give more details about the weighted version of the SBM. It consists in replacing the Bernoulli distribution for the distribution of X ij | Z i , Z j by any parametric distribution with a parameter depending on Z i , Z j . To control the density of the graph 8 , we use a zero-inflated distribution, i.e. the values taken by the edges are defined as a mixture of a Dirac mass at zero and the considered probability distribution. Explicitly, defining the model parameter θ = ({α q } 1≤q≤Q , {η ql } 1≤q,l≤Q , {π ql } 1≤q,l≤Q ), we Introduction write

X ij | Z i = q, Z j = l ∼ F (•; η ql , π ql ) with F (x; η ql , π ql ) = (1 -π ql )δ 0 (x) + π ql G(x; η ql ),
where G(•; η ql ) is the conditional distribution of X ij given Z i = q and Z j = l and given the presence of the edge, and δ 0 denotes the Dirac distribution. We assume that G has no point mass at zero for identifiability purposes. If the considered distribution initially has some mass at zero, we then use its zero-truncated version. The distribution G can be for example a zero-truncated Poisson distribution for discrete weights, or a Gaussian or Laplace distribution for continuous weights. Note that the π ql are density parameters of the graphs. For parsimony purposes, we can assume that these parameters are constant, i.e. π ql := π for every q, l, meaning that the density is homogeneous between groups.

Identifiability

Identifiability results have been obtained for the SBM [START_REF] Allman | Identifiability of parameters in latent structure models with many observed variables[END_REF][START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF][START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF]. We will give more details about the work of [START_REF] Allman | Identifiability of parameters in latent structure models with many observed variables[END_REF] and [START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF], as one of our result will be based on it. [START_REF] Allman | Identifiability of parameters in latent structure models with many observed variables[END_REF] and later [START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF] proved some identifiability results for latent structure models, including the SBM, in the context of undirected graphs. The proofs of their results are based on an application of a theorem by [START_REF] Kruskal | More factors than subjects, tests and treatments: An indeterminacy theorem for canonical decomposition and individual differences scaling[END_REF][START_REF] Kruskal | Three-way arrays: rank and uniqueness of trilinear decompositions, with application to arithmetic complexity and statistics[END_REF] or see for example [START_REF] Rhodes | A concise proof of Kruskal's theorem on tensor decomposition[END_REF] or Theorem 16 in [START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF]) that states the identifiability (up to label swapping) of the parameters of a latent variable model with three observed discrete random variables, under some conditions based on the notion of Kruskal rank of matrices, and assuming in particular that the three observed random variables are independent given the latent one. This result is applied with an appropriate decomposition into three pairwise disjoint subsets of the complete set of edges, these three variables then being conditionally independent (and with each matrix having full row rank, implying full Kruskal rank). In [START_REF] Allman | Identifiability of parameters in latent structure models with many observed variables[END_REF], they prove that the binary SBM with two groups has identifiable parameters as long as the three connection parameters are distinct, and for a number of nodes n ≥ 16. In [START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF], they prove the following main result for identifiability of the binary SBM. This result states the generic identifiability only, meaning that the nonidentifiable parameters form a set of Lebesgue measure zero. The form of the subspace of non identifiable parameters is not specified in this result, and it is important to keep in mind that when we impose a constraint on the parameter reducing the parameter space to a subspace of smaller dimension, parameter identifiability is no longer guaranteed.

Theorem 1.3.1 [START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF]). The group proportion parameters α q and the connection parameters π ql for q, l ∈ 1, Q are generically identifiable up to label permutation from the distribution of X when Q ≥ 3 and n ≥ m 2 , with

   m ≥ Q -1 + Q+2 2 2 if Q is even, m ≥ Q -1 + (Q+1)(Q+3) 4 if Q is odd.
Moreover, the result remains valid when the group proportions α q are fixed.

As we said before, the constraints on the parameter leading to non identifiability are not specified in this result. However, the generic part of the proof of this result concerns only the connection parameters π ql . In particular, in this proof, these parameters need to be distinct, so this result does not apply to the affiliation model. Some results have been derived in [START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF] for this particular model. The proofs of these results are based on arguments on moments of the distribution, as these moments may be obtained explicitly in terms of model parameters for a small number of nodes. They obtain an identifiability result for Q = 2.

Corollary 1.3.1 [START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF]). The group proportion parameters (α 1 , α 2 = 1-α 1 ), up to label swapping, and the parameters (π in , π out ) of the random graph affiliation mixture model with Q = 2 groups and binary edge state variables are strictly identifiable from the distribution of X if n ≥ 3 and provided π in ̸ = π out .

Other partial results are obtained in this case. When the group proportions are fixed and in (0, 1), they prove that π in and π out are identifiable from the distribution of X if n ≥ 3. They also state that it is necessary that n ≥ Q to identify the group proportion parameters and π in and π out . Finally, they state that if the group proportions are uniform (α q = 1/Q for every q), the parameters π in , π out and the number of groups Note that most of the classical parametric distributions have been shown to satisfy the assumptions on G. In particular, the truncated Poisson and Gaussian distributions satisfy these assumptions.

The authors also give results for the weighted affiliation model and for a weighted SBM where the edges can take a finite number of values. [START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF] obtained the identifiability of the SBM, in the case of directed or undirected graphs, as long as n ≥ 2Q and the coordinates of πα are distinct. They show that this applies to the affiliation model as long as the group proportions are different. They also obtain an identifiability with weaker assumptions for n = 4 and Q = 2.

Extensions of the SBM

Some extensions of the SBM have been introduced. We will briefly talk about three well-know extensions, that are the degree-corrected SBM, the mixed membership SBM and the inclusion of covariates in the SBM.

Degree-corrected SBM (DCSBM)

The degree-corrected SBM (DCSBM) [START_REF] Karrer | Stochastic blockmodels and community structure in networks[END_REF]) is a more flexible extension of the SBM, allowing nodes in the same groups to have different degree distribution, hence better fitting real world networks which often exhibit degree heterogeneity within a same group. The principle of the DCSBM is to introduce additional parameters for degree-correction ζ = (ζ 1 , . . . , ζ n ) that are integrated in the distribution of the adjacency matrix X given the latent variables. In [START_REF] Karrer | Stochastic blockmodels and community structure in networks[END_REF], in a weighted graph context (with edges taking integer values), the distribution of X given the latent variables is given by a Poisson distribution

X ij | Z i , Z j ∼ P(ζ i ζ j π Z i Z j ).
A binary version of the degree-corrected SBM is also used (see for example [START_REF] Gao | Community detection in degree-corrected block models[END_REF], where the distribution of the adjacency matrix X given the latent variables is given by a Bernoulli distribution

X ij | Z i , Z j ∼ B(ζ i ζ j π Z i Z j ).

Mixed membership SBM (MMSBM)

The mixed membership SBM (MMSBM) [START_REF] Airoldi | Mixed membership stochastic blockmodels[END_REF] allows partial membership to different groups, in the sense that each node have a membership distribution over the classes instead of a membership to a single class. It is a model of interest when performing clustering of nodes with overlapping groups, i.e. in the context where a single node can play more than one role in the network, depending on the node it is interacting (or not) with. [START_REF] Airoldi | Mixed membership stochastic blockmodels[END_REF] define the MMSBM as follows. Each node i has a mixed membership vector m i = (m i,1 , . . . , m i,Q ) following a Dirichlet distribution with parameter α = (α 1 , . . . , α Q ), where α q > 0 for all q ∈ 1, Q . Then for each pair of nodes i ̸ = j, the roles Z i→j and Z j→i of these two nodes corresponding to that particular interaction are drawn from multinomial distributions with parameter respectively m i and m j . The value X ij of the edge from i to j then follows a Bernoulli distribution

X ij | Z i→j , Z j→i ∼ B(π Z i→j Z j→i ).
Note that other extensions of the SBM have been introduced for the analysis of graphs with overlapping classes, such as the overlapping SBM of [START_REF] Latouche | Overlapping stochastic block models with application to the French political blogosphere[END_REF], in which each node may belong to any number of groups at the same time.

SBM with covariates

Another possibility to extend the SBM is to introduce covariates [START_REF] Tallberg | A bayesian approach to modeling stochastic blockstructures with covariates[END_REF][START_REF] Mariadassou | Uncovering latent structure in valued graphs: A variational approach[END_REF][START_REF] Choi | Stochastic blockmodels with a growing number of classes[END_REF], allowing to take into account the information we may have on the nodes or pair of nodes. The considered covariates we introduce in the SBM can then be node-specific covariates (for example age, gender, income) or edge-specific covariates (for example a distance between the two considered nodes). For example, in [START_REF] Tallberg | A bayesian approach to modeling stochastic blockstructures with covariates[END_REF], the distribution of the group membership of a node depends on its covariate. In [START_REF] Mariadassou | Uncovering latent structure in valued graphs: A variational approach[END_REF], the covariates are taken into account in the distribution of the edges X ij via a regression model, in the context of weighted graphs.

Latent Block Model (LBM)

The Latent Block Model (LBM) [START_REF] Govaert | Analyse des données[END_REF], see also [START_REF] Govaert | Co-clustering: models, algorithms and applications[END_REF] or [START_REF] Brault | Co-clustering through latent block model: A review[END_REF]) is a co-clustering model, i.e. we consider an array data structure with n observations (n rows) of m variables (m columns) and it is assumed that there exists a partition of the rows and of the columns.

We assume that Z = (Z i ) 1≤i≤n and W = (W j ) 1≤j≤m are two independent latent variables defining a partition on the rows and columns respectively. The Z i are i.i.d. random variables, following a multinomial distribution, and so do the W j . We observe X = (X ij ) 1≤i≤n,1≤j≤m , these variables being independent conditional on Z and W and such that each X ij conditional on Z, W follows the same parametric distribution, with a parameter π Z i W j depending on the column and row groups. Note that this formulation is quite similar to that of the SBM. The difference lies in the fact that there are two distinct partitions for the rows and columns in the LBM, whereas it is the same for the SBM. In fact, [START_REF] Mariadassou | Convergence of the groups posterior distribution in latent or stochastic block models[END_REF] proposed a unified framework for studying both these models.

In a graph context, it can be used to model bipartite graphs (where the nodes are of one of two types, and they can be connected only to nodes of the other type, as in Figure 1.2). We thus assume that we have a clustering of nodes for each of the two types.

Latent Position Model (LPM)

.

The latent position model (LPM) was introduced by [START_REF] Hoff | Latent space approaches to social network analysis[END_REF] in the context of social networks. In this model, the latent variables on the nodes are i.i.d. random variables taking their values in a social space in R d (and not in 1, Q ) and the probability of connection between two nodes is determined by their distance in the latent space. Precisely, the edges are independent given the positions in the latent space, and the probability of an edge X ij to be present is based on the logistic regression

logit(P(X ij = 1|Z i , Z j , y ij )) := log P(X ij = 1 | Z i , Z j , y ij ) 1 -P(X ij = 1 | Z i , Z j , y ij ) = α + t βy ij -∥Z i -Z j ∥ 2
where y ij is a vector of covariates on the pair of nodes (i, j) (if we have covariates at our disposal), (α, β) is the model parameter and ∥ • ∥ 2 is the Euclidean norm 9 . Later, [START_REF] Handcock | Model-based clustering for social networks[END_REF] introduced the latent position cluster model, extending the model of [START_REF] Hoff | Latent space approaches to social network analysis[END_REF] for clustering purposes, in which the nodes positions in the latent social space come from a mixture of multivariate Gaussian distributions, the components of the mixture corresponding to the clusters.

Graphon and W -graph model

Definition

The W -graph model is a general binary graph model satisfying the exchangeability property. The exchangeability property is the fact that any permutation on the nodes labels (i.e. of the nodes and columns of the adjacency matrix) leads to the same distribution, i.e. (X σ(i)σ(j) ) 1≤i,j≤n ∼ (X ij ) 1≤i,j≤n with σ any permutation on 1, n . This means that the nodes labels have no relevance. This model is based on the definition of graphon. Formally introduced by [START_REF] Lovász | Limits of dense graph sequences[END_REF] in the context of graph limits, a graphon is defined as a symmetric measurable function W : [0, 1] 2 → [0, 1]. It defines a graph as follows:

• First, assign independently a value u i from the random variable U i ∼ U([0, 1]) to each node i ∈ {1, . . . , n}.

• Then the edges are independent given (u 1 , . . . , , u n ), each edge X ij following a Bernoulli distribution of parameter W (u i , u j ).

Such a graph is called a W -random graph. If W is a constant function equal to p, the associated W -random graph model is an Erdős-Rényi graph model of parameter p. Note that a SBM is a particular case of a W -graph, where the graphon function is block-wise constant with rectangular blocks of size α q × α l and value π ql , as represented in Figure 1.5.

In that sense, the graphon is in fact a continuous extension of the SBM. This model has been introduced in [START_REF] Lovász | Limits of dense graph sequences[END_REF] (see also [START_REF] Lovász | Large networks and graph limits[END_REF]; [START_REF] Borgs | Convergent sequences of dense graphs I: Subgraph frequencies, metric properties and testing[END_REF]) in the study of large graphs, as the limit object of a sequence of dense graphs (see [START_REF] Borgs | An l p theory of sparse graph convergence I: Limits, sparse random graph models, and power law distributions[END_REF] for sparse graphs). This is related to the Aldous-Hoover theorem [START_REF] Aldous | Representations for partially exchangeable arrays of random variables[END_REF]; [START_REF] Hoover | Relations on probability spaces and arrays of random variables[END_REF], see also [START_REF] Kallenberg | Probabilistic symmetries and invariance principles[END_REF]), that is a two-dimensional version of De Finetti's theorem (see for example [START_REF] Diaconis | Graph limits and exchangeable random graphs[END_REF]). It states (using a formulation similar to that in [START_REF] Orbanz | Bayesian models of graphs, arrays and other exchangeable random structures[END_REF]) that an array X = (X ij ) 1≤i,j≤n (with X ij in some space A) is exchangeable if and only if there is a random function F : [0, 1] 3 → A such that X ij is equal in distribution to F (U i , U j , U ij ), where (U i ) 1≤i≤n and (U ij ) 1≤i<j≤n are i.i.d. random variables following a uniform distribution on [0, 1], and U ji = U ij . In our context of binary undirected graphs, i.e. with A = {0, 1}, this can be expressed in terms of the graphon function, with X ij following a B(W (U i , U j )) (see [START_REF] Orbanz | Bayesian models of graphs, arrays and other exchangeable random structures[END_REF] for more details). One can refer to [START_REF] Diaconis | Graph limits and exchangeable random graphs[END_REF] for more details on the connection between the work on exchangeable arrays and the work on graph limits. Note that this theorem has been used by [START_REF] Hoff | Modeling homophily and stochastic equivalence in symmetric relational data[END_REF], [START_REF] Bickel | A nonparametric view of network models and Newman-Girvan and other modularities[END_REF] and [START_REF] Bickel | The method of moments and degree distributions for network models[END_REF] in the context of graph modeling.

An issue with the graphon is that it is not identifiable. Indeed, if ψ : [0, 1] → [0, 1] is a measure preserving function, then the graphon W (ψ(•), ψ(•)) leads to the same probability distribution on the graph as W (•, •). To tackle this issue, [START_REF] Bickel | A nonparametric view of network models and Newman-Girvan and other modularities[END_REF] propose to impose monotonicity on the function g defined by g(u i ) = W (u i , u i )du j (see also [START_REF] Yang | Nonparametric estimation and testing of exchangeable graph models[END_REF]; [START_REF] Chan | A consistent histogram estimator for exchangeable graph models[END_REF]).

As far as estimation (of the underlying graphon function of an observed graph) is concerned, most of the techniques are based on the approximation of the W -graph by a

π 31 π 32 π 33 π 21 π 22 π 23 π 11 π 12 π 13 α 3 α 2 α 1 α 1 α 2 α 3
Fig. 1.5 Link between the graphon and SBM. Note that this is symmetric.

SBM [START_REF] Airoldi | Stochastic blockmodel approximation of a graphon: Theory and consistent estimation[END_REF][START_REF] Gao | Rate-optimal graphon estimation[END_REF][START_REF] Latouche | Variational Bayes model averaging for graphon functions and motif frequencies inference in w-graph models[END_REF][START_REF] Klopp | Oracle inequalities for network models and sparse graphon estimation[END_REF], by computing group averages after finding groups of nodes, thus obtaining a block-wise constant graphon, and usually performing a smoothing step afterwards. For example, to obtain the grouping of nodes, Latouche and Robin (2016) use a Variational Bayes EM algorithm, and obtain an estimator of the graphon function by averaging stochastic block models with increasing number of blocks. Some methods [START_REF] Chatterjee | Matrix estimation by universal singular value thresholding[END_REF][START_REF] Yang | Nonparametric estimation and testing of exchangeable graph models[END_REF] are based on a spectral method, the universal singular value thresholding (USVT) algorithm [START_REF] Chatterjee | Matrix estimation by universal singular value thresholding[END_REF]. [START_REF] Chan | A consistent histogram estimator for exchangeable graph models[END_REF] proposed an algorithm relying on the ordering of the nodes based on the observed degrees and on the smoothing of the histogram obtained from the sorted graph. Other methods have been introduced, see for example [START_REF] Zhang | Estimating network edge probabilities by neighbourhood smoothing[END_REF] or [START_REF] Lloyd | Random function priors for exchangeable arrays with applications to graphs and relational data[END_REF].

Node clustering techniques

In this section, we will review some techniques used to cluster vertices in a graph into groups of nodes with similar connection behaviour, and give some theoretical or empirical results for these techniques. Node clustering in networks has been intensively studied and we will not be able to be exhaustive, but will present some of the widely used methods. In particular, a lot of work has been done on community detection, i.e. when considering groups of vertices that have a high within-group connectivity and a low between-group connectivity, as on the left of Figure 1.4. Some methods can identify a more general structure with groups of nodes sharing a similar connection behaviour towards other nodes (in the same class or in any other class). For example, as in the middle of Figure 1.4, where we observe two classes, a group of two hubs and a class of peripheral nodes, or as in the right of Figure 1.4 where we observe groups of nodes interacting mainly with nodes from other groups. Note that the term community is often used to talk about these more general classes, but we will stick to the strict definition of a community in this work. We will then refer to community detection when doing clustering for community structures and simply to clustering for the clustering of more general structures.

Spectral clustering

A commonly used technique in community detection is the spectral clustering, i.e. algorithms that cluster points using eigenvectors of matrices derived from the data. See Von [START_REF] Luxburg | A tutorial on spectral clustering[END_REF] for more details on the spectral clustering.

The matrix we rely on in spectral clustering is a Laplacian matrix (or sometimes directly the adjacency matrix) [START_REF] Chung | Spectral graph theory[END_REF]. There are different definitions of such matrices, hence leading to different versions of the spectral clustering.

The use of graph Laplacians instead of the adjacency matrix is justified by its good properties that we will state right after, and enables a better detection of the clusters. In particular, using the normalised versions of the Laplacian allows to regularise the degree distribution and gives better results when the degree distribution is heterogeneous [START_REF] Luxburg | A tutorial on spectral clustering[END_REF].

To describe this technique, let us first introduce a definition of the graph Laplacian matrix. We need to define the degree matrix D of a graph, that is the diagonal matrix with the weighted degrees d 1 , . . . , d n on its diagonal, i.e.

d i = n j=1 X ij = n j=1 X ji 10 .
We then define the (unnormalised) Laplacian matrix for a graph of adjacency matrix X and degree matrix D as

L = D -X. (1.4.1)
This matrix is symmetric, and satisfies for any

u ∈ R n u ⊤ Lu = u ⊤ Du -u ⊤ Xu = 1 2 1≤i,j≤n X ij (u i -u j ) 2 .
It is then positive semi-definite, and its eigenvalues, denoted by λ 1 ≤ λ 2 ≤ . . . ≤ λ n , are nonnegative. Moreover, since d i = n j=1 X ij for every i ∈ 1, n , we have that 0 is an eigenvalue with associated eigenvector (1, . . . , 1). An important result about the Laplacian graph is that the multiplicity of this eigenvalue is equal to the number of connected components in the graph and the corresponding eigenspace is spanned by the indicator vectors of the components.

Note that in the case where we have k connected components in the graphs, the Laplacian matrix (as the adjacency matrix) has a block diagonal form (up to a reordering of the nodes). The principle of spectral clustering is that when we want to find communities, that we can see as "almost" connected components, we want to identify the "almost" block diagonal structure of the graph.

To partition the graph into Q clusters, the algorithm then consists of selecting the Q eigenvectors corresponding to the smallest nonzero eigenvalues11 of the Laplacian matrix and performing a k-means clustering with Q groups on the lines of the n × Q matrix formed by these eigenvectors (see Algorithm 3). [START_REF] Luxburg | A tutorial on spectral clustering[END_REF] that for regular graphs where most vertices have approximately the same degree, the different Laplacians are similar, and using any of them lead to similar clustering results, but that it is not the case if the degrees in the graph are very heterogeneous. Von [START_REF] Luxburg | A tutorial on spectral clustering[END_REF] recommends using normalised rather than unnormalised spectral clustering, and in the normalised case to use the eigenvectors of L rw rather than those of L sym .

L sym = D -1/2 LD -1/2 = I -D -1/2 XD -1/2 or L rw = D -1 L = I -D -1 X. It is mentioned in Von
This technique is mainly used for community detection, but [START_REF] Rohe | Spectral clustering and the high-dimensional stochastic blockmodel[END_REF] introduced the absolute spectral clustering, based on a different definition of the Laplacian matrix that can have negative eigenvalues, and which then uses the absolute values of the eigenvalues, selecting the largest (in absolute value) positive and negative eigenvalues. This allows to recover structures more complex than communities, for example groups that are more likely to interact with each other than with themselves, or a mix of these two.

Modularity

An approach in community detection is the optimisation of a measure known as modularity [START_REF] Newman | Finding and evaluating community structure in networks[END_REF]. This measure is proportional to the number of edges within groups minus the expected number in an equivalent network with random edges. It was first used in [START_REF] Newman | Finding and evaluating community structure in networks[END_REF] to evaluate the division obtained by a clustering algorithm, i.e. check that the considered clustering divides the nodes into communities by checking that the modularity is high enough. Considering a partition of the network in Q communities, the modularity is defined in [START_REF] Newman | Finding and evaluating community structure in networks[END_REF] as

Q = 1≤q≤Q (e qq -a 2 q ),
where E = (e qq ′ ) 1≤q,q ′ ≤Q is the matrix of fractions of edges in the network that link vertices in community q to vertices in community q ′ , and a q = Q q ′ =1 e qq ′ is the sum of the row (or column) q of E, representing the fraction of edges that connect to vertices in community q. Large values of the modularity are then supposed to indicate that the network has a community structure. [START_REF] Newman | Fast algorithm for detecting community structure in networks[END_REF] then proposed to optimise the modularity to find communities. Unfortunately, it is too costly to optimise directly this quantity by computing it for every possible division of the network (an exhaustive search of all possible divisions would take at least an amount of time exponential in the number of nodes). So in order to obtain a result in reasonable time, one must use some approximate optimisation strategy. For example, [START_REF] Newman | Fast algorithm for detecting community structure in networks[END_REF] proposed a greedy algorithm running in O((m + n)n) (m being the number of edges) that starts with a state in which each vertex form a community and repeatedly chooses communities to join together in pairs leading to the greatest increase (or smallest decrease) in Q. They then obtain a dendrogram and can select the best cut by looking for the maximal value of Q. [START_REF] Clauset | Finding community structure in very large networks[END_REF] improved the running time by making use of suitable data structures to O(n log 2 n) for a sparse graph. A rather similar approach is the Louvain algorithm [START_REF] Blondel | Fast unfolding of communities in large networks[END_REF], which starts by assigning a different community to each node of the network, and repeats the following two steps. The first step is the repetition of a node reassignment to another community (among the communities of the neighbours of this node), according to the greatest increase in the modularity, until there is no reassignment increasing the modularity left. The second step consists in building a new network whose nodes are the communities from the first step, by summing the weights of the nodes between every two communities. The algorithm stops when there are no more changes. They obtain good results in terms of modularity value in shorter time. [START_REF] Traag | Faster unfolding of communities: Speeding up the Louvain algorithm[END_REF] proposed a faster version of the Louvain algorithm, in which in the first step of the algorithm, each node is moved to a random neighbour community, instead of the best neighbour community.

Simulated annealing can also be used (see Guimera and Amaral (2005b,a); [START_REF] Medus | Detection of community structures in networks via global optimization[END_REF] among others) and gives good results, the main disadvantage of this approach being that it is slow. The optimisation of the modularity can also be based on the genetic algorithm (for example [START_REF] Li | A genetic algorithm with local search strategy for improved detection of community structure[END_REF]) that is a heuristic inspired by the process of natural selection. [START_REF] Newman | Modularity and community structure in networks[END_REF] gives a reformulation of the modularity in terms of eigenvectors of a characteristic matrix for the network (the modularity matrix), leading to a spectral algorithm for community detection to divide the networks into two communities, and then repeat the algorithm in the case of more than two communities. A lot of other techniques have been introduced but we will not describe them all (for example see [START_REF] Duch | Community detection in complex networks using extremal optimization[END_REF], [START_REF] Wakita | Finding community structure in mega-scale social networks[END_REF], [START_REF] He | A fast simulated annealing strategy for community detection in complex networks[END_REF]). For more details see [START_REF] Danon | Comparing community structure identification[END_REF] who performed a test comparing the performance of a large number of different community detection algorithms. [START_REF] Bickel | A nonparametric view of network models and Newman-Girvan and other modularities[END_REF] defined a new modularity called the likelihood modularity and showed that modularities allow to recover the groups with probability tending to one, under some conditions on these modularities.

Even though this method has been widely used, it suffers from several limitations. It admits a resolution limit, i.e. the method fails to recover small communities in large networks [START_REF] Fortunato | Resolution limit in community detection[END_REF][START_REF] Good | Performance of modularity maximization in practical contexts[END_REF], a degeneracy problem, i.e. there are at least an exponential (in n) number of distinct partitions whose modularity values are very close to the global maximum [START_REF] Good | Performance of modularity maximization in practical contexts[END_REF]. See for example [START_REF] Lancichinetti | Limits of modularity maximization in community detection[END_REF] for some details about the limits of the method of modularity maximisation.

Research is still done to tackle this problem, see [START_REF] Chakraborty | Metrics for community analysis: A survey[END_REF] for a review, or more recent articles [START_REF] Chen | Network community detection using modularity density measures[END_REF]; [START_REF] Long | Edge intensity-based community measurement in complex networks[END_REF]; [START_REF] Haq | Community structure detection from networks with weighted modularity[END_REF].

Other community detection methods

Another way to identify communities in a graph is to run dynamical processes on the graph, usually random walks. That method is based on the idea that if there are a lot of connections inside each community and only a few edges connect different communities together, a random walk is going be trapped in each community for some time before finding a way out and moving to another community. For example, [START_REF] Pons | Computing communities in large networks using random walks[END_REF] obtain a hierarchical community structure by computing a measure of similarities between nodes that is based on random walks on the graph (and that can be computed efficiently).

More algorithms for community detection have been introduced (see for example [START_REF] Nascimento | Spectral methods for graph clusteringa survey[END_REF]; [START_REF] Yang | A comparative analysis of community detection algorithms on artificial networks[END_REF]; [START_REF] Hajek | Achieving exact cluster recovery threshold via semidefinite programming: Extensions[END_REF]).

Note that there also has been a lot of research on overlapping community detection, i.e. when one assumes that the groups may not form a partition of the nodes, the nodes being allowed to belong to more than one community (see for example [START_REF] Xie | Overlapping community detection in networks: The state-of-the-art and comparative study[END_REF]; [START_REF] Devi | An analysis of overlapping community detection algorithms in social networks[END_REF]).

One can refer to [START_REF] Fortunato | Community detection in networks: A user guide[END_REF] for a review of community detection in networks.

Model-based clustering 1.4.4.1 Maximum likelihood estimation in the SBM with a Variational EM algorithm

In the SBM, we can be interested in estimating the parameters of the model in order to describe our network. We can obtain them by using a modified version of the Expectation-Maximisation (EM) algorithm based on a variational approximation of the distribution of the latent variables given the observations. If we also want to obtain a clustering, we can then obtain the latent groups by using a maximum a posteriori estimation.

In this model, we cannot compute the Maximum Likelihood Estimator (MLE) except for very small values of n, because it involves a summation over all the Q n possible latent configurations. Indeed, the log-likelihood is

ℓ(θ) := log P θ (X) = log   z∈ 1,Q n P θ (X, Z = z)   = log   z∈ 1,Q n e log P θ (X,Z=z)   where log P θ (X, Z = z) = log P θ (X | Z = z) + log P θ (Z = z) = 1≤q,l≤Q 1≤i<j≤n Z iq Z jl [X ij log π ql + (1 -X ij ) log(1 -π ql )] + Q q=1 n i=1 Z iq log α q ,
(1.4.2)

defining Z iq = 1 Z i =q for every i and q. We neither can use the EM algorithm (often used in latent variables models) to approximate it because it involves the computation of the conditional distribution of the latent variables given the observations which is not tractable. A common solution is to use the Variational Expectation-Maximisation (VEM) algorithm that optimises a lower bound of the log-likelihood (see for example [START_REF] Daudin | A mixture model for random graphs[END_REF]).

EM algorithm Let us first describe briefly the EM algorithm in a general case. This is an iterative algorithm introduced by [START_REF] Dempster | Maximum likelihood from incomplete data via the EM algorithm[END_REF], used to approximate maximum likelihood estimates of parameters in statistical models, where the model depends on unobserved latent variables. Assume that we observe the variable X = (X 1 , . . . , X n ), that Z = (Z 1 , . . . , Z n ) is a set of latent (i.e. unobserved) variables taking their values in a finite set and that θ is a vector of unknown parameters. We want to maximise the log-likelihood

ℓ(θ) = log z P θ (X, Z = z) = log P θ (X, Z) -log P θ (Z | X). (1.4.3)
This quantity is often intractable due to the sum on all the possible configurations z.

We start the algorithm with some initial value of the parameter θ (0) . Each iteration t of the EM algorithm is composed of two consecutive steps (E step and M step) and the algorithm stops when the relative difference between the estimates at two consecutive steps is small enough, or when a maximum number of iterations is reached.

E step:

The E (Expectation) step consists of computing the quantity

Q(θ|θ (t-1) ) =E θ (t-1) [log P θ (Z, X) | X] (1.4.4) =E θ (t-1) [log P θ (X | Z) | X] + E θ (t-1) [log P θ (Z) | X] .
M step: the M (Maximisation) step consists of maximising the quantity Q(θ|θ (t-1) ) with respect to θ to obtain θ (t) the estimate at step t,

θ (t) = arg max θ Q(θ|θ (t-1) ).
It is proven that the log-likelihood increases at each iteration [START_REF] Dempster | Maximum likelihood from incomplete data via the EM algorithm[END_REF]. However, it can converge to a local maximum, and it is then common to run the algorithm multiple times with different initial values in order to obtain the global maximum.

Variational EM (VEM) algorithm

In the SBM, the EM algorithm as described before is still intractable since we cannot compute the distribution of the latent variables given the observations because it is not factorised, so the computation of Q in (1.4.4) is out of reach. We will then rely on a variational approximation of this distribution. First, for any distribution Q on the latent variables Z, let us introduce two quantities, H(Q) the entropy of Q, and KL(Q

, P θ (• | X)) the Kullback-Leibler divergence from P θ (• | X) to Q H(Q) = -E Q [log Q(Z)] = - z Q(z) log Q(z) (1.4.5) KL(Q, P θ (• | X)) = E Q log Q(Z) P θ (Z | X) = z Q(z) log Q(z) P θ (z | X) .
We can then rewrite the log-likelihood in (1.4.3) as follows, by taking the expectation with respect to Q on both sides of the equation,

ℓ(θ) = E Q [log P θ (X, Z)] -E Q [log P θ (Z | X)] = E Q [log P θ (X, Z)] + H(Q) + KL(Q, P θ (• | X)).
The idea of this algorithm is to find the distribution Q in a set of factorised distributions which minimises the quantity KL(Q, P θ (t-1) (• | X)) 12 and then to maximise E Q [log P θ (t-1) (X, Z)] + H(Q) in θ, this step now being tractable thanks to factorised form of Q, approximating P θ (t-1) (• | X). We call the estimator obtained with this algorithm variational estimator. The quantity we optimise (in Q and θ) in the VEM algorithm is then (1.4.6) i.e. a lower bound of the log-likelihood, the Kullback-Leibler divergence being nonnegative.

J (Q, θ) = ℓ(θ) -KL(Q, P θ (•|X)) = E Q [log P θ (X, Z)] + H(Q),
In the case of the SBM, we consider the factorised distributions of the form

Q(Z) = n i=1 Q(Z i ) = n i=1 Q q=1 τ Z iq iq , with τ iq = Q(Z i = q) = E Q [Z iq ] (with Z iq = 1 Z i =q
) such that Q q=1 τ iq = 1 for any i. The algorithm is then tractable for the SBM, and simple expressions can be obtained as follows. The quantity to optimise (1.4.6) is written (see Equation (1.4.2) and the definition of the entropy (1.4.5))

J (Q, θ) =E Q [log P θ (X, Z)] + H(Q) = 1≤q,l≤Q 1≤i<j≤n τ iq τ jl [X ij log π ql + (1 -X ij ) log(1 -π ql )] + Q q=1 n i=1 τ iq log α q τ iq .
Maximising this quantity in τ iq gives that τ = (τ iq ) i,q satisfies a fixed-point equation

τiq ∝ α q n j=i+1 Q l=1 π X ij ql (1 -π ql ) 1-X ij τjl .
Then maximising it with respect to θ = (α, π) gives the closed-form expressions

αq = 1 n n i=1 τ iq πql = 1≤i<j≤n τ iq τ jl X ij 1≤i<j≤n τ iq τ jl .
If we want to obtain an estimation of the class memberships, we can then take the maximum a posteriori, i.e.

∀i ∈ 1, n , Ẑi = arg max

q∈ 1,Q τ iq .
We recall that this method allows to recover a node clustering in a more general context than community structure. We described it for the binary SBM, but it can also be used for weighted SBM [START_REF] Mariadassou | Uncovering latent structure in valued graphs: A variational approach[END_REF].

Note that [START_REF] Gunawardana | Convergence theorems for generalized alternating minimization procedures[END_REF] obtained that in the general case, the VEM algorithm does not converge to local maxima of the likelihood, except for degenerate models but gives good results in practice for the SBM [START_REF] Gazal | Accuracy of variational estimates for random graph mixture models[END_REF], and we will also give some theoretical results later for the variational estimators in the SBM.

Other methods

Many other model-based clustering methods have been introduced, and we present briefly some of them.

A Bayesian version of the variational EM [START_REF] Attias | Inferring parameters and structure of latent variable models by variational Bayes[END_REF][START_REF] Beal | The variational Bayesian EM algorithm for incomplete data: with application to scoring graphical model structures[END_REF]) can also be used for the estimation of parameters in the SBM [START_REF] Latouche | Bayesian methods for graph clustering[END_REF][START_REF] Latouche | Variational Bayesian inference and complexity control for stochastic block models[END_REF][START_REF] Aicher | Adapting the stochastic block model to edge-weighted networks[END_REF], based on an approximation of the joint probability distribution of the latent variables Z and the parameters (α, π) given the observations X by a factorised distribution.

Still in the SBM, [START_REF] Channarond | Classification and estimation in the stochastic blockmodel based on the empirical degrees[END_REF] proposed an algorithm to recover the clustering (and estimate the parameters), relying only on the degrees of the observed graph, called Largest Gaps algorithm. They obtained the consistency of this method.

Node clustering for bipartite graphs can be obtained based on the latent block model. In this model, the estimation can be based on variational EM, classification EM (inserting a classification step in which we find a partition) (see [START_REF] Govaert | Block clustering with Bernoulli mixture models: Comparison of different approaches[END_REF], Chapter 2 of [START_REF] Govaert | Co-clustering: models, algorithms and applications[END_REF]), stochastic EM with Gibbs sampling [START_REF] Keribin | Estimation d'un modèle à blocs latents par l'algorithme SEM[END_REF][START_REF] Keribin | Model selection for the binary latent block model[END_REF], or Bayesian inference [START_REF] Keribin | Estimation and selection for the latent block model on categorical data[END_REF][START_REF] Wyse | Block clustering with collapsed latent block models[END_REF]. [START_REF] Brault | Fast and consistent algorithm for the latent block model[END_REF] introduce an adaptation of the Largest Gaps algorithm of [START_REF] Channarond | Classification and estimation in the stochastic blockmodel based on the empirical degrees[END_REF] for the LBM. Concerning theoretical results, [START_REF] Mariadassou | Convergence of the groups posterior distribution in latent or stochastic block models[END_REF] give sufficient conditions for the groups posterior distribution to converge to a Dirac mass located at the actual groups configuration, for every parameter in a neighborhood of the true one. Consistency and asymptotic normality results have been obtained for the maximum likelihood estimators and variational estimators in the LBM in [START_REF] Brault | Consistency and Asymptotic Normality of Latent Block Model Estimators[END_REF].

Clustering can also be performed based on the ERGM. For example, Salter-Townshend and Murphy (2015); Wang et al. (2019) introduce mixture models of ERGMs. The model of [START_REF] Salter-Townshend | Role analysis in networks using mixtures of exponential random graph models[END_REF] is based on ego-networks, i.e. for each node, the network composed of the considered node and its neighbours, and all the edges between thoses nodes. The inference of these two models is based on the EM algorithm. Wang et al. (2019) use an online variant of the EM, alternatively assigning the nodes to groups and updating the parameter. [START_REF] Vu | Model-based clustering of large networks[END_REF] propose a model for large networks. They assume dyad independence given the groups, and estimation is based on a VEM combined with a minorisation-maximisation algorithm [START_REF] Hunter | A tutorial on MM algorithms[END_REF]. See also [START_REF] Agarwal | Model-based clustering of nonparametric weighted networks with application to water pollution analysis[END_REF] for clustering in weighted ERGMs.

Clustering can also be performed based on the latent position cluster model of [START_REF] Handcock | Model-based clustering for social networks[END_REF], who propose two methods for estimation of parameters in this model. The first method is a two-stage maximum likelihood estimation, the first step consisting of assigning positions in the latent space based on a maximisation of the likelihood, and the second step consisting in finding a maximum likelihood estimator of the mixture model parameter conditionally on the latent positions from the first step, thanks to an EM procedure. The second method is a Bayesian approach using MCMC sampling.

Choice of the number of classes

In the models we considered in the previous section, we assume that the number of classes (i.e. the number of values taken by the latent variable representing the group membership) is known. However, in practice, we usually do not have this information. We then introduce briefly some of the existing criteria for the choice of a number of classes in a general context, and more generally for model selection, and we will then present two criteria for the special case of the SBM. For more details about information criteria, see [START_REF] Konishi | Information criteria and statistical modeling[END_REF].

General case

The AIC (Akaike Information Criterion) Introduced by Hirotugu Akaike [START_REF] Akaike | Information theory and an extension of the maximum likelihood principle[END_REF][START_REF] Akaike | A new look at the statistical model identification[END_REF], the AIC relies on an asymptotic approximation of the Kullback-Leibler divergence of the estimated distribution from the unknown true distribution. It provides a tool for evaluating models in which the parameters are estimated by the maximum likelihood method. For this criterion, the Kullback-Leibler divergence is estimated using the empirical distribution of the observations, and the correction term for the bias of this estimator (induced by the fact that the same data is used both in the estimation of the model parameter and in the estimation of the expected log-likelihood in the Kullback-Leibler divergence) is approximated by the number of free parameters. For any considered model, the criterion is then defined as AIC = -2 log L( θ) + 2k, with k the number of free parameters in the considered model and L( θ) the maximum of the likelihood of the model. To choose the "best" model from a set of candidate models, we take the one minimising the AIC. It has been shown that the AIC tends to overestimate the number of groups in the case of mixture models.

The BIC (Bayesian Information Criterion) Introduced by [START_REF] Schwarz | Estimating the dimension of a model[END_REF], the BIC is an evaluation criterion for models defined in terms of their posterior probability. As for the AIC, it is adapted for the evaluation of models estimated by using the maximum likelihood method. This criterion is based on an approximation of the marginal distribution of the observations x, that is given for any considered model with parameter

θ by p(x) = p(x | θ)π(θ) dθ,
with π a prior distribution on θ. By using Laplace approximation method for the integral above, based on the idea that for a large enough number of observations, the integrand is concentrated in a neighborhood of the maximum likelihood estimator θ and that the value of the integral depends on the behaviour of the function in this neighborhood, the criterion is then defined as the following approximation of -2 log p(x)

BIC = -2 log L( θ) + k log(n),
where k is the number of free parameters of the model, L( θ) the maximum of the likelihood of the model and n the number of observations. As for the AIC, we choose the model minimising the BIC13 . This criterion has some limitations. First, as for the AIC, n must be large enough for the approximation to be valid. Moreover, it has additional limitations in a model-based clustering context, as mentioned in [START_REF] Biernacki | Assessing a mixture model for clustering with the integrated completed likelihood[END_REF], when assessing the number of clusters. Indeed, for the approximation to be valid, the estimated vector parameter must be within the parameter space, which is not the case when the true model has a smaller number of components that the model we consider. They also raise the fact that, as for the AIC, this criterion does not take into account the clustering purpose, and that it tends to overestimate the number of components in the case of mixture models when the true distribution is not in the considered family of distributions.

The ICL (Integrated Classification Likelihood)

The ICL is a criterion introduced by [START_REF] Biernacki | Assessing a Mixture Model for Clustering with the Integrated Classification Likelihood[END_REF] in order to circumvent the limitations of the BIC in a clustering context. Contrary to the previously introduced AIC and BIC, which were designed in a density estimation purpose, the ICL criterion has been derived in a clustering purpose. Indeed, this criterion is based on the complete (log-)likelihood, thus taking into account the clustering (i.e. the discrete latent variable z). They consider the integrated complete likelihood (also called integrated classification likelihood) that is given by the following expression for any considered model with parameter θ = (m, a) with m the mixing proportions parameter and a the parameter of the conditional distribution of the observations given the latent classes

p(x, z) = p(x, z | θ)π(θ) dθ,
+ log Γ Q 2 + Q q=1 log Γ ñq + 1 2 -Q log Γ 1 2 -Γ n + Q 2
with ñq the number of zi equal to q and Γ the Gamma function. Moreover, when the ñq s are large, using the approximation of the Gamma function with the Stirling formula, they obtain

ICL = max a log p(x | z, a) + max m log p(z | m) - λ 2 log n - Q -1 2 log n = max θ log p(x, z | θ) - k 2 log n (1.4.7)
with k = λ + Q -1 the number of free parameters in the model. This quantity can be maximised to select the most probable model. Note that considering the complete log-likelihood instead of the log-likelihood yields two penalisations in the first formulation of the ICL in (1.4.7), accounting for the distribution of the observations given the latent variables and for the distribution of the latent variables respectively. Even though it leads to a single penalisation (k/2) log n that is similar to that of BIC in this context, we will see why it is interesting when presenting an ICL for the SBM in the next section. Note that in [START_REF] Biernacki | Assessing a mixture model for clustering with the integrated completed likelihood[END_REF], a second version of [START_REF] Biernacki | Assessing a Mixture Model for Clustering with the Integrated Classification Likelihood[END_REF], the authors derive a criterion in a slightly different way and obtain the following ICL that is based on θ the maximum likelihood estimator of θ

ICL = log p(x, z | θ) - k 2 log n.

For the Stochastic Block Model

For the Stochastic Block Model, the AIC and BIC cannot be used because their computation involves the intractable log-likelihood of the observations. We present some criteria that were introduced in that context.

ICL criterion for the SBM An ICL criterion has been derived by [START_REF] Daudin | A mixture model for random graphs[END_REF] for model selection in the special case of the SBM, using the same technique as [START_REF] Biernacki | Assessing a Mixture Model for Clustering with the Integrated Classification Likelihood[END_REF] applied to the SBM, and based on the estimated z (obtained from a VEM). They obtain

ICL = max θ log p(x, z | θ) - 1 2 Q(Q + 1) 2 log n(n -1) 2 - Q -1 2 log n,
where Q(Q + 1)/2 is the number of free connectivity parameters (i.e. free parameters of the distribution of the observations given the latent variables), and Q -1 is the number of free proportion parameters (i.e. free parameters of the distribution of the latent variables), and n(n -1)/2 is the number of observations while n is the number of latent variables. Note that the first part of the penalty comes from the approximation of the conditional log-likelihood of the observations given the latent variables (i.e. the part associated with the parameter π, whose dimension is Q(Q + 1)/2, and the number of random variables is n(n -1)/2), and the second part of it comes from the approximation of the log-likelihood of the latent variables (i.e. the part associated with the parameter α, of dimension Q -1, and n group memberships random variables).

ILvb (Integrated Likelihood Variational Bayes) Later, [START_REF] Latouche | Variational Bayesian inference and complexity control for stochastic block models[END_REF] introduced another criterion, the ILvb, that is based on the log-likelihood, unlike the ICL. This quantity being intractable, they compute it using the variational approximation of the joint distribution of the latent variables and model parameters given the observations, the marginal log-likelihood then being approximated by the lower bound in the VEM algorithm. They then obtain a non asymptotic approximation (unlike the ICL again) through the variational Bayes EM algorithm (with Dirichlet and Beta prior on the group proportions and connectivity parameter). After convergence of the algorithm, the lower bound of the log-likelihood is used to approximate this log-likelihood, and gives a criterion named ILvb, depending on the posterior probabilities and the normalising constants of the Dirichlet and beta distributions. Q is then chosen as the value maximising the ILvb.

Exact ICL [START_REF] Côme | Model selection and clustering in stochastic block models based on the exact integrated complete data likelihood[END_REF] introduced the exact ICL, obtaining an analytical expression of log p(x, z | Q), and proposed an algorithm for the maximisation of this quantity. Their algorithm allows to recover the clusters and number of classes at the same time, starting from an upper bound of Q, and allowing clusters to disappear. They prove that, setting respectively a Dirichlet and Beta priors for the distribution of Z and of X given Z, we obtain an exact ICL, depending only on X, Z, Q and the prior parameters. The best Z and Q could then be obtained by finding the maximum of this quantity. However, it cannot be maximised directly, as for each Q, the number of possible configurations is Q n , hence the need for an algorithm to find the maximum. They introduce a greedy algorithm, starting with a SBM with the upper bound of number of classes. At each step, a single node is moved to another group if it increases the exact ICL (going to the group with maximal increase of the ICL). When a group is empty, it is removed. It stops when no swapping leads to an increase14 .

Criterion based on the empirical degrees

As mentioned before, [START_REF] Channarond | Classification and estimation in the stochastic blockmodel based on the empirical degrees[END_REF] proposed an algorithm to recover the clustering and estimate the parameters, and they propose in addition a selection criterion for the number of classes, relying only on the degrees of the observed graph. This criterion is based on the gaps between the mean degrees of the groups given by their algorithm.

Theoretical results

A lot of theoretical results have been obtained for the SBM, as for instance parameter estimator consistency or asymptotic normality results, or results on clustering error rate. We will mention a few of these results. Some theoretical results are presented in the introduction of Chapter 2 regarding parameter estimation, so we will focus here on other results on clustering.

We are interested in the misclassification proportion, i.e. the proportion of vertices classified in a wrong class by the considered algorithm (up to a permutation). If Z is the true configuration and Ẑ the configuration obtained with the considered algorithm, the misclassification proportion is

r(Z, Ẑ) = min σ∈S Q 1 n ∥Z -σ( Ẑ)∥ 0 := min σ∈S Q 1 n n i=1 1 Z i ̸ =σ( Ẑi )
with S Q the set of permutations on 1, Q .

Minimax risk for the misclassification proportion [START_REF] Zhang | Minimax rates of community detection in stochastic block models[END_REF] obtained a minimax risk decreasing exponentially with the number of nodes for the misclassification proportion for community detection (when the within-community probabilities are assumed to be larger than the between-communities probabilities). They work in a SBM framework but in which we assume that the true configuration z is a parameter of the model. Their result includes dense and sparse networks, equal and nonequal community orders and finite and growing number of communities. For example, to study sparse or dense networks, the connection probabilities can be as small as O(1/n) and as large as a constant. Regarding the number of communities, it can be as large as n/ log n. The parameter space Θ(n, Q, a, b, β) contains the assignments z and the connection probabilities π such that the number of nodes in each of the communities is in [n/(βQ), βn/Q] and π qq ≥ a/n for any q and π qq ′ ≤ b/n for any q ̸ = q ′ , with β > 1 and bounded and with 0 < b < a < (1 -c 0 ) for some positive constant c 0 . Defining I the Rényi divergence of order 1/2 between two Bernoulli distributions of parameter a/n and b/n respectively, i.e.

I = D 1/2 Ber a n Ber b n = -2 log   a n b n + 1 - a n 1 - b n   ,
their main result is as follows.

Theorem 1.4.1 [START_REF] Zhang | Minimax rates of community detection in stochastic block models[END_REF]).

Assume nI/(Q log Q) → ∞, then inf ẑ sup Θ(n,Q,a,b,β) E[r(z, ẑ)] =    exp -(1 + o(1)) nI 2 if Q = 2 exp -(1 + o(1)) nI βQ if Q ≥ 3 where 1+ε n ≤ β ≤ 5/3 for some ε n = CQ/n with constant C large enough. In addition, if nI/Q = O(1)
, there are at least a constant proportion of nodes mis-clustered, that is,

inf ẑ sup Θ(n,Q,a,b,β) E[r(z, ẑ)] ≥ c, for some constant c > 0.
They then derive thresholds on parameters to distinguish settings for which strong consistency (when the minimax rate is o(1/n)) or weak consistency (when the minimax rate is o(1)) can be attained. They give a penalised likelihood procedure that achieves the minimax bound, which is however not tractable. Gao et al. (2017a) proposed an algorithm of community detection that achieves this optimal misclassification proportion under some regularity conditions, and that computes in polynomial time. This algorithm consists of applying an existing community detection algorithm that satisfies a certain weak consistency condition (for example spectral clustering) and then refining the result by optimising a local penalised likelihood for each node separately.

Resolution limit in the planted partition In the case of the affiliation model, it is obvious that the more the between-groups and the within-group connection probabilities are close, the more difficult it is to recover the clustering. Many results have been obtained on this, in particular in the case of planted partition, i.e. with two balanced groups, and with the within-group connection probability larger than the between-groups one. For example a conjecture by [START_REF] Decelle | Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications[END_REF] which was proved later (see [START_REF] Mossel | Stochastic block models and reconstruction[END_REF][START_REF] Mossel | Reconstruction and estimation in the planted partition model[END_REF]; [START_REF] Massoulié | Community detection thresholds and the weak ramanujan property[END_REF]; [START_REF] Mossel | A proof of the block model threshold conjecture[END_REF]) gives conditions for weak recovery (or detection, meaning that the obtained partition of the nodes is positively correlated with the true partition with probability converging to one as the number of nodes increases). When π in = a/n and π out = b/n with a and b constants (in a sparse case), it states that • If (a -b) 2 > 2(a + b), it is possible to cluster in a way correlated with the true partition.

• If (a -b) 2 < 2(a + b), it is impossible to cluster in a way correlated with the true partition. [START_REF] Abbe | Exact recovery in the stochastic block model[END_REF] obtained threshold for exact recovery (i.e. zero misclassification proportion with probability converging to one as the number of nodes increases). More precisely, if

π in = a log(n)/n and π out = b log(n)/n, then • If (a + b/2) - √ ab > 1
, it is possible to recover the true partition with probability tending to one

• If (a + b/2) - √ ab < 1
, it is possible to recover the true partition with probability tending to one.

For more details, see for example [START_REF] Abbe | Community detection and stochastic block models: Recent developments[END_REF].

Some other results

Regarding the spectral clustering method (and particularly the absolute spectral clustering), [START_REF] Rohe | Spectral clustering and the high-dimensional stochastic blockmodel[END_REF] give asymptotic results on the normalised graph Laplacian and its eigenvectors, allowing the number of clusters to grow with the number of nodes. They also provide bounds on the number of misclustered nodes, requiring an assumption on the degree distribution. [START_REF] Lei | Consistency of spectral clustering in stochastic block models[END_REF] prove consistency for the recovery of communities in the spectral clustering on the adjacency matrix, with milder conditions on the degrees, and also extend this result to degree corrected stochastic block models.

We recall that [START_REF] Bickel | A nonparametric view of network models and Newman-Girvan and other modularities[END_REF] gave conditions on the modularity under which it allows to recover the communities with probability tending to one (exact recovery). [START_REF] Zhao | Community extraction for social networks[END_REF] propose a method to "extract" communities one at a time and obtain the consistency (exact recovery) of their procedure under certain conditions. [START_REF] Zhao | Consistency of community detection in networks under degree-corrected stochastic block models[END_REF] introduce a framework for studying the consistency of community detection under the degree-corrected SBM based on different criteria (generalising Bickel and Chen ( 2009)).

Time-evolving networks

The first part of this work is devoted to dynamic (or time-evolving) networks, where the role or behaviour of the nodes in the network and the relationships between them are allowed to change over time. See [START_REF] Holme | Modern temporal network theory: a colloquium[END_REF] for an introduction to dynamic networks. These types of networks arise in many domains. Some obvious examples of dynamic networks are human contacts or proximity networks (obtained by recording when two people are close to each other) [START_REF] Barrat | Temporal networks of face-to-face human interactions[END_REF], communication networks (such as e-mails or phone calls between people) [START_REF] Saramäki | From seconds to months: an overview of multi-scale dynamics of mobile telephone calls[END_REF][START_REF] Ebel | Scale-free topology of e-mail networks[END_REF] or social networks (such as friendship networks). Another example is the transportation networks (for instance based on airlines connection or public transportation). Such networks also arise in neuroscience (for example networks representing the temporal correlations between brain regions based on functional magnetic resonance imaging (fMRI) data) [START_REF] Sizemore | Dynamic graph metrics: Tutorial, toolbox, and tale[END_REF] or more generally in biology.

Such types of networks have been widely studied and can take many different forms. For example, we can consider discrete or continuous time, the interactions can be instantaneous or have a duration, we can assume that the nodes are present the entire observation time (and only the edges are evolving) or not, etc. We describe such networks in the following, distinguishing two main types, discrete-time (which will be our interest in this work) and continuous-time networks. We also present briefly some existing models for dynamic networks. The model we are interested in, that is a discrete dynamic version of the SBM, will be described in Section 1.6, and some more discrete dynamic graph models based on the (static) SBM are presented in the introduction of Chapter 2. One can also refer to [START_REF] Kim | A review of dynamic network models with latent variables[END_REF] for a review of latent variables dynamic network models.

Discrete-time dynamic networks

A possibility when studying dynamic networks is to work in discrete time, i.e. to look at snapshots, or aggregated relational data over time ranges, in order to get a sequence of graphs. The data can be aggregated by splitting the observation period into T intervals and considering that an edge is present in the interval t ∈ 1, T if it is present at any time in this interval to obtain a sequence of binary graphs. We can also consider a sequence of weighted graphs by doing as follows. In the case of instantaneous interactions between nodes, the edge between two nodes in the interval t ∈ 1, T can represent the number of interactions observed in this interval. In the case of interactions of variable lengths, the edge between two nodes in the interval t ∈ 1, T can represent the time of the interaction observed in this interval. Aggregating data obviously leads to a loss of information, and is not adapted to any kind of network.

An adapted representation of discrete-time dynamic networks is a sequence of graphs, as in Figure 1.6. See also Figure 1.7 for some representations of real world dynamic networks.

It is obviously important to take into account the evolutionary behaviour of the graphs, instead of just studying separate snapshots as unique graphs, the graphs being dependent over time.

A lot of models for discrete-time dynamic networks have been introduced. A common approach is to define dynamic extensions of existing (static) models. As mentioned before, discrete dynamic graph models based on the (static) SBM are introduced in Section 1.6 and in the introduction of Chapter 2. Note that some variants of the static SBM have also 2020). (a) represents functional connectivity between brain regions based on functional magnetic resonance imaging (fMRI) data (collected while the individual was learning to play a sequence of finger movements), (b) represents yearly international trade networks at four different years, and (c) represents yearly collaboration networks at a large research university at four different years. Note that the colors of the nodes in these graphs represent groups of nodes, which is not our interest for the moment.

been extended to the dynamic case, for example the MMSBM (see for instance [START_REF] Xing | A state-space mixed membership blockmodel for dynamic network tomography[END_REF]). Such models can be used for node clustering, as their static versions. Extensions of the ERGM have also been introduced for dynamic networks. For example, [START_REF] Hanneke | Discrete temporal models of social networks[END_REF]; [START_REF] Hanneke | Discrete temporal models of social networks[END_REF] introduce the Temporal Exponential Random Graph Model (TERGM), for the purposes of studying social network evolution. In the TERGM, a Markov assumption is made on the evolution of the network, assuming that the graph at time t given the graph at time t -1 follows an ERGM, the statistic S(X t , X t-1 ) involving X t and X t-1 , the adjacency matrices at times t and t -1. The statistics involving both X t and X t-1 can include stability 15 , reciprocity 16 or transitivity 17 , these measures being particularly relevant in the context of social networks. See also [START_REF] Krivitsky | A separable model for dynamic networks[END_REF], who introduced the Separable Temporal Exponential Random Graph Model (STERGM), adding an assumption of separability between the formation and duration of edges, obtaining a more convenient model. These models can be used for clustering (for example [START_REF] Lee | Model-based clustering of time-evolving networks through temporal exponential-family random graph models[END_REF] introduce a model-based clustering method for time-evolving networks based on a finite mixture of discrete time exponential-family random graph models).

Dynamic extensions of the LPM have also been introduced [START_REF] Sarkar | Dynamic social network analysis using latent space models[END_REF][START_REF] Sewell | Latent space models for dynamic networks[END_REF][START_REF] Friel | Interlocking directorates in Irish companies using a latent space model for bipartite networks[END_REF][START_REF] Sewell | Latent space models for dynamic networks with weighted edges[END_REF]. For example, the model of [START_REF] Sarkar | Dynamic social network analysis using latent space models[END_REF] assumes that the nodes can move in the latent space between two time steps, with a Markov assumption on the movement of the nodes, and assuming that the observed graphs are independent given the locations of the nodes. [START_REF] Friel | Interlocking directorates in Irish companies using a latent space model for bipartite networks[END_REF] introduce a model for the analysis of bipartite networks, extending the model of [START_REF] Sarkar | Dynamic social network analysis using latent space models[END_REF] by adding temporal evolution through Markovian dependence on the model parameters and on the edges (the edges are not conditionally independent anymore). [START_REF] Sewell | Latent space models for dynamic networks with weighted edges[END_REF] extends the LPM for dynamic weighted graphs.

Note that the preferential attachment models (see Section 1.3.3) such as the Barabási-Albert model are generative discrete-time graph models, with a graph growing at each step of the algorithm.

15 the tendency of an edge to stay present or absent between the two time steps 16 the tendency of an edge from i to j to result in an edge from j to i at the next time step 17 the tendency of an edge from i to j and from j to k to result in an edge from i to k at the next time step

(a) 5 4 3 2 1 • • • • • • • • • • • • time (b)

Continuous-time dynamic networks

We talked in the previous section about discrete-time graphs. They can be used to describe temporal evolution in graphs with low temporal resolution. However they may not be adapted to networks with high temporal resolution, such as e-mail networks.

There are different kinds of continuous-time dynamic graphs. For example, if we consider data of e-mails being sent between individuals, the interactions are instantaneous and can occur at any time. Another example would be phone calls between individuals, in which the interactions can occur at any time and have a continuous-time duration. The dynamics of the graph can also be defined by the addition or suppression of edges at time points. Different representations of such graphs can be used, depending on their form (see for example Figure 1.8).

A formalism has been introduced by [START_REF] Latapy | Stream Graphs and Link Streams for the Modeling of Interactions over Time[END_REF] to represent and analyse continuous dynamic networks, defining the notions of stream graphs and link streams. A stream graph is defined by S = (T, V, W, E) with V a finite set of nodes, T a set of time instants, W ⊆ T × V a set of temporal nodes (indicating the presence of the nodes over time) and E ⊆ T × V ⊗ V a set of links (a link being allowed to be present only if the two involved nodes are present). In the case where all nodes are present all the time (i.e. there is no dynamics on nodes, but only on edges), then S is called a link stream and is denoted by L = (T, V, E). See Figure 1.9 for a representation of these definitions (from Latapy et al. ( 2018)).

Number of models in that context are based on stochastic point processes. The use of such methods go way back in the analysis of dynamic networks, as [START_REF] Holland | A dynamic model for social networks[END_REF] introduced a continuous time Markov process to model changes in social relations (see also [START_REF] Wasserman | Analyzing social networks as stochastic processes[END_REF]). More recently, the stochastic actor-oriented model has been introduced by [START_REF] Snijders | Stochastic actor-oriented models for network change[END_REF][START_REF] Snijders | The statistical evaluation of social network dynamics[END_REF], in which opportunities of a single edge modification happen, the time between two opportunities following an exponential distribution and one of the two nodes or the two nodes (called actors) involved have the "choice" (hence the name actor-oriented) of modifying or not the edge. Some approaches are based on doubly stochastic Poisson processes which are Poisson processes with random intensities [START_REF] Butts | A relational event framework for social action[END_REF]. In particular, extensions of the SBM for interactions in continuous time based on such processes have been introduced [START_REF] Dubois | Stochastic blockmodeling of relational event dynamics[END_REF][START_REF] Corneli | Block modelling in dynamic networks with non-homogeneous Poisson processes and exact ICL[END_REF][START_REF] Matias | A semiparametric extension of the stochastic block model for longitudinal networks[END_REF]. In such models, the interactions between two nodes given their latent groups follow an inhomogeneous Poisson process with intensity depending on the groups. Self-exciting Hawkes processes have been used [START_REF] Blundell | Modelling reciprocating relationships with Hawkes processes[END_REF][START_REF] Masuda | Self-exciting point process modeling of conversation event sequences[END_REF][START_REF] Junuthula | The block point process model for continuous-time event-based dynamic networks[END_REF], for which occurrence of events increases the probability of additional events in the future and then leading to some "concentration" of events in time, which is observed in some types of real-world networks.

See also [START_REF] Durante | Locally adaptive dynamic networks[END_REF] who extend the LPM for continuous-time evolving networks.

Dynamic SBM with Markov membership evolution

In this work, we study the dynamic SBM as described in [START_REF] Yang | Detecting communities and their evolutions in dynamic social networks-a Bayesian approach[END_REF] and [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF], based on Markov chains modeling the temporal evolution of the group memberships over time, and on the (static) SBM.

More precisely, we consider a set of n vertices, split into Q latent classes, with Z t i the label of the i-th vertex at time t.

Letting Z i = (Z 1 i , . . . , Z T i )
, the {Z i } 1≤i≤n are independent and identically distributed and each Z i is a homogeneous aperiodic and stationary Markov chain with transition matrix Γ = (γ ql ) 1≤q,l≤Q .

At each time t, we observe a binary graph of adjacency matrix X t = {X t ij } 1≤i,j≤n , following a stochastic block model so that, conditional on the latent groups {Z t i } 1≤i≤n , the {X t ij } 1≤i,j≤n are independent Bernoulli random variables , i.e.

X t ij | Z t i = q, Z t j = l ∼ B(π t ql )
where (π t ql ) 1≤q,l≤Q,1≤t≤T ∈ [0, 1] Q 2 T are the connectivity parameters. The model is thus parameterised by θ = (Γ, π), with Γ = (γ ql ) 1≤q,l≤Q and π = (π t ) 1≤t≤T with π t = (π t ql ) 1≤q,l≤Q . Note that we will consider both this model and the one where the connection probability parameter is fixed over time, i.e. where for every t, t ′ ∈ 1, T , we have π t = π t ′ := π (this is the model in [START_REF] Yang | Detecting communities and their evolutions in dynamic social networks-a Bayesian approach[END_REF]) See Figure 1.10 for a representation of the temporal evolution in the model.

Note that we will assume that each Markov chain starts from an initial distribution α = (α 1 , . . . , α Q ), that is its stationary distribution.

Label switching and identifiability in the dynamic SBM

An important issue arising when considering multiple graphs separately is label switching. Indeed, for the classical (static) SBM, identifiability can only be obtained up to label switching. This is not surprising, as this just means that the name or number attributed to each group is arbitrary and have no relevance. Then, when considering multiple graphs without any assumptions on their dependency, one may identify groups and/or connection and class membership parameters for each graph, but there is no simple way to identify the different groups across time or space. Some results have been obtained for the previously introduced dynamic SBM with Markov membership evolution [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF][START_REF] Becker | Nonparametric identification in the dynamic stochastic block model[END_REF]. First, note that as mentioned in [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF], imposing a Markov structure on the nodes labels is not sufficient to be able

. . . Z t-1 1 Z t 1 Z t+1 1 . . . . . . Z t-1 2 Z t 2 Z t+1 2 . . . . . . . . . . . . . . . . . . . . . Z t-1 n Z t n Z t+1 n . . . . . . X t-1 X t X t+1 . . . Γ Γ Γ Γ π t-1 π t π t+1
Fig. 1.10 Temporal evolution of the dynamic SBM. Γ is the transition matrix of the Markov chains (each Markov chain models the evolution of the group membership of a single node) and π is the connection probability matrix of the SBM.

to identify the parameters and some constraints have to be imposed on the parameters too. To give some intuition about this, see Figure 1.11 inspired from [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF]. This is a toy example, representing a stochastic block model at two time steps and composed of three groups, that are are a hub (node 6), peripheral nodes (nodes 7 to 10 at time t and nodes 1 to 5 at time t + 1), and a community (nodes 1 to 5 at time t and nodes 7 to 10 at time t + 1). Recall that we do not observe the groups, represented by the different colours in the figure. Two interpretations of this evolution could be done in the context of clustering with Q = 3 groups, leading to very different parameters for the dynamic SBM. The first one, at the top of Figure 1.11, is to consider that the groups are stable (i.e. that the nodes stayed in their original group), but the connection behaviour of these groups changed between the two time steps, the purple group going from a community behaviour to a peripheral one, and the green one, inversely, going from a peripheral behaviour to a community one. The second interpretation, at the bottom of Figure 1.11, is to consider that the three groups have a stable connectivity behaviour (the purple one being a community, the yellow one a hub, and the green one peripheral nodes), and that the nodes 1 to 5 changed groups from the purple one to the green one, and inversely the nodes 7 to 10 changed groups from the green one to the purple one (while node 6 stayed in the yellow group). The first interpretation corresponds to the case where the connectivity parameter π is very different between the two time steps (leading to groups behaving differently between these two time steps) and the transition matrix has large diagonal elements (leading to nodes staying in the same group with high probability). The second one corresponds to the case where the connectivity parameter is similar between two time steps (leading to a similar connection behaviour for each groups between these two time steps) and the transition matrix has high values for the transition from the purple to the green group and inversely (leading to nodes going from the purple to green group, and inversely). For the estimation to be feasible, [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF] choose the second interpretation by imposing some constraint of stability over time to the connectivity parameter (this is also the choice made in [START_REF] Becker | Nonparametric identification in the dynamic stochastic block model[END_REF]), and point out that this is a suitable choice for the analysis of social networks or contact data. Identifiability in this dynamic SBM has been studied both for the binary and weighted graphs, but we focus here on the binary case. In [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF], they obtain that the model is generically identifiable (up to global label switching, i.e. with the same permutation acting on the groups for every time step) from the distribution of the observed graphs, for n large enough, under the assumption that the within-group connectivity parameters are stable over time, i.e. that for every t, t ′ ∈ 1, T and every q ∈ 1, Q , we have π t qq = π t ′ qq := π qq . Their identifiability result is generic, and the generic part concerns only the connectivity parameter π. This generic constraint arises in the proof of Theorem 2 in [START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF] which requires among others in the static case that the connection probabilities (π qq ′ ) 1≤q≤q ′ ≤Q are distinct. This assumption may not be necessary, however there are supplementary necessary assumptions to impose as without further assumptions, some cases may lead to non identifiability. We can refer to [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF] for some intuition on the non identifiability in the affiliation case, and empirical evidence for the label switching between time steps.

We formulate and prove in the following two results, of non identifiability in a particular case, and of a necessary condition for the identifiability of the parameter.

Proposition 1.6.1. If the parameter (Γ, π 1:T ) of a dynamic SBM is such that there exists

1 ≤ q 1 ̸ = q 2 ≤ Q such that • γ q 1 q 1 = γ q 2 q 2 and γ q 1 q 2 = γ q 2 q 1 , • (γ q 1 q ) q∈ 1,Q \{q 1 ,q 2 } = (γ q 2 q ) q∈ 1,Q \{q 1 ,q 2 } and (γ qq 1 ) q∈ 1,Q \{q 1 ,q 2 } = (γ qq 2 ) q∈ 1,Q \{q 1 ,q 2 } ,
• π q 1 q 1 = π q 2 q 2 , then it cannot be identified (up to global label switching).

Proof. To prove that the parameter cannot be identified, we exhibit a different parameter (different up to global label switching) leading to the same distribution for X 1:L . For any parameter (Γ, π 1:T ), we define a parameter ( Γ, π1:T ) such that πt = π t if t is odd and πt = (π t σ(q)σ(q ′ ) ) 1≤q,q ′ ≤Q if t is even with σ the permutation on 1, Q permuting q 1 and q 2 only18 , and such that γq 1 q 1 = γq 2 q 2 = γ q 1 q 2 , γq 1 q 2 = γq 2 q 1 = γ q 1 q 1 , and γqq ′ = γ qq ′ if q / ∈ {q 1 , q 2 } or q ′ / ∈ {q 1 , q 2 }. Let us also denote z1:T the transformation of any configuration z 1:T such that zt = z t at odd t values and zt := (z t 1 , . . . , zt n ) = (σ(z t 1 ), . . . , σ(z t n )) at even t values. The proof that (Γ, π 1:T ) and ( Γ, π1:T ) induce the same distribution on X 1:T then relies on the fact that for any t ∈ 1,

T and i ∈ 1, n , γ z t i z t+1 i = γz t i zt+1 i
, and α z1 i = α z 1 i . We should also note that α is also the stationary distribution of the Markov chain of transition matrix Γ. Indeed, the assumptions on Γ implies that α q 1 = α q 2 . To see this, notice that for any transition matrix P with stationary distribution p = (p 1 , . . . , p Q ), permuting the rows q 1 and q 2 and the columns q 1 and q 2 of P is equivalent to a relabeling of the states (by permuting states q 1 and q 2 ) and then the corresponding stationary distribution is the same distribution p with permuted coordinates q 1 and q 2 , i.e. (p σ(1),...,σ(Q) ) 19 . Then noticing that with our assumptions, Γ σ := (γ σ(q)σ(q ′ ) ) 1≤q,q ′ ≤Q = Γ, we have the equality of the stationary distributions (α 1 , . . . , α Q ) = (α σ(1) , . . . , α σ(Q) ), i.e. α q 1 = α q 2 . Then it is easily seen that α is also the stationary distribution of Γ20 .

We can then write the probability distribution of X 1:T under the parameter (Γ, π) as follows

P θ (X 1:T ) = z 1:T ∈ 1,Q nT T t=1 1≤i<j≤n (π t z t i z t j ) X t ij (1 -π t z t i z t j ) 1-X t ij n i=1 α z 1 i T -1 t=1 γ z t i z t+1 i = z 1:T ∈ 1,Q nT T t=1 1≤i<j≤n (π t zt i zt j ) X t ij (1 -πt zt i zt j ) 1-X t ij n i=1 α z1 i T -1 t=1 γz t i zt+1 i = z 1:T ∈ 1,Q nT T t=1 1≤i<j≤n (π t z t i z t j ) X t ij (1 -πt z t i z t j ) 1-X t ij n i=1 α z 1 i T -1 t=1 γz t i z t+1 i ,
the last inequality being true because it is equivalent to sum over the z 1:T in 1, Q nT or over the z1:T in 1, Q nT . This proves that the parameter ( Γ, π) leads to the same distribution of X 1:T , even though it is not equal to (Γ, π) up to global label switching of the groups.

For the case where the connectivity parameter is fixed over time (π t = π), it is necessary (as it is well known in the static case) that there are no two equal rows in the connectivity matrix in order to distinguish the groups. Indeed, if it is not satisfied, i.e. ∃q 1 ̸ = q 2 ∈ 1, Q such that π q 1 = π q 2 (where π q denotes the q th row of π for any q ∈ 1, Q ), we can prove that for example, the parameter (Γ σ , π) with Γ σ := (γ σ(q)σ(q ′ ) ) 1≤q,q ′ ≤Q (where σ is the permutation on 1, Q permuting q 1 and q 2 only) leads to the same distribution for X 1:T than (Γ, π) 21 .

In the case where the connectivity parameter varies over time, however, it may not be necessary that the matrix π t has all its rows distinct for every t. Indeed, it may be possible to identify the different groups even if some groups have the same behaviour at some (but not all) time steps, thanks to the transition matrix that is homogeneous over time. We formulate nonetheless a necessary assumption on this parameter. Proposition 1.6.2. In the dynamic SBM with varying connectivity parameter, it is necessary that ∀q ̸ = q ′ ∈ 1, Q , ∃t ∈ 1, T such that π t q ̸ = π t q ′ for the parameters (Γ, π) to be identifiable, where π t q = (π t qq ′ ) 1≤q ′ ≤Q .

Proof. If the assumption is not satisfied, i.e.

∃q 1 ̸ = q 2 ∈ 1, Q such that ∀t ∈ 1, T , π t q 1 = π t q 2 (implying that π t q 1 = π t q 2
, where π t q denotes the q th column of π t for any q ∈ 1, Q ), we cannot differentiate groups q 1 and q 2 , these groups having the same connection behaviour. We can exhibit a specific parameter different from the true parameter (up to global label switching) that leads to the same distribution of X 1:T . Indeed, we have, denoting by σ the permutation on 1, Q permuting only q 1 and q 2 , that π σ := (π σ(q)σ(q ′ ) ) = π. Then, the distribution of X 1:T under the true parameter (Γ, π) can be written as

P θ (X 1:T ) = z 1:T ∈ 1,Q nT T t=1 1≤i<j≤n (π t σ(z t i )σ(z t j ) ) X t ij (1 -π t σ(z t i )σ(z t j ) ) 1-X t ij n i=1 α z 1 i T -1 t=1 γ z t i z t+1 i = z 1:T ∈ 1,Q nT T t=1 1≤i<j≤n (π t z t i z t j ) X t ij (1 -π t z t i z t j ) 1-X t ij n i=1 α σ(z 1 i ) T -1 t=1 γ σ(z t i )σ(z t+1 i ) ,
noticing that it is equivalent to sum over the

z 1:T in 1, Q nT or over the σ(z) = (σ(z t i )) 1≤i≤n,1≤t≤T in 1, Q nT . Noticing that (α σ(1) , . . . , α σ(Q) )
is the stationary distribution associated with the transition matrix Γ σ := (γ σ(q)σ(q ′ ) ) 1≤q,q ′ ≤Q , this proves that the parameter (Γ σ , π) leads to the same distribution of X 1:T .

Estimation

As for the static SBM, we cannot compute the MLE except for very small values of n and T , and we neither can use the Expectation-Maximisation (EM) algorithm because it involves the computation of the intractable conditional distribution of the latent variables given the observations. Estimation can then be performed thanks to a VEM algorithm in that case too. The distribution of the latent variables given the observations is then replaced by a distribution that is factorised over the nodes (but not over time) (see [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF]).

Let us denote Z t iq = 1 Z t i =q for every t, i and q. Using the same approach as in [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF] for the VEM algorithm in the dynamic SBM, we consider a variational approximation of the conditional distribution of the latent variable Z 1:T given the observed variable X 1:T in the class of probability distributions parameterised by

χ = (τ, η) = {τ t iq } t,i,q , {η t iql } t,i,q,l of the form Q χ (Z 1:T ) = n i=1 Q χ (Z 1 i ) T t=2 Q χ (Z t i | Z t-1 i ) = n i=1      Q q=1 (τ 1 iq ) Z 1 iq   T -1 t=1 1≤q,l≤Q η t iql τ t iq Z t iq Z t+1 il    , i.e. with Q χ such that E Qχ Z t iq Z t+1 il = η t iql and E Qχ Z t iq = τ t iq .
The quantity to optimise in the VEM algorithm is then

J (χ, θ) = ℓ(θ) -KL(Q χ , P θ (•|X 1:T )) = E Qχ log P θ (X 1:T , Z 1:T ) + H(Q χ ),
with ℓ(θ) the log-likelihood.

Contributions in the dynamic SBM

In Chapter 2, we study the consistency of the maximum likelihood and variational estimators in the model described above. We prove the consistency (as the number of nodes and time steps increase) of the maximum likelihood and variational estimators of the model parameters, and obtain upper bounds on the rates of convergence of these estimators. We also explore the particular case where the number of time steps is fixed and connectivity parameters are allowed to vary. The assumption we make are that there are no two equal rows in the connection probability matrix22 (that there are no two equal rows in any connection probability matrices for the finite time case), that the transition and connection probabilities are bounded away from 0 and 1 (excluding the sparse case), and for the finite time case, that the diagonal of the connection probability matrix is fixed over time and that its values are distinct.

The consistency of the transition matrix estimators requires an additional assumption that the connection parameter estimator converges at a rate that is o( log(nT )/n), which we did not prove. Indeed, we only proved that the rate is faster than r n,T /n 1/4 with {r n,T } n,T ≥1 any sequence increasing to infinity. This is however a reasonable assumption, based on the convergence rates obtained in [START_REF] Bickel | Asymptotic normality of maximum likelihood and its variational approximation for stochastic blockmodels[END_REF] for the estimators in the case of the static SBM, as they obtain a rate of n -1 in a non sparse case (when ρ := P(X ij = 1) is constant) for the connection parameter estimator.

Chapter 2 is the reproduction of the article "Consistency of the maximum likelihood and variational estimators in a dynamic stochastic block model" published in Electronic Journal of Statistics [START_REF] Longepierre | Consistency of the maximum likelihood and variational estimators in a dynamic stochastic block model[END_REF].

Markov Random Fields (MRF)

The second part of this work, considering space-evolving networks, relies on Markov random fields. We will then give some definitions and results in this section. For a detailed introduction to Markov random fields (MRF), see for example [START_REF] Brémaud | Markov chains: Gibbs fields, Monte Carlo simulation, and queues[END_REF] or [START_REF] Stoehr | A review on statistical inference methods for discrete Markov random fields[END_REF]. A MRF is a set of random variables having a Markov property described by an undirected graph. This is used in various fields like ferromagnetism, image analysis, epidemiology or geography.

Definition

Consider an undirected graph G = (V, E) and a set of random variables Z = (Z l ) l∈V := Z 1:L indexed by V = {1, . . . , L} (the elements of V being called locations or sites) and each Z l taking their values in a finite space Λ l . Two locations forming an edge in G are said to be neighbours. Let us introduce some notation. For a subset A of V , let us denote by Z A the set of random variables on A, and identically for any configuration z (realisation of the random variable Z) by z A the restriction of this configuration to A. Let us denote by -A the complement of A in V . Then, for any location l, we denote by Z -l the set of random variables at every location but l, i.e. Z -l = {Z 1 , . . . , Z l-1 , Z l+1 , . . . , Z L }, and identically z -l = {z 1 , . . . , z l-1 , z l+1 , . . . , z L }. We define N (l) the neighbourhood of a location l as the set of locations that are adjacent to l in the graph G, i.e. the set of neighbours of l in G.

The set Z of random variables forms a Markov random field with respect to G if it satisfies the following (local) Markov property:

For any configuration z = (z l ) l∈V and any location l,

P(Z l = z l | Z -l = z -l ) = P(Z l = z l | Z N (l) = z N (l) ).
This means that the distribution of the random variable at a location l is independent of other locations conditional on the random variables at the neighbouring locations. Markov random fields have been especially studied with regular graphs G, such as lattices, for example for image analysis or in ferromagnetism with the well known Ising model (modeling interacting spins). At this point, a Markov random field is then described only by the different conditional probabilities at each location given their neighbours, which is not convenient to manipulate, and may not even imply the existence of a joint probability distribution. A fundamental result for MRF is the Hammersley-Clifford theorem, which states that the joint distribution of a MRF is factorised over the set of cliques of G, when P(Z = z) > 0 for every configuration z (see for example [START_REF] Besag | Spatial interaction and the statistical analysis of lattice systems[END_REF] or [START_REF] Clifford | Markov random fields in statistics[END_REF]). More precisely, it states that under this positivity condition (i.e. if P(Z = z) > 0 for every z), the Markov random field Z introduced before follows a Gibbs distribution of the form

P ψ,G (Z = z) = 1 S(ψ, G) exp [-H(z, ψ, G)] (1.7.1)
for some parameter ψ and some energy function H which decomposes into potential functions V c associated to each clique c ∈ C (defining C the set of cliques of G)

H(z, ψ, G) = c∈C V c (z c , ψ)
and with S(ψ, G) a normalising constant (also called partition function). In the following, for simplicity of notation, we will drop G from the notation, since there will be no ambiguity.

Note that reciprocally, if Z 1:L follows a Gibbs distribution with potential functions {V c } c∈C relative to a neighbourhood system G23 , then Z 1:L is a Markov random field with the neighbourhood graph G. Moreover, its local specification is given by the formula

P ψ,G (Z l = z l | Z N (l) = z N (l) ) = exp -c∈C;l∈c V c (z c , ψ) λ∈Λ l exp -c∈C;l∈c V c (z c (l,λ) , ψ)
where

z (l,λ) = (z l ′ (l,λ) ) l ′ ∈V is defined as the configuration such that z l (l,λ) = λ and z l ′ (l,λ) = z l ′ for l ′ ̸
= l, and with c∈C;l∈c the summation over the cliques of G containing l. Unlike the Hammersley-Clifford theorem, this result is quite straightforward (see for example Theorem 2.1 in Brémaud ( 2013)).

Autologistic model and Potts model

We present two classical MRF models that are the autologistic model (for binary data) and the Potts model (with variables taking their values in a finite set). We will focus in this work on the Potts model. These models have been used for instance in image analysis, solid-state physics and ferromagnetism.

We saw earlier with the Hammersley-Clifford theorem that under the positivity condition, the joint distribution of a MRF is a Gibbs distribution which factorises over cliques, decomposing into potential functions. We may assume that it is not necessary to consider the potentials on large cliques to correctly model the spatial dependency. Then, in the autologistic model introduced by [START_REF] Besag | Nearest-neighbour systems and the auto-logistic model for binary data[END_REF] for binary data, we only consider the cliques of one and two nodes, i.e. potentials at one location, and interactions between two locations, and the potential functions associated with larger cliques are set to zero.

The energy function then writes

H(z, ψ, G) = l∈V V l (z l , α) + (l,l ′ )∈E V ll ′ (z l , z l ′ , β),
with α the parameter on locations and β the parameter on pairs of neighbours, the parameter of this model being ψ = (α, β). Note that (l,l ′ )∈E is the sum over the edges of the undirected graph G, and we consider each edge only once, i.e. as (l ′ , l) is the same edge as (l, l ′ ) for any l, l ′ ∈ 1, L , we do not consider both (l, l ′ ) and (l ′ , l).

More precisely, the energy function in the autologistic model can be written as

H(z, ψ, G) = α l∈V z l + (l,l ′ )∈E β ll ′ z l z l ′ .
where originally z l ∈ {0, 1} for every l ∈ V . However, nowadays we preferably use this model with z l taking their values in {-1, 1} instead of {0, 1}. As mentioned in [START_REF] Pettitt | Efficient calculation of the normalizing constant of the autologistic and related models on the cylinder and lattice[END_REF], this parameterisation has the advantage of avoiding problems of non-invariance when states 0 and 1 are interchanged. In particular, the widely used Ising model [START_REF] Ising | Beitrag zur theorie des ferromagnetismus[END_REF]) is an autologistic model with the random variables z l taking their values in {-1, 1}. With this formulation, the autologistic model is a particular case (when Q = 2) of the Potts model introduced right after.

Potts model

In the Potts model [START_REF] Potts | Some generalized order-disorder transformations[END_REF], contrary to the autologistic model, the variables of the random field take their values in a finite set {1, . . . , Q}, and the energy function can be written as follows

H(z, ψ, G) = Q q=1 α q l∈V 1 z l =q + β (l,l ′ )∈E 1 z l =z l ′ . (1.7.2)
Note that a more general version of this model exists, when the parameter α (respectively β) can have different values at different locations (respectively at different pairs of neighbour locations), i.e.

H(z, ψ, G) = Q q=1 l∈V α l q 1 z l =q + (l,l ′ )∈E β ll ′ 1 z l =z l ′ .
However, in this version of the model, the number of parameters is at least of the order of the number of random variables L. In this work, we will then consider the definition of the Potts model in (1.7.2), as we will be interested in parameter estimation (based on a single realisation of a Potts model).

The parameter α = (α q ) 1≤q≤Q is the parameter of the external field, i.e. the latent variables are more likely to take values associated with large values of the parameter α. In particular, if α q = 0 for all q ∈ 1, Q , all the Q states are equally probable (a priori). The parameter β determines the strength of interaction between two neighbour locations. If β is positive, the model encourages latent variables at neighbour locations to have the same value, and on the contrary, a negative β encourages the random variables at neighbour locations to have different values.

A constraint can be imposed on the external field parameter for identifiability purposes, since adding the same constant to each component of α leads to the same distribution. Then, one could for example impose that Q q=1 α q = 0. We will give more details about identifiability of the Potts model in Section 3.3.

Note that for any l, the conditional probability of Z l given the value z-l (or identically given the values zN(l) of its neighbours) simply writes as follow

P ψ (Z l | Z -l = z-l ) = P ψ (Z l | Z N (l) = zN(l) ) = exp α Z l + β l ′ ∈N (l) 1 Z l =z l ′ Q q=1 exp(α q + β l ′ ∈N (l) 1 q=z l ′ ) . (1.7.3)
This quantity can be computed easily.

Strength of interaction and phase transition

The parameter β of the Potts model controls the strength of association between neighbour locations. If β is equal to 0, the locations are independent, and the bigger the β, the higher the probability that the variables at neighbour locations are equal. A particularity of the Potts model is that it exhibits a phenomenon known as phase transition (between a disordered phase and an ordered phase), if β becomes "too" large (exceeds a critical value), large parts of the random field (if not the whole field) are equal to the same value. This phenomenon has been widely studied (in physics for example). In particular, critical values for β have been obtained on lattices for Ising and Potts models. Note that these critical values depend on the graph G and tend to increase with the number of neighbours (degrees of the nodes). For example, the critical value is higher for a second First order lattice Second order lattice Fig. 1.12 Two different location graphs, that are first order and second order lattices order lattice24 than for a first order lattice 25 (see Figure 1.12). See Figure 1.13 illustrating the phenomenon for the Ising model on a first order lattice.

We do not give more details on phase transition here but one can refer to Georgii (2011); [START_REF] Duminil-Copin | Order/disorder phase transitions: the example of the Potts model[END_REF].

In practice, when working on synthetic data in Chapter 3 we will visually check that we are not in a case where the strength of interaction is so strong that the configuration is "frozen".

Simulation with a Gibbs sampler

An important question is the sampling from a Gibbs distribution. This is not straightforward to draw realisations of this joint distribution because of its complexity. For this task, we can use a Gibbs sampler [START_REF] Geman | Stochastic relaxation, Gibbs distributions, and the Bayesian restoration of images[END_REF], which is an algorithm used to generate realisations of a joint distribution by starting from an initial configuration and updating the components one at a time, using the conditional probability distributions (see Algorithm 4).

Note that this Gibbs sampler is sometimes called systematic scan (or deterministic or sequential scan) Gibbs sampler, meaning that a fixed order is selected (in this case 1, . . . , L) and the components z l are updated in that specific order. A random scan Gibbs sampler can also be used, in which the component to update is selected randomly (from a uniform distribution) at each iteration.

It has been established that the Gibbs sampler converges to the wanted distribution [START_REF] Geman | Stochastic relaxation, Gibbs distributions, and the Bayesian restoration of images[END_REF]. However, this convergence can be slow, especially for large (for example when β is above the critical value of the phase transition). Other methods have been introduced, that can speed up the simulation, such as the modified random scan Gibbs sampler of [START_REF] Liu | Peskun's theorem and a modified discrete-state Gibbs sampler[END_REF], or the Swendsen-Wang algorithm introduced by Swendsen and [START_REF] Swendsen | Nonuniversal critical dynamics in Monte Carlo simulations[END_REF], allowing updates of large parts of the field simultaneously, by incorporating auxiliary "bond" variables on pair of neighbours in G.

β β = -2 β = -1 β = -0.5 β = 0 β = 0.5 β = 0.8 β = 1.5 β = 2
Note that [START_REF] Friel | Recursive computing and simulation-free inference for general factorizable models[END_REF] proposed an exact sampling method for Markov random fields on small enough lattices. This is based on the recursive algorithm of [START_REF] Reeves | Efficient recursions for general factorisable models[END_REF] which was introduced for the computation of the normalising constant, and is based on an appropriate factorisation of the unnormalised joint probability (due to the Markov property) reducing the complexity of the summation and giving an exact computation of the normalising constant for lattices up to about 20 rows.

Algorithm 4: Gibbs sampler

input : A number of iterations M , a parameter ψ output : A realisation of the random variable Z ∼ P ψ 1 Initialise an arbitrary configuration z (0) = (z (0)1 , . . . , z (0)L );

2 for m = 1 to M do 3 for l = 1 to L do 4 Draw z (m)l from the conditional distribution P ψ (Z l | z (m)1 , . . . , z (m)l-1 , z (m-1)l+1 , . . . , z (m-1)L ) (see (1.7.3)); 5 end 6 end 7 return z (M )
dependencies between the random variables. We will especially be interested in mean field and mean field like approaches.

Mean field approximation

The mean field approximation originated in statistical mechanics (see for example [START_REF] Chandler | Introduction to modern statistical mechanics[END_REF]) where it was used to approximate the mean of a MRF. It consists of approximating the intractable Gibbs distribution by a simpler distribution, that can be factorised over locations, which will resolve the intractability of the normalising constant. This approximation consists of neglecting the fluctuations of the neighbours of each location by setting their values to their mean values. Before writing this approximation, let us introduce a new (equivalent) notation for the MRF Z

1:L . Let us denote Z l = (Z l q ) 1≤q≤Q := (1 Z l =q ) 1≤q≤Q ∈ [0, 1] Q for every l ∈ 1, L and Z 1:L = (Z l ) 1≤l≤L .
Let us also introduce an equivalent definition of the energy function in the Potts model

H(z 1:L , ψ, G) = Q q=1 α q L l=1 z l q + β (l,l ′ )∈E Q q=1 z l q z l ′ q .
The mean-field approximation of the Gibbs distribution of Z 1:L then writes as follows

P MF ψ (Z 1:L = z 1:L ) = L l=1 P ψ (Z l = z l | Z -l = m -l ) = L l=1 P ψ (Z l = z l | Z N (l) = m N (l) ), (1.7.4)
where m 1:L = (m 1 , . . . , m L ) 26 are the mean values of the variables Z 1:L , and where

P ψ (Z l = z l | Z N (l) = m N (l) ) = exp( Q q=1 α q z l q + β l ′ ∈N (l) Q q=1 z l q m l ′ q ) Q q=1 exp(α q + β l ′ ∈N (l) m l ′ q )
.

(1.7.5)

Now remains the question of the computation of these unknown means, which was originally the purpose of this method. To obtain an approximation of these means that we will denote by z1:L = (z 1 , . . . , zL ), as mentioned in [START_REF] Celeux | EM procedures using mean field-like approximations for Markov model-based image segmentation[END_REF], we rely on the self consistency condition, stating that the mean obtained based on the mean field approximation must be equal to the mean used to define this approximation. This means that for any location l, when fixing the other values at their mean z-l = (z 1 , . . . , zl-1 , zl+1 , . . . , zL ) 27 , the expectation of Z l = (Z l q ) 1≤q≤Q must be equal to zl , i.e.

zl q = E MF ψ [Z l q ] = E ψ [Z l q | Z N (l) = zN(l) ]
for every q and l, i.e. z must satisfy the fixed point equation

z := (z 1 , . . . , zL ) =          E ψ [Z 1 | Z N (1) = zN(1) ] . . . E ψ [Z L | Z N (L) = zN(L) ].
Conditions for the existence have been discussed for example in [START_REF] Wu | Cluster expansions for the deterministic computation of Bayesian estimators based on Markov random fields[END_REF]. When the solution exists, it can be computed iteratively.

Note that the mean-field approximation is equivalently the minimiser of the Kullback-Leibler divergence from the true distribution over the set of probability distributions that factorise over locations (see for example [START_REF] Chandler | Introduction to modern statistical mechanics[END_REF]; [START_REF] Peyrard | Approximations de type champ moyen des modèles de champ de Markov pour la segmentation de données spatiales[END_REF]; [START_REF] Vignes | Modèles markoviens graphiques pour la fusion de données individuelles et d'interactions: application à la classification de gènes[END_REF]; [START_REF] Blei | Variational inference: A review for statisticians[END_REF]), i.e. z is the minimiser of KL(Q τ , P θ (•)) with respect to τ , where Q τ is defined as the factorised (over the locations) distribution for Z 1:L such that

Q τ (Z l = q) := E Qτ [Z l q ] = τ l q .
Indeed, we can see that computing the derivatives of the Kullback-Leibler divergence with respect to the components of τ and setting these derivatives equal to zero leads to the same fixed point equation as above. The mean-field approximation of the Gibbs distribution is then a variational approximation as described above in the VEM algorithm.

Mean field like approximation

The mean field approximation method has then been extended to mean field like approximations, in which we still neglect the fluctuations of the neighbours, their values being fixed to a value, as in (1.7.4), but not necessarily to the mean. These values can be the mode or a realisation of the random variable [START_REF] Celeux | EM procedures using mean field-like approximations for Markov model-based image segmentation[END_REF]. This will be our interest in Chapter 3 where it will be described more thoroughly.

Other methods

Pseudolikelihood

The first method (apart from the coding technique [START_REF] Besag | Spatial interaction and the statistical analysis of lattice systems[END_REF][START_REF] Besag | Statistical analysis of non-lattice data[END_REF], that have not been used much) is the pseudolikelihood, introduced by [START_REF] Besag | Statistical analysis of non-lattice data[END_REF], which approximates the joint probability distribution by the product of the conditional distributions at each location, given all the other locations (thus given the neighbours). The pseudolikelihood is written

PL(Z 1:L ) = L l=1 P ψ (Z l | Z -l ) = L l=1 P ψ (Z l | Z N (l) ),
where each term of the product can be computed easily (see Equation (1.7.3)). An estimator of the distribution parameter can then be obtained by maximising the pseudolikelihood. Note that this is not a valid probability distribution (unless the Z l s are independent). Contrarily to the mean field like approaches, the neighbours are not fixed to constants, but are still random. This method is convenient because the estimator is easy to compute, and consistency and asymptotic results have been obtained [START_REF] Gidas | Consistency of maximum likelihood and pseudo-likelihood estimators for Gibbs distributions[END_REF][START_REF] Comets | On consistency of a class of estimators for exponential families of Markov random fields on the lattice[END_REF][START_REF] Guyon | Asymptotic comparison of estimators in the Ising model[END_REF], but it has been shown that it does not always lead to good estimates, namely when the interaction is strong (see for example [START_REF] Geyer | Markov chain Monte Carlo maximum likelihood[END_REF] and [START_REF] Friel | Likelihood estimation and inference for the autologistic model[END_REF]).

Some variations of the pseudolikelihood have been introduced to tackle its issues, such as the generalised pseudolikelihood [START_REF] Huang | Generalized pseudo-likelihood estimates for Markov random fields on lattice[END_REF] or second order pseudolikelihood [START_REF] Mase | Consistency of the maximum pseudo-likelihood estimator of continuous state space Gibbsian processes[END_REF]. See also [START_REF] Huang | Improvements of the maximum pseudo-likelihood estimators in various spatial statistical models[END_REF], who carry out a single Newton-Raphson step starting from the maximum pseudo-likehood.

Composite likelihood

The composite likelihood [START_REF] Lindsay | Composite likelihood methods[END_REF] extends the pseudolikelihood by approximating the joint distribution by the product of tractable joint distributions of variables of a small number of locations. See [START_REF] Varin | An overview of composite likelihood methods[END_REF] for a review of composite likelihood methods in a general context. The composite likelihood can be defined as [START_REF] Asuncion | Learning with blocks: Composite likelihood and contrastive divergence[END_REF])

CL(Z 1:L ) = M m=1 P ψ (Z Am | Z Bm ),
where M is an integer smaller than L and {A m } 1≤m≤M and {B m } 1≤m≤M are sets of subsets of 1, L , such that A m ̸ = ∅ and A m ∩ B m = ∅. In particular, when M = 1, A 1 = 1, L and B 1 = ∅, this gives the likelihood and when M = L, A m = {m} and B m = 1, L \ {m} (or identically B m = N (m)) for every m ∈ 1, L , the composite likelihood is the pseudolikelihood. When B m = ∅ for every m ∈ 1, M , the composite likelihood is a product of marginal distributions and is usually called marginal composite likelihood. On the contrary, when for every m ∈ 1, M , B m = 1, L \ A m , the composite likelihood is called conditional composite likelihood. Note that in the case of spatial lattice processes (and a fortiori on a general spatial graph) such as the Potts model we consider, no marginal distributions can be computed, but conditional composite likelihood can be used [START_REF] Okabayashi | Extending pseudo-likelihood for Potts models[END_REF][START_REF] Friel | Bayesian inference for Gibbs random fields using composite likelihoods[END_REF][START_REF] Stoehr | Calibration of conditional composite likelihood for Bayesian inference on Gibbs random fields[END_REF]. [START_REF] Okabayashi | Extending pseudo-likelihood for Potts models[END_REF] show that composite likelihood gives better results than the pseudolikelihood approach, but in certain situations gives less satisfying results than maximum likelihood approximated using Markov chain Monte Carlo (MCMC) (see next paragraph).

Markov chains Monte Carlo methods

Rather than replacing the likelihood with another tractable criterion as before, some methods have focused on the approximation of the maximum likelihood using Markov Chain Monte Carlo methods.

For example, [START_REF] Younes | Estimation and annealing for Gibbsian fields[END_REF] proposes to compute an approximate maximum likelihood estimator using a stochastic gradient algorithm. At each iteration, a small step is taken in the direction of the approximated gradient (based on a Gibbs sampler). [START_REF] Geyer | Constrained Monte Carlo maximum likelihood for dependent data[END_REF] propose an algorithm to approximate the maximum likelihood based on a direct approximation of the likelihood from a MCMC sample (using a Metropolis algorithm or a Gibbs sampler) and its maximisation. Their procedure is iterative, and at each step, the approximated likelihood (based on a MCMC sample from the distribution with the current parameter) is maximised in a fixed neighbourhood of the current parameter. This is because the approximation of the likelihood is not good for parameters far from the one used for sampling (for a sample of reasonable size), so the maximisation cannot be done on the whole parameter space from a sample based on a single parameter. [START_REF] Descombes | Estimation of Markov random field prior parameters using Markov chain Monte Carlo maximum likelihood[END_REF] introduce a MCMC algorithm based on the conjugate gradient principle, introducing a heuristic criterion to define a neighbourhood of the current parameter in which the MCMC approximation is robust.

Note that such methods may require a lot of computation time.

Other methods Other methods have been introduced to circumvent the difficulties caused by the intractability of the distribution. See the introduction of Chapter 3 for some existing methods. We also talk briefly about methods based on posterior distributions computations and not maximum likelihood, which is also problematic for the same reasons.

Hidden Markov random field

In this work, we will consider hidden Markov random field, in the sense that we do not observe the value of the Markov field, but that of a random variable X 1:L = (X 1 , . . . , X L ), the {X l } 1≤l≤L being independent given Z 1:L , and X l | Z l following a distribution of a given form, with a (usually) unknown parameter π. The conditional distribution of X 1:L given Z 1:L then factorises as follows

P π (X 1:L | Z 1:L ) = L l=1 P π (X l | Z l ).
The usual stakes in this situation are the recovery of the latent variables, and the estimation of the parameters of the Gibbs distribution, denoted by ψ, and/or of π the parameter of the emission distribution, i.e. the distribution of X 1:L given Z 1:L . We will denote by θ the whole parameter, i.e. θ = (ψ, π), where ψ = (α, β). In the case of a hidden Markov random field, the problem of parameter estimation is even more complicated than in the case of an observed field. We will talk about some methods, and particularly the mean field and mean field like EM algorithm.

EM with mean field or mean field like approximation

In this work, the method we are interested in is the EM algorithm combined with a mean field [START_REF] Zhang | The mean field theory in EM procedures for Markov random fields[END_REF] or a mean field like approximation [START_REF] Celeux | EM procedures using mean field-like approximations for Markov model-based image segmentation[END_REF] in order to approximate the MLE in a hidden MRF. First of all, we should point out the fact that we cannot maximise the likelihood directly because the computation of this quantity involves a summation over all the Q L possible latent configurations, in addition to the normalising constant of the Gibbs distribution of the latent variables being intractable.

We neither can use the EM algorithm to approximate it because the quantity to optimise in this algorithm

Q(θ|θ (t-1) ) =E θ (t-1) log P π X 1:L | Z 1:L X 1:L + E θ (t-1) log P ψ Z 1:L X 1:L :=Q 1 (π|θ (t-1) ) + Q 2 (α, β|θ (t-1)
).

(1.7.6) involves the computation of the conditional distribution of the latent variables Z 1:L given the observations X 1:L (appearing both in Q 1 and Q 2 in (1.7.6)) which is not tractable, and of the intractable normalising constant in the distribution of Z 1:L (appearing in Q 2 in (1.7.6)).

The quantities Q 1 (π|θ (t-1) ) and Q 2 (α, β|θ (t-1) ) can be written respectively as

Q 1 (π|θ (t-1) ) = L l=1 z l log P π X l | Z l = z l P θ (t-1) Z l = z l |X 1:L (1.7.7)
and

Q 2 (α, β|θ (t-1) ) = -log S(ψ) + Q q=1 α q L l=1 P θ (t-1) Z l = q X 1:L + β (l,l ′ )∈E P θ (t-1) Z l = Z l ′ X 1:L . (1.7.8)
It is important to remember that S(ψ) depends on α and β and we cannot ignore it when maximising Q 2 (α, β|θ (t-1) ) with respect to α and β.

A variation of the EM algorithm has then been introduced to circumvent the problems of intractable distributions, relying on a mean field or mean field like approximation (described in Section 1.7.5) for both the distribution of the latent variables and of the latent variables given the observations. In such methods, at each step of the EM algorithm, we compute the mean (or mode or we simulate a configuration) of the conditional distribution of the latent variables given the observations. Then, in criterion (1.7.6), both intractable distributions (of the latent variables given the observations, and of the latent variables) are replaced by their mean field (resp. mean field like) approximations based on this expectation (resp. mode or simulated configuration). This allows to compute the conditional expectation and to get rid of the intractable normalising constant.

As pointed out in [START_REF] Celeux | EM procedures using mean field-like approximations for Markov model-based image segmentation[END_REF], if we want the approximate distributions (of the latent variables, and of the latent variables given the observations) to satisfy the Bayes rule, these two approximations must be based on the same simulated configuration (or mean or mode). The authors mention that it is more reasonable to base the approximation on the conditional distribution (of the latent variables given the observations) P θ (Z 1:L | X 1:L ) rather than on the distribution of the latent variables P ψ (Z 1:L ), as it takes the observations directly into account. See also the appendix of [START_REF] Celeux | EM Procedures Using Mean Field-Like Approximations for Markov Model-Based Image Segmentation[END_REF] for reasons dissuading from using the mean field approximation based on the distribution of Z 1:L .

We present here the algorithm when using the approximation based on a simulated configuration (that is called simulated field EM or simulated EM), but it can be defined similarly using the mean or mode. At each step t of the algorithm, we simulate a configuration z1:L from the conditional distribution of the latent variables given the observations P θ (t-1) (Z 1:L | X 1:L ), under the parameter θ (t-1) = (ψ (t-1) , π (t-1) ) obtained at step t -1. This simulation can be obtained using a Gibbs sampler (Algorithm 4), such that at each iteration m ∈ 1, M , for each l ∈ 1, L , z (m)l is simulated from the distribution

P θ (t-1) (Z l | X l , z (m)1 , . . . , z (m)l-1 , z (m-1)l+1 , . . . , z (m-1)L ) ∝P π (t-1) (X l | Z l )P ψ (t-1) (Z l | z (m)1 , . . . , z (m)l-1 , z (m-1)l+1 , . . . , z (m-1)L ).
Then an EM step is performed, with approximate distributions (of the latent variables, and of the latent variables given the observations). More precisely, the distribution of Z 1:L appearing in Q 2 is approximated by the following distribution

P z ψ (Z 1:L = z 1:L ) := L l=1 P ψ (Z l = z l |Z -l = z-l ) = L l=1 P ψ (Z l = z l |Z N (l) = zN(l) ) (1.7.9)
where

P ψ (Z l = z l | Z N (l) = zN(l)
) is given by the formula in (1.7.3), and the distribution of the latent variable Z 1:L given the observations X 1:L (that appears in the expectation in both Q 1 and Q 2 ) is approximated by (using the Bayes formula and (1.7.9))

P z θ (t-1) (Z 1:L = z 1:L | X 1:L ) = P π (t-1) (X 1:L | Z 1:L = z 1:L )P z ψ (t-1) (Z 1:L = z 1:L ) z 1:L P π (t-1) (X 1:L | Z 1:L = z 1:L )P z ψ (t-1) (Z 1:L = z 1:L ) = L l=1 P π (t-1) (X l | Z l = z l )P ψ (t-1) (Z l = z l | Z N (l) = zN(l) ) z l P π (t-1) (X l | Z l = z l )P ψ (t-1) (Z l = z l | Z N (l) = zN(l) ) = L l=1 P θ (t-1) (Z l = z l | Z N (l) = zN(l) , X l ) = L l=1 P z θ (t-1) (Z l = z l | X l ).
Then, we perform an EM iteration using these approximate distributions. The quantities we want to maximise are now Q1 (π|θ (t-1) ) and Q2 (α, β|θ (t-1) ), that are the approximations (using the approximate distributions) of Q 1 (π|θ (t-1) ) and Q 2 (α, β|θ (t-1) ) respectively, that are given by Q1 (π|θ

(t-1) ) = L l=1 z l log P π X l | Z l = z l P z θ (t-1) Z l = z l |X l and Q2 (α, β|θ (t-1) ) = L l=1 z l log P ψ Z l = z l | Z N (l) = zN(l) P z θ (t-1) Z l = z l |X l .
These quantities are tractable, and we can then update the parameter by maximising them thanks to numerical approximations if needed with respect to π and to α and β

θ (t) = (arg max α,β Q2 (α, β|θ (t-1) ), arg max π Q1 (π|θ (t-1) )).

Other methods

Other methods have been introduced to estimate the parameters and/or the classification in hidden Markov random fields, that can be based for example on Monte Carlo techniques, EM algorithm, pseudolikelihood, composite likelihood... See the introduction of Chapter 3 for the introduction to some of these methods.

Choice of the number of classes for hidden MRF

In the context of HMRF, the classical criteria for the choice of the number of classes (i.e. the number of states of the latent variable Z) such as the BIC or ICL introduced in Section 1.4.5 cannot be computed as it relies on intractable quantities (the maximised log likelihood or maximised complete log likelihood). Some methods have been introduced for choosing the number of classes in this context, for example by approximating these criteria.

Approximation of the BIC using a mean field-like approximation [START_REF] Forbes | Hidden Markov random field model selection criteria based on mean field-like approximations[END_REF] proposed to estimate the BIC of [START_REF] Schwarz | Estimating the dimension of a model[END_REF] using the mean field like approximation.

Let us denote by z1:L and θ respectively the outputted configuration and estimator of θ (i.e. the approximation of the MLE) obtained from the mean-field like (more specifically simulated) EM algorithm. An approximation of the BIC under the mean field-like approximation based on these quantities is

BIC z1:L ( θ) = 2 log P z, θ(X 1:L ) -d log n
with d the number of free parameters in the model, and with the distribution of the observations under the mean-field like approximation and the approximation of the MLE P z, θ(X 1:L ) =

z 1:L P z, θ(X 1:L | z 1:L )P z, θ(z 1:L ) = L l=1 z l P θ(X l | z l )P θ(z l | z -l ).
The authors obtained unstable results for the choice of the number of classes on simulations for Potts model.

Other choices for z1:L and θ can be made. For example, Forbes and Peyrard (2003) mention that using for z1:L and θ the values obtained by the use of the Iterated Conditional Modes of [START_REF] Besag | On the statistical analysis of dirty pictures[END_REF] leads to the Pseudo-Likelihood Information Criterion (PLIC) 28 [START_REF] Stanford | Fast automatic unsupervised image segmentation and curve detection in spatial point patterns[END_REF][START_REF] Stanford | Approximate Bayes factors for image segmentation: the pseudolikelihood information criterion (PLIC)[END_REF]. [START_REF] Forbes | Hidden Markov random field model selection criteria based on mean field-like approximations[END_REF] also propose a selection criterion based on an approximation of the partition function (using the mean-field approximation). They express the BIC in terms of the partition functions of the conditional and marginal field (i.e. of the distribution of Z 1:L and of the distribution of Z 1:L given the observations X 1:L ). Recall that S(ψ) is the partition function for the Gibbs distribution of Z 1:L , and let us denote by S(X 1:L , θ) the partition function for the conditional field (i.e. distribution of Z 1:L given X 1:L ), i.e.

Approximation of the BIC based on the partition functions

S(X

1:L , θ) = z 1:L exp -H(z 1:L | X 1:L , θ)
where

H(z 1:L | X 1:L , θ) = H(z 1:L , ψ) - L l=1 log P θ (X l | z l ).
(1.7.10)

Then the likelihood can be written as follows in terms of the partition functions

P θ (X 1:L ) = P θ (X 1:L | Z 1:L )P θ (Z 1:L ) P θ (Z 1:L | X 1:L ) = P θ (X 1:L | Z 1:L ) exp(-H(Z 1:L , ψ)) exp(-H(Z 1:L | X 1:L , θ)) S(X 1:L , θ) S(ψ) = S(X 1:L , θ) S(ψ)
using the expression in (1.7.10). The BIC can then be expressed as

BIC = 2 log S(X 1:L , θ) -2 log S( ψ) -d log n,
where θ and ψ are the maximum likelihood estimators of θ and ψ respectively. The partition functions could then be approximated using Monte Carlo techniques (see for example [START_REF] Potamianos | Stochastic approximation algorithms for partition function estimation of Gibbs random fields[END_REF] for the approximation of the partition function, in a different context), but these methods can be slow. [START_REF] Forbes | Hidden Markov random field model selection criteria based on mean field-like approximations[END_REF] propose to use an approximation of the partition function based on the mean field approximation, and moreover to replace the unknown maximum likelihood estimators by the estimation θ of θ outputted by the simulated EM algorithm. Their approximation of the partition functions uses both facts that the mean field approximation is the minimiser of the Kullback-Leibler divergence from the true distribution, and the nonnegativity of this divergence. Indeed, the mean field approximation of the distribution of Z 1:L can be written as (see (1.7.4) and (1.7.5))

P MF ψ (Z 1:L ) = S MF (ψ) -1 exp(-H MF (Z 1:L , ψ))
with S MF (ψ) and H MF (Z 1:L , ψ) denoting respectively the partition function and energy function of the mean field approximation of the distribution of Z 1:L29 . Then, the positivity of the Kullback-Leibler divergence (from the true Gibbs distribution of Z 1:L to its mean field approximation) gives that

S(ψ) ≥ S MF (ψ) exp(E MF [H(Z 1:L , ψ) -H MF (Z 1:L , ψ)]).
(1.7.11)

Note that this inequality still holds for any other approximation of the distribution of the form P approx ψ (Z 1:L ) = S approx (ψ) -1 exp(-H approx (Z 1:L , ψ)) instead of the mean field one. However, as the mean field approximation is optimal in the sense of the Kullback-Leibler minimisation among the distributions factorising over locations, the lower bound in (1.7.11) is optimal among such approximations. They then define an approximation of the BIC, using this lower bound as an approximation for the partition function, both for the marginal and conditional fields (defining S MF (X 1:L , θ) and H MF (Z 1:L | X 1:L , θ) similarly as for the marginal field). This leads to the following BIC GBF criterion 30

BIC GBF =2 log S MF (X 1:L , θ) -2E MF H(Z 1:L | X 1:L , θ) -H MF (Z 1:L | X 1:L , θ) | X 1:L -2 log S MF ( ψ) + 2E MF H(Z 1:L , ψ) -H MF (Z 1:L , ψ) -d log n.
The authors show that this criterion is more satisfactory than the previously introduced approximation of the criterion BIC z1:L ( θ), both from a theoretical and empirical point of view.

Block Likelihood Information Criterion (BLIC) [START_REF] Stoehr | Hidden Gibbs random fields model selection using block likelihood information criterion[END_REF] introduced a selection criterion, the Block Likelihood Information Criterion (BLIC), approximating the BIC by replacing the intractable likelihood with a product distribution on independent blocks of the lattice, and using the method of [START_REF] Reeves | Efficient recursions for general factorisable models[END_REF] to obtain an exact computation of the normalising constant for small enough blocks. The approximation BIC z1:L ( θ) of the BIC and the PLIC introduced above can be seen as particular cases of the BLIC with locations as blocks. This criterion shows good results (compared to other criteria) for the choice of the number of classes on simulated data.

Space-evolving networks

We will focus in Chapter 3 on space-evolving networks, i.e. we assume that we observe a network at different locations and we want a global statistical analysis of these networks rather than considering them separately. This is motivated by the observation of ecological networks, i.e. the observation of the interactions between species in their environment. Edges in ecological networks can be of several types, such as predation, moutain aalakeaa Fig. 1.14 Location graph for a species. This graph depends on the geography and environment. We assume here that the species is not present at high altitude (on the mountain) and cannot cross the lake. parasitism, mutualism31 or commensalism32 . See for example [START_REF] Delmas | Analysing ecological networks of species interactions[END_REF] for more information on the analysis of ecological networks. Nonetheless, our model can be applied to different types of space-evolving networks, for example to the study of relations between different socio-economic classes at different geographical regions, or the collaboration of researchers from different domains in different universities.

In the model we consider, we model the correlation over space using a known graph over the locations (that we will call location graph). In such a graph, an edge exists when two locations are linked, meaning that the status of an individual (towards the interaction graph) at these two locations are correlated. For example, for the ecological application, this graph is based on the geography and environment, i.e. an edge exists between two locations if they are nearby and if there are no natural barrier between them that cannot be crossed by the species, such as mountains or rivers (see Figure 1.14). Note that we talk about space-evolving network, but this could apply to other types of dependencies between graphs, for example a dynamic graph including a seasonality effect, as in Figure 1.15. The field of application is then larger than space-evolving networks.

Contributions in the spatial SBM

In this work, we choose to consider a dependency based on Markov random fields for graphs observed at different locations. In short, we will assume that we observe the interaction graphs of n species at L locations. These n species are divided into Q (unobserved) classes, and for each species, its class membership will be distributed according to a Markov random field. At each location, we observe a binary interaction graph between the species, which is assumed to follow a SBM so that, conditional on the latent classes, the connections between the species are independent Bernoulli random variables with parameter depending on the classes of the two considered species. See Figure 1.16 for a representation of our model. The model is described in details in Chapter 3. In this chapter, we propose an algorithm based on the simulated EM of [START_REF] Celeux | EM procedures using mean field-like approximations for Markov model-based image segmentation[END_REF] (see Section 1.7.7) to estimate the parameters of our model (which are the parameters of the MRF and the connectivity parameters of the SBM), and prove the generic identifiability of these parameters under certain conditions. This algorithm involves an additional approximation to solve intractability issues due to the dependencies in the conditional distribution of the latent variables given the observations induced by the SBM. We illustrate our results through synthetic datasets.

A1 B1 C1 D1 A2 B2 C2 D2 A3 B3 C3
Let us recall that generic identifiability means that the nonidentifiable parameters form a set of Lebesgue measure zero. We do not specify the form of the subspace of non identifiable parameters in this work, and it is important to keep in mind that when we impose a constraint on the parameter reducing the parameter space to a subspace of smaller dimension 33 , parameter identifiability is no longer guaranteed. ), the dotted edges between layers represent the connection between species at that location. On the right are the observed interaction graphs between the 3 species at each of the four locations. Note that the representation on the right only contains the interactions graphs at each location, and not the space dependency between these locations. The Q classes are represented by colors on the nodes (green and purple).

Chapter 2

Consistency of the maximum likelihood and variational estimators in a dynamic stochastic block model

Introduction

Random graphs are a suitable tool to model and describe interactions in many kinds of datasets such as biological, ecological, social or transport networks. Here we are interested in time-evolving networks, which is a powerful tool for modeling real-world phenomena, where the role or behaviour of the nodes in the network and the relationships between them are allowed to change over time. Indeed, it is important to take into account the evolutionary behaviour of the graphs, instead of just studying separate snapshots as static graphs. We focus on graphs evolving in discrete time and refer to [START_REF] Holme | Modern temporal network theory: a colloquium[END_REF] for an introduction to dynamic networks. A myriad of dynamic graph models has been introduced in the past few years, see for instance Zhang et al. (2017a). We focus here on those which are based on the (static) stochastic block model (SBM, Holland et al., 1983) in which the nodes are partitioned into classes. In the SBM, class memberships of the nodes are represented by latent variables and the connection between two nodes is drawn from a distribution depending on the classes of these two nodes (a Bernoulli distribution in the case of binary graphs). A first dynamic version of the SBM with discrete time is proposed in [START_REF] Yang | Detecting communities and their evolutions in dynamic social networks-a Bayesian approach[END_REF]. There, the nodes are partitioned into Q classes and the graphs are binary or weighted. The nodes are allowed to change membership over time, and these changes are governed by independent Markov chains with values in the Q classes, while the connection probabilities are constant over time. [START_REF] Xu | Dynamic stochastic blockmodels for time-evolving social networks[END_REF] introduce a state-space model on the logit of the connection probabilities for dynamic (binary) networks with connection probabilities and group memberships varying over time. Unfortunately, their model presents parameter identifiability issues [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF]. [START_REF] Xu | Stochastic block transition models for dynamic networks[END_REF] proposes a stochastic block transition model in which the presence or absence of an edge between two nodes at a particular time affects the presence or absence of such an edge at a future time. There, the nodes can change classes over time, new nodes can enter the network, and the connection probabilities are allowed to vary over time. The model in [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF] and in [START_REF] Becker | Nonparametric identification in the dynamic stochastic block model[END_REF] is quite similar to that of [START_REF] Yang | Detecting communities and their evolutions in dynamic social networks-a Bayesian approach[END_REF] except that it allows the connection probabilities to vary and the latter is moreover nonparametric. [START_REF] Bartolucci | Dealing with reciprocity in dynamic stochastic block models[END_REF] extend the model of [START_REF] Yang | Detecting communities and their evolutions in dynamic social networks-a Bayesian approach[END_REF] to deal with different forms of reciprocity in directed graphs, by directly modeling dyadic relations and with the assumption that the dyads are conditionally independent given the latent variables. [START_REF] Paul | Consistent community detection in multi-relational data through restricted multi-layer stochastic blockmodel[END_REF] and [START_REF] Han | Consistent estimation of dynamic and multi-layer block models[END_REF] study multi-graph SBM, arising in settings including dynamic networks and multi-layer networks where each layer corresponds to a type of edge. In these two models, the nodes memberships stay constant over the layers. Pensky (2019); Pensky et al. ( 2019) study a dynamic SBM for undirected and binary edges where both connection probabilities and group memberships vary over time, assuming that the connection probabilities between groups are a smooth function of time. [START_REF] Xing | A state-space mixed membership blockmodel for dynamic network tomography[END_REF] and [START_REF] Ho | Evolving cluster mixed-membership blockmodel for time-varying networks[END_REF] introduce dynamic versions of the mixed-membership stochastic block model, allowing each actor to carry out different roles when interacting with different peers. [START_REF] Zreik | The dynamic random subgraph model for the clustering of evolving networks[END_REF] introduce the dynamic random subgraph model, given a known decomposition of the graph into subgraphs, in which the latent class membership depends on the subgraph membership and the edges are categorical variables, their types being sampled from a distribution depending on the latent classes of the two nodes. There, a state-space model is used to characterize the temporal evolution of the latent classes proportions.

As far as estimation is concerned, different methods of inference are proposed to estimate groups and model parameters. The maximum likelihood estimator (MLE) is not tractable in the SBM, thus neither in its dynamic versions. Variational methods are rather popular to approximate that MLE [START_REF] Xing | A state-space mixed membership blockmodel for dynamic network tomography[END_REF][START_REF] Ho | Evolving cluster mixed-membership blockmodel for time-varying networks[END_REF][START_REF] Han | Consistent estimation of dynamic and multi-layer block models[END_REF][START_REF] Paul | Consistent community detection in multi-relational data through restricted multi-layer stochastic blockmodel[END_REF][START_REF] Zreik | The dynamic random subgraph model for the clustering of evolving networks[END_REF][START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF][START_REF] Bartolucci | Dealing with reciprocity in dynamic stochastic block models[END_REF]. [START_REF] Yang | Detecting communities and their evolutions in dynamic social networks-a Bayesian approach[END_REF] rely on Gibbs sampling and simulated annealing. [START_REF] Pensky | Spectral clustering in the dynamic stochastic block model[END_REF] propose an estimator of the connection probabilities matrix at each time step by a discrete kernel-type method and obtain a clustering of the nodes thanks to spectral clustering on this estimated matrix. They also give an estimator for the number of clusters. Spectral clustering algorithms are also used by [START_REF] Han | Consistent estimation of dynamic and multi-layer block models[END_REF] on the mean graph over time and by [START_REF] Liu | Global spectral clustering in dynamic networks[END_REF] who use eigenvector smoothing to get some similarity across time periods (and allow the number of classes to be unknown and possibly varying over time).

Some theoretical results on the convergence of the procedures have been proven, mainly for static graphs. In the static SBM, [START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF] prove the consistency of the MLE and variational estimates as the number of nodes increases1 , and [START_REF] Bickel | Asymptotic normality of maximum likelihood and its variational approximation for stochastic blockmodels[END_REF] establish their asymptotic normality. [START_REF] Mariadassou | Convergence of the groups posterior distribution in latent or stochastic block models[END_REF] have a different approach and give sufficient conditions for the groups posterior distribution to converge to a Dirac mass located at the actual groups configuration, for every parameter in a neighborhood of the true one. [START_REF] Rohe | Spectral clustering and the high-dimensional stochastic blockmodel[END_REF] give asymptotic results on the normalized graph Laplacian and its eigenvectors for the spectral clustering algorithm, allowing the number of clusters to grow with the number of nodes. They also provide bounds on the number of misclustered nodes, requiring an assumption on the degree distribution. [START_REF] Lei | Consistency of spectral clustering in stochastic block models[END_REF] prove consistency for the recovery of communities in the spectral clustering on the adjacency matrix, with milder conditions on the degrees, and also extend this result to degree corrected stochastic block models. [START_REF] Klopp | Oracle inequalities for network models and sparse graphon estimation[END_REF] derive oracle inequalities for the connection probabilities estimator and obtain minimax estimation rates, including the sparse case where the density of edges converges to zero as the number of nodes increase thus extending previous results of [START_REF] Gao | Rate-optimal graphon estimation[END_REF]. [START_REF] Gaucher | Maximum likelihood estimation of sparse networks with missing observations[END_REF] propose a bound on the risk of the maximum likelihood estimator of network connection probabilities, and show that it is minimax optimal in the sparse graphon model.

In the dynamic setting, fewer theoretical results have been established. Pensky (2019) derives a penalized least squares estimator of the connection probabilities adaptive to the number of blocks and which does not require knowledge of the number of classes Q. She shows that it satisfies an oracle inequality. Under the additional assumption that at most n 0 nodes change groups between two time steps, this estimator attains minimax lower bounds for the risk. She also introduces a dynamic graphon model and shows that the estimators (that do not require knowledge of a degree of smoothness of the graphon function) are minimax optimal within a logarithmic factor of the number of time steps. Based on the same dynamic SBM with at most n 0 nodes changing groups between two time steps, [START_REF] Pensky | Spectral clustering in the dynamic stochastic block model[END_REF] give an upper bound for the (non asymptotic) error of their estimators of the connection probabilities matrix and group memberships (and also an estimator for the number of clusters). [START_REF] Han | Consistent estimation of dynamic and multi-layer block models[END_REF] show consistency (as the number of time steps increases but the number of nodes is fixed) of two estimators of the class memberships for dynamic SBM (and more generally multi-graph SBM) in which the nodes memberships are constant over time but the connection probabilities are allowed to vary and the considered graphs are binary and symmetric. They show that the spectral clustering (on the mean graph over time) estimator of the class memberships is consistent under some stationarity and ergodicity conditions on the connection probabilities. They also prove that the MLE of the class memberships is consistent (i.e. that the fraction of misclustered nodes converges to 0) in the general case (without any structure on the connection probabilities), provided certain sufficient conditions are satisfied. In their multi-layer model, [START_REF] Paul | Consistent community detection in multi-relational data through restricted multi-layer stochastic blockmodel[END_REF] give minimax rates of misclassification under certain conditions on the growth of the types of relations, number of nodes and number of classes, extending the result of [START_REF] Han | Consistent estimation of dynamic and multi-layer block models[END_REF].

Here, we consider a dynamic version of the binary SBM as in [START_REF] Yang | Detecting communities and their evolutions in dynamic social networks-a Bayesian approach[END_REF], where each node is allowed to change group membership at each time step according to a Markov chain, independently of other nodes. We prove the consistency of the connectivity parameter MLE and, under some additional conditions, of the transition matrix MLE, when the number of nodes and of time steps are increasing. We also give upper bounds on the rates of convergence of these estimators. While these upper bounds are known to be non optimal in the static case where asymptotic normality is obtained with classical parametric rates of convergence [START_REF] Bickel | Asymptotic normality of maximum likelihood and its variational approximation for stochastic blockmodels[END_REF], these are the first to be established in a dynamic setting for the MLE. As already mentioned, the log-likelihood is intractable (except for very small values of the number of nodes n and the number of time steps T ), as it requires to sum over Q nT terms. Thus, while its consistency remains an important result, the estimator cannot be computed. A possible alternative is to rely on a variational estimator to approximate the MLE (see for instance [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF]. We also establish the consistency of the variational estimator of the connectivity parameter and under some additional assumptions, that of the variational estimator of the transition matrix and obtain the same upper bounds on the rates of convergence as for the MLE. In the particular case where the number of time steps T is fixed, we also consider the model of [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF], in which the connection probabilities are allowed to vary over time and generalise these results with only the number of nodes increasing. When T = 1, we not only recover the results of [START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF] but extend these by giving rates of convergence. Unlike the model studied in [START_REF] Han | Consistent estimation of dynamic and multi-layer block models[END_REF] and [START_REF] Paul | Consistent community detection in multi-relational data through restricted multi-layer stochastic blockmodel[END_REF], the node memberships in our model evolve over time. Our context is different from [START_REF] Pensky | Dynamic network models and graphon estimation[END_REF] that focuses on least squares estimate. This article is organized as follows. Section 2.2 introduces our model and notation. More precisely, Section 2.2.1 describes the dynamic stochastic block model as introduced in Yang et al. ( 2011), Section 2.2.2 gives the assumptions we make on the model parameters, Section 2.2.3 describes the dynamic stochastic block model as in [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF] for the finite time case and Section 2.2.4 states the expression of the likelihood of this model to define the MLE. Section 2.3 establishes the consistency and upper bounds of the rates of convergence for the MLE of the connection probabilities in Section 2.3.1 and of the transition matrix in Section 2.3.2. Section 2.4 is dedicated to variational estimators: Section 2.4.1 and 2.4.2 establish the consistency of the variational estimators of the connection probabilities and transition matrix, respectively, along with upper bounds of the associated rates of convergence. All the proofs of the main results are postponed to Section 2.5, except those for the fixed T case that are in Appendix A.1, while the more technical proofs are deferred to Appendix A.2.

Model and notation

Dynamic stochastic block model

We consider a set of n vertices, forming a sequence of binary undirected graphs with no self-loops at each time t = 1, . . . , T . The case of a set of directed graphs, with or without self-loops, may be handled similarly. These vertices are assumed to be split into Q latent classes, and we denote by Z t i the label of the i-th vertex at time t. Letting Z i = (Z 1 i , . . . , Z T i ), we assume that the {Z i } 1≤i≤n are independent and identically distributed (iid) and each Z i is a homogeneous and stationary Markov chain with transition probabilities

P(Z t+1 i = l | Z t i = q) = γ ql , ∀1 ≤ q, l ≤ Q
where Γ = (γ ql ) 1≤q,l≤Q is a stochastic matrix, i.e. with nonnegative coefficients and with each row summing to one. We let α = (α 1 , . . . , α Q ) the stationary distribution of the Markov chain. For any i ∈ 1, n , the probability distribution of Z i is then

P θ (Z i ) = α Z 1 i T -1 t=1 γ Z t i Z t+1 i .
We will also denote Z t = (Z t 1 , . . . , Z t n ) and Z 1:T = (Z 1 , . . . , Z T ) = (Z t i ) 1≤t≤T,1≤i≤n .

Consider X t = {X t ij } 1≤i,j≤n the symmetric binary adjacency matrix of the graph at time t such that for every nodes 1 ≤ i, j ≤ n, we have X t ii = 0 and X t ij = X t ji . Each X t follows a stochastic block model so that, conditional on the latent groups {Z t i } 1≤i≤n , the {X t ij } 1≤i,j≤n are independent Bernoulli random variables

X t ij | Z t i = q, Z t j = l ∼ B(π ql )
where (π ql ) 1≤q,l≤Q ∈ [0, 1] Q 2 are the connectivity parameters. More precisely, conditional on the whole sequence of latent groups {Z t i } 1≤t≤T,1≤i≤n , the graphs X 1:T = X 1 , . . . , X T are assumed to be independent, each X t having a distribution depending only on

{Z t i } 1≤i≤n .
The model is thus parameterized by θ = (Γ, π), with Γ = (γ ql ) 1≤q,l≤Q and π = (π ql ) 1≤q,l≤Q . Note that π is a symmetric matrix in the undirected setup. We denote by P θ (resp. E θ ) the probability distribution (resp. expectation) of all the random variables {Z t i , X t ij } t≥1;i,j≥1 , under the parameter value θ. In the following, we assume that we observe {X t ij } 1≤i,j,≤n, 1≤t≤T and we denote by θ * = (Γ * , π * ) = ((γ * ql ) 1≤q,l≤Q , (π * ql ) 1≤q,l≤Q ) the true parameter value, with corresponding probability distribution P θ * and expectation E θ * , and by α * = (α * q ) 1≤q≤Q the (true) stationary distribution corresponding to the transition matrix Γ * . We also let 1 A denote the indicator function of the set A and A c the complementary set of A in the ambient set. For any integer M ≥ 1, the set 1, M is the set of integers between 1 and M . For any finite set A, let |A| denote its cardinality. For any configuration z 1:T , we denote N q (z t ) (resp. N ql (z 1:T )) the number of nodes assigned to class q by the configuration z t (resp. the number of transitions from class q to class l in configuration z 1:T ), that is

N q (z t ) = |{i ∈ 1, n ; z t i = q}| and N ql (z 1:T ) = T -1 t=1 n i=1 1 z t i =q,z t+1 i =l .
(2.2.1)

We also define for any two parameters θ = (Γ, π) and θ ′ = (Γ ′ , π ′ ) the following distances

∥π -π ′ ∥ ∞ = max 1≤q,l≤Q |π ql -π ′ ql | and ∥Γ -Γ ′ ∥ ∞ = max 1≤q,l≤Q |γ ql -γ ′ ql |.

Assumptions

The assumptions we make on the model parameters are the following.

1. For every 1 ≤ q ̸ = q ′ ≤ Q, there exists some l ∈ 1, Q such that π ql ̸ = π q ′ l .

2. There exists some 0 < δ < 1/Q such that for any (q, l) ∈ 1, Q 2 , we have

γ ql ∈ [δ, 1 -δ].
3. There exists some ζ > 0 such that for any (q, l) ∈ 1, Q 2 , we have

π ql ∈ [ζ, 1 -ζ].
Assumption 1 is necessary for identifiability of the model. Indeed, if it does not hold, we cannot distinguish between classes q and q ′ . Assumption 2 ensures that each Markov chain Z i is irreducible, aperiodic and recurrent. This assumption could be weakened at the cost of technicalities. In particular, it implies that the stationary distribution α exists. Moreover, Assumption 2 also implies that for any q ∈ 1, Q , we have α q ∈ [δ, 1 -δ]. Note that this can be seen as an equivalent of Assumption 2 in [START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF] (on the probability distribution of the class memberships) in the dynamic case. [START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF] however also have an additional assumption that is an empirical version of this assumption (which states that the observed class proportions are bounded away from 0) that is true with high probability. We do not make such an assumption and use the fact that the probability of this event converges to 1. Assumption 3 is technical and could also be weakened with additional technicalities. For example, Celisse et al. ( 2012) also consider the case π ql ∈ {0, 1} (i.e. π ql ∈ {0, 1} ∪ [ζ, 1 -ζ]) whereas we do not. The whole parameter set defined by these constraints is denoted by Θ. In the following, we assume that θ * ∈ Θ.

In what follows, we work up to label permutation on the groups. Indeed, as in any latent group model, the parameters can only be recovered up to label switching on the latent groups. We then define the following notation for any permutation σ ∈ S Q with S Q the set of permutations on 1, Q θ σ = (Γ σ , π σ ) = (γ σ(q)σ(l) ) 1≤q,l≤Q , (π σ(q)σ(l) ) 1≤q,l≤Q .

Finite time case

If the number of time steps T is fixed, it is possible to let the connection probabilities vary over time. We then consider this case, the connection parameter now being π 1:T = (π 1 , . . . , π T ) with π t = (π t ql ) 1≤q,l≤Q for every t ∈ 1, T and

π t ql = P θ (X t ij = 1 | Z t i = q, Z t j = l) for any (t, q, l) ∈ 1, T × 1, Q 2 .
Note that this is the more general model of [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF], in which the model parameter is θ = (Γ, π 1:T ). Moreover, we introduce the following Assumptions 1' and 3' that are alternate versions of Assumptions 1 and 3 respectively for the finite time case. 1'. For every t ∈ 1, T , for every 1 ≤ q ̸ = q ′ ≤ Q, there exists some l ∈ 1, Q such that π t ql ̸ = π t q ′ l .

3'. There exists some ζ > 0 such that for every t ∈ 1, T , for any (q, l) ∈ 1, Q 2 , we have

π t ql ∈ [ζ, 1 -ζ].
Assumption 1' (resp. Assumption 3') expresses that for every t ∈ 1, T , π t satisfies Assumption 1 (resp. Assumption 3). We also introduce the following additional assumption, which ensures (together with Assumption 1') that the model is identifiable (up to a label permutation). See [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF].

4. For every q ∈ 1, Q , for every t 1 , t 2 ∈ 1, T , π t 1 qq = π t 2 qq := π qq and {π qq ; q ∈ 1, Q } are Q distinct values.

Assumption 4 states that the diagonal of π does not change over time, and that its values are distinct. We denote by Θ T the set of parameters satisfying Assumptions 1', 2, 3' and 4. As before, we assume in the following that θ * ∈ Θ T in the fixed T case. We also define as before for any π 1:T and π ′1:T the distance

∥π 1:T -π ′1:T ∥ ∞ = max (q,l,t)∈ 1,Q 2 × 1,T |π t ql -π ′t ql |.

Likelihood

The conditional log-likelihood and the log-likelihood write

ℓ c (θ; Z 1:T ) = log P θ (X 1:T | Z 1:T ) = T t=1 log P θ (X t | Z t ) = T t=1 1≤i<j≤n X t ij log π Z t i Z t j + (1 -X t ij ) log(1 -π Z t i Z t j )
and ℓ(θ) = log P θ (X 1:T ) = log

  z 1:T ∈ 1,Q nT e ℓc(θ;z 1:T ) P θ (Z 1:T = z 1:T )   , (2.2.2)
respectively. We then denote the maximum likelihood estimator (MLE) by θ = ( Γ, π) = arg max θ∈Θ ℓ(θ).

In the next section, we study separately the consistency of the connectivity parameter estimator π and that of the transition matrix estimator Γ.

Consistency of the maximum likelihood estimator 2.3.1 Connectivity parameter

We first prove the consistency of the maximum likelihood estimator of the connectivity parameter π = (π ql ) 1≤q,l≤Q when the number of nodes and time steps increase. We denote the normalized log-likelihood by

M n,T (Γ, π) = 2 n(n -1)T ℓ(θ) = 2 n(n -1)T log P θ (X 1:T )
and introduce the quantities, for any A = (a ql ) 1≤q,l≤Q ∈ A the set of

Q × Q stochastic matrices, M(π, A) = 1≤q,l≤Q α * q α * l 1≤q ′ ,l ′ ≤Q a qq ′ a ll ′ [π * ql log π q ′ l ′ + (1 -π * ql ) log(1 -π q ′ l ′ )]
and

M(π) = sup A∈A M(π, A) = M(π, Āπ ), (2.3.1)
where Āπ = arg max A∈A M(π, A). It is worth noticing that M(π), which will be the limiting value for M n,T (Γ, π) when n and T increase (see below), does not depend on Γ.

Theorem 2.3.1. For any sequence {r n,T } n,T ≥1 increasing to infinity, if log(T ) = o(n), we have for all ϵ > 0

P θ * sup (Γ,π)∈Θ |M n,T (Γ, π) -M(π)| > ϵr n,T √ n -----→ n,T →+∞ 0.
We then conclude on the consistency of the maximum likelihood estimator of the connection probabilities with the following corollary. Note that we also obtain an upper bound of the rate of convergence of this estimator.

Corollary 2.3.1. For any sequence {r n,T } n,T ≥1 increasing to infinity such that r n,T = o(n 1/4 ) and if log(T ) = o(n), we have for every ϵ > 0

P θ * min σ∈S Q ∥π * -πσ ∥ ∞ > ϵr n,T n 1/4 ----→ n,T →∞ 0.
We want to get equivalent consistency results if the number of time steps T is fixed and only the number of nodes n increases. In that case, denoting by θ = ( Γ, π1:T ) the MLE of θ, we have the following Corollary that is the equivalent of Corollary 2.3.1.

Corollary 2.3.2. If the number of time steps

T is fixed, we have for every ϵ > 0 and for any sequence {r n } n≥1 increasing to infinity such that r n = o(n 1/4 )

P θ * min σ∈S Q ∥π * 1:T -π1:T σ ∥ ∞ > ϵr n n 1/4 ---→ n→∞ 0, denoting π1:T σ = (π t σ ) t∈ 1,T .
This result states that min σ∈S Q ∥π * 1:T -π1:T σ ∥ ∞ converges to 0 in P θ * -probability as n increases, i.e. the MLE of the connection probabilities is consistent up to label switching, and gives an upper bound of the rate of convergence of the MLE of the connection probabilities. The particular case when T = 1 is then a stronger result than that of [START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF] where no rate of convergence is given.

Remark 2.3.1. Note that in Corollaries 2.3.1 and 2.3.2, the results still hold for any sequences r n,T and r n increasing to infinity, respectively. However, we are interested in sequences increasing slowly to infinity, giving the strongest results, namely the smallest lower bounds. Indeed, whenever these assumptions are not satisfied, the lower bounds appearing in the inequalities are larger, and the results may even become trivial.

Latent transition matrix

We now prove that the MLE for the transition matrix Γ is consistent when the number of nodes and time steps increase.

Lemma 2.3.1. Any critical point θ = ( Γ, π) of the likelihood function ℓ(•) is such that Γ

satisfies the fixed point equation

∀(q, l) ∈ 1, Q 2 , γql = T -1 t=1 n i=1 P θ Z t i = q, Z t+1 i = l | X 1:T T -1 t=1 n i=1 P θ (Z t i = q | X 1:T ) . ( 2

.3.2)

There are two different possible cases for the MLE θ

• Either θ is a critical point of the likelihood function. Then Γ satisfies equation (2.3.2).

• Or θ is not a critical point (this can happen if it belongs to the boundary of Θ) and we assume that there exists Γ such that ( Γ, π) ∈ Θ and ( Γ, π) satisfies equation (2.3.2) (at least for n and T large enough). We then choose as our estimator ( Γ, π). By an abuse of notation, we will denote this estimator θ = ( Γ, π) and call it MLE in the following.

In what follows, for any fixed configuration z 1:T , any θ ∈ Θ and any ϵ > 0, we consider the event

E(z 1:T , θ, ϵ) := P θ (Z 1:T ̸ = z 1:T | X 1:T ) P θ (Z 1:T = z 1:T | X 1:T ) > ϵ .
The following result establishes that asymptotically, any estimator that correctly estimates the transition probability matrix π also recovers the group memberships. This result is similar to Theorem 1 in [START_REF] Mariadassou | Convergence of the groups posterior distribution in latent or stochastic block models[END_REF].

Theorem 2.3.2. For any estimator θ ∈ Θ (at least for n and T large enough), if log(T ) = o(n), there exist some positive constants C, C 1 , C 2 , C 3 , C 4 such that for any ϵ > 0, for any positive sequence {y n,T } n,T ≥1 such that log(1/y n,T ) = o(n), any η ∈ (0, δ) and for n and T large enough, we have

P θ * E(Z 1:T , θ, ϵy n,T ) ≤QT exp(-2η 2 n) + P θ * (∥π -π * ∥ ∞ > v n,T ) + CnT    exp   -(δ -η) 2 C 1 n + C 2 log(nT ) -C 4 log(ϵy n,T )   + exp   -C 3 (log(nT )) 2 nv 2 n,T + 3n log(nT )      ,
whenever {v n,T } n,T ≥1 is a sequence decreasing to 0 such that v n,T = o( log(nT )/n).

Theorem 2.3.3. If log(T ) = o(n), for any ϵ > 0 and {r n,T } n,T ≥1 any sequence increasing to infinity such that r n,T = o nT / log n , we have for any σ ∈ S Q

P θ * ∥ Γσ -Γ * ∥ ∞ > ϵr n,T √ log n √ nT ≤ Q 2 (3Q + 1)P θ * (∥π σ -π * ∥ ∞ > v n,T ) + o(1)
with {v n,T } n,T ≥1 a sequence decreasing to 0 such that v n,T = o( log(nT )/n).

Corollary 2.3.3. Assume that log(T ) = o(n) and min σ∈S

Q ∥π σ -π * ∥ ∞ = o P θ * (v n,T ) with {v n,T } n,T ≥1 a sequence decreasing to 0 such that v n,T = o( log(nT )/n).
Then for any ϵ > 0 and {r n,T } n,T ≥1 any sequence increasing to infinity such that r n,T = o nT / log n , we have the convergence

P θ * min σ∈S Q ∥ Γσ -Γ * ∥ ∞ > ϵr n,T √ log n √ nT ----→ n,T →∞ 0.
Remark 2.3.2. Note that the upper bound obtained in Corollary 2.3.1 on the rate of convergence in probability of π does not ensure that min

σ∈S Q ∥π σ -π * ∥ ∞ = o P θ * (v n,T )
holds. While the latter has never been established (to our knowledge), it is a reasonable assumption2 .

We want an equivalent result than that of Corollary 2.3.3 when the number of time steps T is fixed, and the connection probabilities are varying over time (the connection parameter being π = π 1:T = (π 1 , . . . , π T ) with π t = (π t ql ) q,l ). For that, we are going to need an equivalent of Theorem 2.3.2 in that case.

Theorem 2.3.4. For any fixed T ≥ 2, for any estimator θ ∈ Θ T (at least for n large enough), there exist some positive constants C, C 1 , C 2 , C 3 , C 4 such that for any ϵ > 0, for any positive sequence {y n } n≥1 such that log(1/y n ) = o(n), any η ∈ (0, δ) and for n large enough, we have

P θ * E(Z 1:T , θ, ϵy n ) ≤QT exp(-2η 2 n) + P θ * ∥π 1:T -π * 1:T ∥ ∞ > v n + CnT    exp   -(δ -η) 2 C 1 n + C 2 log(nT ) -C 4 log(ϵy n )   + exp   -C 3 (log(nT )) 2 nv 2 n + 5n log(nT )      , whenever {v n } n≥1 is a sequence decreasing to 0 such that v n = o( log(n)/n).
The following corollary gives the expected result.

Corollary 2.3.4. Let the number of time steps T ≥ 2 be fixed. We assume that

min σ∈S Q ∥π 1:T σ -π * 1:T ∥ ∞ = o P θ * (v n ) with {v n } n≥1 a sequence decreasing to 0 such that v n = o( log(n)/n).
Then for any ϵ > 0 and {r n } n≥1 any sequence increasing to infinity such that r n = o n/ log n , we have the convergence

P θ * min σ∈S Q ∥ Γσ -Γ * ∥ ∞ > ϵr n √ log n √ n ---→ n→∞ 0.
The proof of Corollary 2.3.4 is the same as that of Corollary 2.3.3, but relying on Theorem 2.3.4 instead of Theorem 2.3.2 and is therefore omitted.

Remark 2.3.3. As in Remark 2.3.1 for Corollaries 2.3.1 and 2.3.2, the results of Corollaries 2.3.3 and 2.3.4 still hold for sequences r n,T and r n increasing to infinity at any rate.

Variational estimators

In practice, we cannot compute the MLE except for very small values of n and T , because it involves a summation over all the Q nT possible latent configurations. We cannot either use the Expectation-Maximization (EM) algorithm to approximate it because it involves the computation of the conditional distribution of the latent variables given the observations which is not tractable. A common solution is to use the Variational Expectation-Maximization (VEM) algorithm that optimizes a lower bound of the loglikelihood (see for example [START_REF] Daudin | A mixture model for random graphs[END_REF]). Let us denote Z t iq = 1 Z t i =q for every t, i and q. Using the same approach as in [START_REF] Matias | Statistical clustering of temporal networks through a dynamic stochastic block model[END_REF] for the VEM algorithm in the dynamic SBM, we consider a variational approximation of the conditional distribution of the latent variable Z 1:T given the observed variable X 1:T in the class of probability distributions parameterized by χ = (τ, η) = {τ t iq } t,i,q , {η t iql } t,i,q,l of the form

Q χ (Z 1:T ) = n i=1 Q χ (Z 1 i ) T t=2 Q χ (Z t i | Z t-1 i ) = n i=1      Q q=1 (τ 1 iq ) Z 1 iq   T -1 t=1 1≤q,l≤Q η t iql τ t iq Z t iq Z t+1 il    , i.e. with Q χ such that E Qχ Z t iq Z t+1 il = η t iql and E Qχ Z t iq = τ t iq . Notice that Q χ (Z t+1 i = l | Z t i = q) = η t iql /τ t iq = η t iql / Q q ′ =1 η t iqq ′ .
The quantity to optimize in the VEM algorithm is then

J (χ, θ) = ℓ(θ) -KL(Q χ , P θ (•|X 1:T )) = E Qχ log P θ (X 1:T , Z 1:T ) + H(Q χ )
with KL(•, •) denoting the Kullback-Leibler divergence and H(•) denoting the entropy. Define χ(θ) = (τ (θ), η(θ)) = arg max

χ∈[0,1] T 2 n 2 Q 3 J (χ, θ),
and the variational estimator of θ

θ = ( Γ, π) = arg max θ∈Θ J ( χ(θ), θ).
Moreover, we denote χ = (τ , η) = χ( θ) = (τ ( θ), η( θ)). In practice, the VEM algorithm is an iterative algorithm that maximizes the function J alternatively with respect to χ and θ in order to find θ.

Connectivity parameter

Theorem 2.4.1. For any sequence {r n,T } n,T ≥1 increasing to infinity, if log(T ) = o(n), we have for all ϵ > 0

P θ * sup θ∈Θ 2 n(n -1)T J ( χ(θ), θ) -M(π) > ϵr n,T √ n -→ n,T →+∞ 0.
We conclude on the consistency of the connection probabilities variational estimators as n and T increase thanks to the following corollary.

Corollary 2.4.1. For any sequence {r n,T } n,T ≥1 increasing to infinity such that r n,T = o(n 1/4 ), we have for any ϵ > 0

1 2 P θ * min σ∈S Q ∥π σ -π * ∥ ∞ > ϵr n,T n 1/4 ----→ n,T →∞ 0.
We have the equivalent following corollary for a fixed number of time steps.

Corollary 2.4.2. If the number of time steps T is fixed, we have for every ϵ > 0 and for any sequence {r n } n≥1 increasing to infinity such that r n = o(n 1/4 )

1 2 P θ * min σ∈S Q ∥π 1:T σ -π * 1:T ∥ ∞ > ϵr n n 1/4 ---→ n→∞ 0.
Remark 2.4.1. As for Corollaries 2.3.1 to 2.3.4, the results of Corollaries 2.4.1 and 2.4.2 still hold for any sequences r n,T and r n increasing to infinity.

Latent transition matrix

We now prove that Γ is consistent when the number of nodes and time steps increase.

Lemma 2.4.1. Any critical point ( χ, θ) of the function J (•, •) is such that Γ satisfies the fixed-point equation

∀(q, l) ∈ 1, Q 2 , γql = n i=1 T -1 t=1 ηt iql n i=1 T -1 t=1 τ t iq .
(2.4.1)

We assume that ( χ, θ) is a critical point of J (•, •). Then we have the fixed-point equation

∀(q, l) ∈ 1, Q 2 , γql = n i=1 T -1 t=1 ηt iql ( θ) n i=1 T -1 t=1 τ t iq ( θ)
.

(2.4.2)

The following theorem gives the consistency and a rate of convergence of this estimator, under an assumption on the rate of convergence of π.

Theorem 2.4.2. If log(T ) = o(n), for any ϵ > 0 and {r n,T } n,T ≥1 any sequence increasing to infinity such that r n,T = o nT / log n and for any σ ∈ S Q

P θ * ∥ Γσ -Γ * ∥ ∞ > ϵr n,T √ log n √ nT ≤ 2Q 2 (3Q + 1)P θ * (∥π σ -π * ∥ ∞ > v n,T ) + o(1)
with {v n,T } n,T ≥1 a sequence decreasing to 0 such that v n,T = o( log(nT )/n).

Corollary 2.4.3. Assume that log(T ) = o(n) and

min σ∈S Q ∥π σ -π * ∥ ∞ = o P θ * (v n,T ) with {v n,T } n,T ≥1 a sequence decreasing to 0 such that v n,T = o( log(nT )/n).
Then for any ϵ > 0 and {r n,T } n,T ≥1 any sequence increasing to infinity such that r n,T = o nT / log n , we have the convergence

P θ * min σ∈S Q ∥ Γσ -Γ * ∥ ∞ > ϵr n,T √ log n √ nT ----→ n,T →∞ 0.
The proof of Corollary 2.4.3 is the same as that of Corollary 2.3.3, using Theorem 2.4.2 instead of Theorem 2.3.3 and is therefore omitted.

When the number of time steps T is fixed and the connection probabilities can vary over time, we have the following Corollary that is the equivalent of Corollary 2.4.3.

Corollary 2.4.4. Let the number of time steps T ≥ 2 be fixed. We assume that

min σ∈S Q ∥π 1:T σ -π * 1:T ∥ ∞ = o P θ * (v n ) with {v n } n≥1 a sequence decreasing to 0 such that v n = o( log(n)/n).
Then for any ϵ > 0 and {r n } n≥1 any sequence increasing to infinity such that r n = o n/ log n , we have the convergence

P θ * min σ∈S Q ∥ Γσ -Γ * ∥ ∞ > ϵr n √ log n √ n ---→ n→∞ 0.
The proof of Corollary 2.4.4 is the same as that of Corollary 2.4.3, but relying on Theorem 2.3.4 instead of Theorem 2.3.2 and is therefore omitted.

Remark 2.4.2. As for Corollaries 2.3.1 to 2.4.2, the results of Corollaries 2.4.3 and 2.4.4 still hold for any sequences r n,T and r n increasing to infinity.

Proofs of main results

Proof of Theorem 2.3.1

The proof follows the lines of the proof of Theorem 3.6 in [START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF]. Nonetheless, our result is sharper as we establish an upper bound of the rate of convergence (in probability) of the normalised likelihood. We fix some θ ∈ Θ and introduce the quantities ẑ1:T = arg max

z 1:T ∈ 1,Q nT log P θ (X 1:T | Z 1:T = z 1:T ),
(2.5.1) Z1:T = arg max

z 1:T ∈ 1,Q nT E θ * log P θ (X 1:T | Z 1:T = z 1:T ) Z 1:T . (2.5.2)
Note that Z1:T is a random variable that depends on Z 1:T and that ẑ1:T = arg max

z 1:T ∈ 1,Q nT T t=1 log P θ (X t | Z t = z t ) = arg max z∈ 1,Q n log P θ (X 1 | Z 1 = z), . . . , arg max z∈ 1,Q n log P θ (X T | Z T = z) .
(2.5.3)

Similarly, for any t ∈ 1, T , we have Zt = arg max z∈ 1,

Q n E θ * [log P θ (X t | Z t = z) | Z t ].
We bound the difference between M n,T (Γ, π) and M(π) by introducing three intermediate terms so that we can write, for any sequence {r n,T } n,T ≥1 and any ϵ > 0

P θ * sup θ∈Θ |M n,T (Γ, π) -M(π)| > ϵr n,T √ n ≤P θ * sup θ∈Θ 2 n(n -1)T log P θ (X 1:T ) - 2 n(n -1)T log P θ (X 1:T | Z 1:T = ẑ1:T ) > ϵr n,T 3 √ n + P θ *   sup θ∈Θ 2 n(n -1)T log P θ (X 1:T | Z 1:T = ẑ1:T ) - 2 n(n -1)T E θ * log P θ (X 1:T | Z 1:T = Z1:T ) Z 1:T > ϵr n,T 3 √ n   + P θ * sup θ∈Θ 2 n(n -1)T E θ * log P θ (X 1:T | Z 1:T = Z1:T ) Z 1:T -M(π) > ϵr n,T 3 √ n .
(2.5.4)

In the following, we prove separately the convergence (in P θ * -probability) to zero of the three terms of this sum (while controlling for the rate of these convergences). Before starting, let us remark that we have

log P θ (X 1:T | Z 1:T = z 1:T ) = T t=1 1≤i<j≤n X t ij log π z t i z t j + (1 -X t ij ) log(1 -π z t i z t j ) (2.5.5) and E θ * log P θ (X 1:T | Z 1:T = z 1:T ) Z 1:T = T t=1 1≤i<j≤n π * Z t i Z t j log π z t i z t j + (1 -π * Z t i Z t j ) log(1 -π z t i z t j ).
(2.5.6)

In particular, for every t ∈ 1, T , we have ẑt = arg max

z=(z 1 ,...,zn)∈ 1,Q n 1≤i<j≤n X t ij log π z i z j + (1 -X t ij ) log(1 -π z i z j ), Zt = arg max z=(z 1 ,...,zn)∈ 1,Q n 1≤i<j≤n π * Z t i Z t j log π z i z j + (1 -π * Z t i Z t j ) log(1 -π z i z j ).
First term of the right-hand side of (2.5.4). We let

T 1 := 2 n(n -1)T log P θ (X 1:T ) - 2 n(n -1)T log P θ (X 1:T | Z 1:T = ẑ1:T ) ≤ 2 n(n -1)T T t=1 log P θ (X t | X 1:t-1 ) -log P θ (X t | Z t = ẑt ) .
(2.5.7)

Lemma 2.5.1. For every t ∈ 1, T , we have

log P θ (X t |X 1:t-1 ) -log P θ (X t |Z t = ẑt ) ≤ log P θ (Z t = ẑt |X 1:t-1 ) .
Going back to (2.5.7) and applying Lemma 2.5.1, we get

T 1 ≤ 2 n(n -1)T T t=1 log P θ (Z t = ẑt | X 1:t-1 ) = - 2 n(n -1)T T t=1 log P θ (Z t = ẑt | X 1:t-1 ).
Now, using classical dependency rules in directed acyclic graphs (see for e.g. [START_REF] Lauritzen | Graphical models, volume 17 of Oxford Statistical Science Series[END_REF] combined with Assumption 2, we get

T 1 ≤ - 2 n(n -1)T T t=1 log z t-1 ∈ 1,Q n P θ (Z t = ẑt | Z t-1 = z t-1 )P θ (Z t-1 = z t-1 | X 1:t-1 ) ≤ - 2 n(n -1)T T t=1 log z t-1 ∈ 1,Q n δ n P θ (Z t-1 = z t-1 | X 1:t-1 ) ≤ - 2 n(n -1)T T t=1 n log δ = 2 n -1 log(1/δ).
This implies that P θ * (sup θ∈Θ T 1 > ϵr n,T /(3 √ n)) = 0 as soon as we have ϵr n,T / √ n ≥ 6 log(1/δ)/(n -1). Then for any sequence {r n,T } n,T ≥1 increasing to infinity, for any ϵ > 0, we have that P θ * (sup θ∈Θ T 1 > ϵr n,T /(3 √ n)) → 0 as n and T increase.

Second term of the right-hand side of (2.5.4). Let us denote

T 2 (Z 1:T ) := 2 n(n -1)T log P θ (X 1:T | Z 1:T = ẑ1:T ) - 2 n(n -1)T E θ * log P θ (X 1:T |Z 1:T = Z1:T ) Z 1:T .
For the sake of clarity, we study this term on the event {Z 1:T = z * 1:T } where z * 1:T ∈ 1, Q nT is a fixed configuration. This event induces the definition of Z1:T following Equation (2.5.2) as Z1:T = arg max

z 1:T ∈ 1,Q nT E θ * log P θ (X 1:T | Z 1:T = z 1:T ) Z 1:T = z * 1:T , or equivalently for every t ∈ 1, T , Zt = arg max z=(z 1 ,...,zn)∈ 1,Q n 1≤i<j≤n π * z * t i z * t j log π z i z j + (1 -π * z * t i z * t j ) log(1 -π z i z j ).
By definition of ẑ1:T and Z1:T respectively, we have the two inequalities log P θ (X 1:T | Z 1:T = ẑ1:T ) ≥ log P θ (X 1:T | Z 1:T = Z1:T ) and

E θ * log P θ (X 1:T | Z 1:T = Z1:T ) Z 1:T = z * 1:T ≥E θ * log P θ (X 1:T | Z 1:T = ẑ1:T ) Z 1:T = z * 1:T ,
implying the lower and upper bounds log

P θ (X 1:T | Z 1:T = Z1:T ) -E θ * log P θ (X 1:T | Z 1:T = Z1:T ) Z 1:T = z * 1:T ≤ log P θ (X 1:T | Z 1:T = ẑ1:T ) -E θ * log P θ (X 1:T | Z 1:T = Z1:T ) Z 1:T = z * 1:T ≤ log P θ (X 1:T | Z 1:T = ẑ1:T ) -E θ * log P θ (X 1:T | Z 1:T = ẑ1:T ) Z 1:T = z * 1:T .
Taking the absolute value gives us an upper bound for T 2 (z * 1:T )

T 2 (z * 1:T ) ≤ max z 1:T ∈{ẑ 1:T , Z1:T } 2 n(n -1)T log P θ (X 1:T | Z 1:T = z 1:T ) -E θ * log P θ (X 1:T | Z 1:T = z 1:T ) Z 1:T = z * 1:T .
Using Equations (2.5.5) and (2.5.6), we then obtain the following upper bound for

T 2 (z * 1:T ) T 2 (z * 1:T ) ≤ max z 1:T ∈{ẑ 1:T , Z1:T } 2 n(n -1)T T t=1 1≤i<j≤n (X t ij -π * z * t i z * t j ) log   π z t i z t j 1 -π z t i z t j   .
We use the following concentration result to conclude.

Lemma 2.5.2. Let ϵ, β > 0 and {x n,T } n,T ≥1 a sequence of positive real numbers. We let P * θ * (•) denote the probability conditional on {Z 1:T = z * 1:T } under parameter θ * , i.e.

P * θ * (•) = P θ * (• | Z 1:T = z * 1:T ). Denoting Λ = 2 log[(1 -ζ)/ζ] > 0 we have for any θ ∈ Θ P * θ *   sup z 1:T ∈ 1,Q nT sup π∈[ζ,1-ζ] Q 2 2 n(n -1)T T t=1 1≤i<j≤n (X t ij -π * z * t i z * t j ) log   π z t i z t j 1 -π z t i z t j   > ϵ   ≤P * θ *   (1 + β)Λ n(n -1)T /2 + Λ x n,T /2 n(n -1)T /2 + (1/β + 1/3) (Λ/2)x n,T n(n -1)T /2 > ϵ   + 2e -x n,T
≤1 2Ω/(n(n-1)T )>ϵ + 2e -x n,T (2.5.8)

with Ω = (1 + β)Λ n(n -1)T /2 + Λ n(n -1)T x n,T /4 + (1/β + 1/3)(Λ/2)x n,T .
Let us choose x n,T = log(n) in the above lemma. For any ϵ > 0, for any sequence {r n,T } n,T ≥1 increasing to infinity, we have for n and T large enough

ϵr n,T 3 √ n ≥ 2Ω n(n -1)T .
Then for n and T large enough, the first term in the right-hand side of inequality (2.5.8) is equal to 0 and we have

P * θ * sup θ∈Θ T 2 (z * 1:T ) > ϵr n,T 3 √ n ≤ 2 n and P θ * sup θ∈Θ T 2 (Z 1:T ) > ϵr n,T 3 √ n ≤ z * 1:T P * θ * sup θ∈Θ T 2 (z * 1:T ) > ϵr n,T 3 √ n P θ * (Z 1:T = z * 1:T ) ≤ 2 n .
Third term of the right-hand side of (2.5.4). Let us denote

T 3 (Z 1:T ) := 2 n(n -1)T E θ * log P θ (X 1:T | Z 1:T = Z1:T ) Z 1:T -M(π) = 2 n(n -1)T T t=1 E θ * log P θ (X t | Z t = Zt ) Z t -M(π, Āπ ) .
For any fixed configuration z t ∈ 1, Q n , analogous to Equation (2.5.6), we write

E θ * log P θ (X t | Z t = z t ) Z t = 1≤i<j≤n π * Z t i Z t j log π z t i z t j + (1 -π * Z t i Z t j ) log(1 -π z t i z t j ) = 1 2 1≤i̸ =j≤n π * Z t i Z t j log π z t i z t j + (1 -π * Z t i Z t j ) log(1 -π z t i z t j ) = 1 2 1≤q,l,q ′ ,l ′ ≤Q 1≤i̸ =j≤n π * ql log π q ′ l ′ + (1 -π * ql ) log(1 -π q ′ l ′ ) 1 {Z t i =q,Z t j =l,z t i =q ′ ,z t j =l ′ } = 1 2 1≤q,l,q ′ ,l ′ ≤Q C qq ′ (Z t , z t )C ll ′ (Z t , z t ) π * ql log π q ′ l ′ + (1 -π * ql ) log(1 -π q ′ l ′ ) ,
where

C qq ′ (Z t , z t ) = |{i ∈ 1, n ; Z t i = q, z t i = q ′ }|
is the (random variable) number of nodes classified in group q in the current (random) configuration Z t , while they belong to group q ′ in (deterministic) configuration z t . Recall that N q (z t ) is the number of nodes assigned to class q by the configuration z t and let us denote a t qq ′ = a qq ′ (Z t , z t ) = C qq ′ (Z t , z t )/N q (Z t ) the (random) proportion of vertices from class q in Z t attributed to class q ′ by z t . We write 2 n(n -1)

E θ * log P θ (X t | Z t = z t ) Z t = 1≤q,l,q ′ ,l ′ ≤Q N q (Z t )N l (Z t ) n(n -1) a t qq ′ a t ll ′ π * ql log π q ′ l ′ + (1 -π * ql ) log(1 -π q ′ l ′ ) :=Φ t (A t , π),
with A t = (a t qq ′ ) 1≤q,q ′ ≤Q . Now extending these notations to the case where z t = Zt , we let Ãt = (ã t qq ′ ) 1≤q,q ′ ≤Q where ãt qq ′ = a qq ′ (Z t , Zt ). We remark that the definition of Zt implies that Ãt = arg max A t ∈A t (Z 1:T ) Φ t (A t , π) with A t (Z 1:T ) the (random) subset of stochastic matrices defined for every t ∈ 1, T by

A t (Z 1:T ) = A = (n ql /N q (Z t )) 1≤q,l≤Q ; n ql ∈ 0, N q (Z t ) , Q l=1 n ql = N q (Z t ) .

Let us also denote Āt

π = arg max A∈A t (Z 1:T ) M(π, A). Then sup θ∈Θ T 3 (Z 1:T ) ≤ sup π∈[ζ,1-ζ] Q 2 1 T T t=1 Φ t ( Ãt , π) -M(π, Āπ ) ≤ sup π∈[ζ,1-ζ] Q 2 1 T T t=1 Φ t ( Ãt , π) -M(π, Āt π ) + 1 T T t=1 sup π∈[ζ,1-ζ] Q 2 M(π, Āt π ) -M(π, Āπ ) .
(2.5.9)

We start by stating a concentration lemma on the random variable N q (Z t ) for any q ∈ 1, Q and any t ∈ 1, T .

Lemma 2.5.3. For any θ ∈ Θ and any η ∈ (0, δ), let

Ω η (θ) := z 1:T ∈ 1, Q nT ; ∀t ∈ 1, T , ∀q ∈ 1, Q , N q (z t ) n ≥ α q -η . Then P θ Z 1:T ∈ Ω η (θ) ≥ 1 -QT exp(-2η 2 n).
Building on the previous concentration lemma, the following one gives the convergence in P θ * -probability of the second term in the right-hand side of (2.5.9). Lemma 2.5.4. For any ϵ > 0, any η ∈ (0, δ) and {r n,T } n,T ≥1 any positive sequence,

P θ *   1 T T t=1 sup π∈[ζ,1-ζ] Q 2 M(π, Āt π ) -M(π, Āπ ) > ϵr n,T 6 √ n   ≤QT exp -2η 2 n + 1 n≤6c √ n/[ϵr n,T (δ-η)]
(2.5. 10)

with c = 6(1 -δ) 2 (1 -ζ) log(1/ζ)Q 4 .
Then taking any η ∈ (0, δ), for any ϵ > 0, for any sequence {r n,T } n,T ≥1 increasing to infinity, we have the following inequality for n and T large enough .5.11) implying that the probability in Lemma 2.5.4 converges to 0 as n and T increase for any ϵ > 0, as long as log T = o(n). Now, for the first term in the right-hand side of (2.5.9), note that we have for every π and every t

r n,T > 6c √ n ϵ(δ -η)n , ( 2
   Φ t ( Ãt , π) ≥ Φ t ( Āt π , π) because Ãt = arg max A∈A t Φ t (A, π) M(π, Āt π ) ≥ M(π, Ãt ) because Āt π = arg max A∈A t M(π, A).
Then, either M(π, Āt π ) ≤ Φ t ( Ãt , π) and

0 ≤ Φ t ( Ãt , π) -M(π, Āt π ) ≤ Φ t ( Ãt , π) -M(π, Ãt ) or M(π, Āt π ) ≥ Φ t ( Ãt , π) and 0 ≤ M(π, Āt π ) -Φ t ( Ãt , π) ≤ M(π, Āt π ) -Φ t ( Āt π , π).
In both cases, we get that Φ t ( Ãt , π) -M(π, Āt π ) ≤ sup A∈A |Φ t (A, π) -M(π, A)| for every t and π, thus obtaining the upper bound

sup π∈[ζ,1-ζ] Q 2 1 T T t=1 Φ t ( Ãt , π) -M(π, Āt π ) ≤ 1 T T t=1 sup π∈[ζ,1-ζ] Q 2 sup A t ∈A Φ t (A t , π) -M(π, A t ) . Letting ∆(ζ) = sup π∈[ζ,1-ζ] sup π * ∈[ζ,1-ζ] |π * log π + (1 -π * ) log(1 -π)| ∈ (0, +∞)
and recalling that 0 ≤ a ql ≤ 1 (for every q, l ∈ 1, Q ) for every A = (a ql ) 1≤q,l≤Q ∈ A, we have

sup π∈[ζ,1-ζ] Q 2 sup A t ∈A Φ t (A t , π) -M(π, A t ) ≤ sup π∈[ζ,1-ζ] Q 2 sup A t ∈A 1≤q,l,q ′ ,l ′ ≤Q N q (Z t )N l (Z t ) n(n -1) -α * q α * l a t qq ′ a t ll ′ × π * ql log π q ′ l ′ + (1 -π * ql ) log(1 -π q ′ l ′ ) ≤ ∆(ζ)Q 2 1≤q,l≤Q N q (Z t )N l (Z t ) n(n -1) -α * q α * l .
Finally, we bound the first term of the right-hand-side of (2.5.9) as follows

sup π∈[ζ,1-ζ] Q 2 1 T T t=1 Φ t ( Ãt , π) -M(π, Āt π ) ≤ ∆(ζ)Q 2 1≤q,l≤Q 1 T T t=1 N q (Z t )N l (Z t ) n(n -1) -α * q α * l .
(2.5.12) Applying Markov's Inequality, we obtain

P θ *   sup π∈[ζ,1-ζ] Q 2 1 T T t=1 Φ t ( Ãt , π) -M(π, Āt π ) > ϵr n,T 6 √ n   ≤ q,l P θ * 1 T T t=1 N q (Z t )N l (Z t ) n(n -1) -α * q α * l > ϵr n,T 6∆(ζ)Q 4 √ n ≤ 6∆(ζ)Q 4 √ n ϵr n,T q,l 1 T T t=1 E θ * N q (Z t )N l (Z t ) n(n -1) -α * q α * l ≤ 6∆(ζ)Q 4 √ n ϵr n,T q,l E θ * N q (Z 1 )N l (Z 1 ) n(n -1) -α * q α * l .
The following lemma gives an upper bound of the expectation appearing in the previous inequality, for any q, l ∈ 1, Q .

Lemma 2.5.5. For any q, l ∈ 1, Q and any t ∈ 1, T , we have the following inequality

E θ * N q (Z t )N l (Z t ) n(n -1) -α * q α * l ≤ 2 √ n n -1 .
This leads to

P θ *   sup π∈[ζ,1-ζ] Q 2 1 T T t=1 Φ t ( Ãt , π) -M(π, Āt π ) > ϵr n,T 6 √ n   ≤ 12∆(ζ)Q 6 n ϵr n,T (n -1) .
Then for any ϵ > 0, for any sequence {r n,T } n,T ≥1 increasing to infinity, we have the convergence

P θ *   sup π∈[ζ,1-ζ] Q 2 1 T T t=1 Φ t ( Ãt , π) -M(π, Āt π ) > ϵr n,T /(6 √ n)   ----→ n,T →∞ 0.
We proved the convergence to 0 of the three terms in the right-hand side of (2.5.4) for any sequence {r n,T } n,T ≥1 increasing to infinity and as long as log T = o(n). This gives the expected result and concludes the proof.

Proof of Corollary 2.3.1

To prove this corollary, we establish the following lemma that allows us to obtain a rate of convergence of π to π * from a rate of convergence of M n,T to M. Note that this lemma is a bit more general than what we need and gives an equivalent result when the number of time steps T is fixed, which will be useful for Corollary 2.3.2.

Lemma 2.5.6. Let {F n,T } n,T ≥1 be any random functions on the set Θ (resp. Θ T ) and M (resp. M T ) defined as before. Assume that there exists a sequence {v n,T } n,T ≥1 (resp. {v n } n≥1 ) a sequence decreasing to 0 such that for every ϵ > 0, we have the following convergence as n, T → ∞ (resp. n → ∞)

P θ * sup (Γ,π)∈Θ |F n,T (Γ, π) -M(π)| > ϵv n,T ----→ n,T →∞ 0 resp. P θ * sup (Γ,π)∈Θ T F n,T (Γ, π 1:T ) -M T (π 1:T ) > ϵv n ---→ n→∞ 0 .
If for any n and T , θ = ( Γ, π) (resp. θ = ( Γ, π1:T )) is defined as the maximizer of F n,T on the set Θ (resp. Θ T ), we have the following convergence

P θ * min σ∈S Q ∥π σ -π * ∥ ∞ > ϵ √ v n,T ----→ n,T →∞ 0 resp. P θ * min σ 1 ,...,σ T ∈S Q ∥π 1:T σ 1:T -π * 1:T ∥ ∞ > ϵ √ v n ---→ n→∞ 0 with π1:T σ 1:T = (π t σ t ) t∈ 1,T .
The result of Corollary 2.3.1 is then a direct consequence of Theorem 2.3.1 (choosing the sequence {r 2 n,T } n,t≥1 ) and Lemma 2.5.6 applied with F n,T = M n,T .

Proof of Theorem 2.3.2

The proof follows the lines of the proof of Theorem 3.8 in [START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF]. Nonetheless, our result is sharper as we will establish an upper bound of the rate of convergence (in probability) of the quantity at stake. For any ϵ > 0, any sequence {y n,T } n,T ≥1 and η ∈ (0, δ), we write

P θ * (E(Z 1:T , θ, ϵy n,T )) = z * 1:T ∈ 1,Q nT P θ * (E(z * 1:T , θ, ϵy n,T ); Z 1:T = z * 1:T ) ≤ P θ * (Z 1:T ∈ Ω c η (θ * )) + z * 1:T ∈Ωη(θ * ) P θ *   P θ Z 1:T ̸ = z * 1:T | X 1:T P θ (Z 1:T = z * 1:T | X 1:T ) > ϵy n,T Z 1:T = z * 1:T   P θ * Z 1:T = z * 1:T (2.5.13)
with Ω η (θ * ) as defined in Lemma 2.5.3. We will establish that there exist some positive constants C, C 1 , C 2 , C 3 , C 4 such that for any fixed configuration z * 1:T ∈ Ω η (θ * ), any ϵ > 0, any positive sequence {y n,T } n,T ≥1 such that log(1/y n,T ) = o(n) and n and T large enough, we have

P θ * P θ(Z 1:T ̸ = z * 1:T | X 1:T ) P θ(Z 1:T = z * 1:T | X 1:T ) > ϵy n,T Z 1:T = z * 1:T ≤P θ * ∥π -π * ∥ ∞ > v n,T | Z 1:T = z * 1:T + CnT    exp   -(δ -η) 2 C 1 n + C 2 log(nT ) + C 4 log(1/(ϵy n,T ))   + exp   -C 3 (log(nT )) 2 nv 2 n,T + 3n log(nT )      .
(2.5.14)

Combined with (2.5.13) and applying Lemma 2.5.3, this gives the desired result. So now we focus on establishing (2.5.

14).

In what follows, we consider a fixed configuration z * 1:T ∈ Ω η (θ * ) and introduce the Hamming distance between z * 1:T and any other configuration z 1:T defined as

∥z 1:T -z * 1:T ∥ 0 = T t=1 n i=1 1 z t i ̸ =z * t i .
We let P * θ * (•) denote the probability conditional on {Z 1:T = z * 1:T } under parameter θ = θ * , i.e.

P * θ * (•) = P θ * (• | Z 1:T = z * 1:T ).
In the following, we will often use the fact that the variables {X t ij } are independent under P * θ * (with mean value π *

z * t i z * t j
) so that we can rely on Hoeffding's Inequality. We introduce a sequence {v n,T } n,T ≥1 decreasing to 0 and Ω n,T the event defined as

Ω n,T = {∥π -π * ∥ ∞ ≤ v n,T }.
We bound the probability of interest in (2.5.14) by splitting it on the two complementary events Ω n,T and Ω c n,T . For any ϵ > 0 and any positive sequence {y n,T } n,T ≥1

P * θ * P θ(Z 1:T ̸ = z * 1:T | X 1:T ) P θ(Z 1:T = z * 1:T | X 1:T ) > ϵy n,T ≤P * θ * Ω c n,T + P * θ * P θ(Z 1:T ̸ = z * 1:T | X 1:T ) P θ(Z 1:T = z * 1:T | X 1:T ) > ϵy n,T ∩ Ω n,T .
(2.5.15)

Thus, the proof of (2.5.14) boils down to establishing the desired upper bound on the second term appearing in the right-hand side of (2.5.15). We have

P * θ * P θ(Z 1:T ̸ = z * 1:T | X 1:T ) P θ(Z 1:T = z * 1:T | X 1:T ) > ϵy n,T ∩ Ω n,T ≤ nT r=1 z 1:T ;∥z 1:T -z * 1:T ∥ 0 =r P * θ * P θ(Z 1:T = z 1:T | X 1:T ) P θ(Z 1:T = z * 1:T | X 1:T ) > ϵy n,T /(Q r (nT ) r+1 ) ∩ Ω n,T ,
by using the bound (Q -1) r nT r ≤ Q r (nT ) r on the number of terms in the sum over {z 1:T ; ∥z 1:T -z * 1:T ∥ 0 = r} (for each value of r). Then, (2.5.16) as long as nT ≥ Q. For any configuration z 1:T such that ∥z 1:T -z * 1:T ∥ 0 = r, we denote by r(1), . . . , r(T ) the number of differences between the two configurations at each time step t ∈ 1, T , i.e. r(t) = ∥z t -z * t ∥ 0 such that r = t r(t). Moreover, for any parameter π, we define D n,T (z 1:T , π) the subset of indexes (i, j, t) ∈ 1, n 2 × 1, T such that i < j for which the parameter π differs between the configuration z * 1:T and z 1:T , namely

P * θ * P θ(Z 1:T ̸ = z * 1:T | X 1:T ) P θ(Z 1:T = z * 1:T | X 1:T ) > ϵy n,T ∩ Ω n,T ≤ nT r=1 z 1:T ; ∥z 1:T -z * 1:T ∥ 0 =r P * θ *      log P θ(Z 1:T = z 1:T | X 1:T ) P θ(Z 1:T = z * 1:T | X 1:T ) > log(ϵy n,T ) -r log Q -(r + 1) log(nT )    ∩ Ω n,T   ≤ nT r=1 z 1:T ; ∥z 1:T -z * 1:T ∥ 0 =r P * θ *      log P θ(Z 1:T = z 1:T | X 1:T ) P θ(Z 1:T = z * 1:T | X 1:T ) > -log 1 ϵy n,T -3r log(nT )    ∩ Ω n,T   ,
D n,T (z 1:T , π) := (i, j, t) ∈ I n,T ; π z t i z t j ̸ = π z * t i z * t j ,
with I n,T = {(i, j, t) ∈ 1, n 2 × 1, T ; i < j} the set of indexes over which we sum to compute the conditional log-likelihood. In what follows, we abbreviate to D * (resp. D), the set D n,T (z 1:T , π * ) (resp. D n,T (z 1:T , π)). Next lemma gives a decomposition of the main term at stake in (2.5.16).

Lemma 2.5.7. We have the decomposition

log P θ(Z 1:T = z 1:T | X 1:T ) P θ(Z 1:T = z * 1:T | X 1:T ) = U 1 + U 2 -U 3 ,
where

U 1 := (i,j,t)∈D *   X t ij log π * z t i z t j π * z * t i z * t j + (1 -X t ij ) log 1 -π * z t i z t j 1 -π * z * t i z * t j   + n i=1 log αz 1 i αz * 1 i + T -1 t=1 n i=1 log γz t i z t+1 i γz * t i z * t+1 i
(2.5.17)

U 2 := (i,j,t)∈D * ∪ D log   1 + (π z t i z t j -π * z t i z t j )(X t ij -π * z t i z t j ) π * z t i z t j (1 -π * z t i z t j )  
(2.5.18)

U 3 := (i,j,t)∈D * ∪ D log   1 + (π z * t i z * t j -π * z * t i z * t j )(X t ij -π * z * t i z * t j ) π * z * t i z * t j (1 -π * z * t i z * t j )   .
(2.5.19) Combining (2.5.16) and Lemma 2.5.7, we obtain

P * θ *      z 1:T ̸ =z * 1:T P θ(Z 1:T = z 1:T | X 1:T ) P θ(Z 1:T = z * 1:T | X 1:T ) > ϵy n,T    ∩ Ω n,T   ≤ nT r=1 z 1:T ;∥z 1:T -z * 1:T ∥ 0 =r P * θ * [{U 1 + U 2 -U 3 > -log(1/(ϵy n,T )) -3r log(nT )} ∩ Ω n,T ] .
(2.5.20)

We then decompose

P * θ * [{U 1 + U 2 -U 3 > -log(1/(ϵy n,T )) -3r log(nT )} ∩ Ω n,T ] ≤P * θ * [{U 1 + U 2 -U 3 > -log(1/(ϵy n,T )) -3r log(nT )} ∩ Ω n,T ∩ {|U 3 | ≤ r log(nT )}] + P * θ * [Ω n,T ∩ {|U 3 | > r log(nT )}] ≤P * θ * [{U 1 + U 2 > -log(1/(ϵy n,T )) -4r log(nT )} ∩ Ω n,T ] + P * θ * [Ω n,T ∩ {|U 3 | > r log(nT )}] ≤P * θ * [U 1 > -log(1/(ϵy n,T )) -5r log(nT )] + P * θ * [Ω n,T ∩ {|U 2 | > r log(nT )}] + P * θ * [Ω n,T ∩ {|U 3 | > r log(nT )}] .
(2.5.21)

We handle these three terms separately in the following. From now on, we consider a configuration z 1:T such that ∥z 1:T -z * 1:T ∥ 0 = r = t r(t).

First term in the right-hand side of (2.5.21). Recall that U 1 is given by (2.5.17).

We can further decompose this term

U 1 = (i,j,t)∈D *   (X t ij -π * z * t i z * t j ) log π * z t i z t j π * z * t i z * t j 1 -π * z * t i z * t j 1 -π * z t i z t j   + (i,j,t)∈D *   π * z * t i z * t j log π * z t i z t j π * z * t i z * t j + (1 -π * z * t i z * t j ) log 1 -π * z t i z t j 1 -π * z * t i z * t j   + n i=1 log αz 1 i αz * 1 i + T -1 t=1 n i=1 log γz t i z t+1 i γz * t i z * t+1 i .
For n and T large enough such that Γ ∈

[δ, 1 -δ] Q 2 (implying for the corresponding stationary distribution α ∈ [δ, 1 -δ] Q ), we have n i=1 log αz 1 i αz * 1 i + T -1 t=1 n i=1 log γz t i z t+1 i γz * t i z * t+1 i = n i=1 1 {z 1 i ̸ =z * 1 i } log αz 1 i αz * 1 i + T -1 t=1 n i=1 1 {(z t i ,z t+1 i )̸ =(z * t i ,z * t+1 i )} log γz t i z t+1 i γz * t i z * t+1 i ≤r(1) log 1 -δ δ + T -1 t=1 [r(t) + r(t + 1)] log 1 -δ δ ≤ 2r log 1 -δ δ .
To handle the term U 1 , we need to lower bound the cardinality of the set D * . This is the purpose of Lemma 2.5.8 which is a generalization of Proposition B.4 in [START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF]. This can be done for all the configurations z 1:T and all the configurations z * 1:T that belong to some Ω η (θ).

Lemma 2.5.8. For any η ∈ (0, δ), any parameter θ ∈ Θ, any configuration z 1:T and any z * 1:T ∈ Ω η (θ) such that ∥z 1:T -z * 1:T ∥ 0 = r, we have

D n,T (z 1:T , π) ≥ (δ -η) 2 4 nr.
Combining Lemma 2.5.8 with the previous bound, we get that

(|D * |) -1   n i=1 log αz 1 i αz * 1 i + T -1 t=1 n i=1 log γz t i z t+1 i γz * t i z * t+1 i   ≤ 2r |D * | log 1 -δ δ ≤ 8 n(δ -η) 2 log 1 -δ δ ----→ n→+∞ 0. (2.5.22)
We also have

(|D * |) -1 (i,j,t)∈D *   π * z * t i z * t j log π * z t i z t j π * z * t i z * t j + (1 -π * z * t i z * t j ) log 1 -π * z t i z t j 1 -π * z * t i z * t j   ≤ max q,l,q ′ ,l ′ ;π * ql ̸ =π * q ′ l ′ -k(π * ql , π * q ′ l ′ ) with k(x, y) = x log(x/y) + (1 -x) log[(1 -x)/(1 -y)] for (x, y) ∈ (0, 1) 2 .

The function

k is positive for every (x, y) such that x ̸ = y, hence, introducing the notation

K * = min q,l,q ′ ,l ′ ;π * ql ̸ =π * q ′ l ′ k(π * ql , π * q ′ l ′ )/2, max q,l,q ′ ,l ′ ;π * ql ̸ =π * q ′ l ′ -k(π * ql , π * q ′ l ′ ) := -2K * < 0.
So, by (2.5.22), we have for n large enough

(|D * |) -1    (i,j,t)∈D *   π * z * t i z * t j log π * z t i z t j π * z * t i z * t j + (1 -π * z * t i z * t j ) log 1 -π * z t i z t j 1 -π * z * t i z * t j   + n i=1 log αz 1 i αz * 1 i + T -1 t=1 n i=1 log γz t i z t+1 i γz * t i z * t+1 i    ≤ -K * .
This leads to

P * θ * (U 1 > u) ≤ P * θ *   (i,j,t)∈D *   (X t ij -π * z * t i z * t j ) log π * z t i z t j π * z * t i z * t j 1 -π * z * t i z * t j 1 -π * z t i z t j   -|D * |K * > u  
for any u > 0 and large enough n. Moreover, thanks to Hoeffding's Inequality and Assumption 3,

P * θ * (U 1 > u) ≤P * θ *   (i,j,t)∈D *   (X t ij -π * z * t i z * t j ) log π * z t i z t j π * z * t i z * t j 1 -π * z * t i z * t j 1 -π * z t i z t j   > u + |D * |K *   ≤ exp - u 2 + |D * | 2 K * 2 + 2u|D * |K * |D * |C ζ ≤ exp - |D * | 2 K * 2 + 2u|D * |K * |D * |C ζ = exp - 2uK * C ζ exp - |D * |K * 2 C ζ ,
where C ζ is a constant depending on ζ. Finally using Lemma 2.5.8, we have

P * θ * (U 1 > -log(1/(ϵy n,T )) -5r log(nT )) ≤ exp [log(1/(ϵy n,T )) + 5r log(nT )] 2K * C ζ exp - |D * |K * 2 C ζ ≤ exp [log(1/(ϵy n,T )) + 5r log(nT )] 2K * C ζ exp -nr (δ -η) 2 K * 2 4C ζ .
Second term in the right-hand side of (2.5.21). We have

U 2 := (i,j,t)∈D * ∪ D log   1 + (π z t i z t j -π * z t i z t j )(X t ij -π * z t i z t j ) π * z t i z t j (1 -π * z t i z t j )   ≤ (i,j,t)∈D * ∪ D (π z t i z t j -π * z t i z t j )(X t ij -π * z t i z t j ) π * z t i z t j (1 -π * z t i z t j
) .

For any q, l, q ′ , l ′ ∈ 1, Q , we introduce the sets

F qlq ′ l ′ = F qlq ′ l ′ (z 1:T , z * 1:T ) := {(i, j, t) ∈ I n,T ; z t i = q, z t j = l, z * t i = q ′ , z * t j = l ′ } F ql = F ql (z 1:T ) := ∪ 1≤q ′ ,l ′ ≤Q F qlq ′ l ′ = {(i, j, t) ∈ I n,T ; z t i = q, z t j = l} G qlq ′ l ′ = G qlq ′ l ′ (z 1:T , z * 1:T , π * , π) := (D * ∪ D) ∩ F qlq ′ l ′ = {(i, j, t) ∈ I n,T ; z t i = q, z t j = l, z * t i = q ′ , z * t j = l ′ and (π * z t i z t j ̸ = π * z * t i z * t j or πz t i z t j ̸ = πz * t i z * t j )} G ql = G ql (z 1:T , z * 1:T , π * , π) := (D * ∪ D) ∩ F ql = {(i, j, t) ∈ I n,T ; z t i = q, z t j = l and (π * z t i z t j ̸ = π * z * t i z * t j or πz t i z t j ̸ = πz * t i z * t j )}.
Then we bound

|U 2 | ≤ 1≤q,l≤Q πql -π * ql π * ql (1 -π * ql ) (i,j,t)∈D * ∪ D(X t ij -π * ql )1 z t i =q,z t j =l ≤ 1≤q,l≤Q πql -π * ql π * ql (1 -π * ql ) (i,j,t)∈G ql (X t ij -π * ql ) ≤ 1≤q,l≤Q πql -π * ql π * ql (1 -π * ql ) (i,j,t)∈G ql (X t ij -π * z * t i z * t j ) + 1≤q,l≤Q πql -π * ql π * ql (1 -π * ql ) (i,j,t)∈G ql (π * z * t i z * t j -π * ql ) ≤ 1≤q,l≤Q πql -π * ql π * ql (1 -π * ql ) (i,j,t)∈G ql (X t ij -π * z * t i z * t j ) + 1≤q,l≤Q πql -π * ql π * ql (1 -π * ql ) q ′ ,l ′ (π * q ′ l ′ -π * ql )|G qlq ′ l ′ | .
(2.5.23)

For every u > 0, we thus have

P * θ * (Ω n,T ∩ {|U 2 | > u}) ≤P * θ *      1≤q,l≤Q πql -π * ql π * ql (1 -π * ql ) (i,j,t)∈G ql (X t ij -π * z * t i z * t j ) > u/2    ∩ Ω n,T   + P * θ *      1≤q,l≤Q πql -π * ql π * ql (1 -π * ql ) 1≤q ′ ,l ′ ≤Q (π * q ′ l ′ -π * ql )|G qlq ′ l ′ | > u/2    ∩ Ω n,T   . (2.5.24)
We start by dealing with the first term of the right-hand side of (2.5.24). Notice that on the event Ω n,T , we have (

π ql -π * ql )/(π * ql (1 -π * ql )) ≤ v n,T /ζ 2 for every q, l ∈ 1, Q .
The next lemma establishes that any set D n,T (z 1:T , π) is included in a larger set, whose cardinality is bounded. In particular, the random set D is included in a larger deterministic subset.

Lemma 2.5.9. Let z 1:T and z * 1:T denote two configurations such that ∥z 1:T -z * 1:T ∥ 0 = r. Then for any parameter π = (π ql ) 1≤q,l≤Q , we have

D n,T (z 1:T , π) ⊂ D n,T (z 1:T ) := (i, j, t) ∈ 1, n 2 × 1, T ; (z t i , z t j ) ̸ = (z * t i , z * t j ) and D n,T (z 1:T ) ≤ 2nr.
As the set G ql is random (because D is random), we write

P * θ *      1≤q,l≤Q πql -π * ql π * ql (1 -π * ql ) (i,j,t)∈G ql (X t ij -π * z * t i z * t j ) > u/2    ∩ Ω n,T   ≤P * θ *   1≤q,l≤Q (i,j,t)∈G ql (X t ij -π * z * t i z * t j ) > uζ 2 2v n,T   ≤ D⊂D n,T (z 1:T ) P * θ *   1≤q,l≤Q (i,j,t)∈F ql ∩D (X t ij -π * z * t i z * t j ) > uζ 2 2v n,T   ,
where now D is a deterministic set. By a union bound and Hoeffding's inequality, we have for any D ⊂ D n,T (z 1:T )

P * θ *   1≤q,l≤Q (i,j,t)∈F ql ∩D (X t ij -π * z * t i z * t j ) > uζ 2 2v n,T   ≤Q 2 max 1≤q,l≤Q P * θ *   (i,j,t)∈F ql ∩D (X t ij -π * z * t i z * t j ) > uζ 2 2v n,T   ≤ 2Q 2 exp - 2u 2 ζ 4 4v 2 n,T Q 4 1 |D| .
This leads to

P * θ *      1≤q,l≤Q πql -π * ql π * ql (1 -π * ql ) (i,j,t)∈G ql (X t ij -π * z * t i z * t j ) > u/2    ∩ Ω n,T   ≤ D⊂D n,T (z 1:T ) 2Q 2 exp - 2u 2 ζ 4 4v 2 n,T Q 4 1 |D| ≤ 2nr k=1 D⊂D n,T (z 1:T );|D|=k 2Q 2 exp - 2u 2 ζ 4 4v 2 n,T Q 4 1 k ≤2Q 2 2nr k=1 (2nr) k exp - 2u 2 ζ 4 4v 2 n,T Q 4 1 2nr ≤ 2Q 2 exp - u 2 ζ 4 4v 2 n,T Q 4 nr (2nr) 2nr+1 .
For the second term of (2.5.24), we get from a union bound and from Lemma 2.5.9 (that gives an upper bound for |D * ∪ D|) that

P * θ *      1≤q,l≤Q (π ql -π * ql ) π * ql (1 -π * ql ) 1≤q ′ ,l ′ ≤Q (π * q ′ l ′ -π * ql )|G qlq ′ l ′ | > u/2    ∩ Ω n,T   ≤P * θ *   1≤q,l≤Q 1≤q ′ ,l ′ ≤Q (π * q ′ l ′ -π * ql )|G qlq ′ l ′ | > uζ 2 2v n,T   ≤Q 2 max 1≤q,l≤Q P * θ *   1≤q ′ ,l ′ ≤Q (π * q ′ l ′ -π * ql )|G qlq ′ l ′ | > uζ 2 2v n,T Q 2   ≤ Q 2 P * θ * 2nr > uζ 2 2v n,T Q 2 , because |π * q ′ l ′ -π * ql | ≤ 1, implying that q ′ ,l ′ (π * q ′ l ′ -π * ql )|G qlq ′ l ′ | ≤ q ′ ,l ′ |G qlq ′ l ′ | = |G ql | = |F ql ∩ (D * ∪ D)| ≤ |D n,T (z 1:T )| ≤ 2nr.
Finally, we have the following upper bound for the second term of (2.5.21)

P * θ * (Ω n,T ∩ {|U 2 | > r log(nT )}) ≤2Q 2 exp - rζ 4 (log(nT )) 2 4Q 4 v 2 n,T n (2nr) 2nr+1 + Q 2 P * θ * v n,T > ζ 2 log(nT ) 4Q 2 n .
Third term in the right-hand side of (2.5.21). We want to bound (in probability) the last term U 3 . Distinguishing between the cases where X t ij = 0 and X t ij = 1, we have

U 3 := (i,j,t)∈D * ∪ D log   1 + (π z * t i z * t j -π * z * t i z * t j )(X t ij -π * z * t i z * t j ) π * z * t i z * t j (1 -π * z * t i z * t j )   = (i,j,t)∈D * ∪ D   (1 -X t ij ) log   1 - (π z * t i z * t j -π * z * t i z * t j ) (1 -π * z * t i z * t j )   + X t ij log   1 + (π z * t i z * t j -π * z * t i z * t j ) π * z * t i z * t j     = 1≤q,l≤Q (i,j,t)∈D * ∪ D   (1 -X t ij ) log 1 - (π ql -π * ql ) (1 -π * ql ) + X t ij log 1 + (π ql -π * ql ) π * ql   1 z * t i =q,z * t j =l .
For any (q, l) ∈ 1, Q 2 , we further introduce the sets

F * ql = ∪ 1≤q ′ ,l ′ ≤Q F q ′ l ′ ql = {(i, j, t) ∈ I n,T ; z * t i = q, z * t j = l} G * ql = ∪ 1≤q ′ ,l ′ ≤Q G q ′ l ′ ql = (D * ∪ D) ∩ F * ql = {(i, j, t) ∈ D * ∪ D; z * t i = q, z * t j = l}.
Centering the X t ij (under the distribution P * θ * ), we get

U 3 = 1≤q,l≤Q (i,j,t)∈D * ∪ D (π * ql -X t ij ) log 1 - (π ql -π * ql ) (1 -π * ql ) + (X t ij -π * ql ) log 1 + (π ql -π * ql ) π * ql 1 z * t i =q,z * t j =l + 1≤q,l≤Q (i,j,t)∈D * ∪ D (1 -π * ql ) log 1 - (π ql -π * ql ) (1 -π * ql ) + π * ql log 1 + (π ql -π * ql ) π * ql 1 z * t i =q,z * t j =l = 1≤q,l≤Q log 1 + (π ql -π * ql ) π * ql -log 1 - (π ql -π * ql ) (1 -π * ql ) (i,j,t)∈G * ql (X t ij -π * ql ) + 1≤q,l≤Q |G * ql | (1 -π * ql ) log 1 - (π ql -π * ql ) (1 -π * ql ) + π * ql log 1 + (π ql -π * ql ) π * ql .
Then, on the event Ω n,T and for n and T large enough such that

|(π ql -π * ql )/(1-π * ql )| ≤ 1/2 and |(π ql -π * ql )/π * ql | ≤ 1/2
for every q and l, using the fact that

| log(1 + x)| ≤ 2|x| for x ∈ [-1/2, 1/2], we have |U 3 | ≤4 v n,T ζ 1≤q,l≤Q (i,j,t)∈G * ql (X t ij -π * ql ) + 4 v n,T ζ 1≤q,l≤Q |G * ql |.
Then, for every u > 0,

P * θ * (Ω n,T ∩ {|U 3 | > u}) ≤P * θ *    1≤q,l≤Q (i,j,t)∈G * ql (X t ij -π * ql ) > uζ 8v n,T    + P * θ *   v n,T 1≤q,l≤Q |G * ql | > uζ 8   .
(2.5.25)

For the first term of (2.5.25), using Hoeffding's inequality as before,

P * θ *    1≤q,l≤Q (i,j,t)∈G * ql (X t ij -π * ql ) > uζ 8v n,T    ≤ 2nr k=1 D⊂D n,T (z 1:T );|D|=k P * θ *    1≤q,l≤Q (i,j,t)∈D∩F * ql (X t ij -π * ql ) > uζ 8v n,T    ≤2Q 2 (2nr) 2nr+1 exp - u 2 ζ 2 8 2 Q 4 v 2 n,T nr .
For the second term of (2.5.25), we use

P * θ *   v n,T 1≤q,l≤Q |G * ql | > uζ 8   ≤ P * θ * v n,T > uζ 16nr .
Finally, we have the following upper bound for the third term of (2.5.21)

P * θ * (Ω n,T ∩ {|U 3 | > r log(nT )}) ≤2Q 2 (2nr) 2nr+1 exp - r(log(nT )) 2 ζ 2 8 2 Q 4 v 2 n,T n + P * θ * v n,T > log(nT )ζ 16n .
Combining the 3 bounds on the right-hand-side of (2.5.21).

P * θ * ({U 1 + U 2 -U 3 > -log(1/(ϵy n,T )) -3r log(nT )} ∩ Ω n,T ) ≤ exp [log(1/(ϵy n,T )) + 5r log(nT )] 2K * C ζ exp -nr (δ -η) 2 K * 2 4C ζ + 2Q 2 (2nr) 2nr+1 exp - rζ 4 (log(nT )) 2 4Q 4 v 2 n,T n + Q 2 P * θ * v n,T > ζ 2 log(nT ) 4Q 2 n + 2Q 2 (2nr) 2nr+1 exp - r(log(nT )) 2 ζ 2 8 2 Q 4 v 2 n,T n + P * θ * v n,T > log(nT )ζ 16n .
Now we choose the sequence v n,T such that v n,T = o( log(nT )/n) which is sufficient to imply that the quantities P * θ * (v n,T > ζ 2 log(nT )/(4Q 2 n)) and P * θ * (v n,T > log(nT )ζ/(16n)) vanish as n and T increase. For large enough values of n and T and with C 1 , C 2 , C 3 , C 4 and κ positive constants only depending on Q, ζ and K * , we then have

P * θ * ({U 1 + U 2 -U 3 > -log(1/(ϵy n,T )) -3r log(nT )} ∩ Ω n,T ) ≤ exp [log(1/(ϵy n,T )) + 5r log(nT )] 2K * C ζ exp -nr (δ -η) 2 K * 2 4C ζ + 2Q 2 (2nr) 2nr+1 exp - rζ 4 (log(nT )) 2 4Q 4 v 2 n,T n + 2Q 2 (2nr) 2nr+1 exp - r(log(nT )) 2 ζ 2 8 2 Q 4 v 2 n,T n ≤ exp   -(δ -η) 2 C 1 nr + C 2 log(nT )r + C 4 log(1/(ϵy n,T ))   + κ exp   3nr log(nT ) -C 3 (log(nT )) 2 r nv 2 n,T   .
(2.5.26)

Let us introduce

u nT = exp -(δ -η) 2 C 1 n + C 2 log(nT ) + C 4 log(1/(ϵy n,T )) w nT = exp -C 3 (log(nT )) 2 nv 2 n,T + 3n log(nT ) .
Now we go back to (2.5.20). Noticing that the number of configurations z 1:T such that ∥z 1:T -z * 1:T ∥ 0 = r is equal to nT r (Q -1) r , we have

P * θ * P θ(Z 1:T ̸ = z * 1:T | X 1:T ) P θ(Z 1:T = z * 1:T | X 1:T ) > ϵy n,T ∩ Ω n,T ≤ nT r=1 nT r (Q -1) r u r nT + nT r=1 nT r (Q -1) r κw r nT ≤[1 + Qu nT ] nT -1 + κ [1 + Qw nT ] nT -1 .
Finally, notice that as long as log T = o(n) and log(1/y n,T ) = o(n) (resp. as long as

v n,T = o( log(nT )/n))
, we have nT u nT (resp. nT w nT ) converges to 0. Then we obtain for some universal positive constant C and large enough n and T

P * θ * P θ(Z 1:T ̸ = z * 1:T | X 1:T ) P θ(Z 1:T = z * 1:T | X 1:T ) > ϵy n,T ∩ Ω n,T ≤ CnT (u nT + w nT ).
This leads directly to inequality (2.5.14).

Proof of Theorem 2.3.3

We fix some σ ∈ S Q and study the convergence in P θ * -probability of γσ(q)σ(l) to γ * ql with Γ as defined by the fixed point equation (2.3.2), i.e.

γσ(q)σ(l) = T -1 t=1 n i=1 P θσ Z t i = q, Z t+1 i = l | X 1:T T -1 t=1 n i=1 P θσ (Z t i = q | X 1:T )
.

First, let us denote

A q,l = 1 n(T -1) T -1 t=1 n i=1 P θσ Z t i = q, Z t+1 i = l | X 1:T , B q = 1 n(T -1) T -1 t=1 n i=1 P θσ Z t i = q | X 1:T .
Then we can write the quantity at stake as

γσ(q)σ(l) -γ * ql = A q,l B q -γ * ql = A q,l -α * q γ * ql B q + α * q γ * ql 1 B q - 1 α * q
to obtain the following upper bound on the probability of interest

P θ * γσ(q)σ(l) -γ * ql > ϵr n,T √ log n √ nT ≤P θ * A q,l -α * q γ * ql B q > ϵ 2 r n,T √ log n √ nT + P θ * α * q γ * ql 1 B q - 1 α * q > ϵ 2 r n,T √ log n √ nT .
(2.5.27)

First term of the right-hand side of (2.5.27). For the first term in (2.5.27), for any 0 < λ < δ (implying λ < α * q for any q ∈ 1, Q ),

P θ * A q,l -α * q γ * ql B q > ϵ 2 r n,T √ log n √ nT =P θ *   A q,l -α * q γ * ql B q > ϵ 2 r n,T √ log n √ nT B q ≥ α * q -λ   P θ * B q ≥ α * q -λ + P θ *   A q,l -α * q γ * ql B q > ϵ 2 r n,T √ log n √ nT B q < α * q -λ   P θ * B q < α * q -λ ≤P θ * A q,l -α * q γ * ql > ϵ 2 r n,T √ log n √ nT (α * q -λ) + P θ * B q < α * q -λ .
(2.5.28)

First, we upper bound the probability

P θ * A q,l -α * q γ * ql > ϵr n,T √ log n √ nT
for any ϵ > 0, using the following lemma.

Lemma 2.5.10. If log(T ) = o(n), for any ϵ > 0, for any sequence {r n,T } n,T ≥1 increasing to infinity such that r n,T = o nT / log n and any η ∈ (0, δ), we have for any σ ∈ S Q

P θ * 1 n(T -1) T -1 t=1 n i=1 P θσ Z t i = q, Z t+1 i = l | X 1:T -α * q γ * ql > ϵr n,T √ log n √ nT ≤P θ * (∥π σ -π * ∥ ∞ > v n,T ) + o(1)
with v n,T a sequence decreasing to 0 such that v n,T = o log(nT )/n .

Then, for the second term of (2.5.28), notice that B q = Q l=1 A q,l and Q l=1 γ * ql = 1. We then have, if log(T ) = o(n) and v n,T = o log(nT )/n , using Lemma 2.5.10 again,

P θ * B q < α * q -λ =P θ * B q -α * q < -λ = P θ *   Q l=1 (A q,l -α * q γ * ql ) < -λ   ≤ Q l=1 P θ * A q,l -α * q γ * ql < -λ/Q ≤ Q l=1 P θ * A q,l -α * q γ * ql > λ/Q ≤QP θ * (∥π σ -π * ∥ ∞ > v n,T ) + o(1).
Finally, for the first term of (2.5.27), if y n,T is such that 1/y n,T = o nT / log(n) , if

v n,T = o log(nT )/n and as long as log(T ) = o(n), we obtain 1).

P θ * A q,l -α * q γ * ql B q > ϵ 2 r n,T √ log n √ nT ≤ (Q + 1)P θ * (∥π σ -π * ∥ ∞ > v n,T ) + o(
(2.5.29)

Second term of the right-hand side of (2.5.27). For the second term of (2.5.27), we split it on two complementary events as before. For any 0 < λ < δ, we have

P θ * α * q γ * ql 1 B q - 1 α * q > ϵ 2 r n,T √ log n √ nT =P θ *   α * q γ * ql 1 B q - 1 α * q > ϵ 2 r n,T √ log n √ nT B q ≥ α * q -λ   P θ * B q ≥ α * q -λ + P θ *   α * q γ * ql 1 B q - 1 α * q > ϵ 2 r n,T √ log n √ nT B q < α * q -λ   P θ * B q < α * q -λ ≤P θ *   α * q γ * ql 1 B q - 1 α * q > ϵ 2 r n,T √ log n √ nT B q ≥ α * q -λ   P θ * B q ≥ α * q -λ + P θ * B q < α * q -λ .
(2.5.30)

We already gave an upper bound on the second term in the right-hand side of (2.5.30).

Let us give one for the first term. Notice that as α * q ≥ δ and if B q ≥ α * q -λ ≥ δ -λ > 0, we have by the mean value theorem

1 B q - 1 α * q ≤ 1 (δ -λ) 2 B q -α * q .
We can then write for the first term in the right-hand side of (2.5.30), as long as log(T ) = o(n), for {y n,T } n,T ≥1 such that 1/y n,T = o nT / log n and with v n,T such that v n,T = o log(nT )/n , still using Lemma 2.5.10

P θ *   α * q γ * ql 1 B q - 1 α * q > ϵ 2 r n,T √ log n √ nT B q ≥ α * q -λ   P θ * B q ≥ α * q -λ ≤P θ * B q -α * q > (δ -λ) 2 ϵ 2α * q γ * ql r n,T √ log n √ nT ≤P θ *   Q l=1 (A q,l -α * q γ * ql ) > (δ -λ) 2 ϵ 2α * q γ * ql r n,T √ log n √ nT   ≤ Q l=1 P θ * A q,l -α * q γ * ql > (δ -λ) 2 ϵ 2α * q γ * ql Q r n,T √ log n √ nT ≤ QP θ * (∥π σ -π * ∥ ∞ > v n,T ) + o(1).
We finally obtain for the second term of the right-hand side of (2.5.27)

P θ * α * q γ * ql 1 B q - 1 α * q > ϵ 2 r n,T √ log n √ nT ≤ 2QP θ * (∥π σ -π * ∥ ∞ > v n,T ) + o(1). (2.5.31)
We conclude the proof by summing the upper bounds obtained in (2.5.29) and (2.5.31)

P θ * γσ(q)σ (l) -γ * ql > ϵr n,T √ log n √ nT ≤(3Q + 1)P θ * (∥π σ -π * ∥ ∞ > v n,T ) + o(1)
and by noticing that

P θ * (∥ Γσ -Γ * ∥ ∞ > ϵr n,T √ log n/ √ nT ) ≤ 1≤q,l≤Q P θ * (|γ σ(q)σ(l) - γ * ql | > ϵr n,T √ log n/ √ nT ).

Proof of Corollary 2.3.3

Denoting by σ n,T the permutation minimizing the distance between π (permuted) and π * for every (n, T ) ∈ 1, n × 1, T , i.e. σ n,T = argmin σ∈S Q ∥π σ -π * ∥ ∞ , we apply Theorem 2.3.3 to θσ n,T in order to get

P θ * min σ∈S Q ∥ Γσ -Γ * ∥ ∞ > ϵr n,T √ log n √ nT ≤P θ * ∥ Γσ n,T -Γ * ∥ ∞ > ϵr n,T √ log n √ nT ≤Q 2 (3Q + 1)P θ * min σ∈S Q ∥π σ -π * ∥ ∞ > v n,T + o(1) ----→ n,T →∞ 0.

Proof of Theorem 2.4.1

We use the following lemma, that states that the quantity we optimize in the VEM algorithm and the log-likelihood are asymptotically equivalent.

Lemma 2.5.11. We have the following inequality P θ * -a.s.

sup θ∈Θ 2 n(n -1)T J ( χ(θ), θ) - 2 n(n -1)T ℓ(θ) ≤ 2 log(1/δ) n -1 .
We have that for any ϵ > 0, for n and T large enough,

P θ * sup θ∈Θ 2 n(n -1)T J ( χ(θ), θ) - 2 n(n -1)T ℓ(θ) > ϵr n,T √ n ≤P θ * 2 log(1/δ) n -1 > ϵr n,T √ n = 0
We then conclude by combining this result with Theorem 2.3.1.

Proof of Corollary 2.4.1

This is a direct consequence of Theorem 2.4.1 and Lemma 2.5.6 applied with the functions

F n,T = 2 n(n-1)T J ( χ(•), •).

Proof of Theorem 2.4.2

This proof is quite similar to that of Theorem 2.3.3. We fix some σ ∈ S Q and study the convergence in P θ * -probability of γσ(q)σ(l) to γ * ql with Γ as defined by the fixed point equation (2.4.1), i.e. γσ(q)σ(l) =

n i=1 T -1 t=1 ηt iql ( θσ ) n i=1 T -1 t=1 τ t iq ( θσ )
.

First, let us denote

A q,l = 1 n(T -1) n i=1 T -1 t=1 ηt iql ( θσ ) = 1 n(T -1) n i=1 T -1 t=1 Q χ( θσ) (Z t i = q, Z t+1 i = l), B q = 1 n(T -1) n i=1 T -1 t=1 τ t iq ( θσ ) = 1 n(T -1) n i=1 T -1 t=1 Q χ( θσ) (Z t i = q).
Then we can write the quantity at stake as

γσ(q)σ(l) -γ * ql = A q,l B q -γ * ql = A q,l -α * q γ * ql B q + α * q γ * ql 1 B q - 1 α * q .
We follow the line of the proof of Theorem 2.3.3, using Lemma 2.5.12 below instead of Lemma 2.5.10 in order to obtain the result.

Lemma 2.5.12. For any ϵ > 0, for any sequence {r n,T } n,T ≥1 increasing to infinity such that r n,T = o nT / log n and any η ∈ (0, δ), we have for any σ ∈ S Q

P θ * 1 n(T -1) n i=1 T -1 t=1 Q χ( θσ) (Z t i = q, Z t+1 i = l) -α * q γ * ql > ϵr n,T √ log n √ nT ≤2P θ * (∥π σ -π * ∥ ∞ > v n,T ) + o(1)
with v n,T a sequence decreasing to 0 such that v n,T = o( log(nT )/n).

Chapter 3

Estimation of parameters in a space-evolving graph model based on Markov random fields

Introduction

Markov random fields (MRFs) are widely used models for the study of spatial data, for example in image processing, statistical physics or epidemiology, as they are convenient and flexible. A MRF is based on a known graph on the considered locations (generally a lattice), which we refer to as location graph, and the value of the field at one location depends only on the neighbour locations. The distribution of the Markov random field is a Gibbs distribution (by the Hammersley-Clifford Theorem, see for example [START_REF] Besag | Spatial interaction and the statistical analysis of lattice systems[END_REF]). Besides, random graphs are a suitable tool to model and describe interactions in many kinds of datasets such as biological, ecological, social or transport networks. We will focus here on the case where we observe networks in multiple locations linked through a MRF, i.e. space-evolving networks, and are interested in the classification structure of the nodes of these graphs. We will therefore combine unobserved Markov random fields and graph models. This is motivated by an application in ecology, considering we observe graphs of interactions of species (which we refer to as species interaction graphs) in different locations and we want to study the connection behaviour of this species and cluster them into groups. Rather than considering each graph separately, we want to make use of geographical information about species at different locations. Edges in ecological networks moutain aalakeaa Fig. 3.1 Location graph for a species. This graph depends on the geography and environment. We assume here that the species is not present at high altitude (on the mountain) and cannot cross the lake. can be of several types, such as predation, parasitism, mutualism1 or commensalism 2 . See for example [START_REF] Delmas | Analysing ecological networks of species interactions[END_REF] for more information on the analysis of ecological networks. In the model we consider, we model the correlation over space using a known graph over the locations (that we will call location graph) that might be different for each species, and that is based on the environment. In such a graph, an edge exists between two locations if they are nearby and if there are no natural barrier between them that cannot be crossed by the species, such as mountains or rivers (see Figure 3.1). This is based on the idea that the species (which means a collection of individuals) moves freely between these two locations and thus tends to behave the same way (with respect to its interactions towards other species) at these two locations. The model is then flexible, allowing to represent the species heterogeneity regarding their movement behaviours between locations.

Random graphs have been intensively studied, and in particular several node clustering methods exist, allowing to describe the heterogeneous behaviour of nodes (and more precisely of groups of nodes) in a graph. We will focus in this work on the Stochastic Block Model (SBM, [START_REF] Holland | Stochastic blockmodels: First steps[END_REF] in which the nodes are partitioned into classes. In the SBM, class memberships of the nodes are represented by latent variables and the connection between two nodes is drawn from a distribution depending on the classes of these two nodes (a Bernoulli distribution in the case of binary graphs). Assuming that our observations are drawn from such a model, we can estimate the parameters and the groups of nodes that share the same connection behaviour. Another way to obtain a clustering, and more specifically to recover communities3 , is to use spectral clustering methods, i.e. algorithms that cluster points using eigenvectors of matrices derived from the data (see for example Von [START_REF] Luxburg | A tutorial on spectral clustering[END_REF] for more details on the spectral clustering, and [START_REF] Rohe | Spectral clustering and the high-dimensional stochastic blockmodel[END_REF] for a version of the spectral clustering for the recovery of a general clustering in the context of graphs and not only community detection). Methods based on the optimisation of a measure known as modularity have also been introduced [START_REF] Newman | Finding and evaluating community structure in networks[END_REF], this measure being proportional to the number of edges within groups minus the expected number in an equivalent network with random edges. Another way to identify communities is by running dynamical processes on the graph, such as random walks [START_REF] Pons | Computing communities in large networks using random walks[END_REF], based on the idea that if the within-community edge density is high and the between-community one is low, a random walk will be trapped in each cluster for quite some time, before finding a way out of it.

When studying spatial data through MRF models, problems occur when performing maximum likelihood estimation. In particular, the complexity of the joint probability distribution leads to an intractable normalising constant (unless for very small graphs). Some methods have been introduced to circumvent the problems caused by the complexity and therefore intractability of the joint probability distribution in spatial data. [START_REF] Besag | Statistical analysis of non-lattice data[END_REF] introduced the pseudolikelihood, approximating the joint probability distribution by the product of the conditional distributions at each location, given all the other locations (thus given the neighbours). An estimator of the distribution parameter can then be obtained by maximising the pseudolikelihood. The composite likelihood [START_REF] Lindsay | Composite likelihood methods[END_REF] extends the pseudolikelihood by approximating the joint distribution by the product of tractable joint distributions of variables of a small number of locations. See [START_REF] Varin | An overview of composite likelihood methods[END_REF] for a review of composite likelihood methods and [START_REF] Okabayashi | Extending pseudo-likelihood for Potts models[END_REF] for the use of composite likelihood for the Potts model. Some Markov chain Monte Carlo methods have also been introduced in order to approximate the maximum likelihood estimator. For example, [START_REF] Younes | Estimation and annealing for Gibbsian fields[END_REF] proposes a stochastic gradient algorithm using a Gibbs sampler for the MCMC approximation of the gradient. [START_REF] Geyer | Constrained Monte Carlo maximum likelihood for dependent data[END_REF] propose an algorithm to approximate the maximum likelihood based on a direct approximation of the likelihood from a MCMC sample and its maximisation. Some methods have also been introduced in order to calculate or approximate the normalising constant. [START_REF] Pettitt | Efficient calculation of the normalizing constant of the autologistic and related models on the cylinder and lattice[END_REF] and [START_REF] Friel | Likelihood estimation and inference for the autologistic model[END_REF] compute the constant by wrapping the lattice on a cylinder. [START_REF] Reeves | Efficient recursions for general factorisable models[END_REF] propose a recursive method based on an appropriate factorisation of the unnormalised joint probability (due to the Markov property) reducing the complexity of the summation and giving an exact computation of the normalising constant for lattices up to about 20 rows. Reduced dependence approximation (RDA) extends this forward recursion method in order to compute an approximation of the normalising constant on regular lattices of any size [START_REF] Friel | Bayesian inference in hidden Markov random fields for binary data defined on large lattices[END_REF] or lattices with irregular boundaries [START_REF] Mcgrory | Variational Bayes and the reduced dependence approximation for the autologistic model on an irregular grid with applications[END_REF]. In particular, such methods can be used in the task of inference. The normalising constant can also be approximated by using Markov Chain Monte Carlo (MCMC) samplers such as the Gibbs sampler, or using path sampling [START_REF] Gelman | Simulating normalizing constants: from importance sampling to bridge sampling to path sampling[END_REF].

Another type of methods, which will be our focus in this work, is the mean-field [START_REF] Chandler | Introduction to modern statistical mechanics[END_REF] and mean-field like approximations, consisting of neglecting the fluctuations of the neighbours of the location we are considering by setting their values to their mean (for the mean-field approximation) or to another value, like the mode or a simulated value (for the mean-field like approximation). This results in a distribution that factorises over the locations, and solves the problem of the normalising constant. Note that in a Bayesian setting, the computation of the posterior distribution of the parameters of the MRF given the observations suffers from the same problems as for the maximum likelihood estimation. Some existing methods are for example auxiliary variable methods [START_REF] Møller | An efficient Markov chain Monte Carlo method for distributions with intractable normalising constants[END_REF][START_REF] Murray | MCMC for doubly-intractable distributions[END_REF] or the use of composite likelihood [START_REF] Friel | Bayesian inference for Gibbs random fields using composite likelihoods[END_REF][START_REF] Stoehr | Calibration of conditional composite likelihood for Bayesian inference on Gibbs random fields[END_REF]. For a review on inference for discrete Markov random fields, see [START_REF] Stoehr | A review on statistical inference methods for discrete Markov random fields[END_REF].

In the model we consider, the species are partitioned into a finite number of classes at each location, the classes following a Markov random field for each species, thus taking into account the spatial dependency of group memberships. But, as it is often the case, the groups are not observed, and we are then in the case of a hidden Markov random field (HMRF), where the observations (here the species interaction graphs at each location) depend on the latent Markov random field. Methods have been introduced to estimate the parameters and/or classification of a hidden Markov random field. In particular, this problem has been tackled in the field of image segmentation, i.e. when wanting to obtain a segmentation of a picture [START_REF] Celeux | EM procedures using mean field-like approximations for Markov model-based image segmentation[END_REF][START_REF] Forbes | Combining Monte Carlo and mean-field-like methods for inference in hidden Markov random fields[END_REF], of brain imaging [START_REF] Zhang | Segmentation of brain MR images through a hidden Markov random field model and the expectation-maximization algorithm[END_REF], and of gene clustering [START_REF] Vignes | Gene clustering via integrated Markov models combining individual and pairwise features[END_REF]. Number of algorithms have been introduced for the study of HMRFs, namely methods based on Monte Carlo techniques, pseudolikelihood, the EM algorithm... [START_REF] Besag | On the statistical analysis of dirty pictures[END_REF] and then [START_REF] Lakshmanan | Simultaneous parameter estimation and segmentation of Gibbs random fields using simulated annealing[END_REF] (more generally, see [START_REF] Qian | Estimation of parameters in hidden Markov models[END_REF] describing Restoration-Maximization algorithms) propose iterative algorithms that consist of two steps. The first is a step of assignment in which we find the configuration maximising the probability given the observations and the current parameter, using respectively an ICM (Iterated Conditional Modes) algorithm 4 and a simulated annealing. The second step consists in estimating the parameter maximising the complete likelihood, by using for example the pseudolikelihood as in [START_REF] Besag | On the statistical analysis of dirty pictures[END_REF]. [START_REF] Chalmond | An iterative Gibbsian technique for reconstruction of m-ary images[END_REF] introduced the Gibbsian EM, a variation of the EM algorithm based on the pseudolikelihood and where the conditional expectations are approximated by using a Monte Carlo method based on the Gibbs sampler. [START_REF] Pieczynski | Statistical image segmentation[END_REF] (see also [START_REF] Pieczynski | Champs de Markov cachés et estimation conditionnelle itérative[END_REF]) proposed a method for parameter estimation with latent variables called ICE (Iterative Conditional Expectation) which, assuming that we can estimate the parameters given the complete variable (observed and latent), iteratively approximates the expectation of this estimator given the observations (based on simulations from the conditional distribution of the latent variables given the observations).

In this work, we are interested in the estimation of parameters, and we follow [START_REF] Celeux | EM procedures using mean field-like approximations for Markov model-based image segmentation[END_REF] who propose EM-like algorithms for image segmentation (that have been illustrated in [START_REF] Celeux | EM-based image segmentation using Potts models with external field[END_REF]). They use mean-field like approximations, generalising the mean field EM by [START_REF] Zhang | The mean field theory in EM procedures for Markov random fields[END_REF]. They introduce in particular the simulated field EM algorithm (which we will also refer to as simulated EM), in which at every iteration of the algorithm, a configuration of the hidden Markov field given the observations is simulated with the current parameter, this configuration being used for the mean-field like approximation. Other possibilities are the mean field algorithm and mode field algorithm, using respectively the mean field estimate and the mode field estimate of the conditional distribution. In this work, we propose an algorithm based on the simulated EM, adapted to the observation of species interaction graphs generated under a SBM at each location. The simulated EM has been used for example in [START_REF] Vignes | Gene clustering via integrated Markov models combining individual and pairwise features[END_REF] to cluster genes, with Gaussian observations. In [START_REF] Vignes | Gene clustering via integrated Markov models combining individual and pairwise features[END_REF], the parameters are estimated using a simulated EM and the class memberships are then estimated using a Maximum Posterior Marginal principle 5 . More recently, [START_REF] Forbes | Combining Monte Carlo and mean-field-like methods for inference in hidden Markov random fields[END_REF] introduced the Monte Carlo VEM algorithm, that combines the mean-field like approach and Monte Carlo techniques, and proved its convergence. [START_REF] Ranalli | Segmentation of sea current fields by cylindrical hidden Markov models: a composite likelihood approach[END_REF] and [START_REF] Lai | Asymptotically efficient parameter estimation in hidden markov spatio-temporal random fields[END_REF] use methods based on the composite likelihood. In particular, [START_REF] Ranalli | Segmentation of sea current fields by cylindrical hidden Markov models: a composite likelihood approach[END_REF] propose an EM algorithm based on the complete composite likelihood. Note that as before, in a Bayesian setting for an HMRF, the computation of the posterior distribution of the parameters given the observations suffers from the same problems as for the maximum likelihood estimation. Some examples of Bayesian estimation in the context of HMRF are [START_REF] Friel | Bayesian inference in hidden Markov random fields for binary data defined on large lattices[END_REF][START_REF] Mcgrory | Variational Bayes for estimating the parameters of a hidden Potts model[END_REF] or [START_REF] Everitt | Bayesian parameter estimation for latent Markov random fields and social networks[END_REF].

4 corresponding to a simulated annealing with a temperature equel to 0 5 consisting in assigning a gene to the class that maximises the probability of the membership to this class given the observations, under the estimated parameter This article is organised as follows. Section 3.2 introduces our model and notation. More precisely, Section 3.2.1 describes the spatial graph model and notations, Section 3.2.2 gives the assumptions we make on the model parameters and Section 3.3 establishes the generic identifiability of the model under certain conditions. Section 3.4 describes the parameter estimation method, that is based on the simulated EM. Finally, Section 3.5 presents some results on simulations.

Model and notation

Definition of the model

We consider n species observed at L locations. At each location l, we observe interactions between the species, represented by an undirected binary graph with no self-loops, with adjacency matrix X l = {X l ij } 1≤i,j≤n such that for every nodes 1 ≤ i, j ≤ n, we have X l ii = 0 and X l ij = X l ji . The case of a set of directed graphs, with or without self-loops, may be handled similarly. The species are divided into Q ≥ 2 groups at each location, represented by the latent variables (Z 1 , . . . , Z n ) with

Z i = {Z l i } 1≤l≤L ∈ {1, . . . , Q} L . We will also denote Z l = (Z l 1 , . . . , Z l n ) and Z 1:L = (Z 1 , . . . , Z L ) = (Z l i ) 1≤l≤L,1≤i≤n
. All the Z i s are independent and each one follows a Gibbs distribution (more precisely we consider a Potts model), given by the known location graph G i = ({1, . . . , L}; E i ) with E i the set of edges. We allow the species to have different location graphs in order to model species with different movement behaviours between the observed locations. Figure 3.2 gives a graphical representation of the model.

We have for every species i according to the Potts model, denoting ψ i = (α i , β i ),

P ψ i (Z i ) =P ψ i (Z 1 i , . . . , Z L i ) = 1 S i (α i , β i ) exp   Q q=1 α iq L l=1 1 Z l i =q + β i (l,l ′ )∈E i 1 Z l i =Z l ′ i   := 1 S i (α i , β i ) exp [-H i (Z i )] (3.2.1) with S i (α i , β i ) the normalising constant, α i = (α iq ) 1≤q≤Q
, where α iq , β i ∈ R, and defining

H i the energy function H i (z i ) = H i (z 1 i , . . . , z L i ) = Q q=1 α iq L l=1 1 z l i =q + β i (l,l ′ )∈E i 1 z l i =z l ′ i .
The parameter α = (α iq ) 1≤q≤Q is the parameter of the external field, i.e. species i is more likely to be in groups associated with large values of α i = (α iq ) 1≤q≤Q . Note On the left, the three layers represent the graphs on locations of the three species (i.e. the three location graphs), and for each location (A, B, C and D), the dotted edges between layers represent the connection between species at that location. On the right are the observed interaction graphs between the 3 species at each of the four locations. Note that the representation on the right only contains the interactions graphs at each location, and not the space dependency between these locations. The Q classes are represented by colors on the nodes (green and purple).

that if α iq = 0 for all q ∈ 1, Q , all the groups are equally probable (a priori). The parameter β i determines the influence on the group of species i at a given location of the groups of the same species at neighbour locations (or the strength of interaction between neighbour locations). This means that the group membership of a species at a location and therefore its behaviour towards the other ones is influenced by the group membership of this species at the neighbour locations. More precisely, the membership to a group for a species i at location l is dependent on whether or not the species is in that same group at a neighbour location in the location graph G i . If β i is positive, the model encourages neighbours to be in the same group, and on the contrary, a negative β i encourages neighbours to be in different groups.

We write S i (α i , β i ) as follows

S i (α i , β i ) = z 1:L i exp   Q q=1 α iq L l=1 1 z l i =q + β i (l,l ′ )∈E i 1 z l i =z l ′ i   .
Note that the normalising constant is intractable in general because it requires a summation over all the Q L configurations. We can write the distribution of Z 1:L as follows, the Z l being independent,

P ψ (Z 1:L ) = n i=1 1 S i (α i , β i ) exp [-H i (Z i )] = 1 n i=1 S i (α i , β i ) exp - n i=1 H i (Z i )
where ψ = (ψ i ) 1≤i≤n . Each adjacency matrix X l then follows a stochastic block model so that, conditional on the latent groups {Z l i } 1≤i ≤n , the {X l ij } 1≤i<j≤n are independent Bernoulli random variables

X l ij | Z l i = q, Z l j = q ′ ∼ B(π l qq ′ ), i.e. P π (X l | Z l ) = 1≤i<j≤n (π l Z l i Z l j ) X l ij (1 -π l Z l i Z l j ) 1-X l ij , (3.2.2)
and π l qq ′ ∈ [0, 1] are the connectivity parameters, satisfying π l qq ′ = π l q ′ q for every 1 ≤ q, q ′ ≤ Q. The parameter of the model is θ

= (ψ, π) = (α, β, π) with • α = (α 1 , . . . , α n ) ∈ R nQ with α i = (α iq ) 1≤q≤Q the parameters of the external fields, • β = (β 1 , . . . , β n ) ∈ R n the interaction parameters, • π = (π l qq ′ ) 1≤q,q ′ ≤Q,1≤l≤L ∈ [0, 1] LQ(Q+1)/2
the symmetric matrices of connection probabilities.

We will denote in the following z -i = (z 1 , . . . , z i-1 , z i+1 , . . . , z n ) for any i ∈ 1, n , i.e. the latent variables for every node except i, and identically we will denote z -l = (z 1 , . . . , z l-1 , z l+1 , . . . , z L ) for any l ∈ 1, L , i.e. the latent variables at every location except l. Let us also denote Z l iq = 1 Z l i =q for every l, i and q, and

Z l i = (Z l iq ) 1≤q≤Q ∈ {0, 1} Q .

Assumptions

We impose some constraints on these model parameters for identifiability purposes (see Section 3.3). The assumptions we make are the following.

1. For every i ∈ 1, n , the parameter α i satisfies Q q=1 α iq = 0.

2. For every q ∈ 1, Q , for any l, l ′ ∈ 1, L , we have π l qq = π l ′ qq := π qq .

For every

l ∈ 1, L , the values {π l qq ′ } 1≤q≤q ′ ≤Q are Q(Q + 1)/2 distinct values.
We make Assumption 1 in order for the Potts model to be identifiable. Indeed, adding the same constant to all the α iq for any i ∈ 1, n leads to the same distribution. Note that when considering the estimation of the parameters (in Section 3.4), we will equivalently impose that α i1 = 0 for every i ∈ 1, n . Assumptions 2 and 3 are sufficient for the identifiability of the model, to avoid label switching issues between the different locations. We denote by Θ the set of parameters satisfying these constraints.

Identifiability

In this section, we establish the generic identifiability of our model under the assumptions of Section 3.2.2. We first state the identifiability of the Potts model, for any i ∈ 1, n . Lemma 3.3.1. For each i ∈ 1, n , the parameters ψ i = (α i , β i ) of the Potts model as defined in (3.2.1) satisfying Assumption 1 are identifiable from the distribution of Z 1:L i , as long as there is at least one edge in the location graph G i (implying that L ≥ 2).

We believe that this result is known, but did not find a written proof of it. We then give the proof of Lemma 3.3.1 in Appendix B.1 for completeness. Then, for the identifiability of our model, we follow the proof of Theorem 2 in [START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF] (see also Theorem 2 in [START_REF] Becker | Nonparametric identification in the dynamic stochastic block model[END_REF]) based on Kruskal's theorem (see for example Theorem 16 in [START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF]) to prove the generic identifiability of our model, meaning that the nonidentifiable parameters form a set of Lebesgue measure zero. Note that we obtain this identifiability up to label permutation of the groups (as in any latent groups model), meaning that we can only recover θ σ with σ in S Q the set of permutations on 1, Q , where

θ σ = (α σ , β, π σ ) = (α iσ(q) ) 1≤i≤n,1≤q≤Q , (β i ) 1≤i≤n , (π σ(q)σ(q ′ ) ) 1≤q,q ′ ≤Q .
Note that the permutation does not affect β, at it applies only on the latent groups.

Proposition 3.3.1. Under Assumptions 1 to 3, the parameter θ = (α, β, π) is generically identifiable up to label permutation from the distribution of X 1:L , if there is at least one edge in each location graph and n ≥ m 2 , where

   m ≥ Q -1 + Q+2 2 2 if Q is even, m ≥ Q -1 + (Q+1)(Q+3) 4 if Q is odd.
Remark 3.3.1. Following the proof of Theorem 5 in [START_REF] Allman | Identifiability of parameters in latent structure models with many observed variables[END_REF] would allow to get a better result for the case Q = 2, obtaining the identifiability for n ≥ 16 instead of n ≥ 25. We will not give more details about that.

Note that as in [START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF] the generic aspect concerns only the part of the parameter space with the connectivity parameter, i.e. the π qq ′ s. This means that α and β are identifiable (not only generically) from the distribution of X 1:L . In particular, a Potts model without external field (i.e. with α iq = 0 for every i and q) is still generically identifiable (even though this restriction on the parameter reduces the parameter space to a subspace of smaller dimension).

Proof of Proposition 3.3.1. Following the lines of the proof of Theorem 2 in [START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF], for any number m of species, we denote by A l the Q m × 2 ( m 2 ) matrix of conditional probabilities of observing all possible species interaction graph configurations

X l ∈ {0, 1} ( m
2 ) , conditioned on node states Z l = (Z l 1 , . . . , Z l m ) ∈ {1, . . . , Q} m at location l for each l ∈ 1, L . We then write, denoting by ⊗ the Kronecker product, (3.3.1) this Q mL × 2 L( m 2 ) matrix being the matrix of conditional probabilities of observing all possible sets of species interaction graphs X 1:L , conditioned on node states at all locations Z 1:L . It is established in the proof of Theorem 2 in [START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF] that each matrix A l has generically full row rank as soon as

A = A 1 ⊗ A 2 ⊗ . . . ⊗ A L ,
   m ≥ Q -1 + Q+2 2 2 if Q is even, m ≥ Q -1 + (Q+1)(Q+3) 4 if Q is odd.
Then from its definition 3.3.1, A has also generically full row rank. We will then conclude the proof thanks to a lemma similar to Lemma 16 in [START_REF] Allman | Identifiability of parameters in latent structure models with many observed variables[END_REF] that we write below. Let us define before K n the graph on the nL nodes {(l, i)} 1≤i≤n,1≤l≤L that is the union of the L complete graphs at each location, i.e. such that there is an edge between (l, i) and (l ′ , i ′ ) if and only if l = l ′ (and i ̸ = i ′ so that there is no self loop).

Lemma 3.3.2. If the Q mL × 2 L( m 2 ) matrix A defined in (3.3.1) has rank Q mL , then with n = m 2 there exist pairwise edge-disjoint subgraphs G 1 , G 2 , G 3 of K n such that for each G k (1 ≤ k ≤ 3), the matrix of probabilities B k of observing subgraphs of G k conditioned on node state assignments has rank Q nL .
Proof of Lemma 3.3.2. The proof of that lemma is similar to that of Lemma 16 from [START_REF] Allman | Identifiability of parameters in latent structure models with many observed variables[END_REF], except for the construction of the G k s. We do the same partition

• • • • • • • • • • • • • • • • l = 1 ⃝ ⃝ (1, 4, 1) (1, 1, 1) (1, 2, 1) (1, 1, 2) (1, 1, 4) (1, 4, 4) • • • • • • • • • • • • • • • • l = 2 ⃝ ⃝ • • • • • • • • • • • • • • • • l = 3 ⃝ ⃝ Fig. 3.3
Partitions for m = 4 and L = 3. In red, the mL = 12 sets of the partition leading to G 1 , in green the mL sets of the partition leading to G 2 , and in blue, the mL sets of the partition leading to G 3 . More precisely, the sets of the partition leading to G 3 are for each l {(l, 1, 1), (l, 2, 2), (l, 3, 3), (l, 4, 4)}, {(l, 1, 2), (l, 2, 3), (l, 3, 4), (l, 4, 1)}, {(l, 1, 3), (l, 2, 4), (l, 3, 1), (l, 4, 2)}, {(l, 1, 4), (l, 2, 1), (l, 3, 2), (l, 4, 3)}.

as in [START_REF] Allman | Identifiability of parameters in latent structure models with many observed variables[END_REF] separately for each l, i.e. we picture the nodes as lattice points in L square grids and take as the partition leading to G 1 the rows of the grids, as the partition leading to G 2 the columns of the grids and as the partition leading to G 3 the diagonals of the grids, each G k then being the union of mL complete subgraphs. Explicitly, we label the nodes by (l, i, j) ∈ {1, . . . , L} × {1, . . . , m} × {1, . . . , m} such that {(l, i, j)} 1≤i,j≤m is the set of n = m 2 nodes at location l for any l ∈ L (and two nodes (l, i, j) and (l ′ , i, j) corresponding to the same species at locations l and l ′ ). We can then write P k = {V k l,j ; l ∈ {1, . . . , L}, j ∈ {1, . . . , m}} denoting the partition of the node set leading to G k with V 1 l,j = {(l, j, i); i ∈ {1, . . . , m}}, V 2 l,j = {(l, i, j); i ∈ {1, . . . , m}}, V 3 l,j = {(l, i, i + j mod m); i ∈ {1, . . . , m}} and each G k is the union over (l, j) ∈ {1, . . . , L} × {1, . . . , m} of the complete graphs on node set V k l,j . By construction, the G k s have no edge in common, and are thus independent given Z 1:L . See example in Figure 3.3.

Then, up to a reordering of the rows and columns, the matrix B k of conditional probabilities of observing all possible subgraphs of G k conditioned on node states can be written as the m-th Kronecker power of A

B k = A ⊗m = (A 1 ⊗ A 2 ⊗ . . . ⊗ A L ) ⊗m . (3.3.2)
We already stated that A has generically full row rank under our assumptions, and then so has B k . This concludes the proof of Lemma 3.3.2.

Going back to the proof of Proposition 3.3.1 and as in [START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF], we can apply Kruskal's theorem that gives that the set (v := P θ (Z

1:L = •), {B k = P θ (G k = • | Z 1:L = •)} 1≤k≤3
) is generically identifiable up to label swapping, from the distribution of the random variables G 1 , G 2 , G 3 and thus from that of X 1:L (for n large enough with respect to Q). To conclude, we need to identify the parameters (those of the Potts models, i.e. (α iq ) 1≤i≤n,1≤q≤Q and (β i ) 1≤i≤n , and the connection probability matrices (π l qq ′ ) 1≤l≤L,1≤q,q ′ ≤Q ). Recall that we assume that ∀q ∈ 1, Q , the within-group connection probability is the same for every location l, i.e. π l qq = π l ′ qq := π qq for any l, l ′ ∈ 1, L , and also that the values {π qq } 1≤q≤Q are all distinct. We also assume that for any l ∈ 1, L the (π l qq ′ ) 1≤q≤q ′ ≤Q are all distinct. To identify the parameters, we rely on the same technique as in the proof of Theorem 2 in [START_REF] Becker | Nonparametric identification in the dynamic stochastic block model[END_REF] and on the conclusion of the proof of Theorem 2 in [START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF]. We focus on the matrix B 1 , and doing marginalisations as in those proofs for every edge in G 1 , we can identify the values (π qq ) 1≤q≤Q (choosing an arbitrary labeling) and then (π l qq ′ ) 1≤q̸ =q ′ ≤Q . Having identified all the connection probabilities, we can isolate the entries of v corresponding to the configurations such that Z 1:L i is fixed (equal to some c ∈ 1, Q L ). We describe how we identify those entries. To find the rows corresponding to configurations in which Z l i = q for some q ∈ 1, Q , i ∈ 1, n and l ∈ 1, L , we choose some j, k ∈ 1, n such that i, j, and k are in the same set in the partition used to construct G 1 and we sum the columns for which X l ij = 1, those for which X l ik = 1, and those for which X l jk = 1. Doing so, we obtain the values of π l

Z l i Z l j , π l Z l i Z l k and π l Z l j Z l k
and can therefore identify for every row of B 1 the values of Z l i , Z l j and Z l k thanks to the assumption that (π l qq ′ ) 1≤q,q ′ ≤Q are distinct values and to the fact that we identified these quantities earlier. Doing this for all i ∈ 1, n and l ∈ 1, L , we can obtain the entry in v corresponding to any configuration of the nL nodes. Summing the entries corresponding to the configurations such that Z 1:L i = c, we obtain the probability P θ (Z 1:L i = c). Doing this for every possible c and for every i, we have the probability distribution of each Markov field. Now using Lemma 3.3.1, stating that we can identify the parameters of the Potts model for a species i from the distribution of Z 1:L i , allows us to recover the α iq s and β i s and to conclude the proof.

Particular case of the affiliation model: a counter-example

The constraint imposed on each π l in Assumption 3 (that its values (π l qq ′ ) 1≤q≤q ′ ≤Q are distinct) implies that the result of Proposition 3.3.1 does not apply to the particular case of the affiliation model for the conditional distribution of the graphs X l . Indeed, in the affiliation model, the parameter π is determined by the values π l qq = π l in for every q ∈ 1, Q (withingroup connection probability) and π l qq ′ = π l out for every q ̸ = q ′ ∈ 1, Q (between-groups connection probability) at each location l.

The identifiability result of Proposition 3.3.1 actually does not hold in general for the affiliation model. Indeed we exhibit in the proposition below a particular example of an affiliation model (satisfying Assumptions 1 and 2 but not Assumption 3) without external field6 whose parameters are not identifiable. Note that this is a partial result, as the model might be identifiable in the affiliation case at the cost of some additional assumptions. The exhibition of such counter-example allows us to have some insights about the constraints we could impose in order to obtain identifiability. Proposition 3.3.2. Assume that all the species have the same location graphs G i = G = (V, E) with no cycle of odd length and the same parameter β i = β, and that there is no external field, i.e. α iq = 0 for every i ∈ 1, n and q ∈ 1, Q . Assume also that Q = 2 and that π l qq = π in (so that Assumption 2 is satisfied) and that π l qq ′ = π l out for any q ̸ = q ′ ∈ 1, Q and l ∈ 1, L . Then, the parameter θ = (β, π) of the model cannot be identified.

This result holds in particular for first order lattices as location graphs, such lattices containing only cycles of even length.

Proof of Proposition 3.3.2. We are going to show that for any parameter θ = (β, π) satisfying the assumptions in the proposition, the parameter θ = ( β, π), defined such that β = -β and π = π, leads to the same distribution as θ for X 1:L . For any possible configuration z 1:L , we construct a transformed version z1:L of z 1:L as follows. Let us choose a starting location l ∈ 1, L (for example location 1 in Figure 3.4) and set zl = z l (i.e. zl i = z l i for every i ∈ 1, n ). Then for every neighbour location l ′ of l (in our case, locations 2 and 3), let us set zl ′ i = 1 if z l ′ i = 2 and zl ′ i = 2 if z l ′ i = 1 for every i ∈ 1, n7 . Then for any neighbour location l ′′ of each l ′ that has not been visited yet (in our case, locations 4,5 and 6), let us set zl ′′ = z l ′′ . Continue until the whole z1:L has been defined. In short, this means that we must define z1:L such that for any two neighbour locations, z must necessarily be permuted at exactly one of the two locations. This is possible thanks to the absence of cycles of odd length. See figure 3.4 for a graphical representation. For any configuration z 1:L , for the locations in green, zl is the same than z l . For the locations in purple, zl is equal to a permutation (switching the groups 1 and 2) of z l . The absence of cycles of odd length implies that two nodes of the same colour cannot be neighbours.

We can write the probability distribution of X 1:L as follows

P θ (X 1:L ) = z 1:L P π (X 1:L | Z 1:L = z 1:L )P ψ (Z 1:L = z 1:L ) = z 1:L      L l=1 i<j (π l z l i z l j ) X l ij (1 -π l z l i z l j ) 1-X l ij   n i=1 1 S(β) exp   (l,l ′ )∈E β1 z l i =z l ′ i      = z 1:L      L l=1 i<j (π in ) 1 z l i =z l j (π l out ) 1 z l i ̸ =z l j X l ij 1 -(π in ) 1 z l i =z l j (π l out ) 1 z l i ̸ =z l j 1-X l ij   × n i=1 1 S(β) exp   (l,l ′ )∈E β1 z l i =z l ′ i      .
Then, using the definitions of β, π and z, and in particular noticing that

• if locations l and l ′ are neighbours,

z l i = z l ′ i ⇐⇒ zl i ̸ = zl ′ i for any i ∈ 1, n ,
• z l i = z l j ⇐⇒ zl i = zl j for any i, j ∈ 1, n and any l ∈ 1, L , we have

P θ (X 1:L ) = z 1:L      L l=1 i<j (π in ) 1 zl i =z l j (π l out ) 1 zl i ̸ =z l j X l ij 1 -(π in ) 1 zl i =z l j (π l out ) 1 zl i ̸ =z l j 1-X l ij   × n i=1 1 S(β) exp   - (l,l ′ )∈E β1 zl i ̸ =z l ′ i      .
Finally, using the fact that summing over the z1:L is equivalent to summing over the z 1:L and that

1 zl i ̸ =z l ′ i = 1 -1 zl i =z l ′ i P θ (X 1:L ) = z1:L      L l=1 i<j (π in ) 1 zl i =z l j (π l out ) 1 zl i ̸ =z l j X l ij 1 -(π in ) 1 zl i =z l j (π l out ) 1 zl i ̸ =z l j 1-X l ij   × n i=1 1 S(β) exp(|E| β) exp   (l,l ′ )∈E β1 zl i =z l ′ i      = z 1:L      L l=1 i<j (π in ) 1 z l i =z l j (π l out ) 1 z l i ̸ =z l j X l ij 1 -(π in ) 1 z l i =z l j (π l out ) 1 z l i ̸ =z l j 1-X l ij   × n i=1 1 S(β) exp(|E| β) exp   (l,l ′ )∈E β1 z l i =z l ′ i      .
We can then express this probability distribution in terms of the parameter θ, the two parameters then leading to the same distribution. This relies on the fact that the probability of observing any z 1:L under the parameter β is the same as that of observing z1:L under the parameter β, and that the distribution of X 1:L given Z 1:L = z 1:L under parameter π is the same as that of X 1:L given Z 1:L = z1:L under the parameter π = π (due to the fact that we are in an affiliation model). We remark that the

Estimation

Likelihood

We can write the conditional log-likelihood and the likelihood, using the conditional independence of the X l ij s (given the Z l i s), as

log P θ (X 1:L |Z 1:L = z 1:L ) = L l=1 log P π (X l |Z l = z l ) = L l=1 i<j X l ij log π l z l i z l j + (1 -X l ij ) log(1 -π l z l i z l j ) (3.4.1)
and

P θ (X 1:L ) (3.4.2) = z 1:L P π (X 1:L |Z 1:L = z 1:L )P ψ (Z 1:L = z 1:L ) = z 1:L   L l=1 P π (X l |Z l = z l ) n i=1 1 S i (α i , β i ) exp   Q q=1 α iq L l=1 1 z l i =q + β i (l,l ′ )∈E i 1 z l i =z l ′ i     = z 1:L      L l=1 i<j (π l z l i z l j ) X l ij (1 -π l z l i z l j ) 1-X l ij    × n i=1 1 S i (α i , β i ) exp   Q q=1 α iq L l=1 1 z l i =q + β i (l,l ′ )∈E i 1 z l i =z l ′ i     . (3.4.3)
The log-likelihood is then written

log P θ (X 1:L ) = log   z 1:L P π (X 1:L |Z 1:L = z 1:L )P ψ (Z 1:L = z 1:L )   . (3.4.4)
This is the quantity we would like to maximise to estimate the model parameters, but as we will see in the following, we will not be able to maximise it directly.

Maximum likelihood approach

We want to estimate the model parameters relying on a maximum likelihood approach.

We then want to maximise the following quantity

P θ (X 1:L ) = z 1:L      L l=1 i<j (π l z l i z l j ) X l ij (1 -π l z l i z l j ) 1-X l ij    × n i=1 1 S i (α i , β i ) exp   Q q=1 α iq L l=1 1 z l i =q + β i (l,l ′ )∈E i 1 z l i =z l ′ i     .
We cannot maximise it directly because the computation of this quantity involves a summation over all the Q nL possible latent configurations, in addition to the normalising constants S i (α i , β i ) being intractable. We cannot either use the Expectation-Maximization (EM) algorithm to approximate it because it involves the computation of the conditional distribution of the latent variables given the observations which is not tractable, and it still involves the intractable normalising constants. We will then rely on an alternative of the EM algorithm, the simulated field algorithm as defined in [START_REF] Celeux | EM procedures using mean field-like approximations for Markov model-based image segmentation[END_REF]. It consists of simulating a latent configuration and using a mean-field like approximation (for the conditional distribution of the latent variables given the observations, and the distribution of the latent variables) in order to make the considered conditional distribution and the normalising constant tractable. The approximation consists in replacing the intractable distributions by distributions that factorise over the locations, and such that for each location, the neighbours of this location are fixed at the values of the simulated configuration.

EM algorithm

We first describe briefly the EM algorithm [START_REF] Dempster | Maximum likelihood from incomplete data via the EM algorithm[END_REF] in this case and see why we need to use an alternative. EM is an iterative algorithm used to approximate maximum likelihood estimates of parameters in statistical models, in the presence of latent variables. We start with some initial value of the parameter θ (0) = (ψ (0) , π (0) ) = (α (0) , β (0) , π (0) ). At iteration t of the EM algorithm, we want to maximise with respect to θ the quantity

Q(θ|θ (t-1) ) =E θ (t-1) log P θ Z 1:L , X 1:L X 1:L =E θ (t-1) log P π X 1:L | Z 1:L X 1:L + E θ (t-1) log P ψ Z 1:L X 1:L
:=Q 1 (π|θ (t-1) ) + Q 2 (α, β|θ (t-1) ).

(3.4.5)

Notice that the first term Q 1 only depends on the connection probabilities (or emission parameter) π whereas the second term Q 2 only depends on the parameters α and β of the Gibbs distribution. We can write for the first term

Q 1 (π|θ (t-1) ) = E θ (t-1)   L l=1 i<j X l ij log π l Z l i Z l j + (1 -X l ij ) log(1 -π l Z l i Z l j ) X 1:L   = L l=1 z l i<j X l ij log π l z l i z l j + (1 -X l ij ) log(1 -π l z l i z l j ) P θ (t-1) z l X 1:L . (3.4.6)
The second term can be written as follows

Q 2 (α, β|θ (t-1) ) =E θ (t-1)   n i=1   -log S i (α i , β i ) + Q q=1 α iq L l=1 1 Z l i =q + (l,l ′ )∈E i β i 1 Z l i =Z l ′ i   X 1:L   = n i=1     -log S i (α i , β i ) + Q q=1 α iq L l=1 P θ (t-1) Z l i = q X 1:L + β i (l,l ′ )∈E i P θ (t-1) Z l i = Z l ′ i X 1:L     . (3.4.7)
Each iteration is composed of two consecutive steps (E-step and M-step). The E step consists in computing the quantity Q(θ|θ (t-1) ), and the M (Maximization) step consists in maximising this quantity with respect to θ to obtain θ (t) , the estimate at step t.

It is proven that the log-likelihood increases at each iteration. Here, the E step is intractable because neither the normalising constants S i (α i , β i ) appearing in Q 2 nor the distribution of the latent variables given the observations (needed in both Q 1 and Q 2 ) can be computed. Using a mean-field like approximation for both the distribution of the latent variables and of the latent variables given the observations will solve these problems. We will describe this method in the following section.

Mean-field like approximation

The idea of this approach is to replace the intractable distributions (of the latent variables, and of the latent variables given the observations) with simpler distributions. We use a mean-field like approximation in the EM algorithm, both for the distribution of the latent variables and that of the latent variables given the observations. The mean field like approximation, in a classical setup (when considering a single HMRF), consists in considering approximations of the distributions that factorise over the locations, where for each location l, the values of the latent variable at neighbour locations of l are set to deterministic values. This approach is a generalisation of the mean-field approximation (see [START_REF] Chandler | Introduction to modern statistical mechanics[END_REF]; [START_REF] Celeux | EM procedures using mean field-like approximations for Markov model-based image segmentation[END_REF] and Appendix B.2), in which the fixed values of the neighbours are their means. In our setup, we will consider approximate distributions factorising over both the locations and species. More precisely, given a fixed configuration z1:L , the distribution of Z 1:L appearing in Q 2 is approximated by the following distribution

P z ψ (Z 1:L = z 1:L ) := L l=1 n i=1 P ψ (Z l i = z l i | Z -l i = z-l i ) = L l=1 n i=1 P ψ (Z l i = z l i | Z N i (l) i = zN i (l) i ) (3.4.8)
where N i (l) is the set of neighbours of l in the location graph G i of species i, i.e.

N i (l) = {l ′ ; (l, l ′ ) ∈ E i }.
Moreover note that

P ψ (Z l i | Z N i (l) i = zN i (l) i ) = exp α iZ l i + β i l ′ ∈N i (l) 1 Z l i =z l ′ i Q q=1 exp(α iq + β i l ′ ∈N i (l) 1 q=z l ′ i ) .
(3.4.9)

Now, for the distribution of the latent variable Z 1:L given the observations X 1:L (that appears in the expectation in both Q 1 and Q 2 ), we consider instead given a fixed configuration z1:L the following approximation (3.4.10) where ∝ means "proportional to", and X l i = (X l i1 , . . . , X l in ). Note that we make two approximations here, for the probability distribution of Z 1:L in (3.4.8), as in the classical mean field like approximation, and an additional approximation for the conditional probability distribution of Z 1:L given X 1:L , assuming that the neighbours of a location are fixed (set to the values zN i (l) i

P z θ (t-1) (Z 1:L = z 1:L | X 1:L ) ∝P z π (t-1) (X 1:L | Z 1:L = z 1:L )P z ψ (t-1) (Z 1:L = z 1:L ) ∝ L l=1 n i=1 P π (t-1) (X l i | Z l i = z l i , Z l -i = zl -i )P ψ (t-1) (Z l i = z l i | Z N i (l) i = zN i (l) i ) ∝ L l=1 n i=1 P θ (t-1) (z l i | Z N i (l) i = zN i (l) i , Z l -i = zl -i , X l i ),
), but also the values of the other species at the same location (set to zl -i ).

Simulated EM Algorithm

We consider an EM algorithm with a mean-field like approximation, and in particular the simulated EM [START_REF] Celeux | EM procedures using mean field-like approximations for Markov model-based image segmentation[END_REF], in which the mean field like approximation is based on a realisation of the conditional distribution of the latent variables given the observations. At each step t of the algorithm, we approximate the distribution of the latent variables given the observations and the distribution of the latent variables by their mean-field like approximations as defined in (3.4.10) and (3.4.8) respectively, where z1:L is drawn from the distribution P θ (t-1) (Z 1:L | X 1:L ) thanks to a Gibbs sampler. This will allow us to compute the expectations with respect to that distribution of Z 1:L given X 1:L (see Equation (3.4.5)) and to get rid of the intractable normalising constant in the term

P ψ (Z 1:L ) appearing in Q 2 .
Each iteration t of the algorithm is then divided into two steps. One consists in simulating a configuration z1:L from a current parameter value θ (t-1) and from the observations X 1:L using a Gibbs sampler, in order to replace the distributions (of Z 1:L and of Z 1:L given the observations X 1:L ) by their mean-field like approximations. The second one is an EM algorithm iteration (using the mean-field like approximations). Our algorithm is summarised in Algorithm 6.

Step 1: Simulation of a configuration for the mean-field like approximation

The first step is the simulation of a configuration z1:L from the conditional distribution P θ (t-1) (Z 1:L | X 1:L ) relying on a Gibbs sampler.

Gibbs sampling

The Gibbs sampling algorithm is such that at each iteration m ∈ 1, M , for each l ∈ 1, L and i ∈ 1, n , z (m)l i is simulated from the distribution

P θ (t-1) (Z l i | X l , z -l , z l -i ) = P θ (t-1) (Z l i | X l , z N i (l) i , z l -i ) ∝ P π (t-1) (X l | Z l i , z l -i )P ψ (t-1) (Z l i | z N i (l) i ) (3.4.11)
where z 1:L is the current configuration in the algorithm, and recalling that the probability of the observations at location l given the latent classes of the species at this location is given in (3.2.2) and that the probability

P ψ (t-1) (Z l i | z -l i ) of Z l i
given the values of z -l i at the other locations depends only on the neighbour locations and is given in (3.4.9). More precisely, we use Algorithm 5. Note that in order for the Gibbs sampler to be valid, we must update at each step m the nL components of the configuration one at a time and not simultaneously.

Algorithm 5: Conditional Gibbs sampler

input : A number of iterations M , a collection of location graphs G 1 , . . . G n , a parameter θ (t-1) = (α (t-1) , β (t-1) , π (t-1) ) output : A realisation of the random variable Z 1:L ∼ P θ (t-1) (• | X 1:L ) 1 Initialise an arbitrary configuration z (0)1:L ; 2 for m = 1 to M do 3 for l = 1 to L do In practice, at each iteration of the simulated EM algorithm, we only carry out a single (M=1) or just a few iterations of the Gibbs sampler, starting from the previous configuration.

4 for i = 1 to n do 5 z 1:L ← (z (m)1:l-1 , z (m)l 1:i-1 , z (m-1)l i:n , z (m-1)l+1:L ); 6 Draw z (m)l i from the conditional distribution P θ (t-1) (Z (m)l i | X 1:L , z l -i , z -l )

Step 2: EM iteration

As mentioned before, the mean-field like approximation based on the configuration drawn in the first step of the algorithm is what makes this second step tractable. Indeed, replacing the conditional distribution P θ (t-1) (Z 1:L | X 1:L ) by its approximation in (3.4.10) solves the problem of the computation of the conditional expectations appearing in Q 1 and Q 2 , and replacing the marginal distribution P ψ (Z 1:L i ) by L l=1 P ψ (Z l i | Z N i (l) = zN i (l) ) for every i ∈ 1, n solves the problem of the computation of the normalising constants appearing in Q 2 . Recalling that we denote by θ (t-1) = (α (t-1) , β (t-1) , π (t-1) ) the previous parameter (at iteration t -1), we have at iteration t the following two steps of the algorithm.

E step

We want to compute the approximations of the quantities Q 1 (π|θ (t-1) ) and Q 2 (α, β|θ (t-1) ) (see (3.4.5)). Recall that Q 1 and Q 2 are given by (3.4.6) and (3.4.7) respectively. Lemma 3.4.1. The approximations Q1 and Q2 of Q 1 and Q 2 respectively under the mean-field like approximation based on z1:L are given by

Q1 (π|θ (t-1) ) = 1≤q<q ′ ≤Q L l=1 i̸ =j P z θ (t-1) (Z l i = q | X l )P z θ (t-1) (Z l j = q ′ | X l )f (X l ij , π l qq ′ ) + Q q=1 L l=1 i<j P z θ (t-1) (Z l i = q | X l )P z θ (t-1) (Z l j = q | X l )f (X l ij , π qq ) (3.4.12) and Q2 (α, β|θ (t-1) ) = n i=1 L l=1          Q q=1 α iq P z θ (t-1) Z l i = q X l   + β i l ′ ∈N i (l) P z θ (t-1) Z l i = zl ′ i X l -log   Q q=1 exp   α iq + β i l ′ ∈N i (l) 1 q=z l ′ i            . (3.4.13) where f (X l ij , π l qq ′ ) is the probability of X l ij conditional to π l Z l i Z l j = π l qq ′ , i.e. f (X l ij , π l qq ′ ) = P π (X l ij | Z l i = q, Z l j = q ′ ) = X l ij log π l qq ′ + (1 -X l ij ) log(1 -π l qq ′ )
and where P z stands for a probability distribution under the mean field like approximation based on z1:L and is given in this case by

P z θ (t-1) (Z l i = q | X l ) = P π (t-1) (X l i | Z l -i = zl -i , Z l i = q)P ψ (t-1) (Z l i = q | Z N i (l) i = zN i (l) i ) z l i ∈ 1,Q P π (t-1) (X l i | Z l i = z l i , Z l -i = zl -i )P ψ (t-1) (Z l i = z l i | Z N i (l) i = zN i (l) i ) .
A proof of this lemma can be found in Section 3.6. Note that all the quantities appearing in Q1 and Q2 can now be computed easily, and we will then be able to maximise them in the following M-step.

M step

The aim of the M-step is then to maximise respectively with respect to π and (α, β) the approximations of the quantities Q 1 (π|θ (t-1) ) and Q 2 (α, β|θ (t-1) ) obtained above. This is the role of the two following lemmas. Lemma 3.4.2. The parameter π maximising the approximation Q1 (π|θ (t-1) ) (see Equation (3.4.12)) of Q 1 (π|θ (t-1) ) satisfies for every l ∈ 1, L and any 1 ≤ q ̸ = q ′ ≤ Q

πl qq ′ = i̸ =j P z θ (t-1) (Z l i = q | X l )P z θ (t-1) (Z l j = q ′ | X l )X l ij i̸ =j P z θ (t-1) (Z l i = q | X l )P z θ (t-1) (Z l j = q ′ | X l ) (3.4.14)
and for any q ∈ 1,

Q πqq = L l=1 i<j P z θ (t-1) (Z l i = q | X l )P z θ (t-1) (Z l j = q | X l )X l ij L l=1 i<j P z θ (t-1) (Z l i = q | X l )P z θ (t-1) (Z l j = q | X l ) . (3.4.15)
The proof of this lemma is immediate, consisting in differentiating Q1 (π|θ (t-1) ) (in Equation (3.4.12)) with respect to π l qq ′ for any q, q ′ ∈ 1, Q and l ∈ 1, L and setting these derivatives equal to zero, and is therefore omitted. We then state a result for the maximisation of Q2 (α, β|θ (t-1) ) with respect to α, β. We recall that we impose the constraint α i1 = 0 on the parameter. Lemma 3.4.3. The parameter (α, β) maximising the approximation Q2 (α, β|θ (t-1) ) (see Equation (3.4.13)) of Q 2 (α, β|θ (t-1) ) satisfies for any i ∈ 1, n αi1 = 0, ∂ Q2 (α, β|θ (t-1) ) ∂α iq = 0 ∀q ∈ 2, Q and ∂ Q2 (α, β|θ (t-1) )

∂β i = 0
where

∂ Q2 (α, β|θ (t-1) ) ∂α iq = L l=1 P z θ (t-1) (Z l i = q | X l ) - L l=1 exp α iq + β i l ′ ∈N i (l) 1 zl ′ i =q Q q ′ =1 exp α iq ′ + β i l ′ ∈N i (l) 1 zl ′ i =q ′ (3.4.16) and ∂ Q2 (α, β|θ (t-1) ) ∂β i = L l=1 l ′ ∈N i (l) P z θ (t-1) (Z l i = zl ′ i | X l ) - L l=1 Q q=1 l ′ ∈N i (l) 1 zl ′ i =q exp α iq + β i l ′ ∈N i (l) 1 zl ′ i =q Q q=1 exp α iq + β i l ′ ∈N i (l) 1 zl ′ i =q . (3.4.17)
The proof of this lemma is also immediate and is omitted. Note that we do not obtain a closed-form expression for the parameters α and β for which the derivatives in (3.4.16) and (3.4.17) are equal to zero, and need to rely on numerical methods. We choose to use a Newton-Raphson algorithm to find the zeros of these derivatives.

Remark 3.4.1. Note that we could also consider the particular case where the parameters of the MRF (α and β) are the same for every species (and then are denoted by α = (α q ) 1≤q≤Q ∈ R Q and β ∈ R). In that case, the derivatives with respect to α q and β are respectively

∂ Q2 (α, β|θ (t-1) ) ∂α q = n i=1 L l=1 P z θ (t-1) (Z l i = q | X l ) - n i=1 L l=1 exp α q + β l ′ ∈N i (l) 1 zl ′ i =q Q q ′ =1 exp α q ′ + β l ′ ∈N i (l) 1 zl ′ i =q ′ , and ∂ Q2 (α, β|θ (t-1) ) ∂β = n i=1 L l=1 l ′ ∈N i (l) P z θ (t-1) (Z l i = zl ′ i | X l ) - n i=1 L l=1 Q q=1 l ′ ∈N i (l) 1 zl ′ i =q exp α iq + β i l ′ ∈N i (l) 1 zl ′ i =q Q q=1 exp α iq + β i l ′ ∈N i (l) 1 zl ′ i =q .
Algorithm 6: Simulated EM for the space-evolving SBM input : A collection of observed graphs X 1:L , a collection of location graphs G 1 , . . . , G n , a number of groups Q, an initial parameter θ (0) = (α (0) , β (0) , π (0) ) output : A parameter estimate θ

1 Initialise an arbitrary configuration z(0)1:L and t = 0; 2 while the algorithm has not converged do

Initialisation and stopping criterion of the algorithm

It is well known that the EM algorithm may only find a local maximum of the likelihood, depending on the initial parameter. The usual strategy is then to run the algorithm multiple times with different initialisations and compare the obtained estimators in terms of the likelihood. Here we cannot compute the likelihood, but we can rely on the approximation Q of Q obtained in the final iteration of the algorithm in order to choose the best estimator. We can also use this approximation for stopping the algorithm. We can start from some random initial parameters, or from a "reasonable" value of the parameter, as we now describe. We start by performing an absolute spectral clustering of the nodes at each location and thus obtain an estimated clustering ẑl at each location l. At each location l, the initial connection probabilities π (0)l are computed from ẑl8 , and the rows and columns of π (0)l are permuted such that the diagonal is in ascending order (in order to take into account the potential label switching between the different locations). The initial parameter α (0) is defined as follows for every

i ∈ 1, n α (0) i1 = 0 and α (0) iq = 1 L L l=1 1 ẑl i =q - L l=1 1 ẑl i =1 ∀q ∈ 2, Q .
The parameter β is initialised at (0, . . . , 0) (no interaction). In Section 3.5, we will start from four different initialisations, three random ones and one "reasonable" initialisation that we just described. We observe that the estimators obtained at the different steps of our algorithm are not stable, i.e. do not seem to converge to a fixed value, but their trajectories seem however to exhibit a similar limiting behaviour around a fixed value. As pointed out in [START_REF] Forbes | Combining Monte Carlo and mean-field-like methods for inference in hidden Markov random fields[END_REF], the convergence of this algorithm might need to be understood in terms of the ergodic behaviour of the process of the estimators at each step, as it is the case for the stochastic EM (see [START_REF] Diebolt | Asymptotic properties of a stochastic EM algorithm for estimating mixing proportions[END_REF][START_REF] Feodor Nielsen | The stochastic EM algorithm: estimation and asymptotic results[END_REF]) in which this process is an homogeneous Markov chain that is ergodic under mild conditions and converges to its stationary distribution. We thus choose to compute a mean of the parameter estimators of the last iterations of the algorithm. We use a stopping condition that is

| Q(t) -Q(t-1) |/| Q(t-1) | < 10 -5
, then let the algorithm perform 30 more iterations and take the mean of the parameters and of Q over these 30 iterations. We finally keep the estimator corresponding to the initialisation leading to the highest mean of Q over the last 30 iterations. q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q -0. q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q -0.5 0 0.5 q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q 0.2 0.5

Proofs

Proof of Lemma 3.4.1. The mean-field like approximations of Q 1 consists in replacing the expectation with respect to the conditional distribution of the latent variables Z 1:L given the observations X 1:L by the expectation under the mean field like approximation (based on z1:L ) of this conditional distribution (see Equation (3.4.10)). It can then be written as follows

Q1 (π|θ (t-1) ) =E z θ (t-1) log P π X 1:L |Z 1:L | X 1:L =E z θ (t-1)   L l=1 i<j X l ij log π l Z l i Z l j + (1 -X l ij ) log(1 -π l Z l i Z l j ) X 1:L   =E z θ (t-1)   1≤q,q ′ ≤Q L l=1 i<j Z l iq Z l jq ′ X l ij log π l qq ′ + (1 -X l ij ) log(1 -π l qq ′ ) X 1:L   ,
where E z stands for an expectation under the mean field approximation (with neighbours set to the values in z1:L ). Using the fact that the matrices π l are symmetric (π l qq ′ = π l q ′ q ), and so are the matrices X l , we can rewrite the summation differently and obtain Q1 (π|θ (t-1) ) =

1≤q<q ′ ≤Q L l=1 i̸ =j    P z θ (t-1) (Z l i = q | X l )P z θ (t-1) (Z l j = q ′ | X l ) × X l ij log π l qq ′ + (1 -X l ij ) log(1 -π l qq ′ )    + Q q=1 L l=1 i<j    P z θ (t-1) (Z l i = q | X l )P z θ (t-1) (Z l j = q | X l ) × X l ij log π l qq + (1 -X l ij ) log(1 -π l qq )    ,
where P z stands for a probability distribution under the mean field like approximation. This quantity is written as (see Equation (3.4.10))

P z θ (t-1) (Z l i = q | X l ) = P π (t-1) (X l i | Z l -i = zl -i , Z l i = q)P ψ (t-1) (Z l i = q | Z N i (l) i = zN i (l) i ) P θ (t-1) (X l i | Z N i (l) i = zN i (l) i , Z l -i = zl -i ) = P π (t-1) (X l i | Z l -i = zl -i , Z l i = q)P ψ (t-1) (Z l i = q | Z N i (l) i = zN i (l) i ) z l i ∈ 1,Q P π (t-1) (X l i | Z l i = z l i , Z l -i = zl -i )P ψ (t-1) (Z l i = z l i | Z N i (l) i = zN i (l) i
) .

We also write the approximation of Q 2 as follows, by replacing both the expectation with respect to the conditional distribution of the latent variables Z 1:L given the observations X 1:L by the expectation under the mean field like approximation (based on z1:L ) of this conditional distribution (see Equation (3.4.10)) and the distribution of the latent variables Z 1:L by its approximation under the mean field like approximation (also based on z1:L ) (see Equation (3.4.9)),

Q2 (α, β|θ (t-1) ) =E z θ (t-1) log P z ψ Z 1:L X 1:L = n i=1 L l=1 E z θ (t-1) log P ψ Z l i | Z N i (l) i = zN i (l) i X 1:L = n i=1 L l=1 E z θ (t-1)   log exp α iZ l i + β i l ′ ∈N i (l) 1 Z l i =z l ′ i Q q=1 exp(α iq + β i l ′ ∈N i (l) 1 q=z l ′ i ) X 1:L   = n i=1 L l=1    E z θ (t-1)   α iZ l i + β i l ′ ∈N i (l) 1 Z l i =z l ′ i X 1:L   -log   Q q=1 exp   α iq + β i l ′ ∈N i (l) 1 q=z l ′ i        = n i=1 L l=1      Q q=1 α iq P z θ (t-1) Z l i = q X l   + β i l ′ ∈N i (l) P z θ (t-1) Z l i = zl ′ i X l -log   Q q=1 exp   α iq + β i l ′ ∈N i (l) 1 q=z l ′ i        .

Conclusions and perspectives

The aim of this thesis was to study and propose methods for the analysis of graphs and more precisely for node clustering, in the context of multiple networks with a space or time dependency. In particular, we studied the consistency of parameter estimators in a dynamic SBM and proposed a spatial SBM together with a method to estimate its parameter.

In Chapter 2, we obtained consistency results for the maximum likelihood and variational estimators in a dynamic version of the SBM based on hidden Markov chains under certain conditions. This follows the work of [START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF] who obtained consistency results in the static SBM. However, these conditions exclude the sparse case (as in [START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF]), and are therefore quite restrictive since many large real-world network exhibit sparsity, and the study of this case would be of great interest. In [START_REF] Bickel | Asymptotic normality of maximum likelihood and its variational approximation for stochastic blockmodels[END_REF], in the static case, they introduce a density parameter defined as ρ = P(X ij = 1) and analyse the asymptotic behaviour when ρ ≡ ρ n → 0 when n increases. Note that we tried generalising the work of [START_REF] Bickel | Asymptotic normality of maximum likelihood and its variational approximation for stochastic blockmodels[END_REF] to the dynamic SBM, but have not managed to obtain results yet.

Moreover, we obtained bounds for the rates of convergence. For the case where the connectivity parameter is fixed over time, we proved that the estimators of the connectivity parameter converges faster than r n,T /n 1/4 with {r n,T } n,T ≥1 any sequence increasing to infinity, and that the estimators of the transition matrix converges faster than r n,T √ log n/ √ n with {r n,T } n,T ≥1 any sequence increasing to infinity. We believe that these rates are not optimal, and that they should be at least as good as those obtained in [START_REF] Bickel | Asymptotic normality of maximum likelihood and its variational approximation for stochastic blockmodels[END_REF] in the static case, when their density parameter is constant (dense setup), which is n -1 for the connectivity parameter, and n -1/2 for the parameter of the distribution of the latent variables. Furthermore, our consistency result for the transition matrix estimators requires an additional assumption that the connectivity parameter estimators converges at a rate that is o( log(nT )/n). Obtaining a sharper bound as mentioned before for the connectivity parameter estimators would then solve the problem of this additional assumption.

In Chapter 3, we introduced a spatial SBM based on hidden Markov random fields and proposed an algorithm based on the simulated EM of [START_REF] Celeux | EM procedures using mean field-like approximations for Markov model-based image segmentation[END_REF] for the estimation of parameters in this model. While it gave promising results on synthetic data in the case where Q = 2, more experiments have to be conducted, namely with a larger number of classes, or with more general location graphs than lattices. Moreover, we have been interested in parameter estimation, but we would also like to know if we can recover a satisfying clustering of the nodes at each location. Such estimated clustering could be obtained using the fact that we can simulate according to the conditional distribution P θ(Z 1:L | X 1:L ) of the latent variables given the observations, under the estimated parameter θ (outputted by the algorithm). Experiments should then be conducted, comparing an estimated clustering with the true one, using for example the Adjusted Rand Index [START_REF] Hubert | Comparing partitions[END_REF].

Moreover, we would like to study the effect of the strength of interaction on the quality of parameter estimation. Indeed, for large absolute values of the interaction strength parameter β, we tend to observe large parts or the whole Markov random field equal to the same value (for positive values) or for example a check pattern on a first order lattice (for negative values) (see Figure 1.13). We can then reasonably think that large absolute values of β make the estimation task harder.

We also obtained the generic identifiability of the model parameters under certain conditions. These conditions exclude the affiliation case, and we gave a counter-example (in Section 3.3) to show that without further assumptions, the parameters are in fact not identifiable in this case. However, from the proof of non-identifiability of our particular counter-example, we may wonder if we could obtain the identifiability by imposing for example a non-negativity condition on β, different values for the parameter α in all the groups, and/or to have at least a triangle (or cycle of odd length) in the location graph. Further investigation has to be done for the identifiability in the particular affiliation case.

In addition, we would like to propose a model selection criterion for the choice of the number of classes. Some simple possibility would be to approximate the BIC based on the mean field like approximation as in [START_REF] Forbes | Hidden Markov random field model selection criteria based on mean field-like approximations[END_REF] (see Section 1.7.9). However the results obtained with this criterion have been found to be unstable. Another option would be to adapt the criterion proposed by [START_REF] Forbes | Hidden Markov random field model selection criteria based on mean field-like approximations[END_REF] based on an approximation of the partition function (see also Section 1.7.9). We plan to investigate

A.1.2 Proof of Theorem 2.3.4

First, let us introduce some notations, as in the proof of Theorem 2.3.2. For any fixed configuration z * 1:T ∈ Ω η , we define for any configuration z 1:T and any parameter θ D n,T (z 1:T , π 1:T ) := (i, j, t) ∈ I n,T ; π t

z t i z t j ̸ = π t z * t i z * t j and for any 1 ≤ t ≤ T D t n,T (z t , π t ) := (i, j) ∈ 1, n 2 ; i < j and π t z t i z t j ̸ = π t z * t i z * t j ,
and as before, we abbreviate to D * (resp. D), the set D n,T (z 1:T , π * 1:T ) (resp. the set D n,T (z 1:T , π1:T )). We also introduce for any q, l, q ′ , l ′ ∈ 1, Q the quantities F qlq ′ l ′ , F ql , G qlq ′ l ′ and G ql as before, accordingly to this definition of D n,T (z 1:T , π 1:T ). Finally, we introduce for any t ∈ 1, T and q, l, q ′ , l ′ ∈ 1, Q the quantities

F t qlq ′ l ′ = F t qlq ′ l ′ (z t , z * t ) := {(i, j) ∈ 1, n 2 ; i < j and z t i = q, z t j = l, z * t i = q ′ , z * t j = l ′ } F t ql = F t ql (z t ) := ∪ 1≤q ′ ,l ′ ≤Q F t qlq ′ l ′ = {(i, j) ∈ 1, n 2 ; i < j and z t i = q, z t j = l} G t qlq ′ l ′ = G t qlq ′ l ′ (z t , z * t , π * t , πt ) := (D * t ∪ Dt ) ∩ F t qlq ′ l ′ = {(i, j) ∈ 1, n 2 ; i < j and z t i = q, z t j = l, z * t i = q ′ , z * t j = l ′ and (π * t z t i z t j ̸ = π * t z * t i z * t j or πt z t i z t j ̸ = πt z * t i z * t j )} G t ql = G t ql (z t , z * t , π * t , πt ) := (D * t ∪ Dt ) ∩ F t ql = {(i, j) ∈ 1, n 2 ; i < j and z t i = q, z t j = l and (π * t z t i z t j ̸ = π * t z * t i z * t j or πt z t i z t j ̸ = πt z * t i z * t j )}.
Note that we can get an equivalent of Lemma 2.5.8 with a similar proof that gives that for any configuration z * 1:T in Ω η , for any configuration z 1:T and any θ ∈ Θ T , D n,T (z 1:T , π 1:T ) ≥ γ 2 4 nr.

In the same way, we have an equivalent of Lemma 2.5.9 (with a similar proof) that gives that for any z t and z * t two configurations at time t such that ∥z t -z * t ∥ 0 = r(t) and any parameter π t = (π t ql ) 1≤q,l≤Q , we have

D t n,T (z t , π t ) ⊂ D t n,T (z t ) := (i, j) ∈ 1, n 2 × 1, T ; (z t i , z t j ) ̸ = (z * t i , z * t j ) and D t n,T (z t ) ≤ 2nr(t). (A.1.2)
Going back to the proof of Theorem 2.3.4, we follow the line of that of Theorem 2.3.2, with a few changes. We get the same decomposition as in equation (2.5.20), replacing π by π 1 , . . . , π T in the definitions of U 1 , U 2 and U 3 , and replacing the event Ω n,T by

Ω n = {∥π 1:T -π * 1:T ∥ ∞ ≤ v n }.
For U 1 , the proof does not change. For U 2 , we write (instead of (2.5.23))

|U 2 | ≤ (i,j,t)∈D * ∪ D 1≤q,l≤Q πt ql -π * t ql π * t ql (1 -π * t ql ) (X t ij -π * t ql )1 z t i =q,z t j =l ≤ T t=1 1≤q,l≤Q πt ql -π * t ql π * t ql (1 -π * t ql ) (i,j)∈G t ql (X t ij -π * t ql ) ≤ T t=1 1≤q,l≤Q πt ql -π * t ql π * t ql (1 -π * t ql ) q ′ ,l ′ (i,j)∈G t qlq ′ l ′ (X t ij -π * t ql ) ≤ T t=1 1≤q,l≤Q πt ql -π * t ql π * t ql (1 -π * t ql ) q ′ ,l ′ (i,j)∈G t qlq ′ l ′ (X t ij -π * t q ′ l ′ ) + T t=1 1≤q,l≤Q πt ql -π * t ql π * t ql (1 -π * t ql ) q ′ ,l ′ (π * t q ′ l ′ -π * t ql )|G t qlq ′ l ′ | .
For every u > 0, we thus have

P * θ * ({|U 2 | > u} ∩ Ω n ) ≤ T t=1 P * θ *         1≤q,l≤Q πt ql -π * t ql π * t ql (1 -π * t ql ) 1≤q ′ ,l ′ ≤Q (i,j)∈G t qlq ′ l ′ (X t ij -π * t q ′ l ′ ) > u 2T      ∩ Ω n    + T t=1 P * θ *      1≤q,l≤Q πt ql -π * t ql π * t ql (1 -π * t ql ) 1≤q ′ ,l ′ ≤Q (π * t q ′ l ′ -π * t ql )|G t qlq ′ l ′ | > u 2T    ∩ Ω n   . (A.1.3)
We start by dealing with the first term of (A.1.3). Notice that on the event Ω n , we have πt

ql -π * t ql /(π * t ql (1 -π * t ql )) ≤ v n /ζ 2 for every q, l ∈ 1, Q . As the set G t ql is random
(because Dt is random), we write for every t ∈ 1, T , using (A.1.2),

P * θ *         1≤q,l≤Q πt ql -π * t ql π * t ql (1 -π * t ql ) 1≤q ′ ,l ′ ≤Q (i,j)∈G t ql (X t ij -π * t q ′ l ′ ) > u 2T      ∩ Ω n    ≤P * θ *    1≤q,l≤Q 1≤q ′ ,l ′ ≤Q (i,j)∈G t ql (X t ij -π * t q ′ l ′ ) > uζ 2 2T v n    ≤ D⊂D t n,T (z t ) P * θ *    1≤q,l≤Q 1≤q ′ ,l ′ ≤Q (i,j)∈F t ql ∩D (X t ij -π * t q ′ l ′ ) > uζ 2 2T v n   
where now D is a deterministic set. By a union bound and Hoeffding's inequality, we have for any D ⊂ D t n,T (z t )

P * θ *    1≤q,l≤Q 1≤q ′ ,l ′ ≤Q (i,j)∈F t ql ∩D (X t ij -π * t q ′ l ′ ) > uζ 2 2T v n    ≤Q 2 max 1≤q,l≤Q P * θ *    1≤q ′ ,l ′ ≤Q (i,j)∈F t ql ∩D (X t ij -π * t q ′ l ′ ) > uζ 2 2T v n Q 2    ≤2Q 2 exp - 2u 2 ζ 4 4T 2 v 2 n Q 4 1 |D| .
This leads to, for the first term of (A.1.3),

T t=1 P * θ *         1≤q,l≤Q (π t ql -π * t ql ) π * t ql (1 -π * t ql ) 1≤q ′ ,l ′ ≤Q (i,j)∈G t ql (X t ij -π * t q ′ l ′ ) > u 2T      ∩ Ω n    ≤ T t=1 D⊂D t n,T (z t ) 2Q 2 exp - 2u 2 ζ 4 4T 2 v 2 n Q 4 1 |D| ≤ T t=1 2nr(t) k=1 D⊂D t n,T (z t );|D|=k 2Q 2 exp - 2u 2 ζ 4 4T 2 v 2 n Q 4 1 k ≤2Q 2 T t=1 exp - u 2 ζ 4 4T 2 v 2 n Q 4 nr(t) (2nr(t)) 2nr(t)+1 ≤2Q 2 T exp - u 2 ζ 4 4T 2 v 2 n Q 4 nr (2nr) 2nr+1 .
For the second term of (A.1.3), we get from a union bound and from (A.1.2) that

T t=1 P * θ *      1≤q,l≤Q (π t ql -π * t ql ) π * t ql (1 -π * t ql ) 1≤q ′ ,l ′ ≤Q (π * t q ′ l ′ -π * t ql )|G t qlq ′ l ′ | > u 2T    ∩ Ω n   ≤Q 2 T t=1 max 1≤q,l≤Q P * θ *   1≤q ′ ,l ′ ≤Q (π * t q ′ l ′ -π * t ql )|G t qlq ′ l ′ | > uζ 2 2T v n Q 2   ≤Q 2 T P * θ * 2nr > uζ 2 2v n T Q 2 .
Finally, we have the following upper bound for U 2

P * θ * (Ω n ∩ {|U 2 | > r log(nT )}) ≤2Q 2 T exp - rζ 4 (log(nT )) 2 4Q 4 T 2 v 2 n n (2nr) 2nr+1 + Q 2 T P * θ * v n > ζ 2 log(nT ) 4Q 2 T n .
For the third term U 3 , denoting

G * t ql = ∪ 1≤q ′ ,l ′ ≤Q G t ql = {(i, j) ∈ D * t ∪ Dt ; z * t i = q, z * t j = l}, we have U 3 = 1≤q,l≤Q (i,j,t)∈D * ∪ D (π * t ql -X t ij ) log 1 - (π t ql -π * t ql ) (1 -π * t ql ) + (X t ij -π * t ql ) log 1 + (π t ql -π * t ql ) π * t ql 1 z * t i =q,z * t j =l + 1≤q,l≤Q (i,j,t)∈D * ∪ D (1 -π * ql ) log 1 - (π t ql -π * t ql ) (1 -π * t ql ) + π * t ql log 1 + (π t ql -π * t ql ) π * t ql 1 z * t i =q,z * t j =l = T t=1 1≤q,l≤Q log 1 + (π t ql -π * t ql ) π * t ql -log 1 - (π t ql -π * t ql ) (1 -π * t ql ) (i,j)∈G * t ql (X t ij -π * t ql ) + T t=1 1≤q,l≤Q |G * t ql | (1 -π * t ql ) log 1 + (π t ql -π * t ql ) π * t ql + π * t ql log 1 - (π t ql -π * t ql ) (1 -π * t ql )
.

Then, we have on the event Ω n and for n large enough such that |(π t ql -π * t ql )/π * t ql | ≤ 1/2 and |(π t ql -π * t ql )/(1 -π * t ql )| ≤ 1/2 for every q and l, using the fact that

| log(1 + x)| ≤ 2|x| for x ∈ [-1/2, 1/2], |U 3 | ≤ T t=1 4 v n ζ 1≤q,l≤Q (i,j)∈G * t ql (X t ij -π * t ql ) + T t=1 4 v n ζ 1≤q,l≤Q |G * t ql |.
Then, for every u > 0,

P * θ * (Ω n ∩ {|U 3 | > u}) ≤ T t=1 P * θ *    1≤q,l≤Q (i,j)∈Q * t ql (X t ij -π * t ql ) > uζ 8v n T    + T t=1 P * θ *   v n 1≤q,l≤Q |G * t ql | > uζ 8T   . (A.1.4)
For the first term of (A.1.4), using Hoeffding's inequality as before,

T t=1 P * θ *    q,l (i,j)∈G * t ql (X t ij -π * t ql ) > uζ/(8v n T )    ≤ T t=1 2nr(t) k=1 D⊂D t n,T (z t );|D|=k P * θ *    q,l (i,j)∈F * t ql ∩D (X t ij -π * t ql ) > uζ/(8v n T )    ≤2Q 2 T exp - u 2 ζ 2 8 2 T 2 Q 4 v 2 n nr (2nr) 2nr+1 ,
and for the second term of (A.1.4),

T t=1 P * θ *   v n q,l |G * t ql | > uζ 8T   ≤ T P * θ * v n > uζ 16T nr .
Finally, we have the following upper bound for U 3

P * θ * (Ω n ∩ {|U 3 | > r log(nT )}) ≤2Q 2 T exp - rζ 2 (log(nT )) 2 8 2 T 2 Q 4 v 2 n n (2nr) 2nr+1 + T P * θ * v n > ζ log(nT ) 16T n . Now we choose the sequence v n such that v n = o( √ log n/n) which is sufficient to im- ply that the quantities P * θ * (v n > ζ 2 log(nT )/(4Q 2 T n)) and P * θ * (v n > ζ log(nT )/(16T n
)) vanish as n increases and we gather the three upper bounds. For large enough values of n and with C 1 , C 2 , C 3 , C 4 and κ positive constants only depending on Q, ζ, K * and T , likelihood L c (z 1:T , π) = P θ (X 1:T | Z 1:T = z 1:T ). Recall the definition of N ql (z 1:T ) in (2.2.1) and that

P θ (Z 1:T = z 1:T ) = 1≤q,l≤Q γ N ql (z 1:T ) ql n i=1 α 1 z 1 i .
We compute the derivative of the Lagrangian with respect to each parameter γ ql .

∂ ∂γ

ql   L(Γ, π) + Q m=1 λ m   Q k=1 γ mk -1     = ∂ ∂γ ql   z 1:T L c (z 1:T , π)P θ (Z 1:T = z 1:T )   + λ q = z 1:T L c (z 1:T , π) N ql (z 1:T ) γ ql P θ (Z 1:T = z 1:T ) + λ q = 1 γ ql   T -1 t=1 n i=1 z 1:T L c (z 1:T , π)P θ (Z 1:T = z 1:T )1 z t i =q,z t+1 i =l + λ q γ ql   = 1 γ ql T -1 t=1 n i=1 P θ (X 1:T , Z t i = q, Z t+1 i = l) + λ q γ ql .
At the critical point θ = (γ, π), we obtain that for each (q, l) ∈ 1,

Q 2 we have γql ∝ T -1 t=1 n i=1 P θ(X 1:T , Z t i = q, Z t+1 i = l)
where ∝ means 'proportional to'. The constraint l γ ql = 1 gives the normalizing term and we obtain γql

= T -1 t=1 n i=1 P θ(X 1:T , Z t i = q, Z t+1 i = l) T -1 t=1 n i=1 P θ(X 1:T , Z t i = q) = T -1 t=1 n i=1 P θ(Z t i = q, Z t+1 i = l | X 1:T ) T -1 t=1 n i=1 P θ(Z t i = q | X 1:T ) .

A.2.2 Proof of Lemma 2.4.1

We can write the quantity to optimize

J (χ, θ) =E Qχ log P θ (X 1:T , Z 1:T ) + H(Q χ ) =E Qχ log P θ (X 1:T | Z 1:T ) + E Qχ log P θ (Z 1:T ) -E Qχ log Q χ (Z 1:T ) =E Qχ   T t=1 i<j X t ij log π Z t i Z t j + (1 -X t ij ) log(1 -π Z t i Z t j )   + E Qχ n i=1 log α Z 1 i + n i=1 T -1 t=1 log γ Z t i Z t+1 i -E Qχ n i=1 log Q χ (Z 1 i ) + n i=1 T -1 t=1 log Q χ (Z t+1 i | Z t i ) = T t=1 i<j q,l τ t iq τ t jl X t ij log π ql + (1 -X t ij ) log(1 -π ql ) + n i=1 Q q=1 τ 1 iq log α q + n i=1 q,l T -1 t=1 η t iql log γ ql - n i=1 Q q=1 τ 1 iq log τ 1 iq - n i=1 T -1 t=1 q,l η t iql log η t iql τ t iq . (A.2.1)
Using this expression, we can obtain directly the expected fixed-point equation for the variational estimator of the transition probability from q to l.

A.2.3 Proof of Lemma 2.5.1

We rely on the notation introduced in the proof of Theorem 2.3.1. For any t ∈ 1, T , using classical dependency rules in directed acyclic graphs and the expression (2.5.3) of ẑt , we write

log P θ (X t | X 1:t-1 ) = log z t P θ (X t | Z t = z t )P θ (Z t = z t | X 1:t-1 ) ≤ log P θ (X t | Z t = ẑt ) z t P θ (Z t = z t | X 1:t-1 ) ≤ log P θ (X t | Z t = ẑt ) and thus log P θ (X t | X 1:t-1 ) -log P θ (X t | Z t = ẑt ) ≤ 0. (A.2.2)
Using Bayes' rule, we have

log P θ (X t | X 1:t-1 ) = log P θ (X t , Z t | X 1:t-1 ) -log P θ (Z t | X 1:t ).
Taking the expectation of this quantity with respect to any distribution Q on Z t , we obtain

log P θ (X t | X 1:t-1 ) = E Q log P θ (X t , Z t | X 1:t-1 ) + KL Q; P θ (Z t | X 1:t ) + H(Q) ≥ E Q log P θ (X t , Z t | X 1:t-1 ) + H(Q) ≥ E Q log P θ (X t | Z t ) + E Q log P θ (Z t | X 1:t-1 ) + H(Q), where KL (Q; P θ (Z t | X 1:t )) = E Q [log Q(Z t ) -log P θ (Z t | X 1:t )] is a Kullback-Leibler divergence (thus non negative) and H(Q) = -E Q [log Q(Z t )] is the entropy of Q.
Taking now Q as the Dirac distribution located on ẑt , we have

H(Q) = 0 and log P θ (X t | X 1:t-1 ) ≥ log P θ (X t | Z t = ẑt ) + log P θ (Z t = ẑt | X 1:t-1
(Z t = ẑt | X 1:t-1 ) ≤ log P θ (X t | X 1:t-1 ) -log P θ (X t | Z t = ẑt ) ≤ 0,
giving the expected result.

A.2.4 Proof of Lemma 2.5.2

To prove this lemma, we first establish a control of the expectation of the random variable appearing in the statement.

Lemma A.2.1. We have the following inequality for z * 1:T and z 1:T any configurations and any θ ∈ Θ

E θ *      sup (z 1:T ,π)∈ 1,Q nT ×[ζ,1-ζ] Q 2 2 n(n -1)T T t=1 i<j (X t ij -π * z * t i z * t j ) log   π z t i z t j 1 -π z t i z t j   Z 1:T = z * 1:T      ≤ 2 n(n -1)T Λ with Λ = 2 log[(1 -ζ)/ζ].
We now turn to the proof of Lemma 2.5.2. Let us first recall Talagrand's inequality (see for e.g. Massart, 2007, page 170, Equation (5.50)).

Theorem (Talagrand's inequality). Let {Y t ij } 1≤i<j≤n,1≤t≤T denote independent and centered random variables. Define

∀g := {g t ij } 1≤i<j≤n,1≤t≤T ∈ G, S n,T (g) = 1≤i<j≤n T t=1 Y t ij g t ij ,
where G ⊂ R n(n-1)T /2 . Let us further assume that there exist b > 0 and σ 2 > 0 such that |Y t ij g t ij | ≤ b for every (i, j, t) ∈ 1, n 2 × 1, T and any g ∈ G and sup g∈G i<j t Var(Y t ij g t ij ) ≤ σ 2 . Then, for every β > 0 and x > 0, for any finite set {g 1 , . . . , g 2 n(n-1)T /2 } of elements of G, we have

P max g∈{g 1 ,...,g 2 n(n-1)T /2 } S n,T (g) ≥E max g∈{g 1 ,...,g 2 n(n-1)T /2 } S n,T (g) (1 + β) + √ 2σ 2 x + b(β -1 + 3 -1 )x ≤ e -x . First, notice that argmin ϖ∈[ζ,1-ζ] log(ϖ/(1 -ϖ)) = ζ and arg max ϖ∈[ζ,1-ζ] log(ϖ/(1 - ϖ)) = 1 -ζ so that we have P * θ *   sup (z 1:T ,π)∈ 1,Q nT ×[ζ,1-ζ] Q 2 2 n(n -1)T T t=1 i<j (X t ij -π * z * t i z * t j ) log   π z t i z t j 1 -π z t i z t j   > ϵ   ≤ P * θ *   max ϖ∈{ζ,1-ζ} n(n-1)T /2 2 n(n -1)T T t=1 i<j (X t ij -π * z * t i z * t j ) log ϖ t i,j 1 -ϖ t i,j > ϵ  
with ϖ := {ϖ t i,j } 1≤i<j≤n,1≤t≤T . The set {ζ, 1 -ζ} n(n-1)T /2 is finite, of size 2 n(n-1)T /2 . Let us now apply Talagrand's inequality to our setup. Note that for every (i, j, t) ∈ 1, n 2 × 1, T , for any π

∈ [ζ, 1 -ζ] Q 2 , we have (X t ij -π * z * t i z * t j ) log   π z t i z t j 1 -π z t i z t j   ≤ log[(1 -ζ)/ζ] = Λ 2
almost surely thanks to Assumption 3, and with Λ as defined in Lemma A. Ω > ϵ + 2e -x n,T ≤ 1 ϵ<2Ω/(n(n-1)T ) + 2e -x n,T .

A.2.5 Proof of Lemma 2.5.3

For any η ∈ (0, δ), Hoeffding's inequality (see for example Theorem 2.8 from [START_REF] Boucheron | Concentration Inequalities: A Nonasymptotic Theory of Independence[END_REF] gives that

P θ ∀t ∈ 1, T , ∀q ∈ 1, Q , N q (Z t ) n ≥ α q -η =1 -P θ ∃t ∈ 1, T , ∃q ∈ 1, Q ; 1 n n i=1 1 Z t i =q < α q -η ≥1 - Q q=1 T t=1
exp -2η 2 n ≥ 1 -QT exp -2η 2 n , which concludes the proof.

A.2.6 Proof of Lemma 2.5.4

First notice that arg max A∈A M(π, A) may not be unique, it is in fact a closed subset of A. However, we choose a fixed element Āπ in this subset in the following. Letting ϵ > 0 and η ∈ (0, δ) and using Lemma 2.5.3, we can split the probability as

P θ *   1 T T t=1 sup π∈[ζ,1-ζ] Q 2 M(π, Āt π ) -M(π, Āπ ) > ϵr n 6 √ n   ≤P θ *      1 T T t=1 sup π∈[ζ,1-ζ] Q 2 M(π, Āt π ) -M(π, Āπ ) > ϵr n 6 √ n    ∩ Ω η (θ * )   + QT exp -2η 2 n ,
recalling that Ω η (θ) := z 1:T ∈ 1, Q nT ; ∀t ∈ 1, T , ∀q ∈ 1, Q , N q (z t ) n ≥ α q -η .

We thus want to bound the quantity

P θ *   T -1 T t=1 sup π∈[ζ,1-ζ] Q 2 M(π, Āt
≤ q,l α * q α * l q ′ ,l ′ |ā qq ′ āll ′ -ȃqq ′ ȃll ′ | sup π∈[ζ,1-ζ] Q 2 |π * ql log π q ′ l ′ + (1 -π * ql ) log(1 -π q ′ l ′ )| ≤2(1 -δ) 2 (1 -ζ) log(1/ζ) q,l q ′ ,l ′ |ā qq ′ āll ′ -ȃqq ′ ȃll ′ | ≤2(1 -δ) 2 (1 -ζ) log(1/ζ)Q 4 2∥ Ȃ -Āπ ∥ ∞ := c∥ Ȃ -Āπ ∥ ∞ with c = 4(1 -δ) 2 (1 -ζ) log(1/ζ)Q 4 .
On the event Ω η (θ * ) we then have

P θ *   1 T T t=1 sup π∈[ζ,1-ζ] Q 2 M(π, Āt π ) -M(π, Āπ ) > ϵr n 6 √ n   =1 -P θ *   1 T T t=1 sup π∈[ζ,1-ζ] Q 2 M(π, Āt π ) -M(π, Āπ ) ≤ ϵr n 6 √ n   ≤1 -P θ *   ∀t ∈ 1, T , sup π∈[ζ,1-ζ] Q 2 M(π, Āπ ) -M(π, Āt π ) ≤ ϵr n 6 √ n   ≤1 -P θ * ∀t ∈ 1, T , ∀π ∈ [ζ, 1 -ζ] Q 2 , M(π, Āπ ) -M(π, Āt π ) ≤ ϵr n 6 √ n ≤1 -P θ * ∀t ∈ 1, T , ∀π ∈ [ζ, 1 -ζ] Q 2 , ∃ Ȃ ∈ A t (Z 1:T ); M(π, Āπ ) -M(π, Ȃ) ≤ ϵr n 6 √ n ≤1 -P θ * ∀t ∈ 1, T , ∀π ∈ [ζ, 1 -ζ] Q 2 , ∃ Ȃ ∈ A t (Z 1:T ); ∥ Ȃ -Āπ ∥ ∞ < ϵr n 6c √ n .
We then show that for any ϵ > 0, for every t ∈ 1, T and every π ∈ [ζ, 1 -ζ] Q 2 , for any n such that n > 6c √ n/[ϵr n (δ -η)], there exists some Ȃ ∈ A t (Z 1:T ) such that ∥ Ȃ -Āπ ∥ ∞ < ϵr n /(6c √ n), i.e. such that for every q, l, |ȃ ql -āql | < ϵr n /(6c √ n). For every 1 ≤ q ≤ Q, we can construct Ȃq• = (ȃ q1 , . . . , ȃqQ ) as follows. On the event Ω η (θ * ), for every q ∈ 1, Q , for any n such that n > 6c √ n/[ϵr n (δ -η)], we have N q (Z t )ϵr n /(6c √ n) > 1 for every t ∈ 1, T . We then construct (n ql ) 1≤l≤Q as follows and take ȃql = nql /N q (Z 1:T ) for every l ∈ 1, Q .

• for l = 1 choose nq1 as the closest integer to N q (Z t )ā q1 . It is in the interval (N q (Z t )ā q1 -1, N q (Z t )ā q1 + 1) so we have |ā q1 -nq1 /N q (Z t )| < 1/N q (Z t ) < ϵr n /(6c √ n). Moreover, note that 0 ≤ nq1 ≤ N q (Z t ) because 0 ≤ N q (Z t )ā q1 ≤ N q (Z t ).

• Repeat for l = 2, . . . , Q if l-1 l ′ =1 (N q (Z t )ā ql ′ -nql ′ ) ≥ 0 choose nql as the closest bigger (or equal) integer to N q (Z t )ā ql .

if l-1 l ′ =1 (N q (Z t )ā ql ′ -nql ′ ) < 0 choose nql as the closest smaller (or equal) integer to N q (Z t )ā ql .

As before, nql is in the interval (N q (Z t )ā ql -1, N q (Z t )ā ql + 1) so we have |ā qlnql /N q (Z t )| < 1/N q (Z 1:T ) < ϵr n /(6c √ n). Moreover 0 ≤ nql ≤ N q (Z t ) because 0 ≤ N q (Z t )ā ql ≤ N q (Z t ). We also have (by induction)

l l ′ =1 (N q (Z t )ā ql ′ -nql ′ ) = l-1 l ′ =1
N q (Z t )ā ql ′ -nql ′ + N q (Z t )ā ql -nql < 1.

In the end, we have | Q l=1 (N q (Z t )ā ql -nql )| < 1 i.e. |N q (Z t )-Q l=1 nql | < 1, meaning that Q l=1 nql = N q (Z t ), both N q (Z t ) and Q l=1 nql being integers. Then, if n > 6c

√ n/[ϵr n (δη)], there exists Ȃ ∈ A t (Z 1:T ) such that ∥ Ȃ -Āπ ∥ ∞ < ϵr n /(6c √ n). This leads to

P θ * 1 T T t=1 M(π, Āt π ) -M(π, Āπ ) > ϵr n 6 √ n ≤ QT exp(-2η 2 n) + 1 -1 n>6c √ n/[ϵrn(δ-η)]
which concludes the proof.

A.2.7 Proof of Lemma 2.5.5

We can upper bound the expectation as follows

E θ * N q (Z 1 )N l (Z 1 ) n(n -1) -α * q α * l =E θ * N q (Z 1 ) n -α * q N l (Z 1 ) n -1 + α * q N l (Z 1 ) n -1 -α * l ≤E θ * N q (Z 1 ) n -α * q N l (Z 1 ) n -1 + α * q E θ * N l (Z 1 ) n -1 -α * l ≤ E θ *   N q (Z 1 ) n -α * q 2   E θ * N l (Z 1 ) 2 (n -1) 2 + α * q E θ *   N l (Z 1 ) n -1 -α * l 2   .
We have for any q ∈ 1, Q

E θ * N q (Z 1 ) 2 = i,j E θ * 1 Z 1 i =q 1 Z 1 j =q = i α * q + i̸ =j α * 2 q = nα * q + n(n -1)α * 2 q .
This implies that

E θ *   N q (Z 1 ) n -α * q 2   = E θ * N q (Z 1 ) 2 n 2 -α * 2 q = 1 n α * q + n -1 n α * 2 q -α * 2 q = 1 n α * q (1 -α * q ),
and identically

E θ *   N l (Z 1 ) n -1 -α * l 2   = E θ * N l (Z 1 ) 2 (n -1) 2 + α * 2 l -2 n n -1 α * 2 l = n (n -1) 2 α * l - 1 n -1 α * 2 l = 1 n -1 α * l n n -1 -α * l .
This leads to

E θ * N q (Z 1 )N l (Z 1 ) n(n -1) -α * q α * l ≤ 1 n α * q (1 -α * q ) n (n -1) 2 α * q + n n -1 α * 2 q + α * q 1 n -1 α * l n n -1 -α * l ≤ 1 (n -1) 2 + 1 n -1 + n (n -1) 2 ≤ 2 √ n n -1
, (A.2.4) using the fact that 0 ≤ α * q ≤ 1 for every q ∈ 1, Q .

A.2.8 Proof of Lemma 2.5.6

We first consider the case when T → ∞, and π is constant over time. We use the following lemma.

Lemma A.2.2. For any θ ∈ Θ, we have for ϵ small enough (precisely 0 < ϵ < min 1≤q̸ =q ′ ≤Q max 1≤l≤Q |π * ql -π * q ′ l |/2)

min σ∈S Q ∥π σ -π * ∥ ∞ > ϵ =⇒ M(π * ) -M(π) > 2δ 2 Q 2 ϵ 2 .
This gives an upper bound on the probability of interest We then obtain the following upper bound, that converges to 0 as n and T increase by assumption,

P θ * min σ∈S Q ∥π σ -π * ∥ ∞ > ϵ √ v n,T ≤ P θ * M(π * ) -M(π) > 2δ 2 Q 2 ϵ 2 v n,
P θ * min σ∈S Q ∥π σ -π * ∥ ∞ > ϵ √ v n,T ≤P θ * F n,T ( Γ, π) -M(π) > δ 2 Q 2 ϵ 2 v n,T + P θ * M(π * ) -F n,T ( Γ, π * ) > δ 2 Q 2 ϵ 2 v n,T .
When the number of time steps T is fixed and π is allowed to vary over time, the proof is almost the same. Indeed, min σ 1 ,...,σ T ∈S Q ∥π 1:T σ 1:T -π * 1:T ∥ ∞ > ϵ √ v n means that there exists t ∈ 1, T such that min σ t ∈S Q ∥π t σ t -π * t ∥ ∞ > ϵ √ v n and we can apply Lemma A.2.2 to this πt to obtain that M(π * t ) -M(π t ) > 2ϵ 2 δ 2 v n /Q 2 . This implies that M T (π * 1:T ) -M T (π 1:T ) > 2ϵ 2 δ 2 v n /(T Q 2 ), which allows to conclude in the same way as before.

A.2.9 Proof of Lemma 2.5.7

We have log P θ(Z 1:T = z 1:T | X 1:T ) P θ(Z 1:T = z * 1:T | X 1:T ) = log P θ(X 1:T | Z 1:T = z 1:T ) P θ(X 1:T | Z 1:T = z * 1:T ) + log P θ(Z 1:T = z 1:T ) P θ(Z 1:T = z * 1:T ) = We decompose this sum as log P θ(Z 1:T = z 1:T | X 1:T ) P θ(Z 1:T = z * 1:T | X In the first sum of the right-hand side of (A.2.5), the terms are different from zero only for triplets (i, j, t) in D * . Similarly in the last sum, the terms are different from zero for triplets (i, j, t) in D * ∪ D. As a consequence, we obtain log P θ(Z 1:T = z 1:T | X 1:T ) P θ(Z 1:T = z * 1:T | X In the end, we decompose log P θ(Z 1:T = z 1:T | X 1:T ) P θ(Z 1:T = z * 1:T | X 1:T ) = (i,j,t)∈D We conclude by noticing that T t=1 r(t) = r.

A.2.11 Proof of Lemma 2.5.9

The inclusion of the sets is straightforward. A.2.12 Proof of Lemma 2.5.10

First, let us decompose the quantity at stake as follows .2.6) and upper bound the two terms in the right-hand side of (A.2.6). For the first one we will follow the proof of Theorem 3.9 from [START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF]. Let z 1:T denote a fixed configuration. We work on the set {Z 1:T = z 1:T } and write

P θ * 1 n(T -1) T -1 t=1 n i=1 P θσ Z t i = q, Z t+1 i = l | X 1:T -α * q γ * ql > ϵr n,T √ log n √ nT ≤P θ * 1 n(T -1) T -1 t=1 n i=1 P θσ Z t i = q, Z t+1 i = l | X 1:T - N ql (Z 1:T ) n(T -1) > ϵ 2 r n,T √ log n √ nT + P θ * N ql (Z 1:T ) n(T -1) -α * q γ * ql > ϵ 2 r n,T √ log n √ nT , ( A
V 1 (z 1:T ) := 1 n(T -1) T -1 t=1 n i=1 P θσ Z t i = q, Z t+1 i = l | X 1:T - N ql (z 1:T ) n(T -1) ≤ 1 n(T -1) T -1 t=1 n i=1 P θσ Z t i = q, Z t+1 i = l | X 1:T 1 (z t i ,z t+1 i )=(q,l) - N ql (z 1:T ) n(T -1) + 1 n(T -1) T -1 t=1 n i=1 P θσ Z t i = q, Z t+1 i = l | X 1:T 1 (z t i ,z t+1 i )̸ =(q,l) ≤ 1 n(T -1) T -1 t=1 n i=1 1 -P θσ (Z t i , Z t+1 i ) = (z t i , z t+1 i ) | X 1:T 1 (z t i ,z t+1 i )=(q,l) + 1 n(T -1) T -1 t=1 n i=1 P θσ (Z t i , Z t+1 i ) ̸ = (z t i , z t+1 i ) | X 1:T 1 (z t i ,z t+1 i )̸ =(q,l)
≤ 2P θσ Z 1:T ̸ = z 1:T | X 1:T .

A.2.13 Proof of Lemma 2.5.11

We have the following inequalities by definition of ẑ1:T , J (χ, θ) and χ(θ) and because the Kullback-Leibler divergence is non-negative J (ẑ 1:T , θ) ≤ J ( χ(θ), θ) ≤ ℓ(θ) ≤ ℓ c (θ, ẑ1:T ), (A.2.9)

with J (ẑ 1:T , θ) = ℓ(θ) -KL(δ ẑ1:T , P θ (•|X 1:T )). We write this Kullback-Leibler divergence (from P θ (•|X 1:T ) to Q χ = δ ẑ1:T , with χ = (τ, η) such that τ t iq = ẑt iq and η t iql = ẑt iq ẑt+1 il ) as follows KL(δ ẑ1:T , P θ (•|X 1:T )) = -log P θ (ẑ 1:T |X 1:T ).

We then obtain J (ẑ 1:T , θ) = log P θ (X 1:T ) + log P θ (ẑ 1:T |X 1:T ) = P θ (X 1:T |ẑ 1:T ) + log P θ (ẑ 1:T ) =ℓ c (θ; ẑ1:T ) + We can conclude that sup θ∈Θ 2 n(n -1)T J ( χ(θ), θ) -2 n(n -1)T ℓ(θ) ≤ 2 log(1/δ) n -1 .

A.2.14 Proof of Lemma 2.5.12

This proof is quite similar to that of Lemma 2.5.10. For any ϵ > 0, let us write

P θ * 1 n(T -1) n i=1 T -1 t=1 Q χ( θσ) (Z t i = q, Z t+1 i = l) -α * q γ * ql > ϵr n,T √ log n √ nT ≤P θ * 1 n(T -1) n i=1 T -1 t=1 Q χ( θσ) (Z t i = q, Z t+1 i = l) - N ql (Z 1:T ) n(T -1) > ϵ 2 r n,T √ log n √ nT + P θ * N ql (Z 1:T ) n(T -1) -α * q γ * ql > ϵ 2 r n,T √ log n √ nT
and upper bound the two probabilities in the right-hand side of this inequality. We already proved in Lemma 2.5.10 that the second term converges to 0 thanks to the assumptions on the sequence {r n,T } n,T ≥1 . For the first term, let z 1:T denote a fixed configuration. Let us work on the set {Z 1:T = z 1:T } and use the same method as in the proof of Lemma 2.5.10,

1 n(T -1) n i=1 T -1 t=1 Q χ( θσ) (Z t i = q, Z t+1 i = l) = 1 n(T -1) n i=1 T -1 t=1 Q χ( θσ) (Z t i = q, Z t+1 i = l)1 z t i =q,z t+1 i =l + 1 n(T -1) n i=1 T -1 t=1 Q χ( θσ) (Z t i = q, Z t+1 i = l)1 (z t i ,z t+1 i )̸ =(q,l) , leading to 1 n(T -1) n i=1 T -1 t=1 Q χ( θσ) (Z t i = q, Z t+1 i = l) - N ql (z 1:T ) n(T -1)
≤2Q χ( θσ) (Z 1:T ̸ = z 1:T ).

Then we obtain

P θ * 1 n(T -1) n i=1 T -1 t=1 Q χ( θσ) (Z t i = q, Z t+1 i = l) - N ql (Z 1:T ) n(T -1) > ϵ 2 r n,T √ log n √ nT ≤ z 1:T P θ * Q χ( θσ) (Z 1:T ̸ = z 1:T ) > ϵ 4
r n,T √ log n √ nT Z 1:T = z 1:T P θ * Z 1:T = z 1:T .

For each z 1:T , we use the following lemma. we can conclude by applying the result of Theorem 2.3.2 with the estimator θσ = ( Γσ , πσ ) for both terms of the right-hand side of (A.2.10).

A.2.15 Proof of Lemma A.2.1

The proof follows the lines of the proof of Lemma C.3. from [START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF]. ij } i,j,t that is independent of {X t ij } i,j,t and has the same distribution, we write

E :=E * θ *      sup (z 1:T ,π)∈ 1,Q nT ×[ζ,1-ζ] Q 2 2 n(n -1)T T t=1 i<j (X t ij -π * z * t i z * t j ) log   π z t i z t j 1 -π z t i z t j        =E * θ *          sup (z 1:T ,π)∈ 1,Q nT ×[ζ,1-ζ] Q 2 2 n(n -1)T E * θ *   T t=1 i<j (X t ij -Xt ij ) log   π z t i z t j 1 -π z t i z t j   {X t ij } i,j,t            ≤E * θ *          E * θ *      sup (z 1:T ,π)∈ 1,Q nT ×[ζ,1-ζ] Q 2 2 n(n -1)T T t=1 i<j (X t ij -Xt ij ) log   π z t i z t j 1 -π z t i z t j   {X t ij } i,j,t               ≤E * θ * ,X, X      sup (z 1:T ,π)∈ 1,Q nT ×[ζ,1-ζ] Q 2 2 n(n -1)T T t=1 i<j (X t ij -Xt ij ) log   π z t i z t j 1 -π z t i z t j       
, where E * θ * ,X, X [•] denotes the expectation with respect to {X, X} = {X t ij , Xt ij } i,j,t under the true parameter θ * and given Z 1:T = z * 1:T . At this point, we notice that, if {ϵ t ij } i,j,t := ϵ are n 2 T independent Rademacher variables, then the random variables

E ϵ T t=1 i<j ϵ t ij (X t ij -Xt ij ) log
,π)∈ 1,Q nT ×[ζ,1-ζ] Q 2 2 n(n -1)T E ϵ T t=1 i<j ϵ t ij (X t ij -Xt ij ) log   π z t i z t j 1 -π z t i z t j     = E * θ * ,X, X   sup (z 1:T ,π)∈ 1,Q nT ×[ζ,1-ζ] Q 2 2 n(n -1)T T t=1 i<j (X t ij -Xt ij ) log   π z t i z t j 1 -π z t i z t j     .
As a consequence, we have

E ≤E * θ * ,X, X   sup (z 1:T ,π)∈ 1,Q nT ×[ζ,1-ζ] Q 2 2 n(n -1)T E ϵ T t=1 i<j ϵ t ij (X t ij -Xt ij ) log   π z t i z t j 1 -π z t i z t j     ≤E * θ *   sup (z 1:T ,π)∈ 1,Q nT ×[ζ,1-ζ] Q 2 2 n(n -1)T E ϵ T t=1 i<j ϵ t ij X t ij log   π z t i z t j 1 -π z t i z t j     + E * θ *   sup (z 1:T ,π)∈ 1,Q nT ×[ζ,1-ζ] Q 2 2 n(n -1)T E ϵ T t=1 i<j ϵ t ij Xt ij log   π z t i z t j 1 -π z t i z t j     ≤2E * θ *   sup (z 1:T ,π)∈ 1,Q nT ×[ζ,1-ζ] Q 2 2 n(n -1)T E ϵ T t=1 i<j ϵ t ij X t ij log   π z t i z t j 1 -π z t i z t j     .
Then using Jensen's inequality, Assumption 3 and the bound Var ϵ (ϵ t ij X t ij ) ≤ 1, we get

E ≤2E * θ *     sup (z 1:T ,π)∈ 1,Q nT ×[ζ,1-ζ] Q 2 2 n(n -1)T E ϵ      T t=1 i<j ϵ t ij X t ij log   π z t i z t j 1 -π z t i z t j     2        ≤2E * θ *    sup (z 1:T ,π)∈ 1,Q nT ×[ζ,1-ζ] Q 2 2 n(n -1)T Var ϵ   T t=1 i<j ϵ t ij X t ij log   π z t i z t

A.2.16 Proof of Lemma A.2.2

We assume that min σ∈S Q ∥π σ -π * ∥ ∞ > ϵ. Without loss of generality, assume that the permutation (or one of the permutations) minimizing this distance is the identity. Let us write, using the fact that I Q the identity matrix of size Q maximizes in A (over the set of Q × Q stochastic matrices) the quantity M(π * , A) (see the proof of Theorem 3.6 in [START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF]) and denoting (ā qq ′ ) q,q ′ ∈ 1,Q the coefficients of Āπ (thus depending on π),

M(π * ) -M(π) = q,l α * q α * l q ′ ,l ′ āqq ′ āll ′ π * ql log π * ql π q ′ l ′ + (1 -π * ql ) log 1 -π * ql 1 -π q ′ l ′ = q,l α * q α * l q ′ ,l ′ āqq ′ āll ′ K(π * ql , π q ′ l ′ )
denoting K(p 1 , p 2 ) = p 1 log(p 1 /p 2 )+(1-p 1 ) log[(1-p 1 )/(1-p 2 )] > 0 the Kullback-Leibler divergence from a Bernoulli distribution with parameter p 2 to a Bernoulli distribution with parameter p 1 . For every q, there exists q ′ := f (q) such that āqq ′ ≥ 1/Q because Āπ is a stochastic matrix. Using Assumption 2, we obtain

M(π * ) -M(π) ≥ δ 2 Q 2 q,l K(π * ql , π f (q)f (l) ) ≥ δ 2 Q 2 q,l 2(π * ql -π f (q)f (l) ) 2
thanks to a result on Kullback-Leibler divergence for Bernoulli distributions (see for instance [START_REF] Bubeck | Jeux de bandits et fondations du clustering[END_REF], Chapter 10, Section 2, Lemma 10.3). We then want to show that there exist q, l such that |π * ql -π f (q)f (l) | > ϵ.

• If f is a permutation, the assumption min σ∈S Q ∥π σ -π * ∥ ∞ > ϵ gives the expected result.

• If f is not a permutation, it is not injective and there exist q 1 ̸ = q 2 such that f (q 1 ) = f (q 2 ). Thanks to Assumption 1, take l 0 ∈ 1, Q such that |π q 1 l 0 -π q 2 l 0 | = max l∈ 1,Q |π q 1 l -π q 2 l | > 0. Then |π * q 1 l 0 -π f (q 1 )f (l 0 ) | + |π f (q 2 )f (l 0 ) -π * q 2 l 0 | ≥ |π * q 1 l 0 -π f (q 1 )f (l 0 ) + π f (q 2 )f (l 0 ) -π * q 2 l 0 | ≥ |π * q 1 l 0 -π * q 2 l 0 | > 0 leading to either |π * q 1 l 0 -π f (q 1 )f (l 0 ) | ≥ |π * q 1 l 0 -π * q 2 l 0 |/2 > ϵ or |π * q 2 l 0 -π f (q 2 )f (l 0 ) | ≥ |π * q 1 l 0 -π * q 2 l 0 |/2 > ϵ, using the fact that ϵ < min 1≤q̸ =q ′ ≤Q max 1≤l≤Q |π * ql -π * q ′ l |/2.

So, as there exist q, l such that |π * ql -π f (q)f (l) | > ϵ, we have

M(π * ) -M(π) > 2δ 2 Q 2 ϵ 2 .

A.2.17 Proof of Lemma A.2.3

For any node i ∈ 1, n , the Markov chain {Z t i } t≥1 is geometrically ergodic because its transition matrix Γ satisfies Doeblin's condition thanks to Assumption 2. For any z ∈ 1, Q , let us denote δ z the Dirac mass at z. There exists a positive constant A and some r ∈ (0, 1) such that ∀q ∈ 1, Q and ∀t ≥ 1, we have

δ q Γ t -α T V ≤ Ar t ,
where ∥ • ∥ T V is the total variation norm. This leads to

δ q Γ t -α T V = 1 2 δ q Γ t -α 1 = 1 2 l∈ 1,Q |Γ t (q, l) -α l | ≤ Ar t .
We now consider the Markov chain {Z t = (Z t 1 , . . . , Z t n )} t≥1 of the n nodes evolving through time. Note that it is irreducible and aperiodic. Moreover, its transition matrix is given by P n = Γ ⊗n , the n-th Kronecker power of Γ and its stationary distribution is α ⊗n . For any z = (z 1 , . . . , z n ) ∈ 1, Q n , let us denote µ n,z = ⊗ n i=1 δ z i . For every t ≥ 1, we can decompose

µ n,z P t n -α ⊗n T V = n ⊗ i=1 δ z i (Γ ⊗n ) t -α ⊗n T V = n ⊗ i=1 δ z i (Γ t ) ⊗n -α ⊗n T V = n ⊗ i=1 δ z i Γ t -α ⊗n T V = 1 2 n ⊗ i=1 δ z i Γ t -α ⊗n 1 = 1 2 (z ′ 1 ,...,z ′ n )∈ 1,Q n n i=1 Γ t (z i , z ′ i ) - n i=1 α z ′ i .
We use

n i=1 Γ t (z i , z ′ i ) - n i=1 α z ′ i = n i=1      i-1 j=1 α z ′ j   Γ t (z i , z ′ i ) -α z ′ i n k=i+1 (µ z k Γ t ) z ′ k    .
So, reorganizing the terms, we write

µ n,z P t n -α ⊗n T V ≤ 1 2 (z ′ 1 ,...,z ′ n )∈ 1,Q n n i=1      i-1 j=1 α z ′ j   Γ t (z i , z ′ i ) -α z ′ i n k=i+1 (µ z k Γ t ) z ′ k    ≤ 1 2 n i=1 z ′ 1 α z ′ 1 . . . z ′ i-1 α z ′ i-1 z ′ i Γ t (z i , z ′ i ) -α z ′ i z ′ i+1 Γ t (z i+1 , z ′ i+1 ) . . . z ′ n Γ t (z n , z ′ n ) ≤ 1 2 n i=1 z ′ i Γ t (z i , z ′ i ) -α z ′ i ≤ nAr t .
Let us recall the definition of an ϵ-mixing time. For any Markov transition matrix M over the set X with stationary distribution α, for any ϵ > 0, the ϵ-mixing time of the Markov chain is defined as

τ (ϵ) = min{t ≥ 1; max x∈X ∥δ x M t -α∥ T V ≤ ϵ}.

B.2.3 Estimation of (α, β)

In this context, the approximation of Q 2 under the mean field approximation is as follows Q2 (α, β|θ (t-1) )

=

n i=1 L l=1 E z,θ (t-1) log P ψ Z l i | Z N i (l) i = τ N i (l) i X 1:L = n i=1 L l=1 E z,θ (t-1)    log exp α iZ l i + β i l ′ ∈N i (l) τ l ′ iZ l i Q q=1 exp α iq + β i l ′ ∈N i (l) τ l ′ iq X 1:L    = n i=1 L l=1          Q q=1 α iq P τ θ (t-1) Z l i = q X l   + β i l ′ ∈N i (l) Q q=1 τ l ′ iq P τ θ (t-1) Z l i = q X l -log   Q q=1 exp   α iq + β i l ′ ∈N i (l) τ l ′ iq           
.

The derivative of that quantity with respect to α iq (i.e. the quantity we want to set equal to zero) is ∂ Q2 (α, β|θ (t-1) )

∂α iq = L l=1 P τ θ (t-1) (Z l i = q | X l ) - L l=1 exp α iq + β i l ′ ∈N i (l) τ l ′ iq Q q ′ =1 exp α iq ′ + β i l ′ ∈N i (l) τ l ′ iq ′
, and the one with respect to β i is ∂ Q2 (α, β|θ (t-1) )

∂β i = L l=1 l ′ ∈N i (l) Q q=1 τ l ′ iq P τ θ (t-1) Z l i = q X l - L l=1 Q q=1 l ′ ∈N i (l) τ l ′ iq exp α iq + β i l ′ ∈N i (l) τ l ′ iq Q q=1 exp α iq + β i l ′ ∈N i (l) τ l ′ iq ,
where P τ θ (t-1) (• | X 1:L ) is the mean field approximation of P θ (t-1) (• | X 1:L ) and is defined in the same way as the mean field like approximation (3.4.10), but based on the definitions in (B.2.1) and (B.2.2).

1. 1

 1 Representation of different types of graphs . . . . . . . . . . . . . . . . . 1.2 Bipartite graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Barabási-Albert model for different values of m . . . . . . . . . . . . . . 1.4 Three classification structures . . . . . . . . . . . . . . . . . . . . . . . . 1.5 Link between the graphon and SBM . . . . . . . . . . . . . . . . . . . . 1.6 Representation of a discrete-time dynamic network . . . . . . . . . . . . 1.7 Representation of discrete-time dynamic real-world networks . . . . . . . 1.8 Representation of two types of continuous time dynamic networks . . . . 1.9 Stream graph and link stream . . . . . . . . . . . . . . . . . . . . . . . . 1.10 Temporal evolution of the dynamic SBM . . . . . . . . . . . . . . . . . . 1.11 Illustration of the label switching . . . . . . . . . . . . . . . . . . . . . . 1.12 First and second order lattices . . . . . . . . . . . . . . . . . . . . . . . . 1.13 Phase transition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.14 Location graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.15 Seasonality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.16 Example of representation of the spatial graph model . . . . . . . . . . . 3.1 Location graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Example of representation of the space model . . . . . . . . . . . . . . . 3.3 Partitions of the nodes for the proof of consistency of the model . . . . . 3.4 Example of a location graph for the proof of non identifiability in an affiliation model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 Results of the simulated EM for α i2 . . . . . . . . . . . . . . . . . . . . . 3.6 Results of the simulated EM for β i . . . . . . . . . . . . . . . . . . . . . 3.7 Results of the simulated EM for π 11 and π 22 . . . . . . . . . . . . . . . . 3.8 Results of the simulated EM for π l 12 . . . . . . . . . . . . . . . . . . . . .

Algorithm 1 :2

 1 Matching algorithm input : A sequence of degrees d = (d 1 , . . . , d n ) output : A list of edges 1 do Initialise empty node and edge lists V and E; j uniformly from V without replacement; 11 E ← concatenate(E, {i, j}); 12 end

  Fig. 1.3 Barabási-Albert model for different values of m, all starting from an initial graph of 5 nodes.

Fig. 1

 1 Fig. 1.4 Community structure on the left, hubs and peripheral nodes in the middle and groups interacting mainly with other groups on the right

  with π a prior distribution on θ.Assuming that π(θ) = π(a)π(m), they show that log p(x, z) = log p(x | z, a)π(a) da + log p(z | m)π(m) dm and then apply the BIC approximation that is valid for the first term p(x | z, a)π(a) da, obtaining log p(x | z, a)π(a) da ≈ max a log p(x | z, a) -λ 2 log n with λ the number of free components in a. Then, calculating the second term log( p(z | m)π(m) dm) by choosing a Jeffrey's noninformative prior for the proportions m, and replacing the latent data z with the maximum a posteriori (MAP) z, they propose the criterion ICL = max a log p(x | z, a) -λ 2 log n

  Fig. 1.6 Representation of a discrete-time dynamic network: in this network, the edges change over time and nodes can enter or exit the network

  Fig. 1.7 Three discrete representations of dynamic networks: network (a) is from Sizemore and Bassett (2018) and networks (b) and (c) are from Lee et al. (2020). (a) represents functional connectivity between brain regions based on functional magnetic resonance imaging (fMRI) data (collected while the individual was learning to play a sequence of finger movements), (b) represents yearly international trade networks at four different years, and (c) represents yearly collaboration networks at a large research university at four different years. Note that the colors of the nodes in these graphs represent groups of nodes, which is not our interest for the moment.

  Fig. 1.8 Representation of two types of continuous time dynamic networks: (a) represents instantaneous contacts between the nodes and (b) represents a network in which edges are added (red lines) or suppressed (dotted lines) at time points t 1 , . . . , t 5 ∈ R.

Fig. 1

 1 Fig. 1.9 A stream graph on the left, and a link stream on the right, both with 4 nodes {a, b, c, d} (picture from Latapy et al. (2018))

  Fig. 1.11 Illustration of the label switching, graphs at time t (left) and t + 1 (right)

Fig. 1 .

 1 Fig. 1.13 Ising model for different values of β, on a first order lattice, with no external field (i.e. α iq = 0 for every i, q). The phase transition phenomenon can be observed for large values of β, leading to large parts of the lattices with the same value. Inversely, for negative values of β with large absolute value, neighbours tend to have different values, leading to a check pattern.

Fig. 1 .

 1 Fig. 1.15 A location graph modeling seasonality effects. Nodes A, B, C, D represent the four seasons, indexed by year of measurement (three years in total). The solid lines represent the dependency between two consecutive seasons, and the dotted lines represent the dependency between same seasons of different years.

S

  Fig. 1.16 Example of representation of the model for Q = 2, L = 4 and n = 3. On the left, the three layers represent the graphs on locations of the three species (i.e. the three location graphs), and for each location (A, B, C and D), the dotted edges between layers represent the connection between species at that location. On the right are the observed interaction graphs between the 3 species at each of the four locations. Note that the representation on the right only contains the interactions graphs at each location, and not the space dependency between these locations. The Q classes are represented by colors on the nodes (green and purple).

  Fig.3.2 Example of representation of the model for Q = 2, L = 4 and n = 3. On the left, the three layers represent the graphs on locations of the three species (i.e. the three location graphs), and for each location (A, B, C and D), the dotted edges between layers represent the connection between species at that location. On the right are the observed interaction graphs between the 3 species at each of the four locations. Note that the representation on the right only contains the interactions graphs at each location, and not the space dependency between these locations. The Q classes are represented by colors on the nodes (green and purple).

  Fig. 3.4 Example of a location graph G with 10 locations and no cycle of odd length. For any configuration z 1:L , for the locations in green, zl is the same than z l . For the locations in purple, zl is equal to a permutation (switching the groups 1 and 2) of z l . The absence of cycles of odd length implies that two nodes of the same colour cannot be neighbours.

  normalising constant of the Potts model with Q = 2, with parameter β = -β and location graph G = (V, E) (with no cycles of odd length) is equal to S(β) exp(|E| β) where S(β) is the normalising constant of the Potts model with Q = 2, with parameter β and location graph G.

  Fig. 3.5 Results of the simulated EM for α i2 . The 3 boxplots correspond to the 3 different values α i2 = {-0.8, 0, 0.8}. The true values are marked in red. Note that each true value of the parameter α i2 corresponds to 6 species.

  Fig. 3.6 Results of the simulated EM for β i . The 3 boxplots correspond to the 3 different values β i = {-0.5, 0, 0.5}. The true values are marked in red. Note that each true value of the parameter β i corresponds to 6 species.

  Fig. 3.8 Results of the simulated EM for π l 12 . The 3 boxplots correspond to the 3 different values π l 12 = {0.2, 0.5, 0.8}. The true values are marked in red. Note that each true value of the parameter π l 12 corresponds to 72 locations.

  2.1. Combining this result with Lemma A.2.1 and writingΩ = (1 + β)Λ n(n -1)T /2 + n(n -1)T (Λ/2) 2 x n,T + (1/β + 1/3)(Λ/2)x n,T ,we have for any ϵ > 0, for any β > 0, applying Talagrand's inequality with b = Λ/2 andσ 2 = n(n -1)T /2(Λ/2) 2 , T ,π)∈ 1,Q nT ×[ζ,1-ζ] Q 2 2 n(n -1)T

  π ) -M(π, Āπ ) > ϵr n /Z 1:T ∈ Ω η (θ * ) , which means bounding Let us denote for any matrix P of size m × n the norm ∥P ∥ ∞ = max (i,j)∈ 1,m × 1,n |P ij |. Then note that, for any matrix Ȃ with coefficients in [0, 1], for any π ∈ [ζ, 1 -ζ] Q 2 , using Assumption 2 and 3, M(π, Āπ ) -M(π, Ȃ)

  T .By definition of θ = ( Γ, π), we writeM(π * ) = F n,T ( Γ, π * ) + M(π * ) -F n,T ( Γ, π * ) ≤ F n,T ( Γ, π) + M(π * ) -F n,T ( Γ, π * ), implying that M(π * ) -M(π) ≤ F n,T ( Γ, π) -M(π) + M(π * ) -F n,T ( Γ, π * ) .

.

  Combined with (A.2.9), this leads to the following inequality for any parameter θ ∈ Θ |J ( χ(θ), θ) -ℓ(θ)| ≤ J (ẑ 1:T , θ) -ℓ c (θ, ẑ1:T ) ≤ -

Lemma A. 2 . 4 .

 24 Denoting Pσ (•) = P θσ (Z 1:T = • | X 1:T ), we have the following inequality for any configuration z1:T Q χ( θσ) (z 1:T ) -Pσ (z 1:T ) ≤ -1 2 log Pσ (z 1:T ) .This gives usP θ * Q χ( θσ) (Z 1:T ̸ = z 1:T ) T = z 1:T ≤P θ * Q χ( θσ) (Z 1:T ̸ = z 1:T ) -Pσ (Z 1:T ̸ = z 1:T ) T = z 1:T + P θ * Pσ (Z 1:T ̸ = z 1:T ) T = z 1:T ≤P θ * Pσ (Z 1:T ̸ = z 1:T ) > 1 -expϵ 2 r 2 n,T log n 32nT Z 1:T = z 1:T + P θ * Pσ (Z 1:T ̸ = z 1:T ) assumptions on {r n,T } n,T ≥1 imply that log 1 -expϵ 2 r 2 n,T log n 32nT = o(n) and log r n,T √ log n √ nT = o(n),

  Let E * θ * [•] denote the expectation given Z 1:T = z * 1:T , i.e. E * θ * [•] = E θ * [• | Z 1:T = z * 1:T ]. Introducing a ghost sample { Xt

  [(1 -ζ)/ζ], concluding the proof.

Algorithm 3: Spectral clustering input :

  An adjacency matrix X, a number of clusters Q output : Q clusters C 1 , . . . , C Q forming a partition of {1 . . . , n} 1 Compute the Laplacian matrix L as in (1.4.1); 2 Compute the Q eigenvectors u 1 , . . . , u Q associated with the Q smallest eigenvalues of L; 3 Let U ∈ R n×Q be the matrix containing the vectors u 1 , . . . , u Q as columns; 4 Cluster the n lines of U with the k-means algorithm into clusters C 1 , . . . , C Q ;

	5 return C 1 , . . . , C Q
	Other common versions of the spectral clustering algorithm use normalised Laplacian
	matrices, that are defined as

  (t) the estimator of π from the formulas (3.4.14) and (3.4.15) ;

	8	Compute α (t) and β (t) by setting the quantities in (3.4.16) and (3.4.17) equal
		to zero with a Newton-Raphson algorithm ;

3 Set t ← t + 1 ; 4 Simulation step: ; 5 Draw a configuration z(t)1:L with the Gibbs sampler algorithm (Algorithm 5) with parameter θ (t-1) ; 6 EM step: ; 7 Compute π

  We now write the last sum in the right-hand side as

													1:T )
	=	(i,j,t)∈D *	  X t ij log	π * z t i z t j π * z * t i z * t j	+ (1 -X t ij ) log	1 -π * z t i z t j 1 -π * z * t i z * t j	  +	n i=1	log	αz 1 i αz * 1 i	+	T -1 t=1	n i=1	log	γz t i z t+1 i γz * t i z * t+1 i
		+	(i,j,t)∈D * ∪	D   X t ij log	πz t i z t j π * z t i z t j	π * z * t i z * t j πz * t i z * t j	+ (1 -X t ij ) log	1 -πz t i z t j 1 -π * z t i z t j	1 -π * z * t i z * t j i z * j 1 -πz * t	  .
									D   X t ij log	πz t i z t j π * z t i z t j	π * z * t i z * t j πz * t i z * t j	+ (1 -X t ij ) log	1 -πz t i z t j 1 -π * z t i z t j	1 -π * z * t i z * t j i z * t j 1 -πz * t	 
			=	(i,j,t)∈D * ∪	D    X t ij	  log	  1 +	πz t i z t j -π * z t i z t j π * z t i z t j	  + log	π * z * t i z * t j i z * t j πz * t	 
											+ (1 -X t ij )	  log	  1 -	πz t i z t j -π * z t i z t j 1 -π * z t i z t j	  + log	1 -π * z * t i z * t j i z * t j 1 -πz * t	 	  	.
	Distinguishing between the cases where X t ij = 1 and X t ij = 0, we obtain
						(i,j,t)∈D * ∪	D   X t ij log	πz t i z t j π * z t i z t j	π * z * t i z * t j πz * t i z * t j	+ (1 -X t ij ) log	1 -πz t i z t j 1 -π * z t i z t j	1 -π * z * t i z * t j i z * t j 1 -πz * t	 
			=	(i,j,t)∈D * ∪	D log	  1 +	(π z t i z t j -π * z t i z t j π * z t i z t j (1 -π * )(X t ij -π * z t i z t j z t i z t j )	)	 
						-	(i,j,t)∈D * ∪	D log	  1 +	(π z * t i z * t j -π * z * t i z * t j π * z * t i z * t j (1 -π * )(X t ij -π * z * t i z * t j z * t i z * t j )	)	  .

(i,j,t)∈D * ∪

  T , we can apply Proposition B.4. from[START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF], as their Assumption (A4) is required to hold only for z * t (see proof) and is valid on Ω η (θ) with the constant δ -η. We obtain (i, j) ∈ 1, n 2 ; π z t

				  X t ij log	π * z t i z t j π * z * t i z * t j	+ (1 -X t ij ) log	1 -π * z t i z t j z * t i z * t j 1 -π *	 
		+	n i=1	log	αz 1 i αz * 1 i	+		T -1 t=1	n i=1	log	γz t i z t+1 i γz * t i z * t+1 i
		+	(i,j,t)∈D * ∪	D log	  1 +	(π z t i z t j -π * z t i z t j π * z t i z t j (1 -π * )(X t ij -π * z t i z t j z t i z t j )	)	 
		-	(i,j,t)∈D * ∪	D log	  1 +	(π z * t i z * t j -π * z * t i z * t j π * z * t i z * t j (1 -π * )(X t ij -π * z * t i z * t j z * t i z * t j )	)	  ,
	which gives the result.
										j
	=	1 2
				i z t j ̸ = π z * t i z * t j	≥	(δ -η) 2 2	nr(t).

*

A.2.10 Proof of Lemma 2.5.8

We first notice that

D n,T (z 1:T , π) = 1 2 (i, j, t) ∈ 1, n 2 × 1, T ; π z t i z t j ̸ = π z * t i z * t T t=1 (i, j) ∈ 1, n 2 ; π z t i z t j ̸ = π z * t i z * t j .

For every t ∈ 1,

  Now we have (i, j, t) ∈ 1, n 2 × 1, T ; π z t (i, j, t) ∈ 1, n 2 × 1, T ; z t i ̸ = z * t i + (i, j, t) ∈ 1, n 2 × 1, T ; z t j ̸ = z * t

		i z t j ̸ = π z * t i z * t j
	≤ (i, j, t) ∈ 1, n 2 × 1, T ; (z t i , z t j ) ̸ = (z * t i , z * t j )
	≤ j
	T
	≤2	nr(t) ≤ 2nr.
	t=1

dans lequel le paramètre de connexion prend seulement deux valeurs, qui sont une probabilité de connexion intra-groupe et une probabilité de connexion inter-groupes

recording when two people are close to each other

such as e-mails or phone calls between people

Other models of that type exist, such as SIS (susceptible-infectious-susceptible) or SEIR (susceptibleexposed-infected-recovered).

In particular, in G(n, M ), we fix the number of edges, whereas in the case of G(n, p), the number of edges follows a binomial distribution of parameter (n(n -1)/2, p).

Note that all such graphs have a fixed number of edges n i=1 d i /2.

using Algorithm 1 or 2 for example.

either complete or empty

For example, if the considered distribution is absolutely continuous with respect to the Lebesgue measure, all the edges are present in the graph, which may not be appropriate.

The spectral clustering method is defined for undirected graphs.

In practice, we apply spectral clustering on connected graphs, or on the connected components of a graph separately.

That is equivalent to maximising E Q [log P θ (t-1) (X, Z)] + H(Q) with respect to Q. Note that the distribution minimising this quantity over the set of all distributions is P θ (t-1) (• | X) leading to a Kullback-Leibler divergence equal to zero.

Note that maximising the marginal distribution p(x) of the observations (with respect to the model) is equivalent to maximising the posterior probability of the model (given the observations), assuming than the models are a priori equally probable.

Note that a local maximum is obtained, and a common strategy is then to run the algorithm with multiple initialisations.

. . . t -1 t t + 1 . . . Γ Γ Γ Γ Γ Γ Γ Γ

i.e. σ(q 1 ) = q 2 , σ(q 2 ) = q 1 and σ(q) = q for every q ∈ 1, Q \ {q 1 , q 2 }

This can easily be written formally with the property pP = p of the stationary distribution.

by noticing that αΓ = α implies α Γ = α

The proof is similar to that of Proposition 1.6.2 below.

which is a necessary assumption for the classical SBM

i.e. such that C is the set of cliques of G

where each location (except those on the boundary) has for neighbours the 8 closest locations

Note that the normalising constant S MF (ψ) can be computed thanks to the factorised form of the mean field approximation. Indeed, it is the product (over l ∈ 1, L ) of the tractable normalising constants appearing in (1.7.5).

ecological interaction between two or more species where each species has a benefit, such as flowering plants being pollinated by animals

interaction which is beneficial for a species and neutral for the other

the consistency results for the estimators of the parameter of the latent groups distribution requiring an assumption on the rate of convergence of the connection parameter estimators

In particular, in the static case,[START_REF] Bickel | Asymptotic normality of maximum likelihood and its variational approximation for stochastic blockmodels[END_REF] obtained a rate of n -1 for the connectivity parameter in a non sparse setup (like ours)

ecological interaction between two or more species where each species has a benefit, such as flowering plants being pollinated by animals

i.e. groups of vertices that have a high within-group connectivity and a low between-group connectivity

Recall that the generic aspect of the identifiability result we obtained in Proposition 3.3.1 concerns only the part of the parameter space with the connectivity parameter, so that the result holds without external field.

i.e. zl ′ is a permutation of z l ′ , switching groups 1 and 2

end

return θ := θ(t)

For q 1 , q 2 ∈ 1, Q , π (0)l q1q2 is the proportion of present edges between species that are in groups q 1 and q 2 respectively in the configuration ẑl .

Remerciements

We will focus here on approximations of the BIC, based either on mean field like approximations (Forbes and Peyrard, 2003) or on an approximation of the intractable likelihood by a distribution factorising on blocks (Stoehr et al., 2016). One can also see Stanford and Raftery (2002); Cucala and Marin (2013) and Stoehr et al. (2015).

Illustration of the method on synthetic datasets

We illustrate the performance of our algorithm on simulated datasets. For that, we fix n = 18 species (leading to n 2 = 324 observations of potential edges at each location) and L = 218 locations. Moreover, we use location graphs that are grids of size 12 × 18. We also fix Q = 2. For these n = 18 species, we consider 3 different values for α i2 that are -0.8, 0, 0.8 (recall that α i1 = 0) and three different values for β i that are -0.5, 0, 0.5. We thus have 9 different scenarios for the parameters governing the MRF. We distribute these values such that for each of the 9 pairs of parameters (α i2 , β i ), 2 species are governed by a MRF with (α i2 , β i ). We fix the diagonal of π at (0.3, 0.7) 9 , and we also choose 3 different values for π l 12 that we fix at 0.2, 0.5, 0.8, each of these three values being assigned to 72 locations.

With this setup, we run 60 simulations. For each simulated dataset, we start from four different initialisations. Three out of the four iterations are random. The other is defined as in Section 3.4.8. We use a stopping condition that is | Q(t) -Q(t-1) |/| Q(t-1) | < 10 -5 , then let the algorithm perform 30 more iterations and take the mean of the parameters and of Q over these 30 iterations.

We finally keep the estimator corresponding to the initialisation leading to the highest mean of Q over the last 30 iterations. We plotted the boxplots of the estimators of α i2 for the three values of the true α i2 in Figure 3.5, those of the esimators of β i for the three true values of β i in Figure 3.6, those of the estimators of π 11 and π 22 in Figure 3.7, and those of the estimators of π l 12 for the three true values of π l 12 in Figure 3.8. The x-axis indicates the true value of the parameter.

These experiments give good results, in the sense that we can recover the different behaviours from the estimated parameters. We remark that the estimation seems more precise for the connection parameters π than for the parameters of the Potts model. a combination of this approach with criteria used for the SBM (see Section 1.4.5.2), such as the ICL of [START_REF] Daudin | A mixture model for random graphs[END_REF].

We would also like to extend the model to make it more flexible. A quite straightforward extension would be to allow the set of nodes to be (a bit) different at the different locations. A less straightforward one would be to allow the model to have different numbers of classes at different locations. This would however be problematic for obtaining a satisfying criterion for the choice of the number of classes.

It would also be interesting to take into account the asymptotic behaviour of the obtained algorithm (as it does not seem to converge to a fixed value) in order to obtain a smarter stopping rule. Indeed, the obtained sequence of estimators (and hence of our stopping criterion) is not "stable" and looking at the difference of the criterion between two time steps is probably not optimal. Moreover, the convergence of this algorithm could be studied.

We could compare the performance of our method with that of separate SBM for each location (i.e. without taking into account the interaction between the locations), as no other methods for such spatial network data has been introduced. In particular, we could compare the performance for different values of the strength of interaction, as we expect our method to outperform a method considering the graphs at each location separately when there is a significant interaction between the locations.

Finally, we would like to apply the method to a real dataset, with "expert" information to determine the location graphs for each species.

Appendix A

Supplementary material for Chapter 2

A.1 Proofs of main results for the finite time case

A.1.1 Proof of Corollary 2.3.2

When the number of time steps is fixed and the connection probabilities vary over time, the conditional log-likelihood is

and the likelihood ℓ

As before, we denote the normalized log-likelihood M n,T (Γ, π 1:T ) = 2/(n(n -1)T )ℓ T (θ). We introduce the following limiting quantity

Supplementary material for Chapter 2

We follow the lines of the proof of Theorem 2.3.1 in order to prove that we have for any sequence y n → +∞, for all ϵ > 0

Choosing y n = r 2 n , we then use Lemma 2.5.6 to conclude that, as r 2 n / √ n = o(1) by assumption, for any ϵ > 0,

In particular, for every t ∈ 1, T , πt converges in P θ * -probability to π * t up to label switching. Then, let us prove that on the event {min σ 1 ,...,σ

} (whose probability converges to 1), for n large enough, the permutation σ t minimizing the distance between π * t and πt σ t is the same for every t ∈ 1, T . We consider n large enough such that

Supplementary material for Chapter 2 we then have

Then, introducing

we conclude as in the proof of Theorem 2.3.2, noticing that nT u nT (resp. nT w nT ) converges to 0 as n increases as long as log

A.1.3 Proof of Corollary 2.4.2

As in the proof of Theorem 2.4.1, using the convergence in Equation (A.1.1) and Lemma 2.5.11, we obtain for any ϵ > 0

We then conclude by using Lemma 2.5.6 applied with

A.2 Proofs of technical lemmas

A.2.1 Proof of Lemma 2.3.1

As in the proof of Lemma E.2 from [START_REF] Celisse | Consistency of maximum-likelihood and variational estimators in the stochastic block model[END_REF], we use the method of Lagrange multipliers to find the fixed-point equation of the critical point. Recall that θ = (Γ, π) and let us denote the likelihood L(Γ, π) := exp ℓ(θ) = P θ (X 1:T ) and the conditional Supplementary material for Chapter 2

Then

where the last inequality comes from Theorem 2.3.2 where the bound is uniform with respect to z 1:T . Now, for the second term of (A.2.6), we use the following lemma.

Lemma A.2.3. There exist c 1 , c 2 > 0 such that for any ϵ > 0, for any sequence {r n,T } n,T ≥1 , we have, as long as ϵr n,T √ log n/(2α * q γ * ql √ nT ) < 1,

We then combine the two upper bounds obtained in (A.2.7) and (A.2.8) in order to conclude, the assumption ϵr n,T √ log n/(2α * q γ * ql √ nT ) < 1 being satisfied for n and T large enough because r n,T = o( nT / log n). We obtain the expected result, using the fact that log(T ) = o(n), that r n,T increases to infinity and that v n,T = o log(nT )/n ,

Supplementary material for Chapter 2

Denoting by τ n (ϵ) the ϵ-mixing time of the Markov chain {Z t } t≥1 , we thus obtain

Now, we introduce a new Markov chain Y = {Y t } t≥1 , that is defined by

Notice that it is irreducible and aperiodic, with stationary distribution ρ defined for every state (q t 1 , . . . , q t n , q t+1 1 , . . . , q t+1 n ) by

It is easily seen that for any ϵ > 0, its ϵ-mixing time τ Y,n (ϵ) equals τ n (ϵ) + 1. We apply Theorem 3 from [START_REF] Chung | Chernoff-Hoeffding bounds for Markov chains: generalized and simplified[END_REF], for any η ≤ 1/8, considering the weight function

nT ), we obtain that there exist c 1 , c 2 > 0 such that for any ϵ > 0, as long as ϵ n,T ≤ 1

A.2.18 Proof of Lemma A.2.4

For any configuration z 1:T ,

Appendix B

Supplementary material for Chapter 3

B.1 Identifiability of the Potts model

In the following, we assume that i is fixed and omit the index i in the notation (in the parameter, random variable, location graph and normalising constant).

Proof of Lemma 3.3.1. Assume that there exists (α, β) and (α ′ , β ′ ) (satisfying the constraint of Assumption 1 on α) inducing the same distribution on the random variable Z 1:L , i.e. such that P (α,β) (•) = P (α ′ ,β ′ ) (•). Then we have for any configuration z 1:L ∈ Q L the equality

In particular, for any q ∈ 1, Q , for the configuration z 1:L = (q, . . . , q) in which every location belongs to group q, we have

where |E| denotes the cardinality of E, and summing this quantity for every q ∈ 1, Q and dividing by Q gives us, thanks to the constraint on α (Assumption 1)

Supplementary material for Chapter 3 Substracting (B.1.3) from (B.1.2) leads to α q = α ′ q for every q ∈ 1, Q . Now, for the identification of β, we get from (B.1.3) that

and using the fact that α q = α ′ q , Equation (B.1.1) becomes

In particular, for any configuration z 1:L such that at least one pair of neighbour locations in the graph G belong to two different groups (so that the terms between brackets are not equal to zero), we obtain that β = β ′ .

B.2 Mean field approximation

We describe here the mean field approximation in our setup and in particular the computation of the means used in this approximation and its use in the mean field EM algorithm. Indeed, instead of using in the algorithm an approximation based on a simulated configuration of Z 1:L as in Section 3.4.4, we could also consider at each step t of the algorithm a mean field approximation. It consists in replacing the distributions (of the Markov fields and of the Markov fields given the observations) by distributions factorising over the locations and nodes such that for each pair of location and node, we assume that the neighbours of the location and the other nodes at the same location are fixed to their expectation given the observations. For details about the mean field approximation, see Section 1.7.5.1. Note that the mean field approximation is the one that minimises the Kullback-Leibler divergence from the true conditional distribution (see for example [START_REF] Blei | Variational inference: A review for statisticians[END_REF]). However, the simulated EM has shown better performances than the mean field EM on experiments [START_REF] Celeux | EM procedures using mean field-like approximations for Markov model-based image segmentation[END_REF]. In particular, the mean field EM seems to be very sensitive to its initialisation [START_REF] Forbes | Combining Monte Carlo and mean-field-like methods for inference in hidden Markov random fields[END_REF].

B.2.1 Approximation

First, let us recall that we denote

for every l, i and q. For this type of approximation, as we will consider the expectations τ l i ∈ [0, 1] Q of the latent variables Z l i , we will need the quantities appearing in (3.4.10) 1 to be defined for τ l i = (τ l iq ) 1≤q≤Q ∈ [0, 1] Q instead of {0, 1} Q , for every i and l. We will then define the probability of the observation X l given Z l i = q and given the expectation value τ l jq ′ of Z l jq ′ for every q ′ and for j ̸ = i as follows, for any parameter θ

and the probability of Z l i given the expectations of the latent variables at every neighbour location τ

these definitions coinciding with the previous ones for τ l i ∈ {0, 1} Q . As mentioned in [START_REF] Celeux | EM procedures using mean field-like approximations for Markov model-based image segmentation[END_REF], to obtain an approximation of these means, we rely on the self consistency condition (see Section 1.7.5.1), stating that the mean obtained based on the mean field approximation must be equal to the mean used to define this approximation, i.e. for any (i, l), when fixing the other values at their mean τ , the expectation of Z l i = (Z l iq ) 1≤q≤Q ∈ [0, 1] Q under the approximation must be equal to τ l i . Then at each step t, using the definitions (B.2.1) and (B.2.2), we deduce that the expectation values for the parameter θ (t-1) satisfy the fixed point equation

In practice, the solution of this fixed-point equation is computed iteratively. We then replace the distributions of the latent variables and of the latent variables given the observations by their respective approximations, given in (3.4.8) and (3.4.10), replacing z by τ .

B.2.2 Estimation of π

The estimation of π in the mean field EM is identical to its estimation in the simulated EM, using the mean field approximation instead of the mean field like approximation of the conditional distributions in (3.4.14) and (3.4.15).

1 i.e. for any (i, l) the probability of Z l i given that the neighbours are equal to z Ni(l) i = (z l ′ i ) l ′ ∈Ni(l) and the probability of X l given Z l = (z l 1 , . . . , z l i-1 , q, z l i+1 , . . . , z l n )