betaFeedback

WorksComputer Science

Power of Conditional Sampling on Hypergraphs

Abstract

Let G=(V,E)G=(V,E) be a dd-uniform hypergraph with ∣V∣=n|V|=n and ∣E∣=m|E|=m. Estimating mm from uniformly random hyperedge samples requires Θ(m)Θ(\sqrt{m}) samples by a birthday-paradox argument. We investigate the power of conditional sampling through a hierarchy of oracles: for an integer 1≤s≤d1\le s\le d, given pairwise disjoint subsets X1,…,Xs⊆VX_1,\ldots,X_s\subseteq V, the ss-colorful oracle returns a hyperedge chosen uniformly at random from all hyperedges contained in X1∪⋯∪XsX_1\cup\cdots\cup X_s that intersect every XiX_i, provided one exists. For s=1s=1, this samples a uniformly random hyperedge induced by X1X_1. For every 1≤s≤d1\le s\le d, we give a randomized algorithm that outputs m^∈[(1−ε)m,(1+ε)m]\widehat{m}\in[(1-\varepsilon)m,(1+\varepsilon)m] with probability at least 2/32/3 using Os,d(poly⁡(1/ε,log⁡n))O_{s,d}(\operatorname{poly}(1/\varepsilon,\log n)) conditional samples, where the exponent of log⁡n\log n is an absolute constant independent of both ss and dd. Conditional sampling thus yields an exponential separation over uniform hyperedge sampling. We also study the decision version, in which the oracle only reports whether a qualifying hyperedge exists. For every 1≤s<d1\le s<d, we prove that any algorithm using the ss-colorful decision oracle requires Ω~s,d(nd−sd−s+1)\widetildeΩ_{s,d}(n^{\frac{d-s}{d-s+1}}) queries. Hence, for s<ds<d, access to uniformly random witness hyperedges (random certificates) is exponentially more powerful than existence queries. For s=ds=d, decision queries alone achieve poly⁡(1/ε,log⁡n)\operatorname{poly}(1/\varepsilon,\log n) query complexity, but the exponent of log⁡n\log n is known to be Θ(d)Θ(d). The colorful hierarchy thus exhibits a phase transition at s=ds=d: for s<ds<d, random certificates are essential for polylogarithmic-query estimation, whereas at s=ds=d decision queries suffice, yet random certificates still provably reduce the exponent of log⁡n\log n from Θ(d)Θ(d) to an absolute constant.

Let G=(V,E)G=(V,E) be a dd-uniform hypergraph with ∣V∣=n|V|=n and ∣E∣=m|E|=m. Estimating mm from uniformly random hyperedge samples requires Θ(m)\Theta(\sqrt{m}) samples by a birthday-paradox argument. We investigate the power of conditional sampling through a hierarchy of oracles: for an integer 1≤s≤d1\le s\le d, given pairwise disjoint subsets X1,…,Xs⊆VX_1,\ldots,X_s\subseteq V, the ss-colorful oracle returns a hyperedge chosen uniformly at random from all hyperedges contained in X1∪⋯∪XsX_1\cup\cdots\cup X_s that intersect every XiX_i, provided one exists. For s=1s=1, this samples a uniformly random hyperedge induced by X1X_1.

For every 1≤s≤d1\le s\le d, we give a randomized algorithm that outputs m^∈[(1−ε)m,(1+ε)m]\widehat{m}\in[(1-\varepsilon)m,(1+\varepsilon)m] with probability at least 2/32/3 using Os,d(poly⁡(1/ε,log⁡n))O_{s,d}(\operatorname{poly}(1/\varepsilon,\log n)) conditional samples, where the exponent of log⁡n\log n is an absolute constant independent of both ss and dd. Conditional sampling thus yields an exponential separation over uniform hyperedge sampling.

We also study the decision version, in which the oracle only reports whether a qualifying hyperedge exists. For every 1≤s<d1\le s<d, we prove that any algorithm using the ss-colorful decision oracle requires Ω~s,d(nd−sd−s+1)\widetilde{\Omega}_{s,d}(n^{\frac{d-s}{d-s+1}}) queries. Hence, for s<ds<d, access to uniformly random witness hyperedges (random certificates) is exponentially more powerful than existence queries. For s=ds = d, decision queries alone achieve poly⁡(1/ε,log⁡n)\operatorname{poly}(1/\varepsilon, \log n) query complexity, but the exponent of log⁡n\log n is known to be Θ(d)\Theta(d). The colorful hierarchy thus exhibits a phase transition at s=ds = d: for s<ds < d, random certificates are essential for polylogarithmic-query estimation, whereas at s=ds = d decision queries suffice, yet random certificates still provably reduce the exponent of log⁡n\log n from Θ(d)\Theta(d) to an absolute constant.

AI use statement. AI tools were used solely to improve the paper’s readability. All mathematical ideas and proofs presented in this work are the authors’ own. The authors take full responsibility for the content of the submitted manuscript.

Introduction

Edge estimation, and its generalization to hyperedge estimation via query oracles, is one of the central problems in query complexity and property testing, and has been studied extensively over the past two decades [25, 26, 12, 9, 7, 21, 22, 23, 11, 5, 15, 3, 18, 1, 16]. Besides being a natural computational primitive, hyperedge estimation has led to the development of several powerful (algorithmic) techniques. Consequently, it has become a standard benchmark for understanding the power of different query oracles.

Let G=(V,E)G=(V,E) be a dd-uniform hypergraph with ∣V∣=n|V|=n and ∣E∣=m|E|=m. The hyperedge estimation problem asks to estimate the number of hyperedges mm using query access to GG. More precisely, given an approximation parameter ε∈(0,1)\varepsilon\in(0,1), the goal is to design a randomized algorithm that outputs an estimate m^\widehat{m} satisfying (1−ε)m≤m^≤(1+ε)m(1-\varepsilon)m \le\widehat{m} \le(1+\varepsilon)m with constant success probability while minimizing the number of queries made to the underlying oracle.

The query complexity of hyperedge estimation depends crucially on the type of oracle available to the algorithm. If the algorithm has access only to uniformly random hyperedge samples, then estimating mm requires Θ~(m)\widetilde{\Theta}(\sqrt{m}) samples by the classical birthday-paradox argument [27].3 Consequently, obtaining substantially more efficient algorithms requires access to richer query primitives.

Among the many query models studied in the literature, conditional sampling has emerged as one of the most powerful and versatile primitives [17, 20, 19, 6, 13, 8]. Instead of sampling a uniformly random hyperedge from the entire hypergraph, a conditional sampling oracle allows the algorithm to specify a collection of structural constraints and returns a uniformly random hyperedge satisfying those constraints.

Models and our results

A variety of global query oracles have been studied for graph and hypergraph estimation. One of the natural global query oracle for graphs is the independent set (IS) oracle [11, 18, 1], which, given a subset of vertices, reports whether the induced subgraph contains an edge. For graphs, a more powerful query oracle is the bipartite independent set (BIS) oracle [21, 11], which, given two disjoint subsets of vertices, reports whether there exists an edge with one endpoint in each subset. Very recently, [15] introduced the independent set oracle with random certificates, which additionally returns a uniformly random witness edge whenever one exists. For general dd-uniform hypergraphs, [4, 22, 5] considered the dd-colorful decision oracle, which, given dd pairwise disjoint subsets V1,…,VdV_1,\ldots,V_d, reports whether there exists a hyperedge intersecting every subset.

These oracle models have proved remarkably powerful for edge and hyperedge estimation. However, despite these developments, there has been no systematic study of the hierarchy of colorful query oracles. Existing work focuses on a few isolated points in this hierarchy—namely the IS oracle, the BIS oracle, the IS oracle with random certificates, and the dd-colorful decision oracle—leaving the intermediate colorful query models essentially unexplored.

Motivated by this gap, as well as developments in the property testing of probability distributions through the lens of conditional sampling [17, 20, 6], we introduce a unified hierarchy of ss-colorful query oracles, parameterized by an integer 1≤s≤d1 \le s \le d. Given pairwise disjoint subsets V1,…,Vs⊆VV_1,\ldots,V_s \subseteq V, the ss-colorful random certificate oracle, denoted by CISC⁡(V1,…,Vs)\operatorname{CISC}(V_1,\ldots,V_s), returns a uniformly random hyperedge that is contained in V1∪⋯∪VsV_1 \cup\cdots\cup V_s and intersects every subset ViV_i, i∈[s]i \in[s], provided that such a hyperedge exists. We also consider the corresponding ss-colorful decision oracle, denoted by cIS(V1,…,Vs)\mathrm{cIS}(V_1,\ldots,V_s), which simply reports whether such a hyperedge exists. The hierarchy unifies all previously studied oracle models: for graphs (d=2d=2), cIS\mathrm{cIS} for s=1s=1 and s=2s=2 corresponds to the IS and BIS oracles, respectively, while cISC(V1)\mathrm{cISC}(V_1) coincides with the independent set oracle with random certificates. For general dd, the case s=ds=d coincides with the previously studied dd-colorful decision oracle.

Our work is motivated by the following three fundamental questions.

  • Q1. How much more powerful is the ss-colorful random certificate oracle cISC\mathrm{cISC} than uniformly random hyperedge sampling for hyperedge estimation?

  • Q2. For a fixed 1≤s≤d1 \le s \le d, how much additional algorithmic power does the ss-colorful random certificate oracle cISC\mathrm{cISC} provide over the corresponding decision oracle cIS\mathrm{cIS}?

  • Q3. How does the relative power of cISC\mathrm{cISC} and cIS\mathrm{cIS} evolve as ss increases from 11 to dd? In particular, does a qualitative change occur at some ss?

We answer all three questions. Our first result shows that a polylogarithmic number of ss-colorful random certificate queries suffices to estimate the number of hyperedges.

Theorem 1. For every integer 1≤s≤d1 \le s \le d and ε∈(0,1/3)\varepsilon\in(0,1/3), there exists a randomized algorithm that, given access to the ss-colorful random certificate oracle cISC\mathrm{cISC}, outputs a (1±ε)(1 \pm\varepsilon)-approximation of the number of hyperedges with probability at least 2/32/3 using Os,d(ε−4log⁡2nlog⁡log⁡nlog⁡2(1/ε))O_{s,d}\left(\varepsilon^{-4}\log^2 n\log\log n\log^2(1/\varepsilon)\right) ss-colorful random certificate queries in expectation.

Theorem 1 answers Q1 in the affirmative and demonstrates the power of conditional sampling for hyperedge estimation. While estimating the number of hyperedges from uniformly random hyperedge samples requires Θ~(m)\widetilde{\Theta}(\sqrt{m}) queries by the classical birthday-paradox argument, our algorithm uses only a polylogarithmic number of ss-colorful random certificate queries. This yields an exponential separation between the query complexity of hyperedge estimation using uniformly random hyperedge sampling and using ss-colorful random certificate queries. We note that our algorithm treats all values of ss and dd in a unified manner.

Since every ss-colorful random certificate query reveals at least as much information as the corresponding decision query, it is immediate that cISC\mathrm{cISC} is at least as powerful as cIS\mathrm{cIS}. A natural question is whether this additional information leads to a genuine algorithmic advantage. The following theorem answers Q2 by showing that, for every 1≤s<d1 \le s < d, any algorithm using only the decision oracle cIS\mathrm{cIS} must make a polynomial number of queries to estimate the number of hyperedges.

Theorem 2. Let 1≤s<d1 \le s < d. Any randomized algorithm that, given access only to the ss-colorful decision oracle cIS\mathrm{cIS}, outputs a (1±ε)(1 \pm\varepsilon)-approximation of the number of hyperedges with probability at least 2/32/3 must make Ω~s,d(nd−sd−s+1)\widetilde{\Omega}_{s,d}\left(n^{\frac{d-s}{d-s+1}}\right) ss-colorful decision queries in the worst case.

Theorem 2, together with Theorem 1, establishes an exponential separation between the ss-colorful random certificate oracle cISC\mathrm{cISC} and the corresponding decision oracle cIS\mathrm{cIS} for every 1≤s<d1 \le s < d.

A natural question is whether this exponential separation persists for all values of ss. The answer is no. When s=ds=d, [5, 22] showed that the number of hyperedges can be estimated using only O(ε−2log⁡O(d)n)O(\varepsilon^{-2}\log^{O(d)} n) dd-colorful decision queries. Thus, unlike the case s<ds<d, random certificates are no longer necessary to obtain a polylogarithmic-query algorithm, albeit with a dependence on dd in the exponent of the log⁡n\log n factor. Combined with our lower bound for s<ds<d, the query complexity of hyperedge estimation in the decision model undergoes a transition from polynomial to polylogarithmic precisely at s=ds=d, thereby providing an answer to Q3.

Comparison with prior work

Our work also fits within the framework of hyperedge estimation under the global query access model, extending a growing body of work on graph and hypergraph estimation using global query oracles [21, 22, 23, 11, 5, 15, 3, 18, 1].

For graphs (d=2d=2), [11, 18] studied the independent set (IS) oracle, which coincides with our 1-colorful decision oracle cIS. They showed that estimating the number of edges requires Θ~(n)\widetilde{\Theta}(\sqrt{n}) IS queries. Subsequently, [11, 3] considered the more expressive bipartite independent set (BIS) oracle, corresponding to our 2-colorful decision oracle. The latter work gave a O~(ε−5log⁡5n)\widetilde{O}(\varepsilon^{-5}\log^{5} n)-query algorithm for edge estimation.

For general dd-uniform hypergraphs, [10, 22] introduced the dd-colorful decision oracle cIS. Over a series of works, increasingly efficient algorithms were developed for hyperedge estimation using dd-colorful decision queries, culminating in the Od(ε−2log⁡3d+5n)O_d(\varepsilon^{-2}\log^{3d+5} n)-query algorithm of [22, 5]. Subsequently, Dell, Lapinskas, and Meeks Dell, Lapinskas, and Meeks [23] proved a lower bound of Ωd(log⁡d(1−od(1))n)\Omega_d(\log^{d(1-o_d(1))} n) dd-colorful decision queries, matching the upper bound up to a constant factor in the exponent of log⁡n\log n. Consequently, at s=ds=d, the exponent of the log⁡n\log n factor in the decision model is Θ(d)\Theta(d), whereas the exponent in Theorem 1 is an absolute constant.

Very recently, [15] introduced the random certificate analogue of the IS oracle, which is precisely our 1-colorful random certificate oracle cISC, and showed that edge estimation can be performed using only O~(ε−2log⁡2n)\widetilde{O}(\varepsilon^{-2}\log^{2} n) queries. Together with the Ω~(n)\widetilde{\Omega}(\sqrt{n}) lower bound for the IS oracle due to [18], this establishes an exponential separation between the random certificate and decision variants in the graph setting.

References

  1. [1][AHL26] Tomer Adar, Yahel Hotam, and Amit Levi. When Local and Non-Local Meet: Quadratic Improvement for Edge Estimation with Independent Set Queries, 2026. arXiv:2601.21457.arxiv.org/abs/2601.21457
  2. [2][AJS19] Matthew Aldridge, Oliver Johnson, and Jonathan Scarlett. Group Testing: An Information Theory Perspective. Foundations and Trends in Communication and Information Theory, 15(3-4):196–392, 2019.
  3. [3]Raghavendra Addanki, Andrew McGregor, and Cameron Musco. Non-Adaptive Edge Counting and Sampling via Bipartite Independent Set Queries. In Proceedings of the 30th Annual European Symposium on Algorithms, ESA, pages 2:1–2:16, 2022.arxiv.org/abs/2207.02817
  4. [4]Anup Bhattacharya, Arijit Bishnu, Arijit Ghosh, and Gopinath Mishra. Hyperedge Estimation using Polylogarithmic Subset Queries. CoRR, abs/1908.04196, 2019.arxiv.org/abs/1908.04196
  5. [5]Anup Bhattacharya, Arijit Bishnu, Arijit Ghosh, and Gopinath Mishra. Faster Counting and Sampling Algorithms using Colorful Decision Oracle. ACM Transactions on Computation Theory, 16(2):12:1–12:19, 2024. A preliminary version of this paper appeared as an extended abstract in the proceedings of STACS 2022.arxiv.org/abs/2201.04975
  6. [6]Rishiraj Bhattacharyya and Sourav Chakraborty. Property Testing of Joint Distributions using Conditional Samples. ACM Transactions on Computation Theory, 10(4):16:1–16:20, 2018.DOI
  7. [7]Arijit Bishnu, Debarshi Chanda, Buddha Dev Das, Arijit Ghosh, and Gopinath Mishra. Optimal Non-Adaptive Algorithm for Edge Estimation. CoRR, abs/2512.11994, 2025.arxiv.org/abs/2512.11994
  8. [8]Rishiraj Bhattacharyya, Sourav Chakraborty, Yash Pote, Uddalok Sarkar, and Sayantan Sen. Testing Self-Reducible Samplers. In Proceedings of the Thirty-Eighth AAAI Conference on Artificial Intelligence (AAAI), pages 7952–7960, 2024.
  9. [9]Lorenzo Beretta, Deeparnab Chakrabarty, and C. Seshadhri. Faster Estimation of the Average Degree of a Graph Using Random Edges and Structural Queries. In Proceedings of the 2026 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA, pages 939–971, 2026.arxiv.org/abs/2507.06925
  10. [10]Arijit Bishnu, Arijit Ghosh, Sudeshna Kolay, Gopinath Mishra, and Saket Saurabh. Almost optimal query algorithm for hitting set using a subset query. Journal of Computer and System Sciences, 137:50–65, 2023. A preliminary version of this paper appeared as an extended abstract in the proceedings of ISAAC 2018, under the title “Parameterized Query Complexity of Hitting Set using Stability of Sunflowers”.arxiv.org/abs/1807.06272
  11. [11]Paul Beame, Sariel Har-Peled, Sivaramakrishnan Natarajan Ramamoorthy, Cyrus Rashtchian, and Makrand Sinha. Edge Estimation with Independent Set Oracles. ACM Transactions on Algorithms, 16(4):52:1–52:27, 2020.arxiv.org/abs/1711.07567
  12. [12]Lorenzo Beretta and Jakub Tetek. Better Sum Estimation via Weighted Sampling. ACM Transactions on Algorithms, 20(3):27: 1 – 33, 2024. An extended abstract of this paper appeared in the proceedings of SODA 2022.
  13. [13]Clément L. Canonne, Xi Chen, Gautam Kamath, Amit Levi, and Erik Waingarten. Random Restrictions of High Dimensional Distributions and Uniformity Testing with Subcube Conditioning. In Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 321–336, 2021.arxiv.org/abs/1911.07357
  14. [14]Diptarka Chakraborty, Sourav Chakraborty, Gunjan Kumar, and Kuldeep S. Meel. Approximate Model Counting: Is SAT Oracle More Powerful Than NP Oracle? In Proceedings of the 50th International Colloquium on Automata, Languages, and Programming (ICALP), volume 261, pages 123:1–123:17, 2023.
  15. [15]Debarshi Chanda, Buddha Dev Das, Arijit Ghosh, and Gopinath Mishra. From decision to random certificates: Exponential separation for edge estimation with independent set queries. In Proceedings of the 30th International Conference on Randomization and Computation (RANDOM 2026), 2026. To appear.
  16. [16]Keren Censor-Hillel, Tomer Even, and Virginia Vassilevska Williams. Output-Sensitive Approximate Counting via a Measure-Bounded Hyperedge Oracle, or: How Asymmetry Helps Estimate k-Clique Counts Faster. In Proceedings of the 57th Annual ACM Symposium on Theory of Computing, STOC, pages 1985–1996, 2025.
  17. [17]Sourav Chakraborty, Eldar Fischer, Yonatan Goldhirsh, and Arie Matsliah. On the power of conditional samples in distribution testing. In Proceedings of the 4th Conference on Innovations in Theoretical Computer Science (ITCS), pages 561–580, 2013.
  18. [18]Xi Chen, Amit Levi, and Erik Waingarten. Nearly optimal edge estimation with independent set queries. In Proceedings of the 31st Annual ACM-SIAM Symposium on Discrete Algorithms, SODA, pages 2916–2935, 2020.arxiv.org/abs/1907.04381
  19. [19]Clément L. Canonne, Dana Ron, and Rocco A. Servedio. Testing equivalence between distributions using conditional samples. In Proceedings of the 25th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1174–1192, 2014.DOI
  20. [20]Clément L. Canonne, Dana Ron, and Rocco A. Servedio. Testing Probability Distributions using Conditional Samples. SIAM Journal on Computing, 44(3):540–616, 2015. An extended abstract of this work appeared in SODA 2014.arxiv.org/abs/1211.2664
  21. [21]Holger Dell and John Lapinskas. Fine-grained reductions from approximate counting to decision. ACM Trans. Comput. Theory, 13(2):8:1–8:24, 2021.
  22. [22]Holger Dell, John Lapinskas, and Kitty Meeks. Approximately Counting and Sampling Small Witnesses Using a Colorful Decision Oracle. SIAM Journal on Computing, 51(4):849–899, 2022. A preliminary version of this paper appeared as an extended abstract in the proceedings of SODA 2020.DOI
  23. [23]Holger Dell, John Lapinskas, and Kitty Meeks. Nearly Optimal Independence Oracle Algorithms for Edge Estimation in Hypergraphs. In Proceedings of the 51st International Colloquium on Automata, Languages, and Programming, ICALP, volume 297, pages 54:1–54:17, 2024.
  24. [24]Robert Dorfman. The Detection of Defective Members of Large Populations. The Annals of Mathematical Statistics, 14(4):436 – 440, 1943.
  25. [25]Uriel Feige. On Sums of Independent Random Variables with Unbounded Variance and Estimating the Average Degree in a Graph. SIAM Journal on Computing, 35(4):964–984, 2006. An extended abstract of this paper appeared in the proceedings of STOC 2004.
  26. [26]Oded Goldreich and Dana Ron. Approximating Average Parameters of Graphs. Random Structures & Algorithms, 32(4):473–493, 2008. An extended abstract of this paper appeared in the proceedings of RANDOM 2006.
  27. [27]Michael Mitzenmacher and Eli Upfal. Probability and Computing: Randomized Algorithms and Probabilistic Analysis. Cambridge University Press, Cambridge, 2005.

Paper details

vlnc:W_hshh2g5q
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 10

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

AI tools

View statement
Looking for related papers…
Contents