Skip to content

Commit 1d99de0

Browse files
committed
Address GIN epsilon review feedback
1 parent 65f5d5c commit 1d99de0

8 files changed

Lines changed: 26 additions & 14 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
1010
and the packages adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1111
Entries link to the pull request that introduced them.
1212

13+
## GNNLux.jl — Unreleased (towards 0.3.0)
14+
15+
**Added**
16+
- `GINConv` now supports a trainable `ϵ` parameter through the `train_eps` keyword ([#697]).
17+
1318
## GNNGraphs.jl — Unreleased (towards 1.6.0)
1419

1520
**Added**
@@ -19,7 +24,7 @@ Entries link to the pull request that introduced them.
1924
- Added an `EnzymeCore` package extension marking `scaled_laplacian` inactive for Enzyme, matching its existing `@non_differentiable` ChainRules declaration. Enzyme previously differentiated the Krylov eigensolve inside it and failed; this unblocks `ChebConv`, `GConvGRUCell` and `GConvLSTMCell` ([#706]).
2025
- Enzyme can now differentiate through the adjacency-matrix → COO graph conversion: a new internal keyword-free helper `_to_coo_graph` avoids the union-typed keyword handling of the `GNNGraph(g; graph_type)` constructor and of `to_coo`, which Enzyme's type analysis cannot compile. Together with upstream fixes in Enzyme ≥ 0.13.197 this removes the `EnzymeInternalError` crash on `:dense`/`:sparse` graphs ([#703]).
2126

22-
## GNNLux.jl — Unreleased (towards 0.2.0)
27+
## GNNLux.jl 0.2.0 — 2026-07-22
2328

2429
**Added**
2530
- Added pooling layers (`GlobalPool`, `GlobalAttentionPool`, `TopKPool`) ([#576]).
@@ -33,12 +38,18 @@ Entries link to the pull request that introduced them.
3338
**Removed**
3439
- Removed the `A3TGCN` layer, mirroring its removal from the Flux frontend ([#696]).
3540

36-
## GNNlib.jl — Unreleased (towards 1.4.1)
41+
## GNNlib.jl — Unreleased (towards 1.5.0)
42+
43+
**Added**
44+
- Extended `gin_conv` to accept a scalar-shaped array for `ϵ`, enabling frontends to expose it as a trainable parameter ([#697]).
3745

3846
**Fixed**
3947
- Fixed `Enzyme.gradient` failing when differentiating `GCNConv`, `SGConv` and `TAGConv` on `:dense`/`:sparse` adjacency graphs: their adjacency-matrix fallbacks now convert via the Enzyme-differentiable `GNNGraphs._to_coo_graph` instead of the keyword `GNNGraph` constructor. Requires GNNGraphs ≥ 1.5.2 and, for Enzyme, Enzyme ≥ 0.13.197 ([#703]).
4048

41-
## GraphNeuralNetworks.jl — Unreleased (towards 1.1.1)
49+
## GraphNeuralNetworks.jl — Unreleased (towards 1.2.0)
50+
51+
**Added**
52+
- `GINConv` now supports a trainable `ϵ` parameter through the `train_eps` keyword ([#697]).
4253

4354
**Changed**
4455
- `GNNRecurrence` now hands each cell an indexed time slice instead of an `eachslice` view, matching the Lux frontend. Enzyme's type analysis fails on `SubArray` cell inputs, so this unblocks `DCGRU`, `EvolveGCNO`, `GConvGRU` and `GConvLSTM` under Enzyme ([#707]).
@@ -234,6 +245,7 @@ Lux implementations of the graph convolutional, pooling, and temporal layers
234245
[#623]: https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/issues/623
235246
[#695]: https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/pull/695
236247
[#696]: https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/pull/696
248+
[#697]: https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/pull/697
237249
[#703]: https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/pull/703
238250
[#704]: https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/pull/704
239251
[#707]: https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/pull/707

‎GNNLux/Project.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "GNNLux"
22
uuid = "e8545f4d-a905-48ac-a8c4-ca114b98986d"
3-
version = "0.2.0"
3+
version = "0.3.0-DEV"
44
authors = ["Carlo Lucibello and contributors"]
55

66
[workspace]
@@ -26,7 +26,7 @@ GNNlib = {path = "../GNNlib"}
2626
[compat]
2727
ConcreteStructs = "0.2.3"
2828
GNNGraphs = "1.4"
29-
GNNlib = "1.4"
29+
GNNlib = "1.5"
3030
Lux = "1"
3131
LuxCore = "1"
3232
MLUtils = "0.4.4"

‎GNNLux/src/layers/conv.jl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,7 @@ y, st = l(g, x, ps, st) # size: out_channel × num_nodes
13411341
end
13421342

13431343
GINConv(nn, ϵ::Real; aggr = +, train_eps::Bool = false) =
1344-
GINConv(nn, train_eps ? [ϵ] : ϵ, aggr, train_eps)
1344+
GINConv(nn, train_eps ? Float32[ϵ] : ϵ, aggr, train_eps)
13451345

13461346
GINConv(nn, ϵ::Real, aggr) = GINConv(nn, ϵ; aggr)
13471347

‎GNNLux/test/layers/conv.jl‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@
9797
ps = LuxCore.initialparameters(rng, l)
9898
@test !hasproperty(ps, :ϵ)
9999

100-
l = GINConv(nn; train_eps = true)
100+
l = GINConv(nn; ϵ = 0.5, train_eps = true)
101101
test_lux_layer(rng, l, g, x, sizey=(out_dims,g.num_nodes), container=true)
102102
ps = LuxCore.initialparameters(rng, l)
103-
@test ps.ϵ == [0.0f0]
103+
@test ps.ϵ == Float32[0.5]
104104

105105
@test GINConv(nn, 0.5).ϵ == 0.5
106106
end

‎GNNlib/Project.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "GNNlib"
22
uuid = "a6a84749-d869-43f8-aacc-be26a1996e48"
33
authors = ["Carlo Lucibello and contributors"]
4-
version = "1.4.1-DEV"
4+
version = "1.5.0-DEV"
55

66
[workspace]
77
projects = ["test", "docs", "../GNNGraphs"]

‎GraphNeuralNetworks/Project.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "GraphNeuralNetworks"
22
uuid = "cffab07f-9bc2-4db1-8861-388f63bf7694"
33
authors = ["Carlo Lucibello and contributors"]
4-
version = "1.1.1-DEV"
4+
version = "1.2.0-DEV"
55

66
[workspace]
77
projects = ["test", "docs"]
@@ -25,7 +25,7 @@ ChainRulesCore = "1"
2525
ConcreteStructs = "0.2.3"
2626
Flux = "0.16.0"
2727
GNNGraphs = "1.4"
28-
GNNlib = "1.4"
28+
GNNlib = "1.5"
2929
LinearAlgebra = "1"
3030
MLUtils = "0.4"
3131
MacroTools = "0.5"

‎GraphNeuralNetworks/src/layers/conv.jl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ Flux.@layer :expand GINConv
638638
Flux.trainable(l::GINConv) = l.train_eps ? (; l.nn, l.ϵ) : (; l.nn)
639639

640640
GINConv(nn, ϵ::Real; aggr = +, train_eps::Bool = false) =
641-
GINConv(nn, train_eps ? [ϵ] : ϵ, aggr, train_eps)
641+
GINConv(nn, train_eps ? Float32[ϵ] : ϵ, aggr, train_eps)
642642

643643
GINConv(nn, ϵ::Real, aggr) = GINConv(nn, ϵ; aggr)
644644

‎GraphNeuralNetworks/test/layers/conv.jl‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,9 @@ end
285285
end
286286
@test keys(Flux.trainable(l)) == (:nn,)
287287

288-
l = GINConv(Dense(D_IN, D_OUT); train_eps = true, aggr = mean)
288+
l = GINConv(Dense(D_IN, D_OUT); ϵ = 0.5, train_eps = true, aggr = mean)
289289
@test keys(Flux.trainable(l)) == (:nn, :ϵ)
290-
@test l.ϵ == [0.0f0]
290+
@test l.ϵ == Float32[0.5]
291291
for g in TEST_GRAPHS
292292
@test size(l(g, g.x)) == (D_OUT, g.num_nodes)
293293
end

0 commit comments

Comments
 (0)