Skip to content

Track: Track1; Team name: LangDiff; Model: GREAD - #420

Open
Mullerio wants to merge 2 commits into
geometric-intelligence:mainfrom
Mullerio:GREAD
Open

Track: Track1; Team name: LangDiff; Model: GREAD#420
Mullerio wants to merge 2 commits into
geometric-intelligence:mainfrom
Mullerio:GREAD

Conversation

@Mullerio

@Mullerio Mullerio commented Aug 2, 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 PR adds a implementation of "GREAD: Graph Neural Reaction-Diffusion Networks" (https://arxiv.org/abs/2211.14208) from Choi et al. at ICML 2023.

GREAD evolves node representations according to a graph reaction-diffusion system, where the diffusion term exchanges information over the graph and the reaction term is used to control the dynamics. The implementation includes:

  • all seven reaction terms from the paper
  • scalar or channel-wise diffusion and reaction coefficients
  • fixed-step Euler and fourth-order Runge-Kutta integration
  • weighted edges, optional graph symmetrization, and PyG batch compatibility
  • sparse propagation without dense node-to-node matrices

The graph structure is prepared once per forward pass and reused by every ODE evaluation. The ODE solvers are implemented without relying on e.g an external library like torchdiffeq

The submitted config is in configs/model/graph/gread.yaml and due to time and compute constraints no hyperparameter tuning was done.

Tests

Tests cover output shape, gradients, weighted edges, wrapper arguments, disjoint batches, both solvers, original and learned adjacency, all reaction terms, coefficient modes, graph symmetrization, and pipeline instantiation.

All pass using

uv run --no-sync ruff check topobench/nn/backbones/graph/gread.py test/nn/backbones/graph/test_gread.py test/pipeline/test_pipeline.py

uv run --no-sync pytest test/nn/backbones/graph/test_gread.py -q

uv run --no-sync pytest test/pipeline/test_pipeline.py -q

Embedding Diagnostics, comparing with other implementaions

To investigate the weaker results of GREAD compared to e.g. my other submissions #400, #335, #399 i ran some quick tests. Due to time constraints the code was implemneted using LLMs, but checked by me.

K-means NMI

Embeddings are clustered into the 20 ground-truth communities without using labels during fitting. Agreement with the labels is measured using

$$\mathrm{NMI}(Y,C) = \frac{2I(Y;C)}{H(Y)+H(C)}.$$

Higher values indicate more easy detectable community clusters.

Nearest-neighbor purity

Using cosine similarity, the ten nearest neighbors $N_{10}(i)$ of each node are evaluated with

$$P_{10} = \frac{1}{n}\sum_i\frac{1}{10}\sum_{j\in N_{10}(i)}\mathbf{1}[y_i=y_j].$$

Cross-graph purity excludes all nodes belonging to the query graph. Here, AdvDIFFormer drops from $0.529$ ordinary purity to $0.388$ cross-graph purity and has the highest same-graph neighbor fraction ($0.401$). This indicates that AdvDIFFormer has less well transfarable embeddings. (also note that again due to constraints i did not tune the AdvDIFFormer run much, only testing two different hyperparameter configs)

Edge cosine gap

For normalized embeddings $z_i$, community-boundary contrast is measured by

$$\Delta_{\mathrm{edge}} = \mathbb{E}[\cos(z_i,z_j) \mid y_i=y_j] - \mathbb{E}[\cos(z_i,z_j) \mid y_i\neq y_j].$$

A large gap shows stronger cahnges between within-community and boundary edges. GREAD has the smallest gap ($0.041$), meaning that both edge types remain similarly oriented after propagation. Possibly explaining the weaker performance.

Conclusion

  • AdvDIFFormer learns useful local structure, but its embedding neighborhoods are strongly graph-specific.
  • GREAD preserves weak contrast between same-community and boundary edges after reaction-diffusion propagation.
  • HiD-Net and MTGCN produce more transferable neighborhoods as homophily rises, which might partly explain why they perform better.

These findings provide a benchmark-specific explanation, i expect both AdvDIFFormer and GREAD to perform better, as in their papers, on other benchmarks that might be better suited.

The frozen-embedding notebook, per-seed CSV files, and generated figures are included under analysis/.

@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

@gbg141 gbg141 added the track-1-gnn 2026 Topological Deep Learning Challenge -- Track 1 GNNs label Aug 3, 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