Track: Track1; Team name: Lettlini; Model: GAUGE (Riemannian Graph Foundation Model)#396
Draft
lettlini wants to merge 26 commits into
Draft
Track: Track1; Team name: Lettlini; Model: GAUGE (Riemannian Graph Foundation Model)#396lettlini wants to merge 26 commits into
lettlini wants to merge 26 commits into
Conversation
added 26 commits
July 17, 2026 16:05
|
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.
Summary
This submission implements GAUGE, the gauge-equivariant graph backbone from "Are Common Substructures Transferable: Riemannian Graph Foundation Model with Neural Vector Bundles" (reference implementation: RiemannGraph/GAUGE). Each node is assigned a local orthonormal frame (a gauge) spanning an r-dimensional subspace of the d-dimensional embedding space. These frames are smoothed across the graph and then used to update the node features. The backbone is integrated into TopoBench with a dedicated wrapper and a Hydra config.
Method
The backbone follows the paper's equations directly and is organized into three message-passing components, stacked over
n_layers:LocalCoordinatesLayer(eqs. 2-4): projects node embeddings into r subspaces, aggregates a neighborhood-smoothed reconstruction under per-subspace attention, and applies a QR decomposition to obtain a per-node orthonormal frame.GatedFlatteningLayer(eqs. 5-8): aligns each node's frame with its neighbors' via a trace-based gating weight, blends with coefficient gamma, and re-orthonormalizes with a second QR. Appliedn_gatedtimes per layer.NodeUpdateLayer(eqs. 9-10): projects each embedding onto its frame (Q^T Q z), maps it through a bias-free linear, and aggregates over the neighborhood.Files
GaugeModel)topobench/nn/backbones/graph/gauge.pytopobench/nn/wrappers/graph/gauge_wrapper.pyconfigs/model/graph/gauge.yamltest/nn/backbones/graph/test_gauge.pytest/pipeline/test_pipeline.pyDivergences from the reference implementation
The core mathematics (attention normalization, gated energy flattening, frame projection, QR steps) matches RiemannGraph/GAUGE. Three deliberate divergences:
Linear(2d -> r)followed by LeakyReLU on the raw embeddings. Here the scorer is a per-subspace MLP applied to the projected multi-path embeddings, with the activation applied to the final score before the softmax (matching the reference's placement). Its activation and dropout are independently configurable (f_sim_act,f_sim_dropout).phi_hidden_layers; setting it tonullrecovers the reference behavior exactly. The submitted config enables it.activation_dict, and dropout is split into two knobs (feed-forward blocks vs. scorer), where the reference uses fixed activations and a single dropout value.The wrapper's residual connection is disabled (it is not part of the paper), which decouples the backbone embedding width
d_embeddfrom the feature-encoder width.Configuration defaults
Defaults follow the reference:
n_layers=2,n_gated=2,d_embedd=512,r=16,gamma=0.01,tau=1.0, GELU feed-forward / LeakyReLU scorer activations, and dropout0.1.Checklist
Notice
The code in
gauge.pywas, to the largest extent, written by hand. The unit tests as well as the docstrings were generated with Claude Code and verified. Inspiration was taken from the reference implementation at https://github.com/RiemannGraph/GAUGE/.