pyg-team / pytorch_geometric

Graph Neural Network Library for PyTorch
https://pyg.org
MIT License
21.32k stars 3.66k forks source link

Message passing with more than two nodes #1710

Closed vxfung closed 2 years ago

vxfung commented 4 years ago

Hi, I'm still a beginner with gnn's. I've been looking to implement a layer where three nodes are considered, i.e. a concatenation of x_i, x_j, x_k (or x_l, x_m, ...etc if needed) is done. Is there a straightforward way to do this with the existing message passing class? If not, what would be the recommended way to do this?

rusty1s commented 4 years ago

Are you referring to hypergraphs? This is currently not really covered by the MessagePassing interface, so you may need to write logic for that by yourself.