JuliaGraphs / JuliaGraphs/GraphNeuralNetworks.jl
Global pooling of edge features in GlobalAttentionPool
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 308
- Forks
- 74
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 2
Description
In some situations it is nice to make global pooling of the edge features. In the implementation of GlobalAttentionPool
we have
function (l::GlobalAttentionPool)(g::GNNGraph, x::AbstractArray)
α = softmax_nodes(g, l.fgate(x))
feats = α .* l.ffeat(x)
u = reduce_nodes(+, g, feats)
return u
end
As far as I can see we can easily get edge pooling by exchanging softmax_nodes with softmax_edges and reduce_nodes with reduce_edges.
Would it be possible to refactor the GlobalAttentionPool to accommodate this? If so I’ll be happy to contribute, but need a hint in the right direction. 😊
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the GlobalAttentionPool call shown in the issue and read how softmax_nodes, reduce_nodes, and their edge counterparts are implemented and used. Determine how the pool should support both node and edge features, then verify that the existing node behavior and the requested edge pooling both work correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100