Abstract
Modeling diffusion processes on networks, such as the spread of information or diseases, is computationally challenging due to the exponential growth of possible states. We introduce Neural Mean-Field (NMF) dynamics, a framework that leverages the Mori-Zwanzig formalism from statistical mechanics to model these processes. By approximating complex interactions with learnable memory terms within a structured recurrent neural network, NMF simultaneously reconstructs hidden network structures and predicts future infection probabilities. Our evaluation on synthetic and real-world datasets demonstrates that NMF achieves significantly higher accuracy and speed compared to current state-of-the-art methods like LSTMs and InfluLearner.
Introduction
The dynamics of network diffusions—how a tweet goes viral or a virus propagates—are notoriously difficult to model. In a network of $n$ nodes, the state space grows as $2^n$, making exact calculations intractable for large systems. Researchers typically address two distinct challenges: inference (identifying the underlying network structure from observed cascades) and estimation (predicting the probability of future node infections). Existing methods often treat these as separate tasks or rely on "black-box" models like LSTMs that lack interpretability and fail to account for the "memory" of the diffusion process.
Methodology: Neural Mean-Field Dynamics
NMF bridges the gap between rigorous physical modeling and flexible deep learning. The framework is built upon the Mori-Zwanzig formalism, which allows for the projection of high-dimensional system dynamics into a lower-dimensional space, resulting in a Generalized Langevin Equation (GLE).
A critical component of the GLE is the "memory integral," which captures how past states influence current infection probabilities. NMF approximates this integral using learnable time convolution operators. This mathematical structure is discretized into a structured Recurrent Neural Network (RNN) where the weights have physical meaning: one set represents the network's adjacency matrix, while the memory component is handled by a deep neural network. Training this model is theoretically equivalent to solving an optimal control problem, providing a bridge between backpropagation and classical physics principles like Pontryagin’s Maximum Principle.
Experimental Results
Prediction Accuracy
The NMF framework was evaluated against LSTMs and InfluLearner across various synthetic network topologies (Hierarchical and Core-periphery) and diffusion distributions (Exponential, Rayleigh, and Weibull). As shown in Figure 1, NMF consistently achieves lower Mean Absolute Error (MAE) for both influence and probability prediction over time. Unlike standard mean-field models that suffer from "amnesia," NMF's use of convolutions to capture history allows it to maintain high accuracy even as the diffusion process evolves.
Network Structure Inference
Beyond prediction, NMF excels at recovering the underlying "who-infects-whom" network structure. In comparisons with the NETRATE baseline, NMF demonstrated superior performance across multiple metrics, including precision, recall, and accuracy.
As detailed in Figure 2, NMF significantly outperforms the baseline in recovering edges for Random, Hierarchical, and Core-periphery networks. This "one-stage" learning approach—inferring the network and predicting dynamics simultaneously—prevents error propagation that typically occurs in multi-stage pipelines.
Real-World Scalability
On a massive dataset from Sina Weibo involving 1.78 million users and 308 million follow relationships, NMF demonstrated a massive speedup, performing tens of times faster than InfluLearner. While previous methods required retraining for every specific time point, NMF learns the entire time evolution in a single training sweep.
Conclusion
Neural Mean-Field dynamics provides a robust, interpretable, and efficient framework for modeling network diffusions. By integrating physical principles with deep learning, it overcomes the limitations of traditional mean-field approaches and black-box models. While currently focused on progressive diffusions (where nodes do not recover), future work aims to extend NMF to SIS/SIR epidemic models and downstream tasks like outbreak detection and influence maximization.
Summary updated