Je remercie tout d'abord mon directeur de thèse, Laurent Massoulié, que ce soit pour avoir accepté de m'accueillir ou pour son accompagnement tout au long de ces trois années. Que ce soit scientifiquement ou humainement, je n'aurais pu demander un meilleur directeur, et je lui suis très reconnaissant de m'avoir si bien guidé dans mon apprentissage de la recherche.

M'étant retrouvé dans une situation administrative complexe, il m'a fallu bien de l'assistance pour réussir à m'en dépêtrer et travailler dans les meilleures conditions. De ce point de vue, Hélène Bessin-Rousseau (pour l'Inria), Sophie Jaudon (pour l'ENS) et Corentin Lacombe (pour l'ED) ont été d'une grande patience et d'une aide précieuse, et ce travail aurait été bien moins conséquent sans eux.

Un laboratoire ne vaut que par les personnes qui le composent, et leur bonne humeur ; de ce côté là, l'équipe Dyogene est très bien fournie, et je remercie Simon, Luca, Bastien, Hélène (encore !), Marc, Mathieu, Maxime, Matthieu et Ilia, pour toutes les discussions mathématiques ou non, et pour m'avoir donné l'envie d'aller au travail même quand ma motivation me faisait défaut.

Enfin, mes derniers remerciements vont à mes ami.e.s et ma famille, qui m'ont supporté pendant ces dernières années avec énormément de bienveillance et d'amour. J'ai l'immense chance de ne pas avoir la place de les lister ici, mais j'ai bon espoir qu'ils et elles se reonnaîtront, et savent toute l'affection que j'ai pour eux. Merci enfin à Sarah, pour avoir partagé ma vie et mes galères pendant tout ce temps, ainsi qu'à Ron et Magellan pour leur amour et leur fluff inconditionnels.

( ) t . . .

Résumé en français

On s'intéresse dans ce manuscrit à divers problèmes d'inférence dans des grands graphes aléatoires. Sauf mention expresse du contraire, les graphes étudiés sont « creux », c'est-à dire que le degré moyen d'un sommet du graphe ne dépend pas de la taille du graphe. Ce régime de faible densité est connu pour sa difficulté d'étude, en raison notamment d'une proportion non négligeable de sommets isolés et d'une forte variabilité dans les degrés des sommets.

On s'intéresse dans un premier temps à une variation du problème connu de la clique plantée. Considérons le modèle suivant : étant donné un arbre Γ de taille k et de forme supposée connue, on insère une copie de Γ dans un graphe d'Erdős-Rényi G(n, λ/n). Les questions classiques de l'inférence dans les graphes se posent alors : premièrement, est-il possible de différencier ce modèle d'un graphe d'Erdős-Rényi de mêmes paramètres, et deuxièmement, est-il possible de retrouver la copie cachée de Γ, ou tout du moins une fraction non négligeable d'icelle ? On se pose aussi la question de l'existence d'algorithmes polynômiaux qui réalisent ces deux tâches, respectivement appelées détection et reconstruction.

Étant donné la difficulté d'obtenir des résultats sur des arbres Γ généraux, ce manuscrit se restreint à des formes d'arbres spécifiques : un chemin de longueur k, ou un arbre d-régulier de hauteur h (et donc de taille d h ), déjà plus difficile à étudier. Les résultats obtenus diffèrent fortement du paysage habituel des problèmes d'inférence similaires, comme la clique plantée.

La première particularité est l'absence de phase « difficile » : dès que la détection ou la reconstruction sont possibles, il existe un algorithme polynômial pour ces tâches. Cela diffère de beaucoup de problèmes d'inférence étudiés précédemment, qui comportent souvent une phase où la détection et la reconstruction sont possibles, mais où l'on conjecture qu'aucun algorithme polynômial n'en est capable.

La seconde différence notable est le « découplage » de la détection et de la reconstruction : pour un large choix de paramètres, la détection est trivialement possible (via un comptage d'arêtes), mais il est impossible de reconstruire ne serait-ce qu'une fraction non-négligeable des sommets de Γ lorsque n tend vers +∞. Là encore, c'est un départ notable du paysage attendu, puisque dans l'immense majorité des cas la détection implique au moins qu'une fraction de la structure plantée est retrouvable.

Une explication possible pour ces différences est la notion de « rang » de la structure plantée, que l'on définit comme le rang de sa matrice d'adjacence : la majorité des problèmes d'inférence étudiés historiquement concernent des structures de faible rang, ce qui n'est pas le cas des arbres considérés. Cette supposition est supportée par d'autres travaux récents sur des problèmes d'inférences de fort rang, qui présentent eux aussi des comportements inhabituels.

On s'intéresse dans un deuxième chapitre au problème de la détection de communautés : étant donné un graphe dont on suppose qu'il est partitionné en plusieurs communautés, et que cette partition a une influence sur la présence ou l'absence de liens, le but est de reconstruire ces communautés le plus fidèlement possible. Pour l'étude théorique de ce problème, le modèle le plus classique est le modèle stochastique par blocs : il s'agit d'un graphe aléatoire G, dont les sommets sont partitionnés en r communautés de taille comparable, et telle que la probabilité de présence d'une arête ne dépend que des communautés auxquelles appartiennent ses extrémités.

Ici encore, on s'intéresse à la version peu dense de ce modèle, où les probabilités de connexion sont d'ordre 1/n. Dans ce régime, il est impossible de reconstruire intégralement les communautés, et on s'intéresse donc uniquement à la reconstruction partielle. Plusieurs classes d'algorithmes ont été proposés pour répondre à ce problème : parmi eux, les algorithmes spectraux, qui consistent à considérer les vecteurs propres d'une matrices associée à G pour en tirer de l'information sur les communautés. La première contribution de ce chapitre est la conception, ainsi que la démonstration du bon fonctionnement, d'une nouvelle méthode spectrale. Celle-ci est basée sur la matrice des distances D ( ) , dont le coefficient (x, y) vaut 1 si et seulement si x et y sont à distance exactement . i La deuxième question à laquelle on s'intéresse dans ce chapitre est celle de la robustesse des méthodes : étant donné que le modèle stochastique par blocs ne correspond pas forcément aux graphes réels, on étudie l'influence de petites perturbations (ajouts ou retraits d'arêtes) sur la performance des algorithmes. Les méthodes spectrales sont connues pour être extrêmement sensibles à ce type de modification, et échouent très rapidement. Par contraste, on montre que la nouvelle méthode basée sur la matrice D ( ) est beaucoup plus robuste aux perturbations: elle continue de fonctionner malgré l'ajout de jusqu'à n ε arêtes, où ε > 0. Ce résultat n'atteint pas la robustesse des algorithmes dits « semi-définis », mais notre algorithme a d'autres avantages : il est plus rapide, et peut détecter des communautés dans une plus large gamme de paramètres.

Les deux derniers chapitres de ce manuscrit portent sur une généralisation du modèle stochastique par blocs. En effet, celui-ci présente plusieurs limites dans son adéquation avec les réseaux réels, et de nombreuses variantes ont été développées : rajouter des informations supplémentaires aux arêtes, corriger la distribution des degrés ou encore travailler sur des graphes dirigés. Nous introduisons donc dans ce manuscrit un modèle très général de graphe aléatoire pondéré qui inclut toutes les variations susmentionnées ; les seules conditions imposées sont l'indépendance des arêtes, la faible densité du graphe, ainsi que le faible rang de la matrice d'adjacence, qui sont toutes vérifiées dans les modèles qui nous intéressent.

Dans le cas non dirigé et peu dense (3ème chapitre), il est connu que le spectre de la matrice d'adjacence ne donne pas d'information sur la structure sous-jacente du graphe : les vecteurs propres sont localisés autour des sommets de forts degrés. C'est entre autres pour cette raison que nous avons utilisé des matrices auxiliaires telles que D ( ) précédemment. On étudie dans ce chapitre la matrice « non-backtracking » B, déjà utilisée dans le cadre de la détection de communautés. En particulier, on montre que son spectre suit un comportement déjà observé dans le chapitre précédent : ses plus grandes valeurs propres suivent celles de l'espérance de la matrice d'adjacence A, tandis que le reste du spectre est confiné dans un cercle de rayon connu. Ce résultat est valide dans une vaste gamme de degrés, y compris dans des régimes plus denses.

Lorsque les degrés du graphe G sont suffisamment grands, ce résultat sur la matrice B a une conséquence particulièrement intéressante. En effet, via la formule d'Ihara-Bass reliant le spectre de B et celui de A, on retrouve des résultats très précis (avec un terme d'erreur tendant vers 0) sur les valeurs propres de A, ainsi que sur la corrélation entre les vecteurs propres de A et ceux de son espérance. Ces résultats reflètent une transition de phase connue sous le nom de Baik-Ben Arous-Péché, l'étendant ainsi des matrices de Wigner aux graphes aléatoires.

Dans le cas dirigé (4ème chapitre), les efforts des algorithmes de classification se portent habituellement sur des symmétrisations de la matrice d'adjacence, par exemple sur le calcul de ses valeurs singulières (qui correspondent aux valeurs propres de A * A). Par contraste, ce manuscrit montre que la même méthode que celle utilisée pour la matrice B s'applique directement à la matrice d'adjacence asymmétrique A ; des simulations numériques semblent montrer que l'utilisation des vecteurs propres à gauche et à droite de A dans un algorithme de classification résulte en une performance similaire aux algorithmes de l'état de l'art.

Enfin, dans les deux cas, des expériences numériques semblent montrer que la distribution empirique des vecteurs propres de A (resp. B) tend vers un mélange de gaussiennes de paramètres calculables théoriquement. Cela expliquerait l'efficacité des algorithmes développés dans le dernier chapitre, qui sont entre autres basés sur l'estimation de ces mélanges.

Chapter 1

Introduction

Inference of planted subgraphs

In this section, we focus on the study of a specific planted subgraph problem, where a tree Γ with known shape is planted inside a sparse Erdős-Rényi graph with mean degree λ. All results and proofs are gathered in Chapter 2 of this thesis.

From NP-hard to planted problems

We begin this exposition with a motivation for the study of inference problems as a random instance of NP-hard problems. Let G = (V, E) be a graph on n vertices; some questions that we could consider on G are as follows:

• the max-clique problem : find the size of the maximum fully connected subset (or clique) of V . We can also consider the associated decision problem : given k, find a clique of size k in G (or determine that there are no such cliques).

• the min-bisection problem : find a partition of V in two subsets of size n/2 with the minimum number of edges between those subsets. A more general problem asks for a partition of V in k > 2 parts of equal size with as few edges between the partitions as possible.

• the Hamiltonian path problem : find a path in G that goes through each vertex of V exactly once. Again, this can be generalized to finding a spanning tree of G with maximum degree lower than a constant k, or finding the path of maximum length in G.

All of those problems, and their generalizations, are known to be NP-hard [START_REF] Karp | Reducibility among Combinatorial Problems[END_REF][START_REF] Garey | Computers and Intractability; A Guide to the Theory of NP-Completeness[END_REF], which means that in the worst case they are very hard to solve. However, we can reasonably expect that the real-world instances of those problems do not match those worst-case scenarii : if we are looking for the maximum clique in a real network, it is likely because we assume that there is one that stands out. Conversely, we may want to know if the found maximum clique is statistically significant, or if it arises from random noise.

For those reasons, we consider here the planted version of those problems, where a specific structure (a somewhat large clique, a hamiltonian path, or a partition structure) is "hidden" inside a random graph. An often convenient assumption is to consider an Erdős-Rényi model G(n, p), where p = p(n) is adapted to the problem at hand. As an example, for the planted clique problem the most widely used setting is p = 1/2 independently from n, while in the planted hamiltonian cycle problem the setting used in [START_REF] Broder | Finding hidden hamiltonian cycles[END_REF] is p = d/n for constant d.

The two main tasks we want to perform on our inference models are usually the following:

• Detection: given a graph G, is there a (preferably polynomial) algorithm that can detect with high probability whether G was drawn from G(n, p) or whether G contains a planted structure ?

• Reconstruction: given a graph G drawn from the planted model, is there a (polynomial) algorithm that can recover the vertices in the planted structure with high probability, or at least a positive fraction of them ?

An important thing to note, however, is that a problem does not need to be NP-hard to yield insightful planted variants ; indeed, the planted matching problem [START_REF] Semerjian | Recovery thresholds in the sparse planted matching problem[END_REF] has a polynomially feasible optimization counterpart (the celebrated blossom algorithm [START_REF] Edmonds | Paths, Trees, and Flowers[END_REF]), but a rich phase transition landscape.

Hard phase in the planted clique problem

We now temporarily focus on the planted clique problem, where a clique of size k is randomly hidden inside a G(n, 1/2) graph; we denote the resulting random model by PC(n, k). In [START_REF] Matula | The employee party problem[END_REF], the author shows that the maximum clique in a G(n, p) graph has size

s(p) = 2 log(n) log(1/p) + O(log log(n)).
This implies that whenever k ≥ (1 + ε)s(1/2) = 2(1 + ε) log 2 (n), w.h.p a graph drawn according to G(n, 1/2) has no clique of size k, whereas one drawn according to PC(n, k) has (by definition) at least one. This illustrates a general method for planted subgraph problems: whenever the underlying random graph contains no copy of the planted subgraph w.h.p, detection is easily shown to be possible ! In the same regime, for the specific planted clique model, it can be shown that w.h.p. the only k-clique in G ∼ PC(n, k) is the planted one; as a result we have that reconstruction is possible as soon as k ≥ (2 + ε) log 2 (n).

However, the two algorithms outlined above are non-polynomial : finding the planted kclique or proving its non-existence requires inspecting n Ω(log(n)) vertices. In fact, no polynomial algorithms for either detection or reconstruction are known unless k = Ω(n); the state of the art is a quasi-linear algorithm when k > n/e [START_REF] Deshpande | Finding Hidden Cliques of Size N/e in Nearly Linear Time[END_REF], as well as a "doubling trick" by Alon et al. [START_REF] Alon | Finding a large hidden clique in a random graph[END_REF] that allows any algorithm to be expanded to k > ε √ n for any ε > 0 at the cost of increasing the complexity: the resulting algorithm is still polynomial, but with a degree proportional to log 2 (ε). This is the core of what is known as the information-computation gap: when log(n) k √ n, there is theoretically enough information to detect and recover the planted clique, but with no polynomial algorithm known. It is conjectured, and supported by some theoretical evidence (see for example [START_REF] Jerrum | Large Cliques Elude the Metropolis Process[END_REF][START_REF] Barak | A Nearly Tight Sum-of-Squares Lower Bound for the Planted Clique Problem[END_REF]) that it is impossible to recover the planted clique in polynomial time when k = o( √ n). We can therefore pinpoint three regimes of parameters in this problem :

• the impossible phase (k < (1ε) log(n)): it is provably impossible to perform either detection or reconstruction with nontrivial success probability,

• the hard phase (log(n) k √ n): an exhaustive (and non-polynomial) search is guaranteed to find the planted clique with high probability, but no polynomial algorithm is known to work,

• and the easy phase, where both detection and reconstruction are polynomially feasible.

This type of phase transition landscape has been observed in several inference problems, including sparse PCA [START_REF] Berthet | Optimal detection of sparse principal components in high dimension[END_REF] or community detection [START_REF] Moore | The Computer Science and Physics of Community Detection: Landscapes, Phase Transitions, and Hardness[END_REF]. We refer to [START_REF] Brennan | Reducibility and Computational Lower Bounds for Problems with Planted Sparse Structure[END_REF] for a systematic study of this phenomenon. Notable exceptions include the planted Hamiltonian path [START_REF] Bagaria | Hidden Hamiltonian Cycle Recovery via Linear Programming[END_REF] or the planted matching [START_REF] Semerjian | Recovery thresholds in the sparse planted matching problem[END_REF] problems ; a possible explanation for this diverging behavior is given at the end of this section.

The planted tree problem

The focus of this manuscript is on inference problems in sparse random graphs, i.e. graphs where the expected degree is independent from n. This translates, for homogeneous random graphs, in an Erdős-Rényi model with parameters n and λ/n for fixed λ. The main reason for this focus is the structure of real-world networks: as can be seen in Table 1.1, those networks are extremely sparse, and are thus better modeled by random graphs with lower density.

To match the sparsity of the underlying graph, the planted structures need to be sparser as well; for this reason, we focus on the case of planted trees. This choice can also be motivated by a problem in network security: assuming that a population of k malicious agents intend to coordinate to launch some kind of attack, the most inconspicuous way for them to do so is to form a minimal number of connections; consequently, their connection network will form a tree.

Without further restrictions, our model is not specific enough (see [START_REF] Otter | The Number of Trees[END_REF] for the number of graph on k vertices). In this manuscript, except for a digression on planted stars (which are related to the degree distribution of a random graph), we focus on a few families of trees:

• a path of length k,

• a complete D-ary tree (with D ≥ 2 fixed) of height h.

Those choices fit the framework of NP-hard relaxations discussed at the beginning of this section: both the decisions problems of finding a path or a D-ary tree of a given size in a graph are known to be NP-complete [START_REF] Thomas | Introduction To Algorithms[END_REF].

In order to quantify the performance of our reconstruction algorithms, we use the following metric: given the set of planted vertices S ⊆ V , we define the overlap of an estimator Ŝ as

ov( Ŝ) = 1 |S| E S ∩ Ŝ .
This diverges from the usual convention of searching for an estimator Ŝ that achieves reconstruction with high probability, and not in expectation. However, these definitions match in the regimes that are of interest in this problem: in particular, if ov( Ŝ) = o(1), then it is straightforward to show that lim sup S ∩ Ŝ = o(1) w.h.p., and both definitions for the impossibility of reconstruction coincide. The only regime where a significant difference can occur is that of partial reconstruction, where 0 < ov( Ŝ) < 1, but our results in this regime can be extended to the high probability case without much effort.

Counting subgraphs in random graphs

In the following, we denote the planted strcture by Γ = Γ(k). The most intuitive method to study our planted tree model is to simply count the copies of Γ in an Erdős-Rényi graph. As such, we define the random variable X Γ (G) = number of copies of Γ in G. As we mentioned above, whenever X Γ (G) = 0, then a planted copy of Γ in G is easy to detect, although not necessarily easy to reconstruct. This yields the following heuristic:

Network

Whenever E(X Γ ) = o(1) in an Erdös-Rényi graph, then planted copy of Γ is detectable with high probability.

The implied detection procedure need not be polynomial, as testing the existence of a copy of Γ in an arbitrary graph can be complex. It also does not imply anything about reconstruction: even though there is no copy of Γ in G prior to adding the planted one, this addition may create many "decoy" copies that prevent reconstruction. A more surprising fact is that the distribution of X Γ also allows to prove results about the impossibility of detection! More precisely, the following holds:

Proposition 1. If in an Erdős-Rényi graph G(n, λ) one has Var(X Γ ) = o(E(X Γ )),
then detection is impossible: no algorithm can distinguish from the Erdős-Rényi and planted subgraph models with nontrivial probability.

Further, if E(X Γ ) = ω(1), then reconstruction is also impossible: no algorithm can recover a positive fraction of the planted subgraph's vertices with nonvanishing probability.

In other words, the study of detection and (sometimes) reconstruction often reduces to computing the first and second moment of X Γ for some specific Γ. For fixed-size subgraphs, as n → ∞, this was extensively studied by Bollobás [START_REF] Bollobás | Threshold functions for small subgraphs[END_REF]; those methods can be adapted to our setting when the size of Γ grows slowly enough.

Phase transition landscape of the planted tree problem

The main results achieved in Chapter 2 for the planted path and D-ary tree are summarized in Figures 1.1 and 1.2. We obtain a near-complete phase transition landscape for the planted path problem, with the exception of the case where k = Ω(n); for the planted D-ary tree, the results are less comprehensive, although we provide several conjectures to fill the gaps in the landscape. Already though, this planted tree problem exhibits some key differences with the usual landscape of inference problems:

Absence of hard phase A common staple of inference problems, e.g. planted clique or community detection (see [START_REF] Abbe | Proof of the Achievability Conjectures for the General Stochastic Block Model[END_REF] for the latter) is the presence of a so-called hard phase, where detection and reconstruction are possible but no polynomial algorithm is known. A tentative systematic study of such phenomena can be found in [START_REF] Brennan | Reducibility and Computational Lower Bounds for Problems with Planted Sparse Structure[END_REF], drawing parallels with known NPhard problems. By contrast, no such phase exists in the studied planted tree models : as soon as detection or reconstruction are possible, they can be performed by a polynomial algorithm, often even pseudo-linear in the number of edges.

Detection without reconstruction Another feature usually observed is the strong dependency between detection and reconstruction. Although ad-hoc counter-examples exist [START_REF] Banks | Information-Theoretic Bounds and Phase Transitions in Clustering, Sparse PCA, and Submatrix Localization[END_REF], reconstruction is almost always impossible whenever detection is; and conversely, whenever detection is possible, it is often feasible to recover at least a portion of the planted structure. In the planted path model, we instead observed a large region, from k = ω( √ n) to o(n), where detection was feasible (and polynomially so, per the previous point), but it is impossible to recover more than a positive fraction of the planted path. The impossibility of complete reconstruction for the plantd D-ary tree is a more common behavior, encountered for example in sparse community detection [START_REF] Abbe | Community Detection and Stochastic Block Models: Recent Developments[END_REF].

A possible explanation for those behaviors may be related to the concept of low-rank planted structure : viewing the graph through its adjacency matrix, in most mentioned inference problems the planted structure is (up to diagonal terms) a low-rank matrix. As an example, the adjacency matrix of a clique of size k has rank 1, up to its diagonal terms. To the contrary, To the left is the graph of Google+ frienship circles, whose degree distribution roughly exhibits a power law, as in [START_REF] Clauset | Power-Law Distributions in Empirical Data[END_REF]. To the contrary, the distribution of an Erdős-Rényi graph with the same degree (right) is close to a Poisson distribution, which can be seen to be wildly different.

a tree of size k can have rank up to k, which is in particular the case for the planted path.

Other examples of high-rank inference problems include the planted Hamiltonian path in [START_REF] Bagaria | Hidden Hamiltonian Cycle Recovery via Linear Programming[END_REF], for which a polynomial algorithm also matches the information-theoretic lower bound up to negligible factors.

Spectral algorithms in community detection

In this second section, we move on to community detection and the study of the stochastic block model. More specifically, we focus on sparse stochastic block models, where as in the last section the connection probabilities are in O(1/n). All original proofs can be found in chapter 3 of this thesis.

Simulating real-world networks

Although Erdős-Rényi models are a popular way to simulate real-world networks, they lack several desirable features. One notable example is the degree distribution, which is known to be wildly different between the Erdős-Rényi model and many known networks (see Figure 1.3). Another point of interest, which will be our main focus, is the presence of inhomogeneities: we expect the presence of underlying communities -geographic circles in social networks, similarity of function in protein interaction networks -to influence the formation of edges. As such, the homogeneity of the Erdős-Rényi model, where each edge has the same probability of appearing, is an obstacle to the accuracy of modeling. Whenever a network exhibits this sort of community structure, a natural problem to consider is the possibility, and accuracy, of recovering those latent communities: the design and analysis of algorithms suited for this task is called community detection. The main obstacle in this endeavor is the following: except in some rare cases (see e.g. Figure 1.4), real-world networks with ground truth communities are rare, and thus the performance analysis of such algorithms is hard to define.

To address this shortcoming, the stochastic block model (or SBM in short) was proposed in [START_REF] Holland | Stochastic blockmodels: First steps[END_REF]; it first consists in separating the vertex set of a random graph in blocks (modeling the underlying communities). Given this partition, each edge is then drawn independently from all others, with a probability of presence depending only on the communities of its endpoints. Usually -in the so-called assortative models -this gives rise to denser groups, with fewer edges connecting different groups. Several related models have been devised to address other issues, such as setting an arbitrary degree distribution [START_REF] Karrer | Stochastic blockmodels and community structure in networks[END_REF], overlapping communities [START_REF] Edoardo | Mixed Membership Stochastic Blockmodels[END_REF], or a geometric model to bring it closer to real-world networks [START_REF] Galhotra | The Geometric Block Model[END_REF].

In light of the aforementioned Table 1.1, sparse stochastic block models will be of particular interest: in those models, the average degrees of the vertices are constant, or grow only very slightly faster.

Sparse SBM : definitions

During the rest of this section, unless specifically mentioned, all stochastic block models studied will be sparse. We first elaborate on the SBM definition, as follows. Given a community assignment σ : [n] → [r], and a symmetric connectivity matrix P of size r × r with positive entries, we build a random graph G = (V, E) such that V = [n], and each edge (i, j) is present in E independently from all others, with probability P((i, j) ∈ E)) = P σ(i)σ(j) n .

(1.1)

A special attention is given to the two-block symmetrical case, with two communities of equal size n/2 and the connectivity matrix having the form P = a b b a .

In the general case, we shall assume that the communities are linear in size, i.e.

|{x ∈ [n] | σ(x) = i}| n = π i + o(1), (1.2)
and we define the mean progeny matrix M as

M ij = P ij π j . (1.3)
Informally, the matrix M represents the expected number of neighbours of a vertex with type i that have type j. Finally, we will assume that the expected degree of each vertex is the same, which translates to

j∈[r] M ij = d for all i ∈ [r]. (1.4)
This condition is actually not a restriction: indeed, if (1.4) does not hold, a simple clustering on the vertex degrees gives an easy reconstruction procedure. It implies, in particular, that the Perron eigenvalue of M is the average degree d, with associated eigenvector 1.

In order to measure algorithm performance, we shall need a measure of how close an estimated community assignment is to the ground truth. The most commonly used metric is the overlap; given a community assignment σ : [n] → [r] and an estimator σ, we can define an unadjusted overlap as uov(σ, σ) = max

τ ∈Sr 1 n i∈[n] 1 σ(i)=τ •σ(i) ,
where the maximum is taken over all permutations of the communities. This overlap is then rescaled to set the "naive" estimator (consisting of assigning every vertex to the largest community) to have an overlap of zero, while still ranging from 0 to 1, which yields the following definition:

ov(σ, σ) = uov(σ, σ) -π max 1 -π max ,
where π max is the maximum entry of π. This rescaled version is the one we'll use in the following. Our interest lies in the limit n → +∞; we classify the reconstruction performance of an estimator σ in three categories:

• Exact recovery: P(ov(σ, σ) = 1) = 1 -o(1), • Almost exact recovery: P(ov(σ, σ) = 1 -o(1)) = 1 -o(1),
• Partial recovery: P(ov(σ, σ) > α) = 1o(1) for some α > 0.

Due to the presence of a positive proportion of isolated vertices in sparse SBMs, exact and almost exact recovery are unachievable; as such, our efforts only focus on attaining partial recovery.

Tree approximation and fundamental limits

It is a well-known fact (see [START_REF] Van Der Hofstad | Random Graphs and Complex Networks, volume 1 of Cambridge Series in Statistical and Probabilistic Mathematics[END_REF]) that when n → ∞ a sparse Erdős-Rényi random graph G(n, d/n) converges, in the sense of Benjamini-Schramm [START_REF] Benjamini | Recurrence of Distributional Limits of Finite Planar Graphs[END_REF], to a Galton-Watson tree with offspring distribution Poi(d). This result can be extended to the stochastic block model, defining a multitype Galton-Watson tree as follows:

• the root vertex has a random type drawn according to the probability vector π,

• each vertex of type i has a number Poi(M ij ) of children of type j, for all j ∈ [r], where M is the matrix in (1.1).

Then, the SBM converges (in the same sense) to the random tree defined above [START_REF] Van Der Hofstad | Random Graphs and Complex Networks, volume 1 of Cambridge Series in Statistical and Probabilistic Mathematics[END_REF]. This seems to indicate a strong relationship between the properties of the two models; and indeed many papers [START_REF] Mossel | Local Algorithms for Block Models with Side Information[END_REF][START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF][START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF][START_REF] Mossel | A Proof of the Block Model Threshold Conjecture[END_REF]] make use of couplings to translate results from one model to the other.

Of particular interest in the study of such tree processes is the census reconstruction problem: given only the number of vertices of each type at depth R, is is possible to recover the type of the root vertex with better accuracy than random chance, when R → ∞ ?

Although not described this way, a paper from Kesten and Stigum [START_REF] Kesten | A Limit Theorem for Multidimensional Galton-Watson Processes[END_REF] provides an affirmative answer to this question, provided

λ 2 (M ) 2 > d (1.5)
where λ 2 (M ) is the second largest (in magnitude) eigenvalue of M . For this reason, equation (1.5) is often dubbed the Kesten-Stigum (KS) threshold. In the case of the two-blocks symmetric SBM, this threshold becomes

(a -b) 2 > 2(a + b),
and is known to be sharp: if the other (strict) inequality is true, it is impossible to estimate the type of the root vertex from the long distance census (see [START_REF] Evans | Broadcasting on trees and the Ising model[END_REF]). This complete result for r = 2 is leveraged in [START_REF] Mossel | Reconstruction and estimation in the planted partition model[END_REF] (for the negative part) and [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] (for the positive part) to show that those results translate to the possibility or impossibility of detection and reconstruction in the symmetric SBM.

For larger values of r, the picture is more complicated: following a conjecture from [START_REF] Decelle | Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications[END_REF], the methods in [START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF] have been extended to more than two communities in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF][START_REF] Abbe | Achieving the KS threshold in the general stochastic block model with linearized acyclic belief propagation[END_REF], when above the KS threshold. However, a major difference is the possibility of reconstruction below this threshold, shown in [START_REF] Abbe | Proof of the Achievability Conjectures for the General Stochastic Block Model[END_REF], although with non-polynomial algorithms. This is thus another instance of the information-computation gap mentioned in the previous section. More information, as well as a survey on denser SBMs, can be found in [START_REF] Abbe | Community Detection and Stochastic Block Models: Recent Developments[END_REF].

Classifying reconstruction algorithms

Algorithms for community detection in the SBM can roughly be classified into three categories: semi-definite programming relaxations, message passing algorithms, and spectral methods. We briefly touch on the first two, and will dedicate the rest of this section to the third.

Semi-definite programming In the two-block symmetric case, labelling the groups with {-1, 1}, finding the maximum likelihood estimator for σ is equivalent to the following:

maximize σ * Aσ subject to σ ∈ {-1, 1} n , i σ i = 0, (1.6)
where A is the adjacency matrix of G. This is a reformulation of the min bisection problem discussed in the previous section, and is therefore NP-hard to solve. This optimization problem is therefore relaxed into another, more easily tractable one, the main choice being [START_REF] Guédon | Community detection in sparse networks via Grothendieck's inequality[END_REF][START_REF] Montanari | Semidefinite programs on sparse random graphs and their application to community detection[END_REF]:

maximize A - d n 11 * , X subject to X 0, X ii = 1 ∀i ∈ [n]
where X 0 means that X is symmetric positive-semidefinite, d is an estimate of the mean degree of G, and the scalar product is A, B = Tr(A * B). One then hopes that the found maximum is close to X = σσ * , so that the community labels can be recovered from the argmax X. This often becomes false when the parameters a, b become close to the KS threshold, and as a consequence no SDP algorithm is known to work up to the precise threshold, only approaching it as a + b diverges [START_REF] Montanari | Semidefinite programs on sparse random graphs and their application to community detection[END_REF]. The paper [START_REF] Makarychev | Learning Communities in the Presence of Errors[END_REF] presents a generalization of the SDP method to multiple communities, but also misses the KS threshold by a (possibly large) constant.

Belief propagation and message-passing Assuming that the community labels are drawn according to a probability vector π (reminiscent of (1.2)), the probability of a community assignment σ is

P(σ | G; P ; π) ∝ i<j P A ij σ(i),σ(j) 1 - P σ(i),σ(j) n 1-A ij i∈[n]
π σ(i) .

(1.7)

Disregarding the correlations corresponding to non-edges, Equation (1.7) corresponds to a Markovian random field; as such, a natural method of inference is the use of belief propagation (BP) algorithms, whose building block is the sum-product algorithm. Despite promising numerical evidence [START_REF] Decelle | Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications[END_REF], no proof of correctness for this algorithm is known to work in the SBM down to the KS threshold. However, linearized versions of this algorithm, either an adaptation of the cavity method [START_REF] Mezard | Spin Glass Theory And Beyond: An Introduction To The Replica Method And Its Applications[END_REF] or the ABP algorithm in [START_REF] Abbe | Achieving the KS threshold in the general stochastic block model with linearized acyclic belief propagation[END_REF], have been proven to work down to the KS threshold. Those proofs usually involve linking the properties of those linearized algorithms to the spectrum of specific matrices that depend on the graph G, hence an important connection with the spectral algorithms discussed later.

Even without proof of its correctness, the classic BP algorithm has another use: it allows to amplify the signal found by other algorithms, often up to the optimal overlap; this improvement is especially discussed in [START_REF] Mossel | Belief propagation, robust reconstruction and optimal recovery of block models[END_REF], for the two-block case, and [START_REF] Abbe | Achieving the KS threshold in the general stochastic block model with linearized acyclic belief propagation[END_REF] in the general setting.

Spectral algorithms

The third class of algorithms, and the one studied in this thesis, are spectral algorithms. They hinge on a simple observation: the non-zero eigenvalues of the expected adjacency matrix E[A] are the same as those of M , with associated eigenvectors constant on the clusters. Writing

A = E[A] + (A -E[A]),
we could expect that using arguments from perturbation theory we are able to show that those eigenvalues are reflected within the spectrum of A as well, so that clustering on e.g. the second eigenvector of A yields non-trivial reconstruction. This ansatz has been verified incrementally for a wide regime of degrees (see [START_REF] Abbe | Community Detection and Stochastic Block Models: Recent Developments[END_REF] and references therein), and [START_REF] Feige | Spectral techniques applied to sparse random graphs[END_REF][START_REF] Benaych-Georges | Largest eigenvalues of sparse inhomogeneous Erdős-Rényi graphs[END_REF] shows that the spectrum of A retains information from the one of E[A] up to the regime

d log(n) log log(n) .
Unfortunately, this property fails to hold when d is below this threshold. The reason for this failure is that for very sparse random graphs, the support of the eigenvectors of A associated with the highest eigenvalues concentrate around the vertices with high degrees, instead of capturing the community structure (see Figure 1.5 for an example of this phenomenon). Special care therefore has to be taken to limit the influence of those vertices.

The first efforts in this direction were done in [START_REF] Coja-Oghlan | Graph Partitioning via Adaptive Spectral Techniques[END_REF], by trimming those vertices from the graph; however, this algorithm does not achieve positive overlap down to the KS threshold. The most successful approaches involve replacing the adjacency matrix A by another matrix that depends on G, but is less influenced by vertex degrees. Examples include:

• the self-avoiding matrix B ( ) , such that B ( ) ij counts the number of self-avoiding paths between i and j. This matrix was the first to reach the KS threshold in [START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF], and was extended to the case of multiple communities in [START_REF] Stephan | Robustness of Spectral Methods for Community Detection[END_REF] (see Chapter 3),

• the non-backtracking matrix B, indexed by the oriented edges of G, such that

B (x,y),(z,t) = 1 y=z 1 x =t ;
powers of B thus count the number of paths between oriented edges that do not backtrack in successive steps. This matrix was suggested in [START_REF] Decelle | Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications[END_REF], stemming from a linearization of the BP algorithm. Its spectral properties were then studied in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF], which showed the possibility of reconstruction above the KS threshold upon a small spectral condition on M . The non-backtracking matrix is of particular interest, for many reasons: it doesn't require tuning a path length parameter (even though the proof in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF] actually considers the matrix B ), and the non-backtracking operator has importance in other areas of graph theory, such as Ramanujan graphs [START_REF] Lubotzky | Cayley graphs: eigenvalues, expanders and random walks[END_REF] or the graph zeta function [START_REF] Hashimoto | Zeta Functions of Finite Graphs and Representations of $p$-Adic Groups. Automorphic Forms and Geometry of Arithmetic Varieties[END_REF].

We also introduce in [START_REF] Stephan | Robustness of Spectral Methods for Community Detection[END_REF] another matrix suited for spectral community detection: the distance matrix D ( ) , such that D

( ) ij = 1 d(i,j)=
where d(i, j) is the usual graph distance between i and j. While very close (and thus having similar properties) as the matrix B ( ) defined above in the typical SBM-generated graph, it is more robust to edge addition, as we will see below.

Robustness of community detection

The problem of robustness draws its root in the inaccuracies of the SBM to model real-world networks. More precisely, graphs generated according to a sparse SBM are known to be locally tree-like, with very few cycles and no cliques of size greater than four. In contrast, real-world ). Since the non-backtracking matrix is not symmetric, its eigenvalues are complex; however, the outlier eigenvalues (as well as the associated eigenvectors) are real. Notice that the communities are less separated in the eigenvector plots than in Figure 1.5, a result of the model sparsity.

networks often contain cliques or denser subgraphs of moderate size, such as friend groups in social network graphs. As a result, several adaptations have been proposed to rectify the SBM, the two major ones being:

• the geometric block models, where each vertex u is assigned a position X u in R k (or some subset thereof), and then two vertices u and v are connected iff their distance X u -X v is less than a predetermined threshold. Typically, either the position X u (in [START_REF] Abbe | Graph Powering and Spectral Robustness[END_REF]) or the thresholds (in [START_REF] Galhotra | The Geometric Block Model[END_REF]) will depend on the community memberships.

• a perturbation of the classical SBM, where m edges are added either randomly or adversarially to a graph G drawn according to a sparse SBM. Generally, the adversarial version is preferred, or a "mixed" model where small cliques are added randomly (see [START_REF] Javanmard | Phase transitions in semidefinite relaxations[END_REF] for such an example).

Unfortunately, classical spectral and message-passing algorithms do not fare well in those settings: they often rely on fragile properties of the SBM (such as the local tree approximation), which are quickly lost. On the other hand, SDP algorithms, while slower and not working up to the KS threshold, are very robust: they guarantee reconstruction even in the presence of a perturbation of up to o(n) edges. By comparison, the spectrum of B ( ) or B can be greatly perturbed by the addition of a clique of size o(log(n)).

We show in [START_REF] Stephan | Robustness of Spectral Methods for Community Detection[END_REF] that the aforementioned distance matrix D ( ) fares much better than other spectral methods: it can sustain a perturbation affecting at most O(n ε ) vertices, where ε is a small (but nonzero) constant. We also show that this bound is tight in the fully adversarial context: adding a clique of size n ε in a well chosen manner will make the spectral algorithm fail.

Unfortunately, this upper bound does not match the stellar performance of the SDP algorithms, and working out the precise constant ε shows that it is fairly small. However, this is a first step in showing that the perceived fragility of spectral methods is not a foregone conclusion, and that an algorithm that combines the best of both worlds is possible.

Spectra of weighted inhomogeneous random graphs

We now focus on more general community detection problems, including community detection in directed graphs. In particular, we study the spectrum of the non-backtracking matrix and directed adjacency matrix of random graphs under a very general model. All proofs and details are in Chapters 4 and 5 of this manuscript.

Beyond the classical SBM

We first expand on several variants of the stochastic block model, that will be the motivation for the general graph model introduced later.

Labeled stochastic block model Real-world networks often carry more information than simply the presence or absence of edges. For this reason, a common adaptation of the SBM includes edge information: given an array P i,j of probability distributions on a common label space L, the classical SBM is augmented by a label x,y on each edge (x, y) drawn according to the distribution P σ(x),σ(y) . Such a model was defined in [START_REF] Heimlicher | Community Detection in the Labelled Stochastic Block Model[END_REF], where the authors conjectured an analogue of the KS threshold in the two-block case, and furthered in [START_REF] Lelarge | Reconstruction in the Labelled Stochastic Block Model[END_REF]. In particular, one of the proposed reconstruction methods involves choosing a function w : L → R and using it to transform G into a weighted graph. Note that this model encompasses the popular censored block model of [2,[START_REF] Saade | Spectral detection in the censored block model[END_REF].

Degree-Corrected SBM To remediate the mismatch between the degree distributions of real-world networks and the SBM (see Figure 1.3) the degree-corrected SBM was proposed in [START_REF] Dasgupta | Spectral analysis of random graphs with skewed degree distributions[END_REF]: it consists in an additional affinity vector θ ∈ R n , such that the probability of presence of an edge (i, j) in G is

P((i, j) ∈ E) = θ i P ij θ j n .
Depending on the models, the vector θ can be either deterministic [START_REF] Gulikers | A spectral method for community detection in moderately sparse degree-corrected stochastic block models[END_REF][START_REF] Lei | Consistency of spectral clustering in stochastic block models[END_REF] or i.i.d [START_REF] Gulikers | Non-Backtracking Spectrum of Degree-Corrected Stochastic Block Models[END_REF]. In the case where P represents a SBM with constant expected degree, and θ is random, it is easy to see that the degree distribution of G is a rescaling of the one of the θ i , which allows for matching arbitrary graphs more closely. This model can of course be augmented with labels, in the sense described above.

Directed SBM Although less studied than its undirected version, community detection in directed networks is also a topic of research (see [START_REF] Fragkiskos | Clustering and community detection in directed networks: A survey[END_REF] for a survey). One obstacle to reconstruction is that the adjacency matrix of a directed graph is a priori not diagonalizable; as such, commonly used reconstruction techniques use symmetrizations of the adjacency or Laplacian matrices, e.g. the singular value decomposition [START_REF] Satuluri | Symmetrizations for clustering directed graphs[END_REF][START_REF] Chung | Laplacians and the Cheeger Inequality for Directed Graphs[END_REF].

The SBM can be readily extended to the directed setting [START_REF] Wang | Stochastic Blockmodels for Directed Graphs[END_REF]; in this case, the matrix P need not be symmetric, and we can assign different types σ and σ to the start and end vertices of each edge, so that

P((i, j) ∈ E) = P σ(i)σ (j) n .
Assuming that, as in the undirected case,

|{x ∈ [n] | σ(x) = j, σ (x) = i}| n = Π ij + o(1)
the mean progeny matrix M defined in Equation (1.3) has the form

M = P Π,
and we assume that this matrix is diagonalizable. As with the undirected version, the directed SBM can be extended with label or degree corrections.

A generic random graph model

Although specific adaptations exist when the affinity vector θ is i.i.d (see [START_REF] Gulikers | Non-Backtracking Spectrum of Degree-Corrected Stochastic Block Models[END_REF]), in the general DCSBM case the expected adjacency matrix is not constant by blocks. We therefore need a much more general model, outlined below. Given an n × n matrix P with entries in [0, 1] and a random matrix W , we define a random graph G as follows : each edge (i, j) is present in G with probability P ij , and holds a weight W ij . Depending on the model (directed or undirected), the matrices P and W may be required to be symmetric. It is also very likely that the results of this manuscript can be extended to an interpolating model, where the presence of an edge between (i, j) and (j, i) is correlated, but where the resulting graph is not necessarily undirected.

The expectation of the adjacency matrix Q := E[A] has a simple expression:

Q = P • E[W ],
where • is the elementwise (or Hadamard) product. The matrix Q therefore serves as the signal matrix, that we want to recover from the observation of G.

Given the application scope of our model, we make several assumptions on Q and W :

• the graph G is sparse: P xy ≤ d/n for all x, y,

• Q has low rank r,

• the eigenvectors of Q are delocalized, in the sense that ϕ ∞ ≤ b √ n for any normed eigenvector ϕ,

• the entries of W are uniformly bounded by a constant L.

Note that those restrictions are actually fairly lax: our analysis allows for r, b = n o (1) , and d, L = exp o log(n) . Note that this random model encompasses more than simply the SBM variants discussed above: as an example, it can be used as a model for very sparse (noisy) matrix completion -see [START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF] for an excellent account on this topic.

Aside : Phase transitions in random matrix theory

We temporarily place ourselves in the undirected case, where A and Q are symmetric. Writing the adjacency matrix of G as

A = Q + (A -Q),
where the second term has an expected value of zero, we can rephrase the problem of characterizing the spectrum of G into a problem of random matrix theory. The usual questions that we would like to answer are the following:

(i) what is the relationship between the spectrum of A and the one of E[A] ?

(ii) what is the limiting spectral distribution of A ?

Those questions have a rich history in random matrix theory, especially when (as in the examples discussed above) the matrix Q has low rank. A celebrated result in this topic is the Baik-Ben Arous-Péché (BBP) phase transition [START_REF] Baik | Phase transition of the largest eigenvalue for nonnull complex sample covariance matrices[END_REF], on the largest eigenvalue of empirical covariance matrices of Gaussian vectors. It was the first example of a widespread phenomenon on random matrix models, that can be summarized as follows:

• if the largest eigenvalue µ 1 of E[M ] is below some threshold ϑ, then the largest eigenvalue of M is equal to ρ + o(1)
, where both ϑ and ρ depend on the model,

• if, on the other hand, the largest eigenvalue

µ 1 of E[M ] satisfies µ 1 > ϑ, then the largest value of M is of the form f (µ 1 ) + o(1)
, with f a deterministic function.

Such phase transitions are called BBP phase transitions, and have been proven to occur in various models, e.g. Wigner [START_REF] Péché | The largest eigenvalue of small rank perturbations of Hermitian random matrices[END_REF] matrices; more recently, [START_REF] Benaych | The eigenvalues and eigenvectors of finite, low rank perturbations of large random matrices[END_REF] has expanded this result to a larger class of random matrices, as well as to eigenvalues beyond the first.

In this manuscript, we show that part of this phase transition occurs in our weighted random graph model, assuming the weighted degrees

d x = y∼x W 2 xy (1.8)
concentrate around a common value d 0 independent from x. Under this condition, if µ is an eigenvalue of Q such that µ > √ d 0 , then there is an eigenvalue λ of the adjacency matrix A such that

λ = µ + d 0 µ + o(1).
This matches the theoretical results for Wigner matrices in [START_REF] Péché | The largest eigenvalue of small rank perturbations of Hermitian random matrices[END_REF][START_REF] Benaych | The eigenvalues and eigenvectors of finite, low rank perturbations of large random matrices[END_REF], which is in accordance with other results on the limit distribution of A [START_REF] Dumitriu | Sparse general Wigner-type matrices: Local law and eigenvector delocalization[END_REF]. We also obtain asymptotic results on the scalar products between the eigenvectors of Q and those of A, again matching [START_REF] Benaych | The eigenvalues and eigenvectors of finite, low rank perturbations of large random matrices[END_REF]. However, the concentration hypothesis (1.8) is quite restrictive: in the unweighted case, it requires the common average degree d to be at least ω(log(n)).

Non-backtracking matrix of undirected graphs

The fact that degree concentration is needed for the spectral properties of A observed in the previous paragraph is not a proof artefact: as with the more specific community detection, in the undirected case, the spectrum of A is very sensitive to sparsity. In the case of unweighted graphs with d log(n), the behaviour of the largest eigenvalues has been studied in [START_REF] Benaych-Georges | Largest eigenvalues of sparse inhomogeneous Erdős-Rényi graphs[END_REF]; the authors showed that the largest eigenvalues of A only correspond to vertices of highest degrees, with ; we generate spins according to the censored block model in [START_REF] Saade | Spectral detection in the censored block model[END_REF] (ε = 0.3), and assign weights according to equation (4.13) in Chapter 4. The parameters have been chosen so that reconstruction is impossible using only either the unweighted edges or the spins, but possible with a combination of both. Note that the shape of the spectrum inside the bulk is very distinct from the unweighted case (Figure 1.6). The embedding used to generate the right figure is the one in Equation (1.9). associated eigenvectors concentrated around those vertices. The more precise phase transition around d ∼ log(n) has also been studied in [START_REF] Alt | Extremal eigenvalues of critical Erdős-Rényi graphs[END_REF], this time on a uniform weighted Erdős-Rényi graph. The spectrum of A also has a shape that is far from that of a Wigner matrix: in particular, it has an atom (of known mass) at zero (see [START_REF] Coste | Emergence of extended states at zero in the spectrum of sparse random graphs[END_REF] for details).

The solution developed in this manuscript follows the lines of [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF], and uses the weighted non-backtracking matrix B defined as

B (x,y),(z,t) = W zt 1 y=z 1 x =t .
It enjoys similar desirable properties as its non-weighted counterpart, namely:

• it squashes the contribution of high-degree vertices,

• it does not require tuning a length parameter ,

• it allows to recover information about the adjacency matrix A through the Ihara-Bass formula [START_REF] Bass | The Ihara-Selberg Zeta Function of a Tree Lattice[END_REF][START_REF] Watanabe | Graph Zeta Function in the Bethe Free Energy and Loopy Belief Propagation[END_REF].

This relative stability allows us to obtain results similar to those of [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]: all eigenvalues of Q above a certain threshold ϑ are reflected in the spectrum of B, with the other eigenvalues of B being enclosed in a circle of radius ϑ(1 + o(1)). This holds for a large range of parameters: the rank of Q can be up to n o (1) , and the max edge probability P ∞ up to exp o( log(n)) .

To perform reconstruction on the various inference models mentioned in this section, we need a vector of length n instead of | E|. This is done through local averages: for an eigenvector χ of B, we define the associated embedded vector ϕ as

ξ(x) = e:e 2 =x
χ(e).

(1.9)

The main drawback of clustering using the non-backtracking matrix is its size: instead of clustering on a n × n matrix, we have to compute the eigendecomposition of a dn × dn matrix, where d is the mean degree of the graph. This can incur a large computational cost whenever the mean degree of the graph diverges (slowly). An alternative to the non-backtracking matrix that does not suffer from this issue is the Bethe Hessian matrix, defined as

H(r) = (r 2 -1)I -rA + D
where D is the diagonal matrix of vertex degrees. Several heuristics for the choice of r have been proposed [START_REF] Saade | Spectral Clustering of graphs with the Bethe Hessian[END_REF][START_REF] Dall | Revisiting the bethehessian: Improved community detection in sparse heterogeneous graphs[END_REF], which empirically provide good results. The Bethe Hessian is closely related to the non-backtracking matrix ; in particular, the eigenvector of B associated to an eigenvalue λ corresponds to a singular vector of H(λ) via the transformation (1.9). Studying the non-backtracking matrix thus also yields insights about the behavior of the Bethe Hessian, as evidenced in [START_REF] Coste | Eigenvalues of the non-backtracking operator detached from the bulk[END_REF].

Adjacency matrix of directed graphs

As previously mentioned, most community detection methods in the directed case make use of symmetrized versions of common matrices: a symmetric laplacian [START_REF] Chung | Laplacians and the Cheeger Inequality for Directed Graphs[END_REF], singular values of A [START_REF] Zhou | Analysis of spectral clustering algorithms for community detection: the general bipartite setting[END_REF], or even hermitian matrices [START_REF] Cucuringu | Hermitian matrices for clustering directed graphs: insights and applications[END_REF]. In contrast, following a line of work on the use of asymmetric matrices in inference problems started in [START_REF] Chen | Asymmetry helps: Eigenvalue and eigenvector analyses of asymmetrically perturbed low-rank matrices[END_REF], we show that using the unprocessed adjacency matrix already yields a plethora of useful information, at least in the directed SBM and its variants.

In particular, we show the exact same results as in the undirected case, with the nonbacktracking matrix B being replaced by the adjacency matrix of G: the eigenvalues of Q above a certain threshold ϑ are reflected in the spectrum of A, with the other eigenvalues confined in a bulk of radius ρ. Such a similarity between the adjacency and non-backtracking is no coincidence ; defining the V × E start and terminal matrices S and T as S x,e = 1 e 1 =x and T x,e = 1 e 2 =x , the matrices A and B satisfy the relationships

A = ST * and B = T * S -J,
where J is the edge reversal operator:

J(e 1 , e 2 ) = (e 2 , e 1 ).

In the sparsity regimes we consider, the matrix J is extremely sparse, so that we can write B ≈ T * S and the spectra of A and B are nearly identical.

The main strong point of our spectral analysis is that it encompasses various models inside a single algorithm: simply compute the spectrum of the non-backtracking matrix B (resp. the adjacency matrix A for directed graphs), and cluster on the eigenvectors that are outside the bulk. This generality allows us to apply this algorithm to most real-world graphs and expect decent results (see Figure 1.8). The optimal clustering algorithm is discussed in Chapter 5. The results of the empirical determination of the best clustering procedure yields a very interesting insight: gaussian mixture models seem to perform better than the much more widely used k-means algorithm.

We present in this manuscript a possible explanation for this behavior: when the mean degree of G goes to infinity, the eigenvectors of B (resp. A) seem to behave exactly like gaussian mixtures.

As can be seen in Figure 1.9, the empirical distribution matches quite closely the theoretical gaussian mixture, even for fairly low degrees (d = 20). We prove in Chapter 5 that the empirical distribution of the i-th eigenvector of A converges as n → ∞ to a mixture of random variables X ij with known mean and variance, that are obtained as limits of martingale processes on a multitype Galton-Watson tree. In particular, for the directed Erdős-Rényi model, the limit variable X = X 11 satisfies the recursion

X = 1 d N i=1 Z i ,
where N is a Poi(d) random variable and the Z i are i.i.d with the same distribution as X. This is reminiscent of a random version of the central limit theorem, and provides an intuitive justification for the observed convergence.

Chapter 2

Planting trees in graphs

This chapter is based on the paper [START_REF] Massoulié | Planting trees in graphs, and finding them back[END_REF], a joint work with L. Massoulié and D. Towsley.

Introduction

This paper is concerned with the detection of additional structures planted in a graph initially without structure (such as an Erdős-Rényi graph) and, in case such a structure is detected, with the reconstruction of the corresponding structure. We focus on planted structures that consist in a superimposed graph, and more specifically on superimposed trees. A first motivation for this focus stems from the following application scenario. Assume that the original graph without planted structure represents normal communications among agents, while the superimposed graph represents communications among a subset of attackers who, when active, connect directly among themselves to coordinate their activity. Detection then amounts to estimating whether an attack occurs, while reconstruction amounts to identifying the attackers in case of an attack.

A second motivation is theoretical: previous work reviewed in Section 2.2 has shown that detection and reconstruction of planted structures in graphs displays rich and intriguing behaviour, with phases where the task is either impossible, computationally hard, or easy. It is important to understand what causes such phases, and whether phases for detection always coincide with the corresponding phase for reconstruction. Our present study sheds light on these questions, by showing that in the cases of planted tree structures we consider, no hard phase occurs, while feasibility phases of detection and reconstruction differ widely. In contrast, the latter property does not hold for previously studied low rank planted structures.

More specifically, our contributions are as follows. In the particular case of planted line graphs, we determine the complete phase diagram for detection and reconstruction: In a low density region where the average degree λ of the original graph is below some critical value λ c , both detection and reconstruction go from impossible to easy as the line length K crosses some critical value K * = f (λ) ln(n), where n is the number of nodes in the graph. In a high density region where λ > λ c , detection goes from impossible to easy as K goes from o(

√ n) to ω( √ n).
In contrast, reconstruction remains impossible so long as K = o(n).

We then consider the case of D-ary trees for fixed D > 1, of height h. For these our results provide a similar picture with significant differences. Specifically, there exists a limit height h * = ln ln(D) + O(1) such that detection is impossible if h < h *ln(h * ), and easy for h > h * + Ω(1). In that latter case, non-trivial reconstruction is feasible, but it must fail on a non-vanishing fraction of the K attack nodes. In a high-density region λ > λ D , we have again that detection is easy for K = ω( √ n), and that reconstruction must fail at least on a fraction of nodes.

The paper is organized as follows. We review related work in Section 2.2. We describe our model and main results in Section 2.3. The proofs for planted lines and planted D-ary trees are in Sections 2.5 and 2.6 respectively, with detailed proofs of auxiliary results in the Appendix.

Related work

Planted clique detection and reconstruction has been the object of many works, see e.g. [START_REF] Dekel | Finding Hidden Cliques in Linear Time with High Probability[END_REF], [START_REF] Deshpande | Finding Hidden Cliques of Size N/e in Nearly Linear Time[END_REF], [START_REF] Barak | A Nearly Tight Sum-of-Squares Lower Bound for the Planted Clique Problem[END_REF] for recent results and surveys. A central result in that context is that detection appears hard (i.e. no algorithm is known to succeed at detection in polynomial time) for cliques of size o( √ n) planted in G(n, 1/2). IT thresholds for planted dense subgraph detection are developed in [START_REF] Verzelen | Community detection in sparse random networks[END_REF].

Computational hardness of planted clique is used in reduction arguments to show that other planted structure detection problems are hard, eg sparse PCA [START_REF] Berthet | Optimal detection of sparse principal components in high dimension[END_REF], and dense subgraph detection [START_REF] Hajek | Semidefinite Programs for Exact Recovery of a Hidden Community[END_REF]. The latter also displays IT-impossible phases, hard phases and easy phases. A systematic development of such reductions between problems with planted structure is initiated in [START_REF] Brennan | Reducibility and Computational Lower Bounds for Problems with Planted Sparse Structure[END_REF].

Community detection and reconstruction has also been thoroughly studied, the seminal article [START_REF] Decelle | Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications[END_REF] introducing several conjectures on feasibility of detection and reconstruction for the stochastic block model. Almost all conjectures in [START_REF] Decelle | Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications[END_REF] have been verified in subsequent works, in particular [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][START_REF] Abbe | Proof of the Achievability Conjectures for the General Stochastic Block Model[END_REF]. It is particularly relevant for the present article that these works identify regimes where both detection and reconstruction are jointly either impossible, possible but computationally hard, or computationally easy.

Presence of specific subgraphs in random graphs has been thoroughly studied, see e.g. [START_REF] Janson | Random Graphs[END_REF]. We leverage the corresponding techniques in our study of low density regions, for which detection feasibility corresponds to absence of copies of the planted graph structure in the original random graph.

Most planted structures considered so far were typically of "low rank" (e.g. planted dense graph's expected adjacency matrix is, up to diagonal terms, a rank one perturbation); in contrast, adjacency matrices of trees and lines are not close to a low rank matrix. One notable exception is the planted Hamiltonian cycle reconstruction addressed in [START_REF] Bagaria | Hidden Hamiltonian Cycle Recovery via Linear Programming[END_REF]. Interestingly, for that problem too there is no hard phase for reconstruction; but in contrast to our scenario, no large parameter region is identified where detection is easy while reconstruction is impossible.

Model and main results

A total population of n agents interconnects according to one of the following two modalities. Under the null hypothesis H 0 the interconnection does not display any specific structure. We assume that the corresponding graph G is an Erdős-Rényi G(n, p) graph, with edge probability p ∈ [0, 1] taken equal to λ/n for some fixed λ > 0. We thus focus on sparse random graphs with average degree O(1). Under the alternative hypothesis H 1 , the graph G is the union of a base graph G 0 distributed according to G(n, p), with another graph G connecting a distinguished subset K of nodes. Specifically, for a fixed graph Γ on node set [K] with edge set E, and an injective map σ : [K] → [n] chosen uniformly at random and independently of G 0 , G consists of the nodes K = {σ(i), i ∈ [K]} and edges {(σ(i), σ(j)), (i, j) ∈ E}.

We shall mostly focus on tree graphs Γ, and more specifically on D-ary trees, i.e. trees with a distinguished root, or depth-0 node, and for each ∈ [h-1], D depth-nodes being connected to one parent at depth -1 and D children at depth + 1. The two exteme cases are a line graph for D = 1 and a star for D = K -1.

We are interested in answering, on the basis of an observed graph G, the following questions: Q1 (Detection): For a given planted graph shape Γ (e.g. line, star, D-ary tree,. . .), under what parameter regimes specified by λ and K is there a test that distinguishes H 0 from H 1 with error probabilities of both kinds going to zero as n → ∞? This is an information-theoretic property characterized by the likelihood ratio P 1 (G) P 0 (G) , where P i denotes the distribution of G uner H i , i = {0, 1}. Indeed by the Neyman-Pearson lemma, among tests with given probability of correctly deciding H 1 , there is one which minimizes probability of erroneously rejecting H 0 which decides H 1 if and only if the likelihood ratio L(G) := P 1 (G) P 0 (G) is larger than some threshold τ . We can ask the same question as Q1 when we restrict ourselves to tests that can be implemented in polynomial time. This then corresponds to a computational property, and it is of interest to identify whether the two thresholds (informational and computational) coincide or not.

Q2 (Reconstruction):

Can one reconstruct the planted structure G , or at least a subset of its constituent nodes? Several metrics of reconstruction accuracy are possible. We shall focus on the following overlap metric, which we now define for estimation procedures that produce a set K of K nodes in [n], aimed to estimate at best the actual set K of K nodes involved in the attack.

Definition 1. The overlap of a set K estimating the actual ground truth K is by definition the expected size of their intersection, i.e.

ov( K

) := i∈[n] P(i ∈ K ∩ K).
We say that a particular reconstruction 1)), and partially succeeds if ov( K) = cK(1o(1)) for some c ∈ (0, 1).

K of size K fails if ov( K) = o(K), succeeds if ov( K) = K(1 -o(
Reconstruction (respectively, partial reconstruction) is then deemed feasible if there exists an estimator K that is successful (respectively, partially successful). These properties are of an information-theoretic nature. Indeed the best possible overlap is achieved by the so-called Maximum a Posteriori (MAP) estimation procedure, and these properties are therefore determined by the overlap of the MAP estimator. One can, as for detection, consider a computational version of reconstruction: reconstruction (respectively, partial reconstruction) is easy when it can be achieved by an estimator K that is efficiently computable.

Before stating our results for planted lines and D-ary trees, we first consider planted star graphs, for which a simpler picture holds: Theorem 1. For any fixed λ > 0, a planted star of size K = ln(n)/ ln(ln(n))[1-ω(1/ ln(ln(n)))] is not detectable, while both detection and reconstruction of a planted star of size K = ln(n)/ ln(ln(n))[1+ ω(1/ ln(ln(n)))] are easy.

The result for line graphs, summarized in Table 2.1, is Theorem 2 (Line graphs). In the low-density region λ < λ c = 1, detection and reconstruction are impossible if K = ln(n)/ ln(1/λ)ω(ln(ln(n))), while both detection and reconstruction are easy if K = ln(n)/ ln(1/λ) + ω(1) and K = o(n/ ln(n)).

In the high-density region λ > λ c = 1, detection and reconstruction are impossible if

K = o( √ n), detection is easy if K = ω( √ n), while reconstruction is impossible for K = o(n).
For D-ary trees, the results are similar. However the critical parameter λ D defined in (2.11) is the threshold for emergence of the D-core (see [START_REF] Moore | The Nature of Computation[END_REF]), and only partial reconstruction is possible in the subcritical regime λ < λ D . We consider D-ary trees Γ of depth h with corresponding size K = D h+1 -1 D-1 ; the main results (in terms of h) are summarized in When h ≤ h-O(ln(h)), both detection and reconstruction are impossible with high probability. Detection is easy whenever h ≥ h + O(1). For any λ > 0, hence in both low-density and high-density regions, detection is easy whenever K = ω( √ n) while complete reconstruction is impossible for K = o(n).

Preliminary results

We now state three results that hold for arbitrary planted structures, and that will be used extensively. The first is a characterization of the likelihood ratio P 1 P 0 :

Lemma 1. The likelihood ratio L(G) = P 1 (G) P 0 (G) is given by L(G) = X Γ E 0 (X Γ )
, where X Γ denotes the number of copies of Γ in G.

The second gives a generic detection process that succeeds for K large enough, and all planted graph structures Γ that are connected. Theorem 4. Assume that λ > 0, K = ω( √ n), and the hidden graph is any connected subgraph on K nodes, not necessarily a line. Then the total variation distance |P 1 -P 0 | var between P 0 and P 1 goes to 1 as n → ∞.

Let A i , i ∈ {1, 2, 3} denote the number of size i-connected components in G, λ = (nA 3 )/(A 1 A 2 ), and k = n-e λA 1 . The test that decides H 1 if k ≥ t n := K √ n, and H 0 otherwise is polynomialtime computable and distinguishes with high probability graphs sampled from P 1 or P 0 .

Remark. When λ is known, a simpler test based on the number of edges in the graph also succeeds. The test in Theorem 4 still applies even when λ is unknown. The proof further implies that under P 1 , G can be distinguished from G(n, λ /n) for any λ not necessarily equal to λ.

Finally, it is important to note that, as evidenced in [START_REF] Banks | Information-Theoretic Bounds and Phase Transitions in Clustering, Sparse PCA, and Submatrix Localization[END_REF], impossibility of detection does not imply immediately that of reconstruction. Fortunately, in our setting, the following result will imply the latter as soon as the former is proved :

Theorem 5. Assume that K = o( √ n) that E 0 (X Γ ) = ω(1)
and that E 0 L 2 = 1 + o(1). Then, for every estimator K of the planted set K, we have

ov( K) = o(K),
that is, reconstruction fails as well.

Proof strategy for planted paths

We say that the ordered set {i 1 , . . . , i K } of K distinct nodes in [n] is a K-path in G if and only if the edges (i , i +1 ) are present in G for all = 1, . . . , K -1. The previous Lemma 1 yields, in the case where Γ is the line graph, the following result, whose proof is in the appendix:

Lemma 2. For planted K-path, the likelihood ratio reads

L(G) := P 1 (G) P 0 (G) = 1 n(n -1) • • • (n -K + 1) |{K-paths in G}| λ n -K+1 • (2.1)
Moreover one has

E 0 (L 2 ) = E 0 (x S ), (2.2)
where x = n/λ, and S is a random variable counting the number of edges common to the K-path (1 -2 -• • • -K) and a random K-path π chosen uniformly at random among the n(n -1) • • • (n -K + 1) possible ones on node set [n].

Impossibility of detection

We have the following Theorem 6. Assume that λ > 1 and K = o( √ n), or alternatively that λ < 1 and K = ln(n)/ ln(1/λ)ω(ln(ln(n))). Then the total variation distance |P 1 -P 0 | var between P 0 and P 1 goes to zero as n → ∞. Thus for any arbitrary test

T (G) ∈ {0, 1}, P 1 (T (G) = 1) -P 0 (T (G) = 1) → 0 as n → ∞.
By a standard argument, the variation distance |P 1 -P 0 | var is upper-bounded by E 0 (L 2 ) -1, and thus the Theorem is a direct consequence of the following Lemma 3. Assume that λ > 1 and K = o( √ n), or alternatively that λ < 1 and K = ln(n)/ ln(1/λ)ω(ln(ln(n))). Then lim n→∞ E 0 (L 2 ) = 1.

The proof of Lemma 3 (details in the Appendix) is based on an analysis of expression (2.2).

Set Z t = 1 if edge (I t , I t+1 ) is part of path (1 • • • K), Z t = 0 if it is not part of that path, but I t+1 ∈ [K], and finally Z t = -1 if I t+1 / ∈ [K], so that E 0 (L 2 ) = E 0 (x K-1 t=1 Z + t ) (2.3)
In order to upper-bound this expression, a key step is the following Lemma, which exhibits a tractable upper bound involving a Markov chain:

Lemma 4. Let n := n -K. The Markov chain {Z t } t≥1 taking values in {-1, 0, 1} with transition probability matrix

P :=   1 -K/n K/n 0 1 -K/n (K -2)/n 2/n 1 -K/n (K -1)/n 1/n   (2.4)
can be constructed jointly with process {Z t } t≥1 so that, for all m ≥ 1, one has

E 0 (x m t=1 Z + t ) ≤ E 0 (x m t=1 Z + t ). (2.5)
Its proof is in the appendix, together with the analysis of the right-hand side of (2.5). The latter relies on spectral analysis of a matrix derived from P in (2.4), which leverages perturbation arguments as K/n → 0. It concludes the proof of Lemma 3 by showing that E 0 (L 2 ) = 1 + o(1) under the Lemma's assumptions.

Easiness of detection and reconstruction, sparse case

Assume λ < 1 and K = ln(n)/ ln(1/λ) + ω(1). Detection is then easy: under P 0 , the expected number of K-paths in the graph is o(1). A test which decides P 1 if there is a K-path and P 0 otherwise thus discriminates the two hypotheses with high probability. Presence of a K-path can moreover be determined in polynomial time by running depth-first searches from each node in G.

For reconstruction, we need the following Lemma 5. For λ < 1, K = ln(n)/ ln(1/λ) + ω(1) and K = o(n/ ln(n)), let C be the connected component of the graph containing the longest path. Apply √ K times a peeling operation to C, which consists in removing all degree one nodes, to obtain set C . Under P 1 , set C and its intersection with the planted path both have with high probability size K ± o(K).

The Lemma readily implies a polynomial-time algorithm for reconstruction that achieves overlap Ko(K): set C can be obtained in polynomial time. By adding / removing o(K) nodes to it one obtains a set of size K with overlap Ko(K).

Impossibility of reconstruction, dense case

We assume λ > 1 and K = ω( √ n). We have seen that with high probability, observation of G allows to determine whether or not an attack has taken place. We now assume that an attack has indeed happened. We have the following result, showing the impossibility of efficient planted structure reconstruction:

Theorem 7. Given λ > 1, K = ω( √ n), K = o(n),
i ∈ [( -1)M + 1, ( -1)M + L], any τ disjoint ordered sets of D -1 distinct nodes i D 2 (t), t ∈ [τ ] in [n] \ k K 1 , we have d var (P 1 (G ∈ •|K = k K 1 , I( ) = i, (I D 2 (t, )) t = (i D 2 (t)) t ), P 0 (G ∈ •|k K 1 ∈ G, (k i , i D 2 (t), k i+D ) t ∈ G)) = = o(1
∀ = ∈ [K/M ], E 1 |(∪ t∈[τ ] I D 2 (t, )) ∩ (∪ t∈[τ ] I D 2 (t, ))|1 E = O D 2 n .
(2.9)

The Lemma's proof idea is as follows. The τ non-overlapping alternative path segments, that we refer to as a τ -path, are obtained by selecting uniformly at random one such τ -path among all present in the graph. Then (2.8) is established by showing that the number of τpaths concentrates. In turn, this concentration is established by bounding the variance of the number of τ -paths. This is done using the Markov chain bounding technique used in Lemma 4. The second part of the Lemma, (2.9), requires further concentration results on the numbers of τ -paths, that follow from applying Janson's inequality ( [START_REF] Boucheron | Concentration Inequalities: A Nonasymptotic Theory of Independence[END_REF], p. 205, Theorem 6.31).

The proof idea of Theorem 7 (detailed in the appendix) is then as follows. The τ -paths of Lemma 6 provide τ alternative K-paths to the actual planted path. These are "lures" for the optimal MAP reconstruction algorithm, that must return on average as many points of each of these lure paths as of the planted path. Since all these τ + 1 paths have intersection of negligible size, the overlap achieved by MAP must necessarily be at most K/(τ + 1).

Proof strategy for planted D-ary trees

We assume here that Γ is a complete D-ary tree of size K and depth h, with D > 1 a fixed constant.

Under P 0 , the neighbourhood of a given vertex in G is close to a Galton-Watson process with offspring law Poi(λ). The probability of the existence of an infinite D-ary subtree in this process is the largest non-negative root p * (D, λ) of the equation

p = ψ D (λp), (2.10)
where ψ D (µ) := P(Poi(µ) ≥ D), µ ≥ 0.

The behavior of the random graph differs based on whether the above probability is zero or not. We define the critical threshold λ D as

λ D = sup λ > 0 p * (D, λ) = 0 (2.11)
In the following, we focus on subcritical λ, that is whenever λ < λ D .

Study of the Galton-Watson process

Let (T, o) be a rooted Galton-Watson tree with offspring law Poi(λ), with λ < λ D . The following Theorem characterizes the distribution of the maximum height of a D-ary tree rooted in o.

Theorem 8. Let (T, o) be a Galton-Watson tree as above, and n > 0. Let p h be the probability that a D-ary tree of height h rooted in o is contained in T . Then, for almost all λ, there exists h * such that

p h * +1 = o 1 n (2.12
)

p h * = Ω(n -c ) for some c < 1 (2.13)
Moreover, as n → ∞ one has h * = ln ln(n) ln(D) + O(1).

Thus h * depends on λ only through terms of lower (constant) order. The Theorem's proof, detailed in the appendix, relies on the following Lemma 7. The sequence p h satisfies the recurrence relation

p 1 = 1 p h+1 = ψ D (λp h ) for all h ≥ 1.
Necessarily 0 ≤ p h+1 ≤ p h for all h (since a tree of height h + 1 contains a tree of height h), and therefore by continuity of ψ D , p h converges as h → ∞ to the largest fixed point of (2.10). By definition of λ D , the only solution of this equation is p ∞ = 0, and thus

lim h→∞ p h = 0 (2.14)
Now, ψ D (x) ∼ x D D! as x → 0, which implies that for h large enough, p h+1 C p D h , and thus p h C ε D h for some small ε > 0. A more rigorous version of this argument, as well as its use in the proof of Theorem 8, is presented in the Appendix.

Coupling and application to planted trees

Following the insights from the previous section, we define the two thresholds h and h by :

h = inf h > 0 p h < 1 n , h = sup h > 0 p h > ln(n) n •
Theorem 8 implies that h ∼ ln ln(n) ln(D) , and that for almost all λ, h = h+1, and otherwise h = h+2. Also, p h = o( 1 n ) and p h = Ω(n -c ) for some c > 1. The following Theorem connects the study from section 2.6.1 to our planted tree problem: Theorem 9. Let G be a graph drawn according to P 0 , and h > 0. Then with high probability:

1. For h ≤ h, there are ω(1) D-ary trees of height h in G.

2. For h ≥ h + C, where C is a large enough constant, there are no D-trees of height h in G.

The second part of this theorem yields an easy detection algorithm whenever h ≥ h + Ω(1).

Corollary 1. Assume that Γ is a complete D-ary tree of height h, with h ≥ h + Ω(1). Then w.h.p under P 0 , X Γ = 0, and therefore the test T (G) = 1 iff X Γ > 0 discriminates between H 0 and H 1 correctly with high probability.

The two statements of Theorem 9 are a consequence of the following coupling lemma, whose proof, as well as the full proof of the theorem, is deferred to the appendix : Lemma 8. For a graph G and a vertex v in G, denote by (G, v) the -neighbourhood of v in G. Similarly, let (T, o) be the -neighbourhood of o in the Galton-Watson process described above.

Then, under P 0 , assuming that = o(log(n)), the total distance variation between the law of (G, v) and that of (T, o) goes to 0 as a negative power of n when n → ∞.

Furthermore, for λ > λ, and (T , o ) a GW process with parameter λ , then, provided the -neighbourhood of v is cycle-free, there exists a coupling between (G, v) and (T , o ) such that (G, v) ⊆ (T , o ) with probability 1.

There is therefore a sharp cutoff in the probability of presence of tree of height h in G, and we have already seen in Corollary 1 that it can be leveraged to obtain a detection algorithm when h ≤ h. It remains however to study two aspects of the problem: reconstruction for h ≥ h, as well as the possibility (or lack thereof) of detection when h ≤ h.

Likelihood ratio and detection for h ≤ h

We conjecture, as is the case when D = 1, that when h = hω(1), then the total variation distance |P 1 -P 0 | var goes to 0 when n → ∞. However, the Markov chain bounds used for lines cannot be easily adapted to the current setting, and we only prove this result for h ≤ h -Ω(ln ln ln(n)) : Theorem 10. Assume that Γ is a D-ary tree of height h, with D > 1 and

h ≤ h - ln(h) ln(D) + ln 1 -1 D ln(D) .
Then, the total variation distance |P 1 -P 0 | var goes to zero as n → ∞. Thus, for any test

T (G) ∈ {0, 1}, P 1 (T (G) = 1) -P 0 (T (G) = 1) → 0 as n → ∞.
As before this is deduced from the following Lemma, shown in the Appendix: Lemma 9. Under the same assumptions as Theorem 10, E 0 (L 2 ) → 1 as n → ∞.

We believe the following stronger version of the Theorem to hold:

Conjecture 1. The result of Theorem 10 holds true for all h ≤ h.

If true, this conjecture would complete the bottom left part of the phase diagram for D-ary tree, with a sharp threshold between undetectability and detection/reconstruction.

Reconstruction for large h

When λ < λ D and h ≥ h, we have shown that under P 0 there is w.h.p no copy of Γ in G. One could therefore expect to be able to reconstruct Γ with overlap 1o(1) ; however, this is not the case :

Theorem 11. Given λ > 0, h ≥ h such that K = o(n),
and a realization G of the graph under P 1 , the overlap achieved by any estimator K of the attack is bounded above, i.e ov( K) ≤ (1δ)K for some δ > 0.

The proof is based on the fact that when D > 1, the leaves make up a positive proportion of Γ, and they are hard to reconstruct with high precision. On the other hand, since there is no copy of Γ in G w.h.p, one can still reasonably expect to achieve a partial reconstuction. This is the heuristic behind our second conjecture : Conjecture 2. For all h ≥ h, there exists a δ > 0 and an estimator (possibly random) K such that w.h.p ov( K) ≥ δK.

Proof of preliminary results

Proof of Lemma 1

Let Γ 1 , . . . , Γ m be the copies of Γ in K n the complete graph on [n], where, denoting Aut(Γ) the

automorphism group of Γ, m = n K K! |Aut(Γ)| .
Then, by Bayes' formula, letting e(G) denote the number of edges in graph G, one has for any graph g:

P 1 (G = g) = 1 m m i=1 P 0 (G = g | Γ i ∈ G) = 1 m m i=1 1 Γ i ∈g λ n e(g)-e(Γ i ) 1 - λ n n 2 -e(g) = 1 m λ n -e(Γ) m i=1 1 Γ i ∈g P 0 (G = g) = X Γ E 0 [X Γ ] P 0 (G),
which completes the proof of Lemma 1.

Proof of Theorem 1

We first prove that planted stars of size

K = ln(n)/ ln(ln(n))[1 -ω(1/ ln(ln(n)))] are unde- tectable. The number X of K-stars verifies E 0 (X) = n n -1 K λ n K ∼ n λ K K! •
We will have undetectability if E 0 (L 2 ) ∼ 1, or equivalently by symmetry arguments, if

E 0 (X|Γ 1 ∈ G) ∼ E 0 (X),
where Γ 1 is an arbitrary K-star, e.g. that made of edges

(i, K + 1), i ∈ [K].
We decompose E 0 (X|Γ 1 ∈ G) into three terms M 1 , M 2 and M 3 , the expected numbers of K-stars centered respectively: at node K + 1, at some node i ∈ [K], and finally at some node i ∈

[n] \ [K + 1].
Since M 3 is upper-bounded by E 0 (X), it suffices to show that M 1 and M 2 are o(E 0 (X)). One has:

M 2 = K n-2 K-1 λ n K-1 + n-2 K λ n K-1 ≤ 2K 2 n E 0 (X) E 0 (X).
Also,

M 1 = K =0 K n-K-1 K- λ n K- ≤ K =0 K λ ! ≤ (1 + λ) K .
The desired result M 1 E 0 (X) will follow if

ln(n) + K ln(λ) -ln(K!) -K ln(1 + λ) → +∞.
The terms in K are of order at most ln(n)/ ln(ln(n)). By Stirling's formula, this will therefore hold provided ln(n

) -K ln(K) = ω(ln(n)/ ln(ln(n))). By assumption, K ln(K) ≤ ln(n) ln(ln(n)) (1 -ω(1/ ln(ln(n)))) ln(ln(n)) = ln(n) -ω(ln(n)/ ln(ln(n))),
hence the undetectability result.

Similarly for detectability, the assumption that

K = ln(n)/ ln(ln(n))[1 + ω(1/ ln(ln(n)))] entails that ln(E 0 (X)) = K ln(λ) + ln(n) -ln(K!) = -ω(1).
Thus a test which decides H 1 if and only if there is a node in G with degree at least K succeeds with high probability. Moreover, with high probability, only the centre of the planted star has degree at least K. The reconstruction method which consists in choosing, besides the highest degree node, K of its neighbours chosen uniformly at random, achieves an overlap of Ko(K): indeed, conditional on the planted star's centre having initially Y neighbors in the original graph, the expected number of nodes in the reconstructed set will be

1 + K 2 Y + K ≥ 1 + K(1 -Y /K) = 1 + K -Y.
Its expectation is lower-bounded by K + 1λ, and is thus Ko(K).

Proof of Theorem 4

Let k denote the size of the hidden connected component, with k = 0 under P 0 and k = K under P 1 . Let A 1 count the number of isolated nodes in G, A 2 the number of connected pairs (i, j) that form an isolated component, and A 3 the number of triplets (i, j, k) that form a connected component.

These quantities satisfy with high probability

A 1 = e -λ (n -k) + O( √ n), A 2 = (n -k) 2 2 λ n e -2λ + O( √ n), A 3 = (n -k) 3 2 λ 2 n 2 e -3λ + O( √ n).
(2.15) Indeed, only the nk nodes that are not part of the hidden connected graph can contribute to counts of connected components of size 1, 2 or 3. (2.15) then follows from evaluation of the expectation and variance of these quantities.

Set λ = (nA

3 )/(A 1 A 2 ). By (2.15), λ = λ + O(n -1/2 ). Now form k = n -e λA 1 . Again by (2.15), k = n -(1 -O(n -1/2 ))(n -k) + O( √ n) = k + O( √ n). Our test then decides H 1 if k ≥ t n and H 0 otherwise where t n is such that √ n t n K, which is indeed satisfied for t n = K √ n).
This ensures that the test discriminates correctly between the two hypotheses with high probability. Necessarily then, the variation distance |P 0 -P 1 | var goes to 1 as n → ∞.

Proof of Theorem 5

We first begin by a simple lemma, using the concentration of X Γ :

Lemma 10. Let I Γ be the proportion of pairs copies of Γ in G whose intersection is nonempty :

I Γ = 1 X 2 Γ Γ ,Γ ∈G 1 Γ ∩Γ =∅ ,
where Γ and Γ range over all copies of Γ in G.

Then E 0 (I Γ ) = o(1).
Proof. (of Lemma 10). As in the proof of Lemma 1, let Γ 1 , . . . , Γ m be the copies of Γ in K n , and let

X i = 1 Γ i ∈G . Write E 0 X 2 Γ = i,j E 0 (X i X j ) = E + E , (2.16)
where E is the sum over Γ i , Γ j having disjoint vertex sets. We can easily compute E :

E = n K n -K K K! |Aut(Γ)| 2 p 2K-2 ∼ n 2K p 2K-2 |Aut(Γ)| 2 ∼ E 0 (X Γ ) 2 Since E 0 L 2 = 1 + o(1), it follows that E E 0 X 2 Γ = o(1).
(2.17)

Now, it is straightforward to see that

Γ ,Γ ∈G 1 Γ ∩Γ =∅ = Γ i ∩Γ j =∅ X i X j .
Recall that L = X Γ /E 0 (X Γ ) ; we can decompose I Γ as follows :

I Γ = I Γ 1 L 2 >1/2 + I Γ 1 L 2 <1/2 = Γ i ∩Γ j =∅ X i X j E 0 X 2 Γ • 1 L 2 • 1 L 2 >1/2 + I Γ 1 L<1/ √ 2
We can now bound each term separately. The first one is straightforward since 1/L 2 < 2 whenever the indicator variable is nonzero ; for the second one, notice that I Γ ≤ 1 and thus

E 0 (I Γ ) ≤ E E 0 X 2 Γ • 2 + P 0 L < 1 √ 2 = E E 0 X 2 Γ • 2 + o(1),
having used the Bienaymé-Chebychev inequality to bound the second term.

Using (2.17) then completes the proof.

We can now move on to the proof of Theorem 5 ; we first transform the expression of ov( K) to better suit our needs :

ov( K) = G K P 1 (G, K) K ∩ K = G P 1 (G) K P 1 (K | G) K ∩ K
where K ranges over all K-subsets of [n] and G over all graphs on n vertices.

The second sum can be transformed as in the proof of Lemma 1 into :

ov( K) = G P 1 (G) Γ ∈G | K ∩ Γ | X Γ = G P 0 (G) Γ ∈G | K ∩ Γ | X Γ + o(K),
since the conditions in Theorem 5 imply that |P 1 -P 0 | var = o(1) (see the remark after Theorem 6).

The sum now ranges over all copies of Γ in G. This can now be expressed as an expectation :

ov( K) = E 0 Γ ∈G | K ∩ Γ | X Γ + o(K) = i∈[n] E 0 1 i∈ K Γ ∈G 1 i∈Γ X Γ + o(K).
We can now finally use Lemma 10 : indeed,

Γ ∈G 1 i∈Γ X Γ 2 = 1 X 2 Γ Γ ,Γ ∈G 1 i∈Γ 1 i∈Γ ≤ 1 X 2 Γ Γ ,Γ ∈G 1 Γ ∩Γ =∅ = I Γ .
Therefore,

ov( K) ≤ i∈[n] E 0 1 i∈ K I Γ + o(K) = KE 0 I Γ + o(K) = o(K),
using Jensen's inequality as well as Lemma 10. This completes the proof of Theorem 2.17.

Detailed proofs for planted paths

Proof of Lemma 2

Expression (2.1) follows directly from Lemma 1. In the display below, by

(i 1 •••i K ) we mean summation over all the n(n -1) • • • (n -K + 1) oriented paths (i 1 , . . . , i K ) of length K over nodes in [n]. Write: E 0 (L 2 ) = (i 1 •••i K ) (j 1 •••j K ) (n/λ) K-1 n•••(n-K+1) 2 P 0 (paths (i 1 • • • i K ) and (j 1 • • • j K ) present in G) = (i 1 •••i K ) (n/λ) 2(K-1) n•••(n-K+1) P 0 (paths (i 1 • • • i K ) and (1 • • • K) present in G) = n λ K-1 P 0 ( path π = (I 1 • • • I K ) present in G| path (1 • • • K) present in G),
where π = (I 1 • • • I K ) is a candidate path chosen uniformly at random from the n(n-1) . . . (n-K) possible length-K paths. In the above we used symmetry to consider a single path (1

• • • K) instead of all paths (j 1 • • • j K ).
Note that conditionally on the event that path (1 • • • K) be present in G and on the path π, the probability that path π is also present in G is given by (λ/n) K-1-S , where S is the number of edges in common between the two paths π and (1 • • • K). This yields expression (2.2).

Proof of Lemma 4

Let F t = σ(I 1 , . . . I t ). Recall that n = n -K. It is easily verified that we have the following inequalities for all t = 2, . . . , K -1:

P(Z t = 1|F t ) ≤    1 n if Z t-1 = 1, 2 n if Z t-1 = 0, 0 if Z t-1 = -1.

Similarly we have

P(Z t ≥ 0|F t ) ≤ K n • Moreover it is easily seen that P(Z 1 = 1) ≤ (K/n )(2/n ), and P(Z 1 ≥ 0) ≤ K/n .
As in Lemma 4, we introduce the Markov chain {Z t } t≥1 on state space {-1, 0, 1} specified by the initial distribution P(Z 1 = 1) = (K/n )(2/n ), P(Z 1 ≥ 0) = K/n and by the transition probability matrix P in (2.4), that we recall for convenience:

P =   1 -K/n K/n 0 1 -K/n (K -2)/n 2/n 1 -K/n (K -1)/n 1/n  
The previous inequalities ensure that we can construct by induction over t a coupled version of the two processes {Z t } and {Z t } such that Z 1 ≤ Z 1 , and for t ≥ 1, if Z t = -1 then Z t = -1, and furthermore we have the following implications:

Z t = -1 ⇒ Z t+1 ≤ Z t+1 , Z t = Z t ⇒ Z t+1 ≤ Z t+1 , (Z t , Z t ) = (1, 0) ⇒ Z t+1 ≤ Z t+1 .
Thus the only situation when we can have Z t+1 > Z t+1 is when (Z t , Z t ) = (0, 1). That is to say, for each time t + 1 when process Z hits 1 while chain Z does not, then at time t chain Z hits 1 while process Z does not.

Because of this, the number of times t at which process Z hits 1 is upper-bounded by the number of times t at which chain Z does. Thus (2.5) holds, concluding the proof of Lemma 4.

Proof of Lemma 3

By (2.5) and (2.3), E 0 (L 2 ) is upper bounded by

E 0 (L 2 ) ≤ E 0 x K-1 s=1 Z + s .
(2.18)

To evaluate this term, introduce the row vector

F (t) := {f z (t)} z∈{-1,0,1} where
f z (t) := E 0 x t s=1 Z + s 1 Z t =z .
We then have

F (1) = (P(Z 1 = -1), P(Z 1 = 0), xP(Z 1 = 1)) = (1 -K/n , K/n (1 -2/n ), x(K/n )(2/n )), (2.19
) together with the recurrence relation

F (t + 1) = F (t)M, (2.20)
where

M =   1 -K/n K/n 0 1 -K/n K/n -2/n x2/n 1 -K/n K/n -1/n x/n   Recall now that x = n/λ and n = n -K, so that x/n is asymptotic to 1/λ. Thus the above matrix M reads M = M 0 + (K/n)M 1 ,
where

M 0 =   1 0 0 1 0 2/λ 1 0 1/λ   , (2.21)
and the entries of matrix M 1 are O(1). Note that M 0 admits eigenvalues 0, 1/λ, 1 with respective left eigenvectors

u 0 := (1, 1, -2), u 1/λ := (-λ/(λ -1), 0, 1), u 1 := (1, 0, 0).
We shall denote (µ r , v r ) the (eigenvalue,eigenvector) pair of M obtained by perturbation of the eigenpair (r, u r ) of M 0 , with r ∈ {0, 1/λ, 1}. By the Bauer-Fike theorem (see [START_REF] Bhatia | Matrix Analysis[END_REF], Theorem VI.25.1), |µ r -r| = O(K/n) for all r.

Moreover Eq. (1.16), p. 67 in [START_REF] Kato | Perturbation Theory for Linear Operators[END_REF] implies that a normed left (resp., right) eigenvector of M associated to an eigenvalue µ r of M differs in norm from a normed left (resp., right) eigenvector of M 0 associated to eigenvalue r by O(K/n). We can thus chose v r = u r + O(K/n).

Let the decomposition of vector F (1) in the basis provided by the eigenvectors {v r } be given by:

F (1) = r∈{0,1/λ,1} α r v r .
Denote by e the all-ones 3 × 1 column vector. The upper bound (2.18) on E 0 (L 2 ) then gives

E 0 (L 2 ) ≤ F (K -1)e = F (1)M K-2 e = r∈{0,1/λ,1} α r v r µ K-2 r e.
(2.22)

By our choice of eigenvectors v r such that |v ru r | = O(K/n), and the fact that

F (1) = (1 + O(K/n))u 1 + O(K/n)u 1/λ + O(K/n)u 0 , corresponding weights α r verify α 1 = 1 + O(K/n), α 1/λ = O(K/n), α 0 = O(K/n).
In the case where λ > 1 and

K = o( √ n), (2.22) yields E 0 (L 2 ) ≤ o(1) + (1 + o(1))µ K-2 1 = (1 + o(1))(1 + O(K/n)) K-2 ≤ (1 + o(1))e O(K 2 /n) .
The assumption that K = o( √ n) then allows to conclude.

For λ < 1 and

K = ln(n)/ ln(1/λ) -ω(ln(ln(n))), (2.22) yields E 0 (L 2 ) ≤ (1 + o(1)) (1 + O(K/n)) K-2 + O(K/n) (1/λ + O(K/n)) K-2 .
The first term is

1 + o(1)) since K 2 /n = o(1)
. The second term's logarithm is equivalent to

ln(K) -ln(n) + (K -2) ln(1/λ) ≤ ln(ln(n)) -ln(ln(1/λ)) -ω(ln(ln(n))),
and goes to -∞ by assumption.

Proof of Lemma 5

We place ourselves under P 1 and condition on the fact that the K-path planted in the original

Erdős-Rényi graph G 0 is k K 1 . Denote for each i ∈ [K] by C i the connected component of node k i in G 0 . Denote by E i the event that C i ∩ {∪ j =i C j } = ∅ and by E i the event that C i contains a cycle.
A standard construction of connected components based on a random walk exploration implies the existence of a constant c > 0 such that for all ≥ 0,

P(E i , |C i | = ) ≤ λ 2 n P(|C i | = ) ≤ λ 2 n e -c , P(E i , |C i | = ) ≤ K n e -c , P(|C i | ≥ ) ≤ e -c .
(2.23)

The first evaluation implies that with high probability, no C i contains a cycle (i.e. no E i occurs) when K = o(n). The second evaluation implies that the expected number of i ∈ [K] such that E i occurs and |C i | ≥ is upper bounded, for some constant c > 0, by

i∈[K] P(E i , |C i | ≥ ) ≤ K 2 n e -c . If K 2 = o(n),
P(C i ≥ √ K) ≤ Ke -c √ K = o(1).
Thus the peeling process applied √ K times to C returns exactly the planted K-path, except for √ K nodes at each of its ends.

If on the other hand, K 2 > o(n), we choose * = θ ln(n) and deduce from (2.23) that with probability 1 -O(n -2 ), say, there is no i ∈ [K] such that both E i and |C i | ≥ θ ln(n) hold. The peeling process applied √ K times to C then returns the planted path, shortened by no more than √ K nodes at each end, plus parts of the neighborhoods C i for which E i occurs. The expected number of nodes returned that do not belong to the planted path is therefore no more than

KP(E i ) * = O( K 2 n )θ ln(n).
This is o(K) under the assumption that K = o(n/ ln(n)). The conclusion of the Lemma follows.

Proof of Theorem 7

We show that Lemma 6 implies (2.6). First, the optimal overlap is achieved by the Maximum A Posteriori (MAP) inference procedure, i.e. by putting in K the K nodes with the highest probability, conditional on the observed graph G, of being in K. The probability that node j belongs to K conditional on G is proportional to the number of K-paths in G to which j belongs. We denote by K * the corresponding set. Second, when under the alternative distribution

P 2 := P 0 (G ∈ •|k K 1 ∈ G, (k i , i D 2 , k i+D ) ∈ G)) in (2.8), the joint distribution of the numbers of K-paths going through the nodes k K 1 or through the nodes in k i 1 , i D 2 , k K i+D are statistically indistinguishable. Thus, letting N (respectively N ) denote the number of points of k M ( -1)M +1 (respectively, k i ( -1)M +1 , i D 2 , k M i+D ) that the MAP estimate selects, one has: E 2 (N ) = E 2 (N ).
Let also N t, denote the number of points that the MAP estimate selects in k

I(t, ) ( -1)M +1 , I D 2 (t, ), k M I(t, )
+D . Since each of these variables is bounded by M = L+D, the variation distance bound (2.8) implies

E 1 (N ) ≤ E 1 (N t, ) + M. Summing these inequalities over ∈ [K/M ] and t ∈ [τ ] yields τ K/M =1 E 1 (N ) = τ ov(K * ) ≤ τ t=1 K/M =1 E 1 (N t, ) + τ K.
(2.24)

However, it holds that:

K i=1 1 k i ∈K * + j∈∪ t, I D 2 (t, ) 1 j∈K * ≤ K.
This entails (using e.g. Bonferroni's inequality):

K i=1 1 k i ∈K * + K/M =1 D r=2 t∈[τ ] 1 Ir(t, )∈K * - = , , ∈[K/M ] |(∪ t∈[τ ] I D 2 ( )) ∩ (∪ t∈[τ ] I D 2 ( ))| ≤ K.
Taking expectations and using the last statement (2.9) of the Lemma yields, separating evaluations on event E and on its complementary set E:

ov(K * ) +    t∈[τ ] K/M =1 E 1 (N t, )    -τ L(K/M ) -(K/M ) 2 O(D 2 /n) -τ KP 1 (E) ≤ K.
Summed with the previous equation (2.24), this gives:

(τ + 1) ov(K * ) ≤ K + Kτ + (L/M ) + (K/n)(D/M ) 2 + P 1 (E) .
The announced result follows from

1, L D, K = o(n) and P 1 (E) = o(1).
2.8.6 Proof of Lemma 6, Equation (2.8)

We let π i denote the set of τ candidate paths

(k i , i D 2 (t, ), k i+D ) t∈[τ ] of the graph, where for fixed , the {i D 2 (t, )} t∈[τ ] are distinct and in [n] \ k K 1 . For i ∈ [( -1)M + 1, -1)M + L]
these can all be used to construct the set of τ alternative paths in the -th segment of k K 1 . We denote by

π( ) = ∪ i∈[( -1)M +1, -1)M +L] π i
the corresponding collection. Our construction simply amounts to choosing a set of τ paths (that we shall call for short a τ -path) uniformly at random from π( ) in order to construct the alternative τ -path for the -th segment, and this independently for each segment.

Denote Z i = |π i |. Then E 1 (Z i ) = (n -K)(n -K -1) • • • (n -K -τ (D -1) + 1) λ n τ D ∼ 1 n τ λ τ D ,
since we assumed in (2.7) that D ∼ C ln(n). Also, by symmetry,

E 1 Z 2 i = i D 2 (t),j D 2 (t) P 1 (∀t ∈ [τ ], (k i , i D 2 (t), k i + D) ∈ G, (k i , j D 2 (t), k i+D ) ∈ G) = E 1 (Z i ) j D 2 (t) P 1 (∀t ∈ [τ ], (k i , j D 2 (t), k i+D ) ∈ G|∀t ∈ [τ ], (k i , i D 2 (t), k i+D ) ∈ G),
where in the last expression we fixed an arbitrary choice

(i D 2 (t)) t∈[τ ]
. It follows that:

E 1 Z 2 i = (E 1 (Z i )) 2 E 1 ((n/λ) S ),
where S is the number of common edges between the fixed τ -path

(k i , i D 2 (t), k i+D ) t∈[τ ] and the τ -path (k i , J D 2 (t), k i+D ) t∈[τ ] where (J D 2 (t)) t∈[τ ] is chosen uniformly at random among (τ (D -1)) sequences in [n] \ k K 1 .
To control this second moment, we will condition on the number of common edges between each path J D 2 (t) in the randomly selected τ -path at its beginning and end with the beginning and end of some of the fixed paths i D 2 (t ), that we shall denote by X t and Y t . These satisfy the constraints

X t , Y t ≥ 0, X t + Y t ≤ D. For X t + Y t < D, this forces the choice of X t + Y t nodes among the D -1 to be chosen for path J D 2 (t); for X t + Y t = D, this forces all the D -1 choices. Moreover, conditionally on (X t , Y t ) t∈[τ ] , the expectation of the variable (n/λ) S verifies E 1 ((n/λ) S |(X t , Y t ) t∈[τ ] ) ≤ (n/λ) t∈[τ ] Xt+Yt (1 + O(D/n)) τ D ,
by the Markov chain bounds in Lemma 4. By assumption, D

√ n so that (1 + O(D/n)) D = 1 + o(1)
. Thus, accounits for the τ !) 2 choices of path correspondences between the beginnings and ends of the planted and random paths:

E 1 Z 2 i ≤ (E 1 (Z i )) 2 (τ !) 2 (n/λ) D n D-1 + x,y≥0,x+y<D (n/λ) x+y n -(x+y) (1 + o(1)) τ ≤ (E 1 (Z i )) 2 (1 + o(1))(τ !) 2 [nλ -D + ( x≥0 λ -x ) 2 ] 2 ≤ (E 1 (Z i )) 2 (1 + o(1))(τ !) 2 λ λ-1 2τ
, where we used that nλ -D = o(1).

We now evaluate E 1 (Z i Z j ) for i = j. The Markov chain bounding technique of Lemma 4 directly applies to give:

E 1 (Z i Z j ) ≤ (E(Z i )) 2 (1 + o(1)).
Finally we obtain:

Var(|π( )|) = LVar(Z i ) + L(L -1)Cov(Z i , Z j ) ≤ E 1 (Z i ) 2 L(1 + o(1))(τ !) 2 λ λ-1 2τ + L 2 o(1) ≤ E 1 (|π( )|) 2 O(1) L + o(1) .

Since by assumption L

1, Tchebitchev's inequality implies that the random variable |π( )| concentrates: for some suitable = o(1), one has

P 1 |π( )| E 1 |π( )| -1 ≥ ≤ .
Denote by A the event

A := {| |π( )| E 1 |π( )| -1| ≤ }.
It thus has probability at least 1 -. Consider a bounded function f of the graph G. This concentration result allows us to establish the variation distance bound (2.8) as follows. For some arbitrary candidate τ -path (i, i D 2 (t)) t∈[τ ] , omitting for brevity the argument t below, write:

E 1 (f (G)|A, K = k K 1 , I( ) = i, I D 2 ( ) = i D 2 ) = E 1 [f (G)1 A 1 (k i ,i D 2 ,k i+D )∈G 1 |π( )| ] E 1 (1 A 1 (k i ,i D 2 ,k i+D )∈G 1 |π( )| ) . On A one has 1 E 1 |π( )| 1 1 + ≤ 1 |π( )| ≤ 1 E 1 |π( )| 1 1 - .
This yields:

1 - 1 + E 1 [f (G)1 A 1 (k i ,i D 2 ,k i+D )∈G ] P 1 ((k i , i D 2 , k i+D ) ∈ G) ≤ E 1 (f (G)|A, K = k K 1 , I( ) = i, I D 2 ( ) = i D 2 ) ≤ 1 + 1 - E 1 [f (G)1 (k i ,i D 2 ,k i+D )∈G ] P 1 (A ∩ (k i , i D 2 , k i+D ) ∈ G)
By symmetry over all τ -paths in π( ), denoting by Z the total number of possible such τ -paths in it (Z ∼ Ln τ (D-1) ), one has

P 1 (A ∩ (k i , i D 2 , k i+D ) ∈ G) = 1 Z E 1 (|π( )|1 A ).
However by definition of A this is no smaller than

1 Z (1 -)E 1 |π( )|P 1 (A) ≥ (1 -) 2 P 1 ((k i , i D 2 , k i+D ) ∈ G).
Finally we obtain:

1- 1+ E 1 [f (G)|(k i , i D 2 , k i+D ) ∈ G] -||f || ∞ ≤ E 1 (f (G)|A, K = k K 1 , I( ) = i, I D 2 ( ) = i D 2 ) ≤ • • • • • • ≤ 1+ (1-) 3 E 1 [f (G)|(k i , i D 2 , k i+D ) ∈ G].
The result of Equation (2.8) follows.

Proof of of Lemma 6, Equation (2.9)

We define the event E as, for some suitable constant α = Ω(1):

E := ∩ ∈[K/M ] E , where E := {|π( )| ≥ αE 1 |π( )|}.
(2.25)

In the below display we let

I D 2 ( ) = ∪ t∈[τ ] I D 2 (t, ), and
I D 2 ( ) ∩ I D 2 (
) the intersection of the two corresponding sets of nodes. We then have for arbitrary = ∈ [K/M ]:

E 1 (|I D 2 ( ) ∩ I D 2 ( )|1 E ) = i j E 1   1 |π( )| • |π( )| i D 2 ∈π i j D 2 ∈π j |i D 2 ∩ j D 2 |1 E  
where the first summations are over i

∈ [M ( -1) + 1, M ( -1) + L] and j ∈ [M ( -1) + 1, M ( -1)+L].
The expectation in the right-hand side does not depend on i and j, by symmetry. Moreover, on E we can upper bound the fraction in the expectation by 1/(αE 1 |π( )|) 2 . Thus fixing some arbitrary i = j:

E 1 (|I D 2 ( ) ∩ I D 2 ( )|1 E ) ≤ L 2 (αE 1 |π( )|) 2 E 1 i D 2 ∈π i j D 2 ∈π j |i D 2 ∩ j D 2 | ≤ L 2 (αE 1 |π( )|) 2 i D 2 ,j D 2 E 1 1 (k i ,i D 2 ,k i+D )∈G 1 (k j ,j D 2 ,k j+D )∈G |i D 2 ∩ j D 2 | ,
where summation is over all pairs of lists i D 2 and

j D 2 of τ (D -2) distinct elements in [n] \ k K 1 .

Denote by J D

2 one such list selected uniformly at random, and by i D 2 a fixed, arbitrary choice of one such list. One then has, recalling the expression of

E 1 |π( )| = L(λ/n) τ D (n -K) • • • (n - K -τ (D -1) + 1): E 1 (|I D 2 ( ) ∩ I D 2 ( )|1 E ) ≤ 1 α 2 E 1 n λ S |i D 2 ∩ J D 2 | , (2.26)
where S denotes the number of edges in common between the two τ -paths i D 2 and J D 2 . As in Lemma 4, we now define the Markov chain {Z t } t≥0 on the three states {-1, 0, 1}, with transition probabilities given by the matrix

P :=   1 -D/n D/n 0 1 -D/n (D -2)/n 2/n 1 -D/n (D -1)/n 1/n   ,
where n = n -K -D, and with initial condition Z 0 = -1. These states are interpreted as follows:

Z t = -1 if J t+1 / ∈ i D 2 , Z t = 0 if J t / ∈ i D 2 and J t+1 ∈ i D 2 , and Z t = 1 if J t , J t+1 ∈ i D 2 .
The same coupling argument as for Lemma 4 implies, letting x = n/λ, the following, where the subscript in the second expectation specifies the initial state of the Markov chain {Z t }:

E 1 n λ S |i D 2 ∩ J D 2 | ≤ E -1   x τ (D-1) i=1 Z + i τ (D-1) j=1 1 Z j ≥0   .
We introduce the notation

F z (t) = (F z,-1 (t), F z,0 (t), F z,1 (t)),
where

F z,y (t) := E z x t s=1 Z + s 1 Z t =y .
It readily follows that

F z (t) = (1 z=-1 , 1 z=0 , 1 z=1 )M t ,
where

M :=   1 -D/n D/n 0 1 -D/n (D -2)/n x * (2/n ) 1 -D/n (D -1)/n x/n   .
This matrix M reads, as previously, M 0 + O(D/n) where M 0 is given by (2.21).

Write then, using Markov's property:

E -1   x τ (D-1) i=1 Z + i τ (D-1) j=1 1 Z j ≥0   = τ (D-1) j=1 z∈{0,1} E -1 x j i=1 Z + i 1 Z j =z E z x τ (D-1)-j i=1 Z + i = τ (D-1) j=1 z∈{0,1} F -1,z (j) y=-1,0,1 F z,y (τ (D -1) -j).
Previously given perturbation results give the existence of coefficients

[β z,r ] z∈{-1,0,1},r∈{0,1/λ,1} all in O(1) such that F z (0) = r∈{0,1/λ,1} β z,r v r .
It follows that

F z (τ (D -1) -j) = r∈{0,1/λ,1} β z,r µ τ (D-1)-j r v r = O(1), since |µ r | ≤ 1 + O(D/n) and D 2 n. It follows that E -1 x τ (D-1) i=1 Z + i τ (D-1) j=1 1 Z j ≥0 = τ (D-1) j=1 F -1 (j)   0 1 1   × O(1) = τ (D-1) j=1 r∈{0,1/λ,1} β -1,r µ j r v r   0 1 1   × O(1). Since F -1 (0) = u 1 , it holds that β -1,1 = 1 + O(D/n),
τ (D-1) j=1 β -1,r µ j 1 v 1   0 1 1   × O(1) = O(D 2 /n), by using the fact that v 1 = (1, 0, 0) + O(D/n).
It remains to prove that the event E defined in (2.25) is such that

P 1 (E) = 1 -o(1). It will suffice to prove that for all ∈ [K/M ], P 1 (E ) ≥ 1 -o(M/K).
To show this we shall leverage Janson's inequality, as described in [START_REF] Boucheron | Concentration Inequalities: A Nonasymptotic Theory of Independence[END_REF], p.205, Theorem 6.31. Applied to the random variable |π( )|, it guarantees that for all 0 ≤ t ≤ E|π( )| one has

P 1 (|π( )| ≤ E|π( )| -t) ≤ e -t 2 /(2δ) , (2.27)
where δ is the expected number of ordered pairs of τ -paths (P, Q) in π( ) that share at least an edge. Paralleling our previous bound on the variance of |π( )|, we distinguish the pairs of τ -paths (P, Q) according to whether they share the same starting point i ∈ [( -1)M + 1, ( -1)M + L] or not to write δ = δ 1 + δ 2 , and obtain:

δ 1 ≤ L λ 2Dτ n 2τ (1 + o(1))(τ !) 2 λ λ-1 2τ 2 , δ 2 ≤ L 2 λ 2Dτ n 2τ O D 2 n .
We moreover have that E|π( )| ∼ L λ Dτ n τ , so that

(E|π( )|) 2 δ ≥ Ω(1) 1 L + D 2 n •
By our choices (2.7) for L and D, this lower bound is also Ω(1)L = CΩ(1) ln(n). Taking t = (1α)E|π( )| for some α ∈ (0, 1) in (2.27), we obtain

P 1 (|π( )| ≤ αE|π( )|) ≤ exp(-α 2 CΩ(1) ln(n)/2).
It readily follows that, for sufficiently large C, this probability can be made o(n -3 ) (say), which suffices to conclude the proof of the Lemma.

2.9 Proofs for planted D-ary trees 2.9.1 Proof of Lemma 7

Proof. The property p 1 = 1 is trivial. For h ≥ 1, let Z P oi(λ) be the number of children of the root o. Each of the Z children has independently a probability p h of being the root of a D-ary tree of height h. Therefore, if we define Z h to be the number of such children, we have

L(Z h | Z) ∼ Bin(Z, p h ).
By the splitting property of Poisson random variables, Z h follows the distribtution Poi(λp h ). But T contains a D-ary tree of height h rooted in o if and only if Z h ≥ D, and the lemma follows.

Proof of Theorem 8

Proof. Let h 0 > 0 to be fixed later on ; there exists κ > 0 such that

(λx) D D! ≤ ψ D (λx) ≤ e κ(D-1)p h 0 (λx) D D! (2.28)
for all x ≤ . Therefore, for h ≥ h 0 , one has

D ln(p h ) + (D -1)c λ,D ≤ ln(p h+1 ) ≤ D ln(p h ) + (D -1)(c λ,D + κ p h 0 ). (2.29)
Iterating inequality (2.29), we get that for all h ≥ 0 :

D h (ln(p h 0 ) + c λ,D ) -c λ,D ≤ ln(p h+h 0 ) ≤ D h (ln(p h 0 ) + c λ,D + κ p h 0 ) -c λ,D -κ p h 0 (2.30) Choose h 0 such that α := -(ln(p h 0 ) + c λ,D + κ p h 0 ) > 0, and let h * =     ln ln(n) α ln(D)     + h 0 Then h * + 1 = ln ln(n) α
ln(D) + h 0 + δ for some δ > 0. Thus, using (2.30), we find

ln(p h * +1 ) ≤ -D δ ln(n) -c λ,D -κ p h 0 which yields that p h * +1 = o 1 n as required.
On the other hand, for almost all λ there is a choice of h 0 such that

h * < ln ln(n) α ln(D) + h 0 -ln α ln(p h 0 ) + c λ,D
by continuity of the right-hand side. Then, for some δ > 0, we have

ln(p h * ) ≥ -D -δ ln(n) -c λ,D
which implies the second result of Theorem 8.

Proof of Lemma 8

This lemma is a classical result in sparse random graph theory (see e.g. [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]) ; we reproduce it here for the sake of self-containedness. First, a result on the size of neighbourhoods in G :

Lemma 11 (Lemma 29 in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]). For a vertex v in G, let S t (v) denote the size of the tneighbourhood of v. Then there exists a constant C such that with high probability, for every vertex v ∈ G and t ≥ 0 :

S t (v) ≤ C ln(n)α t
We'll also use a bound on the number of vertices whose neighbourhood contains a cycle ; its proof, as well as the preceding lemma, can be found in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF].

Lemma 12 (Lemma 30 in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]). Assume that = o(ln(n)). Then w.h.p there are at most ln(n)λ 2 vertices whose -neighbourhood contains a cycle. Moreover, with high probability the graph G is tangle-free, i.e. no vertex has more than one cycle in its -neighbourhood.

We can now prove the first part of our lemma : consider the classical breadth-first exploration process which starts with A 0 = {v} and at step t ≤ 0, considers (if possible) a vertex v t ∈ A t at minimal distance from v and reveals its neighbors N t+1 in [n] \ t A t . It then updates A t+1 as A t ∪ N t+1 and repeats the process. We denote by F t the filtration generated by A 0 , . . . , A t .

Proof. (First part of Lemma 8). Let τ be the stopping time at which (G, v) has been revealed.By the two previous lemmas, with probability at least 1cλ 2 /n, the neighbourhood (G, v) is a tree. Therefore, we can mirror the discovery process in (T, o), where at each step we discover the children of v t . To establish the desired coupling result, we then only need to focus on the number of children of each node.

Given F t , the number of discovered neighbors y t+1 of the node v t has distribution Bin(n t , λ/n), where

n t = n - t s=0 y s
Therefore, given F t , the total variation distance between the number of children of v t in (G, v) and in (T, o) is

Bin(n t , λ n ) -Poi(λ) var
The Stein-Chen method (see for example [START_REF] Barbour | An Introduction to Stein's Method[END_REF]) yields that

Bin(n t , λ n ) -Poi λ n t n var ≤ λ n ,
and a classical bound for Poisson law (see again [START_REF] Barbour | An Introduction to Stein's Method[END_REF]) that

Poi λ n t n -Poi(λ) var ≤ λ 1 - n t n
From Lemma 11, we find that n t ≥ n -C ln(n)λ with probability greater than 1 -1/n, and thus

|P t+1 -Q t+1 | var ≤ λ n + λ C ln(n)λ n ,
where P t+1 is the distribution of y t+1 given F t and Q t+1 is a Poi(λ) random variable independent of F t . This finishes the proof of the first part of the lemma.

For the second part, note that there exists a coupling (X, X ) such that X ∼ Poi(λ), X ∼ Poi(λ ) and X > X a.s. (take for example X = X + Z where Z ∼ Poi(λλ)).

The proof is then straightforward : for every vertex v, we produce a coupling between the exploration process of (G, v) and (T , o ) such that at each step t, the number of neighbors y t of v t in G is less than in T .

Proof of Theorem 9

Proof. We first apply the first part of Lemma 8 to = h = O(ln ln(n)). Then, for at least n -O(ln(n) α ) vertices v (for some α > 0), there is a coupling between (T, o) h and (G, v) h . Since in (T, o) h , there is a copy of Γ in (T, o) h with probability Ω(n -c ). It follows that w.h.p there is ω(1) copies of Γ in G. Now, assume that h = h + C, where C is large enough such that for some λ > λ, there are no trees of height h in (T , o ) with probability 1o(1/n).

For every v ∈ G such that the h-neighbourhood of v is a tree, we can produce a coupling of (G, v) h and (T , o ) h such that (G, v) h ⊆ (T , o ) h with probability 1. Thus, with high probability, no vertex whose h-neighbourhood is a tree contains a copy of Γ in said neighbourhood.

Assume now that there is one cycle in the h-neighbourhood of v. With high probability, there is only one cycle going through v in the neighbourhood. Thus, there are only two vertices in the neighbors of v whose offspring contains a cycle. With probability 1 -O(n -c ), no other neighbour of v is the root of a D-ary tree of height h -1. If D > 2, then there is no copy of Γ rooted in v ; if D = 2, then both neighbors of v in the cycle must be roots of disjoints binary trees of size h -1, in which case the cycle edge does not help.

To summarize, the probability of presence of a copy of Γ rooted at v is upper bounded by o(1/n) if the h-neighbourhood of v is cycle-free, and by O(n -c ) if it is not. Since there are O(ln(n) α ) such vertices, w.h.p there is no copy of Γ in G.

Proof of Lemma 9

Proof. In view of Lemma 1, we aim to bound the ratio

E 0 (L 2 ) = E 0 (X 2 Γ ) E 0 (X Γ ) 2
. As before, let Γ 1 , . . . , Γ m be the copies of Γ in the complete graph K n , and let

X i = 1 Γ i ∈G .
We follow the proof sketch from [START_REF] Bollobás | Random Graphs[END_REF] : write

E 0 X 2 Γ = i,j E 0 (X i X j ) = E + E , (2.31)
where E is the sum over Γ i , Γ j having disjoint vertex sets. We can easily compute E :

E = n K n -K K K! |Aut(Γ)| 2 p 2K-2 ∼ n 2K p 2K-2 |Aut(Γ)| 2 ∼ E 0 (X Γ ) 2
We therefore need to show that E = o E 0 (X Γ ) 2 ; to this end, note that if Γ i and

Γ j are such that v(Γ i ∪ Γ j ) = s, then e(Γ i ∩ Γ j ) ≤ 2K -s -1 (since Γ i ∩ Γ j is a forest of size 2K -s) and therefore e(Γ i ∪ Γ j ) ≥ s -1.
Grouping the terms of E by the size of Γ i ∪ Γ j , we get

E ≤ 2K-1 s=K n s s s -K, s -K, 2K -s K! |Aut(Γ)| 2 λ n s-1 = n λ|Aut(Γ)| 2 2K-1 s=K n s λ s n s K! 2 (s -K)! 2 (2K -s)! = n λ|Aut(Γ)| 2 2K-1 s=K λ s K! 2 (s -K)! 2 (2K -s)! 1 + O K 2 n ≤ nλ K-1 (1 + o(1)) |Aut(Γ)| 2 K-1 u=0 λ u K! 2 u! 2 (K -u)! ,
where we made the change of variables u = s -K. Now, write

K! 2 u! 2 (K -u)! = K u K! u! ≤ K u K K-u ,
and we get

E ≤ nλ K-1 K K |Aut(Γ)| 2 (1 + o(1)) K-1 u=0 K u λ K u ≤ nλ K-1 K K |Aut(Γ)| 2 (1 + o(1)) 1 + λ K K ≤ nλ K-1 K K e λ |Aut(Γ)| 2 (1 + o(1)) = O E 0 (X Γ ) 2 × K K nλ K When K ≤ ln(n) ln ln(n) , we find that E = o E 0 [X Γ ] 2 , as requested. But K = D h+1 -1 D-1 ≤ ln(n) ln ln(n) whenever h ≤ h - ln(h) ln(D) + ln 1 -1 D ln(D) ,
which is the condition mentioned in Theorem 10.

Proof of Theorem 11

Proof. For 0 ≤ p ≤ h, let L p be the set of vertices at depth p of Γ, and T p the set of vertices at depth ≤ p.

The strategy of proof is as follows : we aim to prove that there exists a universal constant δ such that given G and

T := σ(T h-1 ) ⊂ G,
the location of the first h -1 rows of Γ, we have with high probability on G

P 1 (ov( K) ≤ (1 -δ)K G, T = 1 -o(1) (2.32)
In what follows, we will consider T to be fixed, and G drawn under P 1 .

Let ε > 0 to be adapted later, and consider two cases :

• | K ∩ T | ≤ (1 -ε)|T | : in this case, we easily get ov( K) ≤ D h + (1 -ε) D h -1 D -1 = K -ε D h -1 D -1 = K -ε K -1 D = (1 - ε D )K + o(K),
from which equation (2.32) follows since ε is independent from G and T .

• if | K ∩ T | > (1 -ε)|T |,
we need the following lemma :

Lemma 13. Let σ(L h-1 ) = {i 1 , . . . i D h-1 }, and define n k = |N (i k )| and m k = | K ∩ N (i k )|. Then E 1 | K ∩ σ(L h )| G, T = D k m k n k
Proof. (of lemma 13). Given T , all vertices that are neighbours of a vertex in σ(L h-1 ) are equally likely to belong to Γ, since all D-ary trees in G have the same probability of generating G.

Therefore, given G, σ(L h-1 ) = {i 1 , . . . i D h-1 }, the random variable N k = | K ∩ K ∩ N (i k )| follows a hypergeometric law of parameters (n k , D, m k ). If follows that E 1 (N k ) = D m k n k
Now, with high probability the neighbourhoods N (i k ) are disjoint and the variables

N k are thus independent. Since | K ∩ σ(L h )| =
k N k whenever the N (i k ) are disjoint, the lemma follows.

We can now prove our main theorem : notice that

|N (i k )| ∼ D + Poi(λ) since K = o(n), so w.h.p a proportion α (for a universal constant α) of the i k are such that |N (i k )| ≥ D + 1. Moreover, S := k m k = K -| K ∩ T | < D h + ε|T | = (1 + ε D -1 )D h + o(D h ) Thus, S ≤ (1 + ε )D h for some ε > 0. Let I 1 be the set of indices such that n k = D ; we have k m k n k = k∈I 1 m k n k + k / ∈I 1 m k n k ≤ k∈I 1 m k D + k / ∈I 1 m k D + 1
Let S 1 = k∈I 1 m k ; we know that

S 1 ≤ D|I 1 | ≤ D(1 -α)D h-1 , since m k ≤ n k = D on I 1 , which yields k m k n k ≤ S 1 D + S -S 1 D + 1 = S D + 1 + S 1 D(D + 1) ≤ D h-1 (1 + ε) D D + 1 + (1 -α) 1 D + 1 ≤ D h-1 1 - α -Dε D + 1
Choosing ε such that α -Dε > 0, we eventually find

E 1 | K ∩ L h | G, T ≤ (1 -γ)D h (2.33)
for some γ > 0.

Finally, we can bound K ∩ K :

E 1 | K ∩ K| G, T ≤ |T | + E 1 | K ∩ L h | G, T ≤ (1 -γ)D h + |T | ≤ K -γD h + o(D h ) ≤ (1 -γ D -1 D )K + o(K),
which completes the proof of Theorem 11.

Chapter 3

Robustness of community detection in sparse networks

This chapter is based on the paper [START_REF] Stephan | Robustness of Spectral Methods for Community Detection[END_REF], a joint work with L. Massoulié.

Introduction

Background

Community detection is the task of finding large groups of similar items inside a large relationship graph, where it is expected that related items are (in the assortative case) more likely to be linked together. The Stochastic Block Model (abbreviated in SBM) has been designed by [START_REF] Holland | Stochastic blockmodels: First steps[END_REF] to analyze the performance of algorithms for this task; it consists in a random graph G whose edge probabilities depend only on the community membership of their endpoints. Since then, a large number of articles have been devoted to the study of this model; a survey of these results can be found in [START_REF] Abbe | Community Detection and Stochastic Block Models: Recent Developments[END_REF], or in [START_REF] Fortunato | Community detection in graphs[END_REF] for a more general view on community detection. The sparse case, when edge probabilities are in O(1/n), is known to be much harder to study than denser models; the existence of a positive portion of isolated vertices makes complete reconstruction impossible, and studies usually focus on partial recovery of the community structure. Insights on this topic often stem from statistical physics; in the two-community case, [START_REF] Decelle | Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications[END_REF] conjectured the existence of a threshold for reconstruction, as well as its exact value; this conjecture was then proved in [START_REF] Mossel | Reconstruction and estimation in the planted partition model[END_REF] for the first part, [START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF] and [START_REF] Mossel | A Proof of the Block Model Threshold Conjecture[END_REF] for the converse part. Similarly, in the general case, a method was first presented in [START_REF] Krzakala | Spectral redemption in clustering sparse networks[END_REF] and then proven to work in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF] -bar a technical condition -and [START_REF] Abbe | Achieving the KS threshold in the general stochastic block model with linearized acyclic belief propagation[END_REF].

The main issue in the sparse setting is that the usual method relying on the eigenvectors of the adjacency matrix of G fails due to the lack of separation of the eigenvalues. Consequently, a wide array of alternative spectral methods have been designed, relying on the spectrum of a matrix associated to G. More precisely, the eigenvectors associated to the highest eigenvalues of those matrices will often carry some information about the community structure of G, enough for partial reconstruction. Examples include the path expansion matrix used in [START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF], or the non-backtracking matrix in [START_REF] Krzakala | Spectral redemption in clustering sparse networks[END_REF].

Additionally, other types of methods can be used in this setting: for example, the semidefinite programming (or SDP) algorithm relaxes the problem into a convex optimization one, which can then be approximately solved (see for example [START_REF] Montanari | Semidefinite programs on sparse random graphs and their application to community detection[END_REF]).

An important feature of real-life networks that is missing from the SBM is the existence of small-scale regions of higher density, that arise from phenomena unrelated to the community structure. For this reason, a common variant of the SBM is the addition of small cliques to the generated random graph. Commonly-used spectral methods, for example those relying on the non-backtracking matrix in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF], are known to fail in this setting, due to the apparition of localized eigenvectors, with no ties to the community structure, and corresponding to large eigenvalues -see [START_REF] Zhang | Robust spectral detection of global structures in the data by learning a regularization[END_REF] for a comparison of those methods, as well as a proposed heuristic to deal with those localized vectors by lowering their associated eigenvalues. SDP methods are the most studied for this problem, due to their natural stability; in particular, [START_REF] Makarychev | Learning Communities in the Presence of Errors[END_REF] show a reconstruction algorithm that is robust to the adversarial addition of o(n) edges, in the case of an arbitrary number of communities; this was also shown independently by [START_REF] Moitra | How robust are reconstruction thresholds for community detection?[END_REF]. However, all the SDP methods mentioned here fail to reach the KS threshold by at least a large constant, with only [START_REF] Montanari | Semidefinite programs on sparse random graphs and their application to community detection[END_REF] approaching it as the average degree increases.

After completing this work we became aware of the article of [START_REF] Abbe | Graph Powering and Spectral Robustness[END_REF]. It establishes results akin to ours on robustness (although with a different definition thereof) of spectral methods for detection in SBM. We use however a slightly different matrix, and our results apply to an arbitrary number of blocks, whereas they only consider SBM with two blocks.

Summary of main results

This article focuses on the Stochastic Block Model, as defined in [START_REF] Holland | Stochastic blockmodels: First steps[END_REF]; we recall here a succinct definition: Definition 2. Let r ∈ N be fixed, W be a r × r symmetric matrix with nonnegative entries, and π a probability vector on [r]. A random graph G = (V, E) with |V | = n is said to be distributed according to the Stochastic Block Model (or SBM) with r blocks and parameters (W, π) if:

(i) each vertex v ∈ V is assigned a type σ(v) sampled independently from π,
(ii) any two vertices u, v in V are joined with an edge randomly and independently from every other edge, with probability

min( W σ(u),σ(v) n , 1
).

Given a random graph G sampled according to the above model (with the types of each vertex hidden), the aim is to estimate the type assignment σ from the observation of G only. However, since there is a positive proportion of isolated vertices, perfect reconstruction is theoretically impossible; we will thus only focus on retrieving only a positive proportion of the types. Our metric for reconstruction will be the following: Definition 3. Let σ be the true type estimation, and σ a type estimate of σ; the empirical overlap between σ and σ is defined as:

ov(σ, σ) = max τ ∈Sr 1 n n v=1 1 σ(v)=τ (σ(v)) -max k∈[r] π k , (3.1)
where S r is the set of permutations of [r]. For a given algorithm leading to estimates σ for all n, we say that this algorithm achieves partial reconstruction if

lim inf n→∞ ov(σ, σ) > 0 w.h.p. (3.2)
Spectral methods in denser settings (with average degrees of about log(n)) usually consist in clustering the eigenvectors of the adjacency matrix of G; however those methods are known to fail in sparser graphs (see [START_REF] Abbe | Community Detection and Stochastic Block Models: Recent Developments[END_REF]. As a result, different (and more complex) matrices are needed: Definition 4. Let G be any graph, and be a positive integer. We define two matrices associated with G:

(i) the path expansion matrix B ( ) (studied in [START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF]), whose (i, j) coefficient counts the number of self-avoiding paths (that is, paths that do not go through the same vertex twice) of length between i and j, (ii) the distance matrix D ( ) , defined by D ( ) ij = 1 if d(i, j) = and 0 otherwise, where d denotes the usual graph distance.

We are now ready to state our first result: Theorem 12. Assume that π ≡ 1/r, W is a stochastic positive regular matrix, and that the two highest eigenvalues µ 1 , µ 2 of W satisfy the condition:

µ 2 2 > µ 1 .
Then there exists an algorithm, based only on an eigenvector of B ( ) associated with its second highest eigenvalue, that achieves partial reconstruction whenever ∼ δ log(n) for small enough δ.

The same algorithm also achieves partial reconstruction when applied to D ( ) instead of B ( ) , with the same conditions on .

Regardless of the change of matrices, this is already an improvement on [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]; indeed, we managed to remove a technical asymmetry condition on W (namely, the existence of a simple eigenvector associated with a high eigenvalue).

We now move on to study the stability of our algorithm; as opposed to most papers that classify the difficulty of an adversary according to the number of altered edges, ours considers the number of affected vertices. Definition 5. Let γ := γ(n) be a positive integer, and G any graph on n vertices. The adversary of strength γ is allowed to arbitrarily add and remove edges at will, as long as the number of vertices affected (i.e. vertices that are endpoints of altered edges) is at most γ.

Our main result on stability is then the following: Theorem 13. Under the same assumptions as Theorem 12, let G a graph generated via SBM, and Gγ a graph obtained when perturbed by an adversary of strength γ. Then, assuming

γ = o (µ 2 2 /µ 1 ) /2 log(n) ,
the algorithm of Theorem 12 still achieves partial reconstruction on Gγ . The above result on γ is the best possible, up to a factor of log(n).

Compared to the spectral algorithm in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF], this is a substantial improvement: their algorithm is known (see e.g. [START_REF] Zhang | Robust spectral detection of global structures in the data by learning a regularization[END_REF]) to be highly unstable w.r.t edge addition. In contrast, the above result reaches a perturbation of size a small power of n (since is of order log(n)). This is sharp, and thus still far from the o(n) bound achieved by various SDP methods (notably [START_REF] Makarychev | Learning Communities in the Presence of Errors[END_REF][START_REF] Montanari | Semidefinite programs on sparse random graphs and their application to community detection[END_REF]); this discrepancy is likely a result of delicate graph properties involved in spectral algorithms that make them more sensitive to perturbations.

However, our result still has several advantages compared to the other cited methods, namely:

(i) the threshold for partial reconstruction in our method is exactly the KS threshold, whereas SDP-based methods require a slightly stronger condition, especially when the mean degree of G is low.

(ii) as will be proved later, the running time of our algorithm is at most O(n 13/12 ), which is much faster that the usual methods for SDP algorithms.

(iii) Finally, all the SDP methods mentioned throughout this paper only consider the symmetric case even in the case of multiple communities.

Detailed setting and results

Stochastic block model

Consider the SBM as defined above; following [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF], we introduce Π = diag(π 1 , . . . , π r ) and define the mean progeny matrix M = ΠW ; the eigenvalues of M are the same as those of the symmetric matrix S = Π 1/2 W Π 1/2 and in particular are real. We denote them by

µ 1 ≥ |µ 2 | ≥ . . . ≥ |µ r |.
We shall make the following regularity assumptions: first,

µ 1 > 1 and M is positive regular, ( 3.3)
i.e. the coefficients of M t are all positive for some t. Secondly, each type of vertex has the same asymptotic average degree, that is

r i=1 M ij = r i=1 π i W ij = α for all j ∈ [r]. (3.4)
In this case, the matrix M * = M/α is a stochastic matrix and therefore

µ 1 = α > 1. (3.5)
Since M = Π -1/2 SΠ 1/2 , M is diagonalizable; let (φ 1 , . . . , φ r ) be a basis of normed left eigenvectors for M , that is

φ i M = µ i φ i for all i ∈ [r]. (3.6)
Condition (3.4) implies that φ 1 = 1/ √ r, where 1 is the all-ones vector.

It has been shown in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF] and [START_REF] Abbe | Achieving the KS threshold in the general stochastic block model with linearized acyclic belief propagation[END_REF] that polynomial-time algorithms achieve partial reconstruction when the following condition, called the Kesten-Stigum threshold, is verified:

τ := µ 2 2 /µ 1 > 1. (3.7)
The quantity τ is commonly referred to as the signal-to-noise ratio.

Alternatively, we define r 0 such that

µ 2 r 0 +1 ≤ µ 1 < µ 2 r 0 . (3.8)
Therefore, the condition (3.7) is equivalent to r 0 > 1.

In the two-community case, the above condition is equivalent to the possibility of reconstruction (see [START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF], [START_REF] Mossel | Reconstruction and estimation in the planted partition model[END_REF]). However, in the general setting (r > 4), non-polynomial algorithms can achieve partial reconstruction even below this threshold. This was originally conjectured in [START_REF] Decelle | Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications[END_REF], and more recently proven in [START_REF] Abbe | Achieving the KS threshold in the general stochastic block model with linearized acyclic belief propagation[END_REF].

Path expansion matrix

In [START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF], an algorithm for partial reconstruction in the two-community case makes use of the path expansion matrix B ( ) . Our first aim is to extend the result from this paper to the general case; we first define for all k ∈ [r] the vectors χ k and ϕ k by

χ k (v) = φ k (σ(v)) and ϕ k = B ( ) χ k B ( ) χ k . (3.9) Let λ 1 (B ( ) ) ≥ |λ 2 (B ( ) )| ≥ |λ n (B ( ) )
| be the eigenvalues of B ( ) ordered by absolute value; our first theorem is an extension of Theorem 2.1 in [START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF]: Theorem 14. Consider a graph G generated as above, and let ∼ κ log α (n), with κ < 1/12. Then, with probability going to 1 as n goes to +∞:

(i) λ k (B ( ) ) = Θ(µ k ) for k ∈ [r 0 ], (ii) For k > r 0 , λ k (B ( ) ) = O(log(n) c α /2 ) for some constant c > 0.
Furthermore, consider µ such that µ 2 > α and µ is an eigenvalue of multiplicity d of M. Let φ (1) , . . . , φ (d) be an orthonormal basis of eigenvectors of M associated to µ, and ϕ (1) , . . . , ϕ (d) the vectors defined as in (3.9). There exist orthogonal vectors ξ (1) , . . . , ξ (d) in R n such that the following holds: (i) for all i, ξ (i) is an eigenvector of B ( ) , with associated eigenvalue Θ(µ )

(ii) there exists an orthogonal matrix Q ∈ O(d) such that ϕQ -ξ 2 = O α /2 µ -,
where ϕ (resp. ξ) is the n × d matrix whose columns are the ϕ (i) (resp. the ξ (i) ).

The above theorem does not yield immediately an algorithm for community reconstruction; however, adapting the one found in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF], we designed the following: Algorithm 15. Let ξ be an eigenvector of B ( ) associated to the eigenvalue λ 2 (B ( ) ), normalized such that ξ 2 = n, and K an arbitrary large constant. First, partition V in two sets (I + , I -) via the following procedure: put v in I + with probability

P(v ∈ I + | ξ) = 1 2 + 1 2K ξ(v) 1 |ξ(v)|≤K
Then, assign the label 1 to every vertex in I + and label 2 to every vertex in I -.

We then have the following theorem:

Theorem 16. Assume that π ≡ 1/r, and that r 0 > 1, i.e. that we are above the Kesten-Stigum threshold. Then Algorithm 15 yields an asymptotically positive overlap when n → ∞ for some choice of K.

Note that we don't need the asymmetry condition from [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF] anymore; our algorithm can deal with multiple eigenvalues as well. Additionally, an explicit value for K is derived in the appendix, which makes our algorithm easy to implement and eliminates the need for "magic" constants, such as the ones in [START_REF] Zhang | Robust spectral detection of global structures in the data by learning a regularization[END_REF] or [START_REF] Abbe | Achieving the KS threshold in the general stochastic block model with linearized acyclic belief propagation[END_REF].

A crucial feature of this algorithm is that it depends only on the second eigenvalue of B ( ) ; for any perturbation that leaves the r 0 highest eigenvalues -or even the second highest -unchanged, the result from Theorem 16 will hold.

The distance matrix

We introduce now the distance matrix D ( ) , defined by D ( ) ij = 1 if and only if d(i, j) = , where d is the distance in G. This matrix, while sparser than B ( ) , retains much of the desired spectral properties. In particular, we have the following theorem: Theorem 17. Assume that condition (3.7) holds, and set such that ∼ κ log α (n), where κ is a constant such that κ < 1/12. Then the results of Theorem 14 hold with the matrix B ( ) replaced by D ( ) .

As a result, Algorithm 15 will still succeed when applied to the matrix D ( ) .

Graph perturbation

As mentioned in the introduction, community detection algorithms have to be resilient to the presence of small cliques (or denser subgraphs) to be useful in practice, since this kind of pattern is often present in real-life networks. We chose to focus here on adversarial perturbations, as defined in the summary, whereas other papers (mainly [START_REF] Abbe | Graph Powering and Spectral Robustness[END_REF]) focus instead on other random graph models, more prone to small loops and cliques.

As shown in [START_REF] Zhang | Robust spectral detection of global structures in the data by learning a regularization[END_REF], the usual spectral methods do not fare well against adversarial (or even random) perturbation, especially when the added subgraph contains several cliques. This is especially the case for the non-backtracking matrix in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF], but also the path expansion matrix in [START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF].

However, the distance matrix is more stable to clique addition, since it does not count the number of paths between two vertices -which is affected significantly by small perturbations. We can therefore allow a perturbation of size up to a small power of n, as stated in the following theorem:

Theorem 18. Let G be an SBM as above, with π i ≡ 1/r. Assume that r 0 > 1, and recall that τ = µ 2 2 /µ 1 > 1 is the signal-to-noise ratio. Then, if γ = o(τ / log(n)), then Algorithm 15 based on the distance matrix recovers the original communities with asymptotically positive overlap, even after a perturbation affecting at most γ vertices.

The controls in the above theorem can be shown to be sharp, up to a factor of log(n): Theorem 19. With the same assumptions as above, let D ( ) be the distance matrix of G and D( ) the one of the graph after the adversarial perturbation.

If γ = Ω(τ ), then there exists a perturbation of size at most γ such that D( ) has an eigenvalue of size Ω(µ 2 ), with associated eigenvector asymptotically perpendicular to the first r 0 ones of D ( ) . Therefore, we cannot guarantee the stability of the eigenvectors of D ( ) when the perturbation affects too many vertices. This means that the best bound we can get on the size of allowed perturbations of the matrix D ( ) is τ , which we can rewrite as

τ = n κ log α (τ ) .
The spectral method on the distance matrix is thus robust to perturbations of size at most n ε , with ε = κ log α (τ ) going to zero as we approach the KS threshold.

Notations and outline of the paper

Throughout this paper, we will make use of the following notation: for two functions f, g, we say that f = O(g) if there exists a constant c such that f = O (log(n) c • g). We similarly define the notations Θ and Ω.

The next Section is devoted to the study of the spectral structure of B ( ) ; we also state there an important theorem on spectral perturbation that will be useful for the study of matrix D ( ) as well. In Section 3, we study the distance matrix D ( ) and introduce a method to deal with perturbations of this matrix. We then leverage this method to obtain bounds on the size of allowed perturbations.

3.2 Spectral structure of B ( )

A theorem on eigenspace perturbation

In the following, we'll need a way to link the operator norm of a matrix perturbation to the consequent perturbation of its eigenvectors. This is provided by the following variant of the Davis-Kahan sin θ theorem ( [START_REF] Yu | A useful variant of the Davis-Kahan theorem for statisticians[END_REF], Theorem 2): Theorem 20. Let Σ, Σ be symmetric n × n matrices, with eigenvalues λ 1 ≥ . . . ≥ λ n and λ1 ≥ . . . ≥ λn respectively. Fix 1 ≤ r ≤ s ≤ n and assume that min(λ r-1λ r , λ sλ s+1 ) > 0, where we define λ 0 = +∞ and λ n+1 = -∞.

Let d = sr + 1, and let V = (v r , . . . , v s ) and V = (v r , . . . , vs ) have orthonormal columns satisfying Σv j = λ j v j and Σv j = λj vj for j ∈ {r, . . . , s}.

Then there exists an orthogonal matrix

Q ∈ O(d) such that V Q -V F ≤ 2 √ 2d Σ -Σ op min(λ r-1 -λ r , λ s -λ s+1 ) • (3.10)

Strategy of proof

We present here the main ideas of the proof, and defer its full version to the appendix. The first step is an adaptation of Proposition 19 from [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]:

Proposition 2. Let ∼ κ log α (n) with κ < 1/12. Define, for k ∈ [r], θ k = B ( ) ϕ k and ζ k = B ( ) ϕ k θ k , (3.11)
with ϕ k as in (3.9). Then, with high probability, we have the following estimations for every γ < 1/2:

(i) θ k = Θ(µ k ) for k ∈ [r 0 ], (ii) | ϕ j , ϕ k | = O(α 3 /2 n -γ/2 ) for j = k ∈ [r 0 ], (iii) | ζ j , ϕ k | = O(α 2 n -γ/2 ) for j = k ∈ [r 0 ].
Now, let (z 1 , . . . , z r 0 ) be the Gram-Schmidt orthonormalization of (ϕ 1 , . . . , ϕ r 0 ), and define

D = r 0 k=1 θ k z k z k .
The non-zero eigenvalues of D are thus the θ k , with corresponding eigenvectors z k . Then, using the asymptotic orthogonality properties of Proposition 2, we prove the following:

Proposition 3. For all k ∈ [r 0 ], z k is asymptotically parallel to ϕ k . Furthermore, B ( ) -D op = O(α /2 ). (3.12)
Theorem 14 then results from a simple application of the Weyl inequality ( [START_REF] Weyl | Das asymptotische verteilungsgesetz der eigenwerte linearer partieller differentialgleichungen (mit einer anwendung auf die theorie der hohlraumstrahlung)[END_REF]) and Theorem 20:

Proof. (of Theorem 14): let θ k = 0 for k > r 0 ; the eigenvalues of D are then exactly the θ i for i ≤ n. By Weyl's inequality, we have for all i ∈ [n]

|λ i (B ( ) ) -θ i | = O(α /2 ). Since θ k = Θ(µ k ) for k ∈ [r 0 ]
, this implies the statements (i) and (ii) of the Theorem. We now define z (1) , . . . , z (d) as the z i associated to ϕ (1) , . . . , ϕ (d) , and z as in Theorem 14. Applying inequality (3.10) to B ( ) and D yields the existence of an orthogonal matrix

Q ∈ O(d) such that zQ -ξ = O α /2 µ -,
and the proof of Proposition 3 shows that z (i)ϕ (i) = O α /2 µ -for all i. Using the triangular inequality (and the fact that Q preserves the norm) completes the proof of Theorem 14.

A new reconstruction algorithm

We now sketch the proof for Theorem 16; it hinges on one key lemma, whose proof (adapted from [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]) is in the appendix: Lemma 14. Let ξ be as in Algorithm 15. For all i ∈ [r], there exists a random variable X i such that for every K > 0 that is a continuity point of X i , in probability,

1 n v∈V 1 σ(v)=i ξ(v)1 |ξ(v)|≤K → π(i) E[X i 1 |X i |≤K ],
where the convergence is independent from ξ. Furthermore, we have

i∈[r] E[X i ] = 0 and i∈[r] E[X i ] 2 > c (3.13)
for some absolute constant c > 0, and for all ε > 0 there exists a choice of M (independent from the chosen eigenvector ξ) such that

E[X i 1 |X i |≤K ] -E[X i ] < ε (3.14)
In particular, Lemma 14 implies that there exist i and j such that

|E[X i ] -E[X j ]| > √ c.
We then use a concentration bound to show that for all i, in probability,

1 n v∈V 1 σ(v)=i 1 v∈I + → π(i) E[X i 1 |X i |≤K ] 2K + 1/2 := π(i)p i (3.15)
where the convergence is independent from ξ.

Assume now that π ≡ 1/r; from Lemma 14, for a large enough M there exists a δ > 0 such that pi > pj + δ. Assign label 1 to I + and 2 to I -, and let τ be a permutation such that τ (i) = 1 and τ (j) = 2. The overlap achieved by τ is thus

1 n v∈V 1 σ(v)=i 1 v∈I + + 1 n v∈V 1 σ(v)=j 1 v∈I -- 1 r = 1 r (p i + 1 -pj ) - 1 r > δ r , (3.16)
which completes the proof of Theorem 16.

Study of the matrix D

( ) 3.3.1 From B ( ) to D ( )
The first aim of this section is to prove Theorem 17, i.e. that we can replace matrix B ( ) by D ( ) in the algorithm from Theorem 16. Directly proving this theorem is hard, because of the lack of a decomposition such as the one in Lemma 17 for D ( ) . However, in view of the proof of Theorem 14 above, it is sufficient to prove the following proposition:

Proposition 4.
Let G be a SBM as above, and ∼ κ log α (n) with κ < 1/12. Let B ( ) be the path expansion matrix of G, and D ( ) its distance matrix. Then, with high probability:

ρ(B ( ) -D ( ) ) = O(α /2 ), (3.17)
where ρ is the spectral radius of a matrix.

For ease of notation, let δ ( ) = B ( ) -D ( ) ; we first notice that δ ( ) is a 0 -1 matrix:

Lemma 15. Let ∼ κ log α (n) with κ < 1/12. For all vertices i, j ∈ {1, . . . , n},

0 ≤ δ ( ) ij ≤ 1. (3.18) Furthermore, if δ ( ) ij = 1
, then there exists a cycle C such that:

d(i, C) + d(j, C) ≤ . (3.19)
Define now a matrix P ( ) by P

( ) ij = 1 if there is a cycle C such that d(i, C) + d(j, C) ≤
. By the previous lemma, we have δ

( ) ij ≤ P ( )
ij for all (i, j), and the Perron-Frobenius theorem implies: ρ(δ ( ) ) ≤ ρ(P ( ) ).

(3.20)

It remains then to bound the spectral radius of P ( ) ; the key lemma is the following:

Lemma 16. For a given cycle C, let P ( )

C be the matrix defined by P ( )

C,ij = 1 if d(i, C
)+d(j, C) ≤ , and V C the set of vertices such that d(i, C) ≤ . Then:

(i) P ( ) C is zero outside of V C × V C , (ii) ρ(P ( ) ) = max C ρ(P ( ) C ).
By part (ii) of the above lemma, it is sufficient to bound ρ(P We then have:

v P C v = t+u≤ i,j v ti v uj = t+u≤ i v ti   j v uj   .
By the Perron-Frobenius theorem, the coefficients of v are non-negative. For a given t, the coefficients v ti are necessarily equal; otherwise, we could increase v ti while leaving v 2 ti fixed, which leads to increasing v P ( ) C v while keeping v 2 constant: this contradicts the definition of v.

Writing v ti = v t for all 1 ≤ i ≤ S t (C); we get:

v P C v = t+u≤ S t (C)S u (C)v t v u and v 2 = t S t (C)v 2 t . (3.21)
Let w be the size vector defined by w t = S t (C)v t . Rewriting the above expression in terms of w yields

v P C v = t+u≤ S t S u w t w u and v 2 = w 2 , (3.22)
where we omit the dependency of S t in C.

As a result, the spectral radius of P C is equal to that of the × matrix Q C defined by:

Q C =        S 0 √ S 0 S 1 • • • S 0 S -1 √ S 0 S √ S 0 S 1 S 1 • • • S 1 S -1 0 . . . . . . . . . . . . . . . S 0 S -1 S 1 S -1 • • • 0 0 √ S 0 S 0 • • • 0 0       
.

We now finally use the row sum bound to get:

ρ(P ( ) C ) = ρ(Q C ) ≤ max t u≤ -t S t S u (3.23)
≤ max

ρ(δ ( ) ) = O(α /2 ), (3.26)
which completes the proof of Proposition 4.

Stability to graph perturbation

In this subsection, we sketch the proofs for Theorems 18 and 19.

A note about computational complexity In the original algorithm, the computation of B ( ) in polynomial time relies on the almost tree-like, tangle-free structure of the random graph G; this structure may be lost when we add cliques, and increase the algorithm complexity. As we want to devise polynomial algorithms in every case, this may be a hindrance.

Conversely, the computation of the distance matrix D ( ) can be done in polynomial time (for example breadth-first search of the -neighbourhood of each vertex in G yields an algorithm in O(n 1+κ ) = O(n 13/12 ) in the case of SBM, O(n 2 ) in general) for any graph, which makes it all the more adapted to the problem at hand.

In order to prove Theorem 18, we need a less restrictive version of Proposition 4; indeed, bounding the spectral radius of the perturbation by O(α /2 ) not only preserves the highest eigenvalues, but also bounds the remaining eigenvalues of D ( ) by λ 1 (D ( ) ). This bound is commonly referred to as a Ramanujan-like property of G.

This property, although interesting on its own, is not specifically needed for the reconstruction algorithm to work; rather, we only need one eigenvector associated to the second highest eigenvalue µ 2 to remain unchanged.

We'll therefore only need the following proposition:

Proposition 5. We consider the same setting as Theorem 18. Let D ( ) be the distance matrix of G, and G and D ( ) be the perturbed versions (after adding adversarial noise) of G and D ( ) , respectively.

Then

ρ( D ( ) -D ( ) ) = o(µ 2 ). (3.27)
The proof relies on a bound similar to the one in Theorem 17, replacing matrices P C and Q C by matrices P K and Q K also depending only on the distance to the perturbed vertex set K. The details can be found in the appendix.

Proof or Propositions 2 and 3

3.4.1 Outline of the proof and similarities with [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF] The main arguments of the proof rely on the study of three quantities:

(i) a multi-type branching process Z t , (ii) a similar process based on exploring the neighbourhood of a vertex v in G, named Y t (v), (iii) the actual vectors we're aiming to study, B ( ) χ k .

When the -neighbourhood of v is cycle-free, we have that B ( )

χ k = φ k , Y t (v) for k ∈ [r 0 ];
and there is a coupling between the laws of Z t and Y t (v) for almost every v, which allows us to translate results on Z t to results on B ( ) χ k .

The proof in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF] studies the matrix B , where B is the non-backtracking matrix; B ij therefore counts the number of non-backtracking walks between i and j. When the -neighbourhood of i is tree-like, (B ( ) χ k ) i = (B χk )i, where χk is a similarly defined vector; most of the results from [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF] can therefore be applied to this setting without further work. We will simply lay out the main steps of the proof, highlighting the main differences with [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF] when necessary.

Local structure of G

For an integer t ≥ 0, we introduce the vector

Y t (v) = (Y t (v)(i)) i∈[r] ,
where

Y t (v)(i) = |{w ∈ V | d(v, w) = t, σ(w) = i}| .
The proof of our first proposition, although quite lengthy, is completely identical to its equivalent in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]; we therefore omit it. Proposition 6. Let ∼ κ log α (n) with κ < 1/8; then, for all γ < 1/2: (i) for any k ∈ [r 0 ], there exists ρ k > 0 such that in probability,

1 n v∈V φ k , Y (v) 2 µ 2 k → ρ k . (ii) for any j = k ∈ [r], E 1 n v∈V φ j , Y (v) φ k , Y (v) = O α 5 /2 n -γ/2 (log(n)) 5/2 . (iii) for any j = k ∈ [r], E 1 n v∈V φ j , Y 2 (v) φ k , Y (v) = O α 7 /2 n -γ/2 (log(n)) 5/2 . For t ≥ 0, define Y t (v) = {w ∈ V | d(v, w) = t}; for k ∈ [r], we set P k, (v) = -1 t=0 w∈Yt(v) L k (w),
where

L k (w) = (x,y)∈Y 1 (w)\Yt(v),x =y φ k , Ỹt (x) S -t-1 (y), Ỹt (x)
is the equivalent of Y t (x) when all vertices in (G, v) t (i.e. vertices at distance at most t from v) are removed and

S -t-1 (y) = Ỹ -t-1 (y) 1 .
It can be seen from [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF] that when (G, v) 2 is a tree, then

(B ( ) B ( ) χ k ) v = P k, (v) + χ k (v)S (v) + φ k , Y 2 (v) .
One main difference with the proof in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF] is the presence of the last term in the above sum, as well as the fact that dealing with B ( ) B ( ) χ k is a little more difficult. The next proposition is an adaptation of Proposition 38 from [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF], with an identical -and thus omitted -proof: Proposition 7. Let ∼ κ log α (n) with κ < 1/10. Then, for all γ < 1/2:

(i) for all k ∈ [r 0 ], there exists ρ k such that w.h.p

1 n v∈V (P k, (v) + φ k , Y 2 (v) ) 2 µ 4 k → ρ k .
(ii) for any j = k ∈ [r], for some c > 0:

1

n v∈V P k, (v) φ j , Y (v) = O α 7 /2 n -γ/2 (log(n)) c .

From local neighbourhoods to the matrix B ( )

For ease of notation, we define N k, (v) = φ k , Y (v) ; using the same methods as in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF], we have the following estimates:

Proposition 8. Let ∼ κ log α (n) with κ < 1/4. Then w.h.p:

B ( ) χ k -N k,l = o(α /2 √ n) and B ( ) B ( ) χ k -P k, -N k,2 = O(α √ n).
It then remains to follow the proof of Proposition 19 from [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]; we simply highlight the proof for estimation (iii) of Proposition 2, since it is the only difference:

Proof. (Proposition 2-(iii)): We have by definition

ϕ j , ζ k = B ( ) χ j , B ( ) B ( ) χ k B ( ) χ j B ( ) B ( ) χ k . But B ( ) χ j = Θ( √ nµ k ), B ( ) B ( ) χ k = B ( ) χ k θ k = Θ( √ nµ 2 k
) and:

B ( ) χ j , B ( ) B ( ) χ k -N j, , P k, + N k,2 ≤ N j, B ( ) B ( ) χ k -P k, -N k,2 + B ( ) B ( ) χ k B ( ) χ j -N j, = O(α 4 √ n).
Furthermore, from Propositions 6 and 7, we get

N j, , P k, + N k,2 = O(α 7 /2 n 1-γ/2 ).
This gives the desired result.

Ramanujan property of B ( )

In order to complete the proof of Theorem 14, we need a control on the other eigenvalues of B ( ) . This is covered by the following proposition:

Proposition 9. Let H = ϕ 1 , . . . , ϕ r 0 , and ∼ κ log α (n) with κ < 1/12. Then with high probability sup

x∈H ⊥ , x =1 B ( ) x = O(α /2 ). (3.28)
The proof of this result relies on the following decomposition of B ( ) , whose proof can be found in [START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF]:

Lemma 17. Matrix B ( ) verifies the identity B ( ) = δ ( ) + m=1 δ ( -m) ĀB (m-1) - m=0 Γ ,m , (3.29)
for matrices δ (j) , Γ ,m such that for = O(log(n)) and with high probability, for all ε > 0,

ρ(δ (j) ) = O(α j ), j = 1, . . . , , (3.30)
ρ(Γ ,m ) = n ε-1 α ( +m)/2 , m = 1, . . . , . (3.31)
Here, Ā refers to the expected value of the adjacency matrix A of G.

The next step is therefore to control B (m-1) x for x ∈ H ⊥ ; in what follows γ will be any constant below 1/2. We begin with the following proposition from [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]:

Proposition 10. Let ∼ κ log α (n) with κ < γ/2.
There exists a subset B ⊂ V , constants C and c such that w.h.p the following holds:

(i) for all i ∈ V \ B, 0 ≤ m ≤ , |(B (m) χ k ) i -µ t- k (B ( ) χ k ) i | ≤ C log(n) c α m/2 if k ∈ [r 0 ], |(B (m) χ k ) i | ≤ C log(n) c α m/2 if k ∈ [r] \ [r 0 ]. (ii) for all i ∈ B, 0 ≤ m ≤ and k ∈ [r], |(B ( ) χ k ) i | ≤ C log(n) c α m . (iii) |B| = O(α n 1-γ ).
From this, we get the following corollary:

Corollary 2. Let ∼ κ log α (n) with κ < γ/2; then, with high probability, for 0 ≤ m ≤ -1 and k ∈ [r 0 ]: sup

x⊥B ( ) χ k , x =1 B (m) χ k , x = O( √ n α m/2 ). Additionally, for k ∈ [r] \ [r 0 ], B (m) χ k = O( √ nα m/2 ). Proof. Write B (m) χ k , x = i∈B x i (B (m) χ k ) i + i / ∈B x i (B (m) χ k ) i = s 1 + s 2 .
Using the Cauchy-Schwarz inequality, the first sum is bounded by

|s 1 | ≤ log(n) c α m |B| ≤ log(n) d α m α /2 n (1-γ)/2 = o( √ nα m/2 ),
while the second can be treated using Proposition 10 and the fact that B ( ) χ k , x = 0:

|s 2 | ≤ µ t- k i∈B |x i ||(B ( ) χ k ) i | + i / ∈B |x i ||(B (m) χ k ) i -µ t- k (B ( ) χ k ) i | ≤ log(n) c α t-α α /2 n (1-γ)/2 + log(n) c √ nα t/2 = O( √ n α m/2 ),
where we used again the Cauchy-Schwarz inequality as before.

Let now k ∈ [r] \ [r 0 ]; as before, we write

B (m) χ k 2 = i∈B (B (m) χ k ) 2 i + i / ∈B (B (m) χ k ) 2 i ≤ |B| log(n) c α 2m + n log(n) c α m = n log(n) c (α l+2m n -γ + α m ) = O(nα m ),
and the result follows.

We are now ready to prove Proposition 9:

Proof. Let x ∈ H ⊥ such that x = 1 and the supremum in (3.28) is reached; using the decomposition from Lemma 17, we have

B ( ) x ≤ ρ(δ ( ) ) + m=1 ρ(δ ( -m) ) ĀB (m-1) x + m=1 ρ(Γ ,m ).
The first and third terms are bounded by O(α /2 ). For the second term, we notice that defining the matrix P by

P = 1 n r k=1 µ k χ k χ k , we have Ā = P -diag(P ) since W = µ k φ k φ k .
Therefore, for fixed 1 ≤ m ≤ , we have:

ĀB (m-1) x = r k=1 µ k χ k χ k B (m-1) x -diag(P )B (m-1) x ≤ sup i W ii n B (m-1) x + k∈[r 0 ] µ k n χ k χ k B (m-1) x + k∈[r]\[r 0 ] µ k n χ k χ k B (m-1) x = I + J + K.
Notice first that B ( ) ij ≤ 2 for all i, j by the tangle-free property, so I = O(1). Now, for k ∈ [r 0 ], we have

χ k χ k B (m-1) x = χ k B (m-1) χ k , x ≤ O( √ n × √ nα m/2 ).
Therefore, J = O(α m/2 ); finally, using the Cauchy-Schwarz inequality, we have for k ∈

[r] \ [r 0 ] χ k χ k B (m-1) x ≤ χ k B (m-1) χ k x = O( √ n × √ nα m/2 × 1).
Putting this all together, we find that for 1 ≤ m ≤

ĀB (m-1) x = O(α m/2 ). Since ρ(δ ( -m) ) = O(α ( -m)/2 ), we get B ( ) x = O(α /2
), which proves the desired result.

Proof of Proposition 3

Using Proposition 9, we are now able to prove our last result. Note that if κ < 1/12, there exists a γ < 1/2 such that κ < γ/6. Let z k be the Gram-Schmidt orthonormalization of ϕ k ; using Lemma 9 from [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF], we know that

ϕ k -z k = O(α 3 /2 n -γ/2 ),
and thus z k is asymptotically parallel to ϕ k . We only need a final lemma to complete our proof:

Lemma 18. Assume that ∼ κ log α (n) with κ < γ/6. Then

ζ k -z k = O(θ -1 k α /2 ). Proof. Write ζ k = j∈[r 0 ] ζ k , z j z j + x,
where x ∈ H ⊥ . We have, for j = k, ζ k , z j = O(α 2 n -γ/2 ) by the above bound of ϕ jz j ; furthermore,

x 2 = ζ k , x = θ -1 k B ( ) ϕ k , x ≤ θ -1 k B ( ) x = O(θ -1 k α /2 ) × x .
Therefore, we can write

1 = ζ k 2 = ζ k , z k 2 + j =k ζ k , z j 2 + x 2 = ζ k , z k 2 + O(α 2 n -γ/2 ) + O(θ -2 k α ) = ζ k , z k 2 + O(θ -2 k α ), since κ < γ/6. Then, z k -ζ k 2 = 2(1 -ζ k , z k ) = O(θ -2 k α
), which yields the desired result.

Proof. (of Proposition 3): We first bound B ( )

z k -Dz k for k ∈ [r 0 ]. Notice that Dz k = θ k z k ; this gives B ( ) z k -Dz k ≤ B ( ) z k -B ( ) ϕ k + B ( ) ϕ k -θ k z k ≤ ρ(B ( ) ) z k -ϕ k + θ k ζ k -z k = O(α ) × O(α 3 /2 n -γ/2 ) + O(α /2 ) = O(α /2 ). Consider now x ∈ R V such that x = 1. Decomposing x as
x k z k + x where x ∈ H ⊥ , we have:

B ( ) x -Dx ≤ k∈[r 0 ] x k B ( ) z k -Dz k + B ( ) x -Dx ≤ O(α /2 ) + B ( ) x = O(α /2 ),
which completes the proof.

Proofs for Theorem 16

Proof of Lemma 14

We first recall a result from Kesten and Stigum: consider a multitype Galton-Watson process, where the type of the root node is distributed according to arbitrary probability vector ν, and a particle of type j ∈ [r] has a Poi(M ij ) number of children of type i. Let Z t be the vector of population at time t, and F t the natural filtration associated to Z t ; we have the following statement:

Lemma 19. For each µ eigenvalue of M such that µ 2 > α, and each eigenvector φ associated to

µ, t → X(φ, ν, t) = µ -t k φ k , Z t (3.32)
is an F t -martingale converging a.s. and in L 2 to a random variable with finite variance and expected value φ k , ν .

Let µ = α be an eigenvalue of M of multiplicity d such that µ 2 > α, and φ (1) , . . . , φ (d) an orthonormal basis of eigenvectors associated to d. We define for all i ∈ [d], j ∈ [r], X (i) j the limit variable of martingale (3.32), applied to φ = φ (i) and ν = δ j . Similarly to previous notations, let φ (i) (resp. X (i) ) be the vector φ

(i) j j∈[r] (resp. X (i) j j∈[r]
), and φ (resp. X) the (random) matrix whose columns are the φ (i) (resp. the X (i) ). Recall that from Lemma 19, the expected value of

X (i) j is φ (i)
j for all i, j.

Now, let ξ be an eigenvector of B ( ) , normalized so that ξ 2 = n, with associated eigenvalue Θ(µ ); as shown in the proof of Theorem 14, there exists a vector u ∈ R d such that

ξ -( φu, Y (v) ) v∈V = o(1).
We let φ (ξ) = φu and X (ξ) = Xu.

From Proposition 6, u has norm Θ(1), and since µ -t φ, Z t (with ν = δ j ) converges to

X (i) j in L 1 , µ -t φ (ξ) , Z t converges to X (ξ) j in L 1 independently of ξ.
Using proposition 36 from [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF], we have the following: Lemma 20. For all i ∈ [r], we have the following convergence in L 1 :

1 n v∈V 1 σ(v)=i ξ(v)1 |ξ(v)|≤K → π(i)E X (ξ) 1 |X (ξ) |≤K ,
for all K that is a continuity point of the distribution of X i , and independently of ξ.

Proof. We first recall the aforementioned proposition from [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]: we say that a function τ that takes a graph and a distinguished vertex as an argument is -local if τ (G, v) depends only on the -neighbourhood of v in G. Denote by T the multitype Galton-Watson tree discussed earlier, rooted at o, where o has the distribution π.

Lemma 21. Assume that τ, ψ are two -local functions such that |τ | ≤ ψ and ψ is non-decreasing by the addition of edges. Then, if ∼ κ log α (n) with κ < 1/2, we have, for γ < 1/2:

E 1 n v∈V τ (G, v) -E[τ (T, o)] ≤ c α /2 log(n) n γ/2 E[max v∈V ψ 4 (G, v)] 1/4 ∨ E ψ 2 (T, o) 1/2
We now apply this lemma with

τ (G, v) = 1 σ(v)=i φ (ξ) , Y (v) 1 | φ (ξ) ,Y (v) |≤K
where Y is defined in Proposition 6. We can set ψ(G, v) = K, and by Lemma 19 and the subsequent analysis, we have

E[τ (T, o)] → π(i) E X (ξ) i 1 |X (ξ) i |≤K independently of ξ.
Now, by definition, we have ξφ (ξ) , Y (v) v∈V = o(1) (again independently of ξ). By the Cauchy-Schwarz inequality, we deduce that

1 n v∈V ξ(v) -φ (ξ) , Y (v) = o(1)
as well, and the lemma follows if K is a continuity point of X (ξ) i .

It now remains to prove the desired properties of the X (ξ) i ; first, since µ = α, then φ (ξ) is orthogonal to the all-one vector and as such

i∈[r] E[X i ] = i∈[r] φ (ξ) i = 0
Moreover, φ (ξ) 2 = u 2 = Θ(1), which proves the second assertion. Finally, let η > 0; since the X (i) j all have finite variance, there exists a constant K > 0 such that P(|X

(i) j | ≤ K ) ≥ 1 -η for all i, j and thus P X ∞ ≤ K ≥ 1 -drη.
Using the equivalence of norms, we find

P ∀i, X (i) 2 2 ≤ rK 2 ≥ 1 -drη which implies (since X (ξ) = Xu) P X (ξ) 2 2 ≤ r u 2 2 K 2 ≥ 1 -drη.
Using again norm equivalence yields finally, for

K = √ r u K , P X (ξ) ∞ ≤ K ≥ 1 -drη. (3.33)
Now, we have, for all i,

E[X (ξ) i 1 |X (ξ) i |≤K ] -E[X (ξ) i ] = E X (ξ) i 1 |X (ξ) i |>K ≤ E (X (ξ) i ) 2 P |X (ξ) i | ≥ K ≤ E (X (ξ) i ) 2 • drη
But by Doob's Theorem, E (X (ξ) i ) 2 is finite so choosing η accordingly yields the last inequality of Lemma 14.

Proof of limit (3.15)

For each v ∈ V , we define I v to be the random variable equal to 1 if v is assigned to I + , and 0 otherwise. Conditionnally to ξ, it is straightforward to see that

I v ∼ Ber(q v ) with q v = 1 2 + 1 2K ξ(v)1 |ξ(v)|≤K Now, let P i = (|{v ∈ I + | σ(v) = i}|)
/n; by definition,

P i = 1 n v∈V 1 σ(v)=i I v .
We therefore have

E[P i | ξ] = 1 n v∈V 1 σ(v)=i 1 2 + 1 2K ξ(v)1 |ξ(v)|≤M , Var(P i ) ≤ 1 4n
and thus with high probability, independently of ξ,

P i = E[P i | ξ] + n -1/3 (3.34) → π(i) 1 2 + 1 2K E[X (ξ) i 1 |X (ξ) i |≤M ] = π(i) pi (3.35)
where the convergence speed is independent from ξ.

Explicit bounds on K

In this section, the goal is to perform a more precise analysis of the limit variables X (ξ)

i , and to leverage this analysis to obtain an explicit value for K in Algorithm 15. For simplicity, we will assume that π ≡ 1/r throughout this section, although most of the results hold for general π. We begin with a small lemma: Lemma 22. Let φ be a normed eigenvector of M associated to an eigenvalue α > µ > √ α, and denote by X (φ) i the limit random variables of Lemma 19. Let c (φ),j (resp. m (φ),j ) the vector of the j-th cumulants (resp. moments) of the X (φ) i . We then have the following relation, for all j ∈ N:

c (φ),j = M µ j m (φ),j
By definition, we have c (φ),1 = m (φ),1 = φ, and we have the following corollary for c (φ),2 and m (φ),2 : Corollary 3. We denote by φ 2 the vector whose coordinates are the φ 2 i . Then

c (φ),2 = I - M µ 2 -1 M µ 2 φ 2 and m (φ),2 = I - M µ 2 -1 φ 2 .
As a result, we have

i∈[r]
Var(X

(φ) i ) = 1 τ -1 and i∈[r] E[(X (φ) i ) 2 ] = τ τ -1
,

where τ = µ 2 2 /α.
Proof. (of Corollary 3). The first part is an easy calculation, observing that c (φ),2 = m (φ),2φ 2 .

For the second part, since the all-one vector e is an eigenvector of M associated to the eigenvalue α, we have:

i∈[r] Var(X (φ) i ) = e, c (φ),2 = e I - M µ 2 -1 M µ 2 φ 2 = α/µ 2 1 -α/µ 2 e φ 2 = 1 τ -1 ,
and a similar calculation yields the second identity.

It now remains to prove Lemma 22:

Proof. (of Lemma 22). Using the Galton-Watson tree definition (and going one step down into the tree), we have the following characterization for the variables X (φ) i :

X (φ) i = 1 µ j∈[r] Poi(M ij ) k=1 X (φ) j,k ,
where the X i ) and taking the logarithm on both sides, we find that for all t ∈ R, log(ψ

(φ) i (t)) = j∈[r] M ij ψ (φ) j t µ - 1
Now, the k-th Taylor coefficient of the LHS is c (φ),k i /k!, and the one on the RHS is

j∈[r] M ij m (φ),k j k! µ k = 1 µ k k! M m (φ),k i ,
which completes the proof.

We now can prove our first result on the vector u defined before:

Lemma 23. Let µ, ξ and u be defined as in the proof of Lemma 14. Then we have

u 2 = r(τ -1) + o(1)
Proof. From Lemma 6, we know that for each i ∈ [d],

φ (i) , Y (v) v∈V 2 = n(ρ (i) + o(1)) where ρ (i) = i∈[r] π(i)E (X (i) ) 2
But since π ≡ 1/r, we know from Corollary 3 that

ρ (i) = ρ := 1 r(τ -1)
But the vectors φ (i) , Y (v) v∈V are asymptotically orthogonal, and thus

n = ξ 2 = ( v 2 + o(1)) • n • (ρ + o(1)),
which yields the desired result. Now, we are ready to prove some bounds for K; the main step is the following Markov bound on (X (i) ) 2 :

Lemma 24. Let η > 0; then, for all i ∈ [d], j ∈ [r], P |X (i) j | ≤ τ η(τ -1) ≥ 1 -η
Proof. For all C > 0, we have by Markov's inequality

P |X (i) j | ≥ C ≤ E[(X (i) j ) 2 ] C 2 ≤ τ C 2 (τ -1)
,

where we bounded E[(X

(i) j ) 2 ] by the sum of all E[(X (i) k ) 2 ]
. The lemma then follows easily. Now, we have to unravel the calculations done in the proof for Lemma 14; let ε < 0. By the same bound as above (as well as the fact that the φ (i) are orthogonal), we have

E (X (ξ) i ) 2 ≤ u 2 τ τ -1 = rτ + o(1)
Therefore, an asymptotically good choice of η is

η = ε 2 r 2 d τ ,
which yields a value for K of

K = τ η(τ -1) = r τ ε d τ -1
Finally, the bound for K becomes

K = √ r u K = r τ ε √ r d τ 3.7 Proof of Lemma 16 Proof. (i) is obvious since d(i, C) + d(j, C) ≤ implies d(i, C) ≤ . For (ii), note first that V C and V C are disjoint for C = C : if i ∈ V C ∩ V C
, then C and C are in the -neighbourhood of i, which contradicts Lemma 26.

Let π C be the projection on V C for all C; the π C are mutually orthogonal and for a vector v, we have:

v P ( ) v = C v π C P ( ) π C v = C (π C v) P ( ) C (π C v) (3.38) ≤ C ρ(P ( ) C ) • π C v 2 (3.39) ≤ max C ρ(P ( ) C ) • C π C v 2 . (3.40)
On the other hand,

v 2 ≥ C π C v 2 . ( 3

Proof of Proposition 5

In the same vein as Lemma 25, for a vertex set X , define S t (X ) as the number of vertices at distance t of X . By taking the union on all vertices of X , we easily get the following corollary: Corollary 4. For the same constants C and ε as above, with probability 1 -O(n -ε ), we have for all vertex subsets X ∈ P({1, . . . , n}) and = O(log(n)):

S t (X ) ≤ C • |X | log(n) • α t , t ∈ {1, . . . , }.
We are now able to prove Proposition 5:

Proof. Let K be the modified vertex set, and consider vertices i and j such that D

( ) ij = D ( ) ij .
Then we have one of four possibilities:

(i) d(i, j) = and d(i, j) < (ii) d(i, j) > and d(i, j) = (iii) d(i, j) = and d(i, j) > (iv) d(i, j) < and d(i, j) =
In cases (i) and (ii), there is a path between i and j in G through K of length at most , and in cases (iii) and (iv) there is a path between i and j in G through K. Therefore, in all cases, we have that

d(i, K) + d(j, K) ≤ . Write | D ( ) -D ( ) | for the matrix whose (i, j) coefficient is | D ( ) ij -D ( )
ij |, and P K for the matrix such that P K,ij = 1d(i, K) + d(j, K) ≤ ; the previous analysis and the Perron-Frobenius theorem imply that

ρ( D ( ) -D ( ) ) ≤ ρ(| D ( ) -D ( ) |) ≤ ρ(P K ). (3.42)
We can then perform the same analysis as in the proof of Proposition 4 to find that the spectral radius of P K is the same as that of

Q K =        S 0 √ S 0 S 1 • • • S 0 S -1 √ S 0 S √ S 0 S 1 S 1 • • • S 1 S -1 0 . . . . . . . . . . . . . . . S 0 S -1 S 1 S -1 • • • 0 0 √ S 0 S 0 • • • 0 0       
, where we write S t instead of S t (K) for ease of notation. Corollary 4 then gives

S t (K) = O(α t log(n)|K|) = o(α t τ /2
), and the same calculation as in Proposition 4 yields:

ρ(Q K ) = o(α /2 τ /2 ) = o(µ 2 ), (3.43)
and the theorem follows.

Proof of Theorem 19

In order to prove Theorem 19, we need to show that the controls in the proof of Theorem 18 are actually sharp. We begin with the following lemma, which comes from the fact thatneighbourhoods of the vertices of G are roughly of the same size:

Lemma 27. Assume that γ = Θ(τ /2 ). Then there exists a set of vertices K of size γ such that:

S (K) = Ω(α • γ). (3.44)
Proof. Let ε > 0 to be determined later, S be the set consisting of the n 1-ε vertices i with the largest values S (i); we first show that, for all i ∈ S S (i) = Θ(α ).

(3.45) Indeed, from Lemma 25, we have the folowing inequalities:

Knα 2 ≤ n i=1 S (i) 2 ≤ n min i∈S S l (i) 2 + |S|(C log(n)α ) 2 , (3.46)
and the second term is negligible before the two others, which implies (3.45). We then build a set K of size γ as follows: begin with any member of S, and at each step add a vertex x such that d(x, K) > 2 . This is possible as long as the 2 -neighbourhood of K does not cover S, i.e. as long as:

γ • C log(n)α 2 < n 1-ε . (3.47)
But the LHS of this inequality is bounded by C log(n)n 3/4 , so this condition is satisfied as long as ε < 1/4.

By this construction, the vertices of K have -neighbourhoods that are pairwise disjoint, so by equation [START_REF] Bollobás | Random Graphs[END_REF] we have:

S (K) = Ω(α × γ). (3.48)
Consider now the vector v such that:

v i =      γ -1/2 if i ∈ K S (K) -1/2 if d(i, K) = 0 otherwise . (3.49)
The aim is to show the following equalities:

v D ( ) v v 2 = Ω(µ 2 ) and v, B ( ) χ k = o( v B ( ) χ k ) ∀k ∈ [r 0 ] (3.50)
Indeed, Theorem 19 will then follow from a simple application of Courant-Fisher's Theorem.

Proof. (of Eq. (3.50). We notice that v 2 = 2; furthermore:

v D ( ) v = i,j v i D ( ) ij v j ≥ 2 i∈S (K) j∈K v i v j = 2γS (K)γ -1/2 S (K) -1/2 = 2 γS (K) = Ω(µ 2 ),
which proves the first inequality. It remains then to prove that v is asymptotically orthogonal to B ( ) χ k for k ∈ [r 0 ]: noticing that v i ≤ 1 for all i and v 0 = γ + S (K), we find, using Corollary 4:

v, B ( ) χ k ≤ (γ + S (K)) • B ( ) χ k ∞ ≤ (γ + S (K)) • O(α ) = O(γα 2 ) = o( √ nµ k ) since κ < 1/4 = o( v B ( ) χ k ),
where we used part (ii) of proposition 10 to bound B ( ) χ k ∞ .

Chapter 4

Non-backtracking spectrum of inhomogeneous random graphs

This chapter is based on the paper [START_REF] Stephan | Non-backtracking spectra of weighted inhomogeneous random graphs[END_REF].

Introduction

Let P ∈ M n (R) be a symmetric n × n matrix with entries in [0, 1], and W a (symmetric) weight matrix with independent random entries. We define the inhomogeneous undirected random graph G = (V, E) associated with the couple (P, W ) as follows: the vertex set is simply

V = [n],
and each edge {u, v} is present in E independently with probability P uv , and holds weight W uv . The entrywise expected value and variance of the weighted adjacency matrix of G are

EA = P • EW and Var(A) := P • E[W • W ] -P • P • EW • EW, (4.1)
where • denotes the Hadamard product. When the entries of P are small, the second term of Var(A) is negligible and the variance can be well approximated by the entrywise second moment; we thus define Q := P • EW and K :

= P • E[W • W ]. (4.2)
A natural question, arising from matrix perturbation theory, is then as follows:

What is the relationship between the eigendecomposition of A and the one of Q?

Unfortunately, at least in the unweighted case, when the mean degree of G is low (o(log(n))), it is known that the largest eigenvalues (and associated eigenvectors) of A are determined by the large degree vertices; see [START_REF] Benaych-Georges | Largest eigenvalues of sparse inhomogeneous Erdős-Rényi graphs[END_REF] for a complete description of this phenomenon. To extract meaningful information on the spectrum of Q, another matrix has shown better performance: the non-backtracking matrix, whose application to community detection has been studied in [START_REF] Krzakala | Spectral redemption in clustering sparse networks[END_REF][START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF].

Given a weighted graph G, we define its associated non-backtracking matrix B as follows: B is a 2|E| × 2|E| matrix indexed by the oriented edges of G, whose coefficients are

B ef = W f 1{e → f } = W f 1{e 2 = f 1 }1{e 1 = f 2 },
where e = (e 1 , e 2 ) and f = (f 1 , f 2 ). The above question rephrases in our setting as What is the relationship between the eigendecomposition of B and the one of Q? and the main focus of this article is to provide an answer as precise as possible to this problem. To this end, let

Q = r i=1 µ i ϕ i ϕ i with |µ 1 | ≥ |µ 2 | ≥ • • • ≥ |µ r |
be the eigendecomposition of Q, and ρ = ρ(K) the largest eigenvalue (in absolute value) of K. Note that by definition, Q and K are symmetric and therefore all eigenvalues defined above are real. We shall assume that there exists some deterministic bound L (possibly depending on n) such that max |W ij | ≤ L. We can then state our main theorem, without detailing the needed hypotheses for now:

Theorem 21 (informal statement). Assume the following conditions: 1) , (ii) the graph G is sparse enough, (iii) the eigenvectors of Q are sufficiently delocalized.

(i) r = n o(
Let r 0 be the number of eigenvalues of Q whose absolute value is larger than both √ ρ and L:

µ k > √ ρ ∨ L for all k ∈ [r 0 ] and µ r 0 +1 ≤ √ ρ ∨ L (4.3)
Then, for i ≤ r 0 , the i-th largest eigenvalue of B is asymptotically (as n goes to infinity) equal to µ i , and all the other eigenvalues of B are constrained in a circle of center 0 and radius max( √ ρ, L). Further, if i ≤ r 0 is such that µ i is a sufficiently isolated eigenvalue of Q, then the eigenvector associated with the i-th eigenvalue of B is correlated to a lifted version of ϕ i .

Next section consists in the detailed statement of this theorem (with precise hypotheses and bounds given).

Detailed setting and results

Notations

General notations: Throughout this paper, we use the following notations:

• for integer n, [n] denotes the set {1, . . . , n}.

• for x ∈ R n , we shall denote by x i or x(i) the i-th coordinate of x, whichever is most convenient. x is the 2-norm of x, and x ∞ the infinity norm of x.

• the operator norm of a matrix M is noted M ; it is the maximal singular value of M . Its Frobenius norm is noted M F and its infinity norm M ∞ = sup i,j |M ij |.

• 1 denotes the all-one vector, and 1{•} is the indicator function of an event.

• the group of permutations on r elements is noted S r .

• the max (resp. min) of two numbers a, b is noted a ∨ b (resp. a ∧ b).

• the letter c denotes any absolute constant, whose value should be assumed to be the maximum of any such constant encountered so far. To improve the readability of our computations, we use numbered constants c i during proofs.

Graph theoretic notations: For a graph g = (V, E), let E be the set of oriented edges in E, and

E(V ) = {(u, v) | u = v ∈ V }
be the set of all directed edges of the complete graph on V . If t is an integer, g = (V, E) is a graph and x ∈ V , then the ball (g, x) t is the subgraph induced by all edges at distance at most t from x, and ∂(g, x) t is the boundary of the ball, i.e. the set of vertices at distance exactly t from x. Finally, the set of all non-backtracking paths of length t starting with x will be denoted P g (x, t).

Non-backtracking matrix: Since we are interested in the spectrum of the non-backtracking matrix B, we need to be able to translate "vertex" quantities such as the vectors ϕ i into "edge" quantities. Recall that V = [n], and identify E with the set [2m]; we define the 2m × n start and terminal matrices S and T as

∀e ∈ E, i ∈ [n], S ei = 1{e 1 = i} and T ei = 1{e 2 = i}.
For a vector φ ∈ R n , this implies that [T φ](e) = φ(e 2 ) for every edge e ∈ E. We then define the "lifted" eigenvectors

χ i = T ϕ i for i ∈ [r].
We also define the reverse operator J such that Je = ē := (e 2 , e 1 ), and the diagonal matrix D W such that D W (e, e) = W e ; from the definition of B and symmetry of W it is straightforward to see that JD W = D W J and for all t ≥ 0

JD W B t = (B * ) t D W J, (4.4)
which is known in mathematical physics as parity-time invariance. For any vector x ∈ R E , we denote the vector Jx by x.

Building upon the sketch in the introduction, we now expand on the model definition. Recall that the expectation and variance matrices were defined as

Q = P • EW and K = P • E[W • W ].

Defining the convergence parameters

In full generality, with no assumptions on P and W , we do not expect meaningful results to hold; however, we are still able to provide interesting properties on a large class of matrices. We define in the following the parameters that will govern the convergence behavior :

(i) the rank r = max rank(Q), rank(K) ;

note that in most practical applications (such as the unweighted case), we shall have r = rank(Q), but we also treat cases where r rank(Q).

(ii) the sparsity parameter

d = n max i,j∈[n]
P ij ;

(iii) the eigenvector delocalization parameter

b = √ n max i≤rank(Q) ϕ i ∞ ;
(iv) the signal-to-noise ratio τ = max

µ 2 i >µ 1 µ 1 µ 2 i ;
(v) and finally the almost sure probability bound

W ∞ = L;
our results hold trivially whenever L = +∞ so we shall restrict ourselves to the case where L is finite, and the W ij are almost surely bounded. While Theorem 22 below requires an almost sure bound, techniques for dealing with high probability bounds are discussed in Theorem 26.

The average degree of a vertex i will be noted by

d i = j∈[n] P ij ≤ d,
which corresponds to the entries of the vector P 1. To ensure that G is connected enough for spectral properties to hold, we make the (common) assumption that d i ≥ 1 for all i ∈ [n]. The entries of K1 can be viewed as an extension of the average degrees in the weighted case (see [START_REF] Alt | Extremal eigenvalues of critical Erdős-Rényi graphs[END_REF] or [START_REF] Benaych-Georges | Spectral Radii of Sparse Random Matrices[END_REF] for examples), and for the same reason as above we require that K1 is bounded away from zero by a constant.

Main theorem

In the following, G = G(P, W ) is the random graph defined in the introduction, B is the nonbacktracking matrix associated with G, and

|λ 1 | ≥ • • • ≥ |λ 2m | are its eigenvalues.
In its most general form, our main result is as follows:

Theorem 22. Let n ≥ 0 and (P, W ) be a couple of n × n matrices defining a random graph G. Define ρ = ρ(K), r 0 as in (4.3), and r, b, d, τ, L as in Subsection 4.2.2.

Let = 1 - 4 log(n) log(d 5 (1 ∨ L) 2 ) ,
for arbitrary ε > 0, and where L = L/µ 1 . There exist numbers n 0 and C 0 , all depending on n and the convergence parameters, such that the following holds:

(i) C 0 is smaller than c rbd L log(n) 1 -τ 25 ,
and n 0 is smaller than

exp   c max log(r), log(b), log (d) 2 , log ( L) 2 , log(log(n)) log(τ -1 )   . (ii) If n ≥ n 0 , define σ := C 0 µ 1 τ /2 . (4.5)
Then the following holds with probability at least 1c/ log(n)there exists a permutation s of [r 0 ] such that max

i∈[r 0 ] λ i -µ s(i) ≤ σ, (4.6)
and all the remaining eigenvalues of B are less than C

1/ 0 √ ρ ∨ L . (iii) For any i ∈ [r 0 ], if δ i := max j =s(i) |µ s(i) -µ j | ≥ 2σ, (4.7)
then there exists a normed eigenvector ξ associated with λ i such that

ξ, ξ i ≥ 1 -rd 2 L2 ρ µ 2 i + O σ δ i -σ
where

ξ i = T ϕ i T ϕ i .
In order to get an applicable and useful result, we need n ≥ n 0 when n is sufficiently large, and C

1 0 goes to 1 as n goes to infinity. Both conditions are verified in particular when 1) and log (d

1 -τ = Ω(1), r, b = n o(
) 2 = o(log(n)).
By definition of L, whenever L > 1 we have µ 1 < L and thus r 0 = 0. We can therefore safely assume L ≤ 1 in applications and not focus on any bound for L.

The proof of this theorem follows the same method as in many spectral proofs, from [START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF] to more recent papers such as [START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF]. It consists of the following:

• show that the neighbourhood of any vertex v is close to a suitably defined random tree,

• study a family of graph functionals that give rise to approximate eigenvectors of the random tree,

• use a concentration argument to transpose those tree eigenvectors to pseudo-eigenvectors of the non-backtracking matrix,

• bound the remaining eigenvalues using a variant of the trace method in [START_REF] Füredi | The eigenvalues of random symmetric matrices[END_REF],

• conclude by a matrix perturbation argument.

A large portion of the remainder of this paper is dedicated to implementing this method; however, we first provide several applications of our result to the fields of random matrix theory and random graph theory.

Applications

Phase transition in random graphs

Matrix perturbation theory focuses on finding the eigenvalues and eigenvectors of matrices of the form X + δ, where X is a known matrix and δ is a perturbation assumed "small" in a sense. Celebrated results in this field include the Bauer-Fike theorem [START_REF] Bauer | Norms and exclusion theorems[END_REF] for asymmetric matrices, and the Weyl [START_REF] Weyl | Das asymptotische verteilungsgesetz der eigenwerte linearer partieller differentialgleichungen (mit einer anwendung auf die theorie der hohlraumstrahlung)[END_REF] and Davis-Kahan [START_REF] Yu | A useful variant of the Davis-Kahan theorem for statisticians[END_REF] theorems for symmetric ones; incidentally the present paper makes use of those results in its proofs. Finding sharp general theorems without additional assumptions is known to be hard, since the eigenvalues and eigenvectors depend on the interactions between the eigenspaces of X and δ.

In the last two decades, growing attention has been paid to problems of the following form: finding the eigenvectors of X n + P n (or, in its multiplicative form, X n (I n + P n )), where P n is an n × n matrix with low rank r n (usually fixed) and known eigenvalues, and X n is a random matrix with known distribution. Examples of this setting are the spiked covariance model [START_REF] Baik | Phase transition of the largest eigenvalue for nonnull complex sample covariance matrices[END_REF][START_REF] Johnstone | PCA in High Dimensions: An Orientation[END_REF] and additive perturbations of Wigner matrices [START_REF] Péché | The largest eigenvalue of small rank perturbations of Hermitian random matrices[END_REF][START_REF] Féral | The Largest Eigenvalue of Rank One Deformation of Large Wigner Matrices[END_REF][START_REF] Capitaine | The largest eigenvalues of finite rank deformation of large Wigner matrices: Convergence and nonuniversality of the fluctuations[END_REF]. A more systematic study has been performed in [START_REF] Benaych | The eigenvalues and eigenvectors of finite, low rank perturbations of large random matrices[END_REF][START_REF] Benaych | The singular values and vectors of low rank perturbations of large rectangular random matrices[END_REF] on orthogonally invariant random matrices.

A staple of those results is the existence of a so-called BBP phase transition (named after Baik-Ben Arous-Péché, from the seminal article [START_REF] Baik | Phase transition of the largest eigenvalue for nonnull complex sample covariance matrices[END_REF]): in the limit n → ∞, each eigenvalue of P n that is above a certain threshold gets reflected (albeit perturbed) in the spectrum of X n + P n , with the associated eigenvector correlated to the one of P n .

Phase transition for the adjacency matrix The adjacency matrix A of our random graph G can be viewed as a perturbation model by writing

A = EA + (A -EA) = Q -diag(Q) + (A -EA).
The term diag(Q) being negligible with respect to the others, we can see A as the sum of a deterministic low-rank matrix and a random noise matrix with i.i.d centered entries. Further, the entrywise variance of A is equal (up to a negligible term) to K, so the parameter ρ can be seen as an equivalent to the variance in the Wigner model. We thus expect, whenever √ ρ L (so that √ ρ is the actual threshold in Theorem 22), to find a phase transition akin to the one in [START_REF] Benaych | The eigenvalues and eigenvectors of finite, low rank perturbations of large random matrices[END_REF]; and indeed the following theorem holds:

Theorem 23. Let (P, W ) be a matrix couple of size n × n and r, b, d, τ, L as above. Assume further that:

(i) the Perron-Frobenius eigenvector of K is 1; that is K1 = ρ1, (ii) the above eigenvector equation concentrates, i.e. with high probability there exists ε ≤ 1/2 such that for all i ∈ [n],

j∼i

W 2 ij -ρ ≤ ερ (4.8)
Then, if i ∈ [r 0 ] is such that µ 2 i ≥ 2L 2 , there exists an eigenvalue ν i of A that verifies

ν i = µ i + ρ µ i + ρ µ i • O L µ i + L 2 µ 2 i + ε . (4.9)
Further, if the mean degree d j for all j is equal to d 0 > 1, and i is such that δ i ≥ 2σ (with σ and δ i defined in (4.5) and (4.7)), then there exists a normed eigenvector ζ of A with corresponfing eigenvalue ν i such that

ζ, ϕ i = 1 - ρ µ 2 i + O 1 δ i -σ Lρ µ 2 i + L 2 ρ µ 3 i + ε ρ µ i . (4.10)
Whenever ρ L 2 , and ε goes to zero as n → ∞, then the condition µ 2 i ≥ 2L 2 is always verified and the O(•) term in (4.9) vanishes, and the obtained expansion is therefore asymptotically correct. The presence of δ i renders a similar result on the scalar product harder to obtain; however, assuming δ i = Θ( √ ρ) (that is, the eigenvalues of Q are somewhat regularly spaced) implies similarly that the O(•) term in (4.10) vanishes. The obtained expression for ν i , as well as the scalar product expansion, are identical to the ones in [START_REF] Benaych | The eigenvalues and eigenvectors of finite, low rank perturbations of large random matrices[END_REF], for low-rank additive perturbations of Gaussian Wigner matrices. Our result is thus a direct extension of [START_REF] Benaych | The eigenvalues and eigenvectors of finite, low rank perturbations of large random matrices[END_REF], for a larger class of matrices upon a sparsity and concentration condition. Such an extension isn't unexpected, in view of results concerning the universality of the semicircle law for Bernoulli random matrices, such as [START_REF] Erdős | The local semicircle law for a general class of random matrices[END_REF].

An especially interesting particular case of Theorem 23 is the unweighted random graph setting, where W ij = 1 for all i, j. In this case, we have K = P so the eigenvector equation K1 = ρ1 is equivalent to all the average degrees being equal, i.e.

d i = d 0 = ρ for i ∈ [n].
It is a well known fact (see for example [START_REF] Feige | Spectral techniques applied to sparse random graphs[END_REF]) that for unweighted random graphs the degree concentration property holds with ε = 2 log(n)/d 0 . A slight modification of the proof of Theorem 23 further removes several error terms, and the following corollary ensues: Corollary 5. Let P be a n × n matrix and r, b, d, τ as above, with W = 1 * 1. Assume further that for all i ∈ [n],

j∈[n] P ij = d 0 > 16 log(n).
Then for all i ∈ [r 0 ], there exists an eigenvalue ν i of A that verifies

ν i = µ i + d 0 µ i + O   log(n) d 0 d 0 µ i   ,
and if i is such that δ i > 2σ, there exists a normed eigenvector of A such that

ζ, ϕ i = 1 - d 0 µ 2 i + O   1 δ i -σ log(n) d 0 d 0 µ i   .
In particular we have

ν 1 = d 0 + 1 + O   log(n) d 0  
This is an improvement on the results of [START_REF] Benaych-Georges | Spectral Radii of Sparse Random Matrices[END_REF], which only give

ν i = µ i + O( √ d 0 )
. The condition d 0 > 16 log(n) ensures that the degrees of G concentrate. Since our result is really only meaningful whenever d 0 log(n), so that the error term is negligible before d 0 /µ i , we do not perform the same detailed analysis as in [START_REF] Alt | Extremal eigenvalues of critical Erdős-Rényi graphs[END_REF]. However, a more precise phase transition around d 0 log(n) is not excluded. Theorem 23 is derived from Theorem 22 through an adaptation of the Ihara-Bass formula [START_REF] Bass | The Ihara-Selberg Zeta Function of a Tree Lattice[END_REF], obtained by expanding arguments from [START_REF] Benaych-Georges | Largest eigenvalues of sparse inhomogeneous Erdős-Rényi graphs[END_REF][START_REF] Watanabe | Graph Zeta Function in the Bethe Free Energy and Loopy Belief Propagation[END_REF]: Proposition 11. Let x be an eigenvector of the matrix B with associated eigenvalue λ, such that λ 2 = W 2 ij for every i, j. Define the weighted adjacency matrix Ã(λ) and the diagonal degree matrix D(λ) by

Ã(λ) ij = 1{i ∼ j} λW ij λ 2 -W 2 ij and D(λ) ii = j∼i W 2 ij λ 2 -W 2 ij
Then the vector y = S * D W x is a null vector of the laplacian matrix

δ(λ) = I -Ã(λ) + D(λ).
The details and computations are left to the appendix.

Community detection in random networks

Community detection is a clustering problem that aims to identify large subgroups (or communities) with similar characteristics inside a large population, with the only data available being the pairwise interactions between individuals. Starting from its introductory paper [START_REF] Holland | Stochastic blockmodels: First steps[END_REF], the stochastic block model has been a popular generative model for algorithm design; it consists of a random graph G where vertices are partitioned randomly in communities, and edges are present independently with probability depending only on the community membership of their endpoints. Popular algorithms for recovering communities include semi-definite programming methods [START_REF] Montanari | Semidefinite programs on sparse random graphs and their application to community detection[END_REF], belief propagation [START_REF] Abbe | Proof of the Achievability Conjectures for the General Stochastic Block Model[END_REF], and spectral methods [START_REF] Lei | Consistency of spectral clustering in stochastic block models[END_REF][START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF]; a comprehensive review of algorithms and results can be found in [START_REF] Abbe | Community Detection and Stochastic Block Models: Recent Developments[END_REF].

Unlabeled stochastic block model In a general form, we can define the stochastic block model SBM(n, r, θ, M ), where θ ∈ [r] n and M ∈ [0, 1] r×r as follows:

• the vertex set is V = [n],

• each vertex i ∈ [n] has a community label θ i in [r],

• for any pair of vertices (i, j), an edge is present between i and j independently from the others with probability M θ i θ j .

It is common to assume M = α n M 0 , where M 0 does not depend on n and α is a scaling parameter. It is easy to see that up to diagonal terms, the expected adjacency matrix has the form

P = ΘM Θ * ,
where Θ is a n × r matrix such that Θ ij = 1 if θ i = j, and 0 otherwise. We shall assume that for any k ∈

[r], #{i ∈ [n] | θ i = k} n = π k > 0, (4.11)
where π is a deterministic probability vector. Let µ 1 ≥ • • • ≥ |µ r | the eigenvalues of diag(π)M 0 , with α chosen such that |µ 1 | = 1, and φ 1 , . . . , φ r the associated eigenvectors. Then the non-zero eigenvalues of P are easily found to be the αµ i , with associated eigenvectors Θφ i . A common assumption is that each vertex type has the same average degree, i.e.

P 1 = α1,
otherwise a simple clustering based on vertex degree correlates with the underlying communities. Making this additional assumption, the following theorem holds:

Theorem 24. Assume that r is constant, and α = n o (1) . Let r 0 be defined as follows :

• if α ≥ 1 is constant, r 0 is the only integer in [r] such that αµ 2 k > 1 for i ∈ r 0 , αµ 2 r 0 +1 ≤ 1.
• if α = ω(1), r 0 = r.

Then, for any n larger than an absolute constant and all i ∈ [r 0 ] one has

|λ i -µ i | ≤ c(α log(n)) a (αµ r 0 ) -κ log α (n) := σ
for some positive constants c, a, κ, and all other eigenvalues of B are confined in a circle with radius (1 + o(1)) √ α. Further, if µ i is an isolated eigenvalue of diag(π)M 0 , then there exists an eigenvector ξ of the non-backtracking matrix B associated with λ i such that

ξ, ξ i ≥ 1 - 1 αµ 2 i + O(σ ) where ξ i = T Θφ i T Θφ i .
This theorem is essentially a corollary of Theorem 22, with some simplifications due to Q = K = P and P 1 = α1; the error bound σ is the same as in the main theorem. It is a direct generalization of Theorem 4 in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF], for a diverging degree sequence; further, the property ξ, ξ i = 1-o(1) as soon as α 1 suggests that a clustering algorithm such as k-means performed on the eigenvectors of B recovers all but a vanishing fraction of the community memberships in this regime, which would provide an alternative to the Sphere-comparison algorithm presented in [START_REF] Abbe | Community Detection in General Stochastic Block Models: Fundamental Limits and Efficient Algorithms for Recovery[END_REF].

Conjecture 3. In the SBM defined as above, as soon as α = ω(1), running an approximate k-means algorithm on the top r eigenvectors of B allows to recover the community memberships of every vertex but a vanishing fraction as n → ∞.

Proving this conjecture would require a more careful eigenspace analysis for eigenvalues with multiplicity more than one, such as the one performed in [START_REF] Stephan | Robustness of Spectral Methods for Community Detection[END_REF], as well as an error bound on the clustering step similar to the one in [START_REF] Lei | Consistency of spectral clustering in stochastic block models[END_REF]. Note that in this setting the theoretical covariance matrices defined in (4.24) are diagonal, and the eigenvectors of B are therefore asymptotically orthogonal, which can greatly simplify the perturbation analysis of Section 4.4.

Labeled block models

In real-world networks, pairwise interactions often carry more information than just a binary one. A popular variant of the stochastic block model is thus a model with added edge labels, as follows: let L be a label space, and consider a SBM drawn under the model described above. We assign to an edge (i, j) a label L ij ∈ L, drawn independently from a distribution P θ i θ j . Such classes of models have been investigated in full generality in [START_REF] Heimlicher | Community Detection in the Labelled Stochastic Block Model[END_REF][START_REF] Lelarge | Reconstruction in the Labelled Stochastic Block Model[END_REF], and a variant with the underlying graph being an Erdős-Rényi model in [START_REF] Saade | Spectral detection in the censored block model[END_REF].

We shall focus here on the symmetric two-community SBM, with

π = 1 2 , 1 2 ,
τ = 2 (aE P [w 2 ] + bE Q [w 2 ]) ∨ L (aE P [w] -bE Q [w]) 2
Then, whenever τ < 1, let ξ be a normed eigenvector corresponding to the second eigenvalue of B. There exists a parameter σ ≤ (a log(n)) 25 τ κ log a (n)

for some constant κ such that

ξ, ξ 0 = √ 1 -τ + O(σ) where ξ 0 = Θ 1 -1 √ n
Whenever this result holds, a proof identical to the one in [START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF] implies that recovering a positive fraction of the community memberships is possible.

In order to maximize the region in which reconstruction is possible, we need to choose the weights w( ) such that τ is minimized. This optimization step is performed in the appendix, and leads to the following: Proposition 12. Define the weight function w and signal-to-noise ratio β as

w( ) = af ( ) -bg( ) af ( ) + bg( ) and β = 1 2 (af -bg) 2 af + bg dm, (4.13)
where a, f, b, g and m are defined in Equation (4.12) and below. Then, whenever β > 1, a spectral algorithm based on the matrix B is able to recover a positive fraction of the community memberships when n → ∞.

This settles a conjecture of [START_REF] Heimlicher | Community Detection in the Labelled Stochastic Block Model[END_REF], generalizing the setting from finite to arbitrary label space. Whenever we allow for a higher number of communities, as well as arbitrary choices for the connectivity matrix Q and distributions P ij , the problem proves to be harder; an analog to Theorem 25 does hold, but the optimization problem required to minimize the ratio τ looks to be untractable. In the symmetric SBM case, where

π = 1 k , M = a1{i = j} + b1{i = j} and P ij = P1{i = j} + Q1{i = j},
we make the following conjecture: As with Theorem 24, whenever the mean degree α of the graph grows to infinity, we have ξ, ξ 0 = 1o(1), which brings us our second conjecture: Conjecture 5. If we have a = αa 0 , b = αb 0 with α = ω(1), a 0 , b 0 fixed, then as n → ∞ a clustering algorithm based on the second eigenvector of the weighted non-backtracking matrix B with the weight function defined in (4.13) recovers all but a vanishing fraction of the community memberships.

As a final remark, note that the optimal weight function assumes perfect knowledge of all model parameters, especially the exact label distribution for each community pair. However, in some cases, this weight function is a rescaling of a more agnostic one; as an example, in the censored block model [2] we find that w( ) = c (with = ±1), and thus the spectral algorithm mentioned here is the same as in [START_REF] Saade | Spectral detection in the censored block model[END_REF].

Extension to gaussian weights

In the form presented in Theorem 22, our result is only meaningful with almost surely bounded random variables (i.e. with L < ∞). With a more careful analysis of the error bounds, this can be extended to

L = sup i,j∈[n] sup k E[W k ij ] 1/k ; (4.14)
however, we determined the class of distributions satisfying (4.14) was not different enough from the bounded case to warrant increasing the complexity of the proof.

To the contrary, the setting where the W ij are gaussian random variables is of independent interest; it can be seen as a special case of noisy matrix completion as described in [START_REF] Candes | Matrix Completion With Noise[END_REF][START_REF] Keshavan | Matrix Completion from Noisy Entries[END_REF]. In this case, the moment condition of (4.14) is far from satisfied, and at least at first glance our proof cannot be adapted readily. Still, we show the following: Then the conclusions of Theorem 22 apply with

Theorem 26. Assume that the W ij ∼ N (m ij , s 2
L = m + 2s log(n)
The loss of a log(n) factor comes from the use of a concentration bound for the W ij ; details can be found in the appendix.

To the best of our knowledge, there isn't much litterature to compare with on the topic of eigenvalue reconstruction for noisy matrix completion, the works cited above being focused on reconstructing the whole matrix. However, results on gaussian matrix perturbation such as [START_REF] Benaych | The eigenvalues and eigenvectors of finite, low rank perturbations of large random matrices[END_REF] seem to indicate that the log(n) factor is superfluous and can be improved upon with other methods.

A Bauer-Fike type bound for almost orthogonal diagonalization

One important tool in tying together the local analysis of G is a matrix perturbation theorem, derived from the Bauer-Fike theorem. It mostly consists in a simplification and adaptation of Theorem 8.2 in [START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF], tailored to our needs. We begin by recalling the original Bauer-Fike Theorem:

Theorem 27 (Bauer-Fike Theorem [START_REF] Bauer | Norms and exclusion theorems[END_REF]). Let D be a diagonalizable matrix, such that D = V -1 ΛV for some invertible matrix V and Λ = diag(λ 1 , . . . , λ n ). Let E be any matrix of size n × n. Then, any eigenvalue

µ of D + E satisfies |µ -λ i | ≤ E κ(V ), (4.15)
for some i ∈ [n], where κ(V ) = V V -1 is the condition number of V . Let R be the RHS of (4.15), and

C i := B(λ i , R) the ball centered at λ i with radius R (in C). Let I ⊆ [n] be a set of indices such that i∈I C i ∩ i / ∈I C i = ∅.
Then the number of eigenvalues of D + E in i∈I C i is exactly |I|.

A custom perturbation lemma for almost diagonalizable matrices

Building on this theorem, we now expose this section's first result. Let U = (u 1 , . . . , u r ) and V = (v 1 , . . . , v r ) be n × r matrices; our nearly diagonalizable matrix shall be S = U ΣV * with Σ = diag(θ 1 , . . . , θ r ). We shall assume that the θ i are in decreasing order of modulus:

|θ r | ≤ |θ r-1 | ≤ • • • ≤ |θ 1 | = 1.
Now, let A be a n × n matrix, not necessarily diagonalizable. The assumptions needed for our results are as follows:

(i) For some small constant ε > 0,

A -S ≤ ε.

(ii) The matrices U and V are well-conditioned: both U * U and V * V are nonsingular, and there exist two constants α, β > 1 such that

U * U ≤ α, V * V ≤ α, (U * U ) -1 ≤ β, (V * V ) -1 ≤ β.
(iii) There exists another constant 0 < δ < 1 such that

U * V -I r ∞ ≤ δ.
(iv) The θ i are well-separated from 0, in the sense that

|θ r | > 2σ := 2 × 84r 2 α 7/2 β(ε + 5rα 2 βδ). (4.16)
This definition may seem obscure, but shall happen naturally in the proof of the theorem.

Then the following result, whose statement and proof (regarding the eigenvalue perturbation) are adapted from [START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF], holds: Theorem 28. Let A be a matrix satisfying assumptions (i)-(iv) above, and let

|λ 1 | ≥ |λ 2 | ≥ • • • ≥ |λ r |
be the r eigenvalues of A with greater modulus. There exists a permutation π such that for all i ∈

[r] |λ π(i) -θ i | ≤ r × σ = 84r 3 α 7/2 β(ε + 5rα 2 βδ),
and the other nr eigenvalues of A all have modulus at most σ. Additionally, if i is such that

B(θ i , σ) ∩   j =i B(θ j , σ)   = ∅, (4.17)
then there exists a normed eigenvector ξ associated with λ π(i) such that

ξ - u i u i ≤ 3σ δ i -σ ,
where δ i is the minimum distance from θ i to another eigenvalue:

δ i = min j =i |θ j -θ i | ≥ 2σ.
Proof. We begin with defining an alternative matrix Ū such that Ū * V = I r . Let H i be the subspace of R n such that

H i = vect(v j | j = i),
and consider the vectors ũi and ūi defined as ũi = u i -P H i (u i ) and ūi = ũi ũi , v i with P H i the projection on H i , and Ũ , Ū the associated n×r matrices. Then it is straightforward to see that ūi , v i = 1 and ūi , v j = 0, for all j = i, which shows that Ū * V = I r . Now, if we let V i be the matrix V with the i-th column and line deleted,

P H i = V i (V * i V i ) -1 V * i , and
V * i u i 2 = j =i v j , u i 2 ≤ rδ 2 ,
hence we can compute u iũi :

u i -ũi = P H i (u i ) ≤ V i (V * i V i ) -1 V * i u i ,
and by the interlacing theorem

V i ≤ √ α and (V * i V i ) -1 ≤ β since V i is a principal submatrix of V . Using the fact that M ≤ M F for any matrix M , we find U -Ũ ≤ r 2 √ αβδ.
For the second part, note that by the Cauchy-Schwarz inequality,

| ũi , v i -1| ≤ | u i , v i -1| + u i -ũi • v i ≤ δ(1 + rαβ),
with the (generous) inequality v i ≤ V used in the last line. Whenever δ is small enough, we can use the inequality

(1 -t) -1 -1 ≤ 2t which is valid for t ≤ 1/2: 1 ũi , v i -1 ≤ 2δ(1 + rαβ).
As a result,

ūi -ũi = ũi 1 ũi , v i -1 ≤ 2δ √ α(1 + rαβ) ≤ 4rα 3/2 βδ.
Using again the norm equivalence bound and the triangular inequality,

Ū -U ≤ 5r 2 α 3/2 βδ, (4.18)
which ends the preliminary part of the proof.

We now set accordingly S = Ū ΣV * , and claim that S is now a truly diagonalizable matrix. Indeed, any ūi is an eigenvector of S with associated eigenvalue θ i , and a basis of im (V ) ⊥ provides a family of eigenvectors of Σ with eigenvalue 0. We consequently set

Π = Ū Y ,
where Y is an orthonormal basis of im (V ) ⊥ ; Π is the matrix of an eigenvector basis for S. Further, we have

S -S ≤ U -Ū Σ V ≤ 5r 2 α 2 βδ := ε .
The above bound implies that the matrices A and S are still close:

A -S ≤ A -S + S -S ≤ ε + ε , (4.19)
and we can apply the Bauer-Fike theorem to A and S; the eigenvalues of A are contained in the union of the balls B(θ i , ε ) and B(0, ε ), where

ε = (ε + ε )κ(Π).
The computation of κ(Π) being cumbersome, we defer the following lemma to later:

Lemma 28. Let X be a n × r matrix with rank r, and X such that X * X = I r . Let Y be a matrix for an orthonormal basis of im (X ) ⊥ = ker((X ) * ), and

P = (X, Y ). Then, if X ≥ 1 and X ≥ 1, Π ≤ √ 2 X and Π -1 ≤ √ 2(1 + X X )
Applying this to X = Ū and X = V gives the bound

κ(Π) ≤ 2 Ū + Ū 2 V ,
and we use the triangular inequality to bound Ū :

Ū ≤ U + Ū -U ≤ 6r 2 α 3/2 β,
a very loose but sufficient bound, that entails

κ(Π) ≤ 84r 2 α 7/2 β.
The corresponding bound on ε reads

ε ≤ 84r 2 α 7/2 β(ε + 5rα 2 βδ) = σ,
enlightening the definition in (4.16). Going back to the Bauer-Fike application, the separation condition (4.16) implies that B(0, σ) is disjoint from B(θ i , σ) for i ∈ [r] and we can apply the second part of the theorem: there are exactly r eigenvalues of A inside the region

Ω = i∈[r] B(θ i , σ),
and all other eigenvalues of A have modulus less than σ. Further, all connected components of Ω have the same number of eigenvalues of A and B. As a result, there exists a permutation π such that for all i ∈ [r], we have

λ π(i) -θ i ≤ sup Ω ⊆Ω diam(Ω ) ≤ 2rσ,
where the supremum is taken over all connected subsets of Ω.

We now move on to the eigenvector perturbation bound; let ξ be a normed eigenvector of A associated with the eigenvalue λ π(i) . We write ξ = Πx with Π the matrix defined before, and use (4.15):

λ π(i) Πx - r j=1 θ j x j ūj = A -S x ≤ ε + ε , which we rewrite as Π   λ π(i) x - j∈[r] θ j x j e j   ≤ ε + ε ,
with (e 1 , . . . , e n ) the usual orthonormal basis of R n . Using the inequality v ≤ P -1 P v holding for any vector v,

λ π(i) x - j∈[r] θ j x j e j ≤ Π -1 (ε + ε ).
We introduce the notation θ r+1 = • • • = θ n = 0; whenever the ball B(θ i , σ) is disjoint from all other such balls, we have |λ π(i)θ i | ≤ σ, and thus for j = i

|λ π(i) -θ j | ≥ |θ j -θ i | -|λ π(i) -θ i | ≥ δ i -σ, so that x -x i e i = j =i x j e j ≤ 1 δ j -σ j =i (λ π(i) -θ j )x j e j ≤ Π -1 (ε + ε ) δ j -σ .
We now apply Π inside the norm the LHS, and use the fact that κ(Π)(ε + ε ) ≤ σ:

ξ -x i ūi ≤ σ δ i -σ .
Now, for any vectors w, w ∈ R n , we have

w w - w w ≤ 2 w -w w , (4.20)
and all that remains is to write

ξ - u i u i ≤ ξ - ūi ūi + u i u i - ūi ūi ≤ 2σ δ i -σ + 2 u i -ūi ≤ 3σ δ i -σ ,
having used (4.20) twice and 2 u iūi ≤ σ. This ends the proof.

As announced, we now prove the aforementioned Lemma 28 on the condition number of P :

Proof. Let z ∈ R n be a unit vector, and write z = x y with x of size r and y of size nr. Then, using that Y = 1,

Πz = Xx + Y y ≤ X • x + Y • y ≤ (1 ∨ X ) ( x + y ) ≤ √ 2 X ,
which proves the first inequality. The second one relies on the following explicit formula for Π -1 :

Π -1 = (X ) * -Y * X(X ) * + Y * .
Indeed, using the relations Y * Y = I n-r and (X ) * Y = 0:

(X ) * -Y * X(X ) * + Y * P = (X ) * -Y * X(X ) * + Y * (X Y ) = (X ) * X (X ) * Y -Y * X(X ) * X + Y * X -Y * X(X ) * Y + Y * Y = I r 0 -Y * X + Y * X Y * Y = I r 0 0 I n-r = I n . Furthermore, we have -Y * X(X ) * + Y * ≤ Y I n -X(X ) * ≤ 1 + X X ,
and the exact same argument as in the first inequality yields

P -1 ≤ √ 2 1 + X X

Matrix power perturbation and phase perturbation control

We aim in the following section to apply Theorem 28 to powers of the matrix B; however, such a process introduces uncertainty on the phase of the eigenvalues of B. The next theorem, adapted from [START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF] and [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF], develops a method to control such uncertainty. As before, let

Σ = diag(θ 1 , . . . , θ r ) with 1 = |θ 1 | ≥ • • • ≥ |θ r |,
and U, U , V, V four n × r matrices. We set

S = U Σ V * and S = U Σ (V ) * ,
for two integers , .

Theorem 29. Assume the following:

(i) the integers , are relatively prime, (ii) the matrices U, U , V, V are well-conditioned:

• they all are of rank r,

• for some α, β ≥ 1, for X in {U, V, U , V },

X * X ≤ α and (X * X) -1 ≤ β,
• for some small δ < 1,

U * V -I r ≤ δ and (U ) * V -I r ≤ δ,
(iii) there exists a small constant ε > 0 such that

A -S ≤ ε and A -S ≤ ε, (iv) if we let σ 0 := 84r 3 α 7/2 β(ε + 5rα 2 βδ), then σ 0 < |θ r | and σ 0 < |θ r | . (4.21)
Assume without loss of generality that is odd, and let

σ := σ 0 |θ r | .
Then, the r largest eigenvalues of A are close to the θ i in the following sense: there exists a permutation π of [r] such that for i ∈ [r],

λ π(i) -θ i ≤ 4σ,
and all other eigenvalues of A are less that σ

1/ 0 . Additionally, if i is such that B(θ i , σ) ∩   j =i B(θ j , σ)   = ∅, (4.22)
then there exists a normed eigenvector ξ associated to λ π(i) such that

ξ - u i u i ≤ 3σ δ i -σ ,
with δ i defined as in Theorem 28.

Proof. We apply Theorem 28 to A , S and A , S ; for any i ∈ [r],

λ π(i) -θ i ≤ σ 0 and λ π (i) -θ i ≤ σ 0 . (4.23)
Examining the proof of Theorem 28, we notice that we can take π = π since taking the -th power does not change the ordering. We fix i ∈ [r] and let λ = λ π(i) = |λ|e iω and θ = θ i for now; then

λ θ -1 ≤ ν := σ 0 |θ| .
The argument of (λ/θ) is thus between -ξ and ξ, with

ξ = |2 arcsin(ν/2)| ≤ π/2ν,
and the same holds for (with ν defined accordingly). Thus, there exists two integers p, p and two numbers s, s with absolute value less than π/2ν (resp. π/2ν ), such that ω = pπ + s and ω = p π + s .

This implies

pp = ss π The LHS of this inequality is an integer, and using condition (4.21) both terms in the RHS have a magnitude strictly lower than 1/2, so both sides are 0. As and are relatively prime, divides p and divides p , so that ω = kπ + s .

Whenever θ i is positive, k is even and we can take ω = s/ , and when k is odd we choose ω = π + s/ . We now come back to (4.23), and write

λ i = θ i (1 + z)
with |z| ≤ ν. Taking the modulus on both sides we find |λ i | = |θ i ||1 + z| 1 and we use the

inequality ||1 + z| 1 -1| ≤ 2|z|/ (valid for |z| ≤ 1/2) to find ||λ i | -|θ i || ≤ 2σ 0 |θ i | .
We can now prove the lemma: whether θ is positive or negative, a case analysis yields

|λ i -θ i | ≤ ||λ i | -|θ i || + |θ i | e is/ -1 ≤ 2σ 0 |θ i | + |θ i | |s| ≤ 4σ 0 |θ i | ,
the desired bound. Now, assuming that is odd, we have by the mean value theorem

|θ i -θ j | ≥ (|θ i | ∧ |θ j |) -1 |θ i -θ j | ≥ |θ r | |θ i -θ j |,
so that condition (4.22) implies the separation condition (4.17) applied to A . We can then apply the same proof as in Theorem 28 and get

ξ - u i u i ≤ 3σ 0 |θ r | δ i -σ 0 ,
which is equivalent to the theorem bound.

Proof of Theorem 22

We prove in this section the main result on the spectral properties of B. We shall use the same notations as in Theorem 22; since the statement of the theorem is invariant upon multiplying the entries of W by a common constant, we shall assume in the rest of the paper that µ 1 = 1.

Our candidates for the singular vectors of B are the vectors (u 1 , . . . , u r 0 ) and (v 1 , . . . , v r 0 ), where for i ∈ [r 0 ]

u i = B χ i µ i and v i = (B * ) D W χi µ +1 i ,
with associated eigenvalue µ i . We let U (resp. V ) be the n × r matrix whose columns are the u i (resp v i ), and D = diag(µ 1 , . . . , µ r 0 ). Finally, we'll need an approximation of the Gram matrix of the vectors u (and v); we define for every t ≥ 0 the covariance matrices

Γ (t) U and Γ (t) V such that for i, j ∈ [r 0 ], Γ ( ) U,ij = s=0 P 1, K s ϕ i,j
(µ i µ j ) s and Γ ( )

V,ij = s=0 K1, K s ϕ i,j (µ i µ j ) s+1 , (4.24)
where ϕ i,j = ϕ i • ϕ j .

Structure of the matrices U and V

Following from the subsequent local analysis of G, as well as a trace bound argument, we gather the following relations between matrices B , D and U . We define the following parameter

ω = d 5 (1 ∨ L) 2 ,
which is an upper bound on the exponential scaling of our error terms.

Theorem 30. Let r, d, b, τ, L be parameters as above, such that a ≤ n 1/4 , and (P, W ) be any matrices in C(r, d, b, τ, L). Let be any integer such that

≤ 1 - 4 log(n) log(ω) , (4.25)
for some > 0, where ω is the parameter defined above. Then there exists an event with probability at least 1c/ log(n) and a parameter N 0 ≤ a 12 L 6 such that if n ≥ N 0

U * U -Γ ( ) U ≤ C × η, (4.26)
V * V -Γ ( ) V ≤ C × η, (4.27)
U * V -I r 0 ∞ ≤ C × η, (4.28) B U -U D ≤ C ( √ ρ ∨ L) , (4.29)
B P H ⊥ ≤ C ( √ ρ ∨ L) , (4.30)
where η, C and C satisfy

C ≤ crd 4 b 2 L, C ≤ cr 2 d 6 b 2 L 2 log (n) 20 and η ≤ n -1/4 ∧ √ ρ ∧ L .
Furthermore, on this same event, we have the following bound:

B ≤ c log(n)n 1/4 L . (4.31)
The proof of this theorem will occupy the next few pages of this article; we first show how it implies the statement of Theorem 22.

Proof of the perturbation bounds

The goal here is to apply Theorem 29 to B , U and V : we choose equal to the upper bound in (4.25) (with arbitrary , say 0.01) and = + 1, and let

S = U D V * and S = U D V * ,
where U , V are defined identically to U and V replacing by . We now check all the conditions of Theorem 29:

Condition (i) Since = + 1, and are relatively prime.

Condition (ii)

We shall need a small lemma on the spectral properties of the covariance matrices, which will be proven in a subsequent section: Lemma 29. For all t ≥ 1; the matrix

Γ (t) U (resp. Γ (t)
V ) is a positive definite matrix, with all its eigenvalues greater than 1 (resp. c -1 0 ) and such that

1 ≤ Γ (t) U ≤ r 2 d 3 L 2 1 -τ and c -1 0 ≤ Γ (t) V ≤ r 2 d 2 L 2 1 -τ .
Then, the minimum eigenvalue of

V * V is at least c -1 0 -Cn -1/4 , which is more than c -1 0 /2 as soon as n ≥ c 1 r 4 a 4 d 16 b 8 L 4 ,
and we can take β = 2c 0 whenever this holds. On the other hand,

V * V ≤ rd 2 L 2 1 -τ + rb 2 d 4 L n 1/4 ≤ 2rb 2 d 4 L 2 1 -τ .
Performing the same computations on U * U leads us to the choice

α = 2rb 2 d 4 L 2 1 -τ .
Finally, equation (4.28) allows us to take δ = Cη.

Condition (iii)

This condition requires some additional computations. Define as before the orthogonal projection P H on H = im(V ), and P H ⊥ = I n -P H ; we have the formula

P H = V (V * V ) -1 V * .
Noticing that SP H = S, we can bound B -S as follows:

B -S ≤ B P H -SP H + SP H ⊥ + B P H ⊥ ≤ B P H -S + B P H ⊥ ≤ B V (V * V ) -1 -U D V * + B P H ⊥ .
To apply (4.29), we let

U = P H U + P H ⊥ U = V (V * V ) -1 + Ũ + P H ⊥ U .
The second term is equal to V (V * V ) -1 (V * U -I r 0 ), and be can thus use (4.28):

Ũ ≤ V (V * V ) -1 V * U -I r 0 ≤ r √ αβδ.
Going back to the above inequality, we find

B -S ≤ B U -U D + B Ũ + B P H ⊥ U + B P H ⊥ ,
and the bounds in Theorem 30 readily imply that all terms in the above inequality are bounded above by ε := C ( √ ρ ∨ L) , with

C ≤ c 3 r 3 ad 8 b 3 L 3 log (n) 20 1 -τ .
Condition (iv) Using all the bounds proven in the above computations, we find that

σ 0 ≤ C 0 ( √ ρ ∨ L) with C 0 ≤ c 4 a 2 r 11 d 25 b 13 L 12 log (n) 20
(1τ ) 6 .

The bound we have to check is therefore

C 0 ( √ ρ ∨ L) ≤ |µ r 0 | ⇐⇒ C 0 τ ≤ ,
which happens as soon as

log(n) ≥ 5 log(C 0 ) log(ω) log(τ -1
) .

The same proof holds for , with the same constants.

Having checked all assumptions of Theorem 29, we can now apply it to B ; this implies the existence of a permutation π ∈ S r 0 (possibly depending on n) such that for i ∈ [r 0 ],

λ i -µ π(i) ≤ σ := C 0 τ ,
and all the other eigenvalues of B satisfy

|λ| ≤ C 1 0 ( √ ρ ∨ L).
Now, assume that for some i ∈ [r 0 ], δ i ≥ 2σ. Then, applying the last part of Theorem 29, there exists an eigenvector of B associated with λ i such that

ξ - u i u i ≤ 3σ δ i -σ .
We define in the following

γ i = P 1, I n -µ -2 i K -1 ϕ i,i .
If we rewrite the definition of

Γ (t)
U,ii as

Γ (t) U,ii = P 1, t s=0 (µ i ) -2s K s ϕ i,j ,
the matrix sum converges as t → ∞ since ρ(K) < µ 2 i , and using Lemma 30 below we have

Γ ( ) U,ii -γ i = ∞ t= +1 µ -2t i P 1, K t ϕ i,j ≤ ∞ t= +1 rd 3 L 2 ρ t µ -2t i ≤ σ,
and combined with (4.26) yields

u i 2 -γ i ≤ 2σ.
On the other hand, we shall prove the following inequality in the following sections (equation (4.58)): for all t ≤ 2 , B t χ i , χ iµ t i P 1, ϕ i,i ≤ σµ t i . Setting t = 0 and t = in this inequality yields at the same time

χ i 2 -P 1, ϕ i,i ≤ σ and u i , χ i -P 1, ϕ i,i ≤ σ.
We now have, using the Cauchy-Schwarz inequality,

ξ, ξ i - P 1, ϕ i,i γ i ≤ ξ - u i u i + u i u i , χ i χ i - P 1, ϕ i,i γ i ≤ 3σ δ i -σ + c 5 σ ≤ c 6 σ δ i -σ .
Finally, notice that

γ i = P 1, ϕ i,i + P 1, ∞ s=1 (µ i ) -2s K s ϕ i,j ≤ P 1, ϕ i,i + rd 2 L 2 ρ/µ 2 i 1 -ρ/µ 2 i .
Using that rd 2 L 2 ≥ 1 and P 1, ϕ i,i ≥ 1, we find

P 1, ϕ i,i γ i ≥ 1 -rd 2 L 2 ρ µ 2 i .

Preliminary computations

We begin the proof of Theorem 30 with some elementary computations on the entries of K and Γ (t) , which will be of use in the later parts of the proof. Most of the results from this section are adapted from [START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF], although sometimes improved and adapted to our setting.

Bounding ρ and L from below We begin with a simple bound on ρ = ρ(K); by the Courant-Fisher theorem, ρ ≥ w, Kw for every unit vector w, and applying it to

w = 1/ √ n yields ρ ≥ w, Kw n = 1 n i,j∈[n] P ij E W 2 ij = 1 d i,j∈[n] P 2 ij E[W ij ] 2 = Q 2 F d ,
where we used that P ij ≤ d/n and the Jensen inequality. The Frobenius norm of Q is then greater than µ 2 1 = 1, which in turns implies

ρ ≥ 1 d , (4.32)
so that ρ is bounded away from zero. In order to prove a similar bound on L, we write for

x ∈ [n] ϕ 1 (x) = y∈[n] Q xy ϕ 1 (y) ≤ y Q 2 xy ≤ dL √ n .
Squaring and summing those inequalities over x gives

1 = ϕ 1 2 ≤ d 2 L 2 , so that as with ρ, L ≥ 1 d . ( 4

.33)

A scalar product lemma Our second step is an important lemma for the following proof, leveraging the entrywise bounds on W :

Lemma 30. Let ϕ, ϕ ∈ R n be any unit vectors. Then, for any t ≥ 0,

1, K t ϕ • ϕ ≤ rd 2 L 2 ρ t
Proof. We write the eigendecomposition of K as

K = s k=1 ν k ψ k ψ * k ,
with ν 1 = ρ the Perron-Frobenius eigenvalue of K and s ≤ r 2 its rank. Then, for all i ∈ [n],

s k=1 ν 2 k ψ k (i) 2 = (K 2 ) ii = j∈[n] K 2 ij = j∈[n] P 2 ij E W 2 ij 2 ≤ j∈[n] d n 2 L 4 ≤ d 2 L 4 n .
This is akin to a delocalization property on the eigenvectors of K.

We can now prove the above lemma:

1, K t ϕ • ϕ = s k=1 ν t k 1, ψ k ψ k , ϕ • ϕ ≤ ρ t-1 s k=1 ψ k 1 • |ν k | ψ k , ϕ • ϕ ≤ ρ t-1 √ n i∈[n] |ϕ(i)||ϕ (i)| s k=1 |ν k ||ψ k (i)| ≤ ρ t d √ n i∈[n] |ϕ(i)||ϕ (i)| √ s s k=1 ν 2 k ψ k (i) 2 ≤ ρ t a √ n √ s dL 2 √ n i |ϕ(i)||ϕ (i)| ≤ rd 2 L 2 ρ t ,
where we extensively used the Cauchy-Schwarz inequality, as well as the bound ρ -1 ≤ d from (4.32).

Entrywise bounds for K t For a more precise estimation of entrywise bounds, we define the scale-invariant delocalization parameter

Ψ = dL 2 ρ .
Using the same proof technique as in (4.33), as well as (4.32), we have

1 ≤ Ψ ≤ d 2 L 2
for any i, j ∈ [n]. Recall that, as shown in the proof of Lemma 30, for all i ∈ [n]

(K 2 ) ii ≤ d 2 L 4 n = Ψ 2 n ρ 2 .
Now, for t ≥ 0 and i, j ∈ [n],

(K t ) ij = k∈[s] ν t k ψ k (i)ψ k (j) ≤ ρ t-2 k ν 2 k |ψ k (i)| |ψ k (j)| ≤ ρ t-2 (K 2 ) ii (K 2 ) jj ,
where we again used the Cauchy-Schwarz inequality at the last line. This yields

(K t ) ij ≤ Ψ 2 n ρ t (4.34)
for any t ≥ 1 and i, j ∈ [n].

The covariance matrices Recall that we defined the matrices

Γ (t) U and Γ (t) V as Γ ( ) U,ij = s=0 P 1, K s ϕ i,j (µ i µ j ) s and Γ ( ) V,ij = s=0 K1, K s ϕ i,j (µ i µ j ) s+1
for i, j ∈ [r 0 ]. Our aim is to prove the following lemma:

Lemma 31. For all t ≥ 1; the matrix

Γ (t) U (resp. Γ (t)
V ) is a positive definite matrix, with all its eigenvalues greater than 1 (resp. c -1 ) and such that

1 ≤ Γ (t) U ≤ r 2 d 3 L 2 1 -τ and c -1 ≤ Γ (t) V ≤ r 2 d 2 L 2 1 -τ .
Proof. We first prove the bounds for Γ (t)

V . Let C (s) be the r 0 × r 0 matrix with

C (s) ij = K1, K s ϕ i,j (µ i µ j ) s+1 .
Then for every w ∈ R r 0 we have

w * C (s) w = i,j∈[r 0 ] w i w j (µ i µ j ) s+1 x∈[n] [K s+1 1](x)ϕ i (x)ϕ j (x) = x∈[n] [K s+1 1](x)   i∈[r 0 ] w i ϕ i (x) µ s+1/2 i   2 ≥ 0,
hence every matrix C (s) is positive semi-definite. Further, we have

C (0) = D -1 Φ * diag(K1)ΦD -1 ,
where Φ is the n × r matrix whose columns are the ϕ i . Using µ i ≤ 1 for any i ∈ [r 0 ], the eigenvalues of C (0) are all greater than min x [K1](x) ≥ c -1 by our initial assumptions. This settles the positive definite property, as well as the minimum eigenvalue of Γ (t)

V . Now, applying Lemma 30 to ϕ i and ϕ j , for all i, j ∈ [r 0 ] one has

Γ (t) V,ij ≤ t t=0 rd 2 L 2 ρ s+1 (µ i µ j ) s+1 ≤ rd 2 L 2 ∞ s=0 ρ µ i µ j s .
By definition of τ , the summand above is less than τ s , whose sum converges since τ < 1. As a result,

Γ (t) V ∞ ≤ rd 2 L 2 1 -τ ,
and the classic bound

Γ (t) V ≤ r 0 Γ (t)
V ∞ implies the upper bound. The proof for Γ (t) U is very similar; the upper bound simply ensues from the fact that d x ≤ d for any x ∈ [n]. For the lower bound, if we let as above

C (s) ij = P 1, K s ϕ i,j (µ i µ j ) s , then C (0) = Φ * diag(P 1)Φ,
and the minimum of P 1 is at least 1. This implies that the eigenvalues of C (0) are larger than one, and we conclude as before.

Local study of G

It is a well-known fact (see for example [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]) that when the mean degree is low enough (d = n o(1) ), the graph G is locally tree-like -that is, vertex neighbourhoods behave almost like random trees. The goal of this section is to establish rigorously this result, as well as provide bounds on neighbourhood sizes.

Setting and definitions

Labeled rooted graphs A labeled rooted graph is a triplet g * = (g, o, ι) consisting of a graph g = (V, E), a root o ∈ V , and a mark function ι : V → N with finite support. We shall denote by G * the set of labeled rooted graphs with V = N, and will often write g * = (g, o) for an element of G * , dropping the mark function. Notions of subgraphs, induced subgraphs and distance extend naturally from regular graphs to this setting.

Labeling trees and graphs

We recall that G is the inhomogeneous random graph defined earlier. For each vertex x ∈ V , we can define the associated element of G * as follows: the root is set to x, each vertex y ∈ [n] is given a mark ι(y) = y, and we let ι(z

) = 0 for all z ∈ N \ [n]. The resulting triple (G, x, ι) is a random element of G * . Now, let o ∈ [n]
; we define the inhomogeneous random tree as follows: first, the root is given a mark ι(o) = o. Then, for each vertex x already labeled, we draw the number of children of x according to Poi(d ι(x) ), where we recall that

d ι(x) = j P ι(x),j ≤ d.
Each child y of x receives a label drawn independently at random from the distribution

π ι(x) = P ι(x),1 d ι(x) , . . . , P ι(x),n d ι(x) , (4.35)
which sums to 1 by definition. The resulting tree is a random element of G * , denoted by (T, o). Lemma 32. Let v be an arbitrary vertex in G; then, there exist absolute constants c 0 , c 1 > 0 such that for every s > 0, we have

Growth properties of trees and graphs

P ∀t ≥ 1, |∂(G, v) t | ≤ sd t ≥ 1 -c 0 e -c 1 s . (4.36)
The same result holds when replacing (G, v) with the tree (T, o) defined above.

Taking s = c -1 1 log(c 0 n 2 ) in the above inequality, one gets

P ∀t ≥ 1, ∀v ∈ V, |∂(G, v) t | ≤ c 3 log(n)d t ≥ 1 - 1 n , (4.37)
for any n ≥ 3. Summing these inequalities for 1 ≤ t ≤ yields a similar bound for the whole ball: with probability at least 1 -1 n , we have

|(G, v) t | ≤ c 4 log(n)d t (4.38)
for all v ∈ V and t ≥ 1. In particular, this implies the following useful bound: for any v ∈ V ,

deg(v) ≤ c 4 d log(n).
Another consequence of (4.36) is the following useful lemma:

Lemma 33. For every p ≥ 2, there is a constant c p such that

E max v∈V sup t≥1 |∂(G, v) t | d t p ≤ c p log (n) p (4.39)
Similarly to the proof of (4.38), we have

max v∈V |(G, v) t | p ≤ d tp t p max x∈V sup s≤t |∂(G, v) t | p d sp ,
which yields

E max v∈V |(G, v) t | p ≤ c p t p log (n) p d tp (4.40)
An important note is that the above results apply to any collection of n random variables satisfying an inequality like (4.36); in particular, it also applies to an i.i.d collection of inhomogeneous random trees of size n.

Local tree-like structure

We first check that the random graph G is tree-like. We say that a graph g is -tangle-free if there is at most one cycle in the -neighbourhood of every vertex in the graph. As mentioned before, the random graph G is dominated by an Erdős-Rényi graph G(n, d/n); we can therefore lift the desired properties from [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF].

Lemma 34. Let ≤ n be any integer parameter.

(i) the random graph G is -tangle-free with probability at least 1ca 2 d 4 /n (ii) the probability that a given vertex v has a cycle in its -neighbourhood is at most cad 2 /n. We shall assume in the following that the 2 -tangle-free property happens with probability at least 1cn -for some > 0, which happens whenever

≤ 1 - 10 log d (n) ≤ c 3 log(n). ( 4

.41)

We now gather all the result of the current section into one proposition, for ease of reading. The bound ≤ c log(n) assumed above is used to simplify the inequalities below.

Proposition 13. Let G be an inhomogeneous random graph, and (T x , x) x∈[n] a family of random trees as defined above. Let be small enough so that (4.41) holds. Then there exists an event E with probability at least 1 -1 log(n) , under which:

(i) the graph G is 2 -tangle-free, (ii) for all v ∈ G, t ≤ 2 , we have |(G, x) t | ≤ c log(n)d t , (4.42)
(iii) for any t ≤ 2 , the number of vertices in G whose t-neighbourhood contains a cycle is at most c log (n

) 2 d t+1
Furthermore, for any t ≤ 2 and p ≥ 1, we have

E max v∈V |(G, v) t | p 1 p ≤ c log (n) 2 d t , (4.43)
and the same holds for the family (T x , x) x∈[n] .

Coupling between rooted graphs and trees

We now turn onto the main argument of this proof: we bound the variation distance between the neighbourhoods of (G, x) and (T, x) up to size . First, recall some definitions: if P 1 , P 2 are two probability measures on the space (Ω, F), their total variation distance is defined as

d TV (P 1 , P 2 ) = sup A∈F |P 1 (A) -P 2 (A)|.
The following two characterizations of the total variation distance shall be useful: first, whenever Ω is countable, we have

d TV (P 1 , P 2 ) = 1 2 P 1 -P 2 1 = 1 2 ω∈Ω |P 1 (ω) -P 2 (ω)|. (4.44)
Additionally,

d TV (P 1 , P 2 ) = min P∈π(X 1 ,X 2 ) P(X 1 = X 2 ), (4.45)
where π(X 1 , X 2 ) denotes the set of all couplings between P 1 and P 2 , i.e. probability measures on (Ω 2 , F ⊗ F) such that the marginal distributions are P 1 and P 2 .

Denoting by L(X) the probability distribution of a variable X, the aim of this section is to prove the following:

Proposition 14. Let ≤ c 0 log(n) for some constant c 0 > 0. Then, for every vertex v ∈ V , d TV (L((G, v) ), L((T, v) )) ≤ c log (n) 2 d 2 +2 n . (4.46)
A total variation distance lemma for sampling processes

For an integer n, denote by S(n) the set of all multisets with elements in [n], and by P(n) ⊂ S(n) the powerset of [n]. Let p 1 , . . . , p n ∈ [0, 1/2], with p i = λ and p 2 i = α, and consider the two probability laws on S(n):

• P 1 : each element i of [n] is picked with probability p i ,

• P 2 : the size of the multiset S is drawn according to a Poi(λ) distribution, and each element of S has an i.i.d label with distribution (p 1 /λ, . . . , p n /λ).

Note that P 1 is actually supported on P(n).

Proposition 15. Let P 1 , P 2 be defined as above. Then

d TV (P 1 , P 2 ) ≤ α + e 2α -1 2 .
Proof. Using characterization (4.44), we have

2 d TV (P 1 , P 2 ) = S∈P(n) |P 1 (S) -P 2 (S)| + P 2 (S / ∈ P(n)). (4.47)
We shall treat those two terms separately. First, notice that for S ∈ P(n), we have

P 1 (S) = i∈S p i i / ∈S (1 -p i ) (4.48)
P 2 (S) = e -λ λ |S| |S|! × |S|! i∈S p i λ = e -λ i∈S p i , (4.49)
and thus by summing over all sets S,

P 2 (S ∈ P(n)) = e -λ n i=1 (1 + p i ).
Using the classical inequality log(1 + x) ≥ xx 2 /2, we can bound the second member of (4.47) as follows:

P 2 (S / ∈ P(n)) = 1 -e -λ n i=1 (1 + p i ) ≤ 1 -e -λ e λ-α/2 ≤ α/2.
On the other hand, using again (4.48) and (4.49), the first term reduces to

S∈P(n) |P 1 (S) -P 2 (S)| = S∈P(n) i∈S p i i / ∈S (1 -p i ) -e -λ ≤ S∈P(n) i∈S p i e -λ - n i=1 (1 -p i ) + i / ∈S (1 -p i ) - n i=1 (1 -p i ) .
Both absolute values above can be removed since the expressions inside are nonnegative; further, for 0 ≤ p ≤ 1/2, we have log(1x) ≥ -xx 2 . Combining all those estimates, we find

S∈P(n) |P 1 (S) -P 2 (S)| ≤ e -λ (1 -e -α ) S∈P(n) i∈S p i + n i=1 (1 -p i ) S∈P(n) i∈S p i i∈S 1 1 -p i -1 ≤ αe -λ n i=1 (1 + p i ) + e -λ n i=1 1 + p i 1 -p i - n i=1 (1 + p i ) ≤ α + e -λ exp n i=1 p i 1 -p i -e -α 2 ,
where we again used the logarithm inequalities extensively. Finally, for 0 ≤ p ≤ 1/2, we have p/(1p) ≤ p + 2p 2 , which allows us to finish the computation:

S∈P(n) |P 1 (S) -P 2 (S)| ≤ 3 2 α + e 2α -1. (4.50)
Combining (4.50) with (4.47) easily implies the lemma.

We introduce now a family of probability laws on S(n); for a subset S ⊆ [n], let P S be the measure corresponding to picking each element i of S with probability p i .

The variation distance between those laws and P 1 = P [n] is then easier to bound: Lemma 35. For any S ⊆ [n], we have:

d TV (P 1 , P S ) ≤ i / ∈S p i .
Proof. Consider the following coupling: we take a realization X of P 1 , and set Y = X ∩S. Then, Y ∼ P S , and we find

P(X = Y ) = P 1 (X ∩ S c = ∅) ≤ E[|X ∩ S c |] = i / ∈S p i
This ends the proof, since (4.45) ensures that d TV (P 1 , P S ) ≤ P(X = Y ).

Proof of Proposition 14

Gathering all the previous results, we are now ready to prove Proposition 14:

Proof. Define the classical breadth-first exploration process on the neighbourhood of a vertex v as follows : start with A 0 = {v} and at stage t ≥ 0, if A t is not empty, take a vertex v t ∈ A t at minimal distance from v, reveal its neighbours N t in V \ A t , and update

A t+1 = (A t ∪ N t ) \ {v t }.
We denote by (F t ) t≥0 the filtration generated by the (A t ) t≥0 , and by D t = s≤t A s the set of vertices already visited at time t, and τ the first time at which all vertices in (G, v) have been revealed. We perform the same exploration process in parallel on (T, v), which corresponds to a breadth-first search of the tree. At step t, we denote by P t the distribution of N t given F t , and Q t the distribution of the offspring of v t in T (no conditioning is needed there).

Let E denote the event that (G, v) is a tree and contains no more than c 1 log(n)d vertices; from (4.38) and Lemma 34, we can choose c 1 such that E has probability at least 1c 2 d 2 +1 /n for some absolute constant c 2 . By iteration, it suffices to show that if E holds, there exists a constant c 3 > 0 such that

d TV (P t , Q t ) ≤ c 3 log(n)d +2 n for all t ≤ τ. (4.51)
Given F t , the probability measure P t is as follows: each element i of V \ A t is selected with probability p i = P vti . Let P t denote the same probability measure, but where the selection is made over all of V . Using Lemma 35, we first find that

d TV (P t , P t ) ≤ i∈At P vti ≤ c 1 log(n)d • d n .
On the other hand, Proposition 15 yields

d TV (P t , Q t ) ≤ c 4 n i=1 P 2 vti ≤ c 5 d 2 n .
Equation (4.51) then results from a straightforward application of the triangle inequality.

Near eigenvectors of G

Functionals on (T, o)

Vertex functionals on trees

Similarly to [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF], quantities of interest in the study of B will be tied to functionals on the random inhomogeneous tree defined above. Define a functional f ϕ,t on the set of labeled rooted trees

T * ⊂ G * by f ϕ,t (T, o) = xt∈∂(T,o) t W ι(o),ι(x 1 ) . . . W ι(x t-1 ),ι(xt) ϕ(ι(x t )),
where (o, x 1 , . . . , x t ) is the unique path of length t between o and x t . Then the following proposition holds:

Proposition 16. Let t ≥ 0 be an integer. For any i, j ∈ [r], the following identities are true:

E[f ϕ i ,t (T, x)] = µ t i ϕ i (x), (4.52)
E f ϕ i ,t (T, x)f ϕ j ,t (T, x) = (µ i µ j ) t t s=0 [K s ϕ i,j ](x) (µ i µ j ) s , (4.53)
E (f ϕ i ,t+1 (T, x) -µ i f ϕ i ,t (T, x)) 2 = [K t+1 ϕ i,i ](x). (4.54)
where we recall that ϕ i,j = ϕ i ϕ j .

Adapting functionals to non-backtracking paths

The matrix B considered here acts on (directed) edges, whereas the functionals considered so far are defined on vertices. Consequently, we define the following transformation: for a function f : G * → R, and a random vector w ∈ R V with expected value w, let

∂ w f (g, o) = e:e 2 =o w e 1 f (g e , o),
where g e denotes the graph g with the edge e 1 , e 2 removed. The expectations from Proposition 16 are then adapted as follows:

Proposition 17. Let t ≥ 0 be an integer. For any i, j ∈ [r], and φ ∈ ker(P ), the following identities are true:

E ∂ w f ϕ i ,t (T x , x) = [P w](x) • E[f ϕ i ,t (T x , x)], (4.55)
E ∂ w (f ϕ i ,t • f ϕ j ,t )(T x , x) = [P w](x) • E f ϕ i ,t (T x , x)f ϕ j ,t (T x , x) , (4.56)
E ∂ w [(f ϕ i ,t+1 -µ i f ϕ i ,t ) 2 ](T x , x) = [P w](x) • E (f ϕ i ,t+1 (T x , x) -µ i f ϕ i ,t (T x , x)) 2 . ( 4.57)
The proof for those results makes use of properties specific to moments of Poisson random variables; as with the preceding results, it is deferred to a later section.

Spatial averaging of graph functionals

In this section, we leverage the coupling obtained above to provide bounds on quantities of the form 1 n x∈V f (G, x), for local functions f . The tools and results used in this section are essentially identical to those in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF], with a few improvements and clarifications added when necessary.

We begin with a result that encodes the fact that the t-neighbourhoods in G are approximately independent. We say that a function

f from G * to R is t-local if f (g, o) is only function of (g, o) t . Proposition 18. Let t ≤ c 0 log(n) for some constant c 0 > 0. Let f, ψ : G * → R be two t-local functions such that |f (g, o)| ≤ ψ(g, o)
for all (g, o) ∈ G * and ψ is non decreasing by the addition of edges. Then

Var o∈V f (G, o) ≤ c log (n) 4 nd 2t • E max o∈V ψ(G, o) 4 .
Proof. For x ∈ V , denote by E x the set {{u, x} ∈ E | u ≤ x}; the vector (E 1 , . . . , E n ) is an independent vector, and we have

Y := v∈V f (G, v) = F (E 1 , . . . , E n ).
for some measurable function F . Define now G x the graph with vertex set V and edge set y =x E y , and set

Y x = v∈V f (G x , v).
The random variable Y x is y =x E y -measurable, so the Efron-Stein inequality applies:

Var(Y ) ≤ x∈[n] E (Y -Y x ) 2 . For a given x ∈ V , the difference f (G, o) -f (G x , o) is always zero except if x ∈ (G, o) t , due to the locality property; consequently, |Y -Y x | ≤ o∈V |f (G, o) -f (G x , o)| ≤ o∈(G,x) t ψ(G, o) + ψ(G x , o) ≤ 2 max x∈[n] |(G, x) t | • max o∈V ψ(G, o),
where we used the non-decreasing property of ψ in the last line. By the Cauchy-Schwarz inequality and equation (4.40), we can write

E (Y -Y x ) 2 ≤ 4 E max x∈[n] (G, x) t 4 • E max o∈V ψ(G, o) 4 ≤ c 1 t 2 log (n) 2 d 2t • E max o∈V ψ(G, o) 4 .
Using that t ≤ c 0 log(n), and the linearity of expectation, yields the desired bound.

We now use our previous coupling results to provide a concentration bound between a functional on graphs and its expectation on trees: Proposition 19. Let t ∈ N and f, ψ : G * → R be as in the previous proposition. Then, with probability at least 1 -1 r 2 log (n) 2 , the following inequality holds:

v∈V f (G, v) -E   x∈[n] f (T x , x)   ≤ c r log (n) 3 d t+1 √ n ψ ,
where ψ is defined as

ψ = E max v∈V ψ(G, v) 4 1 4 ∨ max x∈[n] E ψ(T x , x) 2 1 2
.

Proof. Using the Chebyshev inequality and the variance bound from the preceding proposition, we have with probability at least 1 -

1 r 2 log (n) 2 v∈V f (G, v) -E v∈V f (G, v) ≤ c 1 r log (n) 3 d t √ n ψ .
It then remains to bound the difference between the expectation term and its counterpart on trees. For x ∈ V , let E x denote the event that the coupling bewteen (G, x) t and (T x , x) t fails; by the locality property, f (G, x) = f (T x , x) on E x . Therefore, using the Cauchy-Schwarz inequality,

x∈[n] E[f (G, x) -f (T x , x)] ≤ x∈[n] E[|f (G, x)|1 Ex + |f (T x , x)|1 Ex ] ≤ x∈[n] P(E x ) E ψ(G, x) 2 + E ψ(T x , x) 2 ≤ c 2 log (n) 2 d 2t+2 n • x∈[n] E ψ(G, x) 4 1 4 + E ψ(T x , x) 2 ≤ c 3 log(n)ad t+1 √ n ψ .
It is then straightforward to check that both obtained bounds are less than the RHS in the proposition, upon adjusting c.

Structure of near eigenvectors

In the following, the aim is to obtain bounds on the norms and scalar product of the near eigenvectors defined previously. Recall that for i ∈ [r], we set u i and v i as

u i = B χ i µ i and v i = (B * ) D W χi µ +1 i .
The main result of this section is as follows:

Proposition 20. Let be small enough so that (4.41) holds. On an event with probability 1c 1 / log(n), the following inequalities hold for all i, j ∈ [r], t ≤ 2 and some absolute constant c > 0:

B t χ i , χ j -µ t i ϕ i , D P ϕ j ≤ c rb 2 d 2 log (n) 6 d 2t L t √ n , (4.58)
B t χ i , D W χj -µ t+1 i δ ij ≤ c rb 2 d 3 L log (n) 6 d 2t L t √ n , (4.59)
B t χ i , B t χ j -µ t i µ t j Γ (t) U,ij ≤ c rb 2 d 2 log (n) 7 d 3t L 2t √ n , (4.60)
(B * ) t D W χi , (B * ) t D W χj -µ t+1 i µ t+1 j Γ (t+1) ij ≤ c rb 2 d 2 L 2 log (n) 6 d 3t L 2t √ n , (4.61)
B t+1 χ i -µ i B t χ i 2 ≤ rd 3 L 2 ρ t+1 + crb 2 d 3 log (n) 7 d 3t L 2t √ n . (4.62)
Proof. The proof of those inequalities relies on careful applications of Proposition 19 to previously considered functionals. We aim to prove that each of those inequalities hold with probability 1c 2 /r log(n); we fix in the following an integer t ≤ 2 and i, j ∈ [r]. Let V t be the set of vertices such that (G, v) t is not a tree; we place ourselves in the event described in Proposition 13 and as a consequence

V t ≤ c 3 log (n) 2 d t+1 .
We first prove (4.58); let

f (g, o) = 1 (g,o) t has no cycles ϕ j (o) ∂ 1 f ϕ i ,t (g, o).
The function f is clearly t-local, and

|f (g, o)| ≤ ϕ i ∞ ϕ j ∞ deg(o) |∂(g, o) t | L t ≤ b 2 n deg(o) |(g, o) t | L t := ψ(g, o).
The function ψ thus defined is non-decreasing by the addition of edges. When v / ∈ V t , we notice that

f (G, v) = ϕ j (v) • [T * B t χ i ](v), hence, B t χ i , χ j - v∈V f (G, v) = v∈Vt ϕ i (v)T * B t χ j ≤ 2|V t | max v ψ(G, v),
since by the tangle-free property there are at most two paths from v to any vertex in (G, v) t . Furthermore, using the results in Subsection 4.7.2, we find that with probability at least

1 -1/n max v ψ(G, v) ≤ c 4 b 2 log (n) 2 d t+1 L t n and ψ ≤ c 4 b 2 log (n) 3 d t+1 L t n .
Finally, a direct computation shows that

x∈[x] E[f (T x , x)] = x∈[n] ϕ j (x) • d x µ t i ϕ i (x) = µ t i ϕ j , D P ϕ i .
Applying Proposition 19 to f and ψ, and using the triangle inequality:

B t χ i , χ j -µ t i ϕ j , D P ϕ i ≤ c 5 b 2 log (n) 4 d 2t+2 L t n + c 6 rb 2 log (n) 6 d 2t+2 L t √ n ≤ c 7 rb 2 d 2 log (n) 6 d 2t L t √ n .
The proof of the other inequalities is very similar, applying Proposition 19 to other functionals from Subsection 4.8.1. To avoid clutter, it is deferred to the appendix.

Proof of Theorem 30

Having shown Proposition 20, all that remains is simply to gather the preceding bounds, and simplify them to get an easy-to-read summary. Bounds (4.26)-(4.28), as well as (4.31), being straightforward computations, they are deferred to the appendix.

A telescopic trick: proof of (4.29)

Notice that for for a r 0 × r 0 matrix M , we have

M ≤ r 0 max i M i . (4.63)
where M i are the columns (or lines) of M . To apply this inequality, we write

B u i -µ i u i ≤ -1 t=0 µ -t-1 i B t+1 u i -µ i B t u i , (4.64)
and (4.62) yields

B t+1 u i -µ i B t u i 2 ≤ µ -2 i B t+ +1 χ i -µ i B t+ χ i 2 ≤ µ -2 i rd 3 L 2 ρ t+ +1 + crb 2 d 3 log (n) 7 d 3(t+ ) L 2(t+ ) √ n .
Since i ≤ r 0 , the bounds µ 2 i ≥ ρ ≥ 1/d apply, so that

B t+1 u i -µ i B t u i 2 ≤ rd 3 L 2 ρ t+ +1 µ -2 i + crb 2 d 3 log (n) 7 d 3t+5 L 2(t+ ) √ n . (4.65)
We now use the (very crude) inequality √ x + y ≤ √ x + √ y inside (4.65):

B u i -µ i u i ≤ -1 t=0 µ -t-1 i √ rd 3/2 Lρ t+ +1 2 µ - i + c 1 bd 3/2 log (n) 7/2 d 3t+5 2 L t+ n 1/4 ≤ √ rd 3/2 Lρ /2 -1 t=0 √ ρ µ i t+1 + c 2 bd 2 log (n) 9/2 (Ld 4 ) n 1/4 L .
The terms in the sum are all less than 1 since i ≤ r 0 , and < c 3 log(n) implies

B u i -µ i u i ≤ c 3 √ rd 3/2 L log(n)ρ /2 + c 2 bd 2 log (n) 9/2 (aLd 3 ) n 1/4 L .
The bound (Ld 4 ) ≤ n 1/4 holds by definition of , and (4.29) ensues via (4.63).

Bounding B P H ⊥

Having established the candidates and error bounds for the upper eigenvalues of B , it remains to bound the remaining eigenvalues (also called the bulk ) of the matrix. This is done using a method first employed in [START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF], and leveraged again in a similar setting in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF][START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF]. Our approach will be based on the latter two, adapting the non-backtracking method to the weighted case.

Our first preliminary step is the following lemma:

Lemma 36. On an event with probability at least 1 -1/ log(n), for any t ≤ , any unit vector w ∈ H ⊥ and i ∈ [r 0 ], one has

(B * ) t D W χi , w ≤ √ rd 3/2 L 2 ρ t/2 + c 4 bd 3/2 log (n) 9/2 d 2 L n 1/4 .
Proving this bound is done through the same telescopic sum trick as above, and is done in the appendix.

Tangle-free decomposition of B

We adapt here the decomposition first used in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF] to our setting. Through the remainder of this section, we shall consider B as an operator on E(V ) instead of E, setting B ef = 0 whenever e / ∈ E or f / ∈ E. This yields a matrix with B as a principal submatrix and zeros everywhere else, thus the non-zero spectrum stays identical.

For e, f ∈ E(V ), and t ≥ 0, we define Γ k ef the set of non-backtracking paths of length k from e to f ; further, for an edge e we define X e the indicator variable of e ∈ E, and A e = X e W e , so that A is the (weighted) adjacency matrix of G.

We then have that

(B k ) ef = γ∈Γ k+1 ef X e k s=1
A γsγ s+1 .

Define F k ef the set of -tangle-free paths (i.e. the set of paths γ such that the subgraph induced by γ is tangle-free). Then, whenever the graph G is tangle-free, for all k ≤ the matrix B k is equal to B (k) , with

(B (k) ) ef = γ∈F k+1 ef X e k s=1 A γsγ s+1 .
Define now the "centered" versions of the weighted and unweighted adjacency matrices A and X by

A ij = A ij -Q ij and X ij = X ij -P ij
for every i = j, and its centered non-backtracking counterpart as

(δ (k) ) ef = γ∈F k+1 ef X ij k s=1 A γsγ s+1 ,
with the convention that the product over an empty set is equal to 1.

Recall that for any two sets of real numbers (x i ), (y i ), we have the following:

s=0 x s = s=0 y s + t=0 t-1 s=0 y s (x t -y t ) s=t+1 x s .
Applying this formula to the above definitions, and separating the case t = 0 in the sum yields

B ( ) ef = δ ( ) ef + γ∈F +1 ef Q e s=1 A γsγ s+1 + t=1 γ∈F +1 ef X e t-1 s=1 A γsγ s+1 Q γtγ t+1 s=t+1 A γsγ s+1 . (4.66)
Define now F +1 t,ef ⊂ Γ +1 ef the set of non-backtracking tangled paths γ such that (γ 0 , . . . γ t ) ∈ F t eg , (γ t+1 , . . . , γ +1 ) ∈ F -t g f for some edges g, g ∈ E(V ). As an edge case, F +1 0,ef is the set of tangled paths γ such that (γ 0 , γ 1 ) = e 1 and (γ 1 , . . . , γ +1 ) ∈ F g f for some g ∈ E(V ) (note that necessarily e 2 = g 1 ), and similarly for F ,ef . Finally, we introduce the two matrices M and M (2) as

M ef = 1{e → f }Q e and M (2) ef = 1(e 2 - → f )Q e 2 f 1 for e, f ∈ E(V )
, where e 2 -→ f means that there exists a non-backtracking path of length two between e and f . Then, equation (4.66) can be rewritten as

B ( ) = δ ( ) + M D W B ( -1) + -1 t=1 δ (t-1) M (2) D W B ( -t-1) + δ ( -1) M - t=0 R ( ) t , (4.67)
where (R

( ) t ) ef = γ∈F +1 t,ef X e t-1 s=1 A γsγ s+1 Q γtγ t+1 s=t+1 A γsγ s+1 (R ( ) 0 ) ef = γ∈F +1 t,ef Q e s=1 A γsγ s+1 .
Note that M (2) is pretty close to a modified version of Q; more specifically, we make the decomposition

M (2) = T QT * + M = r k=1 µ k χ k χ * k + M .
Then, the following decomposition holds:

B ( ) = δ ( ) + M D W B ( -1) + -1 t=1 r k=1 µ k δ (t-1) χ k χ * k D W B ( -t-1) + -1 t=1 δ (t-1) M B ( -t-1) + δ ( -1) M - t=0 R ( ) t .
Noticing that M ≤ d and χ k ≤ d log(n), the following lemma ensues:

Lemma 37. On an event with probability at least 1 -1/ log(n), the following inequality holds for any normed vector x ∈ R E(V ) :

B x ≤ δ ( ) + L M B -1 + d log(n) -1 t=1 δ (t-1) r k=1 D W χk , B -t-1 x + -1 t=1 δ (t-1) M B -t-1 + d δ ( -1) - t=0 R ( ) t
.

Norm bounds

It then remains to bound the different quantities in the lemma above; this is done in another section, using a trace bound method. The results are as follows:

Proposition 21. On an event with probability 1-c 0 / log(n), for any k ≤ c 1 log(n), the following bounds hold with probability at least 1 -1/ ln (n) 2 :

δ (k-1) ≤ cd 3 log (n) 17 ( √ ρ ∨ L) k , (4.68)
M B k-1 ≤ cd 7/2 L log (n) 7 d k L k √ n , (4.69)
δ (t-1) M B k-t-1 ≤ cd 13/2 L log (n) 24 d k √ ρ ∨ L k √ n , (4.70)
R (k) t ≤ cd 2 log (n) 22 d k L k n . (4.71)
Using these bounds, we are now finally able to prove (4.30):

Proof. By definition of , d ≤ n 1/4 so most of the summands in Lemma 37 are negligible with respect to the others. More precisely, we have

B x ≤ c 1 δ + d log(n) -1 t=1 δ (t-1) r k=1 D W χk , B -t-1 x . (4.72)
When k ∈ [r 0 ], Lemma 36 implies that

D W χk , B -t-1 x ≤ √ rd 3/2 L 2 ρ t/2 + c 4 bd 3/2 log (n) 9/2 d 2 L n 1/4 ,
and by definition of , d 2 L ≤ 1 ∧ √ ρ so the second term is bounded above by the first. On the other hand, for k ∈ [r] \ [r 0 ], we can use equation (4.61) as follows:

(B * ) t D W χi 2 ≤ µ 2t+2 i Γ (t+1) V,ii + c rb 2 d 4 L 2 log (n) 6 d 3t L 2t √ n .
We now apply Lemma 30:

Γ (t+1) V,ii ≤ t+1 s=0 rd 2 L 2 ρ s µ 2s i ≤ crd 2 log(n)L 2 ρ t+1 µ -2t-2 i ,
since µ 2 i < ρ; the second term being negligible before the first,

D W χk , B -t-1 x ≤ (B * ) -t-1 D W χi ≤ crd log(n)Lρ -t 2 .
We can now apply the above bounds on the scalar product as well as those of Proposition 21 to equation (4.72), and we get

B x ≤ c 2 d 5/2 L log (n) 17 ( √ ρ ∨ L) + c 3 r 2 d 6 L 2 log (n) 20 ( √ ρ ∨ L) + c 4 d 4 log (n) 17 ( √ ρ ∨ L) ≤ cr 2 d 6 L 2 log (n) 20 ( √ ρ ∨ L) ,
which ends the proof of (4.30).

Trace method: proof of Proposition 21

The aim of this section is to prove the bounds in Proposition 21; we leverage here the powerful trace method introduced by Füredi and Komlòs [START_REF] Füredi | The eigenvalues of random symmetric matrices[END_REF], and already used with success in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF] and [START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF]. We only prove (4.68) in this section, all other bounds being proven in the appendix.

Let m be a parameter to be fixed later. We start with the classical bound

δ (k-1) 2m = δ (k-1) δ (k-1) * m = (δ (k-1) δ (k-1) * ) m ≤ Tr((δ (k-1) δ (k-1) * ) m ).
Expanding the trace above gives

δ (k-1) 2m ≤ (e 1 ,...,e 2m ) m i=1 (δ (k-1) ) e 2i-1 ,e 2i (δ (k-1) ) e 2i+1 ,e 2i = γ∈W k,m 2m i=1 X γ i,0 γ i,1 k s=2 A γ i,s-1 γ i,s , (4.73)
where W k,m is the set of sequences of paths (γ 1 , . . . , γ 2m ) such that γ i = (γ i,0 , . . . , γ i,k ) is nonbacktracking tangle-free of length k, and with boundary conditions that for all i ∈ [m],

(γ 2i,k-1 , γ 2i,k ) = (γ 2i-1,k-1 , γ 2i-1,k ) and (γ 2i+1,0 , γ 2i+1,1 ) = (γ 2i,0 , γ 2i,1 ), (4.74)
with the convention γ 2m+1 = γ 1 . All the random variables in the expression above are centered and independent as soon as they are supported by distinct edges, so the expectation of each term in the sum is zero except when each (unoriented) edge is visited at least twice. We let W k,m be the set of all such sequences of paths. To γ ∈ W k,m , we associate the graph G γ = (V γ , E γ ) of visited vertices and edges, and let

v γ = |V γ | and e γ = |E γ |.
For an unoriented edge e ∈ E γ , we define its multiplicity m e as the number of times e is visited in γ; we also let S γ be the set of starting edges in γ, that is

S γ = {(γ i,0 , γ i,1 ) | i ∈ [2m]}.
Using these definitions, we can bound the expectation as follows:

E δ (k-1) 2m ≤ γ∈W k,m e∈Sγ E |X e | • |A e | me-1 e / ∈Sγ E[|A e | me ].
We now bound the two terms in the products above: let e be an edge, and p ≥ 2 be any multiplicity. Then conditioning on X e ,

E[|A e | me ] = P e E[|W e -P e E[W e ]| p ] + (1 -P e )P p e E[W e ] p ≤ P e L p-2 1 + d n p-2 E (W e -P e E[W e ]) 2 + dL n p-2 dP e n E[W e ] 2 ≤ P e L p-2 1 + d n p-2 E W 2 e + P e L p-2 E W 2 e d n p-2 ≤ K e L p-2 1 + d n p .
The other product is trickier; whenever p ≥ 3, a similar computation yields

E |X e | • |A e | p-1 ≤ K e L p-3 1 + d n p .
On the other hand if p = 2,

E[|X e | • |A e |] ≤ d n L 1 + d n 2 .
As a consequence, for γ ∈ W k,m , we define S γ ⊆ S γ the set of starting edges with multiplicity 2. Then

E δ (k-1) 2m ≤ γ∈W k,m 1 + d n 2km d n |S γ | d 2m L 2km-2eγ e / ∈S γ K e ,
where we used L -1 ≤ d and S γ = 2m.

We now partition the paths in W k,m as follows: we say that γ ∼ γ if there exists a permutation σ ∈ S n such that γ i,t = σ(γ i,t ) for all i, t ∈

[2m] × [k].
Clearly, all parameters such as v γ , e γ and |S γ | are constant on any equivalence class; therefore it makes sense to define W k,m (v, e) the set of equivalence classes of W (k, m) such that v γ = v and e γ = e. Then, a path counting argument performed in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF] yields the following estimation:

Lemma 38. Let v, e be integers such that e -v + 1 ≥ 0. Then W k,m (v, e) ≤ k 2m (2km) 6m(e-v+1) . (4.75)
All that remains to bound the sum above is to control the contribution of a single equivalence class; this is done through this lemma:

Lemma 39. Let γ ∈ W k,m such that v γ = v, e γ = e and |S γ | = s. We have γ ∼γ f / ∈S γ K f ≤ d 2m n v-e+s ρ e (Ψ 2 ) 3(e-v)+8m . (4.76)
Proof. For a sequence of paths γ ∈ W k,m , denote by E γ the set E γ \ S γ .Then, due to the boundary conditions in (4.74), the graph G γ induced by E γ is connected. We let v j (resp. v ≥j ) be the number of vertices with degree j (resp. at least j) in G γ . Again, by (4.74), removing an edge in S γ does not create a vertex of degree 1; therefore we have

v 1 ≤ 4m,
since a vertex of G γ can only be of degree 1 if it is an endpoint of γ i for some i ∈ [2m].

Additionally, edge and vertex counting yields

v 1 + v 2 + v ≥3 ≥ v -s and v 1 + 2v 2 + 3v ≥3 ≤ 2(e -s),
since removing an edge in S γ removes at most one vertex from G γ . Combining those inequalities gives

v ≥3 + v 1 ≤ 2(e -s) -2(v -s) + 2v 1 ≤ 2(e -v) + 8m; (4.77)
this inequality encodes the fact that in a union of paths most vertices are of degree 2. We now reduce G γ into a multigraph Ĝγ = ( Vγ , Êγ ) as follows: Vγ is the set of vertices in G γ with degree different from 2, and we add an edge between two vertices x 1 and x 2 of Vγ for each path between x 1 and x 2 in G γ . For f ∈ Êγ , we annotate f with the length q f of its corresponding path in G γ .

We let v and ê be the number of vertices and edges of Ĝγ ; a sequence γ ∼ γ is uniquely determined by an embedding of Vγ in [n] and for each edge f ∈ Êγ , an embedding of f as a path of length q f . As a result, we have

γ ∼γ f / ∈S γ Q f ≤ y 1 ,...,y v ∈[n] v f =(y i ,y j )∈ Êγ x 1 ,...,x q f -1 ∈[n] q f t=1 K x t-1 ,xt = y 1 ,...,y v ∈[n] v f =(y i ,y j )∈ Êγ (K q f ) y i ,y j ≤ y 1 ,...,y v ∈[n] v f ∈ Êγ Ψ 2 n ρ q f , using (4.34
) and recalling that Ψ = L 2 /ρ. Now, notice that

f ∈ Êγ q f = |E γ | = e -s and ê -v = |E γ | -|V γ | ≥ e -v -s; further ê ≤ v + e -v -s ≤ 3(e -v
) + 8ms using (4.77) and the inequality above. We finally find

γ ∼γ f / ∈S γ Q f ≤ n v-ê (Ψ 2 ) êρ e-s
≤ n v-e+s ρ e-s (Ψ 2 )

3(e-v)+8m-s , which ends the proof of Lemma 39, since Ψ 2 ≥ 1 and ρ -1 ≤ a.

We now are able to conclude; the contribution of one equivalence class in W k,m (v, e) is less than

C γ = 1 + d n 2km d n |S γ | d 2m L 2km-2e γ ∼γ e / ∈S γ K e ≤ c 2m 1 d 6m n -|S γ | L 2km-2e n v-e+|S γ | ρ e (Ψ 2 )
3(e-v)+8m

≤ c 2m 1 d 6m n v-e (ρΨ) km-e ρ e (Ψ 2 )

3(e-v)+8m ≤ c 2m 1 d 6m ρ km Ψ d km-e n 1-g (Ψ 2 ) 3g+8m ,
with g = ev + 1 and we used that L = ρΨ/d and the bound

1 + d n k ≤ exp dk n ≤ c 1 .
Summing over all equivalence classes now gives

E δ (k-1) 2m ≤ km e=1 e+1 v=1 |W k,m (v, e)| max [γ]∈W k,m (v,e) C γ ≤ km e=1 e+1 v=1 k 2m (2km) 6m(e-v+1) c 2m 1 d 6m ρ km Ψ d km-e n 1-g (Ψ 2 ) 3g+8m ≤ n(c 1 d 3 k) 2m ρ km km e=1 Ψ d km-e ∞ g=0 Ψ 6 (2km) 6m n g . (4.78)
We set the parameter m to m = log n Ψ 6 12 log(log(n)) ;

when n ≥ c 2 Ψ 6 for some absolute constant c 2 , we have

Ψ 6 (2km) 6m n < 1 2
and n 1 2m ≤ log (n) 12 .

The infinite sum inside (4.78) thus converges, and

E δ (k-1) 2m 1 2m ≤ c 3 d 3 log (n) 14 √ ρ k 1 ∨ Ψ d k .
Finally, from the definition of Ψ, Rearranging the terms, we find an expression for x e :

√ ρ 1 ∨ Ψ/d = √ ρ ∨ L,
x e = λy

i, j ∈ [n] λ 2 y i -λW ij y j λ 2 -W 2 ij = k∼i k =j W ik λy k -W ik y i λ 2 -W 2 ik ,
and we rearrange to find

λ 2 y i λ 2 -W 2 ij - W 2 ij y i λ 2 -W ij 2 = k∼i λW ik λ 2 -W 2 ik y k - k∼i W 2 ik λ 2 -W 2 ik y i .
The fraction on the LHS cancels out, and writing the RHS as a matrix product y = Ã(λ)y -D(λ)y, the desired result.

Proof of Theorem 23

Our first step is to show that the matrices involved in Proposition 11 approximate the matrices A and ρI. If λ 2 ≥ 2L 2 , we have

λ Ãij (λ) -A ij = 1{i ∼ j} W ij 1 - W 2 ij λ 2 -W ij ≤ 1(i ∼ j) 2LW 2 ij λ 2 ,
which implies using the Gershgorin circle theorem

λ Ãij (λ) -A ij ≤ 2L λ 2 max i j∼i W 2 ij ≤ 4Lρ λ 2 . (4.81)
Similarly,

λ 2 Dii (λ) -ρ ≤ 2L 2 λ 2 j∼i W 2 ij + j∼i W 2 ij -ρ ≤ 4L 2 λ 2 + ε • ρ. (4.82)
We now take λ = λ i with i ∈ [r 0 ]; then there is a vector y that is a singular value of

-λ i δ(λ i ) = A -(λ i + ρ λ i )I + (λ Ã(λ i ) -A) -λ -1 i (λ 2 D(λ) -ρI).
We can thus apply Weyl's inequality [START_REF] Weyl | Das asymptotische verteilungsgesetz der eigenwerte linearer partieller differentialgleichungen (mit einer anwendung auf die theorie der hohlraumstrahlung)[END_REF] to find that there exists an eigenvalue ν i of A such that

ν i -λ i + ρ λ i ≤ 4Lρ λ 2 i + 4L 2 λ 2 i + ε • ρ λ i .
Now, we use Theorem 22 to find that |λ iµ i | ≤ σ, and we have σ = o(ρ) whenever n is large enough by virtue of (4.32). Since

|λ i -µ i | ≤ σ and ρ λ i - ρ µ i ≤ ρ λ i µ i σ ≤ c 0 σ, equation (4.
9) ensues by noticing that λ i > c 1 µ i for some constant c 1 and σ is negligible before the other error terms.

Assume now that δ i ≥ 2σ; examining the proof of Theorem 22, we have the existence of an eigenvector ξ of B associated with λ i such that

ξ -u i ≤ 3σ u i δ i -σ .
Proposition 11 implies that the vector y = S * D W ξ is a null vector of the deformed laplacian δ(λ) = I -Ã(λ) + D(λ). Notice that the matrix S * D 2 W S is a diagonal matrix such that

[S * D 2 W S] ii = j∼i W 2 ij ≤ 2ρ,
from which we have

y -S * D W u i ≤ 6σ √ ρ u i δ i -σ .
We now follow the line of proof of Theorem 22; we first find

S * D W u i , ϕ i = µ - i B χ i , D W χi ,
and combine it with (4.59) to obtain

| S * D W u i , ϕ i -µ i | ≤ σ. (4.83)
Computing S * D W u i is trickier; we find

S * D W u i , S * D W u i = µ -2 i S * D W B χ i , S * D W B χ i = µ -2 i S * D W B χ i , T * JD W B χ i = µ -2 i T S * D W B χ i , (B * ) D W χi .
Writing the coefficients of T S * D W explicitly, we have

[T S * D W ] ef = W f i∈[n] 1{e 2 = i}1{f 1 = i} = B ef + [JD W ] ef ,
which yields

S * D W u i , S * D W u i = µ -2 i B 2 +1 χ i , D W χi + B D W χi , B D W χi .
Those scalar products correspond to equations (4.59) and (4.61), respectively, and we thus get

S * D W u i 2 -µ 2 i (1 + Γ ( ) V,ii ) ≤ 2σ.
The hypothesis K1 = ρ1 allows us to approximate Γ ( )

V,ii efficiently:

Γ ( ) V,ii = t=0 1, K t+1 ϕ i,i µ 2t+2 i = t=0 ρ µ 2 i t+1
since ϕ i = 1, and we have as in the proof of Theorem 22

Γ ( ) V,ii - ρ/µ 2 i 1 -ρ/µ 2 i ≤ σ.
Gathering the previous bounds, we eventually arrive at

S * D W u i 2 - µ 2 i 1 -ρ/µ 2 i ≤ 3σ. (4.84)
The exact same computations imply that

u i 2 ≤ d 1 -ρ/µ 2 i + c 5 σ,

and thus noticing that

µ i ≥ √ ρ y y - S * D W u i S * D W u i ≤ c 6 σ √ d δ i -σ .
Combining this error bound with (4.83) and (4.84), we find the following result:

y y , ϕ i -1 - ρ µ 2 i ≤ c 7 σ √ d δ i -σ .
The final step is to use the Davis-Kahan theorem [START_REF] Yu | A useful variant of the Davis-Kahan theorem for statisticians[END_REF] as follows: there exists an eigenvector ζ of A with associated eigenvalue ν i , and such that

ζ - y y ≤ c 8 4Lρ λ 2 i + 4L 2 λ 2 i + ε • ρ λ i δ i .
This error term dominates all the other ones found above, hence the bound in Theorem 23.

The proof of Corollary 5 follows along the same lines; however, we have directly

Ã(λ) = λA λ 2 -1 and D(λ) = d 0 λ 2 -1 I,
and thus the approximation bounds (4.81) and (4.82) become superfluous.

Proof of Theorem 24

We first link the SBM setting to the one of Theorem 22. In the unweighted case, we have Q = K = P , and the eigenvector equation P 1 = α1 yields ρ = α. It is easy to check that whenever n is large enough, the r 0 defined in Theorem 24 satisfies the assumptions of Theorem 22, with τ = 1/(αµ 2 r 0 ) < 1. Equation (4.11) ensures that ϕ i ∞ ≤ c/ √ n for some absolute constant c > 0, therefore b = O(1). Finally, since τ -1 = αµ r 0 , we have 25 and n 0 ≤ exp(c log(d) log(log(n))).

C 0 ≤ cα log (n)
An application of Theorem 22 thus directly yields the bound on the eigenvalues of B; regarding the eigenvectors, notice that as in the proof of Theorem 23

u i 2 = α 1 -1/(αµ 2 i ) + O(σ) and T ϕ i = α + O(σ), which gives ξ, ξ i = 1 - 1 αµ 2 i + O(σ).

Proof of Theorem 25 and Proposition 12

Letting again Θ be the n × 2 group membership matrix, we find as in the proof of Theorem 24 that we have Q = Θ QΘ * and K = Θ KΘ * , with

Q = 1 2 aE P [w] bE Q [w] bE Q [w] aE P [w] and K = 1 2 aE P [w 2 ] bE Q [w 2 ] bE Q [w 2 ] aE P [w 2 ] .
This implies first that

ρ = aE P [w 2 ] + bE Q [w 2 ] 2 ,
and that the vector Θ 1 -1 is an eigenvector of Q associated with the eigenvalue

µ 2 = aE P [w] -bE Q [w] 2 .
All other hypotheses of Theorem 22 are easy to check, and we find that the announced results hold as soon as µ 2 2 > ρ ∨ L, or

(aE P [w 2 ] + bE Q [w 2 ]) ∨ L (aE P [w] -bE Q [w]) 2 < 1.
Now, let us disregard for a moment the condition on L, and compute ρ:

ρ = 1 2 L (af ( ) + bg( ))w( ) 2 dm( )
Define a scalar product on ∞ (L), the set of all bounded functions from L to R, as

h 1 , h 2 L = L (af ( ) + bg( ))h 1 ( )h 2 ( ) dm( );
then ρ = w 2 L , and applying the Cauchy-Schwarz theorem

ρ • af -bg af + bg 2 L ≥ w, af -bg af + bg 2 L = µ 2 2 .
This implies that the signal-to-noise ratio µ 2 2 /ρ is maximized whenever

w( ) = af ( ) -bg( ) af ( ) + bg( ) ,
and in this case

β = µ 2 2 ρ = 1 2 L (af ( ) -bg( )) 2 af ( ) + bg( ) dm( )
In particular, we have µ 2 = ρ = β, so β > 1 implies µ 2 > 1. It remains to notice that w( ) ≤ 1 for any , so the condition µ 2 ≥ L is redundant as assumed.

Proof of Theorem 26

For i, j ∈ [n], we note W ij = m ij +s ij Z ij with Z ∼ N (0, 1) a standard gaussian random variable. Let L = 2 log(n); a well known tail bound for gaussians reads

P(|Z ij | ≥ L) ≤ 2 L e -L/2 ≤ 1 n 2 log(n) . (4.85)
We now define the modified matrix W with

Wij = m ij + s ij Z ij 1{|Z ij | ≤ L},
with Q and K the associated expected and variance matrices. It is readily seen that Q = Q, and that the variables Wij are bounded by

L = sup i,j |m ij | + L sup i,j s ij .
By a union bound, we have

P( W = W ) = P(Z ij > L for some i ∈ [n]) ≤ n 2 1 n 2 log(n) ≤ 1 2 log(n) ,
and whenever W = W , then the modified non-backtracking matrix coincides with the original one. Finally, notice that for i, j

∈ [n] Var(Z ij 1{|Z ij | ≤ L}) ≤ 1,
which implies using the Perron-Frobenius theorem that ρ( K) ≤ ρ(K). Theorem 22 then applies to the modified couple (P, W ) and the announced result follows.

Computing functionals on trees

We prove in this section the martingale estimates of Proposition 16 and Proposition 17.

Study of compound Poisson processes

Many proofs in this section rely on computations of Poisson compound processes, i.e. Poisson sums of random variables. For convenience, we gather them all in the following lemma:

Lemma 40. Let N be a Poi(d) random variable, and (X i ), (Y i ), (Z i ) three iid sequences of random variables, independent from N , such that X i and Y j (resp. Y i and Z j , or Z i and X j ) are independent whenever i = j. Denote by A, B the random variables

A = N i=1 X i and B = N i=1 Y i ,
Then the following identities hold:

E[A] = dE[X], E[B] = dE[Y ], (4.86
)

E[AB] = dE[XY ] + d 2 E[X]E[Y ] = dE[XY ] + E[A]E[B], (4.87)
E   N i=1 Z i   j =i X j     = dE[A]E[Z], (4.88)
E   N i=1 Z i   j =i X j     k =i Y k     = dE[AB]E[Z]. (4.89)
Although the first two identities are well-known, we provide a full proof of this lemma:

Proof. The sequence (X i ) being independent from N , we immediately find that

E[A | N ] = N E[X],
from which eq. (4.86) is derived. We then write

AB = N i=1 X i N i=1 Y i = N i=1 X i Y i + i =j X i Y j ,
and using the independence property of (X i ) i and (Y i ) i yields

E[AB | N ] = N E[XY ] + N (N -1)E[X]E[Y ].
Since N is a Poisson random variable, E[N (N -1)] = d 2 , hence (4.87).

We now move onto the third equation; rearranging terms gives

N i=1 Z i   j =i X j   = i =j Z i X j ,
and therefore the conditional expectation given

N is N (N -1)E[X]E[Z]. Using again that E[N (N -1)] = d 2 brings (4.88).
Similarly, we can rearrange

N i=1 Z i   j =i X j     k =i Y k   = j =i X j Y j Z i + i =j =k X i Y j Z j ,
and take conditional expectations on both sides to arrive at

E   N i=1 Z i   j =i X j     k =i Y k   N   = N (N -1)E[XY ]E[Z] + N (N -1)(N -2)E[X]E[Y ]E[Z].
Again, the expected value of N (N -1)(N -2) is d 3 , and we finally find

E   N i=1 Z i   j =i X j     k =i Y k     = d 2 E[XY ]E[Z] + d 3 E[X]E[Y ]E[Z] = dE[AB]E[Z],
which ends the proof.

Decomposing the tree functionals

We now fix t ≥ 1, x ∈ [n] and two vectors ϕ, ϕ ∈ R n for the rest of the section. Let N be the number of children of the root of T , and (T k , I k ) k≤N the subtrees at depth 1. We further introduce the following first moment notations:

g ϕ (t, x) = E[f ϕ,t (T x , x)] and h ϕ,ϕ (t, x) = E f ϕ,t (T x , x)f ϕ ,t (T x , x) .
We begin by a small elementary computation: let φ ∈ R n be any vector. Then,

E[W xI k φ(I k )] = y∈[n] P xy d x E[W xy ]φ(y) = [Qφ](x) d x . (4.90)
Now, by linearity, we have

f ϕ,t (T x , x) = N k=1 W xI k f ϕ,t-1 (T k , I k ). (4.91)
By definition of the Galton-Watson tree, the random variables

X k = W xI k f ϕ,t-1 (T k , I k ) and Y k = W xI k f ϕ ,t-1 (T k , I k )
satisfy the assumptions of Lemma 40. Furthermore, conditioning on the value of I k , we can compute EX k :

E[W xI k f ϕ,t-1 (T k , I k )] = E[W xI k g ϕ (t -1, I k )] = [Qg ϕ (t -1, •)](x) d x .
Applying (4.86), and from the definition of g ϕ , we come to the following recurrence relation:

g ϕ (t, x) = [Qg(t -1, •)](x).
Solving this recurrence is straightforward, and we find

g ϕ (t, •) = Q t g ϕ (0, •) = Q t ϕ,
which implies (4.52).

Using now equation (4.87) from Lemma 40, we derive

h ϕ,ϕ (t, x) = d x E W 2 xI k h ϕ,ϕ (t -1, I k ) + g ϕ (t, x)g ϕ (t, x) = [Kh ϕ,ϕ (t, •)](x) + g ϕ (t, x)g ϕ (t, x), (4.92)
from which we can solve for h ϕ,ϕ :

h ϕ,ϕ (t, •) = Kh ϕ,ϕ (t -1, •) + (Q t ϕ) (Q t ϕ ) = t s=0 K s [(Q t-s ϕ) (Q t-s ϕ )].
The eigenvector equations for ϕ i and ϕ j then imply (4.53).

Consider now the funtion F i,t (T x , x) = f ϕ i ,t+1 (T x , x)µ i f ϕ i ,t (T x , x), and its associated first moment functions

G(t, x) = E[F i,t (T x , x)] and H(t, x) = E F i,t (T x , x) 2 .
The linearity of f ϕ i ,t implies that F i,t also verifies equation (4.91), and therefore

G(t, •) = Q t G(0, •) = 0
for all t ≥ 0. Equation (4.92) thus reduces to

H(t, •) = K t H(0, •) = K t h ϕ i ,ϕ i (1, •) -µ 2 i ϕ i,i = K t µ 2 i ϕ i,i + Kϕ i,i -µ 2 i ϕ i,i = K t+1 ϕ i,i ,
which ends the proof.

Edge functionals

Most of the handiwork needed to prove Proposition 17 was done in Lemma 40; indeed, in the tree (T x , x), the edge transformation on f ϕ,t can be written as

∂ w f ϕ,t (T x , x) = N j=1 w I j k =j W xI k f ϕ,t-1 (T (k), I k ).
We define accordingly the random variables

X k = W xI k f ϕ,t-1 (T (k), I k ), Y k = W xI k f ϕ ,t-1 (T (k), I k ) and Z k = w I k ,
that verify the assumptions of Lemma 40. Computing E[Z] is straightforward:

E[Z] = y∈[n] P xy d x E[w y ] = [P w](x).
Hence, we can apply equation (4.88) to those variables, to deduce (4.55). Similarly, the product transformation has the form

∂ w (f ϕ,t • f ϕ ,t )(T x , x) = N j=1 w I j   k =j W xI k f ϕ,t-1 (T (k), I k )   ×   k =j W xI k f ϕ ,t-1 (T (k), I k )   ,
which using (4.89) implies (4.56). Finally, equation (4.57) is proved with the exact same technique, considering F i,t (T x , x) instead of f ϕ,t (T x , x).

Near eigenvectors: computations

We finish here the proof of Proposition 20. First, let

f (g, o) = 1 (g,o) t+1 has no cycles ϕ j (o)f ϕ,t+1 (g, o).
Then f is (t + 1)-local, and we have

|f (g, o)| ≤ ϕ i ∞ ϕ j ∞ ∂(g, o) t+1 L t+1 ≤ b 2 n |(g, o)| t+1 L t+1 := ψ(g, o).
On the other hand, the scalar product B t χ i , D W χj can be written as

B t χ i , D W χj = e∈ E W e ϕ j (e 1 ) γ t s=1 W γsγ s+1 ϕ i (γ t+1 ) = e∈ E ϕ j (e 1 ) γ t s=0 W γsγ s+1 ϕ i (γ t+1 ),
where the sum ranges over all non-backtracking paths γ = (γ 0 , . . . , γ t+1 ) such that (γ 0 , γ 1 ) = e. It follows that

B t χ i , D W χj - v∈V f (G, v) ≤ e:e 1 / ∈V t+1 [B t χ i ](e)[D W χj ](e) ≤ 2|V t+1 | max v ψ(G, v),
using the tangle-free property as before. This time, the results from Subsection 4.7.2 yield

max v ψ(G, v) ≤ c 1 b 2 log (n) 2 d t+1 L t+1 n and ψ ≤ c 1 b 2 log (n) 3 d t+1 L t+1 n ,
and the expected value on the tree is

x∈[n] E[f (T x , x)] = x ϕ j (x)µ t+1 i ϕ i (x) = µ t+1 i δ ij .
Concluding,

B t χ i , D W χj -µ t+1 i δ ij ≤ c 2 b 2 log (n) 4 d 2t+3 L t+1 n + c 3 rb 2 log (n) 6 d 2t+3 L t+1 √ n ≤ c 4 rb 2 d 3 L log (n) 6 d 2t L t √ n , which proves (4.59). Now, let f (g, o) = 1 (g,o) t has no cycles ∂ 1 [f ϕ i ,t • f ϕ j ,t ](g, o).
Again, f is t-local, and we have

|f (g, o)| ≤ ϕ i ∞ ϕ j ∞ deg(o) |∂(g, o) t | 2 L 2t ≤ b 2 n deg(o) |(g, o) t | 2 L 2t := ψ(g, o)
By definition of the ∂ operator, we have, for v ∈ V ,

f (g, v) = e:e 2 =v [B t χ i ](e)[B t χ j ](e).
Hence,

B t χ i , B t χ j - v∈V f (G, v) = e:e 2 / ∈Vt [B t χ i ](e)[B t χ j ](e) ≤ 2|V t | max v ψ(G, v),
using the tangle-free property as before. This time, the results from Subsection 4.7.2 yield

max v ψ(G, v) ≤ c 5 b 2 log (n) 3 d 2t+1 L 2t n and ψ ≤ c 5 b 2 log (n) 4 d 2t+1 L 2t n ,
and we can compute the expected value on the tree:

x∈[n] E[f (T x , x)] = x [P 1](x)µ t i µ t j t s=0 [K s ϕ i,j ](x) (µ i µ j ) s = (µ i µ j ) t t s=0 P 1, K s ϕ i,j (µ i µ j ) s = (µ i µ j ) t Γ (t) U,ij .
Gathering those estimates, we find

B t χ i , B t χ j -(µ i µ j ) t Γ (t) U,ij ≤ c 6 b 2 log (n) 5 d 3t+2 L 2t n + c 7 rb 2 log (n) 7 d 3t+2 L 2t √ n ≤ c 8 rb 2 d 2 log (n) 7 d 3t L 2t √ n ,
which proves (4.60).

Next is (4.61); we first notice that the parity-time equation (4.4) implies that

(B * ) t D W χi , (B * ) t D W χj = D W B t χ i , D W B t χ j .
Similarly to the previous computation, we therefore let w o = (W 2 1o , . . . , W 2 no ), and

f (g, o) = 1 (g,o) t has no cycles ∂ wo [f ϕ i ,t f ϕ j ,t ](g, o).
We have similarly

|f (g, o)| ≤ b 2 n |(g, o) t | 2 L 2t+2 := ψ(g, o), Now, max v ψ(G, v) ≤ c 9 b 2 log (n) 2 d 2t L 2t+2 n , ψ ≤ c 10 b 2 log (n) 3 d 2t L 2t+2 n ,
and as above

x∈[n] E[f (T x , x)] = x [P w x ](x)µ t i µ t j t s=0 [K s ϕ i,j ](x) (µ i µ j ) s = x [K1](x)µ t i µ t j t s=0 [K s ϕ i,j ](x) (µ i µ j ) s = Γ (t) V,ij .
Equation (4.61) is then derived as we did earlier.

Our final inequality to prove is (4.62); we consider now the function

F t (g, o) = 1 (g,o) t+1 has no cycles ∂ 1 [F 2 i,t ](g, o)
For all t ≥ 0, the function F t is t + 1-local, and

|F t (g, o)| ≤ deg(o) 2 ϕ i ∞ (g, o) t+1 2 L 2t ≤ 4 deg(o) b 2 n (g, o) t+1 2 L 2t := ψ t (g, o). Whenever v / ∈ V t , F t (G, v) = e:e 2 =v [B t+1 χ i ](v) -µ i [B t χ i ](v) 2
The same computations as in the other equations then imply that

B t+1 χ i -µ i B t χ i 2 - x∈[x] F t (G, v) ≤ 2|V t | max v ψ(G, v),
and

max v ψ(G, v) ≤ c 5 b 2 log (n) 3 d 2t+1 L 2t n and ψ ≤ c 5 b 2 log (n) 4 d 2t+1 L 2t n . Furthermore, x∈[n] E[F t (T x , x)] = x∈[n] [P 1](x)[K t+1 ϕ i,i ](x) = P 1, K t+1 ϕ i,i ,
and we can apply Lemma 30 to find

x∈[n] E[F t (T x , x)] ≤ rd 3 L 2 ρ t+1 .
Concluding as above,

B t+1 χ i -µ i B t χ i 2 ≤ rd 3 L 2 ρ t+1 + c 11 b 2 log (n) 5 d 3t+3 L 2t n + c 12 rb 2 log (n) 7 d 3t+3 L 2t √ n ≤ rd 3 L 2 ρ t+1 + c 13 rb 2 d 3 log (n) 7 d 3t L 2t √ n .
4.14 Proofs for Theorem 30 We shall make use of the following classical bound: for a r 0 × r 0 matrix M , we have

M ≤ r 0 M ∞ . (4.93)
First, the (i, j) entry of matrix U * U is u i , u j , and using (4.60) we find

| u i , u j -Γ ( ) U,ij | ≤ c rb 2 d 2 log (n) 7 d 3 L 2 (µ i µ j ) √ n .
Since i, j ≤ r 0 , we have µ i µ j ≥ ρ ≥ 1/d by definition of τ , and inequality (4.32). Plugging this inequality into the one above yields

| u i , u j -Γ ( ) ij | ≤ c rb 2 d 2 log (n) 7 (d 4 L 2 ) √ n .
By definition of ω and , the three following inequalities hold simultaneously:

(d 4 L 2 ) ≤ n 1/4 , (d 4 L) ≤ √ n and d 4 L 2 ρ ≤ (d 5 L 2 ) ≤ √ n.
Via (4.93), these imply, respectively, that

U * U -Γ ( ) U
is less than Cn -1/4 , CL and Cρ , the desired result. The derivation of (4.27) is identical, the bound from Proposition 20 being essentially the same for both cases.

We now move onto the proof of (4.28); we write the scalar product B χ i , (B * ) D W χj as B 2 χ i , D W χj and use (4.59) to find

| u i , v j -δ ij | ≤ c rb 2 d 3 L log (n) 6 d 4 L 2 µ 2 +1 i √ n ≤ c rb 2 d 7/2 L log (n) 6 d 5 L 2 √ n .
The bounds we now need are

(d 5 L 2 ) ≤ n 1/4 , (d 5 L) ≤ √ n and (d 6 L 2 ) ≤ √ n,
which are true by choice of ω and , and we conclude as above.

4.14.2 Bounding B : proof of (4.31)

Let w be any unit vector in R E , and assume that we are in the event described in Proposition 13. Then w(e t ) 2 .

B
by the Cauchy-Schwarz inequality. Under the good event from Proposition 13, we have

|P(e, t)| ≤ 2|(G, e) t | ≤ c 1 log(n)d .
Additionally, note that the factor w(e t ) 2 appears for each path of length t ending at e t , or equivalently (reversing edge orientation) for each path in P(e -1 t , t). Hence,

B t w 2 ≤ c 1 log(n)d L 2 e∈ E w(e) 2 |P(e -1 , t)| ≤ c 2 log (n) 2 d 2 L 2 ,
and the definition of ensures (generously) that d 2 < √ n.

Proof of Lemma 36

Note first that for all t ≥ 0, the parity-time equation (4.4) allows the simplification

(B * ) t D W χ i , w = B t χ i , D W Jw .
and we have D W Jw ≤ L. Further, the assumption w ∈ H ⊥ implies

µ -t i (B * ) t D W χ i , w = µ -t i (B * ) t D W χ i , w -µ - i (B * ) D W χ i , w ;
combining the two above arguments and using a telescopic sum as in the proof of (4.29) gives

µ -t i (B * ) t D W χ i , w = -1 s=t µ -s i B s χ i , D W Jw -µ -(s+1) i B s+1 χ i , D W Jw ≤ -1 s=t µ -(s+1) i B s+1 χ i , D W Jw -µ i B s χ i , D W Jw ≤ L -1 s=t µ -(s+1) i B s+1 χ i -µ i B s χ i ,
where we used the Cauchy-Schwarz inequality at the last line. Now, we can apply equation (4.62):

B s+1 χ i -µ i B s χ i 2 ≤ rd 3 L 2 ρ s+1 + crb 2 d 3 log (n) 7 d 3s L 2s √ n ,
and still following the proof of (4.29) we find

B s+1 χ i -µ i B s χ i ≤ √ rd 3/2 Lρ s+1 2 + c 2 bd 3/2 log (n) 7/2 d 3s/2 L s n 1/4 .
Summing these inequalities (and using ≤ c 3 log(n)) yields

(B * ) t D W χi , w ≤ √ rd 3/2 L 2 µ t i -1 s=t √ ρ µ i s+1 + µ - i c 4 bd 3/2 log (n) 9/2 d 3 /2 L n 1/4 .
Since i ≤ r 0 , we have µ i > √ ρ. As a result, all terms in the sum are bounded by the one for s = t -1, and µ - i ≤ d /2 . We finally get Since M is of order 1, we notice that (4.69) improves by a factor of √ n on the crude bound

(B * ) t D W χi , w ≤ √ rd 3/2 L 2 ρ t/2 + c 4 bd 3/2 log (n)
KB k ≤ K B k .
We use the same trace method as above; we have

M B k-2 2m ≤ Tr M B k-2 (B * ) k-2 M * m ≤ d n 2m γ∈W k,m m i=1 X γ 2i-1,1 γ 2i-1,2 k s=3 A γ 2i-1,s-1 γ 2i-1,s × k-2 s=1 A γ 2i,s-1 γ 2i,s X γ 2i,k-2 γ 2i,k-1
where W k,m is the set of sequences of paths defined just below equation (4.73). The set of edges of the form (γ 2i-1,0 , γ 2i-1,1 ) or (γ 2i,k-1 , γ 2i,k ), which support no random variable, has cardinality at most m by the boundary conditions, hence the bound for any γ ∈ W k,m :

m i=1 X γ 2i-1,1 γ 2i-1,2 k s=3 A γ 2i-1,s-1 γ 2i-1,s k-2 s=1 A γ 2i,s-1 γ 2i,s X γ 2i,k-2 γ 2i,k-1 ≤ d n eγ -m L 2(k-2)m .
Using bound (4.75) on W k,m (v, e) and the fact that each equivalence class contains at most n v elements, we get

M B k-2 2m ≤ d n m 2km e=1 e+1 v=1 k 2m (2km) 6m(e-v+1) n v d n e L 2(k-2)m ≤ n -m d 5m L 2km k 2m 2km e=1 e+1 v=1 (2km) 6m(e-v+1) d e n v-e ≤ n -m+1 d 5m L 2km k 2m (2km)d 2km ∞ g=0 (2km) 6m n g . (4.94)
The choice of parameter

m = log(n) 12 log(log(n))
ensures that the infinite sum in (4.94) converges for n larger than an absolute constant, which yields (4.69).

Bound

(4.70) on ∆ (t-1) M B k-t-1 First, notice that M (2)
ef is equal to (T QT * ) ef except when 1{e 2 -→ f } = 0, which happens only when e = f , e → f , e → f -1 of f -1 → e. Therefore, we can write

|L ef | ≤ d n ( M1 + M2 + M3 + M4 ),
where each entry of the matrix M i is one whenever the i-th condition mentioned above is true. Then, for each i we can write

δ (t-1) Mi B k-t-1 ≤ δ (t-1) Mi B k-t-1 ,
and a straightforward adaptation of the proof of bound (4.69) gives

d n Mi B k-t-1 ≤ cd 7/2 L ln (n) 7 d k-t L k-t √ n .
Combining the above bound with (4.68) easily implies (4.70).

Bound (4.71) on R ( ) t

The proof of (4.71) is very similar to those above, as well as the one in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]; we only highlight the main differences. Let t ≥ 1 (the case t = 0 is almost identical), and k ≤ log(n). The same trace argument gives

R (k-1) t 2m ≤ Tr R (k-1) t R (k-1) * t m = γ∈T k,m,t 2m i=1 X γ i,0 γ i,1 t s=2 A γ i,s-1 γ i,s Q γ i,t ,γ i,t+1 k s=t+2 A γ i,s-1 γ i,s ,
where T k,m,t is the set of sequences of paths (γ 1 , . . . , γ 2m ) such that for all i, γ 1 i = (γ i,0 , . . . , γ i,t ) and γ 2 i = (γ i,t+1 , . . . , γ i,k ) are tangle-free and γ i is tangled, with similar boundary conditions as in (4.74).

We define G γ as the union of the G γ z i for z ∈ [2m], j ∈ {1, 2}. Since we remove an edge to each path, G γ need not be connected; however, since γ i is tangled, each connected component in G γ i contains a cycle, and the same holds for G. It follows that v γ ≤ e γ for all γ ∈ T k,m,t . As before, we define the equivalence relation ∼ and T k,m,t (v, e) the set of equivalence classes with v γ = v and e γ = e. Then, the following lemma from [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF] holds: Lemma 41. Let v, e be any integers such that v ≤ e. Then |T k,m,t (v, e)| ≤ (4km) 12m(e-v+1)+8m .

As for bounding the contribution of a single path, the computations already performed in bounding (4.68) work similarly:

2m i=1 X γ i,0 γ i,1 t s=2 A γ i,s-1 γ i,s Q γ i,t ,γ i,t+1 k s=t+2 A γ i,s-1 γ i,s ≤ a n eγ +2m 1 + d n 2km d 2m L 2km , using Q ij ≤ dL/n for all i, j. Finally, for [γ] ∈ T k,m,t (v, e)
, there are at most n v sequences γ such that γ ∼ γ. This yields Chapter 5

E R (k-1) t 2m ≤ c 2m 1 d 2m L 2km d n 2m (4km) 20m 2km e=1 (4km) 12m(e-v)

Spectral clustering in directed networks

This chapter is based on the paper [START_REF] Coste | A simpler spectral approach for clustering in directed networks[END_REF], a joint work with S. Coste.

Introduction

The proverbial effectiveness of spectral clustering ("good, bad, and spectral", said [START_REF] Kannan | On clusterings: Good, bad and spectral[END_REF]), observed for long by practitioners, begins to be well-understood from a theoretical point of view. More and more problem-specific spectral algoritms are periodically designed, with better computational performance and accuracy. Most of the theoretical studies used to be concentrated on symmetric interactions and undirected networks, but over the last decade a flurry of works has tackled the directed case: the 2013 survey [START_REF] Fragkiskos | Clustering and community detection in directed networks: A survey[END_REF] gave an account of the richness of directed network clustering, but since then the field expanded in various directions.

In directed networks, the directionality of interactions is taken into account. This is more realistic from a modeling point of view, but at the cost of intricate technicalities in the analysis. In this context, the aim of this paper is to take a step back at spectral algorithms and convince the readers of a simple, yet largely unnoticed truth: when clustering directed networks, directly using eigenvalues and eigenvectors (as opposed to SVD) of the untouched adjacency matrix (as opposed to symmetrized and/or regularized versions), works very well, especially in harder and sparser regimes. This statement was hinted in some works, but remained essentially ignored and not backed by theoretical results. In this paper, our goal is to rigorously prove and illustrate this statement.

Spectral clustering of directed networks: overview and related work As well-summarized in [START_REF] Von | A tutorial on spectral clustering[END_REF], spectral algorithms often consist of three steps: (1) a matrix representation of the data, (2) a spectral truncation procedure, and (3) a geometric clustering method on the eigen/singular vectors.

The matrix representation depends on the nature of the data and interaction measurements. Early works were focused on symmetric interactions: the interaction A x,y between two nodes u, v was considered undirected, ie A x,y = A x,y . The matrix of interactions A is then hermitian. But in many applications, the interaction are intrinsically directional, with A x,y and A y,x not necessarily equal, or, equivalently, the network is directed. This covers a wider range of models: buyer/seller networks, ecologic systems with predator-prey interactions, citations in scientific papers, etc.

Forerunners in digraph clustering avoided using the interaction matrix A; one reason for that is the lack of an orthogonal decomposition for non-normal matrices. Instead, they represented their data with naive symmetrizations of A, such as A + A * or the so-called co-citation and bibliometric symmetrizations AA * and A * A (which reduces to studying the SVD of A), see [START_REF] Satuluri | Symmetrizations for clustering directed graphs[END_REF] for an overview. Variants of the graph Laplacian were then introduced ([37]); they were hermitian but incorporated in some way the directionality of edges and were provable relaxations of normalized-cut problems (see [START_REF] Leicht | Community Structure in Directed Networks[END_REF] and references in [89, §4.2-4.3]); others used random-walks approaches similar to PageRank ( [START_REF] Mo Chen | Directed graph embedding[END_REF], [START_REF] Pentney | Spectral Clustering of Biological Sequence Data[END_REF]). It is quite striking that in the survey [START_REF] Fragkiskos | Clustering and community detection in directed networks: A survey[END_REF], the authors classify the clustering methods (Chap. 4 therein) without mentioning the use of the adjacency matrix of directed networks. Implicit in these early works was the belief that directed networks need to be transformed or symmetrized. More recently, [START_REF] Cucuringu | Hermitian matrices for clustering directed graphs: insights and applications[END_REF] and [START_REF] Laenen | Higher-order spectral clustering of directed graphs[END_REF] cleverly introduced C-valued Hermitian matrices.

The use of adjacency matrices was advocated later, notably in [START_REF] Li | Analysis of Spectral Space Properties of Directed Graphs Using Matrix Perturbation Theory with Application in Graph Partition[END_REF], and several more theoretical works, among them [START_REF] Mariadassou | Uncovering latent structure in valued graphs: a variational approach[END_REF][START_REF] Zhou | Analysis of spectral clustering algorithms for community detection: the general bipartite setting[END_REF][START_REF] Van Lierde | Spectral clustering algorithms for the detection of clusters in block-cyclic and block-acyclic graphs[END_REF]. These works can roughly be split in two categories. On one side, the authors of many papers seemed reluctant to use eigenvalues of non-symmetric matrices, and favored the SVD instead, whose theoretical analysis is tractable in some cases. This is notably the case for [START_REF] Sussman | A Consistent Adjacency Spectral Embedding for Stochastic Blockmodel Graphs[END_REF][START_REF] Mariadassou | Uncovering latent structure in valued graphs: a variational approach[END_REF][START_REF] Zhou | Analysis of spectral clustering algorithms for community detection: the general bipartite setting[END_REF]. However, as we'll see later, the SVD for non-hermitian matrices suffers the same problem as the eigendecomposition of hermitian matrices: it is sensitive to heterogeneity, and thus less powerful in sparse regimes. On the other side, [START_REF] Li | Analysis of Spectral Space Properties of Directed Graphs Using Matrix Perturbation Theory with Application in Graph Partition[END_REF][START_REF] Van Lierde | Spectral clustering algorithms for the detection of clusters in block-cyclic and block-acyclic graphs[END_REF][START_REF] Chen | Asymmetry helps: Eigenvalue and eigenvector analyses of asymmetrically perturbed low-rank matrices[END_REF] are closer in spirit to our work. They explicitly advocate the use of eigenvalues of non-symmetric matrices as a better option for inference problems. The theoretical analysis performed in [START_REF] Li | Analysis of Spectral Space Properties of Directed Graphs Using Matrix Perturbation Theory with Application in Graph Partition[END_REF][START_REF] Van Lierde | Spectral clustering algorithms for the detection of clusters in block-cyclic and block-acyclic graphs[END_REF] allows them to guarantee performance in very specific cases, where the underlying graphs have a strong and dense structure (upper-triangular , cyclic or purely acyclic). In a different context (matrix completion), the paper [START_REF] Chen | Asymmetry helps: Eigenvalue and eigenvector analyses of asymmetrically perturbed low-rank matrices[END_REF] was one of the first to prove the efficiency of eigenvalues of non-hermitian matrices in high-dimensional problems. Spectral decompositions of network matrices are generally known to reflect some of the underlying interaction structure between the nodes; this non-rigorous statement has now been mathematically understood in a variety of ways, many of them based on a mathematical model for community networks called the stochastic block-model ( [START_REF] Holland | Stochastic blockmodels: First steps[END_REF][START_REF] Abbe | Community Detection and Stochastic Block Models: Recent Developments[END_REF]). Any clustering algorithm can be tested on synthetic data from the SBM to evaluate the reconstruction accuracy, that is, the number of nodes which have been correctly assigned to their community by the algorithm. In this work, we deal with a vast generalization of SBMs, the weighted, inhomogeneous, directed Erdős-Rényi random graph. Definition 6. Let P, W be two real n × n matrices, with P having entries in [0, 1]. A random weighted graph is defined as follows: the edge set is V = [n]; each one of the n 2 potential edges (x, y) ⊂ V × V is present in the graph with probability P x,y and independently of the others; if present, its weight is W x,y . The resulting directed graph will be noted G = (V, E) and its weighted adjacency matrix A is defined by A x,y := W x,y 1 (x,y)∈E .

This allows for virtually any structure: classical block-models (assortative or disassortative), cyclic structures ( [START_REF] Van Lierde | Spectral clustering algorithms for the detection of clusters in block-cyclic and block-acyclic graphs[END_REF]), path-wise structures ( [START_REF] Laenen | Higher-order spectral clustering of directed graphs[END_REF]), overlapping communities ( [START_REF] Ding | Overlapping community detection based on network decomposition[END_REF]), bipartite clustering when both sides have the same size ( [START_REF] Zhou | Analysis of spectral clustering algorithms for community detection: the general bipartite setting[END_REF][START_REF] Zhou | Optimal Bipartite Network Clustering[END_REF]), contextual information on the edges... In SBMs, a key parameter is the density d, the number of edges divided by the size n. For inference problems, a lower density means a sparser information. Analyzing the performance of spectral clustering methods can be done using classical perturbation results in regimes where d is large, often of order n (the 'dense' regime), see [START_REF] Rohe | Spectral clustering and the high-dimensional stochastic blockmodel[END_REF] for instance. However, many realworld networks lie in sparser regimes d n, like d log(n), d → ∞ (the 'semi-sparse regime') or even d = O(1) (the 'sparse regime'), a radically difficult regime in which node degrees are extremely heterogeneous and the graph is not even connected. This behaviour has an impact on spectral quantities when they satisfy Fisher-Courant-Weyl inequalities, like eigenvalues of normal matrices or SVD of non-normal ones, deeply reducing their performance, see [START_REF] Benaych-Georges | Largest eigenvalues of sparse inhomogeneous Erdős-Rényi graphs[END_REF]. This is why most theoretical works (for both directed and undirected models) were concentrated on d ∼ log(n) regimes ( [4] among others). In the sparse undirected regime, the celebrated Kesten-Stigum threshold ( [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]) gives a spectral condition for the emergence of a second eigenvalue λ 2 , beyond the Perron one, in the spectrum of the non-backtracking matrix. The entries of its eigenvector are correlated with the block structure when there are two blocks. In this paper, we describe a general theory of directed Kesten-Stigum-like thresholds for every directed sparse SBM, irregardless of the number of blocks, their size, etc.

Contributions. We prove a Master Theorem describing the sharp asymptotics of eigenvalues and eigenvectors of sparse non-symmetric matrices with independent entries, like adjacency matrices of inhomogeneous directed Erdős-Rényi graphs. This is of independent interest in the field of random matrices. We show how to apply this theorem to the directed SBM and we introduce an elementary community-detection algorithm based on the adjacency matrix. We show why using both left and right eigenvectors is mandatory in sparse regimes. We give numerical and heuristic evidence for why Gaussian Mixture clustering is much more adapted than the popular k-means algorithm. Finally, we illustrate the strength of our method on synthetic data1 .

Notations.

We use the standard Landau notations o(•), O(•), ∼; for k integer, [k] stands for {1, . . . , k}. The letters u, v, w will be kept for vectors, the letters x, y, z will be kept for elements of [n] (nodes). We see vectors in C n as functions from [n] to C, that is u = (u(1), . . . , u(n)). The notation |u| p stands for the p-norm of a vector,

|u| p p = |u(1)| p + . . . + |u(n)| p . We drop the index p iff p = 2 (euclidean norm). If M is a matrix, M = sup |u|=1 |M x| and M ∞ = max M .
The Hadamard product of two matrices A, B with the same shape is defined as the entrywise product:

(A B) x,y = A x,y B x,y . The Frobenius norm is M F = x,y |M x,y | 2 .

The Master Theorem

Let P, W be two real n×n matrices, with P having entries in [0, 1]. The weighted, inhomogeneous directed Erdős-Rényi model was defined in Definition 6. The weighted adjacency matrix will be noted A. We focus on the n → ∞ limit and we suppose in the assumptions thereafter that the graph is sparse, the weights are bounded and the spectral decomposition of E[A] is not degenerate. Let Q = E[A] and K = E[A A] be the first and second entrywise-moments of A, given by Q = P W and K = P W W,

in other words Q x,y = P x,y W x,y and K x,y = P x,y |W x,y | 2 . Our assumptions are as follows:

(i)

P ∞ = O(1/n) and W ∞ = O(1).
(ii) The matrix Q has rank r = O(1), is real diagonalizable, and its r eigenvalues µ i are well-separated in the sense that there is a constant c > 0 such that |µ iµ j | > c, |µ j | > c.

(iii) the right (resp. left) unit eigenvectors ϕ i and ξ i associated with µ i are delocalized, in that These assumptions will be commented later. We note ρ = K . The detection threshold is

|ϕ i | ∞ , |ξ i | ∞ = O 1 √ n (5.
ϑ = max ( √ ρ, W ∞ )
and we note r 0 the number of eigenvalues of Q with modulus strictly greater than ϑ.

R i = |(K -µ 2 i I) -1 ϕ 2 i | 1 L i = |(K * -µ 2 i I) -1 ξ 2 i | 1 (5.3)
where ϕ 2 i , ξ 2 i are the entrywise squares of ϕ i , ξ i . These novel quantities will play a role of paramount importance in all this paper and will be commented later. Let us first state our main result, after which we will give some intuition on (5.3).

Theorem 31 (Master Theorem). Under the above hypotheses, the following holds with probability going to 1 when n → ∞. The r 0 eigenvalues of A with highest modulus, λ 1 , . . . , λ r 0 , are asymptotically equal to the r 0 eigenvalues of Q with highest modulus: |λ iµ i | = o(1). All the other nr 0 eigenvalues of A are asymptotically smaller than ϑ. Moreover, if u i , v i is a left/right pair of unit eigenvectors of A associated with λ i , and if ϕ i , ξ i is a left/right pair of unit eigenvectors of Q associated with µ i , then

| u i , ϕ j | - | ϕ i , ϕ j | |µ i | √ R i = o(1) and | v i , ξ j | - | ξ i , ξ j | |µ i | √ L i = o(1). (5.4)
The eigendefects in Definition 7 measure how much the eigenequations of Q can be 'entrywise squared'. For instance, let µ be an eigenvalue of Q with eigenvector ϕ. Then, (Q -

µ i I)ϕ i = 0. But is ϕ 2 i an eigenvector of K with eigenvalue µ 2 i ? If i ∈ [r 0
], the answer is obviously no since µ 2 i > K ; then, the quantity 1/|(Kµ 2 i ) -1 ϕ 2 i | 1 appearing in the theorem above is a measure of how far ϕ 2 i is from being a µ 2 i -eigenvector of K. The theorem says that when µ i is gives rise to an outlier λ i in the spectrum of A, then the overlap u i , ϕ i between the real eigenvector and the sample eigenvector is higher when ϕ 2 i is far from being an eigenvector of K. At a high level, this surprising and new phenomenon comes from an elementary formula regarding the covariance of Poisson sums (see Lemma 47 in Appendix 5.7), and we conjecture that a similar phenomenon will hold for every random matrix model which is asymptotically Poisson. connectivity F is given by

F = s            1/2 η 1 -η 1/2 η . . . . . . . . . 1 -η 1/2 η 1 -η 1/2            (5.5)
where s > 1 is the density parameter and η ∈ [1/2, 1]. The modularity matrix is therefore given by F/r. The matrix F shown in (5.5) is a tridiagonal Toeplitz matrix; such matrices have been extensively studied and their eigendecomposition is known (see Appendix 5.10.3): as a result, cluster recovery is possible as soon as the top eigenvalue of F/r is at least one. This happens in particular whenever s ≥ 2r.

Two blocks: explicit computations. In the case of two blocks r = 2 with the same size n/2, the connectivity matrix F is equal to

F = s/2 sη s(1 -η) s/2 (5.6)
Define the parameter θ = 2 η(1η). The spectral structure of F is described in the following lemma:

Lemma 42. The two eigenvalues of F are υ 1 = s 1+θ 2 and υ 2 = s 1-θ 2 , with corresponding unit right eigenvectors f i and unit left eigenvectors f i given by

f 1 = ( √ η, 1 -η), g 1 = ( 1 -η, √ η), f 2 = ( √ η, -1 -η), g 2 = ( 1 -η, - √ η).
The eigenvectors of P thus verify

ϕ i (x) ∝ f i (σ(x)) and ξ i (x) ∝ g i (σ(x)),
and Theorem 31 applies in this setting:

Theorem 32. Under the above assumptions, with high probability the following holds.

1) If s < 4(1 + θ)/(1 -θ) 2 , then r 0 = 1.
The Perron eigenvalue of A, namely λ 1 , is asymptotically equal to υ 1 /2, and all the other eigenvalues have modulus asymptotically smaller than υ 1 /2. Moreover, if u 1 , v 1 is a left/right pair of unit eigenvectors associated with λ 1 , then

lim n→∞ | u 1 , ϕ 1 | = lim n→∞ | v 1 , ξ 1 | = a 1,1 where a 1,1 is a completely explicit function of s, η that satisfies a 1,1 = 1 - 2 s • 1 + θ 2 (1 + θ) 2 + O 1 s 2
2) If instead s < 4(1 + θ)/(1θ) 2 , then r 0 = 2. The Perron eigenvalue of A, namely λ 1 , is asymptotically equal to sυ 1 /2, the second eigenvalue λ 2 is asymptotically equal to υ 2 /2 and all the other eigenvalues have modulus asymptotically smaller than υ 1 /2. Algorithm 1 Spectral clustering of n nodes, based on the adjacency matrix A.

1: Data: a n × n adjacency matrix A; a number of clusters k; a rank r 0 .

2: Compute the r 0 largest eigenvalues of M and their unit left and right eigenvectors u i , v i .

3: Define the spectral embedding X A = {X A x : x ∈ [n]} as in (5.7). 4: Apply a GMM-clustering method on the cloud X M . 5: return The partition of [n] based on the output of GMM-clustering.

Moreover, if u i , v i is a left/right pair of unit eigenvectors associated with λ i for i = 1, 2, then

lim n→∞ | u 1 , ϕ 1 | = lim n→∞ | v 1 , ξ 1 | = a 1,1 as above, and additionnally lim n→∞ | u 2 , ϕ 2 | = lim n→∞ | v 2 , ξ 2 | = a 2,2 with a 2,2 a completely explicit function of s, η that satifies a 2,2 = 1 - 2 s • 1 + θ 2 (1 -θ) 2 + O 1 s 2 .
The threshold s > 4(1 + θ)/(1θ) 2 can also be rewritten as η > η(s), where η is an explicit function of s (see equation (5.48) in the Appendix). This will be the preferred formulation through the rest of the paper. Note that η(s) decreases to 1/2 quite slowly: as an example, we have η(10) ≈ 0.979 and η(50) ≈ 0.885, and it can be shown that η(s) ∼ cs -1/4 .

Geometric clustering and community detection

Our Master Theorem describes the information given by the spectral embedding X on the underlying model. Most spectral clustering pipelines then perform geometric clustering based on X .

Algorithm and measure of performance

Our algorithm computes the left and right eigenvectors x i , y i associated with the r 0 largest eigenvalues of M , then defines an embedding of the nodes of [n] in R 2k by setting X A (x) = (u 1 (x), . . . , u r 0 (x), v 1 (x), . . . , v r 0 (x)).

(5.7)

Then, we cluster these n points using the Gaussian Mixture Model for clustering ( [START_REF] Mclachlan | Mixture Models: Inference and Applications to Clustering[END_REF]). We insist on the fact that no data preprocessing is needed: no high-degree trimming, no pruning, no normalization. The complexity of our algorithm is similar to all the spectral clustering procedures: it needs the computation of at most 2r left/right eigenvectors where r is generally O(log(n) c ), and then doing a clustering method with at most r clusters on a n × 2r 0 embedding.

Remark. The number r 0 is a priori problem-dependent. However, since r 0 r and r is low in most problems, one can loop over r 0 at a minor cost. The Master Theorem allows for a more reasonnable possibility, which is to directly estimate r 0 from the data as the number of isolated eigenvalues outside the bulk of the spectrum. This can easily be done either by visual inspection (see Figure 5.1) or by some ad hoc statistical rule and it does not require a priori knowledge of r -unlike many methods in the litterature.

In the stochastic block-model, we have a notion of ground-truth clustering σ : V → [k], where σ(x) = i denotes the membership of node x to the i-th cluster. If our procedure outputs a clustering σ, the performance of this clustering is measured through the overlap, also called Rand Index: it is the proportion of pairs of nodes on which σ and σ agree on membership, that is ov(σ, σ) = 1 n 2 {x,y} 1{σ and σ agree on the edge {x, y}},

where 'agree' means that either σ(x) = σ(y) and σ(x) = σ(y), or σ(x) = σ(y) and σ(x) = σ(y).

Without any information on σ, a blind guess for σ(x) is to randomly assign x to one of the k clusters. This is called a dummy label, σdummy . The adjusted overlap is often preferred to the former:

aov(σ, σ) = ov(σ, σ) -E[ov(σ, σdummy )] 1 -E[ov(σ, σdummy )] .
(5.9)

An adjusted overlap of 1 indicates a perfect recovery of σ (up to permutation), while an overlap of 0 indicates that σ is not better than a dummy guess at recovering σ. In the litterature this is often called Adjusted Rand Index. It will be our measure of performance in our numerical experiments.

Remark (notions of consistency). Strong consistency of a procedure corresponds to aov = 1, that is: all the labels are correctly guessed. Weak consistency is when lim aov = 1 when n → ∞. Partial consistency is when lim inf aov > 0, meaning that the algorithm does strictly better than random guess, a task called detection. In the undirected setting, strong consistency is feasible in the regime d/ log(n) → ∞ ( [4] and weak consistency as long as d → ∞ ([60] and the survey section therein). Note that in the sparse regime with d constant (this paper), even weak consistency is not achievable because of a constant proportion of isolated nodes. Partial consistency in the undirected case was achieved in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF][START_REF] Mossel | Reconstruction and estimation in the planted partition model[END_REF] under a spectral condition on the modularity matrix. We expect similar results to the ones above to hold in the undirected case.

Choice of the clustering algorithm

When it comes to the last step of spectral clustering, i.e. geometric clustering on the spectral embedding, the overwhelming choice of algorithm is the k-means (see for example [START_REF] Van Lierde | Spectral clustering algorithms for the detection of clusters in block-cyclic and block-acyclic graphs[END_REF][START_REF] Zhou | Analysis of spectral clustering algorithms for community detection: the general bipartite setting[END_REF]).

It is very simple to implement, and its tractability allows for explicit performance bounds for spectral clustering [44, Theorem 2]. However, our numerical experiments (see Appendix 5.6) show an interesting phenomenon: the addition of a second informative eigenvector appears to decrease the algorithm's performance ! Our assumption is that the increase in dimensions for clustering caused by the introduction of the second eigenvector nullifies the additional information it brings. To the contrary, our experiments showed a significative increase in performance when using GMMs, although very little is known in terms of their theoretical footing. A mix of theoretical and empirical results allow us to present a simple explanation: the eigenvectors of G are indeed close to a mixture of Gaussian distributions.

Theorem 33. Consider the SBM as described in Section 5.3, with σ d = σ g . Assume that µ i is an isolated informative eigenvalue of P , and let u i be a right eigenvector of the adjacency matrix of G such that |u i | = √ n. Then we have the following convergence in distribution: for all j ∈

[r], 1 Card(σ -1 (j)) σ(x)=j δ u i (x) d -----→ n→+∞ L(Z i,j ),
where Z ij is a random variable with known mean µ ij and variance σ 2 ij (see equation (5.52) in the Appendix). Similar results hold for the right eigenvector v i .

In the above theorem, δ denotes the Dirac delta; the LHS is therefore simply the discrete measure on the entries of u i on the j-th community. The proof of this theorem, as well as an explicit derivation of µ ij and σ i j, can be found in the Appendix. It implies, in particular, that the distribution of u i can be seen as a mixture of r different distributions.

We do not claim (and it is indeed false, see Remark 5.6) that Z i,j ∼ N (µ ij , σ 2 ij ); however, numerical experiments performed in Figure 5.5 appear to show that, at least when the mean degree of the graph is large, the distribution of u i behaves as a mixture of Gaussian distributions. This brings us to the conjecture: Conjecture 6. When the top eigenvalue of P goes to infinity, the distribution of Z ij approaches that of a normal random variable with same mean and variance.

If proven true, this conjecture would give theoretical footing to the performance of GMMs, whose edge over other algorithms is only observed empirically for now.

Numerical validation of our results

Tested methods. We compare our Algorithm 1 with two other methods for digraph clustering. Both methods end with a k-means clustering on a spectral embedding. The first method uses the k left and k right top singular vectors of the adjacency matrix, where k is the number of blocks. The second one is SimpleHerm: we define a complex Hermitian matrix by H x,y = ωA x,y + ωA v,u where ω is the 2πk -th root of unity.We then use the eigenvector of the smallest eigenvalue λ 1 of L = I -D -1/2 HD -1/2 with D the diagonal degree matrix (D x,x = d +

x + d - x ); since its entries are complex, it is viewed as an embedding on R 2 . This method was introduced in [START_REF] Laenen | Higher-order spectral clustering of directed graphs[END_REF], and was convincingly shown to outperform other classical methods in semi-sparse regimes.

SVD and our method are agnostic to problem structure, but SimpleHerm is well-fitted to flow networks. The performance guarantees of our method relies on the probabilistic properties of the SBM, while SimpleHerm satisfies deterministic Cheeger-like inequalities (see [START_REF] Laenen | Higher-order spectral clustering of directed graphs[END_REF]). It would be interesting to test these methods on more general models of directed networks.

Setting. For 50 values of η equally spread between 0.5 and 1 we sampled 20 directed SBMs with connectivity matrix F as in (5.5) and with n = 2500 nodes. The parameters are k, the number of blocks and equal to 2, 4, 6 (the blocks have the same size n/k). For the parameter s, we chose the unique s(d, k) so that the the mean degree of our model with k blocks (given in the formula (5.42)) is equal to d = 2, 3 or 4, see Table 5.1 at page 160 and discussion therein. We insist on the fact that the mean degree in our model is extremely low, and in particular stays under the log(n) = log(2500) ≈ 7.82 barrier. Our performance measure is the adjusted overlap (5.9), between the labelling output by the tested method, and the true labelling.

Results. The results of our experiments 2 are in Figure 5.3. With extremely low degrees (d = 2), our method (red curve) is the only one to catch a signal, the two other ones are unable to detect any community structure. For slightly higher d = 3, 4, our method seems to globally compare with SimpleHerm and be superior to SVD. When the asymmetry is closer to 1/2 (hard regime), our method performs better, see for instance the very neat advantage for k = 6 blocks, where our method reaches more than 20% overlap for η ≈ 1/2, against no detection at all for the other methods. When η approaches 1, the performance of our method collapses back to low overlaps, while SimpleHerm has very high performances. We expect this phenomenon to be caused by the fact that when η → 1, the eigenvectors of F all align with (1, 0, . . . , 0). On a side note, we remark that our method has a better precision, with the standard error (coloured zones) being generally smaller.

Conclusion and future prospects

We rigorously described the behaviour of a simple spectral embeddings, using the eigenvectors of non-symmetric matrices, and we numerically show that our algorithm using Gaussian Mixture clustering has suprisingly good results against state-of-the art methods in digraph clustering, especially in the difficult regime where the model density is O(1). The main weakness of our theory is that it does not apply to rectangular matrices directly, but the randomsplit-squaring strategy as in [START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF] is directly applicable here. Since our theory is new, we chose to keep the exposition as simple and general as possible, but many new directions seem to be promising: among them is the possibility to use the distance-matrix A ( )

x,y = 1 d + (x,y) instead of A, which should result in a method which is more robust to adversarial perturbations, as in [START_REF] Abbe | Graph Powering and Spectral Robustness[END_REF][START_REF] Stephan | Robustness of Spectral Methods for Community Detection[END_REF]. Regarding the gaussianity of the model, we conjecture that the fluctuations of the eigenvalues are Gaussian in the sparse regime; as mentioned, the fluctuations of the eigenvector entries will not be Gaussian, but we now explore a proof of the convergence of these fluctuations when the density of the model increases. two right eigenvectors. Each point in the figure is thus (u 1 (x), u 2 (x)) for some node x and the colors are the labels given by each clustering method.

The second panel in 5.4 shows the performance of these clustering methods, for η between 1/2 and 1. We also compared the use of only one eigenvector with the use of two eigenvectors, even when there is only one informative eigenvector (r 0 = 1).

(i) When there is only one outlier (η < η(s)), clustering based on the Perron eigenvectors (solid lines) yields good results, while adding a second uninformative eigenvector (dashdot lines) deeply reduces the performance of any clustering method. (iii) But, when η > η(s), the performance of kmeans and spectral-clustering based on the two informative eigenvectors u 1 , u 2 first decreases, since these algorithms seem to struggle exploiting the extra information given by the second eigenvector (Figure 5.4, top panel).

Only the Gaussian mixture model incorporates this extra information efficiently: it is the only method for which clustering based on two informative vectors is better than with only one (the two orange lines cross short after η(s)).

We did not try other clustering methods -these experiments are only indicative of a seemingly high performance for gaussian clustering. In Theorem 33, we showed that the spectral embeddings have a limiting distribution, accessible through the Z i,j . If Z i,j was Gaussian, the performance of GMM would be completely understood, but as mentioned before Conjecture 6, in the sparse regime, the limiting distributions Z i,j (or equivalently, the spectral embeddings) are not Gaussian. The following remark explains why.

Remark. Z i,j has a positive atom at 0 (and possibly many other atoms): indeed, following the notations of the very last subsection, it is easily seen that the limit Z i,j is equal zero when the Galton-Watson tree T j is empty, which happens with strictly positive probability so P(Z i,j > 0) > 0; but clearly, the extinction probability of T j goes to zero when ν 1 , the highest modularity eigenvalue, goes to infinity. Note that the atom at zero is visible in Figure 5.5-(a).

The shapes of the random variables Z i,j are visible in Figure 5.5. In this figure, we plotted the histograms of the entries of u i in two different 5000-nodes blockmodels, with connectivies F 1 (top) and F 2 (bottom) given by: where i ∈ {1, 2} and µ i,j , σ 2 i,j are the means and variances of the limiting random variables Z i,j . It is clearly seen that in the first plot, the limit of u 1 is not Gaussian; in the second plot, the degrees of the graph are much higher (we are already on the semi-sparse regime), and the Gaussian approximations for both eigenvectors are strikingly convincing.

Thresholds, spectral gap. We recall that r 0 is the number of eigenvalues of Q with modulus greater than ϑ = max( W ∞ , √ ρ) where ρ = K and we introduce Φ = (ϕ 1 , . . . , ϕ r 0 ), Ψ = (ψ 1 , . . . , ψ r 0 ) and Σ = diag(µ 1 , . . . , µ r 0 ). The spectral gap of our model is defined as

τ = ϑ |µ r 0 | .
It is very important to note that τ < 1. The closer to 1, the harder the problem; the bounds of Theorem 31 are actually of the form |λ iµ i | τ , where is a carefully chosen parameter that grows logarithmically with n.

Covariance functionals, eigendefects and cross-defects We will first need a notation for the Hadamard products of vectors in R n : ϕ i,j = ϕ i ϕ j and ψ i,j = ψ i ψ j , (5.12) so that in the statement of the Master Theorem, ϕ 2 i is equal to ϕ i,i . In the proof we will only use the ϕ i,i notation.

We introduce two functions Γ, Γ * : C × C n → C by

Γ(z, ξ) = ∞ t=0 1, K t ξ z t and Γ * (z, ξ) = ∞ t=0
1, (K * ) t ξ z t .

(5.13)

Let us recall that the norm of K is ρ; consequently, the sums above are convergent when |z| is strictly greater than ρ, and in particular when z = µ 2 i with i ∈ [r 0 ]. In this case, one has

Γ(µ 2 i , ϕ i,i ) = µ 2 i R i and Γ * (µ 2 i , ψ i,i ) = µ 2 i L i . (5.14)
Proof. Let ξ = ϕ i,i . We have Γ(µ 2 i , ξ) = ∞ t=0 1,K t ξ µ 2t i = 1, ( ∞ t=0 (K/µ 2 i ) t )ξ . The Neumann summation formula shows that since K/µ 2 i < 1, the matrix sum in this expression is nothing but (I -K/µ 2 i ) -1 = µ 2 i (µ 2 i I -K) -1 , and that this matrix has all entries nonnegative. Since ξ also has nonnegative entries, |(µ 2 i I -K) -1 ξ| 1 = 1, (µ 2 i I -K) -1 ξ , and we recognize the right eigendefects.

Since we'll also need 'cross defects' like Γ(µ i µ j , ϕ i,j ), we introduce the notations Γ left , Γ right for two matrices of size r 0 × r 0 defined by (Γ left ) i,j = Γ(µ i µ j , ϕ i,j ) and (Γ right ) i,j = Γ * (µ i µ j , ψ i,j ).

The Pseudo-Master Theorem: A is nearly diagonalized by pseudoeigenvectors

The tools for studying matrix A are the pseudo-eigenvectors. Consider the eigenvalue µ i of Q. We define two vectors U i = A ϕ i /µ i and V i = (A * ) ψ i /µ i , where

= κ log(n) (5.15)
and κ is a positive constant to be chosen later. To put it in matrix form, these vectors are the columns of the n × r 0 matrices U = A ΦΣ - and V = (A * ) ΨΣ -.

The key aspects of U and V are summarized in the following list of statements, which is a pseudo-version of the Master Theorem. We recall that the symbols , where rigorously defined in the preceding subsection.

The smallest eigenvalue ν r 0 of S is close to µ r 0 , and since τ > 1 independently of n and = κ log(n) , we get |µ r 0 | ϑ . But we can write A as a perturbation of S, A = S + (A -S), and, crucially, statements (5.18)-(5.20) can be bootstraped to show that A -S 1. The Bauer-Fike theorem applies, and roughly says that the eigenvalues of A are within distance ϑ of the eigenvalues of S: consequently, A has r 0 eigenvalues ϑ -close to µ 1 , . . . , µ r 0 , and the eigenvalue 0 of S gives rise to nr 0 eigenvalues of A with modulus ϑ . A similar statement holds for the eigenvectors; extra work needs to be done for getting results on the eigenvalues of A, since there might be some phase effects.

The results on eigenvectors follow in the same way, with a Davis-Kahan-like custom theorem proved in [START_REF] Stephan | Non-backtracking spectra of weighted inhomogeneous random graphs[END_REF]. To ensure performant bounds, we must assume that the eigenvalues µ i are well-separated, which the reason why we suppose that |µ iµ j | > c for some c > 0 in the Hypotheses before the Master Theorem. Since A -S 1 and the condition numbers of the matrices of interest are all 1, the Davis-Kahan theorem yields a bound of the form |u i -U i /|U i || A -S /c, which is 1:

u i - U i |U i | 1.
(5.21)

The 'eigenvector part' of the Master Theorem then easily follows, by the continuity of u → u, ϕ and the limits in the Pseudo-Master Theorem.

Proof of the Pseudo-Master Theorem

This section is devoted to the proof of the Pseudo-Master Theorem.

The first two sections gather some results on local approximations of random graphs: to a large extent, they are classical and well-known. We state them for completeness and because they give a good intuition on the following parts, but these statements can be retrieved using routine methods from random graph theory. Subsection 5.8.3 states a powerful concentration result on random graphs, proved in [START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF].

We use these results as a computational toolbox: in Subsections 5.8.4 to 5.8.7, we perform all the necessary calculations on our pseudo-eigenvectors, and we rely on an elegant generalization of Kesten martingales on inhomogeneous Galton-Watson trees. These sections differ from previous works in the sense that we had to adapt the computations to the general setting of our Master Theorem, with full inhomogeneity and non-symmetry.

Finally, the main ideas of previous works on trace methods are summarized in Subsection 5.8.8, as they apply without modifications to our setting.

The graph has few short cycles, and small neighbourhood growth

Sparse random graphs, that is, random graphs where the mean degree of vertices is O(1), have been known for long to be locally-tree like, in the sense they have very few short cycles. In our model, we supposed that P x,y d/n for some d. As a consequence, the expected degree of a vertex x is d x = P x,1 + • • • + P x,n , and is smaller than d, and the graph is stochastically dominated by a directed homogeneous Erdős-Rényi random graph with connectivity d/n. In turn, many random variables (cycle counts, edge number) are stochastically dominated by the undirected Erdős-Rényi graph of degree 2d/n. Most properties on the local structure directly follow from classical results: absolutely no problem-specific work is needed here. We simply gather the results we will tacitly use in the sequel. Lemma 45. Whenever = κ log(n) with κ small enough, we have d TV ((G, x) 2 , (T x , x) 2 )

1.

(5.24) This lemma will not directly be used in our proof; it is only a step in the proof of Proposition 24 thereafter. We stated it anyways because it gives a rigorous meaning to the fact that G is wellapproximated locally by trees, and it intuitively gives a justification for our tree computations in subsequent parts of the proofs.

Note that we formulated this section only with forward neighborhoods; the propositions are also true with backward neighborhoods, and in this case we only have to see T x as a directed tree, with edges oriented towards the root.

Concentration of linear functionals

The graph G (or the matrix A) is a collection of n 2 independent random variables: it is thus natural that if F (G, x) is a function which depends only on a small neighborhood of the graph, then its space average

1 n x∈[n]
F (G, x) (5.25) should be concentrated around its mean. This is the case, and a stronger statement actually holds: we saw in (5.24) that (G, x) and (T x , x) nearly have the same distribution, and it is actually known that the functional in (5.25) is indeed concentrated around the expectation of the same functional applied on the trees (T x , x).

To formalize this, we say that a function f : G × N → R, where G denotes the set of all graphs, is -local if f (H, x) only depends on the -neighbourhood of x in H. Let (T x , x) be the family of independent random rooted trees as in (5.24). Then the following lemma is true as long as the constant κ in is small enough (κ < 0.01/ log(2d) will be sufficient).

Proposition 24. Let F be a family of functions f : G × N → R, with less than 1 elements. We suppose that each f ∈ F is a 2 -local function, that for all graphs H and node x one has sup f ∈F f (H, x) |(H, x) 2 | 2 × (c n /n), for some c n > 0. Then

sup f ∈F x∈G f (G, x) - x∈[n] E [f (T x , x)] c n n 0.1 .
Proof. This is a restatement of Theorem 12.5 in [START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF], with β = 2 and α = c n /n. The bound therein is c n n -1/2+2κ . A sufficiently small κ leads to our statement. Note that if f (H, x) |(H, x) 2 |, then f also satisfies f (H, x) |(H, x) 2 | 2 , which is the reason why we chose to keep the exponent 2.

A crucial point in the proof of the Pseudo-Master Theorem is that the pseudo-eigenvectors U i and V i are -local functions of G, and thus so are their scalar products with one another. As such, all computations in (5.16)-(5.18) reduce to computing expectations on the random trees defined in the preceding subsection. We can apply Lemma 24 to G and the family (T x ) x ; the problem was reduced to computing the expectations of our functionals on the trees T x .

Pseudo-eigenvectors on the random tree

Let us take a quick look at the entries of U and V , and pick one vertex x ∈ [n] and some index i. By definition,

U i (x) = µ - i (A ϕ i )(x) = µ - i x 1 ,...,x W x,x 1 W x 1 ,x 2 • • • W x -1 ,x ϕ i (x ), (5.26)
where the sum runs over all the paths in the graph G, ie sequences of vertices such that the edges (x s , x s+1 ) are present in the graph. This is, by definition, an -local function ; its counterpart on the tree can thus be defined as Ũi (x) = µ - i x 1 ,...,x ∈Tx W x,ι(x 1 ) W ι(x 1 ),ι(x 2 ) • • • W ι(x -1 ),ι(x ) ϕ i (ι(x )), (5.27) where the sum ranges over the vertices x at depth in T x and the unique path x, . . . , x connecting x to x , and ι(x i ) is the label of x i .

The martingale equation

Let E -1 denote the conditional expectation with respect to the first -1 generations of T x . Write

E -1 [ Ũi (x)] = µ - i x 1 ,...,x -1 W x,ι(x 1 ) • • • W ι(x -2 ),ι(x -1 ) E -1
x W ι(x -1 ),ι(x ) ϕ i (ι(x )) .

Let us note y = ι(x -1 ); the inner expectation reads where, in the last line, we used the fact the ϕ i is an eigenvector of Q. Recalling that y = ι(x -1 ), we have

E -1 [ Ũi (x)] = µ -+1 i x 1 ,...,x -1 W x,ι(x 1 ) • • • W ι(x -2
),ι(x -1 ) ϕ i (ι(x -1 )).

In fact, defining Ũi (x, t) by replacing by t in the definition of Ũi (x), we showed that

The random process t → Ũi (x, t) is a martingale.

(5.28)

The common expectation is easily seen to be E[ Ũi (x, 0)] = ϕ i (x).

5.8.6 Proving (5.16)-(5.17)- (5.18) We only give the argument for (5.16), the others are done in a similar fashion. The (i, j) coefficient of U * V is U i , V j , which can be rewritten as U i , V j = (µ i µ j ) -A ϕ i , (A * ) ψ j = (µ i µ j ) -A 2 ϕ i , ψ j Let f (x) = f i,j (x) = ψ j (x)[A 2 ϕ i ](x); it is easily seen that U i , V i = x∈[n] f (G, x), and we are ready to apply the concentration property in Proposition 24 to the family {f i,j }.

Lemma 46 (correlations between pseudo-eigenvectors are concentrated).

sup i,j U i , V j -µ - i µ - j x∈[n]
ψ j (x)E[ Ũi (x, 2 )] 1 (5.29)

Proof. The delocalization properties of the ϕ i (Hypothesis (5.2)), the tangle-free property (there is no more than one cycle in (G, x)) and the fact that |W x,y | W ∞ all together imply that

f (G, x) c W ∞ n |(G, x) 2 |,
for some universal constant c. But since W ∞ < c for some c , any choice for κ sufficiently small will give (for instance) W ∞ n 0.01 . Proposition 24 straightforwardly leads to a n -ε error for some small ε. With our notations, this is 1.

We are now in a position to use property (5.28): E[ Ũi (x, 2 )] = ϕ i (x), and the orthogonality property of the left and right eigenvectors yields

| U i , V j -δ ij | 1.
It is then straightforward to go from this elementwise bound to (5.16): for any r 0 × r 0 matrix M , one has M r M ∞ . Since we also have r 1, we obtain U * V -I U * V -I ∞ 1.

The same proof works for V , with the subtle difference that these left-pseudo-eigenvectors V i are backward-looking: V i (x) is a local function of (G, x) -, where thesuperscript denotes the backward ball. But the proof is the same: Lemma 24 is true for backward functionals and the couplings in Subsection 5.8.2 are the same, but with the T x oriented towards the root; everything works exactly the same.

Proving (5.19): martingale correlations

Statements in (5.19) are trickier: even if Lemma 24 still allows approximating U i , U j with a tree computation, there are some strong dependencies between Ũi (x, t) and Ũj (x, t) that we cannot neglect.

Rewriting the correlation term. Proceeding as before with f (G, x) = [A ϕ i ](x) • [A ϕ j ](x), we have

sup i,j U i , U j - x∈[n] E Ũi (x) Ũj (x)
1.

(5.30)

We recognize a covariance term between two martingales; let us then introduce the increments δ t = E t-1 ( Ũi (x, t) -Ũi (x, t -1))( Ũj (x, t) -Ũj (x, t -1))

A classical use of the martingale property implies that

E Ũi (x) Ũj (x) = ϕ i (x)ϕ j (x) + E[δ 1 + • • • + δ ]
The increment δ t has an explicit expression: ),ι(x t ) ϕ i (ι(x t ))ϕ j (ι(x t ))µ i µ j ϕ i (ι(x t-1 ))ϕ j (ι(x t-1 ))

δ t = µ -t i µ -t
    .

(5.31)

Covariance of Poisson sums. In the sum above, the only nonzero terms are when x t-1 = x t-1 : otherwise, the inner sum becomes a product of two independent random variables of respective expectations µ i ϕ i (x t-1 ) and µ j ϕ j (x t-1 ). Writing again y = ι(x t-1 ), the conditional expectation becomes

C y : = E   z,z ∈M(y)
W y,z W y,z ϕ i (z)ϕ j (z )µ i µ j ϕ i (y)ϕ j (y)

  = Cov   z∈M(y) W y,z ϕ i (z), z∈M (y)
W y,z ϕ j (z)   .

(5.32)

We then make use of the following elementary lemma: P yz d y W 2 yz ϕ i (z)ϕ j (z) = (Kϕ i,j )(y).

Let us now come back to (5.31). We know that we can remove every term with x t-1 = x t-1 , and the computations above further reduce it to δ t = (µ i µ j ) -t x 1 ,...,x t-1 t-1 s=1 W 2 ι(x s-1 ,ι(xs)) (Kϕ i,j )(ι(x t-1 ))

We recognize an expression similar to the definition of Ũi in (5.27). Using the same methods, we are able to show that E[δ t ] = [K t ϕ i,j (x)] (µ i µ j ) t .

Finally, summing the increments, we get E[ Ũi (x) Ũj (x)] = ϕ i (x)ϕ j (x) + t=1 K t ϕ i,j (x) = t=0 K t ϕ i,j (x) µ t i µ t j .

(5.34)

The expression for U i , U j is obtained by summing (5.34) and the spectral radius of the matrix K/(µ i µ j ) is thus at most τ . Since the entries of ϕ i,j are of order O(n -1 ), we have the bound

sup i,j ∞ t= +1
1, K t ϕ i,j (µ i µ j ) t Cτ 1.

Combined with (5.35), this finally ends the proof of (5.19).

The trace method

All that remains now is to prove equation (5.20); that is, once we showed that the first r 0 eigenvalues of A are close to the µ i , it remains to show that the nr 0 eigenvalues are confined in a circle of radius ϑ . This is done in three parts:

(i) a tangle-free decomposition, expressing A as a product involving its expectation Q, the powers A t for t and some additional random matrices A (t) , which can be understood as the centered versions of A t .

(ii) a trace method on the aforementioned centered matrices, inspired by [START_REF] Füredi | The eigenvalues of random symmetric matrices[END_REF], to bound their spectral radius;

(iii) finally, a scalar product bound to control the whole sum whenever x ∈ H ⊥ .

Tangle-free decomposition. We showed in Lemma 44 that with high probability the graph G is 2 -tangle-free; as a result, for all vertices u, v and t we have

A t uv = γ∈F (t) uv t s=1 A γ s-1 γs ,
where the sum ranges over all tangle-free paths (i.e. paths whose induced graph is tangle-free) of length t in the complete graph K n . The centered matrices A (t) are thus similarly defined as

A (t) uv = γ∈F (t) uv t s=1
A γ s-1 γs , where A = A -Q is the centered version of A.

To decompose A t in terms of the latter matrices, we make use of the following equality, valid for any (a i ), (b i ): Applying this to the two above equations yields

A uv = A ( ) uv + k=1 γ∈F ( ) uv k-1 s=1 A γ s-1 γs (Q γ k-1 γ k ) s=k+1 A γ s-1 γs
Each term in the sum above is close to [A (k-1) QA -k-1 ] uv , with the following caveat : the concatenation of a path in F Bounding A (k) . The trace method gets its name from its leverage of the following inequality:

A (k) = A (k) A (k) * m 1 2m tr A (k) A (k) * m 1 2m .
The above trace can be expanded as

tr A (k) A (k) * m = γ 2m i=1 k t=1 A γ i,t-1 γ i,t , (5.37)
where the sum ranges over all concatenations of 2m k-paths γ = (γ 1 , . . . , γ 2m ) such that γ i is tangle-free for all i, and with adequate boundary conditions. The goal is now to use a Markov bound, and thus to compute the expectation in (5.37); the key argument is the following: Each term in the sum (5.37) has expectation zero unless γ visits each of its edges at least twice.

We now classify the subgraphs γ by their number of vertices v(γ) and edges e(γ), and we say that γ and γ are equivalent if there exists a permutation σ ∈ S n such that σ(γ i,t ) = γ i,t for all i, t. All that remains is to bound the number of such equivalence classes and their contributions to the overall expectation; this is done in [START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF][START_REF] Stephan | Non-backtracking spectra of weighted inhomogeneous random graphs[END_REF] and yields the following results: Now, all that remains is to sum the terms N (v, e)W(v, e) over all possible choices of v and e, to find the following bound:

A (k) ϑ k .
The operator norm of R ( ) k is bounded using similar arguments.

A scalar product bound. Let w ∈ R n ; with the previously established bounds, we have

A w ϑ + k=1 ϑ k QA -k-1 w
It remains to bound the rightmost norm whenever w is orthogonal to the A ψ i . First, we use the eigendecomposition of Q:

QA -k-1 w = i∈[r] µ i ϕ i ψ * i A -k-1 w µ 1 i∈[r] (A * ) -k-1 ψ i , w
Since w, (A * ) ψ i = 0 by assumption, we can use Cauchy-Schwarz and a telescopic sum to bound the scalar product:

(A * ) -k-1 ψ i , w |µ i | -k-1 -1 t= -k-1 |µ i | -t (A * ) t ψ i -µ -1 i (A * ) t+1 ψ i
The final bound thus stems from the following lemma [START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF]:

Lemma 49. For every t and i ∈ [r 0 ] we have Bottom right: the shape of η → η(s).

A t ϕ i -µ -1 i A t+1 ϕ i

Digression: the full threshold

We hereby state an auxiliary result that might be of potential interest, which simply consists in an application of Theorem 35.

Proposition 26. In the pathwise SBM as in (5.5) with r blocks, degree parameter s > 1 and asymmetry parameter 1/2 η 1, the r distinct eigenvectors can be detected if s r > 1/2 + c 1 θ min k∈[r] (1/2 + c k θ) 2 (5.45)

where θ = 2 η(1η) and c k = cos(kπ/(r + 1)).

We plotted the threshold for several values of r in Figure 5.6. It is interesting to note that for specific values of θ, the threshold for s is +∞; this corresponds to cases where θ = -2c k , and one eigenvalue is zero. This is a good illustration of the principle discussed earlier : r 0 = 1 suffices to recover cluster information (since the top eigenvector is nonconstant), even though it's completely impossible to recover as many informative eigenvectors as there are clusters.

Computations for the two-block case

f 1 = √ η, 1 -η f 2 = √ η, -1 -η g 1 = 1 -η, √ η g 2 = 1 -η, - √ η .
Applying Theorem 35, we have r 0 = 2 whenever ν 2 2 > ν 1 , which simplifies to

s > 4(1 + θ) (1 -θ) 2 ,
which settles the first part of Theorem 32. Now, simplifying (5.40) whenever i = j, we have a i,i = p, f i,i p, (Iν -2 i M ) -1 f i,i , and since p = (1/2, 1/2) and the f i have unit length, this simplifies further to

a i,i = 1 1, (I -ν -2 i M ) -1 f i,i
.

(5.47)

The standard adjoint formula yields, whenever α < 1/ν 1 ,

(I -αM ) -1 = 1 4(1 -αν 1 )(1 -αν 2 )
4αs 2αsη 2αs(1η) 4αs, and since f 1,1 = f 2,2 = (η, 1η), we have 4αs + αsθ 2 =: γ(αs).

Since we will choose α = ν -2 i , we have αs-> 0 and

γ(x) = 1 - x 2 1 + (1 -θ 2 )x 4 + O(x 2 ) = 1 - 1 + θ 2 4 x + O(x 2 ).
Substituting α = ν -2 i and taking the square root, we find

a i,i = 1 - 1 + θ 2 8 s ν 2 i + O 1 s 2 = 1 - 2 s 1 + θ 2 (1 ± θ) 2 + O 1 s 2 ,
which are the expressions in Theorem 32.

Note that it is possible to continue the computations and find explicit expressions for the a i,i in terms of η and s, but the resulting expressions are too complex to give any more insight than the asymptotic expressions.

We want to show convergence for ūi ; using the Portmanteau lemma, it suffices to show bounds like (5.50) for Lipschitz functions. Let h be a bounded function with Lipschitz constant C; we write

1 p j n σ(x)=i

Figure 1 . 1 :Figure 1 . 2 :

 1112 Figure 1.1: Phase transition diagram for the planted path problem, in terms of k and λ.

Figure 1 . 3 :

 13 Figure 1.3: Degree distribution of a real-world (left) and random (right) graph, in log-log space.To the left is the graph of Google+ frienship circles, whose degree distribution roughly exhibits a power law, as in[START_REF] Clauset | Power-Law Distributions in Empirical Data[END_REF]. To the contrary, the distribution of an Erdős-Rényi graph with the same degree (right) is close to a Poisson distribution, which can be seen to be wildly different.

Figure 1 . 4 :

 14 Figure 1.4: A network with ground truth communities : political books written on the 2004 U.S presidential election, classified by partisan leaning : democrat (blue), republican (red) and neutral (grey). Edges between two books indicate frequent co-purchases.

Figure 1 . 5 :

 15 Figure 1.5: Eigenvalue histogram (left) and plot of the second eigenvector (right) of the adjacency matrix of a somewhat dense two-block SBM (n = 2000, d = 40, top), and a sparser one (n = 6000, d = 1.7, bottom). In the dense case, eigenvalues of E[A] are reflected in the spectrum of A (red arrows), and the associated eigenvector separates the communities. To the contrary, the sparse case has no outlier, and the top eigenvectors are not correlated with the community structure.

Figure 1 . 6 :

 16 Figure 1.6: Eigenvalues and eigenvector plot of the self-avoiding (top) and non-backtracking (bottom) matrices of a sparse two-block SBM (n = 2000, d = 4). Since the non-backtracking matrix is not symmetric, its eigenvalues are complex; however, the outlier eigenvalues (as well as the associated eigenvectors) are real. Notice that the communities are less separated in the eigenvector plots than in Figure1.5, a result of the model sparsity.

Figure 1 . 7 :

 17 Figure 1.7: (Left) Spectrum of the non-backtracking matrix B of a weighted random graph, and (Right) Embedding of the second eigenvector of B in n-dimensional space. The underlying graph is a symmetric labeled two-block SBM (n = 1000, a = 8.4, b = 3.6); we generate spins according to the censored block model in[START_REF] Saade | Spectral detection in the censored block model[END_REF] (ε = 0.3), and assign weights according to equation (4.13) in Chapter 4. The parameters have been chosen so that reconstruction is impossible using only either the unweighted edges or the spins, but possible with a combination of both. Note that the shape of the spectrum inside the bulk is very distinct from the unweighted case (Figure1.6). The embedding used to generate the right figure is the one in Equation (1.9).

Figure 1 . 8 :

 18 Figure 1.8: Left: Eigenvalues of the adjacency matrix A of a real-world network: the political blogs dataset [8]. While the bulk is less circular than in stochastic networks, the outlier eigenvalues are clearly visible -and real. Right: Scatter plot of the first two eigenvectors of A, with the true labels (blue for Democrat and red for Republican) revealed. The clusters are clearly visible.

Figure 1 . 9 :

 19 Figure 1.9: Eigenvector plots of a sparse (Left, d ≈ 4.7) and denser (Right, d = 20) directed stochastic block model. Overlayed are the corresponding Gaussian mixture distributions with matching model parameters.

  (a) Subcritical regime : λ < λ D h < log D (n)/2 log D (n)/2 < h < log D (n) Detection unknown complete reconstruction impossible Detection easy complete reconstruction impossible (b) Supercritical regime : λ > λ D Table 2.2: Summary of results for planted D-ary tree Theorem 3 (D-ary trees). In the low-density region λ < λ D , there exist two parameters h and h such that the following holds. h = ln ln(n)/ ln(D) + Θ(1), and h = h -1 for almost all λ.

  and β -1,r = O(D/n) for r = 0, 1/λ. The terms with r = 0, 1/λ in the previous expression thus contribute at most O(D 2 /n). The terms with r = 1 give

C

  ) for a given cycle C in G; using part (i) of the above lemma, we can restrict our study to the subspace spanned by the vertices in V C .Let v be a normed vector of size |V C | corresponding to the highest eigenvalue of P ( ) C ; as the coefficient (i, j) of P ( ) C only depends on the distance of i and j to C, we likewise group the coefficients of v by their distance t to C, and write v = (v tj ) 0≤t≤ 1≤j≤St(C).

=

  O(log(n)α /2 ). (3.25) Combining the above inequality with Lemma 16 and inequality (3.20) eventually leads to

. 41 )

 41 Combining inequalities (3.40) and (3.41) yields ρ(P ( ) ) ≤ max C ρ(P ( ) C ); the reverse inequality comes from the decomposition P ( ) = P ( ) C .

M = a b b a , P 11 =Theorem 25 .

 1125 P 22 = P and P 12 = P 21 = Q, (4.12) and assume that both measures are absolutely continuous with respect to another measure m (note that we can take m = P + Q), with Radon-Nikodym derivatives f and g. Let w : L → R a bounded weight function, such that w( ) ≤ L for any ∈ L; and define the weight matrix W ij = w(L ij ) and the associated weighted non-backtracking matrix B. Then, an application of Theorem 22 yields the following result: Define the parameter τ by

Conjecture 4 .

 4 In the labeled symmetric SBM, partial reconstruction is possible as soon as β > 1, whereβ = 1 k (afbg) 2 af + (k -1)bg dm,and a spectral algorithm based on the non-backtracking matrix with weight functionw( ) = af ( )bg( ) af ( ) + (k -1)bg( )recovers a positive fraction of the community memberships in polynomial time.

  ij ) are independent Gaussian random variables, and let m = i,j m ij and s = sup i,j s ij .

A

  number of growth properties for neighbourhoods in T and G are needed to ensure the successful couplings below. By definition of d, G (resp. (T, o)) is dominated by an Erdős-Rényi graph G(n, d/n) (resp. a Galton-Watson tree with offspring distribution Poi(d)); we are thus able to direcly lift properties from [29], Sections 8 and 9.

4. 11 Applications of Theorem 22 4. 11 . 1

 1122111 Proof of Proposition 11 Let x be an eigenvector of B associated with the eigenvalue λ; the eigenvalue equation for x reads λx e = e→f W f x f . (4.79) On the other hand, the definition y = S * D W x expands to y i = e:e 1 =i W e x e . Applying equation (4.79) to e and e -1 yields λx e = y e 2 -W e x e -1 and λx e -1 = y e 1 -W e x e , and as a result λ 2 x e = λy e 2 -λW e x e -1 = λy e 2 -W e (y e 1 -W e x e ).

e 2 -

 2 W e y e 1 λ 2 -W 2 e ; (4.80) in particular y = 0 if x = 0. Plugging (4.80) into the eigenvalue equation (4.79), we get for

e v=1 d e n v-e ≤ c 2m 2 d

 2 4m L 2km n -2m log (n) 40m (2km)d 2km ∞ g=0 (4km) 12m n g , using preemptively the bound m ≤ log(n) and the change of variables g = ev. This time, choosing m = log(n) 24 log(log(n)) yields a convergent sum, and (4.71) follows.

2 )Figure 5 . 1 :

 251 Figure 5.1: Spectra of inhomogeneous Erdős-Rényi graphs, with no weights, n = 1000 nodes. The underlying connectivity matrix P is a block-matrix; the inset of each picture shows a colorplot of P , with darker colors indicating higher values. The points are the eigenvalues of A. The brown lines indicate the non-zero eigenvalues µ i of Q. The beige circle behind the eigenvalues has radius ϑ. The outliers close to µ i for i ∈ [r 0 ] are visible for each picture.

Definition 7 .

 7 Let µ i be an eigenvalue of Q with left and right unit eigenvectors ϕ i , ξ i . If |µ i | > ϑ, the (left and right) eigendefects of µ i are defined by

Figure 5 . 3 :

 53 Figure 5.3: Averages of labels reconstruction scores (adjusted overlaps), averaged over 20 runs for 50 values of η ranging from 0.5 to 1, and for different mean degree d. The number of nodes is n = 2500. Coloured zones are for standard errors of the corresponding method. The parameter s corresponding to the various values d are given in Table 5.1 page 160).

(

  ii) When crossing η(s), a second informative eigenvector appears; the performance of clustering methods based on the Perron eigenvector are reduced, in accordance with the correlation decrease of | u 1 , ϕ 1 | predicted by Theorem 32 (see the golden line in Fig 5.1, first panel).

r 0 = 1 .(b) r 0 = 2 .

 12 of size p 1 = 2/3, p 2 = 1/3 -the same size on the left and on the right. In the first model, there is only one outlier; in the second, there are two.Note that the Theorem implies that for i ∈ [r 0 ], the densities of the discrete distributions1 n x∈[n] δ u i (x)converge in distribution to p 1 Z i,1 + p 2 Z i,2 . The plots are the histograms of the u i (x) over 10 samples. In the figure, the grey lines are the densities of the gaussian mixturesN i = p 1 N (µ i,1 , σ 2 i,1 ) + p 2 N (µ i,2 , σ 2 i,2 ), (5.11) Histogram of the entries of u 1 . Histogram of u 1 in pink, and u 2 in blue.

Figure 5 . 5 :

 55 Figure 5.5: An illustration of Theorem 33, for the two-block SBM with connectivities as in (5.5) and clusters sizes p 1 = 2/3, p 2 = 1/3. Here, n = 5000 and there are 10 samples in each picture. The grey lines are the densities of the gaussian mixtures in (5.11).

E - 1 x

 1 W ι(x -1 ),ι(x ) ϕ i (ι(x )) = E   z∈M(y) W y,z ϕ i (z) This is a sum of a Poi(d y ) number of independent random variables with distribution π y , soE   z∈M(y) W y,z ϕ i (z)   = d y × z∈[n] P y,z d y W y,z ϕ i (z) = y∈[n] P y,z W y,z ϕ i (z) = y∈[n] Q y,z ϕ i (z) = (Qϕ i )(y) = µ i ϕ i (y)

Lemma 47 .B

 47 If N is a Poisson random variable and (A 1 , B 1 ), (A 2 , B 2 ), . . . are iid copies of a couple of random variable (A, B), thenCov k = E[N ]E[AB].(5.33)In(5.32), N = |M(y)| is a Poi(d y ) random variable, and the couple (A, B) is simplyA = W y,Z ϕ i (Z) and B = W y,Z ϕ j (Z),where Z is a random index on [n] with distribution π y . Computing C y is now straightforward:C y = d y E[W y,Z ϕ i (Z)W y,Z ϕ j (Z)] = d y z∈[n]

  b s (a kb k ) t s=k+1 a s

(k- 1 )A

 1 uv and one in F ( -k-1) wx is not necessarily tangle-free ! Nevertheless, we write[A (k-1) QA -k-1 ] uv = γ s-1 γs (Q γ k-1 γ k ) s=k+1 A γ s-1 γs + [R ( ) k ] uv ,so that we finally getA = A ( ) + k=1 A (k-1) QA -k-1 -

Lemma 48 .

 48 The number N (v, e) of equivalence classes of subgraphs γ with v vertices and e edges such that each edge is visited at least twice satisfiesN (v, e) (2km) 6m(e-v+1)+2m ,(5.38)and for each γ ∈ N (v, e), the contribution W(γ) of the equivalence class to the trace expectation is bounded above:W(γ) W(v, e) := n v-e ρ e dL 2 ρ3(e-v)+8m

Figure 5 . 6 :

 56 Figure 5.6: Top: A plot of the shape of the RHS of (5.45) as a function of η, for different values of r ranging from 2 to 2 5 , with a log-scale on the y-axis. The red zone represent the set of degree parameters s that lie below the threshold s(η, r) in (5.45): they are the values for which our method does not yield full reconstruction guarantees, since at least one eigenvalue/eigenvector couple is 'lost in the bulk' of the spectrum of A. Bottom left: Here s = 10 and r = 30. The absolute values of the eigenvalues ν k = s(1/2 + c k θ) are plotted in grey, while the threshold ρ = √ ν 1 is in bold black.

4 ,

 4 We place ourselves in the setting of Theorem 35; recall thatF = s/2 sη s(1η) s/2 , F Π = ΠF = s/4 sη/2 s(1η)/2 s/4 =: M. (5.46) Define θ = 2 η(1η); as in (5.43), the eigenvalues of M are with associated right and left eigenvectors

1 , 4 -αs + αsθ 2 = 4 -

 1424 (I -αM ) -1 f i,i -1 = 4(1αν 1 )(1αν 2 ) 2αs + α 2 s 2 1-θ 2

4

 4

  [h(ū i (x))h( Ūi (x))] 1 p j n σ(x)=i h(ū i (x))h( Ūi (x)) C p j n σ(x)=i ūi (x) -Ūi (x) C p j n √ p j n ūi -Ūi ,using the Cauchy-Schwarz inequality. Using (5.53), we are done.

Table 1 .

 1 1: Number of nodes, edges, and average degree of several real-world networks. Data is taken from the SNAP dataset collection[START_REF] Leskovec | SNAP Datasets: Stanford large network dataset collection[END_REF]

		Nodes	Edges	Average degree
	DBLP collaboration	317,080 1,049,866	6.62
	arXiv CondMat collaboration 23,133	93,497	8.08
	Enron emails	36,692	183,831	10.02
	Web graph (Google)	875,513 5,105,039	11.66

Table 2

 2

	.2.

  and a realization G of the graph under P 1 , any estimator K of the ground truth achieves negligible overlap, i.e. ov( K) = o(K).

	Its proof structure is as follows. Fix an arbitrary integer τ ≥ 1. We shall establish that necessarily
		ov(K) ≤ K/(τ + 1) + o(K).				(2.6)
	Fix	L = C ln(n) for some suitable constant C, D	L and D 2	n ln(n)	.	(2.7)
	Condition on the event the attack path is precisely k 1 , . . . , k K =: k K 1 . Chop the attack path into
	K/(L + D) contiguous segments, each of length M := L + D.
	Consider the -th segment {k ( -1)M +1 , . . . , k M }. We shall construct, for some I( ) ∈ [( -1)M + 1, ( -1)M + L], τ random paths of edges in the graph G of the form
		k I( ) , I 2 (t, ), I 3 (t, ), . . . , I D (t, ), k I( )+D
	for t ∈ [τ ] such that the nodes I 2 (t, ), . . . , I D (t, ) are all distinct, none of them belongs to the attack path, and such that the paths (k 1 , . . . , k K ) =: k K 1 and k I( ) 1 , I D 2 (t, ), k K I( )+D are
	statistically indistinguishable. More precisely, we have the following:
	Lemma 6. There is a construction, for any ∈ [K/M ], of τ random paths
		k I( ) , I 2 (t, ), I 3 (t, ), . . . , I D (t, ), k I( )+D , t ∈ [τ ],
	such that for any

  then this implies that with high probability, no E i occurs. Thus with high probability, there is no cycle in the connected component C. Moreover, the third evaluation in (2.23) ensures that

	i∈K

  hence (4.68) by a Markov bound.

  t w 2 =

					t-1		2
					W e i e i+1 w(e t ) 
	e∈ E	(e 0 ,...,et)∈P(e,t)	i=0
	≤ L 2	e∈ E	|P(e, t)|	(e 0 ,...,et)∈P(e,t)

  W ι(x t-1 ),ι(xt) W ι(x t-1

				t-1
		j	x 1 ,...,x t-1	s=1	W ι(x s-1 ),ι(xs) W ι(x s-1 ),ι(x s ) ×
			x 1 ,...,x t-1
		
	E t-1	 
		 x t-1 →xt
		x t-1 →x t

  over all values of x and plugging this into(5.19), thus obtaining:K t ϕ i,j (µ i µ j ) t ϑ . (5.35) Statement (5.35) is pretty close to (5.19), at the sole difference of the summation index, which is stopped at . Also, note that (5.35) is valid for every i, j in [r], not just in [r 0 ]. However, whenever i, j ∈ [r 0 ], we have by definition

	sup i,j	U i , U j -
	√ ρ	√	τ µ i and	√ ρ	√	τ µ j ,

t=0 1,

The Python software used for the numerical experiments in this paper will be available on a public repository.

In a preliminary version of this paper, the method SimpleHerm was incorrectly implemented.

ϑ 2t , and the same holds for A * and ψ i .

Remerciements

I don't know half of you half as well as I should like; and I like less than half of you half as well as you deserve.

Bilbo Baggins, The Lord of the Rings

We thus need to find a sufficient value for ; recall that i∈

and therefore there exists some values for i, j such that

A sufficient choice of ε is thus r(τ -1)/4, which yields an explicit value for K:

Proof of Lemma 15

We first recall some results about the neighbourhoods of vertices, whose proofs can be found in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]: Lemma 25. For a vertex i, define S t (i) as the number of vertices at distance t of i.

Then there exist constants C and ε > 0 such that with probability 1 -O(n -ε ), for all i ∈ {1, . . . n} and = O(log(n)):

On the other hand, with high probability, when = κ log α (n) with κ < 1/2:

Additionnally, a result about the almost tree-like structure of vertex neighbourhoods:

Lemma 26. Assume = κ log(n), with κ log(α) < 1/4. Then with high probability no node i has more than one edge cycle in its -neighbourhood; we say that G is -tangle-free.

Using those results, we are now able to prove Lemma 15:

Proof. From Lemma 26, we can deduce that if d(i, j) ≤ , there are at most two distinct paths between i and j. Therefore, B ( ) ij ≤ 2 for all i, j. Additionally, if D ( ) ij = 1, then there is a self-avoiding path of length between i and j, and thus B ( ) ij = 1, so δ ( ) ij ≥ 0 for all i, j. Finally, assume that there exists a pair i, j such that D ( ) ij = 0 and B ( ) ij = 2; then there are two paths of length between i and j and d(i, j) < so there is also a path of length less than . This contradicts Lemma 26. Consider now two vertices i and j such that δ ( ) ij = 1, there are two possibilities:

(i) D

( ) ij = 0 and B ( ) ij > 0: then d(i, j) < and there is a path of length < and at least a path of length between i and j.

(ii) D ( ) ij = 1 and B ( ) ij > 1: then there are at least two paths of length between i and j. In both cases, there are at least two paths of length at most connecting i and j, which implies the statement of the lemma. For each η the results are averaged over 50 samples (coloured zone is for standard errors).

The thin darker lines are u i , ϕ j for i, j ∈ {1, 2}. The thick lighter lines are our theoretical predictions ϕ i , ϕ j /µ i √ R i . The second eigenvector begins to be informative as soon as the second eigenvalue reaches ϑ, which happens at around 0.979 in agreement with our predictions.

Remark (Comments on the hypotheses. ). Under Hypothesis 1, if P ∞ C/n, then the expected degree of x ∈ [n] is d x = P x,1 + • • • + P x,n C so the average density d is smaller than C (sparse regime). Our proof holds in the semi-sparse regime d → ∞, d = n o (1) , but it is not our primary motivation. In this semi-sparse regime is can be proved that

Real diagonalizability in Hypothesis 2 is here to simplify the proof but the Master Theorem will hold for complex eigendecompositions. The low-rank assumption is standard in the litterature; it can be relaxed by replacing the rank with the effective rank, as in [START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF]. The separation assumption is not necessary for eigenvalue asymptotics, but strong separation is necessary for eigenvector overlaps.

Note that every bound in the hypotheses (such as the bound on W , the rank or the delocalization) can be extended to n o (1) at virtually no cost.

Theorem 31 follows the line of research initiated in [START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF][START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF] and continued by different works, among which [START_REF] Stephan | Non-backtracking spectra of weighted inhomogeneous random graphs[END_REF][START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF][START_REF] Pal | Community Detection in the Sparse Hypergraph Stochastic Block Model[END_REF]. We give an overview of the proof of Theorem 31 in Appendix 5.7.

Spectral embeddings of directed SBM

Model definition

A powerful aspect of our Master Theorem lies in its application to clustering in directed stochastic blockmodels. In the following, we fix a number of clusters r, and a number of vertices n, understood to be large. Let σ g , σ d : [n] → [r] be the left and right cluster assignments; that is, a vertex x is said to be in the i-th left (resp. right) cluster if σ g (x) = i (resp. σ d (x) = i). Let F be an arbitrary r × r matrix with positive entries; the directed SBM is then a random graph G = ([n], E) with vertex set [n] and such that for each directed edge (i, j), we have

The aim is then to recover the left (or right) cluster memberships, given an observation of G. Note that, for ease of exposition, we did not include weights: W is thus the all-one matrix, and in this setting we have

It is relatively simple to compute the spectral decomposition of Q in this setting:

Proposition 22. Let A be the adjacency matrix of G. The non-zero eigenvalues of P = E[A] are exactly those of the modularity matrix F Π, where

Additionnally, the associated left eigenvectors of P are constant on the right clusters, while the right eigenvectors are constant on the left clusters.

Therefore, as per our main theore, the left/right eigenvectors of the adjacency matrix of G are close to their expectation, which is constant on the right/left clusters. We thus expect a clustering algorithm on those eigenvectors to be able to recover at least a fraction of the community memberships. We refer to Appendix 5.9 for a more complete spectral analysis of the matrix P , as well as a formulation of Theorem 31 suited to the SBM setting.

Remark. Whenever σ g = σ d , as is often the case, both left and right eigenvectors are constant on the clusters; this effectively doubles the signal to recover σ d .

An important question to ask is the following: how many eigenvectors of A do we need to be able to reconstruct the clusters ? It is often assumed that r eigenvectors are needed to recover the memberships (see e.g. [START_REF] Von | A tutorial on spectral clustering[END_REF]). However, in our DSBM setting, we propose the following heuristic:

Partial cluster recovery is possible as soon as the first r 0 eigenvectors of E [A] are sufficient to recover the clusters.

Here, r 0 is the same as in Theorem 31, and denotes the number of eigenvalues of E[A] that get reflected in the spectrum of A. Since we showed that the eigenvectors of E[A] are constant on the clusters, this is equivalent to the function k → (ψ 1 (k), . . . , ψ r 0 (k)) being injective, where the ψ i are the right (resp. left) eigenvectors of F Π (resp. ΠF ). This can happen when r 0 r, and even in some cases when r 0 = 1, which is a huge improvement on the threshold for reconstruction. Additional eigenvectors may of course increase the recovery accuracy; however, in some cases, the additional information they bring is nullified by the increase in dimensions for the clustering algorithms.

SBM with a pathwise structure

General case. We restrict to the classical SBM described earlier, with a specific shape known as pathwise structure, and notably studied in [START_REF] Laenen | Higher-order spectral clustering of directed graphs[END_REF]. It is a good model for flow data. In this model, we have σ d = σ g , and the clusters partition Here n = 2000, s = 10 and η = .99 > η(10) =, thus r 0 = 2. The Score is the adjusted overlap in (5.9). Middle. For the two-block model with η ∈ [0.5, 1] we plotted the average Adjusted overlap over 100 runs of several clustering methods on spectral embeddings using either the embedding with the Perron vector x → (u 1 (x), 0) (solid lines) or the embedding with two dominant eigenvectors x → (u 1 (x), u 2 (x)) (dashdot lines). In the inset we see that the performance of GMM is not reduced by the addition of the second informative eigenvector at the critical point η(10).

Gaussian Mixture clustering and Gaussian fluctuations

In Figure 5.4, we performed some experiments regarding which clustering method to use on the spectral embedding. We simply used three popular methods, implemented in Python's Sklearn library ( [START_REF] Pedregosa | Scikit-learn: Machine learning in Python[END_REF]):

• k-means, the most popular method in graph clustering,

• Spectral-Clustering, which solves a norm-cut problem on the singular vectors of a distance matrix, a method known to be powerful when the clusters are non-convex,

• Gaussian Mixture clustering, which fits the parameters of a mixture of gaussians to the data using the E-M algorithm.

The first panel in Figure 5.4 is only a visual illustration of what spectral embeddings on a two-block SBM looks like. Here, the parameters are η = 0.99 and s = 10; our theory shows that there are two outliers in the spectrum of A. Our spectral embedding X in (5.7) has thus four dimensions (we use the left and right eigenvectors). For better visualization, we simply took the

A bird's eye view on the proof of Theorem 31

The proof of Theorem 31 follows the celebrated high-trace method, introduced in [START_REF] Massoulié | Community Detection Thresholds and the Weak Ramanujan Property[END_REF][START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]. Considerable advances and simplifications have recently been made; on one hand, [START_REF] Stephan | Non-backtracking spectra of weighted inhomogeneous random graphs[END_REF] performed this method on the non-backtracking matrix of weighted, inhomogeneous undirected graphs; on the other hand, [START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF] performed this method on the adjacency matrix of weighted, homogeneous directed graphs. In both of these papers, the underlying matrices P and W were Hermitian, which is no longer the case here. Our Master Theorem bridges the gap, and considers the adjacency matrix of weighted, inhomogeneous directed graphs with general P, W .

We hereby sketch the main ideas at a high level, and when needed we link our proof with the formerly cited papers. We emphasize that the proofs of theorems like Theorem 31 are often very technical. In this appendix, we tried to be as elementary as possible, to hide the technical details already written in other papers, and to give a short, accessible summary of the proof ideas -at the cost of completeness.

Warmup: notations

Probabilistic domination. For readability, we introduce notations regarding the asymptotic order of real random variables. Let

be two families of real random variables. We write X Y if there is a constant D such that for every constant c > 0, for n large enough,

in other words, |X n | is smaller than |Y n | up to logarithmic terms, with probability smaller than every polylogarithm (typically, n δ for small δ). Finally, we write X Y if for every constants c, D > 0, for n large enough,

In other words, |X n |/|Y n | goes to zero faster than every polylogarithm. With this handy device, it is easily seen that X n Y n and Y n Z n imply X n Z n . These notations are common in the field of random matrix theory, and they truly simplify the exposition compared with [START_REF] Stephan | Non-backtracking spectra of weighted inhomogeneous random graphs[END_REF][START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF]. Spectral decomposition. Before starting, we write the spectral decomposition of

The µ i are the r nonzero eigenvalues; we order them by decreasing modulus,

The ϕ i are the corresponding unit right eigenvectors; they do not always an orthonormal basis, because Q has not been supposed normal. The ψ i are the unique (up to a sign) left eigenvectors satisfying ϕ i , ψ j = δ i,j , and in general they do not have unit-length. In the statement of the Master Theorem, the unit left eigenvectors ξ i are thus ψ i /|ψ i |.

Theorem 34 (Pseudo-Master Theorem). For a sufficiently small choice of κ, the following holds.

(i) U and V are nearly inverses:

(ii) U and Ψ are nearly inverses, and V and Φ are nearly inverses:

(iii) V and U nearly diagonalize A :

(iv) Γ left is nearly the Gram matrix of U , and the same for Γ right and V :

A is negligible outside of the vector spaces spanned by the pseudo-eigenvectors:

where Proj C ⊥ denotes the projection matrix on the orthocomplement of the subspace C.

A crucial point in this theorem is that the error scale (up to polylog factors) is ϑ: only the last bound, (5.20), is actually sharp. The other error terms are meant to be negligible.

Proving the Pseudo-Master Theorem (PMT) is really the core of the proof, and where lie most of the difficulties. From the PMT, it is only a matter of linear algebra and perturbation theory to prove the Master Theorem: we simply summarize the spirit in the next subsection, and we quickly jump to the proof of the PMT.

Master Theorem = Pseudo-Master Theorem + perturbation theory

Given the statements in the preceding subsection, the main theorem follows from a standard algebraic analysis, which builds on detailed quantitative variants of the Bauer-Fike theorem. We refer the reader to the comprehensive studies in [91, Section 4] or [START_REF] Bordenave | Detection thresholds in very sparse matrix completion[END_REF]Section 8], which are technical, but can be applied directly without any further modification. In this short paragraph, we simply explain the ideas.

The main trick is to define a matrix S = U Σ V * . If we had V * U = I, this matrix would be exactly diagonalizable with eigenvalues µ i ; but V * U is only close to I. Fortunately, it is easily seen that if U, V are well-conditioned, then S is diagonalizable, with eigenvalues close to the µ i and eigenvectors close to the U i , V j . The fact that U, V are well-conditioned follows from (5.19): by continuity, their condition number is close to the condition number of Γ right , Γ left , who in turn are bounded: Lemma 43. The condition numbers of the matrices Γ right , Γ left , U, V are all 1.

Proof. Note π s (x) = (K * ) s 1(x) and Π s = diag(π s ). It is easily seen that 1, K s ϕ i,j = (Φ * Π 2 s Φ) i,j . The matrix Γ left is thus a sum of semi-definite positive matrices, with first term I 0 , so its smallest eigenvalue is 1 and its condition number is smaller than Γ left . On the other hand, note that | 1, K s ϕ i,j | |1||ϕ i,j |ρ s . Thanks to (5.2), we have |ϕ i,j | c 1/n for some c; consequently, (Γ left ) i,j c ρ s /(µ i µ j ) s c/(1τ ) 1. Finally, since the size r 0 is also 1, we have Γ left 1 and the condition number is 1. By the Weyl inequalities and (5. [START_REF] Benaych-Georges | Largest eigenvalues of sparse inhomogeneous Erdős-Rényi graphs[END_REF],

We note (G, x) t the forward neighbourhood of radius t around x in G, that is: the subgraph spanned by vertices y, for which there is a directed path with length smaller than t from x to y. The crucial choice will be the depth at which we look into the graph. We recall

where κ is an explicit constant depending on d. With such a choice, we have the crucial property that shallow neighborhoods are nearly trees. We say that a graph is t-tangle-free if for every vertex x, the subgraph (G, x) t has no more than one directed cycle.

Lemma 44. There is a constant c = c(d) such that G is 2 -tangle-free with probability 1-n -c . Moreover, if N is the number of vertices x such that (G, x) 2 contains a cycle, then N 1.

The proof Lemma 44 follow from the choice of the constant κ in (5.8.1). We refer to [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF] for the details.

The graph is locally approximated by trees

Let x be a vertex in G, and N (x) the set of its neighbours (in the forward sense: y is a neighbor or x if (x, y) ∈ E, not necessarily when (y, x) ∈ E). Then N (x) has the following distribution : each vertex y = x is present in N (x) with probability P x,y , independently from all other vertices. It is a well-known fact that whenever the P x,y are small, the law of |N (x)| is well approximated by Poi(d x ) (the so-called 'rare events theorem'). Moreover, conditionnally on {N (x) = ∅}, the distribution of a random element in N (x) is equal to π x , where

(

That being said, the distribution of k elements in N (x) is not the product distribution (π x ) ⊗k because the elements have dependencies (they cannot be chosen multiple times, for instance), but these dependencies are nearly nonexistent. In fact, let us introduce a new distribution Q x on random multi-sets.

• The number of elements of the random multiset M(x) under Q x is a Poisson random variable with mean d x ;

• Conditionnally on |M(x)| = k, each of these k element is sampled independently on [n] with probability distribution π x .

The following proposition is a rigorous formulation of the intuitions given above. We set

Proposition 23. [116, Lemma 8] We have

Building from those remarks, we define a random tree T x as follows :

• the root (at depth 0) is a single vertex labeled x,

• for each vertex i at depth t with label x i , the children of i at depth t + 1 with their labels have the joint distribution M(x i ), independently from all other vertices at depth t.

With this definition, the tree T x is formally undirected, but we can view it as a directed tree with directions flowing out of the root. Proposition 23 then implies that the neighbourhood distributions in T x and G are similar, as summarized in the following result: Indeed, adopting again the notations from 5.8.4, we have to compute the expectation on the tree of the t + 1-local function

which can be understood as the increment variance of the martingale Ũi (x, t). Subsequently, we can use the same arguments as in 5.8.7 with i = j, which shows

Summing this for x ∈ [n] and applying Proposition 24, we are done.

Master Theorem for the stochastic block model

We recall the definition of P : given the cluster membership functions σ g , σ d : [n] → [r] and a connectivity matrix F of size r × r, the entries of P are given by

We introduce the probability vectors p, q, which are equal to the relative clusters sizes, as well as the 'cluster intersection' matrix Π:

The cluster membership matrices Σ g , Σ d are matrices of size n × r, defined by

With these notations, the following identities hold:

(5.39)

Spectral decomposition of P

We prove in this section a slightly refined version of Proposition 22.

Proposition 25. The non-zero eigenvalues of P are exactly those of the modularity matrix F Π, with the same multiplicities. Further, each right eigenvector of P is of the form Σ g f , where f is a right eigenvector of F Π, while each left eigenvector of P is of the form Σ d g with g a left eigenvector of ΠF .

The proof of this proposition relies on the following elementary lemma, a consequence of the Sylvester identity det(z -XY ) = det(z -Y X).

Lemma 50. Let X be a n × m matrix and Y a m × n matrix. Then the non-zero eigenvalues of XY are the same as those of Y X, with identical multiplicities. of Proposition 25. We apply the above lemma to X = Σ g and Y = 1 n F (Σ d ) * ; the identities in (5.39) show that XY = P and Y X = F Π, which directly gives the desired result. Now, let f be a right eigenvector of F Π, with associated eigenvalue λ, and define ϕ = Σ g f . Then

Combined with the previous result, this implies that all right eigenvectors of P with non-zero eigenvalues are of the form Σ g f for an eigenvector f of F Π. In particular, they are constant on the left clusters. The result on left eigenvectors is proved similarly.

Let f 1 , . . . , f r (resp. g 1 , . . . , g r ) be a basis of right (resp. left) eigenvectors of F Π (resp. ΠF ), not necessarily normalized. We define the entrywise products f i,j and g i,j as in equation (5.12). The following statement describes the unit eigenvectors of P in terms of f i , g j .

Lemma 51. Let (ϕ i ) (resp. (ξ i )) be a basis of normed right (resp. left) eigenvectors of P . Then

Proof. In light of Proposition 25, we only have to compute the norms of Σ g f i and Σ d g i :

The first equality follows, and the second is proved in identical fashion.

Master Theorem for SBM

We are now ready to prove the version of the Master Theorem, adapted to the directed SBM.

Theorem 35. Let r 0 be the number of eigenvalues ν i such that ν 2 i > ν 1 . Then, with high probability the following holds: the r 0 highest eigenvalues λ 1 , . . . , λ r 0 of A satisfy

and all other eigenvalues of A are asymptotically smaller that √ ν 1 . Further, if v i , u i are a pair of left/right unit eigenvectors of A associated with λ i , then

where a i,j and b i,j are defined as

b i,j = q, g i,j

q, g j,j q, (Iν -2 i (ΠF ) * ) -1 g i,i

(

The first part of this theorem is an application of Theorem 31, by means of Proposition 25. It remains to compute the a i,j and b i,j as a function of the SBM parameters. We recall that the definition of Γ and Γ * are in (5.13).

Lemma 52. Let z ∈ C, and h ∈ R r . Then

Proof. Since the graph is unweighted, we have K = P . By an immediate recursion, we have

so that using the first identity of (5.39)

Summing over all t and using the Von Neumann summation implies the first equality, and the second is alike.

As a result,

where we used the previous lemma, and similarly

of Theorem 35. Using the expressions in Theorem 31, we have

Computing the numerators is straightworward using Lemma 51:

p, f i,i p, f j,j .

On the other hand, for the denominator, we have

and using Lemma 52 we find

It simply remains to simplify the expressions to prove the formula for a i,j , and the exact same method works for b i,j as well.

Pathwise SBM

In this section, we derive the thresholds shown in Subsection 5.3.2. Let us first give some motivation on this model.

Motivation

Stochastic block-models with a pathwise structure as in (5.5) are well suited for modeling flow data: the intra-block connectivity is the same s/2 in any blocks; connections can only happen between adjacent blocks and the rate depends on the flow order: edges have a higher chance of appearing from one block V i to the following V i+1 , than between one block V i and the preceding one V i-1 (η versus 1η). The model in [START_REF] Laenen | Higher-order spectral clustering of directed graphs[END_REF] is a small variant of this one: in their model, undirected edges appear between adjacent blocks, and then one direction is chosen uniformly at random with probability η for edges between adjacent blocks, and with probability 1/2 for edges inside the same block. Our model allows the appearance of a double edge (x, y), (y, x), which is not the case in their model. However, in the sparse regime where s does not depend on n, the two models are contiguous and our results can be shown to hold for both.

Remark. The works [START_REF] Van Lierde | Spectral clustering algorithms for directed graphs[END_REF][START_REF] Van Lierde | Spectral clustering algorithms for the detection of clusters in block-cyclic and block-acyclic graphs[END_REF] are close in spirit to ours, although they do not approach sparse regimes. We chose to perform the computations for the specific F above, but the same computations can be done for other models. In particular, it would be interesting to perform these computations for the matrix given in [START_REF] Van Lierde | Spectral clustering algorithms for directed graphs[END_REF], p. 73 and to recover the shape observed by the author in Figs 2.23-24.

Model density

Let us compute the mean degree d in this model, when there are k blocks and the asymmetry parameter is η. All the blocks have the same size n/k, hence they have (n/k) 2 entries; on the k diagonal blocks, the mean degree is s/2, on the k -1 upper-diagonal blocks it is s(1η) and on the k -1 lower diagonals they are sη, so

For each k, the unique parameter s such that the model has mean degree d is given by s(k, d) = kd(3/2k -2 ) -1 . Table 5.1 gives the values of s used in our simulations in

Eigendecomposition of tridiagonal Toeplitz matrices.

Since the blocks on the right and on the left are identical and have the same size n/r, the formulas in Theorem 35 are really easy to use.

Let F be the tridiagonal k × k Toeplitz matrix defined in (5.5). We extract the following formulas from [START_REF] Noschese | Tridiagonal Toeplitz matrices: Properties and novel applications[END_REF] (see (4) for eigenvalues and ( 7)-( 8) for eigenvectors). The k eigenvalues are .43) and the corresponding right-eigenvectors f i and left-eigenvectors g i are

Computations when there are two blocks

We defined η(s) as the unique number in [0, 1] such that

with θ(η) = 2 η(1η) (see also Figure 5.6). The inverse θ -1 : [0, 1] → [1/2, 1] is given by

Now, the solution x of the equation

is the solution of the quadratic sx 2 -(2s + 4)x + s -4 = 0. The discriminant is δ(s) = 16(2s + 1) and the unique solution in [0, 1] is

Finally, the smallest η(s) for which (5.45) is satisfied is η

It is possible to expand the term inside the square root, but with no meaningful gain. The function η(s) has the series expansion

but the convergence is very slow: the truncated RHS is less than one only whenever s ≥ 32.

Convergence of eigenvectors

The goal of this section is to prove Theorem 33. We place ourselves in the stochastic block model setting as in Section 5.3, with σ g = σ d = σ and q = p. We assume that F and p are constant with n, so that the modularity matrix M doesn't depend on n.

Convergence of Ũi (x)

We consider the multitype Galton-Watson trees (T j , o) as defined in [START_REF] Bordenave | Non-backtracking Spectrum of Random Graphs: Community Detection and Non-regular Ramanujan Graphs[END_REF]: the root o has type σ(o) = j, and afterwards, each vertex with type i has Poi(M i,k ) children of type k. Unlike our initial trees T x , which are heavily n-dependent with node labels in [n] and edge probabilities P x,y , the tree T j does not depend on n, and its labels are in [r]. We define on those trees the random processes

where N k (T j , t) counts the number of vertices of type k at depth t in T j . Assume that we have chosen the f i such that φ i = Σ d f i has unit norm; we recall that the processes Ũi (x, t) were defined in (5.27)-(5.28).

Lemma 53. Let x ∈ [n], and define j = σ(x). Then the processes Ũi (x, t) and U i (j, t) have the same distribution.

Proof. Let σ(T x ) be the tree where a vertex with label y is mapped to a vertex with label σ(y).

Then the root of σ(T x ) has label σ(x) = j. Take a vertex in T x with label y, and let σ(y) = i; the number of children of y with type k has distribution Poi( Myk ), with

Using the definition of P for the SBM, we have

Therefore, the laws of σ(T x ) and T j coincide. Now, since there are no weights the product in (5.27) is equal to 1 and we have

replacing ϕ by its definition in terms of f i ,

which ends the proof.

This lemma allows us to translate results back and forth between the T x and the T σ(x) ; we thus know from the expectation/correlation computations in Subsections 5.8.5-5.8.7 that U i (j, t) (with j = σ(x)) is a martingale with E[U i (j, t)] = f i (j) and E[U i (j, t) 2 ] Γ right (i, i).

By the Doob martingale convergence theorem, this implies that U i (j, t) converges in L 2 as t → ∞ towards a random variable Z i,j . Since we have convergence in L 2 , it entails

In the last line, we used computations from Appendix 5.9 to determine the limit. Another important fact is that the law of U i (j, t) does not depend on n whatsoever. This implies that U i (j, ) converges to Z i,j as n → +∞, which in turn yields the following proposition. Proposition 27. Let Z i,j be the limit of the random process U i (j, t). Then, (5.49)

Ũi (x)

Convergence of the pseudo-eigenvectors

Now that we showed convergence on the random tree, we shall use the concentration proposition 24 to translate it on the graph. Let h : R → R be a bounded continuous function, and define f (G, x) = 1 p j n 1 σ(x)=j h(U i (x)).

The function f satisfies the hypotheses of Proposition 24 since h is bounded, and we have f (T x , x) = 1 p j n 1 σ(x)=j h( Ũi (x))

Using Proposition 27, and the fact that L 2 convergence implies convergence in distribution,

uniformly in x, so that summing over all vertices

(5.50)

The above equation implies immediately that the discrete distribution of the U i (x) with σ(x) = j converges weakly to Z i,j ; in other words, p, (Iν -2 i M ) -1 f i,i and σ 2 i,j = (Iν -2 i M ) -1 f i,i (j) p, (Iν -2 i M ) -1 f i,i .

(5.52)

Now comes the last step of our proof; let ūi be a right eigenvector of A such that |ū i | = √ n (one can take ūi = √ nu i ). Then, (5.21) implies that ūi -Ūi √ n.

(5.53)