Skip to content

Track: Track1; Team name: Oversmooth operators; Model: r-ℓMPNN - #404

Open
yeli-falk wants to merge 5 commits into
geometric-intelligence:mainfrom
yeli-falk:track1-loopy
Open

Track: Track1; Team name: Oversmooth operators; Model: r-ℓMPNN#404
yeli-falk wants to merge 5 commits into
geometric-intelligence:mainfrom
yeli-falk:track1-loopy

Conversation

@yeli-falk

@yeli-falk yeli-falk commented Jul 29, 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.

Description

This is the implementation of r-ℓMPNN ("Loopy") from "Weisfeiler and Leman Go Loopy: A New Hierarchy for Graph Representational Learning" by Paolino et al. (NeurIPS 2024). The official implementation can be found here: https://github.com/RPaolino/loopy.

r-ℓMPNN is a GNN framework that can count cycles up to length r+2, giving it expressivity beyond 1-WL while remaining a message-passing model.

What's included

  • Backbonetopobench/nn/backbones/graph/loopy.py (Loopy): the r-ℓMPNN layers (path-wise GIN with hop-distance embeddings) ported to TopoBench's node→node backbone contract.
  • Transformtopobench/transforms/data_manipulations/r_neighbourhood.py (RNeighbourhood): precomputes the r-neighbourhood path tensors per graph.
  • Wrappertopobench/nn/wrappers/graph/loopy_wrapper.py (LoopyWrapper).
  • Configsconfigs/model/graph/loopy.yaml, plus the transform config and a model_defaults entry so the r-neighbourhood precompute auto-attaches (the notebook only needs MODEL_CONFIG = "graph/loopy").
  • Tests — unit tests for all three modules (100% line coverage), with graph/loopy added to test/pipeline/test_pipeline.py.
  • Resultsresults.json from the evaluation notebook.

Additional context

The port is faithful to the official repo but adapted to keep the contribution purely additive (no changes to shared TopoBench infrastructure) and to run on constrained hardware:

  • Batching without dataloader changes — path tensors are stored row-oriented so they survive the default collation, and node indices are shifted from graph-local to batch-global inside the wrapper.
  • Environment-safe cycle enumeration — cycles are found with a bounded DFS rather than networkx.simple_cycles(length_bound=...) (only available in networkx ≥ 3.1), so it runs on the pinned environment.
  • Memory — path processing is gradient-checkpointed in chunks to bound training memory on dense graphs.
  • Deviations from the reference (all behaviour-preserving) — the reverse-direction path expansion is dropped (provably redundant after the layer's order-invariant aggregation); conv3d path propagation is replaced with equivalent tensor shifts; and segment_csr with scatter.

@levtelyatnikov levtelyatnikov added the track-1-gnn 2026 Topological Deep Learning Challenge -- Track 1 GNNs label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

track-1-gnn 2026 Topological Deep Learning Challenge -- Track 1 GNNs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants