The Biorthogonal Manifold

The biorthogonal manifold is the set of pairs of $N\times{}n$ matrices whose columns are dual to each other:

\[\mathcal{B}(n, N) = \{(\Phi, \Psi)\in\mathbb{R}^{N\times{}n}\times\mathbb{R}^{N\times{}n} : \Psi^T\Phi = \mathbb{I}_n\}.\]

BiorthogonalManifold stores a pair as the $N\times2n$ matrix $[\Phi\ \ \Psi]$. The pairs with $\Phi = \Psi$ are the points of the Stiefel manifold, so $\mathcal{B}(n, N)$ contains $St(n, N)$. The map $(\Phi, \Psi)\mapsto\Phi\Psi^T$ sends $\mathcal{B}(n, N)$ onto the set of projectors of rank $n$ in $\mathbb{R}^{N\times{}N}$, and $St(n, N)$ onto the set of orthogonal ones; its fibers are the orbits $\{(\Phi h, \Psi h^{-T}) : h\in{}GL(n)\}$.

A symplectic lift

For $\Phi, \Psi\in\mathbb{R}^{N\times{}n}$ let

\[A = \begin{bmatrix} \Phi & \mathbb{O} \\ \mathbb{O} & \Psi \end{bmatrix}\in\mathbb{R}^{2N\times2n}, \qquad \mathbb{J}_{2N} = \begin{bmatrix} \mathbb{O} & \mathbb{I}_N \\ -\mathbb{I}_N & \mathbb{O} \end{bmatrix}.\]

Then

\[A^T\mathbb{J}_{2N}A = \begin{bmatrix} \mathbb{O} & \Phi^T\Psi \\ -\Psi^T\Phi & \mathbb{O} \end{bmatrix},\]

so $A$ is a point of the SymplecticStiefelManifold $Sp(2n, 2N)$ exactly when $(\Phi, \Psi)\in\mathcal{B}(n, N)$. Its symplectic inverse is

\[A^+ = \mathbb{J}_{2n}^TA^T\mathbb{J}_{2N} = \begin{bmatrix} \Psi^T & \mathbb{O} \\ \mathbb{O} & \Phi^T \end{bmatrix}, \qquad A^+A = \mathbb{I}_{2n}.\]

So $(\Phi, \Psi)\mapsto\mathrm{diag}(\Phi, \Psi)$ embeds $\mathcal{B}(n, N)$ in $Sp(2n, 2N)$, and its image is the set of the symplectic lifts of $\mathbb{R}^{2n}$ to $\mathbb{R}^{2N}$ that map positions to positions and momenta to momenta. Biorthogonal weights of this kind are used in [7, 8]. For $\Phi = \Psi\in{}St(n, N)$, $A^+ = A^T$, which is the lift of the proper symplectic decomposition.

A homogeneous space of the general linear group

The general linear group $GL(N)$ acts on $\mathbb{R}^{N\times{}n}\times\mathbb{R}^{N\times{}n}$ by

\[g\cdot(\Phi, \Psi) = (g\Phi, g^{-T}\Psi),\]

which keeps $\Psi^T\Phi$ fixed, since $(g^{-T}\Psi)^Tg\Phi = \Psi^Tg^{-1}g\Phi = \Psi^T\Phi$. Under the embedding above this is the action of the block-diagonal subgroup $\{\mathrm{diag}(g, g^{-T}) : g\in{}GL(N)\}$ of the symplectic group $Sp(2N)$.

The action is transitive on $\mathcal{B}(n, N)$. Let $E = \begin{bmatrix} \mathbb{I}_n \\ \mathbb{O} \end{bmatrix}\in\mathbb{R}^{N\times{}n}$ (the StiefelProjection), take a pair $(\Phi, \Psi)$, and let the columns of $K\in\mathbb{R}^{N\times(N-n)}$ be a basis of the kernel of $\Psi^T$. The matrix $G = [\Phi\ \ K]$ is invertible: if $\Phi{}a + Kb = 0$, multiplying by $\Psi^T$ gives $a = 0$, and then $b = 0$ because the columns of $K$ are linearly independent. Since $GE = \Phi$ and

\[G^T\Psi = \begin{bmatrix} \Phi^T\Psi \\ K^T\Psi \end{bmatrix} = \begin{bmatrix} \mathbb{I}_n \\ \mathbb{O} \end{bmatrix} = E,\]

we have $G\cdot(E, E) = (\Phi, \Psi)$.

The stabilizer of $(E, E)$ consists of the $g$ with $gE = E$ and $g^TE = E$: the first $n$ columns and the first $n$ rows of $g$ are those of the identity,

\[g = \begin{bmatrix} \mathbb{I}_n & \mathbb{O} \\ \mathbb{O} & B \end{bmatrix}, \qquad B\in{}GL(N-n).\]

Hence

\[\mathcal{B}(n, N)\cong{}GL(N)/GL(N-n), \qquad \dim\mathcal{B}(n, N) = N^2 - (N-n)^2 = 2Nn - n^2,\]

$2Nn$ entries and $n^2$ conditions $\Psi^T\Phi = \mathbb{I}_n$. This is the counterpart of $St(n, N)\cong{}O(N)/O(N-n)$: the involution $g\mapsto{}g^{-T}$ of $GL(N)$ fixes exactly $O(N)$, and the involution $(\Phi, \Psi)\mapsto(\Psi, \Phi)$ of $\mathcal{B}(n, N)$ fixes exactly the pairs with $\Phi = \Psi$ and $\Phi^T\Phi = \mathbb{I}_n$, i.e. $St(n, N)$. For $n = N$ the manifold is $GL(N)$ itself, as the pairs $(g, g^{-T})$.

$GL(N)$ is not compact, nor, for $n < N$, is the isotropy group $GL(N - n)$ (for $n = N$ it is trivial), and $\mathcal{B}(n, N)$ is not compact either: for a pair $(\Phi, \Psi)$ the curve $t\mapsto(t\Phi, t^{-1}\Psi)$, $t > 0$, lies in $\mathcal{B}(n, N)$ and is unbounded.

The bundle over the first factor

The two factors of a pair are not independent, but $\mathcal{B}(n, N)$ is a bundle over the first one. The projection $(\Phi, \Psi)\mapsto\Phi$ maps onto the matrices of full rank $n$, and its fiber over $\Phi$ is the affine space

\[\{\Phi(\Phi^T\Phi)^{-1} + \Psi_\perp : \Psi_\perp\in\mathbb{R}^{N\times{}n},\ \Psi_\perp^T\Phi = \mathbb{O}\}\]

of dimension $(N-n)n$. A matrix $\Phi$ of full rank is in turn $\Phi = UR$ with $U\in{}St(n, N)$ spanning its columns and $R\in{}GL(n)$, unique up to $(U, R)\mapsto(UQ, Q^TR)$ with $Q\in{}O(n)$. Together,

\[\Phi = UR, \qquad \Psi = UR^{-T} + (\mathbb{I}_N - UU^T)W, \qquad U\in{}St(n, N),\ R\in{}GL(n),\ W\in\mathbb{R}^{N\times{}n},\]

is a parametrization of $\mathcal{B}(n, N)$ by a Stiefel manifold and two vector spaces: $\Psi^T\Phi = R^{-1}U^TUR + W^T(\mathbb{I}_N - UU^T)UR = \mathbb{I}_n$ for every $U$, every invertible $R$ and every $W$, and every pair is reached, since $UR^{-T} = \Phi(\Phi^T\Phi)^{-1}$ and $(\mathbb{I}_N - UU^T)W$ runs through all $\Psi_\perp$. It is redundant in the $O(n)$ above and in the part $UU^TW$ of $W$, which does not enter $\Psi$, and the count checks out: $\dim{}St(n, N) + n^2 + (N-n)n - \dim{}O(n) = 2Nn - n^2$. It lets a StiefelManifold optimizer train $U$ and a Euclidean one $R$ and $W$, at the price of keeping $R$ invertible by hand. The rest of this page optimizes on $\mathcal{B}(n, N)$ directly, which needs neither. rand(::Type{<:BiorthogonalManifold}, ::Integer, ::Integer) draws a point through the fiber.

Tangent spaces and the metric

Differentiating $\Psi^T\Phi = \mathbb{I}_n$ gives the tangent space at $(\Phi, \Psi)$:

\[T_{(\Phi, \Psi)}\mathcal{B}(n, N) = \{(\Delta_\Phi, \Delta_\Psi) : \Psi^T\Delta_\Phi + \Delta_\Psi^T\Phi = \mathbb{O}\}.\]

The manifold carries the metric of $\mathbb{R}^{N\times2n}$, metric(::BiorthogonalManifold, ::AbstractMatrix, ::AbstractMatrix). For $n < N$ no metric is invariant under the action, because the isotropy group $GL(N - n)$ at $(E, E)$ contains $\mathrm{diag}(\mathbb{I}_n, t\mathbb{I}_{N-n})$, which multiplies the tangent vectors $(\Delta_\Phi, \mathbb{O})$ with $E^T\Delta_\Phi = \mathbb{O}$ by $t$; for $n = N$ the manifold is $GL(N)$, and its left-invariant metrics are invariant. The Euclidean one is the simplest, and at the Stiefel manifold it is twice the Euclidean metric of $St(n, N)$. Its normal space at $(\Phi, \Psi)$ is $\{(\Psi M, \Phi M^T) : M\in\mathbb{R}^{n\times{}n}\}$, and rgrad(::BiorthogonalManifold, ::AbstractMatrix) is the orthogonal projection onto the tangent space,

\[\mathrm{grad}\,L = (\nabla_\Phi L - \Psi M,\ \nabla_\Psi L - \Phi M^T), \qquad \Psi^T\Psi M + M\Phi^T\Phi = \Psi^T\nabla_\Phi L + (\nabla_\Psi L)^T\Phi,\]

a Sylvester equation with two symmetric positive definite coefficients, which is solved in their eigenbases.

The global tangent space

The global tangent space is introduced on the page Global Tangent Spaces in the same five steps as for the Stiefel, the Grassmann and the symplectic Stiefel manifold: $\mathfrak{g}^\mathrm{hor}$ is the complement $\left\{\begin{pmatrix} A & C \\ B & \mathbb{O} \end{pmatrix}\right\}$ of the isotropy algebra $\mathfrak{gl}(N-n)$ in $\mathfrak{gl}(N)$, stored as a BiorthogonalLieAlgHorMatrix, and the section stores the frame $\lambda(Y) = [\Phi\ \ K]$ together with the dual frame $\lambda(Y)^{-T} = [\Psi\ \ \tilde{K}]$, $\tilde{K} = (\mathbb{I}_N - \Psi\Phi^T)K$. The retractions below act on these two frames.

Retractions on the Biorthogonal Manifold

A retraction of $X\in\mathfrak{g}^\mathrm{hor}$ is a group element $g$, and a step moves the frame to $\lambda(Y)g$ and the dual frame to $\lambda(Y)^{-T}g^{-T}$. Both retractions the package ships satisfy $R(X)^{-1} = R(-X)$: $\exp(X)^{-1} = \exp(-X)$ and $\mathrm{Cayley}(X)^{-1} = \mathrm{Cayley}(-X)$. So the inverse is the same retraction of $-X$, taken through the factorisation of GeometricOptimizers.lift_factors, which here is

\[\begin{pmatrix} A & C \\ B & \mathbb{O} \end{pmatrix} = \begin{bmatrix} \frac{1}{2}A & \mathbb{I} \\ B & \mathbb{O} \end{bmatrix}\begin{bmatrix} \mathbb{I} & \mathbb{O} \\ \frac{1}{2}A & C \end{bmatrix},\]

the Stiefel factorisation with $C$ in place of $-B^T$, and the cost stays $O(N^2n)$. cayley(::BiorthogonalLieAlgHorMatrix) and geodesic(::BiorthogonalLieAlgHorMatrix) return the pair $[g\ \ g^{-T}]$ as a point of $\mathcal{B}(N, N)\cong{}GL(N)$, as the retraction of a Stiefel lift returns an orthogonal matrix as a point of $St(N, N)$.

Two things differ from the Stiefel case. The curve $t\mapsto\lambda(Y)\exp(tX)\cdot(E, E)$ is the orbit of a one-parameter subgroup, but not a geodesic of the metric, which the group does not preserve. And $\mathrm{Cayley}(X)$ is defined only where $\mathbb{I} - \frac{1}{2}X$ and $\mathbb{I} + \frac{1}{2}X$ are invertible, which for a lift that is not skew-symmetric is not every lift: a step whose lift has an eigenvalue near $\pm2$ makes the retraction arbitrarily ill-conditioned. GeometricOptimizers.retraction_differential needs the first $n$ rows of the differential as well as its first $n$ columns, because the vertical space is the lower right block alone.

The relation to the symplectic Stiefel manifold

Under $X\mapsto\mathrm{diag}(X, -X^T)$, $\mathfrak{gl}(N)$ is a subalgebra of $\mathfrak{sp}(2N)$, and the section $\mathrm{diag}(\lambda(Y), \lambda(Y)^{-T})$ of $\mathrm{diag}(\Phi, \Psi)$ is symplectic. A biorthogonal lift is then a SymplecticLieAlgHorMatrix, as the page Global Tangent Spaces states block by block, and its retractions are the block-diagonal retractions of that lift. A symplectic optimizer started at $\mathrm{diag}(\Phi, \Psi)$ would leave the block-diagonal points, because the gradient of a loss on $Sp(2n, 2N)$ has components outside this subalgebra; optimizing on $\mathcal{B}(n, N)$ keeps the structure and works with matrices of half the size.

The optimizers

GradientMethod, MomentumMethod, Adam, BFGS and DFP take a BiorthogonalManifold and a parameter set with such a leaf, under Optimizer and, for the first three, under TrainingOptimizer and in a CompositeMethod. The line search, BFGS and DFP pair GeometricOptimizers.gradient_rep!, the derivative of the loss with respect to the stored blocks, with a direction, so the slope of a line search is the derivative of its merit.

The gradient GradientMethod, MomentumMethod and Adam hold is global_rep of the Riemannian gradient, and the path of GradientMethod does not depend on the section. The derivative with respect to the stored blocks is that lift times the Gram matrix $M$ of the metric in the stored blocks, and $M$ is not the identity here, not even at a Stiefel point. BFGS and DFP start their inverse Hessian at $M^{-1}$ (GeometricOptimizers._metric_inverse!), so their first step, and their step after a restart, is the one of GradientMethod. The line search caps the step at $c/\rho(X)$ (GeometricOptimizers.step_αmax). A real eigenvalue $\mu\neq0$ of $X$ puts a pole of $\mathrm{Cayley}(\alpha{}X)$ or of its inverse at $\alpha = 2/|\mu|$, and a complex one puts none on the real axis, so for the default $c = 1$ the cap is half the distance to the nearest pole when an eigenvalue of largest modulus is real, and less than half otherwise. A change of the section keeps the eigenvalues of the lift and transforms $M$ with its coordinates, so under a line search the paths of GradientMethod, BFGS and DFP do not depend on the section.

The path of Adam does. Its direction is close to the sign of the gradient it holds, entry by entry, and the coordinates of global_rep are not the ones the derivative of the loss pairs with, so that sign need not be a descent direction. On the test problem of test/integration/biorthogonal_optimizer_tests.jl, 500 steps at $\eta = 10^{-3}$ from one point and 50 draws of the completion $K$ end between 44.9 and 8982, from 1405; 4 of the 50 end above the start.

The section is transported along the path by elements of $GL(N)$, so, unlike a Stiefel section, it does not stay orthogonal, and the coordinates of the lift are only as well conditioned as it is. AdamWithEuclideanDecay refuses the manifold with an ArgumentError: it is not compact, so $\frac{\lambda}{2}\|Y\|_F^2$ is not constant on it, and a horizontal lift cannot subtract $\lambda{}Y$ entrywise.

References

[7]
S. E. Otto, G. R. Macchio and C. W. Rowley. Learning nonlinear projections for reduced-order modeling of dynamical systems using constrained autoencoders. Chaos: An Interdisciplinary Journal of Nonlinear Science 33, 113130 (2023).
[8]
K. Friedl, N. Jaquier, A. Liao and D. Kragic. Learning Hamiltonian Dynamics at Scale: A Differential-Geometric Approach. In: Proceedings of the 43rd International Conference on Machine Learning, Vol. 306 of Proceedings of Machine Learning Research (PMLR, 2026); pp. 31637–31668.
[12]
T. Bendokat and R. Zimmermann. The real symplectic Stiefel and Grassmann manifolds: metrics, geodesics and applications, arXiv preprint arXiv:2108.12447 (2021).