NSAPH-Projects / topological-equivariant-networks

E(n)-Equivariant Topological Neural Networks
MIT License
19 stars 0 forks source link

add connectivity patterns #16

Closed ekarais closed 7 months ago

ekarais commented 7 months ago

Description

This PR makes it possible to choose from several pre-defined connectivity patterns between ranks when defining the graph neural network. The legacy implementation had the following hard-coded message passing scheme: $$(0 \rightarrow 0), (0 \rightarrow 1), (1 \rightarrow 1), (1 \rightarrow 2)$$ In this notation, $a \rightarrow b$ means that cells of rank $a$ will send messages to cells of rank $b$. Therefore, the legacy implementation made it impossible to consider other connections, e.g. there was no way to make cells of rank 1 send messages to cells of rank 0, or to make 0 send messages to 2 directly.

This PR introduces 7 pre-defined connectivity patterns to choose from. Namely:

When calling the main training script, the desired pattern can be set e.g. via the flag: --connectivity self_and_next.

The theory suggests that there may be little difference between these options. It will be interesting to see if we can empirically validate that claim.