Finding Path Motifs in Large Temporal Graphs Using Algebraic Fingerprints

Suhas Thejaswi, Aristides Gionis, Juho Lauri

Abstract

Detecting specific patterns, or motifs, in large-scale temporal graphs is a computationally challenging task. This paper introduces a high-performance algebraic framework designed to find "path motifs"—sequences of vertices with specific attributes occurring in chronological order—within massive datasets. By employing "algebraic fingerprints," the authors transform the NP-hard pattern detection problem into a polynomial evaluation task. This method achieves practical, edge-linear scalability, successfully processing graphs with up to one billion edges.

Introduction: The Challenge of Temporal Path Motifs

Real-world networks are inherently dynamic. In a city's transportation system, for instance, locations (vertices) have specific types like "museum" or "restaurant" (colors), and the connections (edges) between them are only active at specific timestamps. A fundamental problem in analyzing such networks is finding a "temporal path": a sequence of edges where each subsequent step occurs later than the previous one, visiting a predefined multiset of vertex colors.

A motif query (a) and the resulting path motif (b) in a temporal graph. The query specifies a multiset of colors, and the algorithm identifies a chronological path satisfying this requirement.

While finding simple paths is straightforward, searching for paths that match a specific color multiset is NP-hard. Existing combinatorial algorithms often fail to scale as graphs grow to millions or billions of edges, particularly when temporal constraints are introduced.

Methodology: Algebraic Fingerprinting

The authors depart from traditional combinatorial search methods, such as Depth-First Search, in favor of an algebraic approach.

1. Polynomial Encoding and Multilinear Sieving

The existence of a temporal path is represented as a multivariate polynomial where variables correspond to vertices and edges. A valid match in the graph is represented by a "multilinear monomial" within this polynomial. To handle color constraints, the framework uses a "sieve" to filter the polynomial. If the polynomial evaluates to a non-zero value at a random point in a finite field (specifically $GF(2^b)$), a valid path exists with high probability.

2. Dynamic Programming and Temporal Pruning

The evaluation of these polynomials is performed using a Dynamic Programming (DP) recursion. Interestingly, the strict chronological requirement of temporal graphs—where time must strictly increase—acts as a natural pruning mechanism, making the DP more efficient than in static graph counterparts.

Comparison between a static graph $G$ and its temporal representation $G^\tau$, where edges are labeled with sets of available timestamps.

3. Vertex-Localization and Parallelism

A key optimization is "vertex-localization." Instead of a global existence check, the polynomial is evaluated at each vertex. This identifies which vertices are part of potential solutions, allowing for rapid graph pruning and path extraction. Furthermore, since evaluations at each vertex are independent, the algorithm is "embarrassingly parallel" and scales effectively across multi-core systems.

Experimental Evaluation

The framework was tested on diverse datasets:

  • Synthetic Graphs: Random $d$-regular and power-law graphs with up to 1 billion edges.
  • Transport Networks: Real-world data from Madrid and Helsinki.
  • Interaction Networks: Bitcoin transactions, email logs, and social networks (e.g., Epinions).

Key Results

  • Scalability: The system processed a billion-edge graph for a 5-color query in under 13 minutes on a standard workstation.
  • Performance: On power-law graphs, the algebraic approach outperformed exhaustive search methods by up to 22,000 times.
  • Efficiency: For a transport network with 6 million edges, a 10-color query was resolved in less than eight minutes. Memory optimizations reduced the footprint from $O(ntk)$ to $O(nt)$, where $n$ is the number of nodes and $t$ is the number of timestamps.

Conclusion and Future Work

This research demonstrates that NP-hard temporal motif problems can be solved efficiently at scale using algebraic methods. While the current approach is highly effective for paths, future work will focus on extending the framework to more complex subgraphs like stars or cascades. Additionally, addressing the memory dependency on the maximum timestamp ($t$) remains a priority for datasets spanning long durations with high temporal resolution.

Summary updated

BibTeX
@article{thejaswi2020finding,
  author = {Suhas Thejaswi and Aristides Gionis and Juho Lauri},
  title = {{Finding Path Motifs in Large Temporal Graphs Using Algebraic Fingerprints}},
  journal = {Big Data},
  year = {2020},
  doi = {10.1089/big.2020.0078},
}
Figure