Counting HyperGraphlets via Color Coding: a Quadratic Barrier and How to Break It
Pith reviewed 2026-05-10 17:35 UTC · model grok-4.3
The pith
Color coding cannot count k-hypergraphlets in sub-quadratic time under the Orthogonal Vectors Conjecture, but real-world hypergraphs that are (α,β)-nice allow an algorithm running in time 2^{O(k)} · (2^β |V| + α^k |E| + α² β ||H||).
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
Under the Orthogonal Vectors Conjecture, no color coding implementation counts k-hypergraphlets in sub-quadratic time in the input size. For (α,β)-nice hypergraphs the time is 2^{O(k)} · (2^β |V| + α^k |E| + α² β ||H||) with uniform sampling in k^{O(k)} · (β² + ln |V|) per sample.
What carries the argument
The (α,β)-niceness property of hypergraphs, which permits splitting into a rank-at-most-α sub-hypergraph and a degree-at-most-β sub-hypergraph to apply tailored color coding techniques.
Load-bearing premise
Real-world hypergraphs satisfy (α,β)-niceness for small fixed values of α and β.
What would settle it
A hypergraph dataset from an application where the smallest α and β making it nice are both large enough that α^k |E| or 2^β |V| exceeds quadratic time in the input size.
Figures
read the original abstract
We study the problem of counting $k$-hypergraphlets, an interesting but surprisingly ignored primitive, with the aim of understanding whether efficient algorithms exist. To this end, we consider color coding, a well-known technique for approximately counting $k$-graphlets in graphs. Our first result is that, on hypergraphs, color coding encounters a quadratic barrier: under the Orthogonal Vector Conjecture, no implementation can run in sub-quadratic time in the input size. We then introduce a simple property, $(\alpha,\beta)$-niceness, that hypergraphs from real-world datasets appear to satisfy for small values of $\alpha$ and $\beta$. Intuitively, an $(\alpha,\beta)$-nice hypergraph can be split into two sub-hypergraphs having respectively rank at most $\alpha$ and degree at most $\beta$. By applying different techniques to each sub-hypergraph and carefully combining the outputs, we show how to run color coding in time $2^{O(k)} \cdot (2^\beta |V| + \alpha^k |E| + \alpha^2 \beta \|H\|)$, where $H=(V,E)$ is the input hypergraph. Afterwards, we can sample colorful $k$-hypergraphlets uniformly in expected $k^{O(k)} \cdot (\beta^2 + \ln |V|)$ time per sample. Experiments on real-world hypergraphs show that our algorithm significantly outperforms the naive quadratic algorithm, sometimes by more than an order of magnitude.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The manuscript establishes a quadratic barrier for color-coding based counting of k-hypergraphlets under the Orthogonal Vectors Conjecture. It defines the (α,β)-niceness property, which real-world hypergraphs appear to satisfy, allowing the input to be partitioned into a low-rank sub-hypergraph and a low-degree sub-hypergraph. The paper then presents an algorithm that applies color coding to each part separately and combines the results to achieve a running time of 2^{O(k)} · (2^β |V| + α^k |E| + α² β ||H||) for counting, along with an efficient uniform sampling procedure. Experimental results on real-world hypergraphs indicate substantial speedups compared to the quadratic baseline.
Significance. This work is significant in highlighting the limitations of direct application of color coding to hypergraphs and providing a practical workaround via the niceness property for datasets that satisfy it. The lower bound result is interesting and well-motivated. The algorithmic improvement, if rigorously proven, could enable new applications in hypergraph analysis. The empirical experiments are a positive aspect, showing real-world relevance. However, the reliance on an empirical property rather than a worst-case guarantee tempers the theoretical impact.
major comments (2)
- [Abstract] Abstract: the claimed running time 2^{O(k)} · (2^β |V| + α^k |E| + α² β ||H||) is obtained by running color coding separately on each part and combining the counts, but the manuscript provides no details on the combination procedure or error analysis for k-hypergraphlets whose edges cross the low-rank and low-degree sub-hypergraphs. This combination step is load-bearing for the central algorithmic claim and the asserted improvement over the quadratic barrier.
- [Niceness property definition] The (α,β)-niceness property is introduced as an empirical observation from real-world datasets rather than a structural theorem with an efficient partitioning algorithm. The time bound depends on small fixed α and β; without a formal definition, proof of efficient partitionability, or analysis of sensitivity to larger α/β, the sub-quadratic performance is not guaranteed even for the claimed class of inputs.
minor comments (1)
- [Abstract] The abstract uses ||H|| without an explicit definition (presumably the total size of the hypergraph); this should be clarified on first use.
Simulated Author's Rebuttal
We thank the referee for the careful reading and constructive feedback. We appreciate the recognition of the lower bound's interest and the practical relevance of the niceness-based algorithm. We address the major comments point by point below.
read point-by-point responses
-
Referee: [Abstract] Abstract: the claimed running time 2^{O(k)} · (2^β |V| + α^k |E| + α² β ||H||) is obtained by running color coding separately on each part and combining the counts, but the manuscript provides no details on the combination procedure or error analysis for k-hypergraphlets whose edges cross the low-rank and low-degree sub-hypergraphs. This combination step is load-bearing for the central algorithmic claim and the asserted improvement over the quadratic barrier.
Authors: We agree that additional details are needed. The manuscript outlines the partition into low-rank and low-degree sub-hypergraphs and applies color coding separately, but the explicit procedure for combining counts of crossing k-hypergraphlets (those with edges in both parts) and the associated error analysis are not elaborated. We will revise by adding a dedicated subsection describing the combination via linearity of expectation over edge-type distributions, together with a complete error analysis establishing that the overall (1+ε)-approximation is preserved. This will be incorporated in the algorithmic section. revision: yes
-
Referee: [Niceness property definition] The (α,β)-niceness property is introduced as an empirical observation from real-world datasets rather than a structural theorem with an efficient partitioning algorithm. The time bound depends on small fixed α and β; without a formal definition, proof of efficient partitionability, or analysis of sensitivity to larger α/β, the sub-quadratic performance is not guaranteed even for the claimed class of inputs.
Authors: The (α,β)-niceness property receives a formal definition in Section 3 as the existence of a partition of the edge set into a rank-at-most-α sub-hypergraph and a maximum-degree-at-most-β sub-hypergraph. It is presented as an empirical property observed on real-world instances rather than a worst-case structural guarantee. We will revise to make the definition more prominent, add a short discussion of practical heuristics for identifying the partition (e.g., iterative removal of high-degree vertices), and include sensitivity analysis showing how the running time scales with α and β. A general efficient algorithm for computing such a partition on arbitrary inputs is not provided and lies outside the scope of the current work. revision: partial
- The absence of a polynomial-time algorithm to compute an (α,β)-nice partition for arbitrary hypergraphs, which is required to guarantee the improved running time in the worst case rather than only on empirically nice instances.
Circularity Check
No circularity: time bound derived from external conjecture and empirical niceness split
full rationale
The quadratic barrier follows from the Orthogonal Vectors Conjecture (external hardness assumption). The sub-quadratic bound for (α,β)-nice hypergraphs is obtained by partitioning edges into low-rank and low-degree sub-hypergraphs (defined directly from the niceness property), then invoking standard color-coding separately on each part and combining counts. The niceness property itself is introduced as an empirical observation on real-world data rather than derived from the algorithm or any fitted parameter. No self-citations, self-definitional equations, or renamings of known results appear in the derivation chain. The running-time expression is therefore a direct consequence of the split and standard techniques, not a tautology.
Axiom & Free-Parameter Ledger
axioms (2)
- domain assumption Orthogonal Vectors Conjecture
- standard math Standard properties of color coding and random coloring for approximate counting
invented entities (1)
-
(α,β)-niceness property
no independent evidence
Reference graph
Works this paper leans on
-
[1]
The shape of collaborations.EPJ Data Science, 6(1):18, 2017
Alice Patania, Giovanni Petri, and Francesco Vaccarino. The shape of collaborations.EPJ Data Science, 6(1):18, 2017
work page 2017
-
[2]
Benson, Rediet Abebe, Michael T
Austin R. Benson, Rediet Abebe, Michael T. Schaub, Ali Jadbabaie, and Jon Kleinberg. Simplicial closure and higher-order link prediction.Proceedings of the National Academy of Sciences, 115(48), November 2018
work page 2018
-
[3]
Higher-order motif analysis in hypergraphs.Communications Physics, 5(1), April 2022
Quintino Francesco Lotito, Federico Musciotto, Alberto Montresor, and Federico Battiston. Higher-order motif analysis in hypergraphs.Communications Physics, 5(1), April 2022
work page 2022
-
[4]
Thomas Gaudelet, No ¨el Malod-Dognin, and Nataˇsa Prˇzulj. Higher-order molecular organization as a source of biological function.Bioinformatics, 34(17):i944–i953, 09 2018
work page 2018
-
[5]
Jakob Lykke Andersen, Christoph Flamm, Daniel Merkle, and Peter F. Stadler. Chemical trans- formation motifs—modelling pathways as integer hyperflows.IEEE/ACM Transactions on Com- putational Biology and Bioinformatics, 16:510–523, 2017
work page 2017
-
[6]
Jonas L. Juul, Austin R. Benson, and Jon Kleinberg. Hypergraph patterns and collaboration struc- ture.Frontiers in Physics, Volume 11 - 2023, 2024
work page 2023
-
[7]
Hypergraph motif representation learning
Alessia Antelmi, Gennaro Cordasco, Daniele De Vinco, Valerio Di Pasquale, Mirko Polato, and Carmine Spagnuolo. Hypergraph motif representation learning. KDD ’25, page 13–24, New York, NY, USA, 2025. Association for Computing Machinery
work page 2025
-
[8]
Color-Coding.Journal of the ACM, 42(4):844–856, 1995
Noga Alon, Raphael Yuster, and Uri Zwick. Color-Coding.Journal of the ACM, 42(4):844–856, 1995
work page 1995
-
[9]
Faster motif counting via succinct color coding and adaptive sampling.ACM Trans
Marco Bressan, Stefano Leucci, and Alessandro Panconesi. Faster motif counting via succinct color coding and adaptive sampling.ACM Trans. Knowl. Discov. Data, 15(6), May 2021
work page 2021
-
[10]
Quintino Francesco Lotito, Federico Musciotto, Federico Battiston, and Alberto Montresor. Ex- act and sampling methods for mining higher-order motifs in large hypergraphs.Computing, 106(2):475–494, February 2024
work page 2024
-
[11]
Jianer Chen, Benny Chor, Mike Fellows, Xiuzhen Huang, David W. Juedes, Iyad A. Kanj, and Ge Xia. Tight lower bounds for certain parameterized NP-hard problems.Inf. Comput., 201(2):216– 231, 2005
work page 2005
-
[12]
Motivo: Fast motif counting via suc- cinct color coding and adaptive sampling.Proc
Marco Bressan, Stefano Leucci, and Alessandro Panconesi. Motivo: Fast motif counting via suc- cinct color coding and adaptive sampling.Proc. VLDB Endow., 12(11):1651–1663, July 2019
work page 2019
-
[13]
Hypergraph motifs: concepts, algorithms, and discoveries
Geon Lee, Jihoon Ko, and Kijung Shin. Hypergraph motifs: concepts, algorithms, and discoveries. Proc. VLDB Endow., 13(12):2256–2269, July 2020
work page 2020
-
[14]
Sebastian Wernicke. Efficient Detection of Network Motifs.IEEE/ACM Transactions on Computa- tional Biology and Bioinformatics, 3(4):347–359, October 2006
work page 2006
-
[15]
The complexity of counting small sub-hypergraphs, 2025
Marco Bressan, Julian Brinkmann, Holger Dell, Marc Roth, and Philip Wellnitz. The complexity of counting small sub-hypergraphs, 2025
work page 2025
-
[16]
D ´aniel Marx. Tractable Hypergraph Properties for Constraint Satisfaction and Conjunctive Queries.Journal of the ACM, 60(6):42:1–42:51, 2013
work page 2013
-
[17]
Orthogonal vectors is hard for first-order properties on sparse graphs
Jiawei Gao and Russell Impagliazzo. Orthogonal vectors is hard for first-order properties on sparse graphs. InElectronic Colloquium on Computational Complexity (ECCC), volume 23, page 53, 2016. 27
work page 2016
-
[18]
Lang, Anirban Dasgupta, and Michael W
Jure Leskovec, Kevin J. Lang, Anirban Dasgupta, and Michael W. Mahoney. Community structure in large networks: Natural cluster sizes and the absence of large well-defined clusters.Internet Mathematics, 6:123 – 29, 2008
work page 2008
-
[19]
Motif counting beyond five nodes.ACM TKDD, 12(4), 2018
Marco Bressan, Flavio Chierichetti, Ravi Kumar, Stefano Leucci, and Alessandro Panconesi. Motif counting beyond five nodes.ACM TKDD, 12(4), 2018
work page 2018
-
[20]
M. D. Vose. A linear algorithm for generating random numbers with a given distribution.IEEE Transactions on Software Engineering, 17(9):972–975, 1991
work page 1991
-
[21]
Nate Veldt, Austin R. Benson, and Jon Kleinberg. Minimizing localized ratio cut objectives in hypergraphs. InProceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM Press, 2020
work page 2020
-
[22]
Justifying recommendations using distantly-labeled reviews and fine-grained aspects
Jianmo Ni, Jiacheng Li, and Julian McAuley. Justifying recommendations using distantly-labeled reviews and fine-grained aspects. InProceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 188–197, 2019
work page 2019
-
[23]
Jianer Chen, Xiuzhen Huang, Iyad A. Kanj, and Ge Xia. Strong computational lower bounds via parameterized complexity.Journal of Computer and System Sciences, 72(8):1346 – 1367, 2006. 28 APPENDIX This section complements the main paper by providing additional material that was omitted from the main text due to space constraints. It is organized as follows:...
work page 2006
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.