The Karcher Mean of Points on SO n Knut Hüper joint work with Jonathan Manton (Univ. Melbourne) Knut.Hueper@nicta.com.au National ICT Australia Ltd. CESAME LLN, 15/7/04 p.1/25
Contents Introduction CESAME LLN, 15/7/04 p.2/25
Contents Introduction Centroids, Karcher mean, Fréchet mean CESAME LLN, 15/7/04 p.2/25
Contents Introduction Centroids, Karcher mean, Fréchet mean The Euclidean case CESAME LLN, 15/7/04 p.2/25
Contents Introduction Centroids, Karcher mean, Fréchet mean The Euclidean case Motivation, why SO n CESAME LLN, 15/7/04 p.2/25
Contents Introduction Centroids, Karcher mean, Fréchet mean The Euclidean case Motivation, why SO n Radii of convexity and injectivity CESAME LLN, 15/7/04 p.2/25
Contents Introduction Centroids, Karcher mean, Fréchet mean The Euclidean case Motivation, why SO n Radii of convexity and injectivity Karcher mean on SO n CESAME LLN, 15/7/04 p.2/25
Contents Introduction Centroids, Karcher mean, Fréchet mean The Euclidean case Motivation, why SO n Radii of convexity and injectivity Karcher mean on SO n Cost function, gradient and Hessian CESAME LLN, 15/7/04 p.2/25
Contents Introduction Centroids, Karcher mean, Fréchet mean The Euclidean case Motivation, why SO n Radii of convexity and injectivity Karcher mean on SO n Cost function, gradient and Hessian Newton-type algorithm CESAME LLN, 15/7/04 p.2/25
Contents Introduction Centroids, Karcher mean, Fréchet mean The Euclidean case Motivation, why SO n Radii of convexity and injectivity Karcher mean on SO n Cost function, gradient and Hessian Newton-type algorithm Convergence results CESAME LLN, 15/7/04 p.2/25
Contents Introduction Centroids, Karcher mean, Fréchet mean The Euclidean case Motivation, why SO n Radii of convexity and injectivity Karcher mean on SO n Cost function, gradient and Hessian Newton-type algorithm Convergence results Discussion, outlook CESAME LLN, 15/7/04 p.2/25
Given x 1,..., x k R n. Several ways to define a centroid x C CESAME LLN, 15/7/04 p.3/25
Given x 1,..., x k R n. 1) As the sum Several ways to define a centroid x C x c := 1 n k i=1 x i. CESAME LLN, 15/7/04 p.3/25
Given x 1,..., x k R n. 1) As the sum Several ways to define a centroid x C x c := 1 n k i=1 x i. 2) Equivalently, to ask the vector sum to vanish. xx 1 + + xx k CESAME LLN, 15/7/04 p.3/25
Several ways to define a centroid x C 3) (Appolonius of Perga) As unique minimum of x c := argmin x R k i=1 x x i 2. CESAME LLN, 15/7/04 p.4/25
Several ways to define a centroid x C 3) (Appolonius of Perga) As unique minimum of x c := argmin x R k i=1 x x i 2. 4) More generally, assign to each x i a mass m i, mi = 1. By induction x c1,2 = m 1x 1 + m 2 x 2 m 1 + m 2 x c1,2,3 = (m 1 + m 2 )x c1,2 + m 3 x 3 m 1 + m 2 + m 3,... Also works on spheres. CESAME LLN, 15/7/04 p.4/25
Several ways to define a centroid x C 5) Axiomatically: Let Φ : R n R n Ξ R n be a rule mapping points to its centroid. CESAME LLN, 15/7/04 p.5/25
Several ways to define a centroid x C 5) Axiomatically: Let Φ : R n R n Ξ R n be a rule mapping points to its centroid. Axioms: (A1) Φ is symmetric in its arguments. (A2) Φ is smooth. (A3) Φ commutes with the induced action of SE n on R n R n. (A4) If Ω R n is an open convex ball then Φ maps Ω Ω into Ω. CESAME LLN, 15/7/04 p.5/25
Axioms (A1) Centroid is independent of the ordering of the points. (A2) Small changes in the location of the points causes only small changes in x c. (A3) Invariance w.r.t. translation and rotation. (A4) Centroid lies in the "same region" as the points themselves. Especially, Φ(x,., x) = x. CESAME LLN, 15/7/04 p.6/25
Why centroids on manifolds? Engineering, Mathematics, Physics CESAME LLN, 15/7/04 p.7/25
Why centroids on manifolds? Engineering, Mathematics, Physics statistical inferences on manifolds CESAME LLN, 15/7/04 p.7/25
Why centroids on manifolds? Engineering, Mathematics, Physics statistical inferences on manifolds pose estimation in vision and robotics CESAME LLN, 15/7/04 p.7/25
Why centroids on manifolds? Engineering, Mathematics, Physics statistical inferences on manifolds pose estimation in vision and robotics shape analysis and shape tracking CESAME LLN, 15/7/04 p.7/25
Why centroids on manifolds? Engineering, Mathematics, Physics statistical inferences on manifolds pose estimation in vision and robotics shape analysis and shape tracking fuzzy control on manifolds (defuzzification) CESAME LLN, 15/7/04 p.7/25
Why centroids on manifolds? Engineering, Mathematics, Physics statistical inferences on manifolds pose estimation in vision and robotics shape analysis and shape tracking fuzzy control on manifolds (defuzzification) smoothing data CESAME LLN, 15/7/04 p.7/25
Why centroids on manifolds? Engineering, Mathematics, Physics statistical inferences on manifolds pose estimation in vision and robotics shape analysis and shape tracking fuzzy control on manifolds (defuzzification) smoothing data plate tectonics CESAME LLN, 15/7/04 p.7/25
Why centroids on manifolds? Engineering, Mathematics, Physics statistical inferences on manifolds pose estimation in vision and robotics shape analysis and shape tracking fuzzy control on manifolds (defuzzification) smoothing data plate tectonics sequence dep. continuum modeling of DNA CESAME LLN, 15/7/04 p.7/25
Why centroids on manifolds? Engineering, Mathematics, Physics statistical inferences on manifolds pose estimation in vision and robotics shape analysis and shape tracking fuzzy control on manifolds (defuzzification) smoothing data plate tectonics sequence dep. continuum modeling of DNA comparison theorems (diff. geometry) CESAME LLN, 15/7/04 p.7/25
Why centroids on manifolds? Engineering, Mathematics, Physics statistical inferences on manifolds pose estimation in vision and robotics shape analysis and shape tracking fuzzy control on manifolds (defuzzification) smoothing data plate tectonics sequence dep. continuum modeling of DNA comparison theorems (diff. geometry) stochastic flows of mass distributions on manifolds (jets in gravitational field) CESAME LLN, 15/7/04 p.7/25
The special orthogonal group SO n SO n := {X R n n X X = I, det X = 1}. CESAME LLN, 15/7/04 p.8/25
The special orthogonal group SO n Facts: SO n := {X R n n X X = I, det X = 1}. CESAME LLN, 15/7/04 p.8/25
The special orthogonal group SO n SO n := {X R n n X X = I, det X = 1}. Facts: a) SO n is a Lie group, CESAME LLN, 15/7/04 p.8/25
The special orthogonal group SO n SO n := {X R n n X X = I, det X = 1}. Facts: a) SO n is a Lie group, b) is in general not diffeomorphic to a sphere, CESAME LLN, 15/7/04 p.8/25
The special orthogonal group SO n SO n := {X R n n X X = I, det X = 1}. Facts: a) SO n is a Lie group, b) is in general not diffeomorphic to a sphere, c) can be equipped with a Riemannian metric, therefore notion of distance is available, CESAME LLN, 15/7/04 p.8/25
The special orthogonal group SO n SO n := {X R n n X X = I, det X = 1}. Facts: a) SO n is a Lie group, b) is in general not diffeomorphic to a sphere, c) can be equipped with a Riemannian metric, therefore notion of distance is available, d) is compact and connected, but in general not simply connected. CESAME LLN, 15/7/04 p.8/25
Geometry of SO n a) We think of SO n as a submanifold of R n n. CESAME LLN, 15/7/04 p.9/25
Geometry of SO n a) We think of SO n as a submanifold of R n n. b) Tangent space T X SO n = {XA A R n n, A = A}. CESAME LLN, 15/7/04 p.9/25
Geometry of SO n a) We think of SO n as a submanifold of R n n. b) Tangent space T X SO n = {XA A R n n, A = A}. c) (Scaled) Frobenius inner product on R n n restricts to U, V = 1 2 tr(v U) XU, XV = 1 2 tr(v U), U, V T X SO n. Gives Riemannian metric on SO n. CESAME LLN, 15/7/04 p.9/25
Geometry of SO n cont d d) Let X SO n, Ω = Ω R n n. CESAME LLN, 15/7/04 p.10/25
Geometry of SO n cont d d) Let X SO n, Ω = Ω R n n. γ : R SO n, t X e t Ω is a geodesic through X = γ(0). CESAME LLN, 15/7/04 p.10/25
Geometry of SO n cont d d) Let X SO n, Ω = Ω R n n. γ : R SO n, t X e t Ω is a geodesic through X = γ(0). T 0 γ(t), γ(t) 1 2 d t is minimal (for T not too large..) CESAME LLN, 15/7/04 p.10/25
Geometry of SO n cont d e) Squared distance between any two points X, Y SO n CESAME LLN, 15/7/04 p.11/25
Geometry of SO n cont d e) Squared distance between any two points X, Y SO n d 2 (X, Y ) = 1 2 min A = A exp(a)=x Y tr(aa ) = 1 2 tr(log(x Y )) 2 CESAME LLN, 15/7/04 p.11/25
Centroid of SO n by axioms Let Ξ SO n SO n be open and consider Φ : Ξ SO n. CESAME LLN, 15/7/04 p.12/25
Centroid of SO n by axioms Let Ξ SO n SO n be open and consider Φ : Ξ SO n. (A1) Φ is symmetric in its arguments. CESAME LLN, 15/7/04 p.12/25
Centroid of SO n by axioms Let Ξ SO n SO n be open and consider Φ : Ξ SO n. (A1) Φ is symmetric in its arguments. (A2) Φ is smooth. CESAME LLN, 15/7/04 p.12/25
Centroid of SO n by axioms Let Ξ SO n SO n be open and consider Φ : Ξ SO n. (A1) Φ is symmetric in its arguments. (A2) Φ is smooth. (A3) Φ commutes with left and right translation. CESAME LLN, 15/7/04 p.12/25
Centroid of SO n by axioms Let Ξ SO n SO n be open and consider Φ : Ξ SO n. (A1) Φ is symmetric in its arguments. (A2) Φ is smooth. (A3) Φ commutes with left and right translation. (A4) If Ω SO n is an open convex ball then Φ maps Ω Ω into Ω. CESAME LLN, 15/7/04 p.12/25
Notion of convexity Ω SO n is defined to be convex if for any X, Y SO n there is a unique geodesic wholly contained in Ω connecting X to Y and such that it is also the unique minimising geodesic in SO n connecting X to Y. CESAME LLN, 15/7/04 p.13/25
Notion of convexity Ω SO n is defined to be convex if for any X, Y SO n there is a unique geodesic wholly contained in Ω connecting X to Y and such that it is also the unique minimising geodesic in SO n connecting X to Y. A function f : Ω R is convex if for any geodesic γ : [0, 1] Ω, the function f γ : [0, 1] R is convex in the usual sense, that is, f(γ(t)) (1 t)f(γ(0)) + tf(γ(1)), t [0, 1]. CESAME LLN, 15/7/04 p.13/25
Notion of convexity cont d Maximal convex ball (centered at the identity I n ) CESAME LLN, 15/7/04 p.14/25
Notion of convexity cont d Maximal convex ball (centered at the identity I n ) B(I, r) = {X SO n d(i, X) < r}. r conv is the largest r s.t. B(I, r) is convex and d(i, X) is convex on B(I, r). CESAME LLN, 15/7/04 p.14/25
Notion of convexity cont d Maximal convex ball (centered at the identity I n ) B(I, r) = {X SO n d(i, X) < r}. r conv is the largest r s.t. B(I, r) is convex and d(i, X) is convex on B(I, r). Theorem: For SO n it holds r conv = π 2. CESAME LLN, 15/7/04 p.14/25
Injectivity radius For so n := {A R n n A = A} let exp : so n SO n, Ψ exp(ψ), and B(0, ρ) = {A so n 1 2 tr A A < ρ 2 }. CESAME LLN, 15/7/04 p.15/25
Injectivity radius For so n := {A R n n A = A} let and exp : so n SO n, Ψ exp(ψ), B(0, ρ) = {A so n 1 2 tr A A < ρ 2 }. The injectivity radius r inj of so n is the largest ρ s.t. exp B(0,ρ) is a diffeomorphism onto its image. CESAME LLN, 15/7/04 p.15/25
Injectivity radius For so n := {A R n n A = A} let and exp : so n SO n, Ψ exp(ψ), B(0, ρ) = {A so n 1 2 tr A A < ρ 2 }. The injectivity radius r inj of so n is the largest ρ s.t. exp B(0,ρ) is a diffeomorphism onto its image. Theorem: For so n it holds r inj = π. CESAME LLN, 15/7/04 p.15/25
Let Ω SO n be open. Karcher mean on SO n CESAME LLN, 15/7/04 p.16/25
Karcher mean on SO n Let Ω SO n be open. A Karcher mean of Q 1,..., Q k SO n is defined to be a minimiser of f : Ω R, f(x) = k i=1 d 2 (Q i, X). CESAME LLN, 15/7/04 p.16/25
Karcher mean on SO n Let Ω SO n be open. A Karcher mean of Q 1,..., Q k SO n is defined to be a minimiser of f : Ω R, f(x) = k i=1 d 2 (Q i, X). Existence, uniqueness? CESAME LLN, 15/7/04 p.16/25
Results Theorem (MH 04): The critical points of f : Ω R, f(x) = k i=1 d 2 (Q i, X) are precisely the solutions of k i=1 log(q i X) = 0. CESAME LLN, 15/7/04 p.17/25
Results Theorem (MH 04): The Karcher mean is well defined and satisfies axioms (A1)-(A4) of a centroid on the open set Ξ = Y SO n B(Y, π/2) B(Y, π/2). CESAME LLN, 15/7/04 p.18/25
Results Theorem (MH 04): The Hessian of f represented along geodesics d 2 d t2(f γ)(t) is always positive definite. t=0 CESAME LLN, 15/7/04 p.19/25
f, grad f and Hessian explicitly f : Ω R, f(x) = k d 2 (Q i, X) = k i=1 i=1 1 2 tr(log(x Q i )) 2. CESAME LLN, 15/7/04 p.20/25
f, grad f and Hessian explicitly f : Ω R, f(x) = k d 2 (Q i, X) = k i=1 i=1 1 2 tr(log(x Q i )) 2. D f(x)xa = k = i=1 2X k tr(log(q i X)A) log(q i X) i=1 }{{} =grad f(x), XA. CESAME LLN, 15/7/04 p.20/25
f, grad f and Hessian explicitly d 2 ( d ε 2f X e εa ) = ε=0 vec A H(X) vec A CESAME LLN, 15/7/04 p.21/25
f, grad f and Hessian explicitly d 2 ( d ε 2f X e εa ) = ε=0 vec A H(X) vec A with (n 2 n 2 ) matrix H(X) := k i=1 Z i (X) coth(z i (X)) CESAME LLN, 15/7/04 p.21/25
f, grad f and Hessian explicitly d 2 ( d ε 2f X e εa ) = ε=0 vec A H(X) vec A with (n 2 n 2 ) matrix H(X) := k i=1 Z i (X) coth(z i (X)) and Z i (X) := I n log(q i X) + log(q i X) I n 2 CESAME LLN, 15/7/04 p.21/25
Algorithm Given Q 1,., Q k SO n, compute a local minimum of f. Step 1: Set X SO n to an initial estimate. Step 2: Compute k i=1 log(q i X). Step 3: Stop if k i=1 log(q i X) is suff. small. Step 4: Compute the update direction vec A opt = (H(X)) 1 k i=1 vec(log(q i X)) Step 5: Set X := X e A opt. Step 6: Go to Step 2. CESAME LLN, 15/7/04 p.22/25
Results Theorem (MH 04): The algorithm is an intrinsic Newton method. CESAME LLN, 15/7/04 p.23/25
Results Theorem (MH 04): The algorithm is an intrinsic Newton method. Theorem: If the algorithm converges, then it converges locally quadratically fast. CESAME LLN, 15/7/04 p.23/25
Discussion, outlook Need simple test to ensure that update step in algorithm remains in open convex ball global convergence. CESAME LLN, 15/7/04 p.24/25
Discussion, outlook Need simple test to ensure that update step in algorithm remains in open convex ball global convergence. Different RM, e.g. Cayley-like, gives different function, geodesics, etc.., but typically KM cay KM exp << 1. CESAME LLN, 15/7/04 p.24/25
Discussion, outlook Need simple test to ensure that update step in algorithm remains in open convex ball global convergence. Different RM, e.g. Cayley-like, gives different function, geodesics, etc.., but typically KM cay KM exp << 1. (H(X)) 1 via EVD. CESAME LLN, 15/7/04 p.24/25
Discussion, outlook Need simple test to ensure that update step in algorithm remains in open convex ball global convergence. Different RM, e.g. Cayley-like, gives different function, geodesics, etc.., but typically KM cay KM exp << 1. (H(X)) 1 via EVD. Quasi-Newton (rank-one updates). CESAME LLN, 15/7/04 p.24/25
Discussion, outlook Linear convergent algorithm (joint work with Robert Orsi, ANU) X i+1 = X i e 1 k k j=1 log(x i Q j) CESAME LLN, 15/7/04 p.25/25
Discussion, outlook Linear convergent algorithm (joint work with Robert Orsi, ANU) X i+1 = X i e 1 k k j=1 log(x i Q j) Centroids on homogeneous (symmetric) spaces. CESAME LLN, 15/7/04 p.25/25
Discussion, outlook Linear convergent algorithm (joint work with Robert Orsi, ANU) X i+1 = X i e 1 k k j=1 log(x i Q j) Centroids on homogeneous (symmetric) spaces. Project with NICTA vision/robotic program (Richard Hartley) to treat SE 3 case. CESAME LLN, 15/7/04 p.25/25