---
title: Directed Hypergraph Configuration Model (DHCM)
url: https://www.emergentmind.com/topics/directed-hypergraph-configuration-model-dhcm
type: topic
---

# Directed Hypergraph Configuration Model (DHCM)

The Directed Hypergraph Configuration Model (DHCM) specifies a null model for randomization of directed hypergraphs under strict preservation of local marginals: node in- and out-degree sequences, and hyperedge head and tail size distributions. It generalizes the classical configuration model for graphs to the higher-order, directed, and potentially non-uniform setting, enabling statistically grounded hypothesis testing and structural analysis in complex systems with non-pairwise interactions.

## 1. Formal Definition and Core Properties

A directed hypergraph $H=(V,E)$ comprises a finite node set $V$ and a multiset $E$ of directed hyperedges. Each hyperedge $e\in E$ is an ordered pair $e=(h_e,t_e)$, where $h_e\subseteq V$ (head) and $t_e\subseteq V$ (tail); $h_e\cap t_e$ may be non-empty or restricted to be disjoint depending on the formulation [2402.18470], [2408.12874]. For every node $v\in V$, the out-degree $d_{\mathrm{out}}(v)$ is the number of heads containing $v$, and the in-degree $d_{\mathrm{in}}(v)$ is the number of tails containing $v$. Each hyperedge $e$ is characterized by its head size $s_{\mathrm{head}}(e)=|h_e|$ and tail size $s_{\mathrm{tail}}(e)=|t_e|$.

The DHCM ensemble $\widehat{\mathcal{H}}^{DHCM}$ is the set of all hypergraphs on $V$ whose node in- and out-degree sequences and hyperedge head- and tail-size sequences exactly match those of a given observed hypergraph $H^\circ$. Letting $E^\circ$ denote the edge multiset in the observed structure,
\[
\widehat{\mathcal{H}}^{DHCM} = \left\{ H=(V,E) \;\middle|\;
  \begin{array}{l}
    \forall v\in V: d_{\mathrm{out}}^{(H)}(v)=d_{\mathrm{out}}^{(H^\circ)}(v), \;
      d_{\mathrm{in}}^{(H)}(v)=d_{\mathrm{in}}^{(H^\circ)}(v) \\
    \forall e\in E: s_{\mathrm{head}}^{(H)}(e)=s_{\mathrm{head}}^{(H^\circ)}(e),\;
      s_{\mathrm{tail}}^{(H)}(e)=s_{\mathrm{tail}}^{(H^\circ)}(e)
  \end{array}
\right\}
\]
The model assigns uniform probability to each $H\in\widehat{\mathcal{H}}^{DHCM}$; that is, $P_{DHCM}(H) = 1/|\widehat{\mathcal{H}}^{DHCM}|$ for $H\in \widehat{\mathcal{H}}^{DHCM}$, and zero otherwise [2402.18470].

## 2. Mathematical Encodings

Directed hypergraphs in the DHCM may be represented in several mathematically equivalent ways:
- **Incidence matrices:** $A^+\in\{0,1\}^{|V|\times|E|}$ with $A^+_{v,e}=1$ iff $v\in h_e$; $A^-\in\{0,1\}^{|V|\times|E|}$ with $A^-_{v,e}=1$ iff $v\in t_e$.
- **Adjacency tensor:** $X\in\{0,1\}^{|V|\times|E|\times\{+1,-1\}}$, $X_{v,e,d}$ indicates membership in head ($d=+1$) or tail ($d=-1$).
- **Bipartite representation:** As a bipartite, potentially directed, graph $G=(L,R,D)$ with $L=V$, $R=E$, and arcs $D$ labeled $+1$ (head) or $-1$ (tail). Degree preservation reduces to fixed-degree constraints on both sides of the bipartite graph [2402.18470], [2408.12874].

## 3. Asymptotic Enumeration

Let $N(d^+,d^-,H,T)$ denote the number of (unlabeled) directed hypergraphs with prescribed node out-degree sequence $d^+$, in-degree sequence $d^-$, head-size multiset $H$, and tail-size multiset $T$. Under the conditions
- the sum of degrees matches the sum of hyperedge sizes ($M^+=\sum d_i^+=\sum t_j$, $M^-=\sum d_i^-=\sum h_j$),
- the maxima $d^+_{\max}, d^-_{\max}, t_{\max}, h_{\max}$ all satisfy $o(M^{1/2})$,
- at least one of $d^+,d^-,T,H$ is "near-regular",

the cardinality is asymptotically
\[
N(d^+,d^-,H,T) =
  R(d^+,d^-,H,T)\cdot\exp[O(\epsilon)]
\]
with leading term
\[
R(d^+,d^-,H,T) =
  \frac{M^+! M^-!}
       {\prod_{i=1}^n d_i^+! \prod_{i=1}^n d_i^-! \prod_{j=1}^m t_j! h_j!}
   \exp\left\{
      \frac{M^+ K^+}{2(M^+)^2} + \frac{M^- K^-}{2(M^-)^2}
      - \frac{M_2^+ K_2^+}{2(M^+)^2}
      - \frac{M_2^- K_2^-}{2(M^-)^2}
      - \frac{\sum_{i=1}^n d_i^+ d_i^-}{M^+M^-}
   \right\}
\]
where $K^+=\sum_j t_j$, $K^-=\sum_j h_j$, $M_2^+=\sum_i (d_i^+)^2$, $K_2^+=\sum_j (t_j)^2$, and $\epsilon=O((d^+_{\max}+t_{\max})^4/M^++(d^-_{\max}+h_{\max})^4/M^-)$ [2408.12874]. Dropping the near-regularity requirement is possible at the cost of larger error terms and stricter growth conditions.

Specializations include the standard configuration model when all hyperedges are single arcs ($a^+=a^-=1$ for all edges), yielding the classical directed graph formula.

## 4. Uniform Sampling Algorithms

Uniform sampling from the DHCM ensemble is made tractable by translating the problem to the bipartite graph domain. Two principal schemes have been detailed:
- **Markov chain Monte Carlo:** The NuDHy-Degs algorithm [Editor's term], an ergodic Markov chain on the space of directed bipartite graphs with fixed in/out-degrees. The central move—Parity Swap Operation (PSO)—interchanges two $+1$-arcs (or $-1$-arcs) between distinct node-edge pairs, preserving all degrees. The process is reversible, aperiodic, and irreducible, guaranteeing convergence to the uniform distribution with each proposal accepted with probability 1.
- **Rejection/importance sampling:** For sparse and bounded-degree regimes, an independent sampling of bipartite graphs $G^+,G^-$ with required degree sequences is performed; the pair is accepted if their edge sets are disjoint. Under suitable bounds, the acceptance probability approaches 1, enabling constant-time uniform sampling [2408.12874].

Pseudocode for NuDHy-Degs is as follows:
```
Input: initial G∈S, number of steps s
For t = 1 … s:
    flip biased coin (heads prob |D⁺|/|D| for d=+1 else d=−1)
    if d=+1:
        pick u≠v∈L, compute Δ⁺(u,v)
        if Δ⁺ not empty:
            pick (α,β)∈Δ⁺ at random; swap (u,α,+1),(v,β,+1) ↔ (u,β,+1),(v,α,+1)
        else do nothing
    else:
        analogous process on R and −1 arcs
Return G
```
Each step operates in $O(1)$ time if adjacency lists are hash sets, and typical mixing time is $O(|D|\log|D|)$ [2402.18470].

## 5. Model Scope, Extensions, and Limitations

The DHCM strictly preserves node degrees and hyperedge size marginals, but does not retain higher-order structure such as correlations between node degree and edge size, or specific motif frequencies. If such features are essential, the Directed Hypergraph Joint Model (DHJM) preserves the full five-dimensional joint tensor of node-degrees and hyperedge-sizes at the expense of a more complex and slower-mixing Markov chain on a restricted move set [2402.18470]. 

The current micro-canonical design does not account for statistical noise in observational data. For such purposes, a canonical-ensemble version, preserving marginals only in expectation via an exponential-random-hypergraph distribution, is suggested. Incorporation of additional constraints—such as reciprocity, motif counts, or annotated roles—would require novel modifications of the swap operations, as in the annotated-hypergraph configuration model [2402.18470].

## 6. Applications and Empirical Context

DHCM and its efficient sampling algorithms have been deployed in application areas where higher-order, directed interactions are central, including:
- Quantification of political homophily oscillations in higher-order representations of US Congress data [2402.18470].
- Analysis of non-linear contagion dynamics in contact hyper-networks, where deviations from mean-field predictions are only explained when joint degree distributions are considered [2402.18470].
- Measurement of economic complexity in global trade networks, associating local marginals with established structural complexity indices [2402.18470].

The uniform null model generated by DHCM provides a rigorous reference for the assessment of structurally significant patterns in such contexts.

## 7. Connections to Related Models

DHCM recovers, as special cases, established configuration models:
- When all hyperedges are of arity $(a^+,a^-)$, the formula and uniform sampler reduce to those for uniform dihypergraphs with given degree sequences [2408.12874].
- For $a^+=a^-=1$, one recovers the classic directed configuration model for graphs.
- By discarding direction and treating $A^+,A^-$ symmetrically, one returns to the undirected hypergraph configuration model.

These connections affirm that the DHCM sits within a hierarchy of random network models, extending the configuration paradigm to general, multi-node, directed interactions.

Source: https://www.emergentmind.com/topics/directed-hypergraph-configuration-model-dhcm