## 1 Introduction  
Consensus algorithms are protocols allowing an agent network to agree on certain quantities of interest. Early work on consensus in social systems was introduced by [PERSON] [1], who modeled individuals iteratively updating their opinions to the average of their neighbors' opinions. However, it is known that other individuals who are not neighbors are also influential in people's opinions [2] and behaviour [3, 4]. In control theory, consensus gained prominence for coordinating multi-agent systems (e.g., fleets of autonomous vehicles or sensor networks) [5, 6]. How this consensus is reached heavily depends on the initial state and network structure.  
Let \(G=(V,E)\) be a network with \(V\) as the set of nodes and \(E\) as the set of nodes. If \(A\) is the adjacency matrix of \(G\) and \(D\) is its degree matrix (a diagonal matrix with the degree of the node \(v_{i}\in V\) in the position \(d_{ii}\)), the _Laplacian matrix_ is defined as \(L=D-A\). Laplacian matrices and their spectral properties have been extensively studied due to their appeal when studying graph connectivity, spreading, and community detection [7, 8]. This facilitates measuring robustness, spectral clustering, and partition of networks.  
While a Laplacian matrix captures direct (one-hop) connections connecting adjacent nodes by an edge, Estrada extended the notion of adjacency to include paths of length \(k\) between nodes generalized to incorporate longer path-based connections, rather than only immediate neighbors by introducing \(k\)-path Laplacian matrices [9]. These matrices are constructed from \(k\)-path adjacency matrices that count the shortest paths of length \(k\) between any pair of nodes, providing a multi-hop representation of the network connectivity. We recall that the case of \(k=1\) returns classical Laplacian matrices. If the multiplicity of the zero eigenvalue of \(L^{k}\) is one, then the network is \(k\)-path connected (analogous to one-hop connectivity for the standard Laplacian matrix). These path-based extensions provide a more global view of connectivity beyond immediate neighbors.  
The introduction of path-based Laplacians permits the incorporation of long-range connections and the study of how they impact dynamic network processes. This connectivity extension is particularly relevant for complex networks such as social [10] or transportation systems [11], where indirect connections (friends-of-friends in a social network or multi-hop routes in a transportation network) significantly influence network behavior.  
For example, considering \(k>1\), we can accelerate synchronization and consensus in networks by effectively reducing distances between nodes [12,13]. Additionally, by weighting connections along paths, path-Laplacian matrices generalize a foundational graph-theoretic concept and provide a richer framework to study connectivity and diffusion processes on networks.  
In this work, we introduce several machine learning methods for estimating the consensus in networks comprising long-range interactions through \(k\)-path-Laplacian matrices instead of using numerical methods. We study three different types of networks: Erdos-Renyi [14], Watts-Strogatz [15], and Barabasi-Albert [16]. We also test several machine learning methods to estimate the consensus finally obtained in these networks as time passes.  
The manuscript is organized as follows: In Section 2, we review some aspects on mechanisms on multi-agent systems modeled as networks. Useful machine learning models to study dynamics on networks, mainly based on recurrent neural networks, are described in Section 3. The mathematical formalism of consensus through path-Laplacian matrices for directed and undirected networks is shown in Section 4. In Section 5, we describe the data generation for the process which will be used for training, validation, and testing the models. We describe the performance of the models in Section 6 and we outline the conclusions in Section 7.