Abstract
Set similarity self-join is a cornerstone of modern recommendation systems, yet traditional algorithms are largely designed for static data. In dynamic environments where user profiles evolve in real-time, these methods incur prohibitive re-computation costs. This paper introduces LI-DSN-Join, the first algorithm specifically engineered to maintain $k$-nearest neighbor (kNN) results for rapidly changing sets. By leveraging a novel "local-index" and an adaptive cost model, LI-DSN-Join achieves up to a 200x speedup over existing state-of-the-art techniques.
1. Introduction
From movie recommendations on Netflix to community detection in social networks, set similarity joins power critical data science tasks. However, real-world data is rarely static. As users interact with platforms, their associated sets—such as watch histories or friend lists—are constantly updated. Existing "update-sensitive" algorithms often rely on global properties like element frequency rankings, which shift with every insertion or deletion, leading to massive overhead. The challenge lies in updating kNN results for millions of sets in real-time without full re-computation.
2. Methodology: The LI-DSN-Join Framework
The authors propose LI-DSN-Join (Local-Index-based dynamic set kNN self-join) to address the limitations of static join methods. The framework is built upon three core innovations:
2.1 The Local-Index ($s.D$)
Instead of performing expensive full-set scans to compute Jaccard or Cosine similarity, LI-DSN-Join maintains a "local-index" for each set $s$. This index stores the size of the differences between $s$ and its potential neighbors. This allows the system to update similarity scores in $O(1)$ constant time upon an element update, bypassing the need for repeated set intersections.
2.2 Incremental Updates and Reverse kNN
To manage the "ripple effect" of updates—where a change in one set affects the kNN lists of many others—the system maintains reverse kNN lists. When a set $A$ is modified, the system immediately identifies all sets $B$ for which $A$ is a neighbor, ensuring that all relevant kNN lists are updated efficiently.
2.3 Mathematical Cost Model
Indexing every possible pair is memory-prohibitive, while indexing too few leads to expensive full-set scans (IF-Scans). LI-DSN-Join employs a mathematical cost model to determine an optimal threshold ($\Delta^d_i$) for neighbor tracking. By finding the "sweet spot" between memory consumption and computational speed, the algorithm minimizes the expected total update time.
3. Experimental Evaluation
The performance of LI-DSN-Join was evaluated using 10 diverse real-world datasets, including Amazon, Netflix, and LiveJournal. These datasets span various domains (User-Product, Social, Citation) and scales, with up to 2.6 million sets and 5.5 million elements. The authors simulated real-time conditions with up to 10 million incremental updates.
4. Key Results and Insights
- Performance Gains: LI-DSN-Join consistently outperformed state-of-the-art baselines. On datasets with high average set sizes, such as Netflix, it achieved speedups ranging from 9x to 202x.
- Scalability and Robustness: Unlike baseline algorithms that degrade as data evolves, LI-DSN-Join maintains stable update times. It is equally efficient at handling both element insertions and deletions.
- Memory Efficiency: While the local-index requires additional storage, the overhead remains practical for modern systems, typically staying under 30GB for millions of sets.
- The Frequency Trap: A key insight is that standard optimizations like frequency sorting are liabilities in dynamic settings. LI-DSN-Join avoids these traps, making it significantly more robust to high-velocity data.
5. Conclusion and Future Work
LI-DSN-Join represents a significant advancement in dynamic set similarity joins. By shifting from global re-sorting to local indexing and cost-aware maintenance, it enables real-time kNN updates at scale. Future research will focus on optimizing the framework for massive batch updates and extending the dynamic model to other similarity metrics such as Edit distance or the Tversky index.
Summary updated