Skip to content

Conversation

@mirjagranfors
Copy link
Collaborator

@mirjagranfors mirjagranfors commented Nov 14, 2024

Applications

Created VariationalGraphAutoEncoder. This is very similar to the VariationalAutoEncoder, but with some slight adjustments to work for graphs:

  • The loss is computed as a weighted sum of the reconstruction loss for the node features, reconstruction loss for the edge features, KL-loss, and loss from the MinCut pooling.
  • As the graph layers use mappings, the variables are extracted from x (e.g. mu = x['mu']).

Components/gnn

Changed gcn/normalization:

  • Adjusted the A = torch.cat(…) to work both if A is a sparse tensor and if A is a list of edge indices.

Created mpn/GetEdgeFeatures:

  • This gets the node features of the neighboring nodes for every edge, and it is used in the last part of the GraphDecoder. This might not be necessary, maybe the mpn/transform can be used instead. And maybe another name would be more suitable.

Created pooling/GlobalPool:

  • GlobalGraphPooling: Pools all the nodes of a graph to a single cluster. (Inspired by MinCut-pooling ('Spectral Clustering with Graph Neural Networks for Graph Pooling'), but with the assignment matrix S being deterministic (all nodes are pooled into one cluster)).
  • GlobalGraphUpsampling: Reversing the GlobalGraphPooling by upsampling the node features.

Created pooling/mincut:

Created GraphEncDec:

  • GraphEncoder: A graph encoder consisting of message passing and GraphEncoderBlocks. The mappings save all clustering matrices and edge_indices for the skip-connections of GAUDI. It might need some more tests for checking the input variables.
  • GraphDecoder: A graph decoder, basically the mirrored version of the GraphEncoder. It consists of Graph decoder blocks, and some MLPs and message passing. These last steps are for regaining the node and edge features.
  • GraphEncoderBlock: A block to be used as part of the GraphEncoder. Each block consists of a GCN layer and a graph pooling layer. The pooling layers available now are MinCut pooling and global graph pooling.
  • GraphDecoderBlock: A block to be used as part of the GraphDecoder. Each block consists of a graph upsampling and a GCN layer.

@mirjagranfors mirjagranfors marked this pull request as draft March 7, 2025 12:59
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.

2 participants