Skip to main content
QUICK REVIEW

[Paper Review] Sublinear-Time Algorithms for Counting Star Subgraphs with Applications to Join Selectivity Estimation

Aliakbarpour, Maryam, Biswas, Amartya Shankha|arXiv (Cornell University)|Jan 17, 2016
Distributed systems and fault toleranceComputer Science36 references5 citations
TL;DR

This paper presents sublinear-time algorithms for estimating the number of p-star subgraphs in graphs and the selectivity of self-join and equi-join queries in databases by sampling edges uniformly. It achieves a query complexity of $\tilde{O}(m \log \log n / (\varepsilon^2 S_p^{1/p}))$, significantly improving upon prior methods that relied only on vertex sampling, and establishes nearly tight lower bounds via Yao’s principle and explicit graph constructions with coupled edge queries.

ABSTRACT

We study the problem of estimating the value of sums of the form $S_p riangleq \sum \binom{x_i}{p}$ when one has the ability to sample $x_i \geq 0$ with probability proportional to its magnitude. When $p=2$, this problem is equivalent to estimating the selectivity of a self-join query in database systems when one can sample rows randomly. We also study the special case when $\{x_i\}$ is the degree sequence of a graph, which corresponds to counting the number of $p$-stars in a graph when one has the ability to sample edges randomly. Our algorithm for a $(1 \pm \varepsilon)$-multiplicative approximation of $S_p$ has query and time complexities $Ø(\frac{m \log \log n}{ε^2 S_p^{1/p}})$. Here, $m=\sum x_i/2$ is the number of edges in the graph, or equivalently, half the number of records in the database table. Similarly, $n$ is the number of vertices in the graph and the number of unique values in the database table. We also provide tight lower bounds (up to polylogarithmic factors) in almost all cases, even when $\{x_i\}$ is a degree sequence and one is allowed to use the structure of the graph to try to get a better estimate. We are not aware of any prior lower bounds on the problem of join selectivity estimation. For the graph problem, prior work which assumed the ability to sample only \emph{vertices} uniformly gave algorithms with matching lower bounds [Gonen, Ron, and Shavitt. extit{SIAM J. Comput.}, 25 (2011), pp. 1365-1411]. With the ability to sample edges randomly, we show that one can achieve faster algorithms for approximating the number of star subgraphs, bypassing the lower bounds in this prior work. For example, in the regime where $S_p\leq n$, and $p=2$, our upper bound is $ ilde{O}(n/S_p^{1/2})$, in contrast to their $Ω(n/S_p^{1/3})$ lower bound when no random edge queries are available.

Motivation & Objective

  • To design efficient sublinear-time algorithms for estimating the number of p-star subgraphs in graphs when edges can be sampled uniformly.
  • To apply these algorithms to estimate the selectivity of self-join and equi-join queries in database systems with minimal data access.
  • To establish nearly tight lower bounds on the query complexity for estimating $S_p = \sum \binom{x_i}{p}$ under uniform edge sampling, even when leveraging graph structure.
  • To demonstrate that edge sampling enables faster estimation than vertex sampling alone, bypassing prior lower bounds in the literature.
  • To analyze the complexity of counting directed paths of length two in directed graphs, showing sublinear algorithms are possible under bounded in-degree/out-degree ratio.

Proposed method

  • Leverages uniform random edge sampling as the primary query primitive, enabling efficient estimation of $S_p = \sum \binom{x_i}{p}$ where $x_i$ are degrees or frequency counts.
  • Designs a sublinear estimator with $\tilde{O}(m \log \log n / (\varepsilon^2 S_p^{1/p}))$ query and time complexity, where $m$ is the number of edges and $S_p$ is the target sum.
  • Applies Yao’s principle to prove lower bounds by constructing two graph families $\mathcal{F}_1$ and $\mathcal{F}_2$ with differing $S_p$ values but indistinguishable under random edge queries.
  • Uses a coupling argument to ensure that random edge queries return the same edges with high probability across both graph families, forcing any algorithm to make many queries to distinguish them.
  • Reduces the directed path counting problem to the undirected case under the assumption that the ratio of in-degree to out-degree is bounded, enabling sublinear algorithms.
  • Employs explicit adjacency list representations to avoid issues with self-loops and multiple edges that arise in random graph constructions.

Experimental results

Research questions

  • RQ1Can we estimate the number of p-star subgraphs in a graph using only uniform random edge queries, and how efficiently?
  • RQ2How does the complexity of estimating $S_p = \sum \binom{x_i}{p}$ compare when sampling edges versus sampling vertices, especially in the context of join selectivity estimation?
  • RQ3What are the information-theoretic limits (lower bounds) on estimating $S_p$ using random edge queries, and how do they compare to prior work?
  • RQ4Under what conditions can the number of directed paths of length two be estimated in sublinear time in directed graphs?
  • RQ5Can we achieve better query complexity by exploiting graph structure when edge sampling is available, compared to vertex sampling?

Key findings

  • The proposed algorithm achieves a query complexity of $\tilde{O}(m \log \log n / (\varepsilon^2 S_p^{1/p}))$, which is sublinear in the input size and optimal up to polylogarithmic factors.
  • For $S_p \leq n$ and $p=2$, the algorithm runs in $\tilde{O}(n / S_p^{1/2})$ time, improving upon the $\Omega(n / S_p^{1/3})$ lower bound from prior work that used only vertex sampling.
  • The paper establishes a lower bound of $\Omega(n^{1-1/p})$ for any $S_p = O(n^p)$, showing that the algorithm’s complexity is nearly optimal in this regime.
  • For large $S_p = \Omega(n^p)$, the lower bound is $\Omega(n^{p-1/p} / S_p^{1-1/p})$, which matches the algorithm’s complexity up to logarithmic factors.
  • The directed path counting problem cannot be solved in sublinear time in general, but becomes solvable when the ratio of in-degree to out-degree is bounded.
  • The authors provide the first known lower bounds for join selectivity estimation, and show that edge sampling enables provably faster estimation than vertex sampling alone.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.