Skip to content

Track: Track2; Team name: Oversmooth operators; Model: DPHGNN - #398

Open
AlGoRythm3000 wants to merge 14 commits into
geometric-intelligence:mainfrom
yeli-falk:dphgnn_gf
Open

Track: Track2; Team name: Oversmooth operators; Model: DPHGNN#398
AlGoRythm3000 wants to merge 14 commits into
geometric-intelligence:mainfrom
yeli-falk:dphgnn_gf

Conversation

@AlGoRythm3000

@AlGoRythm3000 AlGoRythm3000 commented Jul 24, 2026

Copy link
Copy Markdown

Checklist

  • My pull request has a clear and explanatory title.
  • My pull request passes the Linting test.
  • I added appropriate unit tests and I made sure the code passes all unit tests. (refer to comment below)
  • My PR follows PEP8 guidelines. (refer to comment below)
  • My code is properly documented, using numpy docs conventions, and I made sure the documentation renders properly.
  • I linked to issues and PRs that are relevant to this PR.

Model

This PR implements DPHGNN as a Track 2 (TNN) backbone for the TDL Challenge 2026.

Siddhant Saxena, Shounak Ghatak, Raghu Kolla, Debashis Mukherjee, Tanmoy Chakraborty.
DPHGNN: A Dual Perspective Hypergraph Neural Networks. KDD'24.
Paper: https://arxiv.org/abs/2405.16616

DPHGNN combines three hypergraph "views" of the same node set — clique expansion, star expansion, and a HyperGCN expansion — through topology-aware attention (spatial, over raw features, and spectral, over Laplacian-smoothed features), a spectral inductive bias block that concatenates random-walk / symmetric / HGNN Laplacian terms (summing them cancels the symmetric term — see decision D-7), a gated feature mixture module, and a dynamic feature fusion step whose residual connection is the paper's claimed anti-oversmoothing mechanism, followed by one UniGCN-style output layer.

A reference implementation exists (https://github.com/mr-siddy/DPHGNN) but it is a non-executable research draft — undefined variables, hardcoded tensor shapes, globally-instantiated layers, a dependency (dhg) outside TopoBench's stack — so it was used only to infer intent, never as a spec. Every deviation from it (and every ambiguity in the paper) is documented below and cross-referenced to equations in the backbone's docstrings.

What is included

Component Path
Backbone (expansions, TAA, SIB, feature mixture, DFF, output layer) topobench/nn/backbones/hypergraph/dphgnn.py
Wrapper standard topobench.nn.wrappers.HypergraphWrapper (no custom wrapper needed)
Config configs/model/hypergraph/dphgnn.yaml
Unit tests (29 tests) test/nn/backbones/hypergraph/test_dphgnn.py
Pipeline test test/pipeline/test_pipeline.py (added hypergraph/dphgnn)
Evaluation results (official notebook output) 2026_tdl_challenge/outputs/2026-07-29_21-29-46/results.json
Extra analysis (see below) 2026_tdl_challenge/extra_analysis_oversmooth_operators/lifting_confounding_study/

Implementation notes (deviations from the reference code / paper ambiguities)

  • Label leakage removed. The reference code concatenates a noised one-hot of the test labels (random_noise(labels)) into the attention features — with no basis in the paper, and commented # errr by the original authors. This is a data leak. It is not reproduced: DPHGNN.forward(x_0, incidence_hyperedges) never receives y.
  • Attention neighborhood (D-3). Eq. (5.2)/(5.3) sum over an unspecified neighborhood $N(i)$. The reference code uses dense nn.MultiheadAttention over all $n$ nodes ($O(n^2)$, intractable on their own 66,790-node dataset — not a usable guide). We define $N(i)$ as the clique-expansion neighborhood plus self-loop, and implement the additive GAT-style attention sparsely via scatter_softmax over the edges of $G_c$ (never a dense $n \times n$ matrix).
  • Gate nonlinearity in Eq. (2) (D-5). The paper stacks $\sigma(\text{ReLU}(\cdot))$. Read literally with $\sigma$=ReLU this is idempotent and degenerate. We read $\sigma$=sigmoid, giving a multiplicative gate in $[0,1]$ consistent with the surrounding Hadamard product.
  • Supernode features in the DFF (D-6). Eq. (3)'s $A_* X_{G_*}$ term is ambiguous between the initial supernode features and the star-convolution output. We use the output of the star convolution (Fig. 1's arrow provenance and the §3.3 text both point there).
  • Everything (the three expansions, their degrees, and their Laplacians) is recomputed from incidence_hyperedges inside the forward pass, never precomputed — this makes a block-diagonal batch of several disjoint hypergraphs produce exactly the concatenation of the per-hypergraph outputs "for free", which is asserted directly by a dedicated test.
  • Model config used for evaluation: hidden_channels=64, n_gnn_layers=2, taa_heads=4, n_dff_layers=1 (+ 1 output layer = 2 message-passing layers total, the paper's "2-DPHGNN Layers"), dropout=0.5, sib_lambda=0.5 — ~55.6K trainable parameters.
  • configs/dataset/graph/graphuniverse_inductive.yaml: bumped dataloader_params (batch_size 16→64, num_workers 0→2, persistent_workers: true) to make the 72-run grid tractable on a single Kaggle GPU session; no change to the dataset itself.

Evaluation

2026_tdl_challenge/run_evaluation.ipynb was run with MODEL_CONFIG = "hypergraph/dphgnn" on Kaggle (72 runs: 12 GraphUniverse grid cells × 3 seeds × 2 tasks, full OOD evaluation). The generated results.json is committed at 2026_tdl_challenge/outputs/2026-07-29_21-29-46/.

Highlights (in-distribution test, mean over 3 seeds, aggregated by homophily level):

  • Community detection (accuracy): 0.30 under low homophily → 0.43 mid → 0.67 high homophily (grid mean 0.46).
  • Triangle counting (MSE / total triangles, lower is better): 0.05 low homophily → 0.19 mid → 0.96 high homophily (grid mean 0.40).

Tests

test/nn/backbones/hypergraph/test_dphgnn.py: 29 tests, all passing, covering the invariants called out in the implementation notes above:

  • output shapes and the (x_0, x_1) contract expected by HypergraphWrapper;
  • permutation equivariance (paper's Proposition 4.1);
  • block-diagonal batching — two disjoint hypergraphs assembled into one incidence matrix give exactly the concatenation of the individual outputs (this is the test that validates deriving everything from the incidence matrix rather than precomputing structures);
  • degenerate cases: isolated nodes, empty/singleton hyperedges;
  • gradient flow through every parameter (the reference repo's main bug is a silently disconnected submodule);
  • determinism in eval();
  • derived structures ($A_c$, $A_*$, degrees) checked against hand-computed values on a toy incidence matrix;
  • each config option (supernode_init, with_mediators, taa_neighborhood).

test/pipeline/test_pipeline.py was extended with hypergraph/dphgnn for an end-to-end training smoke test.

Result figures

In-distribution test performance across the 12 GraphUniverse grid cells (mean over 3 seeds), plus OOD (train-homophily-conditioned) deltas:

  • 2026_tdl_challenge/outputs/2026-07-29_21-29-46/heatmap_community_detection_accuracy.png
  • 2026_tdl_challenge/outputs/2026-07-29_21-29-46/heatmap_triangle_mse_over_triangles.png
  • 2026_tdl_challenge/outputs/2026-07-29_21-29-46/OOD/ (per-homophily-level OOD delta plots for both tasks)

Extra analysis: does the graph→hypergraph lifting choice confound the structural-regime signal?

2026_tdl_challenge/extra_analysis_oversmooth_operators/lifting_confounding_study/ — a follow-up study on top of the required evaluation, motivated by oversmoothing/expressivity concerns on lifted graphs. We run DPHGNN under three lifting arms (khop1, khop2, a feature-based knn3) plus a GCN reference, across the same 4-cell homophily × power-law regime grid, 3 seeds each (48 runs), and disentangle lifting choice from structural regime with a two-way ANOVA.

  • cell (structural regime) explains 48.7% of total variance in test accuracy, arm (lifting choice) 26.1%, their interaction 25.2%, residual ≈0.03% (seed noise is negligible).
  • khop2 ranks Config class #1 in all 4 cells (mean rank 1.00); knn3 — the feature-based lifting — collapses under high homophily (rank 4/4) because GraphUniverse node features are near-uninformative by design (inter-class σ≈0.2 vs intra-class σ≈0.63), and, unlike homophily/degree/power-law, that noise level is not varied per grid cell. This is a finding, not a bug: it is not "fixed" by tuning k.

Figures: figures/fig1_lifting_by_regime.png (slope chart across regimes) and figures/fig2_rank_table.png (4×4 rank table with mean-rank summary). Full writeup, ANOVA table, and bootstrap CIs in the folder's README.md.

@gbg141 gbg141 added the track-2-tnn 2026 Topological Deep Learning Challenge -- Track 2 TNNs label Jul 26, 2026
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@AlGoRythm3000
AlGoRythm3000 force-pushed the dphgnn_gf branch 2 times, most recently from 7f8a48e to 9e90b17 Compare July 31, 2026 00:15
@AlGoRythm3000
AlGoRythm3000 marked this pull request as ready for review July 31, 2026 16:07
…iments

Renames lifting_confounding_study/model_ablation/feature_signal to
exp1_/exp2_/exp3_-prefixed names, removes the stale E2_ablation/
E3_feature_signal leftovers, and brings in the real Phase-1+2 results
for the model-ablation and feature-signal studies. Kaggle runner
notebooks are intentionally excluded from this branch (kept on
e2_e3_experiments only).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

track-2-tnn 2026 Topological Deep Learning Challenge -- Track 2 TNNs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants