Constructing and sampling partite, 3-uniform hypergraphs with given degree sequence

András G. Hubai, Tamás Róbert Mezei, Ferenc Béres, András A. Benczúr, István Miklós

Introduction

In network science, interactions are often more complex than simple pairwise connections. Triadic relationships—such as a specific author tweeting about a particular vaccine on a certain day—are best modeled using 3-uniform hypergraphs. When the entities involved belong to three distinct, non-overlapping categories, the structure is known as a partite, 3-uniform hypergraph.

A central challenge in analyzing these structures is the "degree sequence problem": determining whether a hypergraph can be constructed given a specific set of requirements for how many connections each node must have. Furthermore, for statistical hypothesis testing, researchers need to sample these hypergraphs uniformly to establish a null distribution. This paper addresses both the theoretical complexity of these problems and provides a practical sampling solution.

Theoretical Complexity and the "Almost-Regular" Case

The authors demonstrate that the general decision problem—determining if a realization of a partite, 3-uniform hypergraph exists for a given degree sequence—is NP-complete. This proof is achieved by reducing the problem from Numerical 3-Dimensional Matching.

However, the research identifies a significant exception. If the degrees in one of the three vertex classes are "almost-regular" (meaning every node in that class has a degree of either $k$ or $k-1$ for some fixed $k$), the problem can be solved in polynomial time. This finding provides a rare tractable boundary in an otherwise computationally difficult landscape.

Sampling via Parallel Tempering

Uniformly sampling hypergraphs with fixed degree sequences is notoriously difficult because the "space" of possible configurations is often disconnected. Standard Markov Chain Monte Carlo (MCMC) methods using "switch" operations (swapping edges) can become trapped in local neighborhoods, failing to explore the full range of valid hypergraphs.

To overcome this, the authors implement a Parallel Tempering method:

  • Multi-Chain Approach: Multiple simulations (chains) run simultaneously at different "temperatures."
  • High-Temperature Chains: These chains use "toggle" moves (adding or removing edges) and are allowed to deviate from the target degree sequence. This flexibility allows the algorithm to bypass topological barriers.
  • Low-Temperature Chains: These chains are strictly penalized for deviations, ensuring they eventually settle on valid hypergraphs that match the prescribed degrees.
  • State Swapping: By periodically swapping states between high and low-temperature chains, the algorithm "tunnels" through the configuration space, achieving a more uniform and representative sample.

Statistical Power and Real-World Application

The practical utility of this sampling method is demonstrated through a new hypergraph-based $\chi^2$ test. Traditional 2D contingency tables often ignore the "agent" (the entity responsible for the data points), assuming each entry is independent. By using the sampled hypergraphs to define a null distribution that accounts for the agent's activity level, the authors created a more nuanced statistical tool.

In a case study involving 33,000 COVID-19 vaccination tweets (categorized by Author, Vaccine Type, and Date), this hypergraph method showed significantly higher sensitivity than standard $\chi^2$ or Fisher’s exact tests. On sparse subsets of data where traditional tests failed to find significant patterns ($p > 0.05$), the hypergraph-based test correctly identified strong aggregation patterns ($p \approx 10^{-9}$), proving its effectiveness for small datasets.

Conclusion

This work advances the study of complex hypergraphs by mapping the boundaries of computational tractability and providing a robust sampling framework. While Parallel Tempering is computationally intensive, its ability to provide accurate statistical testing for sparse, triadic data makes it a valuable tool for researchers in social media analysis, epidemiology, and beyond. Future work may focus on optimizing these algorithms through "greedy" initial constructions to reduce convergence time.

Summary updated

BibTeX
@inproceedings{hubai2024constructing,
  author = {András G. Hubai and Tamás Róbert Mezei and Ferenc Béres and András A. Benczúr and István Miklós},
  title = {{Constructing and sampling partite, 3-uniform hypergraphs with given degree sequence}},
  booktitle = {PLoS},
  year = {2024},
  doi = {10.1371/journal.pone.0303155},
}
Figure