Simplicial Complex Convolutional Network Implementation for binary node classification.

class topomodelx.nn.simplicial.sccn.SCCN(channels, max_rank, n_layers=2, update_func='sigmoid')[source]#

Simplicial Complex Convolutional Network Implementation for binary node classification.

Parameters:
channelsint

Dimension of features.

max_rankint

Maximum rank of the cells in the simplicial complex.

n_layersint

Number of message passing layers.

update_funcstr

Activation function used in aggregation layers.

forward(features, incidences, adjacencies)[source]#

Forward computation.

Parameters:
featuresdict[int, torch.Tensor], length=max_rank+1, shape = (n_rank_r_cells, channels)

Input features on the cells of the simplicial complex.

incidencesdict[int, torch.sparse], length=max_rank, shape = (n_rank_r_minus_1_cells, n_rank_r_cells)

Incidence matrices \(B_r\) mapping r-cells to (r-1)-cells.

adjacenciesdict[int, torch.sparse], length=max_rank, shape = (n_rank_r_cells, n_rank_r_cells)

Adjacency matrices \(H_r\) mapping cells to cells via lower and upper cells.

Returns:
Dict of torch.Tensor
rank_0torch.Tensor

Final hidden representations of nodes.

rank_1torch.Tensor

Final hidden representations of edges.

rank_2torch.Tensor

Final hidden representations of triangles.

rank_3torch.Tensor

Final hidden representations of tetrahedra.

… (up to max_rank)