Unigcn#

UniGCN class.

class topomodelx.nn.hypergraph.unigcn.UniGCN(in_channels, hidden_channels, n_layers=2, **kwargs)[source]#

Neural network implementation of UniGCN [1] for hypergraph classification.

Parameters:
in_channelsint

Dimension of the input features.

hidden_channelsint

Dimension of the hidden features.

n_layersint, default = 2

Amount of message passing layers.

**kwargsoptional

Additional arguments for the inner layers.

References

[1]

Huang and Yang. UniGNN: a unified framework for graph and hypergraph neural networks. IJCAI 2021. https://arxiv.org/pdf/2105.00956.pdf

forward(x_0, incidence_1)[source]#

Forward computation through layers, then linear layer, then global max pooling.

Parameters:
x_0torch.Tensor, shape = (n_edges, channels_edge)

Edge features.

incidence_1torch.Tensor, shape = (n_nodes, n_edges)

Boundary matrix of rank 1.

Returns:
x_0torch.Tensor

Output node features.

x_1torch.Tensor

Output hyperedge features.