Skip to content

Track: Track2; Team name: One Ring to Lift Them All; Model: DiffLift-SMCN - #406

Open
JorgeLuizFranco wants to merge 3 commits into
geometric-intelligence:mainfrom
JorgeLuizFranco:difflift-smcn
Open

Track: Track2; Team name: One Ring to Lift Them All; Model: DiffLift-SMCN#406
JorgeLuizFranco wants to merge 3 commits into
geometric-intelligence:mainfrom
JorgeLuizFranco:difflift-smcn

Conversation

@JorgeLuizFranco

@JorgeLuizFranco JorgeLuizFranco commented Jul 30, 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.
  • My PR follows PEP8 guidelines.
  • 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.

Description

Team: One Ring to Lift Them All — Jorge Luiz Franco.

This PR adds DiffLift (Differentiable Lifting for Topological Neural Networks) and SMCN (Scalable Multi-Cellular Networks) for Track 2 as model=cell/smcn, plus a variant where the 2-cells of the SMCN are selected by a learned lifting (model=cell/smcn_difflift), based on our DiffLift work.

DiffLift overview

DiffLift in one picture: a GNN embeds the nodes, candidate cells are accepted or rejected by small set functions with straight-through gradients, and the accepted cells form the complex the TNN consumes. In this PR it selects the 2-cells for SMCN.

References:

Implementation notes:

  • topobench/nn/backbones/cell/smcn.py follows the model the SMCN authors run on graph benchmarks: CIN blocks, then a bag of (node, edge) pairs — one marked copy of the node set per edge, where the marking is the hop distance from the node to the edge, capped at 10 — updated by a stack of SCL layers (the instantiation the paper points out recreates GNN-SSWL+ on the augmented Hasse graph), sum-pooled back into the node and edge features, and a final reduced CIN block.
  • The bag and all its connectivity are built inside the forward pass from the batched incidence matrices (smcn_utils/structures.py). This way the standard graph2cell cycle lifting is used as-is, with no custom transforms or data classes.
  • The official SMCN repo has no license file, so no code was taken from it. I wrote the implementation from the paper and only ran their code to cross-check my bag construction, index by index, on small fixtures (including the far-distance and disconnected marking buckets).
  • One adaptation: 2-cells come from TopoBench's cycle lifting (nx.cycle_basis, max length 10) rather than the paper's enumeration of all simple cycles up to length 18. The subcomplex machinery only involves nodes and edges, so it is unaffected by this, and it keeps the comparison with the other cell models on the leaderboard under the same lifting.
  • The DiffLift pipeline itself lives in its own package, topobench/nn/liftings/ — the learnable, in-model counterpart of topobench/transforms/liftings, since a learned lifting has parameters and cannot run as a preprocessing transform. It follows our DiffLift preprint, and any backbone — cell or hypergraph — can import it independently of SMCN: DiffLiftEncoder (node embeddings), CellScorer (accept/reject over candidate cells given node-to-cell membership, with straight-through gradients; both the paper's Bernoulli sampling and its deterministic thresholded variant — it is not tied to the cell domain, one of the tests uses it to select hyperedges), EdgeSampler (the D=1 step: kNN candidate edges with per-node neighborhood sizes sampled via Gumbel-softmax, added on top of the observed edges), and DiffLift (the full D_max=2 recipe: learned 1-cells, then cycle-basis candidates of the augmented graph gated as 2-cells, with scaled-sum feature lifting).
  • cell/smcn_difflift (same backbone, learned_lifting: true) plugs the general module into SMCN: the encoder and scorer select among the candidate 2-cells of the standard cycle lifting. I deliberately do not sample edges here: SMCN's markings are hop distances on the observed graph, so learned edges would be invisible to them. The full DiffLift with edge learning is there for models that consume the learned complex directly. Rejected cells contribute exact zeros to every 2-cell-mediated message, and each graph always keeps at least one cell.
  • Cost: the bag updates are O(deg · n0 · n1); building the structures is integer index arithmetic, about the price of one extra message-passing operation.
  • Tests mirror the source layout (test/nn/backbones/cell/test_smcn.py, plus the wrapper test in test/nn/wrappers/cell/test_cell_wrappers.py) and cover the bag layout and markings against hand-computed values, batch-offset equivalence, the distance buckets, both variants forward and backward, graphs with no 2-cells, the scorer rescue path, and the error paths. test/pipeline/test_pipeline.py runs both configs on graph/MUTAG.
  • results.json (the full 72-run grid: 12 GraphUniverse settings × 3 seeds × both tasks, produced with the official evaluation utilities) is at 2026_tdl_challenge/outputs/2026-07-27_05-00-00/results.json, with the generated heatmaps committed alongside:

Community detection heatmap

Triangle counting heatmap

Issue

Submission to the TDL Challenge 2026 (Track 2 — TNNs). Please add the track-2-tnn label.

Related issues and PRs:

  • Track: Track2; Team name: CtrlAltMe; Model: SMCN #397 also submits SMCN, as a combinatorial-domain model built on rank-(0, 2) incident tuples with a binary incidence marking and a GCCN-style backbone. This PR implements, in the cell domain, the configuration the paper evaluates on graph benchmarks, and keeps the two ingredients its expressivity results rest on. (i) The bag contains every (node, edge) pair of the graph, and each copy is marked with the bucketed hop distance from the node to the edge: the distance marking is what takes the model beyond HOMP expressivity — it is how the rank-(0, 1) instantiation recreates GNN-SSWL+ — whereas incidence alone is information the model already receives through the incidence matrices. (ii) The subcomplex layers are combined with CIN blocks, the higher-order message-passing component the paper's construction is built from (Appendix G). The learned 2-cell lifting is added on top of this base.
  • Track: Track2; Team name: TripleA; Model: Cell Isomorphism Network (CIN) #363 implements CIN as its core model. No duplication here: in this PR CIN blocks are only the internal message-passing component of SMCN, as in the SMCN paper, and the core model is SMCN — the subcomplex and marking machinery is what goes beyond HOMP expressivity.
  • 2026 Challenge: run_evaluation.ipynb integrity check fails on clean clone (expected_hash mismatch) #330 (evaluation-notebook integrity check on clean clones, made non-blocking by the maintainers): the results.json here is produced with the official evaluation utilities from 2026_tdl_challenge/utils.py.

@gbg141 gbg141 added the track-2-tnn 2026 Topological Deep Learning Challenge -- Track 2 TNNs label Jul 30, 2026
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