SPD Learn: A Geometric Deep Learning Python Library for Neural Decoding Through Trivialization
Organizations: A&O, LISN, Université Paris-Saclay, CNRS, Inria TAU/NERV, France · Yneuro, France · University of San Diego, EUA · Inria, CEA, Université Paris-Saclay, Palaiseau, France ·
Abstract
Implementations of symmetric positive definite (SPD) matrix-based neural networks for neural decoding remain fragmented across research codebases and Python packages. Existing implementations often employ ad hoc handling of manifold constraints and non-unified training setups, which hinders reproducibility and integration into modern deep-learning workflows. To address this gap, we introduce SPD Learn, a unified and modular Python package for geometric deep learning with SPD matrices. SPD Learn provides core SPD operators and neural-network layers, including numerically stable spectral operators, and enforces Stiefel/SPD constraints via trivialization-based parameterizations. This design enables standard backpropagation and optimization in unconstrained Euclidean spaces while producing manifold-constrained parameters by construction. The package also offers reference implementations of representative SPDNet-based models and interfaces with widely used brain computer interface/neuroimaging toolkits and modern machine-learning libraries (e.g., MOABB, Braindecode, Nilearn, and SKADA), facilitating reproducible benchmarking and practical deployment.
Figures & tables
| Neural Decoding Model | Description |
| Tensor-CSPNet ( Ju and Guan, 2023 ) | Captures discriminative information across temporal, spectral, and spatial domains separately using SPDNet for EEG motor imagery. |
| TSMNet ( Kobler et al., 2022 ) | Introduces a sample covariance matrix pooling layer and a batch norm layer SPDBatchNormMeanVar followed by an SPDNet classifier for EEG motor imagery. |
| Matt ( Pan et al., 2022 ) | Introduces a manifold-valued attention module to SPDNet under Log-Euclidean geometry. |
| Green ( Paillard et al., 2025 ) | Uses learnable wavelet convolutional features from EEGs followed by an SPDNet classifier. |
| EEGSPDNet ( Wilson et al., 2025 ) | Introduces a channel-specific convolutional layer and a sample covariance matrix pooling layer followed by an SPDNet classifier for EEG motor imagery. |
| Phase-SPDNet ( Carrara et al., 2025 ) | Applies a phase-space embedding using time-delayed coordinates followed by an SPDNet classifier for EEG motor imagery. |
Geometric Representation Learning
Geometric representation learning encodes data to preserve its intrinsic shape, distances, symmetries, and relationships.
See all 251 papers