4. Optimal Transport

4.1. Formalism

(4.1)\[\begin{split}\mathbf{C}_{i, j}(\mathbf{X}, \mathbf{Y}) = ||\mathbf{X}_i - \mathbf{Y}_j|| \\\end{split}\]

To allow for a more efficient estimation, we slightly relax this constraint with an additional entropic smoothing term. We can then find \(\mathbf{R}\), the regularized Optimal Transport plan by finding a minimum through the Sinkhorn algorithm.

(4.2)\[\begin{split} \min_{\substack{\mathbf{R} \in \mathbb{R_+}^{p\times p}; \\ \mathbf{R} \mathbf{1} = 1/p, \mathbf{1} \mathbf{R}^\top = 1/p}}\mathrm{Tr}({\mathbf{R}\cdot\mathbf{C})} - \epsilon \mathbf{H}(\mathbf{R})\end{split}\]

where \(\epsilon > 0\), and the discrete entropy of the transformation \(\mathbf{H}(\mathbf{R})\) is defined as:

(4.3)\[\mathbf{H}(\mathbf{R}) \overset{\mathrm{def.}}{=} - \sum_{i,j} \mathbf{R}_{i,j}(\log(\mathbf{R}_{i, j}) - 1)\]

This method differs from Procrustes analysis in that it yields a sparser mapping between source and target voxels with high functional similarity, making it less sensitive to noisy voxels on both ends. The level of sparsity is controlled by the user-supplied hyper-parameter \(\epsilon\).

4.2. Implementation

Efficient implementations in Python are available through the POT and OTT packages.

import POT
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
/tmp/ipykernel_1863/2921906687.py in <module>
----> 1 import POT

ModuleNotFoundError: No module named 'POT'