Skip to content

Use the setup RNG for GNNLux graph attention weights - #741

Merged
CarloLucibello merged 2 commits into
JuliaGraphs:masterfrom
kg290:codex/736-gat-setup-rng
Nov 29, 2026
Merged

CarloLucibello merged 2 commits into
JuliaGraphs:masterfrom
kg290:codex/736-gat-setup-rng

Conversation

@kg290

@kg290 kg290 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Fixes #736

GATConv and GATv2Conv now use the RNG passed to Lux.setup when initializing their attention weights. Previously, different seeds produced identical attention weights.

GATConv also uses init_weight for its node and edge projections. These now default to glorot_uniform, and custom initializers must accept (rng, dims...).

The regression test passed on Julia 1.10.14 and 1.12.7. The full GNNLux CPU suite on 1.12.7 had 190 passes and the same two broken tests as master.

@CarloLucibello

CarloLucibello commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

I pushed 186325a documenting in the GATConv and GATv2Conv docstrings that init_weight now also initializes the projections and is called as init_weight(rng, dims...).

🧔‍♂️🤖 Assisted by Claude Sonnet 5.5

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@CarloLucibello
CarloLucibello merged commit 65059f0 into JuliaGraphs:master Nov 29, 2026
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GNNLux GATConv/GATv2Conv initialize the attention vector a without the setup rng, so it's identical for every seed

2 participants