Hyoungseo Son
Lie Groups & Manifolds
Contents · Lie Groups & Manifolds

Part 1 · Lie Algebra & Adjoint

Part 2 · Manifold Optimization

  • Optimization on Manifolds

Part 2 · Manifold Optimization

Optimization on Manifolds

Pose estimation, hand-eye calibration, and pose-graph SLAM all reduce to the same problem: fit a rotation or a rigid transform to noisy measurements. The unknowns live in SO(3)SO(3) or SE(3)SE(3), which are curved manifolds, not vector spaces. A plain gradient step xxαfx \leftarrow x - \alpha\,\nabla f adds a vector to a point on a curved set and lands off the set. Riemannian optimization fixes this with three moves: take the tangential part of the gradient, step, and retract back onto the manifold.

Why a plain step leaves the manifold

Take the smallest curved example, the unit circle S1={xR2:x=1}S^1 = \{x \in \mathbb{R}^2 : \lVert x\rVert = 1\}, a stand-in for SO(2)SO(2). Suppose we want to align xx with a fixed unit target tt by minimizing

f(x)=xt,f(x)=t.f(x) = -\,x^{\top} t, \qquad \nabla f(x) = -\,t .

The Euclidean update xαf=x+αtx - \alpha\,\nabla f = x + \alpha t is a point whose norm is generally not 11, so it is no longer a rotation. You could renormalize after every step, but the raw gradient still points partly off the manifold, and that radial component is wasted work that the projection just throws away.

Project, step, retract

At a point xx the manifold has a tangent space TxMT_x\mathcal{M}, the flat space of allowed instantaneous motions. On the circle it is the line orthogonal to xx. The Riemannian gradient is the tangential part of the Euclidean one, obtained with the orthogonal projector PxP_x:

gradf(x)=Pxf(x),Px=Ixx(x=1).\operatorname{grad} f(x) = P_x\,\nabla f(x), \qquad P_x = I - x x^{\top} \quad (\lVert x\rVert = 1).

We step in the tangent space and then retract back onto M\mathcal{M}. On the circle the retraction is renormalization; on a Lie group such as SO(3)SO(3) it is the exponential map applied on the group,1

xk+1=Rxk ⁣(αgradf(xk)),RR(ξ)=Rexp ⁣([ξ]×).x_{k+1} = \mathcal{R}_{x_k}\!\big(-\alpha\,\operatorname{grad} f(x_k)\big), \qquad \mathcal{R}_R(\xi) = R\,\exp\!\big([\xi]_\times\big).

The exponential map is exactly the same object that advances orientation in a physics engine: integrate the update in the flat Lie algebra, then map back onto the group so the constraint is never violated.2

A worked step on the circle

Start at x0=(1,0)x_0 = (1,0) with target t=(0,1)t = (0,1) and step size α=0.5\alpha = 0.5. The Euclidean gradient and its tangential projection are

f=t=[01],Px0=Ix0x0=[0001],gradf=Px0f=[01].\nabla f = -t = \begin{bmatrix} 0 \\ -1 \end{bmatrix}, \qquad P_{x_0} = I - x_0 x_0^{\top} = \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}, \qquad \operatorname{grad} f = P_{x_0}\nabla f = \begin{bmatrix} 0 \\ -1 \end{bmatrix}.

Here x0x_0 is horizontal, so the gradient is already tangent and projection leaves it unchanged. The descent direction is gradf=(0,1)-\operatorname{grad} f = (0,1), which points straight at tt. Stepping and then retracting:

x~=x0αgradf=[10.5],x~=1.25=1.1180,x1=x~x~=[0.89440.4472].\tilde x = x_0 - \alpha\,\operatorname{grad} f = \begin{bmatrix} 1 \\ 0.5 \end{bmatrix}, \quad \lVert \tilde x\rVert = \sqrt{1.25} = 1.1180, \quad x_1 = \frac{\tilde x}{\lVert \tilde x\rVert} = \begin{bmatrix} 0.8944 \\ 0.4472 \end{bmatrix}.

That is x1x_1 at 26.5726.57^{\circ}, and the objective drops from f(x0)=0f(x_0) = 0 to f(x1)=0.4472f(x_1) = -0.4472: xx moved along the circle toward tt (at 9090^{\circ}). Iterating converges to x=tx = t. The naive Euclidean step lands at the same x~=(1,0.5)\tilde x = (1, 0.5) here but keeps it, sitting at norm 1.11801.1180, an off-manifold error of 0.11800.1180 until something projects it back. Away from this special point the two also disagree in direction: the radial part of f\nabla f survives in the naive step and is discarded by the retraction, so the naive update is a strictly worse use of the same α\alpha.

Descent on S¹ · project, step, retractinteractive
tx
f(x) = -x·t-0.000
Riemann ‖x‖-10.000
naive ‖·‖-10.118
Riemannian step
naive Euclidean
target t (drag)

Pre-retract off-manifold error of the tangential step is 0.118; the retraction sends it back to 0.

Blue x is the current iterate on the circle; drag anywhere to move the amber target t. The green arrow is the tangential (Riemannian) step, whose short dashed tail shows the retraction snapping it back onto the circle; the green trail is the iterate sliding along the manifold toward t. The red arrow is the naive Euclidean step x - α∇f, which overshoots off the circle (its ‖·‖-1 readout is nonzero) and must be projected back along the dashed radial line. Press Play to run Riemannian iterations.

Gauss-Newton on the manifold

Real estimation problems are least squares over many measurements, minx 12iri(x)2\min_{x}\ \tfrac12\sum_i \lVert r_i(x)\rVert^2, and the workhorse is Gauss-Newton done in the tangent space. Using the right-plus of micro Lie theory,1 parametrize the update as a tangent increment δRn\delta \in \mathbb{R}^n around the current estimate,

xδ=xexp ⁣([δ]×),Ji=ri(xδ)δδ=0.x \boxplus \delta = x \circ \exp\!\big([\delta]_\times\big), \qquad J_i = \left.\frac{\partial\, r_i(x \boxplus \delta)}{\partial \delta}\right|_{\delta = 0}.

The Jacobians JiJ_i are taken with respect to the tangent coordinate δ\delta, so they are n×nn\times n for an nn-dimensional group (n=3n=3 for SO(3)SO(3), 66 for SE(3)SE(3)) with no redundant parameters and no constraint to enforce. Solve the normal equations for δ\delta and retract:

(iJiJi)δ=iJiri,xxδ.\Big(\textstyle\sum_i J_i^{\top} J_i\Big)\,\delta = -\sum_i J_i^{\top} r_i, \qquad x \leftarrow x \boxplus \delta .

This is precisely the update inside a pose-graph SLAM back end or a camera or hand-eye calibration solver: linearize in the flat algebra, take one Gauss-Newton step, retract onto SE(3)SE(3), repeat. The manifold is respected at every iteration, so the estimate never drifts off the group and there is nothing to renormalize after the fact.

Footnotes

  1. Sola, Deray, Atchuthan, A micro Lie theory for state estimation in robotics (2018). 2

  2. Absil, Mahony, Sepulchre, Optimization Algorithms on Matrix Manifolds (2008).