Counting hypertriangles through hypergraph orientations
Daniel Paul-Pena, Vaishali Surianarayanan, Deeparnab Chakrabarty, C. Seshadhri
TL;DR
This work addresses exact counting of hypergraph motifs, focusing on hypertriangles, and introduces a degeneracy-oriented framework that generalizes graph orientations to hypergraphs. By defining directed acyclic hypergraphs and a hyperedge degeneracy κ(G), the authors develop algorithms whose runtimes scale with sums of squared out-degrees, specifically O(∑v d_v(d^+_v)^2), enabling efficient, exact counting. The DITCH implementation leverages triangle-, containment-, and star-based counting, plus open-pattern handling, and achieves 10–100x speedups with far lower memory usage than prior methods on real datasets, including large-scale Tg-ubuntu. These results demonstrate the practicality of orientation-based techniques for hypergraph motif counting and point to future extensions to larger motifs and more nuanced intersection conditions.
Abstract
Counting the number of small patterns is a central task in network analysis. While this problem is well studied for graphs, many real-world datasets are naturally modeled as hypergraphs, motivating the need for efficient hypergraph motif counting algorithms. In particular, we study the problem of counting hypertriangles - collections of three pairwise-intersecting hyperedges. These hypergraph patterns have a rich structure with multiple distinct intersection patterns unlike graph triangles. Inspired by classical graph algorithms based on orientations and degeneracy, we develop a theoretical framework that generalizes these concepts to hypergraphs and yields provable algorithms for hypertriangle counting. We implement these ideas in DITCH (Degeneracy Inspired Triangle Counter for Hypergraphs) and show experimentally that it is 10-100x faster and more memory efficient than existing state-of-the-art methods.
