On Fast–Slow Consensus Networks with a Dynamic Weight

We study dynamic networks under an undirected consensus communication protocol and with one state-dependent weighted edge. We assume that the aforementioned dynamic edge can take values over the whole real numbers, and that its behaviour depends on the nodes it connects and on an extrinsic slow variable. We show that, under mild conditions on the weight, there exists a reduction such that the dynamics of the network are organized by a transcritical singularity. As such, we detail a slow passage through a transcritical singularity for a simple network, and we observe that an exchange between consensus and clustering of the nodes is possible. In contrast to the classical planar fast–slow transcritical singularity, the network structure of the system under consideration induces the presence of a maximal canard. Our main tool of analysis is the blow-up method. Thus, we also focus on tracking the effects of the blow-up transformation on the network’s structure. We show that on each blow-up chart one recovers a particular dynamic network related to the original one. We further indicate a numerical issue produced by the slow passage through the transcritical singularity.

one frequently assumes that the network structure evolves without dynamics at the nodes (van den Hofstad 2016). In most cases, these assumptions are a simplification since it may be expected that there is coupled dynamics of and on the network, i.e. one has to deal with adaptive (or co-evolutionary) networks (Gross et al. 2009). A crucial assumption to approximate an adaptive network by a partially static one with either just dynamics on or dynamics of the network is timescale separation (Kuehn 2015). Yet, if one assumes that either the dynamics on the nodes or the dynamics of the edges are infinitely slow, static leads to a singular limit description. This limit is known to miss adaptive network dynamics effects induced by the interaction of dynamical variables for finite timescale separation (Kuehn 2012). Also from the viewpoint of applications, a finite but large timescale separation is far more reasonable. As an example, consider a group of people that communicate with each other daily but whose mutual influences shape the way they handle elections. One of such activities occurs in time scales of minutes or hours, while the other in timescales of years, yet both are interrelated in a complex manner. Similar examples where different sorts of relations occur at distinct timescales can be found in population dynamics, telecommunication networks, power grids, etc. So, although timescales add an extra level of difficulty to the analysis of networks, they may be useful for a more accurate representation of certain phenomenon. On the other hand, dynamical systems with two or more timescales have also been of interest from many perspectives, particularly in applied mathematics. The overall idea is to distinguish slow from fast subprocesses, analyze them separately, and then come up with an appropriate description of the problem (Jones 1995;Kaper 1999;Kuehn 2015;O'Malley 1991;Verhulst 2005). This basic idea can be made rigorous and has proven to be powerful. However, there are generic complex systems in which the timescale separation can no longer be clearly distinguished. Thus more advanced mathematical techniques are required to analyze multi-scale adaptive networks.
In this article we bring together network and multi-scale theories to study a class of adaptive networks. We are interested in networks whose agents communicate in a rather simple way, known as linear average consensus protocol (see the details in Sect. 2.2). This type of communication has been largely studied due to its relevance in all kinds of sciences (Mesbahi and Egerstedt 2010;Ren et al. 2005). On this class of networks we assume that there is one interaction or communication link that slowly changes over time and investigate the implications of it. We shall see that the aforementioned setting leads to a nontrivial problem from both, network and multi-scale, contexts. As a result we describe the overall behaviour of the network by adequately incorporating techniques from consensus dynamics and geometric singular perturbation theory.
The forthcoming parts of this work are arranged as follows: in Sect. 2 we provide a short technical introduction to the main topics of this paper, namely fast-slow systems and consensus networks. In Sect. 3 we present our main contribution, which consists in the analysis of a simple network that has a dynamic weight and whose overall dynamics evolve in two timescales. Next, in Sect. 4 we show that, in qualitative terms, the analysis performed for the aforementioned simple network can be extended to arbitrary networks with one dynamic edge. We finish in Sect. 5 with concluding remarks and an outlook on future research.

Preliminaries
In this section we provide a brief recollection of the two mathematical areas that come together in this paper. We first state what a fast-slow system formally is, the concept of normal hyperbolicity, and two relevant geometric techniques of analysis. Afterwards, to place our work into context, we recall and provide appropriate references to some of the relevant results on dynamic networks.

Fast-Slow Systems
A fast-slow system is a singularly perturbed ordinary differential equation (ODE) of the form where x ∈ R m and y ∈ R n are, respectively, the fast and slow variables, and where 0 < ε 1 is a small parameter accounting for the timescale difference between the variables. The overdot denotes derivative with respect to the slow time τ . By defining the fast time t = τ/ε, one can rewrite (1) as where the prime denotes the derivative with respect to the fast time t. Observe that, for ε > 0, the only difference between (1) and (2) is their time parametrization. Therefore, we say that (1) and (2) are equivalent.
Although there are several approaches to the analysis of fast-slow systems, e.g. classical asymptotics (Eckhaus 2011a, b;O'Malley 1991;Verhulst 2005), here we take a geometric approach (Fenichel 1979;Jones 1995), which is called geometric singular perturbation theory. The overall idea is to consider (1) and (2) restricted to ε = 0, understand the resulting systems, and then use perturbation results to obtain a description of (1) and (2) for ε > 0 sufficiently small. Therefore, two important subsystems to be considered are 0 = f (x, y, 0) y = g(x, y, 0), which are called the constraint equation (Takens 1976) (or slow subsystem or reduced system) and the layer equation (or fast subsystem), respectively. It is important to note that the constraint and layer equations are not equivalent any more, there are even different classes of differential equations as the constraint equation is a differentialalgebraic equation (Kunkel and Mehrmann 2006), while the layer equation is an ODE, where the slow variables y can be viewed as parameters. In some sense the timescale separation is infinitely large between two singular limit systems (3). However, a geometric object that relates the two is the critical manifold.

Definition 1
The critical manifold of a fast-slow system is defined by The critical manifold is, on the one hand, the set of solutions of the algebraic equation in the constraint equation, and on the other hand, the set of equilibrium points of the layer equation. There is an important property that critical manifolds may have, called normal hyperbolicity.
Definition 2 A point p ∈ C 0 is called hyperbolic if the eigenvalues of the matrix D x f ( p, 0), where D x denotes the total derivative with respect to x, have nonzero real part. The critical manifold C 0 is called normally hyperbolic if every point p ∈ C 0 is hyperbolic. On the contrary, if for a point p ∈ C 0 we have that D x f ( p, 0) has at least one eigenvalue on the imaginary axis, we then call p nonhyperbolic.
In a general sense, whether a critical manifold has nonhyperbolic points or not, dictates the type of mathematical techniques that are suitable for analysis. For the case when the critical manifold is normally hyperbolic, Fenichel's theory (Fenichel 1979) (see also Tikhonov 1952;Kuehn and Szmolyan 2015, Chapter 3) asserts that, under compactness of the critical manifold, the constraint and the layer equations give a good enough approximation of the dynamics near C 0 of the fast-slow system for ε > 0 sufficiently small. In the normally hyperbolic case for 0 < ε 1, there exists a slow manifold C ε , which can be viewed as a perturbation of C 0 ; see also Fenichel (1979) and Kuehn and Szmolyan (2015).
The case when the critical manifold has nonhyperbolic points is considerably more difficult. One mathematical technique that has proven highly useful for the analysis in such a scenario is the blow-up method (Dumortier et al. 1996). Briefly speaking, the blow-up method consists on a well-suited generalized polar change of coordinates. What one aims to gain with such a coordinate transformation is enough hyperbolicity so that the dynamics can be analyzed using standard techniques of dynamical systems. Nowadays, the blow-up method is widely used to analyze the dynamics of fast-slow systems having nonhyperbolic points in a broad range of theoretical contexts and applications. For detailed information on the blow-up technique the reader may refer to Dumortier et al. (1996), Jardón-Kojakhmetov and Kuehn (2019), Krupa and Szmolyan (2001a), Kuehn and Szmolyan (2015, Chapter 7), and references therein.

Consensus Networks
In this section we formally introduce the type of consensus problems on an adaptive network which we are concerned with in this work. Let us start by introducing some notation: we denote by G = {V, E, W} an undirected weighted graph where V = {1, . . . , m} denotes the set of vertices, E = e i j the set of edges and W = w i j the set of weights. We assume that the graph is undirected, that there are only simple edges, and that there are no self-loops, that is e i j = e ji and e ii / ∈ E. To each edge e i j we assign a weight w i j ∈ R and thus we identify the presence (resp. absence) of an edge with a nonzero (resp. zero) weight. Moreover, we shall say that a graph is unweighted if all the nonzero weights are equal to one. The Laplacian (Merris 1994) of the graph G is denoted by L = [l i j ] and is defined by Remark 1 The majority of the scientific work regarding adaptive/dynamic networks considers nonnegative weights. One of the reasons for such consideration is that the spectrum of the Laplacian matrix is well identified (Barrat et al. 2004;Mohar 1991;Olfati-Saber et al. 2007), which simplifies the analysis. When the weights are allowed to be positive and negative one usually refers to L as a signed Laplacian. Difficulties arise due to the fact that many of the convenient properties of nonnegatively weighted Laplacians do not hold for signed Laplacians. In some part of the literature, see for example Altafini (2013) and Proskurnikov et al. (2016), the diagonal entries of the Laplacian matrix are rather defined by m j=1 |w i j |. In this case, however, the Laplacian matrix is positive semi-definite and the potential loss of stability due to dynamic weights (the main topic of this paper) is not possible. One the other hand, Laplacian matrices defined by (5) are relevant in many applications. For example, in Bronski and DeVille (2014), Knyazev (2017), Pan et al. (2016) problems like agent clustering are studied, while the stability of networks under uncertain perturbations is considered in Chen et al. (2016), Zelazo and Bürger (2017).
We identify each vertex i of the graph G with the state of an agent x i . Here we are interested on scalar agents, that is x i ∈ R for all i = 1, . . . , m. We now have a couple of important definitions.
Definition 3 • We say that the agents x i and x j agree if and only if x i = x j .
• Consider a continuous-time dynamical system defined bẏ where x = (x 1 , . . . , x m ) ∈ R m is the vector of agents' states. Let x(0) denote initial conditions and χ : R m → R be a smooth function. We say that the graph G reaches consensus with respect to χ if and only if all the agents agree and • We say that f (x) defines a consensus communication protocol over G if the solutions of (6) reach consensus.
We note that the above definition of consensus is rather general, in the sense that there can be "discrete consensus" if all agents only agree at discrete time points; "finite time consensus" if x i (T ) = χ(x(0)) for all i ∈ V and t > T with 0 ≤ T < ∞; "asymptotic consensus" if lim t→∞ x i (t) = χ(x(0)) for all i ∈ V; and so on. Similarly, several consensus protocols can be classified with respect to the function χ , see, e.g. Olfati-Saber et al. (2007), Olfati -Saber and Murray (2004) and Saber and Murray (2003).
The appeal in studying consensus problems and protocols is due to their wide range of applications in, for example, computer science (Thomas 1979), formation control of autonomous vehicles (Fax and Murray 2004;Jadbabaie and Morse 2003;Ren et al. 2007), biochemistry (Chen et al. 2013;Holland et al. 2004), sensor networks (Olfati-Saber 2005), social networks (Alves 2007;Xie et al. 2011), among many others. A simple example of consensus would be a group of people in which all agree to vote for the same candidate in an election. Another example would be a group of autonomous vehicles that are set to move with the same velocity.
In this paper we are interested in one of the simplest consensus protocols that leads to average consensus, that is This communication protocol is particularly interesting since it is an instance of a distributed protocol. In other words, the time evolution of x i is solely determined by its interaction with other agents directly connected to it. This type of protocols is widely investigated in engineering applications, for example to design controllers that only require local information in order to achieve their tasks (Lynch 1996;Moreau 2004;Ren and Beard 2008;Xiao et al. 2007). Alternatively, this linear average consensus protocol can be written asẋ where L denotes the Laplacian of G as defined by (5). It is then clear that the behaviour of the agents is determined by the spectral properties of the Laplacian matrix (Merris 1994;Mohar 1991;Zelazo and Bürger 2014). One of the most relevant results for systems defined by (8) is that, if the graph is connected and all the weights are positive, then (8) reaches average consensus asymptotically (Olfati-Saber et al. 2007). Although most of the scientific work has been focused on consensus protocols over unweighted graphs and with fixed topology, there is an increased interest in investigating dynamical systems defined on weighted graphs with varying and/or switching topologies (Casteigts et al. 2012;Mesbahi 2005;Moreau 2005;Olfati-Saber and Murray 2004;Proskurnikov 2013;Tanner et al. 2007).
In the main part of this article, Sects. 3 and 4, we are going to consider linear average consensus protocols with a dynamic weight. This dynamic weight is assumed to have a slower timescale than that of the nodes. Therefore, it makes sense to approach the problem from a singular perturbation perspective. We will see that under generic conditions on the weight, the fact that the dynamics are defined on a network, induces the presence of a nonhyperbolic point. As we have described in Sect. 2.1, one suitable technique of analysis to describe the system is then the blow-up method. Since the blow-up method is a coordinate transformation, one should check whether such a transformation preserves the network structure or not. For general networks, this is a classical problem and it is known that for certain coordinate changes, network structure is not preserved (Field 2004;Golubitsky and Stewart 2017). Yet, sometimes symmetries help to gain a better understanding for certain classes such as coupled cell network dynamics (Nijholt et al. 2017). As we will show, the blow-up method not only preserves the network structure for our consensus problem but also the blownup networks in different coordinate charts also have natural dynamical and network interpretations. In qualitative terms this tells us that the blow-up method is a suitable technique for the analysis of adaptive networks with multiple timescales.
Before proceeding to our main contribution, in the next section we present a first interconnection between the topics discussed above. We show that Fenichel's theory suffices to analyze state-dependent linear consensus networks with two timescales, and for which the Laplacian matrix has just a simple zero eigenvalue.

State-Dependent Fast-Slow Consensus Networks with a Simple Zero Eigenvalue
In this section we show that Fenichel's theorem is enough to describe the dynamics of arbitrary fast-slow consensus networks with state-dependent Laplacian as long as λ 1 = 0 is a simple eigenvalue, i.e. we are going to show that the zero eigenvalue corresponds to a trivial parametrized direction and that for each parameter we have a normally hyperbolic structure. The result presented below is motivated by a similar claim that appears in Awad et al. (2018, Section B). However, here we are not concerned with the stability of the fast nor the slow dynamics, and the use of Fenichel's theorem appears more aligned to the contents of this paper. Let us then consider the fast-slow system where x ∈ R m , y ∈ R n , ε > 0 is a small parameter, and L(x, y, ε) is a state-dependent Laplacian matrix.
Theorem 1 Consider (9) and a compact region U x × U y ⊆ R m × R n . Let 1 m := (1, 1, . . . , 1) ∈ U x . If for all (x, y) ∈ U x × U y one has that ker L(x, y, 0) = span {1 m }, then the set is a normally hyperbolic family of critical manifolds of (9).
Proof Let X = (X ,X ) ∈ R × R m−1 be new coordinates defined by where the matrix Q is found via the Gram-Schmidt process after selecting the first component as indicated in (11). Although L(x, y, 0) cannot really be regarded as a fixed linear operator acting on R m as it depends upon (x, y), the choice of the eigenvector 1 m is justified due to the fact that λ 1 = 0 is a simple zero eigenvalue of the Laplacian matrix L(x, y, 0) if and only if L(x, y, 0)1 m = 0 for all (x, y) ∈ U x × U y . Note then thatX denotes the average of the nodes' states. It now follows that from the equation of x we have Therefore we have that (9) is conjugate tō whereL(X ,X , y, ε) = QL(P −1 X , y, ε)Q andĝ(X ,X , y, ε) = g(P −1 X , y, ε). One observes that, as expected,X has the role of a parameter. Furthermore, due to our hypothesis and definition ofL, we have that the matrixL(X ,X , y, 0) is invertible within the compact region of interest. Therefore, the corresponding critical manifold is given byŜ 0 = X = 0 . Denoting f (X ,X , y, ε) = −L(X ,X , y, ε)X we have that ∂ f ∂X (X , 0, y, 0) = −L(X , 0, y, 0), which is invertible, implying thatŜ 0 is normally hyperbolic. The proof is finalized by returning to the original coordinates leading to (10).
Next we are going to consider a case study in which Fenichel's theory is not enough to describe the dynamics of a fast-slow network.

A Triangle Motif
In this section we study a motif (Milo et al. 2002). Motifs can be seen as building blocks of more general and complex networks. Indeed, as we describe throughout this article, all the dynamic traits and properties that the triangle motif exhibits can be extended to arbitrary networks, see Sect. 4.
Let us consider the following network To each node i = 1, 2, 3 we assign a state x i = x i (t) ∈ R. We assume that the dynamics of each node are defined only by diffusive coupling. Moreover, we assume that w ∈ R is a dynamic weight depending on the vertices it connects and on an external state y ∈ R, which is assumed to have much slower time evolution than that of the nodes. Hence, we study the fast-slow system where w = w(x 1 , x 2 , y, ε) is a smooth function of its arguments and 0 < ε 1 is a small parameter. In this section we shall consider the simple case in which w is affine in the state variables, that is with α 0 , α 1 , α 2 , α 3 real constants. We further assume the nondegeneracy condition α 3 = 0 to ensure coupling between the slow and fast variables. By shifting and rescaling y → α 0 + α 3 y, and a possible a change of signs of the variables, we may also assume with α 1 ≥ 0 and α 2 ≥ 0.

Preliminary Analysis (the Singular Limit)
The following transformation, which is simple to obtain, will be useful throughout this work. (14). Then the orthogonal matrix

Lemma 1 Consider the symmetric matrix L defined in
Thus, applying the coordinate transformation defined by (X , Y ) = (T x, y) one obtains the conjugate diagonalized system where Observe that fast-slow system (18) has a conserved quantity given by X 1 = 0, which arises due the zero eigenvalue of the Laplacian matrix L of (14). Since this is a trivial eigenvalue, that is, independent of the dynamics, we shall assume that X 1 is a coordinate on the critical manifold and not in the fast foliation, see also Sect. 2.3.

Remark 2 Due to
uniformly globally exponentially stable. On the other hand, the local stability properties of {X 3 = 0} are dictated by the sign of 2W + 1.
The previous observations allow us to reduce the analysis of (18) to that of the planar fast-slow system where X 1 is regarded as a parameter. It follows that the corresponding critical manifold isC It is now straightforward to see that, for fixed X 1 ,p = (X 3 , Y ) = 0, − 1 2 − β 1 X 1 is a nonhyperbolic point of the critical manifold.
Remark 3 Our goal will be to describe the dynamics of the network shown in Fig. 1 as trajectories pass through the nonhyperbolic pointp. The reason to consider this will become clear below when we give an interpretation of the singular dynamics in terms of the network. Thus, we assume thatG(X 1 , 0, 0, − 1 2 − β 1 X 1 , 0) < 0. Singular dynamics in terms of the network From the definition X = T x we have So, first of all, we have that the uniformly globally exponentially stable set A, previously defined by A = (X 1 , X 2 , X 3 , Y ) ∈ R 4 | X 2 = 0 (see Remark 2), is equivalently given by Naturally, the uniform global stability of A is still valid. Next, if we restrict (14) to A we obtain 1 2 w + 1 2 Fig. 2 Reduced graph corresponding to (23). The dynamics of the triangle motif converge exponentially to the dynamics of this simpler graph which is the model of a 2-node 1-edge fast-slow network as shown in Fig. 2. Next, we note in (23) Therefore, just as in the diagonalized system above, we can reduce the analysis of the triangle motif to the analysis of the planar fast-slow system Now, it is straightforward to see that the critical manifold is given by Let us consider the lines which are subsets of the critical manifold since is the only nonhyperbolic point of the layer equation of (24), and that the stability properties of C 0 are as shown in Fig. 3. For brevity let q = − 1+σ 0 (α 1 +α 2 ) 2 .
Next, suppose trajectories converge to N a 0 . This means that ( That is, the agents reach consensus; hence, we call N 0 the consensus manifold. On the other hand, assume trajectories converge to M a 0 . For this it is necessary that α 1 − α 2 = 0; otherwise, M 0 is tangent to the fast foliation. Then is a nonhyperbolic point of the fast dynamics. The case α 1 − α 2 = 0 is degenerate and corresponds to the case where M 0 is aligned with the fast foliation. Right: blow-up of the nonhyperbolic point p, where γ c is a (singular) maximal canard. The details of the blow-up analysis are given in Sect. 3.3

Fig. 4 Singular limit for the case
That is, for fixed values of y, agents converge to different values depending on their initial conditions. Therefore, we call M 0 the clustering manifold. Our goal will be to describe the dynamics of the network as agents transition from consensus into clustering. Thus, we also assume that g( p, 0) < 0.
It should be clear up to this point that the main difficulty for the analysis of fast-slow system (24) is given by the transition across a transcritical singularity (De Maesschalck 2015; Krupa and Szmolyan 2001b). Our goal is not to present a new analysis of this phenomenon but rather to study the effects of the blow-up transformation in a network. We shall show below that on each chart of the blow-up space, the resulting blow-up system can also be interpreted as a particular adaptive network. More importantly, it turns out that via the blow-up transformation one gains a clear distinction between the dynamics occurring at the different timescales. On a more technical matter, we will also show that the fact that the problem under study is defined on a graph results on a maximal canard, which in De Maesschalck (2015), Krupa and Szmolyan (2001b) is nongeneric.

Main Result
Since p is nonhyperbolic, the classical Fenichel theorem is not enough to conclude that for ε > 0 sufficiently small we have a qualitatively equivalent behaviour to the one in the limit ε = 0 described above. Therefore, a more detailed analysis is needed for our purposes. To state our main result, and for the analysis to be performed later, it will be convenient to move the origin of the coordinate system to the nonhyperbolic point p and to relabel the coordinates of the nodes. So, let us perform the following steps 1. Relabel the fast coordinates as b, c). This will make our notations across the blow-up charts simpler. 2. Translate coordinates according to (a, b, c, y (0)) and q = − 1+σ 0 (α 1 +α 2 ) 2 . Note that this translation depends on the initial conditions, but has the convenient implication a(t) + b(t) + c(t) = 0 for all t ≥ 0. 3. Rescale the parameter ε by ε → ε |g(0)| . Thus, we may assume that g(0) = −1.
where w = − 1 2 + y + α 1 a + α 2 b. Next, let us define the sections where δ > 0 is of order O(1). We further define the map which is induced by the flow of (27). We prove the following.
is globally attracting.

(T2) The critical manifold of (27) is contained in A and is given by the union
where Restricted to A and for ε > 0 sufficiently small: over, every trajectory with initial condition in en with a = 0 diverges from N ε exponentially fast as t → ∞. where with D + denoting the Dawson function (Abramowitz and Stegun 1972, pp. 219 and 235). In this case, if (a − b)| en > 0 then the map is well-defined and the corresponding trajectories converge towards M a ε as t → ∞. On the contrary, if (a − b)| en < 0, then the corresponding trajectories diverge exponentially fast as t → ∞.
Proof Items (T1) and (T2) have already been proven in our preliminary analysis of Sect. 3.1. Item (T3) readily follows from the relations a + b + c = 0 and c = a+b 2 , which are simultaneously satisfied on A. The proof of items (T3)-(T6) is given in Sect. 3.3.4.
The claims of Theorem 2 are sketched in Fig. 5. Interpretation In terms of the network, Theorem 2 tells us that: • The time evolution of the node c (the node that is not connected by the dynamic weight) can always be described as a combination of the dynamics of the nodes (a, b) (those connected to the dynamic weight). • The parameters α 1 , α 2 in the definition of the weight w = − 1 2 + y+α 1 a+α 2 b, play an essential role: (i) if α 1 = α 2 , then there is no "clustering manifold". Another way to interpret this degenerate case is that the nodes (or agents) have an equal contribution towards the value of the weight. This results in a zero net contribution of the nodes towards the dynamics of the weight. This is already noticeable in (24), where α 1 = α 2 results inw being independent on the nodes' state. In this case the dynamics are rather simple, trajectories are attracted towards consensus for y > 0 and repelled from consensus for y < 0; (ii) if α 1 = α 2 , then the clustering manifold exists. For suitable initial conditions, the nodes first approach consensus, but then, when y < 0, the nodes tend towards a clustered state in which b = −a and c = 0. • The consensus manifold N ε is a maximal canard, which implies that one observes a delayed loss of stability of N ε . In other words, one expects that trajectories exponentially near N ε stay close to it for time of order O(1) after they cross the transcritical singularity before being repelled from it. See also "Appendix A".

Blow-Up Analysis
In this section we are going to study the trajectories of (27) in a small neighbourhood of the origin. To do this we employ the blow-up method (Dumortier et al. 1996; Jardón-Kojakhmetov and Kuehn 2019; Krupa and Szmolyan 2001a;Kuehn 2015).

Remark 5
We could naturally perform the blow-up analysis restricted to the invariant and attracting subset A. However, since one of our goals is to investigate the effects of the blow-up on network dynamics, we shall proceed by blowing up (27) and track, on each chart, the resulting "blown-up network dynamics".
Let the blow-up map be defined by whereā 2 +b 2 +c 2 +ȳ 2 +ε 2 = 1 andr ≥ 0. We define the charts Accordingly we define local coordinates on each chart by The following relationship between the local blow-up coordinates will be used throughout our analysis.

Lemma 2 Let κ i j denote the transformation map between charts K i and K j . Then
Let us now proceed with the blow-up analysis on each of the charts. We recall that on K 1 one studies orbits of (27) as they approach the origin, on K 2 orbits within a small neighbourhood of the origin, and finally on K 3 orbits as they leave a small neighbourhood of the origin.

Analysis in the Entry Chart K 1
In this chart the blow-up map is given by Network interpretation corresponding to (39). The order O(1) terms in (39) correspond to a triangle motif with fixed weights. The particular values of the weights make such a network degenerate in the sense that the corresponding Laplacian has a kernel of dimension two. Next, the order O(r 1 ) terms in (39) correspond to two nodes connected by a dynamic weight. Finally, the O(r 1 ε 1 ) correspond to internal node dynamics We then obtain the blown-up vector field where f 1 (a 1 , b 1 , c 1 , r 1 , ε 1 ) reads as Remark 6 In (39) and (40) the term −1 + O(r 1 ) stands for exactly the same function.
Let us interpret the equations in the first chart from a network dynamics perspective. We are interested in the dynamics of (39) for ε 1 small and with r 1 → 0. This is because r 1 → 0 is equivalent to y(t) approaching the origin in (27). Thus, we may regard (39) as a perturbation of a network with fixed weights as shown in Fig. 6.
The order O(r 1 ) terms can be seen as a smaller network, only involving the nodes (a 1 , b 1 ) and with dynamic edge with weight r 1 (1 + α 1 a 1 + α 2 b 1 ). The order O(r 1 ε 1 ) can be interpreted as internal dynamics on each node.
Continuing with the analysis, it is straightforward to check (with the help of (17)) that for r 1 = 0 we have c 1 (t 1 ) → a 1 (t 1 )+b 1 (t 1 ) Proposition 1 System (39) has the following sets of equilibrium points.
Next, we show that the set defined by c 1 = a 1 +b 1 2 is an attracting centre manifold.

Proposition 2
The system given by (39) has a local 4-dimensional centre manifold W c 1 and a local 1-dimensional stable manifold W s 1 . The centre manifold W c 1 contains the sets of Proposition 1. Furthermore, W c 1 is given by c 1 = a 1 +b 1 2 , and the flow along it reads as Proof We start by using the similarity transformation (17). Under such a transformation one rewrites (39) as where It is now straightforward to see that there is a 1-dimensional stable manifold W s 1 tangent to the B 1 -axis and a 4-dimensional centre manifold W c 1 containing the set of equilibrium points (A 1 , B 1 , C 1 , r 1 , ε 1 ) ∈ R 5 | r 1 = B 1 = 0 .
Remark 7 Observe that, due to the term (−1 + O(r 1 )), the vector field corresponding to B 1 is not decoupled from the centre directions. However, we show below that W c 1 is indeed given by B 1 = 0.
The centre manifold W c 1 can be expressed by where Dh 1 denotes the Jacobian of h 1 . Let h 1 be given as where σ i jkl denotes scalar coefficients. Substituting (45) into the equation for B 1 we get We now have the following observations: 1. All the monomials in the right-hand side of (46) are of degree at least 3, therefore, all coefficients σ i jkl with i + j + k + l = 2 are zero. 2. Since the right-hand side of (46) is of order O(r 1 ) we have that all coefficients σ i j0l are zero for all i + j + l ≥ 3. Naturally, we then have that h 1 ∈ O(r 1 ) and thus k ≥ 1. 3. The coefficients σ i jk0 , k ≥ 1, are computed from the equality where the last equation is introduced for simplicity. We readily see that all coefficients σ i0k0 with i + k ≥ 3 are zero. Next, for i + j + k = 3, the term h 1 C 1 ∂h 1 ∂C 1 does not play a role because its degree is at least 4. It follows from the first item that σ i jk0 = 0 for i + j + k = 3. Next, let us write (47) in a simplified form by (i) expanding it, (ii) writing all monomials in the exact same form A i 1 C j 1 r k 1 , (iii) by omitting the monomial, and (iv) omitting the 0 of the superscript σ i jk0 . We get Now, it suffices to note that for each monomial, the coefficient σ i jk , with i + j +k = n and n > 3, of the left-hand side depends exclusively on coefficients σ i jk with i + j + k < n. From the previous items, and by progressing at each degree n, it follows that σ i jk0 = 0 for all i + j + k ≥ 2. 4. The exact same argument as in item 3 applies for l ≥ 1.
The expression of the centre manifold in the original coordinates is obtained by noting that B 1 = √ 6 6 (2c 1 − a 1 − b 1 ), implying that c 1 = a 1 +b 1 2 as stated. Finally, the flow along the centre manifold is obtained by taking into account the restriction c 1 = a 1 +b 1 2 .

Remark 8 W c 1 is the blow-up of A.
Before proceeding with the analysis on W c 1 , we have the next observation. (0)) denote initial conditions of (39) and let ε 1 = 0. Then sign(a 1 ) → sign(a 1 (0) − b 1 (0)) as t → ∞.
Proof It is easier to see the claim in (43) with ε 1 = 0, and where A 1 = √ 3 The previous observation is important since, as we will see, in W c 1 the set {a 1 = 0} is invariant. Note that we can now desingularize the dynamics restricted to W c 1 by dividing by r 1 in (42), as is usually the case when blowing up, to obtain Remark 9 Recall that a 1 (t 1 ) + b 1 (t 1 ) + c 1 (t 1 ) = 0 for all t 1 ≥ 0. Moreover, since in W c 1 we have c 1 = a 1 +b 1 2 we further have a 1 (t 1 ) + b 1 (t 1 ) = 0 for all t 1 ≥ 0. Therefore, we can consider instead of (49) the 3-dimensional system Naturally, solutions of (50) give solutions of (49) by adding b 1 (t 1 ) = −a 1 (t 1 ). Therefore we proceed by studying (50). It is worth noting that on W c 1 , the set (a 1 , r 1 , ε 1 ) ∈ R 3 | a 1 = 0 is invariant. Therefore, it is important to keep track of the sign of a 1 as it approaches W c 1 . Such sign is given by Proposition 3. That is, if a 1 (0) − b 1 (0) > 0 (resp. a 1 (0) − b 1 (0) < 0), then a 1 > 0 (resp. a 1 < 0) on W c 1 . Similarly, if a 1 (0) − b 1 (0) = 0, then a 1 = 0 on W c 1 . Finally, we recall that W c 1 coincides precisely with the invariant set A written in the coordinates of this chart (see the statement of Theorem 2).
To study the dynamics in this chart, we are going to be interested in the properties of the flow between the sections en 1 = (a 1 , r 1 , ε 1 where δ 1 > 0, and μ 1 > 0 is sufficiently small. The precise meaning of these sections becomes clear in Sect. 3.3.4 where we compute a transition map through a whole neighbourhood of the origin of(27). For now it shall be enough to mention that the definition en 1 is motivated by the entry section en (recall (28)), while ex 1 is a convenient section allowing us to transition towards the central chart K 2 .
Then, we have two 1-dimensional centre manifolds: E a 1 is a centre manifold to the equilibrium point (a 1 , ε 1 ) = (0, 0) and E r 1 to (a 1 , ε 1 ) = 1 α 2 −α 1 , 0 . The flow on both centre manifolds is given by ε 1 = 2ε 2 1 , and we have that E a 1 is tangent to the ε 1 -axis, while E r 1 is tangent to the vector 1 −2(α 2 − α 1 ) . In fact, one can show that E a 1 is actually given by a 1 = 0 and that it is unique. On the other hand E r 1 is not unique and has the expansion a 1 = 1 α 2 −α 1 + 1 2(α 1 −α 2 ) ε 1 + O(ε 2 1 ). Since ε 1 ≥ 0, we have that in a small neighbourhood of (a 1 , ε 1 ) = (0, 0) the flow is equivalent to that of a saddle, while in a small neighbourhood of (a 1 , ε 1 ) = ( 1 α 2 −α 1 , 0) the flow is equivalent to that of a source. From this analysis we conclude that the flow of (57) is as sketched in Fig. 7.

Remark 10
The orbit E r 1 can be identified with the critical manifold M r 0 as it goes up on the blow-up sphere. The same correspondence holds for E a 1 and N 0 . Compare Figs. 7 and 3.
In {ε 1 = 0} we have Therefore, the (a 1 , r 1 )-plane is foliated by lines parallel to the r 1 -axis. Along each leaf the flow is given by (55).
We can now summarize the previous analysis in the following proposition, which completely characterizes the dynamics of (39).

Proposition 4
The following statements hold for (39).
1. There exist a 1-dimensional local stable manifold W s 1 and a 4-dimensional local centre-stable manifold W c 1 , which is given by the graph of c 1 = a 1 +b 1 2 . Restricted to W c 1 one has b 1 = −a 1 , which implies c 1 = 0, and: 2. There is an attracting 2-dimensional centre manifold C a 1 . The manifold C a 1 contains a line of zeros a 1 = (r 1 , a 1 , ε 1 ) ∈ R 3 | a 1 = ε 1 = 0 and a 1-dimensional centre manifold E a 1 = (r 1 , a 1 , ε 1 ) ∈ R 3 | r 1 = a 1 = 0 . On the plane {r 1 = 0}, the centre manifold E a 1 is unique. The flow along E a 1 is unstable, that is, it diverges from the origin, while the flow on C a 1 away from a 1 is locally equivalent to that of a saddle. 3. There is a repelling 2-dimensional centre manifold C r 1 . The manifold C r 1 contains a line of zeros r 1 = (r 1 , a 1 , ε 1 ) ∈ R 3 | a 1 = 1 α 2 −α 1 , ε 1 = 0 and a 1-dimensional centre manifold E r 1 = (r 1 , a 1 , ε 1 ) ∈ R 3 | r 1 = 0, a 1 = 1 α 2 −α 1 +O(ε 1 )}. The flow along E r 1 is unstable, that is, it diverges from the equilibrium point (a 1 , ε 1 ) = 1 α 2 −α 1 , 0 , while the flow on C r 1 away from r 1 is locally equivalent to that of a saddle.
Proof The existence, graph representation and dimension of W c 1 are already proven in Proposition 2. The existence and dimension of C a 1 and of C r 1 follow from the linearization of (50). The flow on C a 1 and on C r 1 follows from (50) by noting that, up to leading-order terms, the vector field restricted to either of the centre manifolds is given by We are now ready to describe the flow of (50). Let 1 : en 1 → ex 1 be a map defined by the flow of (50).

Theorem 3 The image
where the function h a 1 = h a 1 (a 1 , δ 1 , ε 1 ) is given by , Proof The proof follows our previous analysis. The term h a 1 is obtained from (56) and evaluating transition time (54). The higher-order terms O(a 1 ε 2 1 ) follow from (57) with ε 1 > 0 small. For the expression of h a 1 it is important to recall Proposition 3. This means that the initial condition a * 1 in (56) has the same sign as a 1 (0) − b 1 (0), and where a 1 (0), b 1 (0) are initial conditions of (39).
The analysis in this chart is sketched in Fig. 8.

Analysis in the Rescaling Chart K 2
In this chart we study the dynamics of (27) within a small neighbourhood of the origin. The corresponding blow-up map reads as The blown-up vector field reads as withw = y 2 + α 1 a 2 + α 2 b 2 . In the rest of this section we omit the equation r 2 = 0 and just keep in mind that r 2 is a parameter in this chart. Before proceeding with the analysis, it is again very helpful to study the effect that the blow-up map has on the network's topology. Note that (62) can be regarded as the model of an O(r 2 ) graph preserving perturbation of a static network as shown in Fig. 9.
Roughly speaking, the blow-up separates two types of dynamics: the dynamics of order O(1) correspond to a consensus protocol on a degenerate static network. Here by degenerating we mean that the Laplacian of the static network has a kernel of dimension 2, as can be easily seen in (62)-(63) with r 2 = 0. Next, the dynamics of order O(r 2 ) occur in a slower timescale and correspond to the slowly varying edge with weight r 2w .
We proceed with the description of the flow of (62).
Next we show that (62) has an attracting 4-dimensional centre manifold W c 2 and a 1-dimensional stable manifold W s 2 . These objects, in fact, correspond, respectively, to W c 1 and W s 1 found in chart K 1 . In qualitative terms, reduction to W c 2 will correspond to representing the behaviour of the third node, with state c 2 , in terms of the other two nodes.
The centre manifold W c 2 is given by the graph of c 2 = a 2 +b 2 2 , and it holds that Proof The proof follows the same reasoning (and in fact it is simpler than) the proof of Proposition 2. The relation κ 12 (W c 1 ) = W c 2 is straightforward from (37).
Since the centre manifold W c 2 is attracting, and of codimension 1, the next step is to restrict the dynamics to it. However, the next observation is important (recall Proposition 3).

Lemma 3
The trajectories of (62) restricted to {r 2 = 0} have the asymptotic behaviour As it was the case in chart K 1 the previous lemma gives us the relevant sign of a 2 on the centre manifold W c 2 . The restriction of (62) to W c 2 results on a vector field of order O(r 2 ), which can be desingularized as is usual in the blow-up method by dividing by r 2 . By performing the aforementioned steps we obtain where we recall thatw = y 2 + α 1 a 2 + α 2 b 2 . From the fact that a + b + c = r 2 (a 2 + b 2 + c 2 ) = 0 for all r 2 ≥ 0 and due to the restriction to W c 2 , that is c 2 = a 2 +b 2 2 , we further have that a 2 + b 2 = 0. Therefore, the analysis of (62) is reduced to the analysis of the planar system a 2 = −2(y 2 + (α 1 − α 2 ) =:ν≥0 a 2 )a 2 , Note that in the restriction of (67) to {r 2 = 0}, one has that y 2 is essentially time in the reverse direction. To describe the flow of (67), let δ 2 > 0 and define the sections en 2 = (r 2 , a 2 , y 2 ) ∈ R 3 | y 2 = δ 2 , ex 2 = (r 2 , a 2 , y 2 ) ∈ R 3 | y 2 = −δ 2 .
(68) Accordingly, let 2 : en 2 → ex 2 be the map defined by the flow of (67). We now show the following. (67). Then the following hold.

There exists a trajectory γ c given by
No other trajectory of (67) converges to the y 2 -axis as t 2 → ±∞. 2. There exist orbits γ r 2 and γ a 2 that are defined, respectively, in the quadrants {a 2 < 0, y 2 > 0} and {a 2 > 0, y 2 < 0} and are given by where D + (y 2 ) stands for the Dawson function (Abramowitz and Stegun 1972, pp. 219 and 235). Furthermore, since y 2 is essentially time, the trajectory γ j 2 , j = r, a, has asymptotic expansions All trajectories of (67) with initial condition a * 2 > 0 and y * 2 > 0 are asymptotic to γ a 2 as t 2 → ∞. 3. The transition map 2 : en 2 → ex 2 is well-defined if and only if and given by 4. If a 2 | en 2 ≤ − 1 4D + (δ 2 ) then the corresponding orbit has asymptote y 2 = 2 which is implicitly given by Proof The first item follows from the invariance of a 2 = 0 and linear analysis along the y 2 -axis. For the second item, no distinction between the orbits is needed, one only needs to check that γ j 2 satisfies (67), for which (Abramowitz and Stegun 1972) Next, the asymptotic expansions for γ j 2 follow directly from Abramowitz and Stegun (1972), where one finds The fact that γ a 2 attracts all trajectories with the given initial conditions follows from: i) a 2 = 0 is invariant, ii) in the limit |y 2 | → ∞ the curve γ a 2 is asymptotic to y 2 + νa 2 = 0, and iii) the set {y 2 + νa 2 = 0} is attracting in the quadrant a 2 > 0, y 2 < 0.
For the transition map we have that (67) has an explicit solution given by where (a * 2 , y * 2 ) denotes an initial condition. Thus, for the map 2 to be well-defined we need to ensure that the denominator in (77) does not vanish. Let us substitute (a * 2 , y * 2 ) = (a * 2 , δ 2 ) with δ 2 > 0, and compute a 2 (−δ 2 ). For this it is useful to recall that D + is an odd function. So we get which indeed leads to (72) and the form of 2 also follows. Finally, the expression of the asymptote 2 is obtained by solving the denominator of (77) equal to 0 and with initial condition (a * 2 , y * 2 ) = (a * 2 , δ 2 ).
Remark 12 • In particular, it follows from the third item of Proposition 7 that the map 2 (r 2 , a 2 , δ 2 ) is well defined for all a 2 ≥ 0. • For δ 2 > 0 sufficiently large and a * 2 sufficiently small one has that a 2 (−δ 2 ) ≈ a * 2 .
We now relate the curves γ 2 and γ c with centre manifolds found in chart K 1 .

Proposition 8
The curves γ r 2 and γ c correspond, respectively, to the centre manifolds E r 1 and E a 1 of chart K 1 .
Proof We detail the relation between γ 2 and E r 1 , the correspondence between γ c and E a 1 is trivial since they are given by {a 2 = 0} and {a 1 = 0}, respectively. We can transform γ 2 into the coordinates of chart K 1 via the map κ 21 , which gives Taking the limit ε 1 → 0 in (79) one gets a 1 = − 1 ν = 1 α 2 −α 1 . Thus the claim follows from the analysis performed in chart K 1 particularly for r 1 = 0.

Remark 13
The trajectory γ c corresponds to a singular maximal canard of (27), while γ r 2 and γ a 2 correspond to the manifolds M r 0 and M a 0 . Accordingly, O(r 2 )-small perturbation of such orbits corresponds to N ε , M r ε , and M a ε for ε > 0 sufficiently small.
The analysis performed in this chart is sketched in Fig. 10.

Analysis in the Exit Chart K 3
The analysis in this chart is similar to that in chart K 1 performed in Sect. 3.3.1. Therefore, we shall only point out the main information required from this chart and omit the proofs. In this chart the blow-up map is given by Fig. 10 Flow of (62) along W c 2 . This flow is equivalent to that of (27) within a small neighbourhood of the origin and for ε > 0 sufficiently small. We observe that trajectories starting at en 2 are first attracted to the invariant set {a 2 = 0}, which in terms of the network means consensus. Then, once the trajectories pass through the origin, they are repelled from consensus. All trajectories with initial condition a * 2 > 0 are eventually attracted towards γ a 2 , which in terms of the original coordinates corresponds to the clustering manifold We then obtain the blown-up vector field where f 3 (a 3 , b 3 , c 3 , r 3 , ε 3 ) reads as The flow of (81) is described as follows.

Proposition 9
The following claims hold for (81).
1. There exist a 1-dimensional local stable manifold W s 3 and a 4-dimensional local centre-stable manifold W c 3 . The centre manifold is given by the graph of c 3 = a 3 +b 3 2 . Restricted to W c 3 one has b 3 = −a 3 , c 3 = 0, and: 2. There is a repelling 2-dimensional centre manifold C r 3 . The manifold C r 3 contains a line of zeros r 3 = (r 3 , a 3 , ε 3 ) ∈ R 3 | a 3 = ε 3 = 0 and a 1-dimensional centre manifold E r 3 = (r 3 , a 3 , ε 3 ) ∈ R 3 | r 3 = a 3 = 0 . On the plane {r 3 = 0}, the centre manifold E r 3 is unique. The flow along E r 3 is stable, that is, it converges to the origin, while the flow on C r 3 away from r 3 is locally equivalent to that of a saddle.

Define the sections
where δ 3 > 0, and μ 3 > 0 is sufficiently small. Let 3 : en 3 → ex 3 denote the map induced by the flow of (81) restricted to W c 3 . Then 3 has the form where the function h a 3 = h a 3 (a 3 , δ 3 , ε 3 ) reads as Remark 14 • If a 3 ≥ 0, then the function h a 3 is well-defined for any point (a 3 , r 3 , μ 3 ) ∈ en 3 . If a 3 < 0, the function h a 3 is well-defined only for T 3 < 1 2 ln 1 + 1 (α 1 −α 2 )|a 3 | . In such a case, we choose suitably 0 < r 3 < δ 3 so that the function h a 3 is well-defined. • For a 3 > 0, and T 3 > 0 sufficiently large, one has h a 3 ≈ 1 The flow in this chart is as depicted in Fig. 11.

Full Transition and Proof of Main Result
In this section we prove items (T4)-(T6) of Theorem 2. First of all note that if we choose δ 1 = δ 3 = δ, then the sections en 1 and ex 3 are precisely the sections en | A and ex | A in the blow-up coordinates. Moreover, the set A corresponds, in each chart, to the centre manifold W a 1 , W a 2 , and W a 3 , respectively. Thus it will suffice to consider the transition map¯ : en 1 → ex 3 in the blow-up space (or equivalently | A ). Fig. 11 Schematic representation of the flow of (81) restricted to the attracting centre manifold W c 3 . The wegde-like shape of the image of 3 ( en 3 ) (shaded in ex 1 ) is due to the contraction towards C a 3 The map¯ ( en 1 ) is then given as where the maps 1 , 2 , and 3 are given in Sects. 3.3.1, 3.3.2, and 3.3.3, respectively, and where the maps κ 12 and κ 23 are defined in Lemma 2. We compute¯ ( en 1 ) as follows. For brevity we disregard the higher-order terms in the chart maps.
5. Finally we compute 3 • κ 23 • 2 • κ 12 • 1 ( en 1 ) from (84), obtaining two weights are fixed and positive, but not necessarily equal. The second generalization deals with consensus protocols defined on arbitrary graphs, where just one weight is dynamic.

The Nonsymmetric Triangle Motif
In Sect. 3 we studied a triangle motif with the fixed weights equal to 1. In this section we show that the nonsymmetric case is topologically equivalent to the symmetric one. Let us start by considering the fast-slow system where w = w * + y + α 1 x 1 + α 2 x 2 , the weights w 13 and w 23 are fixed and positive, and w * ∈ R is such that dim ker L| {w=w * } = 2, see more details below. We recall that, from the arguments at the beginning of Sect. 3.2, we may consider that, after a translation depending on initial conditions, we have x 1 + x 2 + x 3 = 0. System (92) corresponds to the network shown in Fig. 12.

Remark 15
If w 13 = w 23 =w > 0, one can show, for example using the exact same transformation T of Lemma 1, that the eigenvalues of L are {0, 3w, 2w +w}. Thus, the analysis in this case is completely equivalent to the one already performed in Sect. 3. The only difference would be the rate of convergence towards the set x 3 = x 1 +x 2 2 . Therefore, in this section we rather assume w 13 = w 23 .
This means that, as in the symmetric case, the Laplacian matrix has always a positive eigenvalue λ 2 (w), and another λ 3 (w) whose sign depends on w.
We emphasize that, just as in the symmetric case, the previous proposition provides the characterization of the critical manifold of (92) given as the union of "the consensus" and the "the clustering" manifolds.

Proposition 11
The layer equation of (92) has a transcritical bifurcation at p.

Proof
We shall compute the eigenvalues associated with the equilibrium points of Proposition 10. We start by substituting x 3 = w 13 x 1 +w 23 x 2 w 13 +w 23 , and afterwards x 2 = − 2w 13 +w 23 w 13 +2w 23 x 1 . Naturally, both relations hold at all the equilibrium points. In particular, the equilibrium points along the consensus manifold are given by x 1 = 0, while those along the clustering manifold are given by x 1 = −(w 13 +2w 23 )y α 1 (w 13 +2w 23 )−α 2 (2w 13 +w 23 ) . By doing so we rewrite (92) in the limit ε → 0 as where y is considered as a parameter. Let x 1 = λ N x 1 denote the linearization of (94) at x 1 = 0, and x 1 = λ M x 1 denote the linearization of (94) at x 1 = −(w 13 +2w 23 )y α 1 (w 13 +2w 23 )−α 2 (2w 13 +w 23 ) . We have It is then clear that the eigenvalues along the consensus and the clustering manifolds (λ N and λ M , respectively) have opposite signs and that there is an exchange in their signs at y = 0. Finally we note that y = 0 precisely corresponds to the point p, completing the proof.
With the previous analysis we have shown that, at the singular level, the dynamics of the symmetric and the nonsymmetric graphs are topologically equivalent. The reasons for this are: a) the uniform positive eigenvalue of the Laplacian matrix L and b) that the dynamics of both systems are organized by a transcritical singularity corresponding to the intersection of the consensus and of the clustering manifolds. It remains to show that the passage through the transcritical singularity is also equivalent in both cases. We shall show this in the central chart K 2 . We recall the the blow-up in the central chart is given by Accordingly, the blown-up vector field reads as For r 2 = 0 we get the linear system Using similar arguments as in Sect. 3 we can show that W c 2 = c 2 = w 13 a 2 +w 23 b 2 w 13 +w 23 is an attracting centre manifold. Restriction to W c 2 and division of the vector field by r 2 result in Note that (99) is exact same equation (67) that we obtained in the symmetric case. This means that in both cases (symmetric and nonsymmetric), the restriction to the centre manifold W c 2 coincides. With the above analysis we have shown the following: Proposition 12 Fast-slow system (92) with w 13 > 0 and w 23 > 0 is topologically equivalent to the case w 13 = w 23 = 1.
In qualitative terms, the only difference between the symmetric and the nonsymmetric cases is the convergence rate towards the invariant set A. Once trajectories have converged to A, the dynamics are organized by the same transcritical singularity.

Arbitrary Graphs
A natural question that arises is whether the analysis we have performed in Sect. 3, particularly in Sect. 3.3, has any relevance for consensus dynamics on arbitrary weighted graphs. In this section we argue that indeed, given some natural assumptions, generic consensus dynamics with one slowly varying weight behave essentially as the triangle motif.
Let us consider an undirected weighted graph G = {V, E, W}. We assume that there are no self-loops, i.e. w ii = 0 for all i ∈ 1, . . . , m and that there is at most one edge connecting two nodes. Next, without loss of generality, let us assume that w 12 = w ∈ R is dynamic, while the rest of the weights w i j , (i, j) ∈ E and (i, j) = (1, 2), are fixed and positive. Denote by L(w) the Laplacian matrix corresponding to the graphs we have defined so far. As in the analysis of the triangle motif we assume that the dynamic weight w depends smoothly on the nodes it connects (namely (x 1 , x 2 )) and on an extrinsic slow variable y ∈ R. Thus we consider the fast-slow system where x ∈ R m , y ∈ R and L is a Laplacian matrix. Recall from the rescaling we performed in Sect. 3.3 that it suffices to consider trajectories such that m i=0 x i (0) = 0, and to set w = w * + y + a 1 x 1 + α 2 x 2 + O(2), where by O(2) we denote monomials of degree at least 2. Moreover w * is a particular value at which dim(ker L(w * )) > 1.

Lemma 4
Consider consensus protocol (100) as defined above. Then, the following hold.
Proof Recall that 0 is a trivial eigenvalue with eigenvector 1 n . Therefore, dim ker L(w) increases its dimension whenever an eigenvalue crosses 0. Next, we note that smooth one parameter families of symmetric matrices have generically simple eigenvalues (Jonker et al. 1993). This means that, generically, only one of the nontrivial eigenvalues of L(w) can vanish for a certain value of w. Thus, the first item in the lemma follows. Next, assuming analytic dependence of L(w) on w and according to (Kato 2013, II.6.2), the matrix L(w) can be orthogonally diagonalized as L(w) = Q (w)D(w)Q(w), where Q(w) and D(w) are also analytic in w. This means that the layer equation of (100) is conjugate to wherew =w(z, y) = w * + y + A(z) + O(2), where A is a linear function with A(0) = 0. We know from our previous arguments that there is a k ∈ [2, 3, . . . , m] such that λ k (w * ) = 0 while λ j (w * ) = 0 for all j = k. Thus, we note that z k undergoes an exchange of stability if λ k crosses transversally the origin. But note that ∂λ k ∂ y (0) = ∂λ k ∂w ∂w ∂ y (0). Since we have that λ k depends analytically onw, we expect that ∂λ k ∂w (0) is, generically, nonzero. Thus, we conclude that in a generic setting, whenever eigenvalues cross the origin, they do it transversally and thus a typical exchange of stability (transcritical bifurcation) occurs.

Remark 16
We note that singular pitchfork bifurcations can also occur, but this requires extra conditions on w, namely w = y + α 1 x 2 1 + α 2 x 2 2 . In that case one can follow a similar analysis as that performed here; see also Krupa and Szmolyan (2001b).
To finalize this section, we want to emphasize the relevance of the blow-up method to study singularities of dynamic adaptive networks defined on arbitrary graphs. First, we recall that nowadays, the blow-up method is an essential part of geometric singular perturbation theory (GSPT). Thus, it is to be expected that GSPT will be used to analyze the dynamics of adaptive networks with multiple timescales near singularities. Next, we point out that motifs can be regarded as the most basic and simple structures in a network. Motifs can serve as building blocks to model complex phenomena, yet they carry essential properties of the network. In particular, the triangle motif studied in this paper is fairly common in larger networks. Thus, as we have shown in this section for consensus protocols, if the topological changes are due to one dynamic edge, then generically the transcritical singularity is the organizing centre. Here by generic we mean that the dynamic weight is affine on the nodes and on the extrinsic variable y. The fact that the transcritical singularity organizes the dynamic implies that for any communication protocol whose linearization is a consensus protocol, the same transcritical singularity describes the local properties of the dynamics. See also the simulations in "Appendix A".
The second important observation derived from our analysis is that the blow-up transformation preserves the network structure. This means that after blow-up, in each chart, one obtains local vector fields that inherit network properties of the original problem. Moreover, after blowing-up, the effects of the timescale separation are also clearly visible in terms of the network topology. There is in principle no reason to a priori (or before this paper) expect the aforementioned holds, especially because the blow-up transformation is singular. Therefore, we have also shown that the blowup method remains a suitable tool of analysis in the context of dynamic networks. Furthermore, although here we have shown the suitability of the blow-up method for fairly simple network dynamics, it is a promising preamble and extensions to more general dynamic networks are currently under development.

Summary and Outlook
We have studied a class of adaptive networks under a linear average consensus protocol. The main property of the networks we studied here is that one of the edges is slowly varying and can take values over the whole reals. The fact that the dynamic weight can be negative implies that the Laplacian of the graph may not be positive semi-definite, as is the case of nonnegative weights. We have shown that the dynamics of the network are organized by a transcritical singularity. Interestingly, the network structure induces a generic maximal canard [unlike the fast-slow transcritical singularity of Krupa and Szmolyan (2001b)]. Moreover, we have shown that the blow-up method preserves the network structure. That is, on each of the blow-up charts we have found a related network but whose analysis is simpler compared to the full fast-slow one. Overall we have provided a case study in which centre manifold reduction and tools of geometric singular perturbation theory, in particular the blow-up method, have been successfully used to describe the dynamics of a class of two timescale networks with a dynamic weight.
As we have considered one of the simplest network communication protocols, we conjecture that similar and more complicated problems are to be encountered when one studies general complex networks. For example, already assuming two slow weights presents new mathematical challenges: on the one hand the critical manifold is potentially more complicated leading to more complex singular dynamics; on the other hand, it does not necessarily hold that the nonzero eigenvalues of the Laplacian are simple, and that they cross zero transversally. These two obstacles imply that, probably, one needs to desingularize higher codimension singularities and that generic results would be harder to obtain. Furthermore, although in this paper we have studied continuous-time and continuous state-space network dynamics, we expect that analogous multiscale phenomena can be found in discrete systems. Similar relevance can be expected in more general adaptive network scenarios including directed networks or those incorporating stochastic phenomena. Beyond our work here, there are currently relatively few works linking techniques between multiple timescale dynamical systems and network science (Ashwin et al. 2017;Cappelletti and Wiuf 2017;Kuehn 2012Kuehn , 2019). Yet, we conjecture that the inclusion of multiscale dynamics into network science will have far-reaching consequences and will have a high impact in better modelling, analysis, and understanding complex phenomena.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

A Numerical Analysis and Simulations
In this section we briefly discuss a numerical issue that may appear when simulating a fast-slow consensus network. This numerical issue is related to the presence of a maximal canard and yields trajectories not diverging when they should. Accordingly, we present an algorithm that overcomes, to some extent, such an issue. Afterwards, since the main part of the analysis of this paper concerns the triangle motif of Sect. 3, we present some numerical examples of larger networks showcasing a transition through a transcritical singularity. In this way, we also present numerical evidence of the generalizations presented in Sect. 4.2. At the end of this appendix, motivated by the fact that a dynamic weight in the consensus protocol opens up the possibility for more complicated dynamics rather than simple average consensus, we numerically investigate the existence of periodic solutions. Although we do not rigorously study such a problem here, the geometric understanding of the way the dynamics are organized allows us to conjecture situations in which periodic solutions indeed appear.

A.1 An Issue with Numerical Integration
Due to the equivalences shown in Sect. 4, we shall restrict ourselves in this section to the triangle motif with w 13 = w 23 = 1. For convenience we recall that the model reads as where w = − 1 2 + y +α 1 a +α 2 b and a(t)+b(t)+c(t) = 0 for all t ≥ 0. We know that L(a, b, y) has eigenvalues λ 1 = 0, λ 2 = 3, λ 3 = λ 3 (a, b, y). Thus, roughly speaking, the numerical issue we present below has to do with which nontrivial eigenvalue dominates at t = 0. Recall that the smallest nontrivial eigenvalue of the Laplacian, called in some instances "spectral gap" or "algebraic connectivity", bounds the rate of convergence towards consensus.
Let us discretize (102) using the forward Euler approximation method x ≈ , where x k = x(k t) with k ∈ N 0 . This discretization preserves the invariant a(t) + b(t) + c(t) = 0 for all t ≥ 0, resulting in a k + b k + c k = 0 for all k ≥ 0. Taking into account that c k = −a k − b k , and disregarding the higher-order terms in y , we write the discretized version of (102) as where w k = − 1 2 + y k + α 1 a k + α 2 b k . The matrix A k has spectrum spec A k = {λ 2 , λ 3 (k)} = {1 − 3 t, 1 − (2w k + 1) t}. From Sect. 3.1, we further know that the eigenvalue λ 2 is related to the convergence rate towards c k = a k +b k 2 , which together with the invariant a k + b k + c k = 0 is equivalent to the convergence towards {a k = −b k }. On the other hand, the eigenvalue λ 3 (k) is related to the stability of the consensus manifold, that is {a k = b k }. Since the aforementioned convergence rates are both exponential, and for meaningful 1 initial conditions both eigenvalues are within the unit circle for k = 0, the relationship between the two eigenvalues plays an important role in the numerical integration.
Suppose that |λ 3 (0)| > M|λ 2 |, for some M > 0. Then, up to truncation and computer precision errors, the relation a k = b k dominates over a k = −b k for some k > K > 0. Substitution of a k = b k in (103) implies that the governing difference equation is where we observe that the weight w k does not play a role any more, and that a k = 0 is invariant. This means that, again disregarding numerical errors and approximations due to computer precision, a k = 0 is in this case a unique equilibrium point, independent of the value of the weight w k . In essence, this means that a computer algorithm may not recognize the instability of the consensus manifold; we note that this mechanism of "over-stabilization" induced by conserved quantities due to the network structure, is in principle different from recently discovered extended stabilization by the Euler method near transcritical and pitchfork singularities (Arcidiacono et al. 2019;Engel and Jardón-Kojakhmetov 2019;Engel and Kuehn 2018).
On the contrary case, if |λ 3 (0)| < M|λ 2 | for some M > 0, then the relation a k = −b k dominates and the governing difference equation is where the transition through a transcritical singularity, depending on the value of w k , is present. Therefore, as expected from our analysis, there is a typical exchange of stability through a transcritical singularity for some negative values of w k . With the above-simplified analysis we have argued that numerical integration of (102) may not be correct when |2w(0) + 1| > 3M for some M > 0. To prevent the aforementioned issue, one may adapt the analysis presented in Sect. 3.3 as shown in Algorithm 1 and Fig. 13.

A.2 Ring, Complete, and Star Networks
To complement the analysis performed in Sect. 4, we present here a couple of numerical simulations of fast-slow consensus protocols defined on ring, complete, and star networks with more than 3 nodes. In all the simulations shown in Fig. 14 we keep the dynamic weight w = y + α 1 x 1 + α 2 x 2 between nodes x 1 and x 2 , while all other edges are fixed to 1. We note that we produce simulations for initial conditions that lead to exchange between consensus and clustering. We observe that in all cases of Fig. 14, we have a qualitative behaviour similar to the one analyzed in the triangle motif, thus validating the arguments of Sect. 4. Data: t 0 (initial time), t (time step), t f (final time), (a 0 , b 0 , c 0 , y 0 , ε) (initial conditions and ε), e A (a distance bound from the set A = c k = a k +b k 2 ) begin for k = 0, . . . , ≤ e A then Stop and exit for loop saving (a k , b k , c k , y k , k). end end for j = k, . . . , Algorithm 1: Pseudo-code used to simulate (102). The first for-loop numerically integrates (27) via (102). This for-loop stops when the trajectories reach a small neighbourhood of the globally attracting set A. Such a threshold is set by e A in the algorithm. Afterwards we switch to a simplified system which is obtained as a restriction to A. Note the resemblance between the system in the second for-loop and (67). Naturally, the actual numerical integration method is arbitrary, here for simplicity we have implemented forward Euler, yet providing reliable simulation results, see Fig. 13.

A.3 Periodic Orbits on the Triangle Motif
Commonly, and historically, one considers consensus protocols seeking consensus among the nodes. This behaviour is the only possible one if the weights of the graph are nonnegative. However, as we have seen in the main part of this paper, introducing negative weights enriches the dynamics. In this section we want to provide numerical evidence on the existence of periodic orbits in consensus networks. We do not attempt to give a full treatment of the problem. Rather, we present two instances that are constructed from the geometric description we developed in Sect. 3.
Let us then consider triangle motif (102) and let us consider initial conditions with y(0) > 0. In order to produce periodic orbits one must introduce a return mechanism that allows trajectories to return to y > 0 after they have crossed the origin. Since we already know that the dynamics are organized as sketched in Fig. 3, we propose two return mechanisms. The plots on the left are for y(0) = 1.9, while the plots on the right for y(0) = 2. In both figures we show: a integration via forward Euler on the first row; b integration via ode15s on the second row; and c integration via the proposed algorithm in the third row, where we set e A = 1 × 10 −9 . The Euler integrations are performed with t = 1 × 10 −3 , while for the ode15s we set the MaxStep to 1 × 10 −3 . We observe that for y(0) = 1.9 the three algorithms provide similar outcome, namely the trajectories first approach consensus and then, when the weight is sufficiently negative, they transition towards clustering. The delay on the transition towards clustering is due to the trajectories being exponentially close to the maximal canard. However, for the case y(0) = 2, only our proposed method provides a result aligned with the qualitative analysis of Sect. 3. Note that the simulation for y(0) = 2 falls under the case where after sometimes the dynamics are governed by (104), explaining the observation of the trajectories remaining at (or close to) consensus even though the weight is largely negative. We recall that a negative weight means that the consensus manifold is unstable, yet trajectories remain close to it. In conclusion, our conjecture is that, in general, numerical algorithms for fast-slow consensus networks in the context of this paper work well when initial conditions are near the invariant set A and y(0) is not too large. Otherwise, numerical integration methods may require careful set-up in order to guarantee correct simulations 1. The first natural way to introduce a return mechanism is to add a drift on the slow variable y that acts away from the consensus manifold N ε . For this strategy to result in periodic orbits, one further requires that the clustering manifold M 0 is aligned with the fast foliation, that is α 1 − α 2 = 0. For this example we them propose  (100) under several graph topologies. For all these simulations we consider the dynamic weight w = y + 2x 1 + x 2 on the edge {1, 2} and all other weights fixed to 1. We also set ε = 0.05 and y(0) = 0.5. We observe in all cases that the trajectories first converge towards the origin (average consensus), and then, when w reaches some negative value, the trajectories leave a small vicinity of the consensus manifold and approach a clustering state. The actual convergence rate in each case is given by the so-called spectral gap, or the smallest nontrivial eigenvalue We emphasize that in this case, the existence of periodic solutions does not follow from the singular limit. However, we know from our geometric analysis, especially in the chart K 2 , that this model indeed has periodic solutions. We show in Fig. 15 a simulation of (106).  (106) with (y(0), α, k 1 , ε) = (0.5, 1, 1, 0.05). From left to right, the first two plots are the time series for the nodes and the weight, while the third plot depicts the corresponding phase portrait Another way to produce a return mechanism is to add higher-order terms to the dynamic weight. Based on the singular limit sketched in Fig. 3, the idea is to achieve a singular limit as depicted in Fig. 16.
We note that near the origin, the singular limit is just as in Fig. 3. Furthermore, by inspecting Fig. 16 we observe that returning on the left side of M 0 is "easier" than on the right, because, to produce a return mechanism on the right side we would actually require to generate a canard cycle. So, for the purposes of this example we shall concentrate on the case where the dynamics with a 2 < 0 exhibit periodic solutions. Following Fig. 16 we propose the weight w = − 1 2 + α 1 a + α 2 b + α 3 a 3 + α 4 b 3 ,  Fig. 17 An example of periodic orbits on the triangle motif due to a cubic weight. We have used parameters (α 1 , α 2 , α 3 , α 4 , β, ε) = (2, 1, 1, 1.01, −.5, .05) with α 1 − α 2 > 0 and α 3 − α 4 < 0. Next, we must introduce a new slow vector field so that trajectories can travel back along the left branch of the cubic critical manifold. Naturally there are many ways to achieve this. For example: for some β 1 < 0. Figure 17 shows a corresponding simulation.