Abstract
In this study, we analyzed the problem of accelerating the linear average consensus algorithm for complex networks. We propose a data-driven approach to tuning the weights of temporal (i.e., time-varying) networks using deep learning techniques. Given a finite-time window, the proposed approach first unfolds the linear average consensus protocol to obtain a feedforward signal-flow graph, which is regarded as a neural network. The edge weights of the obtained neural network are then trained using standard deep learning techniques to minimize consensus error over a given finite-time window. Through this training process, we obtain a set of optimized time-varying weights, which yield faster consensus for a complex network. We also demonstrate that the proposed approach can be extended for infinite-time window problems. Numerical experiments revealed that our approach can achieve a significantly smaller consensus error compared to baseline strategies.
Introduction
In many distributed systems—from sensor networks and power grids to load balancing in data centers—nodes need to reach an agreement on the average of their initial states. This is the average consensus problem. The standard approach uses a linear protocol where nodes repeatedly update their state based on a weighted average of their neighbors. While we know how to find the "best" static weights for a fixed network, static weights are inherently limited in speed. Existing "finite-time" consensus algorithms exist, but they often struggle with numerical instability as the network grows or require very specific mathematical conditions. This research explores whether deep learning can find a sequence of time-varying weights that reaches consensus faster and more reliably.
Methodology: Algorithm Unfolding
The core innovation is a technique called algorithm unfolding, which transforms the recursive consensus protocol into a trainable neural network structure.
Unfolding to a Neural Network
The recursive linear consensus equation is expanded over $T$ time steps, creating a feedforward signal-flow graph. In this architecture, each time step corresponds to a "layer," each node in the network acts as a "neuron," and the physical edges of the network represent the "synaptic weights."
Linear Architecture and Training
Unlike standard deep learning models, this "consensus network" lacks non-linear activation functions (like ReLU), remaining a linear system. However, the weights are allowed to vary at every layer (time step), providing significantly more degrees of freedom than static weight models.
To ensure stability and performance, an incremental training strategy is employed. Weights are first optimized for $T=1$, and these results serve as the initialization for $T=2$, continuing until the full time window is trained. The loss function minimizes the Mean Squared Error (MSE) between the nodes' states at time $T$ and the true average of the initial states. For infinite-time problems, the optimized sequence of $T$ weight sets is repeated periodically.
Experimental Evaluation
The approach was evaluated on both deterministic and synthetic networks:
- Empirical Networks: Benchmarks such as the Krackhardt kite, Chvátal graph, Karate club social network, and Tutte graph.
- Random Synthetic Networks: Erdős-Rényi (ER), Barabási-Albert (BA), and Watts-Strogatz (WS) models with 10 to 250 nodes.
- Robustness: While training used a uniform distribution of initial states, testing included log-normal, exponential, and binomial distributions to ensure the weights were distribution-agnostic.
Key Insights and Results
The "Aha" moment of this research is the realization that a multi-step linear dynamical system is structurally identical to a deep linear neural network. This allows the use of powerful optimization tools like the Adam optimizer to solve classical control problems.
Performance and Stability
- Superior Accuracy: In the Karate club network (34 nodes), the proposed method achieved a consensus error of $\approx 1.9 \times 10^{-7}$, compared to $\approx 0.12$ for the static optimal baseline.
- Numerical Stability: On the Tutte graph (46 nodes), traditional finite-time algorithms failed due to numerical instability (error of $5.7 \times 10^2$), whereas the deep learning approach maintained a tiny error of $2.0 \times 10^{-5}$.
- Faster Convergence: When used periodically, the deep learning weights yielded a significantly smaller asymptotic convergence factor than the best possible static weights across all tested network types.
Conclusion and Future Work
By treating the consensus problem as a robust optimization task, deep learning avoids the numerical pitfalls of traditional algebraic methods. While the current training process is centralized and assumes a fixed topology, future work will explore extensions to directed graphs and scenarios with time-varying or unknown network structures.
Summary updated