Skip to content

feat: Add nested hypergraph generators (Kim et al. 2023, Barrett et al. 2025)#683

Open
jg-you wants to merge 1 commit intoxgi-org:devfrom
jg-you:nestedness
Open

feat: Add nested hypergraph generators (Kim et al. 2023, Barrett et al. 2025)#683
jg-you wants to merge 1 commit intoxgi-org:devfrom
jg-you:nestedness

Conversation

@jg-you
Copy link

@jg-you jg-you commented Feb 19, 2026

Adds two generative models that explicitly parameterize nestedness: random_nested_hypergraph and simplicial_chung_lu_hypergraph.

Barrett et al.: Implementation of Algorithms 3 and 4 from the paper. Couldn't find much to re-use between this and chung_lu_hypergraph since the methods are fundamentally different.

Kim et al.: Implements the algorithm described in Section II here. Duplicate edges are prevented during facet generation (step 1) and after rewiring (step 3) using frozenset sets. I wasn't sure whether epsilon was fixed or could vary by order, so I made this argument a list or a float to support both cases.

Notes

  • Tried to match the codebase conventions for parameter names: d for edge size, p for probability, epsilon for retention, k1/k2 for degree/size sequences.
  • Seed reproducibility tests only assert same-seed determinism. There's a bug in the existing code, e.g., here, where different seeds could lead to the edges being identical nonetheless. Did not reproduce the pattern in the new tests as a result.

@kaiser-dan kaiser-dan added the new feature New feature or request label Feb 26, 2026
@kaiser-dan kaiser-dan changed the base branch from main to dev February 26, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants