Skip to content

feat: Add GatedGraphConv support for HeteroGraphConv - #653

Merged
CarloLucibello merged 5 commits into
JuliaGraphs:masterfrom
i-Amogh:AKS/GatedGraphHetero
Nov 29, 2026
Merged

CarloLucibello merged 5 commits into
JuliaGraphs:masterfrom
i-Amogh:AKS/GatedGraphHetero

Conversation

@i-Amogh

@i-Amogh i-Amogh commented Mar 22, 2026 •

Copy link
Copy Markdown
Contributor

Adds GatedGraphConv support for HeteroGraphConv (part of #311).

  • GatedGraphConv accepts a tuple (xj, xi) of source and target node features, in both GraphNeuralNetworks.jl and GNNLux.jl.
  • When xj and xi are distinct arrays (source and target nodes of different types), the padded source features stay fixed across the num_layers steps while the target states evolve through the GRU. Relations within one node type keep the full gated recursion.
  • Source features wider than out now raise an error, like target features.
  • Tests compare against a hand-written recursion with num_layers > 1, for homogeneous graphs and heterographs.

🧔‍♂️🤖 Assisted by Claude Opus 5.5

Amogh and others added 5 commits November 29, 2026 11:21
The heterograph change built the messages of every step from the initial
padded features, so homogeneous inputs with num_layers > 1 no longer
matched the GGNN recursion. Messages again come from the evolving hidden
state, unless distinct source features are given (e.g. another node
type): those have no hidden state in the relation and stay fixed, padded
to `dims`. Source features are now also checked against `dims`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Check homogeneous and heterograph outputs (num_layers = 3) against a
hand-written loop, including a relation between nodes of the same type,
and exercise tuple input in the Lux layer.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants