English

Counting HyperGraphlets via Color Coding: a Quadratic Barrier and How to Break It

Data Structures and Algorithms 2026-04-15 v2 Databases Discrete Mathematics Social and Information Networks

Abstract

We study the problem of counting kk-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 kk-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 2O(k)(2βV+αkE+α2βH)2^{O(k)} \cdot (2^\beta |V| + \alpha^k |E| + \alpha^2 \beta \|H\|), where H=(V,E)H=(V,E) is the input hypergraph. Afterwards, we can sample colorful kk-hypergraphlets uniformly in expected kO(k)(β2+lnV)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.

Keywords

Cite

@article{arxiv.2604.08278,
  title  = {Counting HyperGraphlets via Color Coding: a Quadratic Barrier and How to Break It},
  author = {Marco Bressan and Stefano Clemente and Giacomo Fumagalli},
  journal= {arXiv preprint arXiv:2604.08278},
  year   = {2026}
}
R2 v1 2026-07-01T12:01:13.253Z