class PANConv(in_channels: int, out_channels: int, filter_size: int, **kwargs)[source]

Bases: MessagePassing

The path integral based convolutional operator from the “Path Integral Based Convolution and Pooling for Graph Neural Networks” paper.

\[\mathbf{X}^{\prime} = \mathbf{M} \mathbf{X} \mathbf{W}\]

where \(\mathbf{M}\) denotes the normalized and learned maximal entropy transition (MET) matrix that includes neighbors up to filter_size hops:

\[\mathbf{M} = \mathbf{Z}^{-1/2} \sum_{n=0}^L e^{-\frac{E(n)}{T}} \mathbf{A}^n \mathbf{Z}^{-1/2}\]
  • in_channels (int) – Size of each input sample, or -1 to derive the size from the first input(s) to the forward method.

  • out_channels (int) – Size of each output sample.

  • filter_size (int) – The filter size \(L\).

  • **kwargs (optional) – Additional arguments of torch_geometric.nn.conv.MessagePassing.

  • input: node features \((|\mathcal{V}|, F_{in})\), edge indices \((2, |\mathcal{E}|)\),

  • output: node features \((|\mathcal{V}|, F_{out})\)

forward(x: Tensor, edge_index: Union[Tensor, SparseTensor]) Tuple[Tensor, SparseTensor][source]

Runs the forward pass of the module.


Resets all learnable parameters of the module.