braindecode.modules.ChebyshevGraphConv#

class braindecode.modules.ChebyshevGraphConv(in_features, out_features, cheb_order)[source]#

Apply a Chebyshev spectral convolution to graph signals.

Projects the concatenated responses of Chebyshev polynomials of orders zero through cheb_order - 1 of a graph Laplacian. The bias-free linear projection mixes the input features and polynomial orders at each node. Both DGCNN and GCNsNet use this layer.

Parameters:
  • in_features (int) – Number of input features per node.

  • out_features (int) – Number of output features per node.

  • cheb_order (int) – Number of Chebyshev terms, including the unfiltered input.

Methods

forward(x, laplacian)[source]#

Apply Chebyshev graph convolution.

Computes \([T_0(\mathbf{L})\mathbf{x},\;\ldots,\; T_{K-1}(\mathbf{L})\mathbf{x}]\) and projects the concatenation through a learned weight matrix.

Parameters:
  • x (Tensor, shape (B, N, F_in)) – Input node features, where N is the number of graph nodes (EEG channels) and F_in the input feature dimension.

  • laplacian (Tensor, shape (N, N)) – Graph Laplacian.

Returns:

Filtered node features.

Return type:

Tensor, shape (B, N, F_out)