## 7 Conclusions  
Our study introduces a novel framework that significantly advances the modeling of consensus dynamics in multi-agent networks by incorporating machine learning methods to include the effect of long-range interactions through path-Laplacian matrices. By extending the classical one-hop Laplacian formulation to account for \(k\)-hop connections, we have demonstrated that capturing extended connectivity not only estimates the final consensus state, but also enhances the robustness of consensus protocols. Such an approach results in particular interest in directed networks, when the consensus is not just the average of components and depends on the inner structure of the network.  
The experimental analysis--conducted on synthetic networks generated using Erdos-Renyi, Watts-Strogatz, and Barabasi-Albert models--underscores the pivotal role of multi-hop interactions. In the base case of local interactions, traditional consensus mechanisms perform adequately; however, the exponential (multi-hop) approach reveals a marked improvement in consensus speed and accuracy. This suggests that considering indirect, long-range influences provides additional communication \"shortcuts,\" thereby effectively reducing the distance between nodes and promoting faster agreement.  
Moreover, our comparative study of various machine learning techniques--including LSTM, xLSTM, Transformer, XGBoost, and ConvLSTM--highlights the considerable potential of data-driven methods in predicting the final consensus state. Notably, these advanced architectures excel in capturing both local and global temporal dynamics inherent in complex networks. Integrating deep learning with advanced graph-theoretic constructs paves the way for more efficient and adaptive consensus algorithms, particularly relevant in ap  
Figure 4: Prediction-time comparison for ConvLSTM, LSTM, Extended LSTM, Transformer, and XGBoost across various network sizes.  
plications such as autonomous systems and distributed sensor networks. We also point out that the extension of this approach to larger scales of nodes have to be carefully addressed due to (linear) complexity growth, the vanishing gradient problem that makes the training unstable, and the batch-size reduction that makes the training slower.  
In summary, the most compelling outcomes of our work are the successful extension of the Laplacian framework to encapsulate long-range interactions and the demonstrated efficacy of state-of-the-art machine learning models in predicting consensus dynamics. These insights enrich our theoretical understanding and offer practical avenues for enhancing consensus mechanisms in real-world multi-agent systems.  
Conceptualization, Y.A., B.R. and J.A.C.; investigation, Y.A., B.R. and J.A.C.; software, Y.A. and J.A.C.; validation, Y.A.; visualization, Y.A.; formal analysis, B.R. and J.A.C.; writing--original draft preparation, Y.A., B.R. and J.A.C.; writing--review and editing, Y.A., B.R. and J.A.C.; supervision, J.A.C. All authors have read and agreed to the published version of the manuscript.  
This research was funded by the European Union - NextGenerationEU, ANDHI project CPP2021-008994 and PID2021-124618 NB-C21, by MCIN/AEI/10.13039/501100011033 and by \"ERDF A way of making Europe\", from the European Union.  
Not applicable.  
The data presented in this study are openly available in GitHub [[https://github.com/yusef320/AI-Driven-Consensus](https://github.com/yusef320/AI-Driven-Consensus)]([https://github.com/yusef320/AI-Driven-Consensus](https://github.com/yusef320/AI-Driven-Consensus)) (accessed on 30 March 2025).  
The authors declare no conflicts of interest.