Track: Track2; Team name: howyadoin; Model: DSHN - #408
Open
dario-loi wants to merge 2 commits into
Open
Conversation
Implements Mule et al., "Directional Sheaf Hypergraph Networks: Unifying
Learning on Directed and Undirected Hypergraphs", ICLR 2026
(arXiv:2510.04727), for the TDL Challenge 2026 Track 2.
The backbone builds the Directed Sheaf Hypergraph Laplacian
L^F = D_V - B^(q)† D_E^-1 B^(q) (Eq. 1-3) and diffuses complex node
features with Q_N^F = I - L_N^F (Eq. 9). Both models from the paper are
exposed: DSHN, and DSHNLight, which builds the operator outside the
autograd graph so the restriction-map predictor stays fixed.
TopoBench liftings produce undirected hypergraphs, on which every phase
product of Eq. 4 is 1 and the operator is real, making the charge q a
no-op (Theorem 6). `orientation="star"` applies the paper's own
Appendix D.5 construction, T(e_v) = {v} and H(e_v) = N(v), to a
node-centred lifting so the complex operator is reachable. The default
khop lifting satisfies that precondition.
Tests assert the paper's mathematics rather than tensor shapes: the
Appendix E counterexample (this operator is PSD where the 1/delta_e
diagonal of Duta et al. 2023 gives lambda_min = (1-sqrt(17))/6),
Hermitian-ness (Thm 1), the Dirichlet energy (Thm 2), lambda_max <= 1
(Thm 3), reduction to (D-A)/2 (Thm 4), and q-invariance on undirected
input. New files are at 100% line coverage.
Departures from the reference implementation, each defaulting to the
published definition and flagged in the docstrings: add_identity=False
(D_V + I appears in neither Eq. 2 nor Eq. 7), the paper's e^{-2*pi*i*q}
tail phase rather than its conjugate, zero-initialized imaginary part,
sigma after every layer per Eq. 9, and only the MLP_var1 predictor.
Runs the official GraphUniverse notebook on `hypergraph/dshn_directed` (72 runs: 12 settings x 3 seeds x 2 experiments) and commits the generated `results.json`. `run_evaluation.ipynb` differs from main in exactly one cell, `MODEL_CONFIG`; the cell-6 guard hash still matches `expected_hash`. Adds `dshn_directionality.ipynb`, a supplementary analysis of the one thing the GraphUniverse grid structurally cannot show: DSHN's headline contribution is a complex-valued *directed* Laplacian, but every TopoBench graph-to-hypergraph lifting is undirected. It verifies that on undirected input the operator is exactly real and its spectrum exactly independent of q (Eq. 4, Thm 6), that the Appendix D.5 star orientation switches the complex terms on, and that the 1 - 1/delta_e diagonal is what makes the operator PSD where the 1/delta_e of Duta et al. (2023) is not (Appendix E). Also adds the missing Sphinx pages for `dshn` and `dshn_utils`, mirroring the `nsd` / `nsd_utils` layout under backbones/graph.
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Track
Track 2 — Topological Neural Networks (TNNs)
Team Name
howyadoin
Model
Directional Sheaf Hypergraph Network (DSHN)
Status
Ready for review
Summary
This PR contributes a TopoBench-native implementation of Directional Sheaf$e^{-2\pi i q}$ , one in the head set does not. The
Hypergraph Networks (DSHN) by Mule et al. (ICLR 2026). DSHN attaches a
vector space (a stalk) to every node and hyperedge, glues them with learned
restriction maps, and encodes hyperedge direction as a phase: an incidence
in the tail set picks up
resulting Directed Sheaf Hypergraph Laplacian
is complex Hermitian, and one layer diffuses complex features with
$Q^{\mathcal{F}}_N = I - L^{\mathcal{F}}_N$ (Eq. 9). Setting $q = 0$ collapses$1$ and recovers direction-blind diffusion, which is how the same
the phase to
operator covers directed and undirected hypergraphs in one definition.
Implementation
topobench/nn/backbones/hypergraph/dshn.py):DSHN, which learns the restriction maps end to end, andDSHNLight(
light=true), which builds the operator outside the autograd graph sothe variant that still fits where DSHN runs out of memory in Table 6).
dshn_utils/:laplacian.py(the Eq. 1-3 assembly, the charge phase of Eq. 4, theblock normalization, and the Appendix D.5 orientation),
complex_ops.py(complex ReLU, dropout, LayerNorm,
unwind), andsheaf_builders.py(the diagonal, orthogonal and general restriction-map families).
(
configs/model/hypergraph/dshn.yaml), the induced-orientation variant(
dshn_directed.yaml),DSHNLight(dshn_light.yaml), and the tworestriction-map families the reference implements but the paper does not
benchmark (
dshn_ortho.yaml,dshn_general.yaml). Every non-obviousvalue carries the paper section or the reference flag it comes from.
the Appendix E counterexample reproduced against its closed form (this
operator is PSD where the
Dirichlet energy identity (Thm 2),
reduction to
test/nn/backbones/hypergraph/test_dshn.py, including an overfit check,a test that
DSHNLightreally does freeze(isolated nodes, singleton hyperedges,
hypergraph/dshnandhypergraph/dshn_directedadded totest/pipeline/test_pipeline.py, so CI exercises both the real and thecomplex operator path end to end.
dshnanddshn_utils(docs/api/), mirroring theexisting
nsd/nsd_utilslayout.(12 settings
hypergraph/dshn_directed; the auto-generatedresults.jsonisincluded.
run_evaluation.ipynbdiffers frommainin exactly one cell,MODEL_CONFIG, and the guard hash in cell 6 still matchesexpected_hash.The undirected-lifting problem, and what we did about it
Every TopoBench$H(e) = \emptyset$ , so every phase product of
graph2hypergraphlifting produces an undirectedhypergraph. On undirected input
Eq. 4 is
regardless of$q$ : the operator is exactly real and its spectrum is exactly
independent of the charge. Run as lifted, DSHN's headline contribution is
unreachable and the
qentry in its config does nothing.Two things follow, and
2026_tdl_challenge/dshn_directionality.ipynbestablishes both:
The directed half is reachable, using the paper's own construction.
$T(e_v) = {v}$ , $H(e_v) = N(v)$ . TopoBench's default
$q$ under
$[0, 1]$ throughout.
Appendix D.5 orients a hyperedge away from the node it is centred on:
khoplifting buildsexactly one hyperedge per node, so the centre is recoverable and the
construction applies directly. This is
orientation="star", shipped asdshn_directed.yamland the config the benchmark grid was run with. Thenotebook shows the imaginary mass rising with
starand pinnedat zero under
none, with the operator staying Hermitian and insideWhat the undirected case does give is positive semidefiniteness. The$1 - 1/\delta_e$ against $1/\delta_e$ . That one$1/\delta_e$ operator, so the boundary
paper presents this as a contribution in its own right (p. 7): it "provides
the first definition of a Sheaf Hypergraph Laplacian suitable for
undirected hypergraphs", differing from Duta et al. (2023) only in the
diagonal coefficient
coefficient is the entire difference, and it is what makes the operator a
valid diffusion operator. We spell this out because PR Track: Track2; Team name: s/pairwise/ho; Model: SheafHyperGNN #321 implements
SheafHyperGNN, which is the
between the two submissions is exactly this coefficient.
The notebook also runs a small end-to-end control: a synthetic directed$q = 0$ and $q = 0.25$ and for
$q = 0$ , the three cases where the operator provably does not depend
hierarchy where the label is recoverable only from structure, half the nodes
held out. Accuracy is identical for
noneatstaraton the charge, and moves only when an orientation and a non-zero charge are
both present. Five seeds on one synthetic task: the invariances are exact, the
magnitudes are indicative.
Notes on faithfulness
The paper and the authors' reference implementation
(https://github.com/EmaMule/DirectionalSheafHypergraphs, where the model is
named
SheafGeDi) disagree in five places. We default to the publisheddefinition in each and flag the deviation in the docstring:
add_identity=False. The reference defaults totrue, addingwhich appears in neither Eq. 2 nor Eq. 7. Exposed as a flag.
conjugate.
real part (
x_img = data.x.clone().detach(), withzeros_likecommentedout), which on undirected input makes
unwindemit two identical halves.after the last.
MLP_var1restriction-map predictor is implemented.var2/var3are undocumented; the authors' published best configuration happens to use
var3, but since final accuracy is not what we are reproducing, we preferthe predictor the paper specifies.
Two smaller notes on the orthogonal family, which the reference implements but
the paper never benchmarks:
Orthogonalclass takesforms
parameters have identically zero gradient. We predict only the
that do anything.
test_ortho_builder_has_no_dead_parameterspins thisdown.
external
torch_householderpackage. We use Cayley (and exposematrix_exp), both of which land inOne config choice to flag: stalk dimension$d = 2$ . The paper searches
$d \in {1, \dots, 6}$ (§D.3) and its published best configurations use
$d = 6$ for DSHN and $d = 4$ for DSHNLight. $d = 2$ is the smallest value that$O\left(\sum_e \delta_e^2 d^2\right)$ , which is what the challenge grid
leaves orthogonal and general restriction maps non-trivial, and the operator
costs
has to fit into.
Benchmark
Grid run on
hypergraph/dshn_directed, 72 runs, 37,678 parameters,~1.6 s/train epoch.
results.json2026_tdl_challenge/outputs/2026-07-30_13-32-07/results.jsonReference
Mule, Fiorini, Purificato, Siciliano, Coniglio, Silvestri, "Directional Sheaf
Hypergraph Networks: Unifying Learning on Directed and Undirected
Hypergraphs," ICLR 2026.