Best Friends Forever (BFF): Finding Lasting Dense Subgraphs

Konstantinos Semertzidis, Evaggelia Pitoura, Evimaria Terzi, Panayiotis Tsaparas

Abstract

Identifying dense subgraphs is a fundamental task in network analysis, typically applied to static snapshots. However, real-world networks evolve, and connectivity patterns change over time. This paper introduces the Best Friends Forever (BFF) framework to identify node groups that maintain high connectivity throughout their history. We define "aggregate density" variants and present linear-time algorithms to solve the BFF problem and its "On-Off" extension ($O^2BFF$), which accounts for communities that are intermittently dense.

1. Introduction

Traditional graph mining focuses on finding dense subgraphs—such as tight-knit social circles or functional protein complexes—within a single, static snapshot. However, real-world networks are dynamic: researchers collaborate over decades, and hashtags trend together during recurring events. A subgraph that is extremely dense today might vanish tomorrow. Conversely, a group that is consistently dense over time may be more significant than one that is briefly very dense. This paper addresses how to find these "lasting" communities.

2. Problem Formulation

The authors define two primary problems:

  1. BFF Problem: Find a set of nodes $S$ that is densely connected across all $\tau$ time steps.
  2. On-Off BFF ($O^2BFF$) Problem: Find a set of nodes $S$ that is densely connected in at least $k$ out of $\tau$ time steps.

To quantify "lasting density," four variants of aggregate density are proposed based on how node degrees are treated and aggregated over time. Notable variants include Min-Min ($f_{mm}$), which requires every node to maintain a high degree in every snapshot, and Average-Average ($f_{aa}$), which considers the average degree across all nodes and snapshots.

Example of a graph snapshot $G_1$ from a temporal sequence $\mathcal{G}$. In this history, nodes $x_1-x_4$ form a persistent $K_4$ clique, while the connectivity of nodes $y_1-y_5$ varies across snapshots.

3. Methodology

The paper introduces several algorithmic approaches:

  • FINDBFF: An iterative removal algorithm inspired by Charikar’s densest subgraph algorithm. It starts with the full node set and greedily removes the node with the lowest temporal score.
  • Average Graph Shortcut: For the $f_{aa}$ variant, the authors prove that the problem can be reduced to finding the densest subgraph in a single weighted "average graph," where edge weights represent the frequency of that edge's appearance over time.
  • Iterative Heuristics for $O^2BFF$: Since finding the densest subgraph in a subset of snapshots is NP-hard, the authors propose an iterative approach that alternates between optimizing the set of snapshots and the set of nodes.
The iterative algorithm for the $O^2BFF$ problem, which alternates between selecting the best snapshots ($\mathcal{C}_k$) and the best nodes ($S$) to maximize aggregate density.

4. Experimental Evaluation

The study evaluates these algorithms on both synthetic and real-world datasets:

  • DBLP: Co-authorship snapshots from 2006–2015.
  • Twitter: Hashtag co-occurrence over 15 days.
  • Network Infrastructure: Oregon-1, Oregon-2, and Caida (Autonomous Systems peering data).
  • Synthetic Data: Graphs generated using the "Forest Fire" model with planted dense subgraphs to test recovery accuracy.

5. Key Results and Insights

  • Optimality and Efficiency: The FINDBFF_M algorithm is proven to solve the BFF-MM problem optimally. All proposed algorithms run in linear time relative to the total number of edges across snapshots ($O(n\tau + M)$), making them scalable to large histories.
  • Real-World Validation: In the DBLP dataset, the algorithm successfully identified legendary "BFFs" in the data mining community, such as the prolific collaborations between Wei Fan, Philip Yu, and Jiawei Han.
  • Temporal Locality: In real-world data, "best friends" tend to be dense in contiguous blocks of time. Initializing algorithms with contiguous time windows often yielded the best results.
  • Complexity Split: While basic BFF variants are solvable in polynomial time, the $O^2BFF$ problem is NP-hard across all density definitions, as it essentially hides a Clique problem within the snapshots.

6. Conclusion and Future Work

The BFF framework provides a robust way to find persistent communities in evolving networks. Future work includes extending the model to "streaming" scenarios where the node set is not fixed and automating the discovery of the optimal $k$ parameter for the $O^2BFF$ problem.

Summary updated

BibTeX
@article{semertzidis2019best,
  author = {Konstantinos Semertzidis and Evaggelia Pitoura and Evimaria Terzi and Panayiotis Tsaparas},
  title = {{Best Friends Forever (BFF): Finding Lasting Dense Subgraphs}},
  journal = {Data Min. Knowl. Discov.},
  year = {2019},
  doi = {10.1007/s10618-018-0602-x},
}
Figure