SWOOP: top-k similarity joins over set streams

Willi Mann, Nikolaus Augsten, Christian S. Jensen, Mateusz Pawlik

Abstract

Finding the top-$k$ most similar pairs of sets in high-velocity data streams is a critical task for applications like real-time duplicate detection and trend analysis. SWOOP is a highly scalable algorithm designed for this purpose, utilizing a sliding window model. By integrating a novel indexing strategy with an incremental "minimal stock" maintenance approach based on $k$-skybands, SWOOP outperforms existing state-of-the-art methods by up to three orders of magnitude while maintaining low latency and memory efficiency.

Introduction

Real-world data streams, such as social media feeds or ERP system logs, require efficient similarity joins to identify related items within a specific temporal window. As new data arrives, older data expires, necessitating a dynamic approach to maintaining the "top-$k$" most similar pairs.

The problem presents two primary challenges:

  1. Efficient Candidate Generation: Identifying potential matches for new items without exhaustive comparisons.
  2. Stock Maintenance: Keeping a "backup" of candidate pairs to replace those that expire as the sliding window moves. Maintaining a full list of all pairs is computationally prohibitive.

Methods

SWOOP addresses these challenges through several key innovations in indexing and pruning, moving away from the expensive recomputation models used in previous research.

Candidate Indexing and Pruning

SWOOP employs an inverted list index mapping tokens to sets. To optimize performance, it uses:

  • Positional Upper Bound: Prunes candidates that cannot reach the required similarity score based on missing tokens.
  • Skyband Lower Bound: Uses the current $k$-th best similarity as a threshold to filter irrelevant candidates.

Incremental Stock Maintenance

The core of SWOOP's efficiency is its "minimal stock" maintenance. Instead of recomputing the entire set of candidate pairs when the top-$k$ results change, SWOOP uses a Merge Insert algorithm to maintain a $k$-skyband.

Processing models and the k-skyband concept for stock maintenance.

As shown in the figure above, a pair is included in the $k$-skyband if it is dominated by fewer than $k$ other pairs. Dominance is defined by both higher similarity and a later expiration time (longer remaining lifetime). This approach significantly reduces memory overhead and computational cost compared to traditional set-by-set processing.

Handling Window Expiration and Batching

To maintain performance under high load, SWOOP supports batch processing and various windowing strategies to handle the expiration of old data points ($r_1, r_2, \dots$).

Batch processing strategies: (b) skipped windows and (c) extended windows.

These strategies allow the system to handle bursts in data velocity by either skipping windows or extending them to ensure the top-$k$ results remain accurate without overwhelming the processor.

Experimental Evaluation

The authors evaluated SWOOP across five diverse datasets: TWEET, FLICKR, DBLP, ENRON, and INDUSTRY. These datasets represent various set sizes and token distributions.

Key Results

  • Performance: SWOOP is consistently 2 to 3 orders of magnitude faster than previous state-of-the-art algorithms like SCase.
  • Scalability: It handles windows containing hundreds of thousands of sets where other algorithms fail.
  • Latency: SWOOP maintains sub-second latency (0.05 to 0.25 seconds) even at 80% of its maximum throughput.
  • Memory Efficiency: The $k$-skyband approach ensures stable memory usage throughout the stream's duration.

Conclusion

SWOOP represents a significant advancement in stream processing for similarity joins. Its shift from recomputation to incremental updates via the $k$-skyband concept enables real-time performance on massive, high-velocity data streams. Future work may explore parallelization and distributed implementations to further enhance its capabilities.

Summary updated

BibTeX
@article{mann2025swoop,
  author = {Willi Mann and Nikolaus Augsten and Christian S. Jensen and Mateusz Pawlik},
  title = {{SWOOP: top-k similarity joins over set streams}},
  journal = {VLDB J.},
  year = {2025},
  doi = {10.1007/s00778-024-00880-x},
}
Figure