eegproc.deep_learning.unsupervised.GNN.GraphConvMTL module

Fixed-adjacency graph convolution, as used by MTLFuseNet.

This layer implements the renormalized first-order spectral GCN of MTLFuseNet (Li et al., 2023), Eq. (15):

A_tilde = A + I
A_hat   = D_tilde^{-1/2} A_tilde D_tilde^{-1/2}
H       = activation(A_hat X W + b)

Unlike EEGProc’s standard GraphConv, the adjacency is fixed and supplied from outside the neural network (e.g. a mutual-information channel graph). It is not learned by backpropagation and it is not row-softmax normalized.

class eegproc.deep_learning.unsupervised.GNN.GraphConvMTL.GraphConvMTL(units, n_nodes, adjacency, activation='relu', use_bias=True, add_self_loops=True, symmetrize=True, epsilon=1e-08, **kwargs)[source]

Bases: Layer

Fixed-adjacency graph convolution (MTLFuseNet Eq. 15).

Parameters:
  • units (int) – Output feature dimensionality per EEG channel/node.

  • n_nodes (int) – Number of EEG channels/nodes.

  • adjacency (array-like, shape (n_nodes, n_nodes)) – Fixed, non-negative channel adjacency, typically mutual information between channels. Compute it from training data only.

  • activation (str | None, default: 'relu') – Activation after graph aggregation and feature projection.

  • use_bias (bool, default: True) – Whether to add the learned feature bias b.

  • add_self_loops (bool, default: True) – Implements A_tilde = A + I from MTLFuseNet Eq. (15).

  • symmetrize (bool, default: True) – Mutual information is symmetric. This option averages A and A^T to remove small estimator asymmetries before normalization.

  • epsilon (float, default: 1e-08) – Numerical floor used when computing D^{-1/2}.

build(input_shape)[source]
call(X, training=False)[source]
get_config()[source]

Returns the config of the object.

An object config is a Python dictionary (serializable) containing the information needed to re-instantiate it.

Return type:

dict[str, Any]

normalized_adjacency(dtype=None)[source]

Return D_tilde^-1/2 A_tilde D_tilde^-1/2.

Return type:

Tensor

raw_adjacency(dtype=None)[source]

Return the fixed MI adjacency A.

Return type:

Tensor