Consensus, Flocking and Opinion Dynamics

Similar documents
Average-Consensus of Multi-Agent Systems with Direct Topology Based on Event-Triggered Control

Consensus Protocols for Networks of Dynamic Agents

Hegselmann-Krause Dynamics: An Upper Bound on Termination Time

Complex Laplacians and Applications in Multi-Agent Systems

MULTI-AGENT TRACKING OF A HIGH-DIMENSIONAL ACTIVE LEADER WITH SWITCHING TOPOLOGY

Consensus Problem in Multi-Agent Systems with Communication Channel Constraint on Signal Amplitude

Multi-Robotic Systems

NCS Lecture 8 A Primer on Graph Theory. Cooperative Control Applications

Decentralized Stabilization of Heterogeneous Linear Multi-Agent Systems

Structural Consensus Controllability of Singular Multi-agent Linear Dynamic Systems

A Graph-Theoretic Characterization of Controllability for Multi-agent Systems

Theory and Applications of Matrix-Weighted Consensus

Lecture 4: Introduction to Graph Theory and Consensus. Cooperative Control Applications

Reaching a Consensus in a Dynamically Changing Environment A Graphical Approach

Obtaining Consensus of Multi-agent Linear Dynamic Systems

Fast Linear Iterations for Distributed Averaging 1

Lecture 1 and 2: Introduction and Graph theory basics. Spring EE 194, Networked estimation and control (Prof. Khan) January 23, 2012

Flocking while Preserving Network Connectivity

Tracking control for multi-agent consensus with an active leader and variable topology

Exact Consensus Controllability of Multi-agent Linear Systems

Research on Consistency Problem of Network Multi-agent Car System with State Predictor

Convergence Rate for Consensus with Delays

Tropical Graph Signal Processing

Chapter 11. Matrix Algorithms and Graph Partitioning. M. E. J. Newman. June 10, M. E. J. Newman Chapter 11 June 10, / 43

Graph Theoretic Methods in the Stability of Vehicle Formations

Discrete Double Integrator Consensus

LAPLACIAN MATRIX AND APPLICATIONS

Multi-Hop Relay Protocols for Fast Consensus Seeking

Robust Connectivity Analysis for Multi-Agent Systems

Consensus Problems on Small World Graphs: A Structural Study

Lecture 13: Spectral Graph Theory

Coordination of Groups of Mobile Autonomous Agents Using Nearest Neighbor Rules

Consensus of Information Under Dynamically Changing Interaction Topologies

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

Zeno-free, distributed event-triggered communication and control for multi-agent average consensus

Existence and uniqueness of solutions for a continuous-time opinion dynamics model with state-dependent connectivity

Lecture 12: Introduction to Spectral Graph Theory, Cheeger s inequality

Distributed Adaptive Consensus Protocol with Decaying Gains on Directed Graphs

Distributed Coordinated Tracking With Reduced Interaction via a Variable Structure Approach Yongcan Cao, Member, IEEE, and Wei Ren, Member, IEEE

Consensus Stabilizability and Exact Consensus Controllability of Multi-agent Linear Systems

Finite-Time Distributed Consensus in Graphs with Time-Invariant Topologies

Convergence Properties of Dynamic Agents Consensus Networks with Broken Links

Scaling the Size of a Multiagent Formation via Distributed Feedback

Agreement Problems in Networks with Directed Graphs and Switching Topology

1 Matrix notation and preliminaries from spectral graph theory

Symmetric Continuum Opinion Dynamics: Convergence, but sometimes only in Distribution

Clustering and asymptotic behavior in opinion formation

Multi-Hop Relay Protocols for Fast Consensus Seeking

Effective Sensing Regions and Connectivity of Agents Undergoing Periodic Relative Motions

1520 IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. 49, NO. 9, SEPTEMBER Reza Olfati-Saber, Member, IEEE, and Richard M. Murray, Member, IEEE

Discrete-time Consensus Filters on Directed Switching Graphs

Optimal Network Topology Design in Multi-Agent Systems for Efficient Average Consensus

Majorizations for the Eigenvectors of Graph-Adjacency Matrices: A Tool for Complex Network Design

Max-Consensus in a Max-Plus Algebraic Setting: The Case of Fixed Communication Topologies

Consensus Seeking in Multi-agent Systems Under Dynamically Changing Interaction Topologies

Chap. 3. Controlled Systems, Controllability

OUTPUT CONSENSUS OF HETEROGENEOUS LINEAR MULTI-AGENT SYSTEMS BY EVENT-TRIGGERED CONTROL

CS168: The Modern Algorithmic Toolbox Lectures #11 and #12: Spectral Graph Theory

Consensus Seeking in Multi-agent Systems Under Dynamically Changing Interaction Topologies

Distributed Optimization over Random Networks

The Multi-Agent Rendezvous Problem - The Asynchronous Case

Lecture Introduction. 2 Brief Recap of Lecture 10. CS-621 Theory Gems October 24, 2012

Consensus Problems in Complex-Weighted Networks

Stability of Switched Linear Hyperbolic Systems by Lyapunov Techniques

Consensus seeking on moving neighborhood model of random sector graphs

Information Aggregation in Complex Dynamic Networks

Convex Optimization of Graph Laplacian Eigenvalues

arxiv: v1 [math.oc] 24 Dec 2018

Notes on averaging over acyclic digraphs and discrete coverage control

Balanced Truncation 1

Locally convex spaces, the hyperplane separation theorem, and the Krein-Milman theorem

SJÄLVSTÄNDIGA ARBETEN I MATEMATIK

Active Passive Networked Multiagent Systems

Putzer s Algorithm. Norman Lebovitz. September 8, 2016

Lecture 3: graph theory

Notes on averaging over acyclic digraphs and discrete coverage control

On the Scalability in Cooperative Control. Zhongkui Li. Peking University

Synchronization Transitions in Complex Networks

ON SEPARATION PRINCIPLE FOR THE DISTRIBUTED ESTIMATION AND CONTROL OF FORMATION FLYING SPACECRAFT

An Algorithmist s Toolkit September 10, Lecture 1

On Asymptotic Synchronization of Interconnected Hybrid Systems with Applications

The goal of this chapter is to study linear systems of ordinary differential equations: dt,..., dx ) T

Rate of Convergence of Learning in Social Networks

Consensus Problems in Networks of Agents with Switching Topology and Time-Delays

The Matrix-Tree Theorem

CS 556: Computer Vision. Lecture 13

Note on deleting a vertex and weak interlacing of the Laplacian spectrum

A Graph-Theoretic Characterization of Structural Controllability for Multi-Agent System with Switching Topology

Convergence in Multiagent Coordination, Consensus, and Flocking

An Introduction to Spectral Graph Theory

Lecture 12 : Graph Laplacians and Cheeger s Inequality

A linear algebra proof of the fundamental theorem of algebra

1 Matrix notation and preliminaries from spectral graph theory

CRITICALITY ASSESSMENT VIA OPINION DYNAMICS

On Distributed Coordination of Mobile Agents with Changing Nearest Neighbors

Math 443/543 Graph Theory Notes 5: Graphs as matrices, spectral graph theory, and PageRank

A linear algebra proof of the fundamental theorem of algebra

8.1 Concentration inequality for Gaussian random matrix (cont d)

Hierarchical Clustering and Consensus in Trust Networks

Stability of Feedback Solutions for Infinite Horizon Noncooperative Differential Games

Transcription:

Consensus, Flocking and Opinion Dynamics Antoine Girard Laboratoire Jean Kuntzmann, Université de Grenoble antoine.girard@imag.fr International Summer School of Automatic Control GIPSA Lab, Grenoble, France, September 2010 A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 1 / 88

Scientific context Networks everywhere: Biological networks (genetic regulation, ecosystems...) Technological networks (internet, sensor networks...) Economical networks (production and distribution networks, financial networks...) Social networks (scientific collaboration networks, Facebook...) A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 2 / 88

Emerging behaviors in networks Distributed decision making in a network. Each agent collaborates/negotiates locally with its neighbors in a network. The process succeeds if all agents eventually agree globally on some quantity of interest. Examples: bird flocks, fish schools, market prices... A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 3 / 88

Example: flocking in mobile networks Consider a set of agents willing to move in a common direction: Agent i is characterized by its position x i and velocity v i. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 4 / 88

Example: flocking in mobile networks Consider a set of agents willing to move in a common direction: Agent i has limited communication or sensing capabilities. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 4 / 88

Example: flocking in mobile networks Consider a set of agents willing to move in a common direction: Agent i tries to align its velocity on its neighbors: v i = j N i (v j v i ). A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 4 / 88

Example: flocking in mobile networks Consider a set of agents willing to move in a common direction: The communication network is described by a (dynamic) graph. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 4 / 88

Example: flocking in mobile networks Consider a set of agents willing to move in a common direction: Global linear dynamics with structure given by the graph: v = Lv. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 4 / 88

Example: flocking in mobile networks Consider a set of agents willing to move in a common direction: Do the agents eventually agree on a common velocity? A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 4 / 88

What we will see in this lecture This lecture is not meant to give an exhaustive description of the area... Instead, we will provide a deeper insight on a small number of representative results. Main references used while preparing the lecture: C. Godsil & G. Royle, Algebraic Graph Theory, Springer 2001. R. Olfati-Saber, J.A. Fax & R.M. Murray, Consensus and cooperation in networked multi-agent systems, Proc. IEEE, 2007. V.D. Blondel, J.M. Hendrickx, A. Olshevsky & J.N. Tsitsiklis, Convergence in multiagent coordination, consensus, and flocking, Proc. CDC, 2005. L. Moreau, Stability of continuous-time distributed consensus algorithms, Proc. CDC, 2004. S. Martin & A. Girard, Sufficient conditions for flocking via graph robustness analysis, Proc. CDC, 2010. C. Morarescu & A. Girard, Opinion dynamics with decaying confidence: application to community detection in graphs, ArXiv, 2009. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 5 / 88

Lecture outline 1 Algebraic graph theory Basic graph notions Laplacian matrix Normalized Laplacian matrix 2 Consensus Algorithms: Discrete time and continuous time Agreement in networks with fixed topology Agreement in networks with dynamic topology 3 Applications: Flocking in mobile networks Opinion dynamics and community detection in social networks A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 6 / 88

Graphs Definition A graph is couple G = (V, E) consisting of: A finite set of vertices V = {1,..., n}; A set of edges, E V V. We assume G has no self-loops ( i V, (i, i) / E) and is undirected ( i, j V, (i, j) E (j, i) E). Definition In an undirected graph G = (V, E): The neighborhood of a vertex i V is the set N i = {j V (i, j) E}. The degree of a vertex i V is d i = N i. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 7 / 88

Example A simple graph: V = {1, 2, 3, 4, 5} E = {(1, 2), (1, 3), (2, 4), (2, 5), (3, 5), (4, 5)... (2, 1), (3, 1), (4, 2), (5, 2), (5, 3), (5, 4)} 1 2 3 4 5 N 1 = {2, 3}, d 1 = 2 N 2 = {1, 4, 5}, d 2 = 3 N 3 = {1, 5}, d 3 = 2 N 4 = {2, 5}, d 4 = 2 N 5 = {2, 3, 4}, d 5 = 3 A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 8 / 88

Subgraphs Definition A graph G = (V, E ) is a subgraph of G = (V, E) if V V and E E. In addition, if V = V then G is a spanning subgraph of G. The subgraph of G induced by a set of vertices V V is the graph G = (V, E ) where E = E V V. 1 1 2 3 2 2 3 2 4 5 4 5 4 5 4 5 initial graph subgraph spanning subgraph induced subgraph A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 9 / 88

Connectivity notions Definition A path in a graph G = (V, E) is a finite sequence of edges (i 1, i 2 ), (i 2, i 3 ),..., (i p, i p+1 ) such that (i k, i k+1 ) E for all k {1,..., p}. Definition In a graph G = (V, E), two vertices i, j V are connected if there exists a path joining i and j (i.e. i 1 = i, i p+1 = j). G is connected if for all i, j V, i and j are connected. A subset of vertices V V is a connected component of G if: 1 For all i, j V, i and j are connected; 2 For all i V, for all j V \ V, i and j are not connected. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 10 / 88

Example 1 2 3 1 2 3 4 5 Path joining 1 and 5 1 2 3 4 5 Graph is connected 1 2 3 4 5 Graph is not connected 4 5 Connected components A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 11 / 88

Adjacency and degree matrices Definition The adjacency matrix of a graph G = (V, E) is the n n symmetric matrix A = (a ij ) given for all i, j V by: a ij = { 1 if (i, j) E, 0 otherwise. Definition The degree matrix of G is the n n diagonal matrix D = (d ij ) given for all i, j V by: { di if i = j, d ij = 0 otherwise. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 12 / 88

Example 1 2 3 4 5 A = D = 0 1 1 0 0 1 0 0 1 1 1 0 0 0 1 0 1 0 0 1 0 1 1 1 0 2 0 0 0 0 0 3 0 0 0 0 0 2 0 0 0 0 0 2 0 0 0 0 0 3 A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 13 / 88

Laplacian matrix Definition The Laplacian matrix of a graph G = (V, E) is the n n symmetric matrix L = (l ij ) given for all i, j V by: d i if i = j, l ij = 1 if (i, j) E, 0 otherwise. We have L = D A. 1 2 3 4 5 L = 2 1 1 0 0 1 3 0 1 1 1 0 2 0 1 0 1 0 2 1 0 1 1 1 3 A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 14 / 88

Normalized Laplacian matrix Definition The normalized Laplacian matrix of a graph G = (V, E) is the n n symmetric matrix L = (l ij ) given for all i, j V by: 1 if i = j and d i 0, l ij = 1/ d i d j if (i, j) E, 0 otherwise. If d i > 0 for all i V, then L = I D 1/2 AD 1/2 = D 1/2 LD 1/2. 1 2 3 4 5 L = 1 1 6 1 2 0 0 1 6 1 0 1 6 1 3 1 2 0 1 0 1 6 0 1 6 0 1 1 6 0 1 3 1 6 1 6 1 A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 15 / 88

Fundamental property of the Laplacian matrix Theorem (Sum of squares property) Let L be the Laplacian matrix of a graph G = (V, E) then, for all x R n : x Lx = 1 (x i x j ) 2. 2 (i,j) E Proof: For all x R n, x Lx = x i l ij x j = x i (d i x i x j ) i V j V i V (i,j) E = x i i x j ) = i V (i,j) E(x (xi 2 x i x j ) i V (i,j) E = (xi 2 x i x j ) (i,j) E A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 16 / 88

Fundamental property of the Laplacian matrix Theorem (Sum of squares property) Let L be the Laplacian matrix of a graph G = (V, E) then, for all x R n : x Lx = 1 2 (x i x j ) 2. (i,j) E Proof: Since whenever (i, j) E, (j, i) E we have (xi 2 x i x j ) = (xj 2 x i x j ). It follows that x Lx = 1 2 (i,j) E (i,j) E (xi 2 2x i x j + xj 2 ) = 1 2 (i,j) E (x i x j ) 2. (i,j) E A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 16 / 88

Laplacian matrix of a subgraph Corollary Let G = (V, E) be a graph and L its Laplacian matrix, let G = (V, E ) be a spanning subgraph of G and L its Laplacian matrix. Then, for all x R n, x Lx x L x Proof: By the SOS property, x Lx = 1 2 (i,j) E (x i x j ) 2 = 1 (x i x j ) 2 + 1 (x i x j ) 2 2 2 (i,j) E (i,j) E\E 1 2 (i,j) E (x i x j ) 2 = x L x. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 17 / 88

Eigenvalues of the Laplacian matrix Proposition The Laplacian matrix L of an undirected graph G = (V, E) is symmetric positive. 0 is an eigenvalue of L with associated eigenvector 1 n. Proof: Symmetry is consequence of G being undirected. By the SOS property, x R n, x T Lx = 1 (x i x j ) 2 0 2 which gives L positive. Let y = L1 n, then y i = j V l ij = d i + (i,j) E (i,j) E 1 = d i d i = 0. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 18 / 88

Eigenvalues of the Laplacian matrix Proposition 0 is a simple eigenvalue of L if and only if the graph G is connected. Proof: ( = ) Assume the graph is not connected, then there exists a connected component of G, V V. Let x R n, such that x i = 1 if i V and x i = 0 otherwise, let y = Lx. Then, i V, y i = l ij x j = l ij = l ij l ij = 0 j V j V j V j V \V i V \ V, y i = l ij x j = l ij = 0. j V j V Then x α1 n is an eigenvector of L for eigenvalue 0. 0 is not simple. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 19 / 88

Eigenvalues of the Laplacian matrix Proposition 0 is a simple eigenvalue of L if and only if the graph G is connected. Proof: ( =) Assume the graph is connected. Let x such that Lx = 0. Then the SOS property gives: (x i x j ) 2 = x Lx = 0. (i,j) E Thus, for all (i, j) E, x i = x j. Let i 1, since G is connected there exists a path (i 1, i 2 ),..., (i p, i p+1 ) joining 1 and i. It follows that x 1 = x i1 = x i2 = = x ip+1 = x i. The eigenvector x is of the form α1 n. 0 is simple. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 19 / 88

Eigenvalues of the Laplacian matrix Proposition We denote the eigenvalues of L by 0 = λ 1 λ 2 λ n. Let = max i V d i, then, for all k, λ k 2. Proof: Let λ be an eigenvalue of L and x an associated eigenvector. Let i V, such that for all j V, x i x j. Then, λx i = j V l ij x j = j V \{i} l ij x j + d i x i. It follows that λ d i j V \{i} l ij x j x i j V \{i} l ij = d i. Then λ 2d i 2. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 20 / 88

Algebraic connectivity Definition The second smallest eigenvalue λ 2 of L is referred to as the algebraic connectivity of the graph G. Theorem λ 2 > 0 if and only if G is connected. It satisfies: λ 2 = min x 1 n x Lx x x. Proof: Let v 1,..., v n be an orthonormal basis of eigenvectors. Then x 1 n, x Lx = n λ k (vk x)2 λ 2 k=2 Moreover, for x = v 2, v 2 Lv 2 = λ 2. n (vk x)2 = λ 2 x x. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 21 / 88 k=2

Algebraic connectivity of a subgraph Theorem Let G = (V, E) be a graph and λ 2 its algebraic connectivity, let G = (V, E ) be a spanning subgraph of G and λ 2 its algebraic connectivity. Then, λ 2 λ 2. Proof: Since for all x R n, x Lx x L x, we have from which follows λ 2 λ 2. Remark x Lx min x 1 n x x min x L x x 1 n x x Removing (adding) edges to graph can only make the algebraic connectivity decrease (increase). A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 22 / 88

Normalized Laplacian matrix Using the fact the L = D 1/2 LD 1/2 we can obtain similar results. Theorem (Sum of squares property) Let L be the normalized Laplacian matrix of a graph G = (V, E) then, for all x R n : ( ) 2 x Lx = 1 x i x j. 2 di dj (i,j) E Proposition The normalized Laplacian matrix L of an undirected graph G = (V, E) is symmetric positive. 0 is an eigenvalue of L with associated eigenvector D 1/2 1 n. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 23 / 88

Normalized Laplacian matrix Proposition 0 is a simple eigenvalue of L if and only if the graph G is connected. Proposition We denote the eigenvalues of L by 0 = λ 1 λ 2 λ n. Then, for all k, λ k 2. Theorem λ 2 > 0 if and only if G is connected. It satisfies: λ 2 = x Lx min x D 1/2 1 n x x = min x Lx x D1 n x Dx. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 24 / 88

Example Second smallest eigenvalues of L and L for a graph and 2 subgraphs: 1 1 1 2 3 2 3 2 3 4 5 λ 2 = 1.38 λ 2 = 0.67 4 5 λ 2 = 0.83 λ 2 = 0.59 4 5 λ 2 = 1.38 λ 2 = 0.69 A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 25 / 88

Summary We have defined fundamental notions such as graphs, subgraphs, pathes, connectivity... We have introduced Laplacian and normalized Laplacian matrices: We have shown the SOS property for both types of matrices. We have shown that the connectivity of a graph can be determined by second smallest eigenvalue of these matrices (λ 2 and λ 2 ). Some results that are valid for the Laplacian matrix cannot be extended to the normalized Laplacian matrix e.g.: If G is a subgraph of G then λ 2 λ 2. Though, in practice, the eigenvalue λ 2 is often a good measure of the connectivity of the graph (less dependent to the size of the graph). A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 26 / 88

Lecture outline 1 Algebraic graph theory Basic graph notions Laplacian matrix Normalized Laplacian matrix 2 Consensus Algorithms: Discrete time and continuous time Agreement in networks with fixed topology Agreement in networks with dynamic topology 3 Applications: Flocking in mobile networks Opinion dynamics and community detection in social networks A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 27 / 88

Consensus algorithms Consider a set of agents V organized in a network with (possibly dynamic) topology described by an undirected graph G(t) = (V, E(t)). Each agent i V has a state x i (t) R which is updated according to a simple local rule, e.g. ẋ i (t) = (x j (t) x i (t)), j N i (t) or in matrix form ẋ(t) = L(t)x(t). We say that the agents achieve a consensus if lim x 1(t) = = lim x n(t). t + t + A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 28 / 88

Various types of consensus algorithms We will consider the following consensus algorithms: continuous time discrete time ẋ i (t) = X (x j (t) x i (t)) x i (t + 1) = x i (t) + ε X (x j (t) x i (t)) ẋ i (t) = 1 d i (t) j N i (t) X j N i (t) (x j (t) x i (t)) x i (t + 1) = x i (t) + ε d i (t) j N i (t) X j N i (t) (x j (t) x i (t)) Equivalent algorithms in matrix form: continuous time ẋ(t) = L(t)x(t) ẋ(t) = D 1 (t)l(t)x(t) discrete time x(t + 1) = (I εl(t))x(t) x(t + 1) = (I εd 1 (t)l(t))x(t) A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 29 / 88

Example Consider the following network with fixed topology: Standard consensus algorithm: ẋ(t) = Lx(t) 5 1 4.5 4 3.5 3 2.5 2 3 4 5 2 1.5 1 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Normalized consensus algorithm: 5 4.5 4 ẋ(t) = D 1 Lx(t) 3.5 We run continuous time consensus algorithms over this network. 3 2.5 2 1.5 1 0 1 2 3 4 5 6 7 8 9 10 A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 30 / 88

Consensus in networks with fixed topology We assume that for all t R, G(t) = (V, E) and consider the following consensus algorithm: ẋ i (t) = j N i (x j (t) x i (t)) or in matrix form: ẋ(t) = Lx(t). Lemma The quantity 1 n x(t) = i V x i(t) is invariant. Proof: Let us compute the derivative d ( ) 1 n x(t) dt = 1 n ẋ(t) = 1 n (Lx(t)) = (1 n L)x(t) = 0. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 31 / 88

Consensus value Proposition Let x = 1 n 1 n x(0), if a consensus is achieved, then lim x(t) = x 1 n. t + Proof: If a consensus is achieved, then for all i V, lim x 1 i(t) = lim t + t + n 1 n x(t) = 1 n 1 n x(0) = x. Remark The consensus value is the average of the initial values. It is independent of the topology of the graph G = (V, E). A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 32 / 88

Convergence Theorem If the graph G is connected, then the consensus is achieved. Moreover, t 0, x(t) x 1 n e λ 2t x(0) x 1 n. Proof: Let V (t) = x(t) x 1 n 2. Then, d dt V (t) = 2 (x(t) x 1 n ) ẋ(t) = 2 (x(t) x 1 n ) Lx(t) = 2 (x(t) x 1 n ) L (x(t) x 1 n ). Let us remark that 1 n (x(t) x 1 n ) = 1 n x(t) x 1 n 1 n = 1 n x(0) x n = 0 which gives (x(t) x 1 n ) 1 n. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 33 / 88

Convergence Theorem If the graph G is connected, then the consensus is achieved. Moreover, Proof: Therefore, which gives t 0, x(t) x 1 n e λ 2t x(0) x 1 n. (x(t) x 1 n ) L (x(t) x 1 n ) λ 2 x(t) x 1 n 2 d dt V (t) 2λ 2 x(t) x 1 n 2 = 2λ 2 V (t). Thus, V (t) V (0)e 2λ 2t. If the graph G is connected then λ 2 > 0 and the consensus is achieved. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 33 / 88

Consensus in discrete time 1 We assume that for all t N, G(t) = (V, E), let ε (0, 2 ), we consider the consensus algorithm: i V, x i (t + 1) = x i (t) + ε (x j (t) x i (t)) j N i or in matrix form: x(t + 1) = Px(t) where P = I εl. Proposition The quantity 1 n x(t) = i V x i(t) is invariant. Let x = 1 n 1 n x(0), if a consensus is achieved, then Proof: Let us remark that lim x(t) = x 1 n. t + 1 n x(t + 1) = 1 n (I εl)x(t) = 1 n x(t) ε1 n Lx(t) = 1 n x(t). A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 34 / 88

Convergence Lemma We have P1 n = 1 n and for all x 1 n, Px (1 ελ 2 ) x. Proof: First, P1 n = (I εl)1 n = 1 n εl1 n = 1 n. Let x 1 n and v 1,..., v n be an orthonormal basis of eigenvectors of L. Then, n n x = (vk x)v k and Px = (vk x)(1 ελ k)v k. Thus k=2 Px 2 = k=2 n (vk x)2 (1 ελ k ) 2 max n (1 ελ k) 2 x 2. k=2 k=2 1 Moreover, from 0 λ 2 λ n 2 and ε (0, 2 ), we obtain n max k=2 (1 ελ k) 2 = (1 ελ 2 ) 2 < 1. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 35 / 88

Convergence Theorem If the graph G is connected, then the consensus is achieved. Moreover, t 0, x(t) x 1 n (1 ελ 2 ) t x(0) x 1 n. Proof: Let V (t) = x(t) x 1 n 2. Then, Let us remark that V (t + 1) = Px(t) x 1 n 2 = P(x(t) x 1 n ) 2 1 n (x(t) x 1 n ) = 1 n x(t) x 1 n 1 n = 1 n x(0) x n = 0 which gives (x(t) x 1 n ) 1 n. Then, V (t + 1) (1 ελ 2 ) 2 x(t) x 1 n 2 = (1 ελ 2 ) 2 V (t). A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 36 / 88

Other consensus algorithms Using the fact the D 1 L = D 1/2 LD 1/2 we obtain similar results for the consensus algorithm: ẋ i (t) = 1 d i or in matrix form: ẋ(t) = D 1 Lx(t). j N i (x j (t) x i (t)) Theorem If the graph G is connected, then the consensus is achieved. The consensus value is x i V = d ix i (0) i V d. i Moreover, t 0, x(t) x 1 n D e λ 2 t x(0) x 1 n D. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 37 / 88

Other consensus algorithms For the discrete time case, let ε (0, 1 2 ) and consider the consensus algorithm: x i (t + 1) = x i (t) + ε (x j (t) x i (t)) d i j N i or in matrix form: x(t + 1) = (I εd 1 L)x(t). Theorem If the graph G is connected, then the consensus is achieved. The consensus value is x i V = d ix i (0) i V d. i Moreover, t 0, x(t) x 1 n D (1 ε λ 2 ) t x(0) x 1 n D. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 38 / 88

Summary We have considered several consensus algorithms in continuous or discrete time for networks with fixed topology. For the standard consensus algorithm, the consensus value is independent of the network topology (average of initial values) whereas for the normalized consensus algorithm, it depends on the network topology (weighted average where the weights are the degrees of the vertices of the network). Consensus is achieved if the network is connected. The consensus is approached at exponential speed. Moreover, the convergence speed is determined by the second smallest eigenvalue of the Laplacian or normalized Laplacian matrix: the more connected the network the faster the consensus. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 39 / 88

Consensus in networks with dynamic topology We now assume that the graph is time-varying G(t) = (V, E(t)) and consider the following consensus algorithm: ẋ i (t) = (x j (t) x i (t)) j N i (t) or in matrix form: ẋ(t) = L(t)x(t). A lot of results are actually similar to the fixed topology case: Proposition The quantity 1 n x(t) = i V x i(t) is invariant. Let x = 1 n 1 n x(0), if a consensus is achieved, then lim x(t) = x 1 n. t + A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 40 / 88

Convergence Theorem If the graph G(t) is connected for all t R, then the consensus is achieved. Moreover, for λ 2 min t R + λ 2 (t), t 0, x(t) x 1 n e λ 2 t x(0) x 1 n. Proof: Let V (t) = x(t) x 1 n 2. Then, d dt V (t) = 2 (x(t) x 1 n ) ẋ(t) = 2 (x(t) x 1 n ) Lx(t) = 2 (x(t) x 1 n ) L(t) (x(t) x 1 n ) 2λ 2 (t) x(t) x 1 n 2 2λ 2 V (t) Thus, V (t) V (0)e 2λ 2 t. If the graph G is connected, we can choose λ 2 > 0 and the consensus is achieved. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 41 / 88

Discrete time algorithm 1 For the discrete time case, let ε (0, 2(n 1) ) and consider the consensus algorithm: x i (t + 1) = x i (t) + ε (x j (t) x i (t)) j N i or in matrix form: x(t + 1) = (I εl)x(t). Theorem If the graph G(t) is connected for all t R, then the consensus is achieved. The consensus value is x = 1 n 1 n x(0). Moreover, for λ 2 min t R + λ 2 (t), t 0, x(t) x 1 n (1 ελ 2 ) t x(0) x 1 n. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 42 / 88

Some remarks For the standard Laplacian consensus algorithm, it is straightforward to extend the results from fixed topology to dynamic topology under the assumption that the graph G(t) remains connected for all t. For the normalized Laplacian consensus algorithm, the results cannot be extended in a straightforward manner. Indeed, even the consensus value is dependent on the graph sequence... Another approach is needed! The assumption that the graph remains connected for all time is actually quite strong. Is it possible to relax this assumption? A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 43 / 88

A general consensus algorithm Let us assume that the graph is time-varying G(t) = (V, E(t)) and consider the following discrete time consensus algorithm: x i (t + 1) = j V p ij (t)x j (t) under the following assumptions (for some α > 0): Assumption p ii (t) α, i V, t N. p ij (t) 0 if and only if (i, j) E(t), i, j V, i j, t N. p ij (t) {0} [α, 1], i, j V, i j, t N. j V p ij(t) = 1, i V, t N. Let us remark that the previous discrete time consensus algorithms satisfy these assumptions. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 44 / 88

Convergence analysis For a subset of agents V V, let m V (t) = min i V x i (t) and M V (t) = max i V x i (t). Proposition Let V V such that for all i V, for all j V \ V, (i, j) / E(t). Then, Proof: Let i V, then m V (t + 1) m V (t) and M V (t + 1) M V (t). x i (t + 1) = p ij (t)x j (t) = p ij (t)x j (t) j V j V m V (t) p ij (t) = m V (t). j V Then, m V (t + 1) m V (t). Similarly, M V (t + 1) M V (t). A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 45 / 88

Convergence analysis Remark The sequences M V (t) and m V (t) are monotonic and bounded, therefore convergent. The consensus is achieved if and only if or equivalently lim M V (t) = lim m V (t) t + t + lim M V (t) m V (t) = 0. t + We will prove this under an assumption of asymptotic connectivity: Assumption For all t N, the graph (V, s t E(s)) is connected. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 46 / 88

Convergence analysis Lemma For all t N there exists T t such that M V (T ) m V (T ) (1 α n )(M V (t) m V (t)). Proof: Let us remark that for all s t, i V, m V (t) x i (s) M V (t). Consider the following property for k {1,..., n}: { tk t, V P k : k V, such that V k = k and m Vk (t) m V (t) + α k (M V (t) m V (t)). If P n is true then necessarily V n = V and since M V (t n ) M V (t): M V (t n ) m V (t n ) M V (t) m V (t) α n (M V (t) m V (t)) (1 α n )(M V (t) m V (t)). A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 47 / 88

Convergence analysis Proof: Let i 1 V such that x i1 (t) = M V (t). Let t 1 = t and V 1 = {i 1 }, then m V1 (t 1 ) = x i1 (t) = M V (t) m V (t) + α(m V (t) m V (t)). Thus, P 1 is true. Assume P k is true for some k {1,..., n 1}. Let T k t k be the first time such that (i k+1, j k+1 ) E(T k ), for some i k+1 V \ V k, j k+1 V k. For all t k s T k 1, i V k, j V \ V k, (i, j) / E(s). Then, i V k, x i (T k ) m Vk (T k ) m Vk (t k ) m V (t) + α k (M V (t) m V (t)). A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 48 / 88

Convergence analysis Proof: Then, for all i V k, x i (T k + 1) m V (t) = p ij (T k )x j (T k ) m V (t) j V = j V p ij (T k ) (x j (T k ) m V (t)) p ii (T k ) (x i (T k ) m V (t)) α (x i (T k ) m V (t)) ( ) α m V (t) + α k (M V (t) m V (t)) m V (t) α k+1 (M V (t) m V (t)). A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 49 / 88

Convergence analysis Proof: Moreover, x ik+1 (T k + 1) m V (t) = p ik+1 j(t k )x j (T k ) m V (t) j V = p ik+1 j(t k ) (x j (T k ) m V (t)) j V p ik+1 j k+1 (T k ) ( x jk+1 (T k ) m V (t) ) α ( x jk+1 (T k ) m V (t) ) ( ) α m V (t) + α k (M V (t) m V (t)) m V (t) α k+1 (M V (t) m V (t)). Hence, P k+1 holds for t k+1 = T k + 1 and V k+1 = V k {i k+1 }. Then, P n holds. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 50 / 88

Convergence analysis Theorem If, for all t N, the graph (V, s t E(s)) is connected, then the consensus is achieved. Proof: From the previous lemma, there exists an increasing sequence T k N such that T 0 = 0 and k N, 0 M V (T k ) m V (T k ) (1 α n ) k (M V (0) m V (0)). Therefore, lim M V (T k ) m V (T k ) = 0. k + Since in addition M V (t) and m V (t) are convergent it necessarily follows that lim t + M V (t) m V (t) = 0. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 51 / 88

Continuous time consensus The previous result is not valid for continuous time algorithms. Consider e.g.: ẋ i (t) = (x j (t) x i (t)), j N i (t) in a network of two agents with dynamic topology G(t) = (V, E(t)) where { {(1, 2), (2, 1)}, if t [k, k + 1/2 V = {1, 2}, E(t) = k ), if t [k + 1/2 k, k + 1), k N. Let us remark that for all t R, the graph (V, s t E(s)) is connected. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 52 / 88

Continuous time consensus It follows that, ẋ 2 (t) ẋ 1 (t) = Then, for all k N: { 2(x2 (t) x 1 (t)), if t [k, k + 1/2 k ) 0, if t [k + 1/2 k, k + 1) x 2 (k + 1) x 1 (k + 1) = x 2 (k + 1/2 k ) x 1 (k + 1/2 k ) = (x 2 (k) x 1 (k))e 2/2k = (x 2 (0) x 1 (0))e 2 e 2/2 e 2/22... e 2/2k = (x 2 (0) x 1 (0))e 2(1+1/2+1/22 +...+1/2 k ) = (x 2 (0) x 1 (0))e 4(1 1/2k+1). A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 53 / 88

Continuous time consensus It follows that lim x 2(k + 1) x 1 (k + 1) = (x 2 (0) x 1 (0))e 4 0. k + The consensus is not achieved despite the fact that for all t R, the graph (V, s t E(s)) is connected. The key observation is that even though the edge (1, 2) appears infinitely often, it is present only for a finite time... If one impose a dwell time (when an edge appears it remains present for a duration at least τ > 0), one can avoid this kind of phenomenom. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 54 / 88

A general consensus algorithm Let us assume that the graph is time-varying G(t) = (V, E(t)) and consider the following continuous time consensus algorithm: ẋ i (t) = p ij (t)(x j (t) x i (t)) j V \{i} under the following assumptions (for some α > 0, β > 0): Assumption p ij (t) 0 if and only if (i, j) E(t), i, j V, i j, t R. p ij (t) {0} [α, β], i, j V, i j, t R. j V \{i} p ij(t) β, i V, t R. Let us remark that the previous continuous time consensus algorithms satisfy these assumptions. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 55 / 88

A general consensus algorithm We add the following dwell time assumption: Assumption For all i, j V, if the edge (i, j) appears at time t, i.e.: (i, j) E(t) and ε > 0, s [t ε, t), (i, j) / E(s) then (i, j) remains at for a duration τ, i.e.: s [t, t + τ], (i, j) E(s). Then, we have the convergence result: Theorem If, for all t R, the graph (V, s t E(s)) is connected, then the consensus is achieved. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 56 / 88

Summary Discrete time consensus algorithms: Algorithm Topology Consensus if Convergence rate x(t + 1) = (I εl)x(t) fixed G is connected (1 ελ 2 ) t x(t + 1) = (I εd 1 L)x(t) fixed G is connected (1 ε λ 2 ) t x(t + 1) = (I εl)x(t) dynamic G(t) is connected (1 ελ 2 ) t with for all t R λ 2 min t N λ 2 (t) x(t + 1) = (I εl)x(t) dynamic (V, s t E(s)) is - connected for all t R x(t + 1) = (I εd 1 L)x(t) dynamic (V, s t E(s)) is - connected for all t R Connectivity properties are crucial for convergence of consensus algorithms. Some convergence rates are determined by the second smallest eigenvalue of the Laplacian or normalized Laplacian matrix: the more connected the network the faster the consensus. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 57 / 88

Summary Continuous time consensus algorithms: Algorithm Topology Consensus if Convergence rate ẋ(t) = Lx(t) fixed G is connected e λ 2t ẋ(t) = D 1 Lx(t) fixed G is connected e λ 2 t ẋ(t) = Lx(t) dynamic G(t) is connected e λ 2 t with for all t R λ 2 min t R + λ 2 (t) ẋ(t) = Lx(t) dynamic Dwell time and - (V, s t E(s)) is connected for all t R ẋ(t) = D 1 Lx(t) dynamic Dwell time and - (V, s t E(s)) is connected for all t R Results are very similar to those for discrete time algorithms. For dynamic topologies, a supplementary dwell time assumption is needed in order to prove that the consensus is achieved. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 58 / 88

Lecture outline 1 Algebraic graph theory Basic graph notions Laplacian matrix Normalized Laplacian matrix 2 Consensus Algorithms: Discrete time and continuous time Agreement in networks with fixed topology Agreement in networks with dynamic topology 3 Applications: Flocking in mobile networks Opinion dynamics and community detection in social networks A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 59 / 88

Flocking in mobile agents network Flocking is the behavior exhibited when a group of birds are in flight: More precisely, a flocking behavior is characterized by three properties: 1 Alignement: the birds have the same velocity. 2 Cohesion: the birds remain together. 3 Separation: there is a minimum distance between birds. In the following, we focus on the first and second property. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 60 / 88

A flocking model We consider a set of mobile agents V = {1,..., n}: for each i V, x i (t) R d and v i (t) R d denote its position and its velocity. An agent can communicate only with agents that are sufficiently close: the interaction graph G(t) = (V, E(t)) is given by E(t) = {(i, j) V V i j and x i (t) x j (t) R}. The agents try to agree on their velocity using the continuous time consensus algorithm: v i (t) = (v j (t) v i (t)). j N i (t) A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 61 / 88

A flocking model The considered model is then: { ẋi (t) = v i (t) v i (t) = j N i (t) (v j(t) v i (t)) We want to determine a set of initial conditions ensuring that a flocking behavior is achieved. We have already shown the following result: Theorem If the graph G(t) is connected for all t R, then the consensus is achieved. Moreover, for λ 2 min t R + λ 2 (t), t 0, v(t) 1 n v e λ 2 t v(0) 1 n v with v = i V v i(0). A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 62 / 88

Graph robustness analysis We define a notion of robustness for interaction graphs. For i V, let x i R d be the position of agent i, let x = (x 1,..., x n ), we define the associated graph G x = (V, E x ) with E x = {(i, j) V V i j and x i x j R}. Let x 0 R nd be a reference configuration. Assuming that G x 0 is a connected graph, we are interested in characterizing a neighborhood of x 0 such that for any perturbed configuration y in this neighborhood the graph G y is connected. We introduce a measure of robustness for G x 0 identify such a neighborhood. which allows us to A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 63 / 88

Graph robustness analysis Let (i 1, i 2 ),..., (i p, i p+1 ) be a path of G x 0, we define the slackening of the path: s((i 1, i 2 ),..., (i p, i p+1 )) = p min k=1 (R x 0 i k x 0 i k+1 ). If the distances between agents do not change more than s((i 1, i 2 ),..., (i p, i p+1 )) then the path is preserved. The path-robustness ρ ij between two agents i, j V with i j, is the maximal slackening of all paths between i and j: ρ ij = max s((i 1, i 2 ),..., (i p, i p+1 )). (i 1,i 2 ),...,(i p,i p+1 ) Paths(i,j) If the distances between agents do not change more than ρ ij there remains a path between i and j. We set ρ ii = R. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 64 / 88

Graph robustness analysis The robustness of the graph ρ Gx 0 between all pair of nodes: is the minimal path-robustness ρ Gx 0 = min (i,j) V 2 ρ ij If the distances between agents do not change more than ρ Gx 0 the graph remains connected. then The core robust subgraph of G x 0 is the graph M(G x 0) = (V, M(E x 0)) where { } M(E x 0) = (i, j) V V i j and x i x j R ρ Gx 0. Since ρ Gx 0 0, M(G x 0) is clearly a subgraph of G x 0. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 65 / 88

Graph robustness analysis Example of a core robust subgraph: A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 66 / 88

Graph robustness analysis Lemma Let x 0 R nd be a reference configuration such that the graph G x 0 connected. Then, the core robust subgraph M(G x 0) is connected. is Proof: Let i, j V, then ρ ij ρ. Let (i Gx 0 1, i 2 ),..., (i p, i p+1 ) be a path of G x 0 between i and j with maximal slackening, then Then, for all k {1,..., p}, s((i 1, i 2 ),..., (i p, i p+1 )) = ρ ij. R x 0 i k x 0 i k+1 s((i 1, i 2 ),..., (i p, i p+1 )) ρ Gx 0. Therefore, for all k {1,..., p}, (i k, i k+1 ) M(E x 0). Then, (i 1, i 2 ),..., (i p, i p+1 ) is a path of M(G x 0) between i and j. Thus, M(G x 0) is connected. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 67 / 88

Graph robustness analysis Proposition Let x 0 R n d be a reference configuration such that the associated graph G x 0 is connected. Let y R n d be a perturbed configuration such that y x 0 ρ G x 0. 2 Then, M(G x 0) is a subgraph of G y and G y is connected. Proof: Let z = (z 1,..., z n ) such that z = y x 0. For all i, j V, we have 2zi z j z i 2 + z j 2. Then, z i z j 2 = z i 2 + z j 2 2z i z j 2( z i 2 + z j 2 ) Then, z i z j ρ Gx 0. 2 z 2 = 2 y x 0 2 ρ 2 G x 0. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 68 / 88

Graph robustness analysis Proposition Let x 0 R n d be a reference configuration such that the associated graph G x 0 is connected. Let y R n d be a perturbed configuration such that y x 0 ρ G x 0. 2 Then, M(G x 0) is a subgraph of G y and G y is connected. Proof: Let (i, j) M(E x 0), then x 0 i x 0 j R ρ G x 0. Thus, y i y j = x 0 i x 0 j + z i z j x 0 i x 0 j + z i z j R ρ Gx 0 + ρ G x 0 = R. Then, (i, j) E y. Therefore M(G x 0) is a subgraph of G y. Since M(G x 0) is connected, so is G y. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 68 / 88

Graph robustness computation Algorithm (Computation of the robustness ρ Gx 0 ) // Initialization: (i, j) V 2, ρ 0 ij R x i 0 xj 0 ; // Main loop: for k V do for i V do for j V do( ( ρ k ij max ρ k 1, min, ρ k 1 end for end for end for // Computation of robustness: ρ Gx 0 = min (i,j) V 2 ρn ij; ij ρ k 1 ik kj )) ; A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 69 / 88

Sufficient conditions for flocking Theorem Let x(0) R nd be a vector of initial positions of the agents such that the associated graph G x(0) is connected and its robustness ρ Gx(0) > 0. Let v(0) R nd be a vector of initial velocities such that v(0) 1 n v λ 2 ρ G 2 x(0) where λ 2 is the algebraic connectivity of M(G x(0)). Then, for all t R +, M(G x(0) ) is a subgraph of G(t). Moreover, v(t) 1 n v e λ 2 t v(0) 1 n v. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 70 / 88

Sufficient conditions for flocking Proof: Let Π be the set of graphs with n nodes which have M(G x(0) ) as a subgraph. Since G x(0) is connected, we have that M(G x(0) ) is connected. Therefore, all graphs in Π are connected and since M(G x(0) ) Π, min λ 2(G) = λ 2 (M(G x(0) )) = λ 2 > 0. G Π Let us assume that there exists t > 0 such that M(G x(0) ) is not a subgraph of G(t) (i.e. G(t) / Π). Let t = inf{t R + ; G(t) / Π}. For i V, let y i (t) = x i (t) v t. Let us remark that for all i, j V, y i (t) y j (t) = x i (t) x j (t). Therefore, for all t R +, G(t) = G y(t). A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 71 / 88

Sufficient conditions for flocking Proof: If t > 0, it follows that for all t [0, t ) v(t) 1 n v e λ 2 t v(0) 1 n v e λ 2 t λ 2 ρ G 2 x(0). By remarking that we have for all t [0, t ) t y(t) = x 0 + (v(t) 1 n v ) ds 0 y(t) x 0 λ 2 ρ G x 0 2 t 0 e λ 2 s ds < ρ G x 0. 2 Then, by continuity of y, there exists ε > 0 such that for all t [0, t + ε], y(t) x 0 ρ G x 0. 2 A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 72 / 88

Sufficient conditions for flocking Proof: If t = 0, since y(0) = x 0 and by continuity of y, the same kind of property holds. Then, we have for all t [0, t + ε], G(t) = G y(t) Π. This contradicts the definition of t. Therefore, for all t R +, G(t) Π. Thus for all t R +, M(G x(0) ) as a subgraph of G(t). This proves the first part of the theorem. Moreover, it follows that for all t R +, λ 2 (t) λ 2, and then v(t) 1 n v e λ 2 t v(0) 1 n v. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 73 / 88

Example Example in a network of 6 agents with communication radius R = 3.2: v(0) 1n v = λ 2 ρ G x(0) 2 v(0) 1n v = 5λ 2 ρ G x(0) 2 v(0) 1n v = 4λ 2 ρ G x(0) 2 1) 1) 1) 2) 2) 2) 3) 3) 3) 6 4 2 0 2 4 6 6 4 2 0 2 4 6 6 4 2 0 2 4 6 The bound that we compute is often conservative as shown on the example above. However, we can find examples where the bound is tight. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 74 / 88

Summary We have considered a model of flocking behavior based on communication graphs given by a proximity rule. We have established a set of initial conditions for which the flocking behavior is achieved. The conditions are only sufficient but can be checked algorithmically. The main concepts are those of graph robustness and the associated core robust subgraph that remains for all time ensuring that the communication graph remains connected for all time. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 75 / 88

Lecture outline 1 Algebraic graph theory Basic graph notions Laplacian matrix Normalized Laplacian matrix 2 Consensus Algorithms: Discrete time and continuous time Agreement in networks with fixed topology Agreement in networks with dynamic topology 3 Applications: Flocking in mobile networks Opinion dynamics and community detection in social networks A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 76 / 88

Opinion dynamics in social networks Opinion dynamics studies the emergence of consensus in social networks: In real social networks, it is often the case that a global consensus cannot be reached. Instead, several consensus are reached locally by subsets of agents forming communities. Can we propose a model of opinion dynamics reproducing this phenomenom? Can we learn something on real social networks using this model? A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 77 / 88

A model of opinion dynamics We consider a set of agents i V in a network G = (V, E). Each agent i V has an opinion x i (t) R. We propose a discrete time model of opinion dynamics as follows: At each time step, agent i receives the opinion of its neighbors in G. Agent i gives confidence only to his neighbor that have an opinion close from its own. Agent i updates its opinion accordingly to its confidence neighborhood. Due to loss of patience, the confidence of each agent decreases at each time step: agent i requires that, at each negotiation round, the opinion of agent j moves significantly towards its opinion in order to keep negotiating with j. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 78 / 88

A model of opinion dynamics Formally, the opinion dynamics model is described as follows: x i (t + 1) = x i (t) + ε d i (t) j N i (t) (x j (t) x i (t)) where the interaction graph at time t is G(t) = (V, E(t)) with E(t) = { (i, j) E ( x i (t) x j (t) Rρ t)} where ε (0, 1/2), R 0 and ρ (0, 1) are model parameters. The parameter ρ characterizes the confidence decay of the agents. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 79 / 88

Convergence analysis Proposition For all i V, the sequence (x i (t)) t N is convergent. We denote xi limit. Furthermore, we have for all t N, x i (t) x i εr 1 ρ ρt. its Proof: Let i V, t N, we have x i (t + 1) x i (t) = ε (x j (t) x i (t)) d i (t) j N i (t) ε x j (t) x i (t) d i (t) j N i (t) ε Rρ t = εrρ t. d i (t) j N i (t) A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 80 / 88

Convergence analysis Proposition For all i V, the sequence (x i (t)) t N is convergent. We denote xi limit. Furthermore, we have for all t N, x i (t) x i εr 1 ρ ρt. its Proof: Let t N, τ N, then x i (t + τ) x i (t) τ 1 τ 1 x i (t + k + 1) x i (t + k) k=0 εr 1 ρ ρt k=0 εrρ t+k which shows, since ρ (0, 1), that the sequence (x i (t)) t N is a Cauchy sequence in R. Therefore, it is convergent. The inequality of the proposition is obtained by letting τ go to +. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 80 / 88

Communities Definition A community is subset of agent C V such that for all i, j C, x i = x j. The graph of a community C is G C = (C, E C ) where E C = {(i, j) E i C, j C}. The set of communities is C, it is a partition of V. The graph of communities is G C = (V, E C ) where E C = {(i, j) E x i = x j }. Let us remark that E C = C C E C. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 81 / 88

Characterization of communities Before giving an algebraic characterization of communities, we need to make a supplementary assumption. We have seen that the opinions converge at a speed O(ρ t ). In practice, we observe that the convergence is often slightly faster and this motivates the following assumption: Assumption (Fast convergence) There exists ρ < ρ and M 0 such that for all i V, for all t N, x i (t) x i Mρ t. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 82 / 88

Characterization of communities Proposition There exists T N, such that for all t T, E(t) = E C. Proof: (E(t) E C ) E can be splitted into two subets: E f consists of edges that disappear in finite time, E consists of edges that appear infinitely often. Then, there exists T 1 such that for all t T 1, E(t) E. Let (i, j) E then there exists an unbounded sequence of times τ k such that (i, j) E(τ k ). This gives x i (τ k ) x j (τ k ) Rρ t and x i = x j. Therefore (i, j) E C. Hence, for all t T 1, E(t) E E C. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 83 / 88

Characterization of communities Proposition There exists T N, such that for all t T, E(t) = E C. Proof: (E C E(t)) Let (i, j) E C, then for all t N x i (t) x j (t) x i (t) x i + x i x j + x j x j (t) x i (t) x i + x j x j (t) 2Mρ t. Since ρ < ρ, there exists T 2 such that for all t T 2, 2Mρ t Rρ t. This implies that for all t T 2, (i, j) E(t). Hence, for all t T 2, E C E(t). Remark We have shown that after a finite time, the graph G(t) is fixed. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 83 / 88

Characterization of communities Theorem For almost all vectors of initial opinions, for all communities C C, such that C 2, λ 2 (G C ) > (1 ρ)/ε. Main ideas of the proof: Let C C and let us assume that λ 2 (G C ) (1 ρ)/ε. Let x C (t) denote the vector of opinions of agents in C. For all t T, since G(t) = G C, we have x C (t + 1) = (I εd(g C ) 1 L(G C ))x C (t). We have seen that the rate of convergence of x C (t) is 1 ε λ 2 (G C ) ρ except if x C (T ) and thus x(t ) belongs to a specific subspace of zero measure H C. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 84 / 88

Characterization of communities Theorem For almost all vectors of initial opinions, for all communities C C, such that C 2, λ 2 (G C ) > (1 ρ)/ε. Main ideas of the proof: By assumption the rate of convergence of x C (t) is smaller than ρ < ρ. Thus x(t ) necessarily belongs to H C. Then, by remarking that all matrices (I εd(t) 1 L(t)) are invertible, we can move backward in time and show that the initial conditions leading to H C at time T are included in a set of zero measure (consisting of a countable union of subspaces) that is independent of C and T. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 84 / 88

Example: karate club network A social network of 34 agents: (1 ρ)/ε = 0.1 (1 ρ)/ε = 0.2 (1 ρ)/ε = 0.3 (1 ρ)/ε = 0.4 min λ 2 (G C ) = 0.12 min λ 2 (G C ) = 0.25 min λ 2 (G C ) = 0.33 min λ 2 (G C ) = 0.57 C C C C C C C C The second partition is almost that observed by Zachary in its original study (1973). A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 85 / 88

Example: book network A network of 105 books on American politics: Original (1 ρ)/ε = 0.1 (1 ρ)/ε = 0.15 (1 ρ)/ε = 0.2 network min λ 2 (G C ) = 0.13 min λ 2 (G C ) = 0.18 min λ 2 (G C ) = 0.27 C C C C C C One recovers the information on the political alignment (democrat, republican, centrist) of the books. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 86 / 88

Summary We have introduced a model of opinion dynamics with decaying confidence. In this model, a global consensus may not be achieved and only local agreements can be reached. The agents organize themselves in communities. The analysis of the model provided an algebraic characterization of the communities under a fast convergence assumption. The experimental results tend to confirm the validity of the algebraic characterization. Moreover, the communities that are obtained on real examples are meaningful and allows to uncover information hidden in the network structure. A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 87 / 88

Conclusions We have presented a collection of representative results on consensus algorithms in continuous and discrete time, and we have shown the relation to graph theory. We have shown two different applications of consensus algorithms: Flocking in mobile networks Opinion dynamics in social networks Consensus algorithms are currently pretty well understood... but there are still a lot of things to do on consensus applications. Thank you for your attention! A. Girard (LJK - U. Grenoble) Consensus, Flocking and Opinion Dynamics 88 / 88