Source Detection in Networks using the Stationary Distribution of a Markov Chain

Yael Sabato, Amos Azaria, Noam Hazon

Abstract

Identifying the origin of a diffusion process in a network—often referred to as the "Patient Zero" problem—is a critical task in fields ranging from epidemiology to cybersecurity. While Maximum Likelihood Estimation (MLE) provides a theoretically robust framework for source detection, its exact computation is NP-hard under the Independent Cascade (IC) model. This paper presents a novel approach that maps the diffusion process to the stationary distribution of a Markov chain. By leveraging the Markov Chain Tree Theorem, the proposed method achieves MLE-level accuracy in polynomial time, significantly outperforming existing heuristics in both synthetic and real-world network environments.

Introduction

In the modern interconnected world, information, viruses, and behaviors spread rapidly across complex networks. Whether tracking the source of a viral misinformation campaign or the origin of a biological pathogen, the ability to identify the initial source node from a snapshot of infected individuals is paramount. The Independent Cascade (IC) model is frequently used to simulate these processes, where an infected node attempts to infect its neighbors with a specific probability. However, reversing this process to find the source is computationally daunting due to the sheer number of possible propagation paths (spanning trees) that could lead to the observed state.

The Source Detection Problem

The goal of source detection is to find the node $v$ that maximizes the likelihood of producing the observed set of infected nodes $S$. Mathematically, this is expressed as finding the Maximum Likelihood Estimator (MLE). In the IC model, calculating this likelihood requires summing the probabilities of all possible out-trees rooted at $v$ that span the set $S$. Because the number of such trees grows exponentially with the size of the network, exact MLE is NP-hard. Previous attempts to solve this have relied on Markov Chain Monte Carlo (MCMC) sampling or local heuristics, which often struggle with either computational efficiency or accuracy.

Methodology

The Markov Chain Tree Theorem

The core innovation of this research lies in the application of the Markov Chain Tree Theorem. This theorem establishes a fundamental link between the stationary distribution of a Markov chain and the sum of the weights of all "in-trees" rooted at a particular state. By reversing the direction of all edges in the infected subgraph, the researchers transform the problem of finding the most likely "out-tree" (the diffusion path) into a problem of finding the stationary distribution of a corresponding Markov chain.

Proposed Methods

The authors developed two distinct techniques to implement this transformation:

  1. The Self-Loops Method: This approach normalizes edge weights by introducing self-loops to ensure the transition matrix is stochastic. While mathematically elegant, it can be inefficient for random walk-based estimation because the walker frequently remains at the same node.
  2. The No-Loops Method: To improve efficiency, this method uses a "naive" normalization (dividing by incoming edge weights) and applies a mathematical correction factor based on the node's original weighted in-degree. This allows for faster computation and more effective sampling in large-scale networks.

By treating the nodes as states in a Markov chain and solving for the stationary distribution using standard matrix algebra, the likelihood of every node being the source can be computed simultaneously in polynomial time.

Experimental Validation

Datasets

The methodology was rigorously tested across two primary categories of data:

  • Synthetic Graphs: 14 types of randomly generated graphs with varying densities and topologies.
  • Real-World Networks: 8 networks from the Konect database, including social platforms (Facebook, Google+), trust networks (Advogato, Epinions), and communication logs (Twitter, Digg).

Performance Results

The Markov chain-based approach demonstrated a clear superiority over traditional baselines. In simulations on random graphs, the "No-loops" method correctly identified the source in 116.92 out of 1000 trials, more than doubling the performance of the MCMC baseline (46.29/1000).

On real-world networks, the performance gap was even more pronounced. The proposed method achieved an average success rate of 347.25 per 1000, significantly outperforming the Maximum Weight Arborescence heuristic (267.87) and the MCMC approach (185.25). Furthermore, the "No-Loops" method proved highly scalable, reaching high accuracy with significantly fewer random walk steps than the "Self-Loops" alternative.

Discussion and Limitations

This research provides a powerful new tool for network analysis by bridging the gap between diffusion modeling and Markov chain theory. By capturing the global structure of the infected subgraph rather than relying on local connectivity, the method offers a more holistic and accurate likelihood score.

However, several challenges remain for future exploration:

  • Multi-Source Diffusion: The current model assumes a single "Patient Zero," whereas real-world events may involve multiple concurrent sources.
  • Parameter Sensitivity: The accuracy of the method depends on knowing the infection probabilities between nodes, which may not always be available.
  • Observability: The model assumes a perfect snapshot of the infected subgraph; future iterations must account for missing or noisy data where some infected nodes remain unobserved.

Conclusion

By reframing source detection as a stationary distribution problem, this work provides a computationally efficient and highly accurate solution to a long-standing problem in network science. The transition from NP-hard complexity to polynomial-time calculation represents a significant step forward in our ability to monitor and respond to spreading processes in complex systems.

Summary updated

BibTeX
@inproceedings{sabato2024source,
  author = {Yael Sabato and Amos Azaria and Noam Hazon},
  title = {{Source Detection in Networks using the Stationary Distribution of a Markov Chain}},
  booktitle = {AAMAS},
  year = {2024},
  url = {https://openreview.net/forum?id=J3NR8FreHS},
}
Figure