Building Transformation Layers for Riemannian Neural Networks
Organizations: University of Trento · MPI for Intelligent Systems, Tübingen
Abstract
Recently, deep neural networks on manifold-valued representations have garnered significant attention across various machine learning applications. One recent focus is the generalization of Euclidean fully connected (FC) and convolutional layers to non-Euclidean geometries. However, previous approaches typically focus on a few selected manifolds and rely on specific properties of the target manifold. In contrast, this work proposes a framework for constructing FC and convolutional layers over computationally tractable Riemannian spaces. This framework incorporates several previous FC layers across different geometries as special cases and is instantiated on ten representative manifolds, including three hyperbolic models, five geometries of the symmetric positive definite (SPD) manifold, and two Grassmannian perspectives. Experiments on different manifolds demonstrate the effectiveness and applicability of our approach. Code can be found at https://github.com/GitZH-Chen/RieTrans.
Figures & tables
| Method | Space | Mechanism | References |
| Möbius | Tangent | [ 28 , Def. 3.2] | |
| Einstein | Tangent | [ 51 , Thm. 9] | |
| LFC | Spacetime | [ 14 , Eq. (1)] | |
| NestFC | Nested projection | [ 26 , Eq. (14)] | |
| Poincaré FC | Poincaré | [ 66 , Sec. 3.2] | |
| Ours | Riemannian | Thms. 4.1 and 4.2 |
| SPD FC Layer | Geometries | Requirement | Incorporated by Ours |
| Gyro FC [ 56 ] | AIM, LEM & LCM | Gyrovector | ✓ ( Sec. G.1 ) |
| Flat FC [ 57 ] | LEM & LCM | Flat geometry | ✓ ( Sec. G.2 ) |
| Symmetric FC [ 57 ] | AIM | Invariant metric Symmetric space | N/A |
| Ours | Riemannian spaces | Riemannian | N/A |
| Methods | Perspective | Flexible dimensions | ||
| Subspace | Ambient | Channel | ||
| FRMap + ReOrth [ 36 , Eqs. (2-4)] | ONB | ✗ | ✓ | ✗ |
| PP Scaling [ 54 , Sec. 4.2.2] | PP | ✗ | ✗ | ✗ |
| ONB Scaling [ 55 , Sec. 3.2] | ONB | ✗ | ✗ | ✗ |
| GrTrans [ 55 , Sec. 2.3.2] | ONB + PP | ✗ | ✗ | ✗ |
| GrConv | ONB + PP | ✓ | ✓ | ✓ |
| Method | Mechanism | Space | Disease ( ) | Airport ( ) | Pubmed ( ) | Cora ( ) | ||||||||
| AUC | #Param | MiB | AUC | #Param | MiB | AUC | #Param | MiB | AUC | #Param | MiB | |||
| Möbius [ 28 ] | Tangent | 76.73 ± 4.86 | 464 | 77.20 | 93.26 ± 0.43 | 480 | 123.84 | 94.95 ± 0.06 | 8,288 | 3273.19 | 90.75 ± 0.47 | 23,216 | 176.57 | |
| Einstein [ 51 ] | Tangent | 77.34 ± 2.56 | 464 | 77.32 | 92.72 ± 0.07 | 480 | 125.70 | 94.99 ± 0.13 | 8,288 | 3273.19 | 89.73 ± 0.21 | 23,216 | 176.57 | |
| LorentzTan | Tangent | 76.54 ± 0.83 | 464 | 82.03 | 92.70 ± 0.19 | 480 | 125.46 | 94.99 ± 0.13 | 8,288 | 3653.47 | 89.73 ± 0.21 | 23,216 | 326.61 | |
| LFC [ 14 ] | Spacetime | 78.00 ± 0.60 | 563 | 77.28 | 92.63 ± 0.27 | 580 | 118.01 | 94.22 ± 0.11 | 8,876 | 3653.48 | 91.74 ± 0.12 | 24,737 | 326.62 | |
| NestFC [ 26 ] | Nested projection | 71.30 ± 3.50 | 811 | 78.35 | 83.19 ± 0.90 | 850 | 119.20 | 88.07 ± 0.75 | 258,514 | 3659.20 | 86.08 ± 0.84 | 2,076,931 | 1234.25 | |
| Dataset | Number of horospheres | 50 | 250 | ||||
| Dim | 8 | 16 | 32 | 8 | 16 | 32 | |
| Disease | RResNet [ 38 ] | 76.0 ± 1.7 | 78.0 ± 2.2 | 77.4 ± 2.2 | 71.5 ± 5.1 | 78.1 ± 3.3 | 76.5 ± 2.5 |
| Möbius+RResNet | 74.6 ± 1.9 | 74.6 ± 5.7 | 75.1 ± 2.1 | 74.0 ± 2.7 | 71.0 ± 5.2 | 73.3 ± 3.4 | |
| Poincaré FC+RResNet | 80.4 ± 0.7 | 79.1 ± 1.8 | 79.1 ± 1.6 | 80.6 ± 0.8 | 79.1 ± 0.7 | 80.1 ± 1.4 | |
| HFC-P+RResNet | 81.1 ± 0.6 | 80.0 ± 0.4 | 81.0 ± 0.6 | 80.9 ± 0.6 | 82.3 ± 0.6 | 82.1 ± 0.3 | |
| Airport | RResNet [ 38 ] | 93.4 ± 1.1 | 92.6 ± 1.1 | 93.0 ± 0.2 | 93.0 ± 0.4 | 93.0 ± 1.6 | 89.6 ± 4.7 |
| Methods | Radar | HDM05 | FPHA | NTU60 |
| SPDNet [ 34 ] | 93.25 ± 1.10 | 64.57 ± 0.61 | 85.59 ± 0.72 | 66.36 ± 0.72 |
| SPDNetBN [ 8 ] | 94.85 ± 0.99 | 71.28 ± 0.79 | 89.33 ± 0.49 | 69.38 ± 0.84 |
| RResNet-AIM [ 38 ] | 95.71 ± 0.37 | 64.95 ± 0.82 | 86.63 ± 0.55 | 70.70 ± 3.81 |
| RResNet-LEM [ 38 ] | 95.89 ± 0.86 | 70.12 ± 2.45 | 85.07 ± 0.99 | 74.67 ± 2.89 |
| SPDNetLieBN-AIM [ 16 ] | 95.47 ± 0.90 | 71.83 ± 0.69 | 90.39 ± 0.66 | 73.34 ± 0.40 |
| SPDNetLieBN-LCM [ 16 ] | 94.80 ± 0.71 | 71.78 ± 0.44 | 86.33 ± 0.43 | 72.54 ± 1.09 |
| Geometry | Method | Radar | HDM05 | FPHA | NTU60 |
| AIM | GyroSPD++ | 5.09 | 103.57 | 66.35 | 125.05 |
| SPDNN | 4.84 | 101.80 | 65.42 | 124.41 | |
| LEM | GyroSPD++ | 0.99 | 0.95 | 0.66 | 7.58 |
| SPDNN | 0.86 | 0.74 | 0.63 | 5.79 | |
| LCM | GyroSPD++ | 0.66 | 0.70 | 0.37 | 5.74 |
| SPDNN | 0.65 | 0.59 | 0.35 | 3.72 |
| Method | Subspace dims | Ambient dims | Mean ± Std |
| GrNet [ 36 ] | 4 | 20–>16 | 90.48 ± 0.76 |
| GyroGr-Scaling ∗ [ 55 ] | 4 | 20–>20 | 88.88 ± 1.52 |
| GyroGr ∗ [ 55 ] | 4 | 20–>20 | 90.64 ± 0.57 |
| GrNN-ONB | 4–>4 | 20–>16 | 93.92 ± 0.74 |
| 4–>4 | 20–>20 | 92.83 ± 0.66 | |
| 4–>6 | 20–>16 | 95.23 ± 0.96 |
Appendix figures & tables17 assets
Supplementary material from the paper’s appendix.
Appendix
| Notation | Explanation |
| Riemannian manifold with Riemannian metric | |
| Riemannian manifold with Riemannian metric | |
| Origin of the manifold of interest | |
| Tangent space at | |
| or | Riemannian metric at |
| The norm induced by on |
| Operator | , with | |
| References | [ 28 , 67 , 72 ] | [ 60 , 67 ] |
| Operators | |
| References | [ 73 , 20 ] |
| Operators | LEM | AIM | PEM |
| Invariance | Lie group bi-invariance -invariance | Lie group left-invariance -invariance | -invariance |
| References | [ 2 , 70 ] | [ 59 , 68 ] | [ 24 , 70 , 17 ] |
| Operators | LCM | BWM |
| Invariance | Lie group bi-invariance | -invariance |
| References | [ 46 ] | [ 6 , 70 ] |
| Operators | ||
| \left(\left(\begin{array}[]{cc}PR&O\end{array}\right)\left(\begin{array}[]{c}-\sin(\Sigma)\\ \cos(\Sigma)\end{array}\right)O^{T}+\left(I-OO^{T}\right)\right)V | ||
| \left(\begin{array}[]{cc}PR&O\end{array}\right)\left(\begin{array}[]{c}\cos(\Sigma)\\ \sin(\Sigma)\end{array}\right)R^{\top} | ||
| References | [ 25 , 5 ] | [ 3 , 5 ] |
| Method | Model | Mechanism | Formulation | Parameters | References |
| Möbius | Tangent | [ 28 , Def. 3.2] | |||
| Klein | Tangent | [ 51 , Thm. 9] | |||
| LFC | Spacetime | \displaystyle\left[\begin{array}[]{c}\frac{\sqrt{\|Wx\|^{2}-1/K}}{v^{\top}x}v^{\top}\\ W\end{array}\right]x | [ 14 , Sec 3.1] | ||
| NestFC | Nested projection | [ 26 , Eq. (14) and Sec. 3.3] | |||
| Poincaré FC | Poincaré | is defined by Shimizu et al. [66, Eq. (6)] | [ 66 , Sec. 3.2] | ||
| Ours | Riemannian | Thms. 4.1 and 4.2 | Thms. 4.1 and 4.2 |
| Method | Space | Complexity | Parameter dimension |
| Möbius [ 28 ] | |||
| Einstein [ 51 ] | |||
| LorentzTan | |||
| LFC [ 14 ] | |||
| NestFC [ 26 ] | |||
| Poincaré FC [ 66 ] |
| Step | Hyperparameter | Candidates |
| 1 | Feature normalization ( normalize_feats ) | |
| 2 | Activation | None, ReLU, LeakyReLU, ELU, Tanh |
| 3 | Learning rate | |
| 4 | Gyro bias | for HFC-H only. NestFC skips this step |
| 5 | Gradient clipping | None, |
| 6 | Attention and local aggregation | for ( use_att , local_agg ) |
| Method | Disease | Airport | Pubmed | Cora |
| NHGCN-NestFC | 78.28 ± 0.73 | 94.49 ± 0.04 | 94.70 ± 0.21 | 93.11 ± 0.40 |
| NHGCN-HFC-H | 97.37 ± 0.22 | 96.14 ± 0.27 | 96.18 ± 0.06 | 92.85 ± 0.24 |
| Method | Disease | Airport | Pubmed | Cora | ||||||||
| #Param | MiB | FitTime | #Param | MiB | FitTime | #Param | MiB | FitTime | #Param | MiB | FitTime | |
| NHGCN-NestFC | 738 | 81.10 | 27.039 | 776 | 120.29 | 43.292 | 257,952 | 3496.40 | 105.094 | 2,075,436 | 1266.51 | 94.458 |
| NHGCN-HFC-H | 450 | 92.88 | 19.854 | 465 | 134.34 | 44.638 | 7,785 | 3444.32 | 91.064 | 21,780 | 253.68 | 24.007 |
| Dataset | Model | Optimizer | Learning Rate | |
| Radar | SPDNN-LEM | N/A | AMSGrad | |
| SPDNN-AIM | 0.25 | AMSGrad | ||
| SPDNN-PEM | N/A | AMSGrad | ||
| SPDNN-LCM | 0.25 | AMSGrad | ||
| SPDNN-BWM | N/A | AMSGrad | ||
| HDM05 | SPDNN-LEM | N/A | SGD |
| Method | FPHA | ||
| Source | Ours | Gap | |
| SPDNet (official code) | |||
| SPDNetBN (official code) | |||
| GyroLE | |||
| GyroLC | |||
| GyroAI | |||
| Method | Geometry | Radar | HDM05 | FPHA | NTU60 |
| SPDNet | N/A | 0.66 | 0.50 | 0.28 | 3.08 |
| SPDNetBN | AIM | 1.25 | 0.94 | 0.58 | 6.14 |
| SPDResNet-AIM | AIM | 0.96 | 1.23 | 0.69 | 6.84 |
| SPDResNet-LEM | LEM | 0.77 | 0.55 | 0.30 | 3.17 |
| SPDNetLieBN-AIM | AIM | 1.21 | 1.15 | 0.97 | 8.85 |
| SPDNetLieBN-LCM | LCM | 1.10 | 1.11 | 0.59 | 5.96 |
| Input shape | #Conv | Kernels | Kernel sizes | Strides | Shape changes | Final SPD features |
| 3 | ||||||
| 3 | ||||||
| 2 |
| Method | ||||||
| Accuracy | FitTime | Accuracy | FitTime | Accuracy | FitTime | |
| ManifoldNet | 77.89 ± 1.56 | 13.12 | 73.27 ± 0.68 | 11.58 | 80.75 ± 1.23 | 11.50 |
| MVC-Net | 81.04 ± 1.72 | 7.88 | 78.05 ± 0.23 | 8.18 | 81.15 ± 0.34 | 7.87 |
| SPDConvNet-LEM | 97.68 ± 0.32 | 1.58 | 95.86 ± 0.95 | 1.55 | 96.91 ± 0.18 | |
| SPDConvNet-LCM | 96.51 ± 0.66 | 94.40 ± 0.50 | 97.20 ± 0.65 | 1.25 | ||
| SPDConvNet-PEM | 97.44 ± 0.56 | 1.82 | 94.45 ± 0.78 | 1.53 | 96.16 ± 0.91 | 2.34 |
| Learning rate | ||||||||
| Accuracy (%) | 55.20 ± 2.58 | 59.73 ± 1.31 | 63.52 ± 1.44 | 69.55 ± 2.46 | 73.28 ± 1.42 | 76.08 ± 1.08 | 77.89 ± 1.56 | 77.12 ± 1.30 |