Metric Sublinear Algorithms via Linear Sampling

Hossein Esfandiari, Michael Mitzenmacher

Abstract

In the analysis of large-scale datasets, representing relationships as complete weighted graphs is a common practice. However, when the number of vertices $n$ is large, the $O(n^2)$ complexity of examining every edge becomes a bottleneck. This paper presents a novel "linear sampling" framework designed for metric spaces—where edge weights satisfy the triangle inequality. By querying only a sublinear number of edges, the proposed algorithms provide high-accuracy approximations for fundamental problems including the densest subgraph, max cut, and average distance, significantly advancing the state-of-the-art in sublinear query complexity.

Introduction

Modern data science frequently encounters "complete" graphs where every pair of points possesses a distance or weight. Examples include geographic coordinates, latent user embeddings, or high-dimensional feature vectors. In these scenarios, the graph is implicitly defined by $n$ points, leading to $n(n-1)/2$ potential edges. For massive datasets, even linear time relative to the number of edges is computationally prohibitive.

Sublinear algorithms aim to circumvent this by sampling a fraction of the data. While uniform sampling is effective for unweighted graphs, it often fails in weighted contexts. In a weighted graph, a small subset of "heavy" edges may contain the majority of the structural information. Uniformly sampling edges is likely to miss these critical components, resulting in poor approximations for structural problems like finding the densest subgraph. The central challenge addressed in this research is how to efficiently locate these heavy edges without performing an exhaustive $O(n^2)$ search.

The Linear Sampling Framework

The authors introduce Linear Sampling, a technique where edges are sampled with a probability proportional to their weight $w_e$. The feasibility of this approach in sublinear time relies on the triangle inequality. In a metric space, the weights of edges are mathematically constrained: if an edge $(u, v)$ is exceptionally heavy, then for any third vertex $x$, the edges $(u, x)$ and $(v, x)$ cannot both be light. This geometric constraint allows the algorithm to "hunt" for heavy edges by examining the relationships between neighboring vertices.

Algorithmic Methodology

The framework operates through three primary mechanisms:

  1. Graph Decomposition: The graph is partitioned into a sequence of subgraphs ($G_1, G_2, \dots, G_t$) based on weight thresholds that decrease geometrically. This allows the algorithm to process different scales of edge weights independently.
  2. Vertex Cover Heuristic: For each weight level, the algorithm identifies "active" vertices likely to be endpoints of heavy edges. By finding a small vertex cover for these heavy structures, the algorithm can represent the graph's most significant components using a fraction of the total vertices.
  3. Generalization to $\lambda$-Metrics: The methodology extends beyond strict metric spaces to "$\lambda$-metric graphs," where $w_{a,b} + w_{b,c} \geq \lambda w_{a,c}$. This generalization is crucial for practical applications, such as squared Euclidean distances (where $\lambda = 1/2$), which do not satisfy the standard triangle inequality but still exhibit predictable structural constraints.

Key Results and Complexity Analysis

The paper establishes new upper bounds for several classic graph problems, demonstrating that linear sampling provides near-optimal query complexity.

  • Average Distance: The authors achieve a $(1 - \epsilon)$-approximation in $\tilde{O}(n + 1/\epsilon^2)$ queries. This represents a substantial improvement over the previous benchmark set by Indyk (1999), which required $O(n/\epsilon^{3.5})$ queries.
  • Densest Subgraph: The paper introduces the first sublinear-time $(1/2 - \epsilon)$-approximation algorithm for the densest subgraph problem in metric spaces, requiring only $\tilde{O}(n/\epsilon^2)$ queries.
  • Max Cut: The query complexity for a $(1 - \epsilon)$-approximation is reduced from $\tilde{O}(n/\epsilon^5)$ to $\tilde{O}(n/\epsilon^2)$.

Furthermore, the authors provide lower bound proofs showing that $\Omega(n)$ queries are strictly necessary for these problems. This confirms that their algorithms are near-optimal in their dependence on the number of vertices $n$.

Discussion and Future Work

The transition from uniform to linear sampling represents a paradigm shift for weighted metric graphs. By leveraging the inherent geometry of the data, the authors demonstrate that it is possible to find the "needle in the haystack" (heavy edges) in time nearly proportional to the number of vertices rather than the number of edges.

Despite these advancements, certain challenges remain. For the densest subgraph problem, the current algorithm provides a $1/2$-approximation; achieving a $(1-\epsilon)$-approximation in sublinear time remains an open theoretical goal. Additionally, while the algorithms are sublinear relative to $n^2$, there is a small polylogarithmic gap between the current upper bounds and the $\Omega(n)$ lower bounds. Future research may apply these linear sampling techniques to other domains, such as metric clustering or diversity maximization, where the triangle inequality can be further exploited to reduce computational overhead.

Summary updated

BibTeX
@inproceedings{esfandiari2018metric,
  author = {Hossein Esfandiari and Michael Mitzenmacher},
  title = {{Metric Sublinear Algorithms via Linear Sampling}},
  booktitle = {FOCS},
  year = {2018},
  url = {https://openreview.net/forum?id=WKk37ds75v},
}
Figure