torch_geometric.nn.conv.WLConv
- class WLConv[source]
Bases:
Module
The Weisfeiler Lehman (WL) operator from the “A Reduction of a Graph to a Canonical Form and an Algebra Arising During this Reduction” paper.
WLConv
iteratively refines node colorings according to:\[\mathbf{x}^{\prime}_i = \textrm{hash} \left( \mathbf{x}_i, \{ \mathbf{x}_j \colon j \in \mathcal{N}(i) \} \right)\]- Shapes:
input: node coloring \((|\mathcal{V}|, F_{in})\) (one-hot encodings) or \((|\mathcal{V}|)\) (integer-based), edge indices \((2, |\mathcal{E}|)\)
output: node coloring \((|\mathcal{V}|)\) (integer-based)