Skip to content

GAT outputs same embedding for all nodes if defined on complete graph #154

Closed
@velix

Description

@velix

I am trying to train a 3 layer GAT network with multiple heads on a complete graph of 100 nodes. Each node represents a point in space, so the node's features are its coordinates in [0,1]. The output of the network is the same embedding for each of the nodes, a (128, 100) matrix with each column identical to the rest.

A toy example

using GeometricFlux, LightGraphs, Flux

nodes_c = 10
node_features = rand(2, nodes_c)

g = LightGraphs.complete_graph(nodes_c)

model = Chain(GATConv(g, 2=>4), GATConv(g, 4=>8), GATConv(g, 8=>16))

model(node_features)

which outputs the same 16d embedding for each node.

Am I misunderstanding something about GATs here, or does the GATConv implementation not work with complete graphs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions