Exponential Barycenters of the Canonical Cartan Connection and Invariant Means on Lie Groups

Xavier Pennec 1 and Vincent Arsigny 1

Asclepios project-team, INRIA Sophia-Antipolis Méditerranée 2004 Route des Lucioles, BP93, F-06902 Sophia Antipolis Cedex, France Xavier.Pennec@inria.fr,

Abstract. When performing statistics on elements of sets that possess a particular geometric structure, it is desirable to respect this structure.

For instance in a Lie group, it would be judicious to have a notion of a mean which is stable by the group operations (composition and inversion). Such a property is ensured for Riemannian center of mass in Lie groups endowed with a bi-invariant Riemannian metric, like compact Lie groups (e.g. rotations). However, bi-invariant Riemannian metrics do not exist for most non compact and non-commutative Lie groups. This is the case in particular for rigid-body transformations in any dimension greater than one, which form the most simple Lie group involved in biomedical image registration.

In this paper, we propose to replace the Riemannian metric by an affine connection structure on the group. We show that the canonical Cartan connections of a connected Lie group provides group geodesics which are completely consistent with the composition and inversion. With such a non-metric structure, the mean cannot be defined by minimizing the variance as in Riemannian Manifolds. However, the characterization of the mean as an exponential barycenter gives us an implicit definition of the mean using a general barycentric equation. Thanks to the properties of the canonical Cartan connection, this mean is naturally bi-invariant. We show the local existence and uniqueness of the invariant mean when the dispersion of the data is small enough. We also propose an iterative fixed point algorithm and demonstrate that the convergence to the invariant mean is at least linear.

In the case of rigid-body transformations, we give a simple criterion for the global existence and uniqueness of the bi-invariant mean, which happens to be the same as for rotations. We also give closed forms for the bi-invariant mean in a number of simple but instructive cases, including 2D rigid transformations. For general linear transformations, we show that the bi-invariant mean is a generalization of the (scalar) geometric mean, since the determinant of the bi-invariant mean is the geometric mean of the determinants of the data. Finally, we extend the theory to higher order moments, in particular with the covariance which can be used to define a local bi-invariant Mahalanobis distance.

Introduction

Over the last 30 years, there was an explosion of imaging modalities which allows observing both the anatomy in vivo and in situ at multiple spatial scales (from cells to the whole body), multiple time scales (beating heart, growth, aging, evolution of species), and on multiple subjects. The combination of these new observation means with the computerized methods is at the heart of computational anatomy, an emerging discipline at the interface of geometry, statistics and image analysis which aims at developing algorithms to model and analyze the biological shape of tissues and organs. The goal is to estimate representative organ anatomies across diseases, populations, species or ages, to model the organ development across time (growth or aging), to establish their variability, and to correlate this variability information with other functional, genetic or structural information.

Understanding and modeling the shape of organs is made difficult by the absence of physical models for comparing different subjects, the complexity of shapes, and the high number of degrees of freedom implied. The general method is to identify anatomically representative geometric features (points, tensors, curves, surfaces, volume transformations), and to describe and compare their statistical distribution in different populations. Although anatomical features are embedded in Euclidean spaces, the extracted geometric features most often belong to manifolds. For instance, the spine shape can be characterized by the relative position and orientation of each vertebra with respect to the previous one [START_REF] Adler | Newton's method on riemannian manifolds and a geometric model for the human spine[END_REF][START_REF] Boisvert | Geometric variability of the scoliotic spine using statistics on articulated shape models[END_REF]. Considering the degrees of freedom of an articulated object amounts to work in a subspace of a product of Lie groups (here rigid-body transformations) rather than in a Euclidean space. Likewise, in order to model biological shapes, D'Arcy Thompson proposed in 1917 to assume that there is a template object which represents the reference shape, and to encode the shape variations as deformations of this template [START_REF] Thompson | On Growth and Form[END_REF]. With this approach, we perform statistics on deformations which naturally belong to continuous transformation groups, i.e. Lie groups. As the deformation of a smooth object should be a smooth object, the most general transformation group to consider is the group of diffeomorphisms (invertible, one-to-one mappings with smooth inverses). This formalism was developed in particular by Grenander and Miller [31,[START_REF] Miller | Group actions, homeomorphisms, and matching: A general framework[END_REF] based on advanced mathematical tools to compute on infinite dimensional groups of diffeomorphisms [START_REF] Trouvé | Diffeomorphisms groups and pattern matching in image analysis[END_REF][START_REF] Younes | Shapes and Diffeomorphisms[END_REF].

Among statistics, the most fundamental is certainly the mean, which extracts from the data a central point, minimizing in some sense the dispersion of the data around it. In this work, we focus on a generalization of the mean to connected Lie groups. Classically, in a manifold endowed with a Riemannian metric, the natural choice of mean is called the Riemannian center of mass or Fréchet mean. The Riemannian structure proves to be a powerful and consistent framework for computing simple statistics [START_REF] Ziezold | On expected figures in the plane[END_REF][START_REF] Oller | Intrinsic analysis of statistical estimation[END_REF][START_REF] Pennec | L'incertitude dans les problèmes de reconnaissance et de recalage -Applications en imagerie médicale et biologie moléculaire[END_REF][START_REF] Bhattacharya | Nonparametric estimation of location and dispersion on Riemannian manifolds[END_REF][START_REF] Bhattacharya | Large sample theory of intrinsic and extrinsic sample means on manifolds, I[END_REF][START_REF] Bhattacharya | Large sample theory of intrinsic and extrinsic sample means on manifolds, II[END_REF][START_REF] Pennec | Intrinsic statistics on Riemannian manifolds: Basic tools for geometric measurements[END_REF] and can be extended to an effective computing framework on manifold-valued images [START_REF] Pennec | A Riemannian framework for tensor computing[END_REF]. On a Lie group, this Riemannian approach is consistent with the group operations if a biinvariant metric exists, which is for example the case for compact groups such as rotations [START_REF] Pennec | Computing the mean of geometric features -application to the mean rotation[END_REF][START_REF] Moakher | Means and averaging in the group of rotations[END_REF]. In this case, the bi-invariant Fréchet mean has many desirable invariance properties: it is invariant with respect to left-and right-multiplication, as well as inversion. Unfortunately, bi-invariant Riemannian metrics do not exist for most non compact and non-commutative Lie groups. In particular, such metrics do not exist in any dimension for rigid-body transformations, which form the most simple Lie group involved in biomedical image registration.

To overcome the lack of existence of bi-invariant Riemannian metrics for general Lie groups, we propose in this work to rely on a convenient affine connection structure. We first recall in Section 2 the basic properties of connected Lie groups and the notion of affine connection spaces. Among the connections that are left-invariant on a Lie group, the Cartan-Schouten connections are defined as the ones for which one-parameter subgroups are geodesics. The unique symmetric Cartan-Schouten connection is called the canonical Cartan connection of the group. We show that it provides group geodesics which are completely consistent with composition and inversion.

We turn to the definition of means in Lie groups in Section 3. In order to define bi-invariant Fréchet means, we investigate the existence conditions of biinvariant metrics on Lie groups. It turns out that most non compact and non commutative Lie groups do not posses any bi-invariant Riemannian metric. We show that this is the case for rigid-body transformations, which constitutes one of the simplest Lie groups of interest in image analysis. However, a weaker structure of bi-invariant affine connection space exists for all connected Lie groups thanks to the canonical Cartan connection. With such a non-metric structure, the mean can obviously not be defined by minimizing the variance as there is no distance. However, the characterization of the mean as an exponential barycenter is still valid and gives us an implicit definition of the mean using a general barycentric equation. Thanks to the properties of the canonical Cartan connection, this mean is naturally equivariant with respect to left-and right-translations as well as inversions. We show the existence and uniqueness of the mean when the dispersion of the data is small enough by defining a mapping whose fixed point is by definition the mean. Moreover, the mapping being a contraction, it is converging to the mean at least linearly. Section 4 focuses on the bi-invariant mean in selected matrix Lie groups. We show that a closed form can be obtained in the case of the group of scaling and translations, which constitutes one of the simplest examples of non-compact and non-commutative Lie groups which do not possess a bi-invariant Riemannian metric. There is also a closed form of the bi-invariant mean for the Heisenberg group, which can be generalized to the scaled unitriangular matrix group. For general rigid-body transformations, there is no closed form but we determine a simple criterion for the general existence and uniqueness of the bi-invariant mean, which happens to be the same as the bi-invariant Fréchet mean for rotations. For general linear transformations, we show that the bi-invariant mean is a generalization of the geometric mean of scalars, in the sense that the determinant of the mean is equal to the geometric mean of the determinants of the data.

Finally, Section 5 investigates some open points, such as the characterization of global existence and uniqueness conditions for the bi-invariant mean. It also extends the theory to higher order moments, in particular with the (2-covariant) covariance tensor which can be used to define a local bi-invariant Mahalanobis distance.

Related works

The intuition behind such a bi-invariant mean on matrix Lie groups was present in [START_REF] Woods | Characterizing volume and surface deformations in an atlas framework: theory, applications, and implementation[END_REF] along with a practical iterative algorithm to compute it. However, no precise definition nor proof of convergence was provided. The barycentric definition of bi-invariant means on Lie groups based on oneparameter subgroups was developed in the the PhD of Vincent Arsigny [START_REF] Arsigny | Processing Data in Lie Groups: An Algebraic Approach[END_REF] and in the research report [START_REF] Arsigny | Bi-invariant means in lie groups. application to left-invariant polyaffine transformations[END_REF]. In this preliminary work, the 'group geodesics' were simply defined as left translations of one-parameters subgroups without further justification. This paper extends this work by reformulating and rigorously justifying 'group geodesics' as the geodesics of the canonical Cartan-Schouten connections [START_REF] Cartan | On the geometry of the group-manifold of simple and semi-simple groups[END_REF]. This allows better distinguishing the properties that are related to the connection itself (bi-invariance) from the ones that are related to the definition of the mean as an exponential barycenter in an affine connection space. A number of proofs were added or adapted in consequence.

The barycentric fixed point iteration on Lie groups that we investigate in this paper to compute the bi-invariant mean is close to the Gauss-Newton gradient descent iteration that is used on Riemannian manifolds to compute the Fréchet mean, studied in depth in [START_REF] Le | Locating Fréchet means with application to shape spaces[END_REF][START_REF] Le | Estimation of barycenters[END_REF] or [START_REF] Groisser | Newton's method, zeroes of vector fields, and the Riemannian center of mass[END_REF] for a generalization to zeros of vector fields on Riemannian manifolds. Indeed, both algorithms do correspond when the Lie group is provided with a bi-invariant metric. However, they differ when the Lie group is non compact and non commutative: since the canonical Cartan connections are not metric, there does not exist a Riemannian metric for which the group geodesics are Riemannian geodesics. Thus, in the general case, this algorithm does not enter into the type of iterations that are studied in [START_REF] Groisser | Newton's method, zeroes of vector fields, and the Riemannian center of mass[END_REF].

In the context of optimization on Riemannian manifolds, many Newton-like methods were proposed and their convergence studied in depth, e.g. in [START_REF] Smith | Optimization techniques on Riemannian manifolds, Hamiltonian and gradient flows, algorithms and control[END_REF][START_REF] Udriste | Convex functions and optimization methods on Riemannian manifolds[END_REF][START_REF] Groisser | Newton's method, zeroes of vector fields, and the Riemannian center of mass[END_REF][START_REF] Dedieu | Newton's method on Riemannian manifolds: covariant alpha theory[END_REF][START_REF] Absil | Optimization algorithms on matrix manifolds[END_REF] to cite just a few. The iteration we investigate in this paper does not enter into this family as it does not use the covariant derivative of the vector field of which we are trying to find the zeros, Moreover, we cannot recast it as an optimization problem on a Riemannian manifold, as stated above. Very few works deal with Newton iterations on Lie groups or affine connection spaces. Notable exceptions are [START_REF] Owren | The Newton iteration on Lie groups[END_REF][START_REF] Mahony | The geometry of the Newton method on non-compact Lie groups[END_REF] which propose Newton algorithms to optimize general functions on non compact Lie groups based on Cartan-Schouten connections. In terms of the geometric tools used, these papers are the closest to what is present in the first Section of this paper. However, they only focuses on the optimization of functions on Lie groups without investigating any notion of bi-invariant mean.

Lie groups

Basics of Lie Groups

A Lie group G is a smooth manifold provided with an identity element e, a smooth associative composition rule (g, h) ∈ G × G → g.h ∈ G and a smooth inversion rule Inv : f → f (-1) which are both compatible with the manifold structure. In the sequel of this paper we always assume that the Lie group is finite dimensional and connected. Classical examples of Lie groups are vector spaces (with their commutative addition as multiplication), multiplicative matrix groups: GL(n), O(n), SO(n), etc., with the usual matrix multiplication; and geometric transformation groups such as rigid-body transformations, similarities, affine transformations which can anyway also be looked upon as matrix groups via their 'faithful' representation based on homogeneous coordinates. Infinite-dimensional Lie groups of diffeomorphisms have also been recently gaining a considerable importance in computational anatomy [START_REF] Trouvé | Diffeomorphisms groups and pattern matching in image analysis[END_REF][START_REF] Younes | Shapes and Diffeomorphisms[END_REF]. However, we concentrate here only on finite dimensional Lie groups.

Many details on differential geometry can be found in classical books like [START_REF] Sternberg | Lectures on Differential Geometry[END_REF][START_REF] Gallot | Riemannian Geometry[END_REF][START_REF] Klingenberg | Riemannian Geometry[END_REF][START_REF] Carmo | Riemannian Geometry[END_REF]. Specific details on Lie groups can be found in [START_REF] Helgason | Differential Geometry, Lie groups, and Symmetric Spaces[END_REF]. Most results of this section can be found in the more modern (and quite comprehensive) presentation of differential geometry and Lie groups of Postnikov [START_REF] Postnikov | Geometry VI: Riemannian Geometry[END_REF].

Lie Bracket We denote by T g G the tangent space at g ∈ G and by T G the tangent bundle. A section X : G → T G is a vector field whose value at g is denoted X| g . The set of vector fields Γ (G) is the algebra of derivations of smooth functions φ ∈ C ∞ (G). Recall that a derivation δ is a linear map from Γ (G) to Γ (G) that satisfies Leibniz's law: δ(f X) = (df )X +f (δX) for any f ∈ C ∞ (G) and X ∈ Γ (G). In a local coordinate system, we can indeed write Xφ| g = ∂ X φ| g = d dt (φ(g + tX| g )).

When composing the derivations, we can see that XY φ = ∂ X ∂ Y φ is a second order differential and is thus not a derivation. However, we can remove the second order terms by subtracting ∂ Y ∂ X φ (this can be checked by writing these expression in a local coordinate system). We obtain the Lie bracket

[X, Y ](φ) = ∂ X ∂ Y φ -∂ Y ∂ X φ.
which is also called the Lie derivative L X Y because it is conceptually the derivative of the vector field X in the 'direction' generated by Y . The Lie bracket is a bilinear operator from

Γ G × Γ G to Γ G. It is obviously skew symmetric ([X, Y ] = -[Y, X]), and verifies the Jacobi identity [X, [Y, Z]] + [Z, [X, Y ]] + [Y, [Z, X]] = 0. As it is a derivation, it also verifies [X, φY ] = φ[X, Y ] + ∂ X (φ Y ) for any function φ.
Lie Algebra Thanks to the group structure, we can define two canonical diffeomorphisms of G called the left and the right translations:

L g (f ) = g.f and R g (f ) = f.g in addition to the inversion map Inv(f ) = f (-1) . A fourth important diffeomorphism of G is the conjugation C g (f ) = g.f.g (-1) = L g •R g (-1) = R g (-1) •L g (this is actually an inner automorphism).
The differential DL g of the left translations maps the tangent space T h G to the tangent space T g.h G. In particular, L g maps any vector x ∈ T e G to the vector DL g .x ∈ T g G, giving rise to the vector field X| g = DL g .x. One verifies that this vector field is left-invariant: X • L h = DL h X. Conversely, every left-invariant vector field is determined by its value at identity. Moreover, the bracket of two left-invariant vector fields X = DL.x and Ỹ = DL.y is also left-invariant. Thus, it is determined by the vector [x, y] = [ X, Ỹ ]| e ∈ T e G. This allows to identify the sub-algebra of left-invariant vector fields with the tangent vector space at identity provided with the additional bracket operation: g = (T e G, +, ., [., .]) is called the Lie algebra of the group G.

Simple examples of Lie brackets are given by GL(n) and its multiplicative subgroups, like SL(n) or SO(n). In these cases, the Lie algebra is a vector space of square matrices, and the Lie bracket between two elements M and N of this algebra is the commutator of these two matrices, i.e. [M, N ] = M.N -N.M . In particular, the Lie algebra of GL(n) is M (n), the vector space of square matrices, that of SL(n) is the vector subspace of M (n) of trace-free matrices, and the Lie algebra of SO(n) is the vector space of skew symmetric matrices.

By symmetry, we can also define the sub-algebra of right-invariant vector fields X| g = DR g X and identify it with the tangent vector space at identity. However, one should be careful that the right-bracket is the opposite of the left-bracket.

Adjoint Group

The adjoint is the automorphism of the Lie algebra obtained by differentiating the conjugation C g (f ) = g.f.g (-1) with respect to f . More precisely, an element g of G acts on an element x of g by Ad(g).x = DL g | g (-1) .DR g (-1) | e .x = DR g (-1) | g .DL g | e .x.

In the matrix case, we have the (simple this time) formula: Ad(R).M = R.M.R (-1) , which only uses two matrix multiplications and one matrix inversion.

Thus, one can map each element of the group to a linear operator which acts on the Lie algebra: G can be 'represented' by the adjoint operators acting on g. Thist is a representation in the sense of representation theory (see [START_REF] Lang | Algebra. Graduate Texts in Mathematics[END_REF] for a complete treatment) as this mapping is a Lie group homomorphism from G to GL(g). This means that Ad : G → GL(g) is a smooth map from G to GL(g) which is compatible with the group structure: Ad(e) = Id, ∀g ∈ G, Ad(g (-1) ) = Ad(g) (-1) and ∀g, h ∈ G, Ad(g.h) = Ad(g).Ad(h). The subgroup Ad(G) of the general linear group GL(g) is called the adjoint group. The properties of this representation and the existence of bi-invariant metrics for the group G are highly linked.

Lie Group Exponential and Logarithm

The Matrix Case Before we present the general group exponential and logarithm, let us recall the fundamental properties of the matrix exponential and logarithm, which correspond to the group exponential and logarithm of the Lie group of n×n invertible matrices, GL(n). They are the generalization to matrices of the well-known scalar exponential and logarithm. The exponential exp(M ) of a matrix M is given by exp

(M ) = ∞ n=0 M k /k!. Let G ∈ GL(n). If there exists M ∈ M (n) such that G = exp(M ), then M is said to be a logarithm of G.
In general, the logarithm of a real invertible matrix may not exist, and it may not be unique if it exists. The lack of existence is a general phenomenon in connected Lie groups. One generally needs two exponentials to reach every element [START_REF] Wüstner | A connected lie group equals the square of the exponential image[END_REF]. The lack of uniqueness is essentially due to the influence of rotations: rotating of an angle α is the same as rotating of an angle α + 2kπ where k is an integer. Since the logarithm of a rotation matrix directly depends on its rotation angles (one angle suffices in 3D, but several angles are necessary when n > 3), it is not unique.

When a real invertible matrix has no (complex) eigenvalue on the (closed) half line of negative real numbers, then it has a unique real logarithm whose (complex) eigenvalues have an imaginary part in ] -π, π[ [START_REF] Kenney | Condition estimates for matrix functions[END_REF][START_REF] Gallier | Logarithms and square roots of real matrices[END_REF]. In this case this particular logarithm is well-defined and called the principal logarithm. We will write log(M ) for the principal logarithm of a matrix M whenever it is defined.

Thanks to their remarkable algebraic properties, and essentially their link with one-parameter subgroups, matrix exponential and logarithms can be quite efficiently numerically computed. In practice, we have used in this work the popular 'Scaling and Squaring Method' [START_REF] Higham | The scaling and squaring method for the matrix exponential revisited[END_REF] to compute numerically matrix exponentials, as well as the 'Inverse Scaling and Squaring Method' [START_REF] Cheng | Approximating the logarithm of a matrix to specified accuracy[END_REF] to compute matrix logarithms.

One Parameter Subgroups and Lie Group Exponential Let us now define the general group exponential and logarithm in Lie groups. These properties are very similar to those of the matrix exponential and logarithm, which are a particular case of such mappings. One should note that this particular case is actually quite general, since most classical Lie groups can be looked upon as matrix Lie groups anyway [START_REF] Hall | Lie Groups, Lie Algebras, and Representations: an Elementary Introduction[END_REF].

The flow γ x (t) of a left-invariant vector field X = DL.x starting from e exists for all times. Its tangent vector is γx (t) = DL γx(t) .x by definition of the flow. Now fix s ∈ R and observe that the two curves γ x (s + t) and γ x (s).γ x (t) are going through point γ x (s) with the same tangent vector. By the uniqueness of the flow, they are the same and γ x is a one parameter subgroup, i.e. a group morphism from (G, e, .) to (R, 0, +):

γ x (s + t) = γ x (s).γ x (t) = γ x (t + s) = γ x (t).γ x (s).
The group exponential is defined from these one-parameter subgroups with Exp(x) = γ x (1). Definition 1. Let G be a Lie group and let x be an element of the Lie Algebra g. The group exponential of x, denoted Exp(x), is given by the value at time 1 of the unique function γ x (t) defined by the ordinary differential equation (ODE) γx (t) = DL γx(t) .x with initial condition γ x (0) = e.

Very much like the exponential map associated to a Riemannian metric, the group exponential is diffeomorphic locally around 0. More precisely, since the exponential is a smooth mapping, the fact that its differential map is invertible at e allows for the use of the 'Inverse Function Theorem', which guarantees that it is a diffeomorphism from some open neighborhood of 0 to an open neighborhood of Exp(0) = e [58, Proposition 1.3, p.13].

Theorem 1. The group exponential is a diffeomorphism from an open neighborhood of 0 in g to an open neighborhood of e in G, and its differential map at 0 is the identity.

This theorem implies that one can define without ambiguity a logarithm in an open neighborhood of e: for every g in this open neighborhood, there exists a unique x in the open neighborhood of 0 in g, such that g = Exp(x). In the following, we will write x = Log(g) for this logarithm, which is the (abstract) equivalent of the (matrix) principal logarithm. The absence of an inverse function theorem in infinite dimensional Fréchet manifolds prevents the straightforward extension of this property to general groups of diffeomorphisms [START_REF] Khesin | The Geometry of Infinite Dimensional Lie groups[END_REF].

Baker-Campbell-Hausdorff Formula the Baker-Campbell-Hausdorff formula (or BCH formula) is a fundamental property of the group exponential and logarithm. Intuitively, this formula shows how much Log( Exp(x). Exp(y)) deviates from x + y due to the (possible) non-commutativity of the multiplication in G. Remarkably, this deviation can be expressed only in terms of Lie brackets between x and y [30, Chap. VI].

Theorem 2 (Series form of the BCH formula). Let x, y be in g. If they are small enough, then the logarithm of the product Exp(x). Exp(y) is always well-defined and we have the following development:

BCH(x, y) = Log( Exp(x). Exp(y)) = x + y + 1/2([x, y]) + 1/12([x, [x, y]] + [y, [y, x]]) +1/24([[x, [x, y]], y]) + O(( x + y ) 5 ). (1)
A fundamental property of this function is the following: it is not only C ∞ but also analytic around 0, which means that BCH(x, y) (near 0) is the sum of an absolutely converging multivariate infinite series (the usual multiplication is replaced here by the Lie bracket). This implies in particular that all the (partial) derivatives of this function are also analytic.

Affine Connection Spaces

For each tangent vector x ∈ g T e G, the one parameter subgroup γ x (t) is a curve that starts from identity with this tangent vector. One could question if this curve could be seen as a geodesic. To answer this question, we first need to define what are geodesics.

Affine Connections When one wants to compare data in the tangent space at one point of the group with data in the tangent space at another point of the group, one needs to define a specific mapping between these two different tangent spaces: this is the notion of parallel transport. As there is generally no way to define globally a linear operator Π h g :

T g G → T h G which is consistent with the composition (i.e. Π h g • Π g f = Π h f )
, one has to specify the path by which we connect the two points.

An (affine) connection is the specification of the parallel transport for infinitesimal displacements. It is a bilinear map ∇ from Γ G × Γ G to Γ G such that for all smooth functions φ ∈ C ∞ (G):

-∇ φX Y = φ∇ X Y , that is, ∇ is smooth and linear in the first variable; -∇ X (φY ) = ∂ X φY +φ∇ X Y , i.e. ∇ satisfies Leibniz rule in the second variable.

In a local chart, the connection is determined by its coordinates on the basis vector fields:

∇ ∂i ∂ j = k Γ k ij ∂ k .
The n 3 coordinates Γ k ij of the connection are functions called the Christoffel symbols. They encode how the projection from one tangent space to the neighboring one modifies the standard derivative of a vector field in a chart:

∇ X Y = ∂ X Y + i,j,k x i y j Γ k ij ∂ k .
Geodesics Geodesics can be defined in affine connection spaces as the generalization of straight lines: these are the curves that remain parallel to themselves (auto-parallel curves). Thus, γ(t) is a geodesic if its tangent vector γ(t) remains parallel to itself, i.e. if the covariant derivative ∇ γ γ = 0 of γ is zero. In a local coordinate system where γ = i γi ∂ i , the equation of the geodesics is thus (in Einstein notations): γk + Γ k ij γi γj = 0. We retrieve here the standard equation of the geodesics in Riemannian geometry without having to rely on any particular metric. However, what is remarkable is that we still conserve many properties of the Riemannian exponential map in affine connection spaces: as geodesics are locally defined by a second order ordinary differential equation, the geodesic γ (p,v) (t) starting at any point p with any tangent vector v is defined for a sufficiently small time, which means that we can define the exponential map Exp p (v) = γ (p,v) (1) for a sufficiently small neighborhood. Moreover, the strong Whitehead theorem still holds.

Theorem 3 (Strong Form of Whitehead Theorem). Each point of an affine connection space has a normal convex neighborhood (NCN) in the sense that for any couple of points (p, q) in this neighborhood, there exists a unique geodesic γ(t) joining them that is entirely contained in this neighborhood. Moreover, the geodesic γ(t) depends smoothly on the points p and q.

The proof of this theorem essentially involves the non-singularity of the differential of the map Φ(p, v) = (p, Exp p (v)) and the inverse function theorem, with the use of an auxiliary Euclidean metric on the tangent spaces around the point of interest. We refer to [START_REF] Postnikov | Geometry VI: Riemannian Geometry[END_REF]Proposition 1.3,p.13] for the detailed proof.

As geodesics control many properties of the space, it is interesting to know which affine connections lead to the same geodesics. Intuitively, a geodesic for a connection ∇ will remain a geodesic for another connection ∇ if the parallel transport of the tangent vector in the direction of this tangent vector remains unchanged, i.e. if ∇ X X = ∇X X for any vector field X. However, the parallel transport of other vectors of a frame can change, hence the notion of torsion of a connection which is defined by

T (X, Y ) = ∇ X Y -∇ Y X -[X, Y ] = -T (Y, X).

It measures how the skew-symmetric part differ from the Lie derivative L

X Y = [X, Y ].
The connection is called torsion free if the torsion vanishes. One can show that two connections have the same geodesics if they have the same symmetric part (∇ X Y + ∇ Y X)/2. i.e. if they only differ by torsion. Thus, at least for the geodesics, we can restrict our attention to the torsion free connections.

Canonical Cartan Connection and Group Geodesics

Cartan-Schouten Connections Let us now consider left-invariant connections, i.e. verifying ∇ DLgX DL g Y = DL g ∇ X Y for any vector fields X and Y and any group element g ∈ G. As the connection is completely determined by its action on the sub-algebra of left-invariant vector fields, we can restrict to this sub-algebra. Let X = DL.x and Ỹ = DL.y be two left-invariant vector fields. Stating that the covariant derivative of Ỹ along X is left-invariant amounts to say that the field ∇ X Ỹ = DL(∇ X Ỹ | e ) is determined by its value at identity α(x, y) = ∇ X Ỹ | e ∈ g. Conversely, each bilinear operator of the Lie algebra α : g × g → g uniquely defines the connection at the identity and thus on all left-invariant vector fields: ∇ α X Ỹ = α(x, y). The connection is then uniquely extended to all vector fields using the linearity in the first variable and the Leibniz rule.

Definition 2 (Cartan-Schouten and Bi-invariant Connections). Among the left-invariant connections, the Cartan-Schouten connections are the ones for which geodesics going through identity are one parameter subgroups. Bi-invariant connections are both left-and right-invariant.

The definition of Cartan-Schouten connection used here [58, Def. 6.2 p.71] generalizes the three classical +, -and 0 Cartan-Schouten connections [START_REF] Cartan | On the geometry of the group-manifold of simple and semi-simple groups[END_REF] (see below for their definition).

Theorem 4. Cartan-Schouten connections are uniquely determined by the property α(x, x) = 0 for all x ∈ g.

Bi-invariant connections are characterized by the condition:

α([z, x], y) + α(x, [z, y]) = [z, α(x, y)] ∀x, y, z ∈ g.
(

) 2
The one dimensional family of connections generated by α(x, y) = λ[x, y] satisfy these two conditions. Moreover, there there is a unique symmetric Cartan-Schouten bi-invariant connection called the canonical Cartan connection of the Lie group (also called mean or 0-connection) defined by α(x, y) = 1 2 [x, y] for all x, y ∈ g, i.e. ∇ X Ỹ = 1 2 [ X, Ỹ ] for two left-invariant vector fields. Indeed, let us consider the one-parameter subgroup γ x (t) starting from e with initial tangent vector x ∈ g. As this is the integral curve of the left-invariant vector field X = DL.x, its tangent vector is γx (t) = DL γx(t) .x = X| γx(t) . The curve is a geodesic if and only if it is auto-parallel, i.e. if

∇ γx γx = ∇ X X = α(x, x) = 0.
Thus, the one-parameter subgroup γ x (t) is a geodesic if and only if α(x, x) = 0. This condition implies that the operator α is skew-symmetric. However, if any skew-symmetric operator give rise to a left-invariant connection, this connection is not always right-invariant. The connection is right-invariant if ∇ DRgX DR g Y = DR g ∇ X Y for any vector fields X and Y and any group element g. As we have (dR g X) = Ad(g -1 ).x for any left-invariant vector field X = DL.x, the rightinvariance is equivalent to the Ad-invariance of the operator α: α Ad(g -1 )x, Ad(g -1 )y = Ad(g -1 ).α(x, y), for any two vectors x, y ∈ g and g ∈ G. We can focus on the infinitesimal version of this condition by taking the derivative at t = 0 with g -1 = Exp(tz). Since The well known one-dimensional family of connections generated by α(x, y) = λ[x, y] obviously satisfy this condition (in addition to α(x, x) = 0). It was shown by Laquer [43] that this family basically describes all the bi-invariant connections on compact simple Lie groups (the exact result is that the space of bi-invariant affine connections on G is one-dimensional) except for SU (n) when n > 3: in the case of SU (n) there is a two-dimensional family of bi-invariant affine connections.

The torsion of a connection can be expressed in the basis of left-invariant vector fields: T ( X, Ỹ ) = α(x, y) -α(y, x) -[x, y]. This is itself a left-invariant vector field characterized by its value at identity T (x, y) = α(x, y) -α(y, x) -[x, y]. Thus, the torsion of a Cartan-Schouten connection is T (x, y) = 2α(x, y) -[x, y] and we are left with a unique torsion-free Cartan connection characterized by α(x, y)

= 1 2 [x, y].
Curvature of the Cartan-Schouten Connections As for the torsion, the curvature tensor

R(X, Y )Z = ∇ X ∇ Y Z -∇ Y ∇ X Z -∇ [X,Y ] Z can be expressed
in the basis of left-invariant vector fields and since it is left-invariant, it is characterized by its value in the Lie algebra:

R(x, y)z = α(x, α(y, z)) -α(y, α(x, z)) -α([x, y], z).
For Cartan connections of the form α(x, y) = λ[x, y], the curvature becomes R(x, y)z = λ(λ -1)[[x, y], z]. For λ = 0 and λ = 1, the curvature is obviously null. These two flat connections are called the left and right (or + and -) Cartan connections. For the canonical Cartan connection (often called mean or 0

-connection), the curvature is R(x, y)z = -1 4 [[x, y], z],
which is generally non zero.

Among the Cartan-Schouten connection, the +, -and 0 (or left, right and mean) connections have special properties and are often called the three canonical Cartan connections. As all the Cartan connections of the form α(x, y) = λ[x, y], these three connections have exactly the same geodesics (left or right translations of one-parameter subgroups) because they share the same symmet-

ric part ∇ X Y + ∇ Y X = ∂ X Y + ∂ Y X.
However, the -connection is the unique connection for which all the left-invariant vector fields are covariantly constant; the + connection is the only connection for which all the right-invariant vector fields are covariantly constant; and the 0-connection is the only one which is torsion-free (it has curvature, but its curvature tensor is covariantly constant). Since we will only focus on geodesics in the sequel and not on the parallel transport (which differ for the three connections), we only consider from now on the (mean or 0) canonical Cartan connection, but the results would be the same for the + and -connections.

Group Geodesics

We call group geodesics the geodesics of the canonical Cartan connection. We already know that the geodesics going through identity are the one-parameter subgroups (by definition of the Cartan-Schouten connections). The canonical Cartan connection being left-invariant, the curve γ(t) = g.Exp(tx) is also a geodesic. We have indeed γ = DL g . γx and ∇ γ γ = DL g ∇ γx γx = 0. As γ(0) = DL g .x, we finally obtain that: Theorem 5. The group geodesic starting at g with tangent vector v ∈ T g G is γ (g,v) (t) = g. Exp(t.DL g (-1) .v). Thus, the (group) exponential map at point g is:

Exp g (v) = γ g,v (1) = g. Exp(DL g (-1) .v).
As noted in Theorem 3, there exists for each point g of G a normal convex neighborhood (NCN) in the sense that for any coupe of points (f, h) in this neighborhood, there exists a unique geodesic of the form Exp f (t.v) joining them which lies completely in this neighborhood. Furthermore, a NCN V e of the identity is transported by left-invariance into a NCN g.V e of any point g ∈ G.

Of course, we could have defined the geodesics using the right translations to obtain curves of the form Exp(t.DR g (-1) .v).g. In fact, those two types of group geodesic are the same and are related by the adjoint operator, as shown below. However, we should be careful that the left and right transport of the NCN at the identity lead to different NCN of a point g: g.

V = V.g. G g ∈ G V g γ(0) = f γ(t) = f. exp(t.x) h = γ(1)
Fig. 1. Group geodesic convexity. For any point g of G, there exists an open neighborhood Vg of g, such that any couple of points f and h in Vg can be joined by a unique group geodesics of the form γ(t) = f. Exp(t.x) satisfying f. Exp(x) = h and which is entirely contained in Vg. Theorem 6. Let x be in g and g in G. Then we have:

g. Exp(x) = Exp(Ad(g).x).g.
For all g in G, there exists an open neighborhood W g of e ∈ G (namely W g = V e ∩ g.V e .g (-1) where V e is any NCN of e) such that for all m ∈ W g the quantities Log(m) and Log(g.m.g (-1) ) are well-defined and are linked by the following relationship:

Log(g.m.g (-1) ) = Ad(g). Log(m).

Notice that in general the NCN W g depends on g unless we can find a NCN V e that is stable by conjugation. These equations are simply the generalization to (abstract) Lie groups of the well-known matrix properties:

G. exp(V ).G (-1) = exp(G.V.G (-1) )
and G. log(V ).G (-1) = log(G.V.G (-1) ).

Corollary 1. For all g in G, there exists an open neighborhood V g of g such that the local Exponential and Logarithmic maps of the canonical Cartan connection are well defined and the inverse of each other. Moreover, their left and right expressions are:

Exp g (v) = g. Exp(DL g (-1) .v) = g. Exp(DR g (-1) .v) for v ∈ T g G; Log g (x) = DL g . Log(g (-1) .x) = DR g . Log(x.g (-1) ) for x ∈ V g .

Bi-invariant Means in Lie Groups

Lie groups are not vector spaces in general but have a more complicated structure: instead of a (commutative) addition '+' and a scalar multiplication '.', they only have a (non-commutative in general) multiplication '×' and an inversion operator (which corresponds to the scalar multiplication by -1 for vector spaces). In the case of vector spaces, the arithmetic mean is obviously consistent with the translation and the multiplication by a scalar of input data points (equivariance rather than invariance). This means that the arithmetic mean is compatible with the algebraic structure of vector spaces. In the case of groups, the compatibility with the group structure requires the invariance with respect to left and right multiplications (the group can be non-commutative) and the inversion operator. When we translate (or inverse) a given set of samples or a probability measure, it is reasonable to desire that their mean be translated (or inversed) exactly in the same way. Since one-parameters subgroups and their relationship with the Lie algebra are key properties in a Lie group, one could expect to define a mean using these features. For instance, the Log-Euclidean mean proposed in [START_REF] Arsigny | Processing Data in Lie Groups: An Algebraic Approach[END_REF] maps the data points {x i } for which the logarithm is well defined to the Lie algebra; takes the Euclidean mean with (non-negative and normalized) weights w i and exponentiates the result:

xLE = Exp ( i w i . Log(x i )) . ( 3
)
This definition is consistent with conjugation as h.x LE .h (-1) is the log-Euclidean mean of the points h.x i .h (-1) thanks to Theorem 6. However, this definition fails to be invariant under left and right translation! A well-established approach to define a notion of mean compatible with algebraic operations is to define first a distance (or metric) compatible with these operations and then to rely on this distance to define the mean. Indeed, one can generalize the classical notion of arithmetic mean by relying on the minimal variance or dispersion in the general setting of metric spaces [START_REF] Fréchet | Les éléments aléatoires de nature quelconque dans un espace distancié[END_REF]: the Fréchet mean (also called Riemannian center of mass) of the data points x i with the non-negative weights w i is the set of points:

arg min y∈E i w i .dist(x i , y) α . ( 4
)
The case α = 2 corresponds in vector spaces to the arithmetic mean, the case α = 1 to the median. The existence and uniqueness of these means on Riemannian manifolds has been studied first by Karcher (who relax the definition to local minima) [START_REF] Karcher | Riemannian center of mass and mollifier smoothing[END_REF] and then in [START_REF] Kendall | Probability, convexity, and harmonic maps with small image I: uniqueness and fine existence[END_REF][START_REF] Le | Locating Fréchet means with application to shape spaces[END_REF][START_REF] Le | Estimation of barycenters[END_REF][START_REF] Afsari | Riemannian l p center of mass: existence, uniqueness, and convexity[END_REF][START_REF] Yang | Riemannian median and its estimation[END_REF][START_REF] Yang | Medians of probability measures in Riemannian manifolds and applications to radar target detection[END_REF]. Thus, it seems natural to investigate if we can define a Riemannian metric compatible with the Lie group operations.

Bi-invariant Metrics on Lie Groups

A Riemannian metric is a smooth collection of positive definite bilinear forms on tangent spaces of the manifold. In the case of Lie groups, we can require the metric to be left-invariant (invariant by the left translation), or right-invariant. The left-invariance requires that for any two points g and h of G and any vectors v and w of T g G, we have:

< DL h .v, DL h .w > T h.g G =< v, w > TgG .
In other words, a metric is left-invariant if all left translations are isometries. It is easy to see that all left-invariant metrics on a Lie group are determined by the inner product at the identity: they are thus in bijective correspondence with the Euclidean structures on the Lie algebra g. The right-invariance case is obviously similar. In fact, all right-invariant metrics can be obtained from left-invariant metrics by 'inversion', and vice versa. This comes from the fact that for any two elements g, h of G, we have g.h = (h (-1) .g (-1) ) (-1) . This shows that the left-translation can be obtained smoothly from one right-translation and two inversions. Using the operator Inv : f → f (-1) , we have:

L g = Inv • R g (-1)
• Inv. We put forward this fact here to simplify the comparisons between the geodesics of the left-and right-invariant metrics in Section 4.

Proposition 1. Let <, > be a left-invariant Riemannian metric defined on G.

Then the 'inverted' metric , v, w g def = < DInv| g .v, DInv| g .w > T g (-1) G .
is right-invariant with <, > e = , e .

Proof. Differentiating the equalities (h.g) (-1) = g (-1) .h (-1)

gives DInv| h.g •DL h | g = DR h (-1) | g (-1) •DInv| g , which shows directly that: DR h | g .v, DR h | g .w T h.g G = v, w TmG , i.e. ,
is right-invariant. The equality <, > e = , e comes from the fact that DInv| e = -Id, where Id is the identity operator in T e G. This can be easily seen from the classical result D Exp| e = (D Log| 0 ) (-1) = Id and the equality g (-1) = Exp(-Log(g)) which is valid in an open neighborhood of e.

Riemannian metrics which are simultaneously left-and right-invariant are called bi-invariant. For these special metrics, we have the very interesting result: Theorem 7. A left-invariant metric on a Lie group is bi-invariant if and only if for all g ∈ G, the adjoint operator Ad(g) is an isometry of the Lie algebra g, or equivalently if and only if for all elements x, y, z ∈ g:

[x, y] , z + y , [x, z] = 0. ( 5
)
Moreover, a bi-invariant metric is also invariant w.r.t. inversion. Group geodesics of G (including one-parameter subgroups) are the geodesics of such metrics.

The proof is given in [63, Chap. V] and [START_REF] Postnikov | Geometry VI: Riemannian Geometry[END_REF]Chap. 25]. Equation 5is the infinitesimal version of Ad(g) being an isometry. It actually specifies that the Levi-Civita connection of the metric considered is the canonical symmetric Cartan connection of the Lie group. An interesting consequence is that any Lie group with a bi-invariant metric has non-negative sectional curvature. Indeed, the sectional curvature in the twoplane span(x, y) for x, y ∈ g can be computed using left-invariant vector fields:

K(x, y) = R(x, y)y , x x 2 y 2 -x , y 2 = 1 4 [x, y] 2 x 2 y 2 -x , y 2 , (6)
where we used the expression R(x, y)z = -1 4 [[x, y], z] of the Riemannian curvature and Eq. 5 to move one bracket from left to right in the inner product. Thus, taking two orthonormal vectors of the Lie algebra, the section curvature reduces to K(x, y) = 1 4 [x, y] 2 which is non-negative. Since the metric inducing the notion of mean is bi-invariant, so is the mean, which is then fully compatible with the algebraic properties of the Lie group. As a consequence, this notion of mean is particularly well-adapted to Lie groups. However, contrary to left-or right-invariant metrics, which always exists, biinvariant metrics fail to exist for some Lie groups.

Compactness, Commutativity and Bi-invariant Metrics From Theorem 7, we see that if a bi-invariant metric exists for the Lie group, then Ad(g) is an isometry of g and can thus be looked upon as an element of the orthogonal group O(n) where n = dim(G). As O(n) is a compact group, the adjoint group Ad(G) = {Ad(g)/g ∈ G} is necessarily included in a compact set, a situation called relative compactness. This notion actually provides an excellent criterion, since the theory of differential forms and their integration can be used to explicitly construct a bi-invariant metric on relatively compact subgroups [63, Theorem V.5.3.].

Theorem 8. The Lie group G admits a bi-invariant metric if and only if its adjoint group Ad(G) is relatively compact.

In the case of compact Lie groups, the adjoint group is the image of a compact set by a continuous mapping and is thus also compact. Thus, Theorem 8 implies that bi-invariant metrics exist in such a case. This is the case of rotations, for which bi-invariant Fréchet means have been extensively studied and used in practical applications, for instance in [START_REF] Pennec | L'incertitude dans les problèmes de reconnaissance et de recalage -Applications en imagerie médicale et biologie moléculaire[END_REF][START_REF] Pennec | Computing the mean of geometric features -application to the mean rotation[END_REF][START_REF] Moakher | Means and averaging in the group of rotations[END_REF]. In the case of commutative Lie groups, left and right translations are identical and any left-invariant metric is trivially bi-invariant. Direct products of compact Abelian groups obviously admit bi-invariant metrics but Theorem 8 shows that in the general case, noncompact and non-commutative Lie groups which are not the direct product of such groups may fail to admit a bi-invariant metric.

There is No Bi-invariant Metric for Rigid Transformations

In biomedical imaging, the simplest possible registration procedure between two images uses rigid-body transformations which are characterized by a rotation matrix and a translation vector. Since there exists bi-invariant metrics on rotations and on translations, one could hope for the existence of bi-invariant metrics. We show below that this is not the case.

The Lie group of rigid-body transformations in the n-dimensional Euclidean space, written here SE(n), is the semi-direct product of (SO(n), ×) (rotations) and (R n , +) (translations). An element of SE(n) is uniquely represented by a couple (R, t) ∈ SO(n) R n with the action on a point x of R n being defined by (R, t).x = R.x + t. The multiplication is then (R , t ).(R, t) = (R .R, R .t + t ), the neutral element (Id, 0) and the inverse (R T , -R T .t). The fact that the product between rotations and translations is semi-direct and not direct (there is a coupling between rotation and translation multiplication) is at the heart of the the non-existence of a bi-invariant metric on the product group.

We obtain a faithful representation of SE(n) and its Lie algebra using homogeneous coordinates:

(R, t) R t 0 1 and (Ω, v) Ω v 0 0 ,
where Ω is any skew n × n matrix and v any vector of R n . In the homogeneous representation, the Lie bracket [., .] is simply the matrix commutator, which gives the following Lie bracket for the Lie algebra se(n

) = so(n) R n : [(Ω, v), (Ω , v )] = (Ω.Ω -Ω .Ω, Ω.v -Ω .v).
Proposition 2. The action of the adjoint operator Ad of the group of rigidbody transformations SE(n) at the point (R, t) on an infinitesimal displacement (Ω, v) ∈ se(n) is given by:

Ad(R, t).(Ω, v) = (R.Ω.R T , -R.Ω.R T .t + R.v).
As a consequence, no bi-invariant Riemannian metric exists on the space of rigid-body transformations (for n > 1, of course).

Such a result was already known for SE(3) [START_REF] Zefran | Metrics and connections for rigid-body kinematics[END_REF]. It is established it here for all dimensions. In the case of matrix Lie groups, we have the following formula [START_REF] Hall | Lie Groups, Lie Algebras, and Representations: an Elementary Introduction[END_REF] Ad(M ).X = M.X.M (-1) for X ∈ g. Using the classical faithful representation of rigid-body transformations in homogeneous coordinates, we get the announced expression of the adjoint: the translation 't' introduces a unbounded term which prevents the adjoint group from being bounded. Following Theorem 8, it is clear that no bi-invariant metric exists for rigid-body transformations in n-D (n > 1), and a fortiori for affine transformations. Other examples of non-compact and non-commutative groups with no bi-invariant metrics can be found in Section 4.

Our result contradicts a statement of [START_REF] Woods | Characterizing volume and surface deformations in an atlas framework: theory, applications, and implementation[END_REF] which claimed that a bi-invariant metric exists on affine transformations when n = 2. The reference backing this claim was [START_REF] Sattinger | Lie Groups and Algebras with Applications to Physics, Geometry, and Mechanics[END_REF], in which it is only stated that though SE(2) is non-compact, it has a bi-invariant measure (Chapter 7, page 92). But whereas the existence of an invariant metric determines an invariant measure (see e.g. [55, p.131]), the converse is false.

A Barycentric Definition of the Mean?

Since bi-invariant Riemannian metrics can fail to exist on Lie groups, we have to rely on a different basis to define a general notion of bi-invariant means.

Let us recall the classical definition of a mean in an affine space: the mean (or barycenter) of a set of points {x i } with (non-negative and normalized) weights w i is the unique point m that verifies the barycentric equation

Σ i w i --→ mx i = - → 0 .
Since the space is 'flat', we get the closed form expression: m = x 1 + Σ i w i . --→

x 1 x i . At the mean, the sum of the weighted displacements to each of the sample points is null, i.e. the mean is at the center of the data.

In a Riemannian manifold with Riemannian metric . m at point m, the Fréchet mean of a set of points {x i } with non-negative normalized weights {w i } are the absolute minima of the variance (the Karcher means being the local minima):

σ 2 (m) = i w i . dist(m, x i ) 2 = i w i . log m (x i ) 2 m ,
where log m is the Riemannian logarithmic map at the point m. The existence of Karcher means is ensured when the variance is finite at one point. The uniqueness of the Fréchet/Karcher mean was investigated by Karcher, Kendall and more recently by Le, Afsari and Yang [START_REF] Karcher | Riemannian center of mass and mollifier smoothing[END_REF][START_REF] Kendall | Probability, convexity, and harmonic maps with small image I: uniqueness and fine existence[END_REF][START_REF] Le | Estimation of barycenters[END_REF][START_REF] Afsari | Riemannian l p center of mass: existence, uniqueness, and convexity[END_REF][START_REF] Yang | Medians of probability measures in Riemannian manifolds and applications to radar target detection[END_REF]. We give here a simplified result of [START_REF] Kendall | Probability, convexity, and harmonic maps with small image I: uniqueness and fine existence[END_REF] revisited by [START_REF] Afsari | Riemannian l p center of mass: existence, uniqueness, and convexity[END_REF]:

Theorem 9 (Local uniqueness of the karcher mean [START_REF] Afsari | Riemannian l p center of mass: existence, uniqueness, and convexity[END_REF]). Let κ be an upper bound of sectional curvatures and inj(M) be the radius of injection (which can be infinite) of the Riemannian manifold. When the point set is contained in a geodesic ball B(x, r) with

r ≤ r * = 1 2 min{inj(M), π/ √ κ}, then there exists a G T m G m x j x i ∈ G log m (x i ) ∈ TmG log m (x j )
m satisfies: i wi log m (xi) = 0. unique Karcher mean which lies in this ball. Moreover, it is characterized by:

N i=1 w i . log m (x i ) = 0. (7)
This 'critical condition' equation can also be taken as the definition of the mean, which leads to the notion of exponential barycenter [START_REF] Emery | Sur le barycentre d'une probabilité dans une variété[END_REF][START_REF] Corcuera | Riemannian barycentres and geodesic convexity[END_REF].

A Fixed Point Iteration to Compute the Karcher Mean

An efficient iterative strategy to optimize in Riemannian manifolds is to use a Newton-like gradient descent algorithm. Newton algorithms on Riemannian manifolds were first proposed in the general context of optimization on manifolds [START_REF] Smith | Optimization techniques on Riemannian manifolds, Hamiltonian and gradient flows, algorithms and control[END_REF][START_REF] Udriste | Convex functions and optimization methods on Riemannian manifolds[END_REF]. Their convergence has been studied in depth in [START_REF] Mahony | The geometry of the Newton method on non-compact Lie groups[END_REF][START_REF] Groisser | Newton's method, zeroes of vector fields, and the Riemannian center of mass[END_REF][START_REF] Absil | Optimization algorithms on matrix manifolds[END_REF] to cite just a few of the important works. However, when the goal is to compute the Karcher mean, which is a non-linear least-squares problem, it is more efficient to use the Gauss-Newton variant which does not require the computation of the Hessian function of the Riemannian distance: this avoids implementing the connection. Although the Gauss-Newton algorithm is often presented as an approximation of the Newton method, it is more interesting to see it as the exact minimization of approximated criteria obtained at each step by linearizing the residuals [START_REF] Peeters | The Riemannian interpretation of Gauss-Newton and scoring, with application to system identification[END_REF][START_REF] Adler | Newton's method on riemannian manifolds and a geometric model for the human spine[END_REF]. When applied to the variance to compute the Karcher mean, this leads to the very simple iteration which does not require the implementation of the connection:

m t+1 = exp mt 1 N N i=1 w i . log mt (x i ) . (8)
This algorithm has been regularly used in the literature with varying justifications but always excellent numerical efficiency (see e.g. [START_REF] Pennec | L'incertitude dans les problèmes de reconnaissance et de recalage -Applications en imagerie médicale et biologie moléculaire[END_REF][START_REF] Pennec | Intrinsic statistics on Riemannian manifolds: Basic tools for geometric measurements[END_REF] for homogeneous manifolds including SO(3) and SE(3), [START_REF] Le | Locating Fréchet means with application to shape spaces[END_REF] for shape spaces). The study of the convergence of this specific algorithm was performed in [START_REF] Le | Locating Fréchet means with application to shape spaces[END_REF][START_REF] Le | Estimation of barycenters[END_REF] in the context of the Fréchet mean, while [START_REF] Groisser | Newton's method, zeroes of vector fields, and the Riemannian center of mass[END_REF] investigated more generally the convergence of algorithms of the type m t+1 = exp mt (Y (m t )) to the zeroes of the vector field Y on a Riemannian manifold.

Theorem 10 (Convergence of the Gauss-Newton Iteration on Riemannian Manifolds [START_REF] Le | Estimation of barycenters[END_REF]). Assuming that the support of the the probability is contained in a geodesic ball B(x, r) with r ≤ r * as in Theorem 9. Then the iterates define at Eq. 8 starting at any point in B(x, r) converges to the unique Karcher mean lying within the ball.

In the particular case of Lie groups provided with a bi-invariant metric (but only in this case), the metric geodesics correspond to group geodesics and the group logarithm and Riemannian logarithm are the same. Equation ( 7) can thus be simplified to:

N i=1 w i . Log(m (-1) .x i ) = 0.
Moreover, this equation is left-, right-and inverse-invariant, since it derives from a bi-invariant metric. The corresponding Gauss-Newton iteration can be be written as follows.

Algorithm 1 (Barycentric Fixed Point Iteration on Lie Groups.)

1 Initialize m 0 , for example with m 0 := x 1 . 2 Update the estimate of the mean by:

m t+1 := m t . Exp i w i . Log(m t (-1) .x i ) . ( 9
)
3 Test convergence: if Log(m (-1) t .m t+1 ) e > .σ(m t ), go to step 2. The properties of this algorithm for general Lie groups without a bi-invariant metric will be studied in depth in Section 3.5. Notice that for such Lie groups, the group geodesics generally cannot be seen as Riemannian geodesics (as the canonical Cartan connection is non metric) so that this algorithm cannot be written m t+1 = exp mt (Y (m t )) for some Riemannian metric. Thus, it does not enter into the type of iterations that are studied in [START_REF] Groisser | Newton's method, zeroes of vector fields, and the Riemannian center of mass[END_REF].

It was suggested in [START_REF] Woods | Characterizing volume and surface deformations in an atlas framework: theory, applications, and implementation[END_REF] to compute empirically bi-invariant means of invertible matrices with the same algorithm, even though no bi-invariant Riemannian metrics exist for such transformations. This works well in practice, but no precise definition of bi-invariant means was given in this work. Furthermore, the existence and uniqueness of bi-invariant means was not established, and no proof of convergence of the iterative strategy was given.

A similar algorithm was proposed to compute the Karcher mean on the Lie group of similarity transformations in dimension 3 in [25, Algorithm 1]. However, the algorithm was based on a confusion between the Riemannian and the group logarithm functions when defining the Riemannian distance [25, Eq. 9]. The same confusion was made in [25, Section 3] for the definition of the principal geodesic curves. Since similarity transformations include rigid body transformations (for which we know that there does not exist a bi-invariant metric), left-or rightinvariant Riemannian geodesics generally differ from group geodesics. Actually, the proposed algorithm was computing a bi-invariant mean as we will see below instead of a Karcher mean! The confusion was later corrected in [START_REF] Fletcher | Principal geodesic analysis for the study of nonlinear statistics of shape[END_REF] with the proper use of Riemannian logarithms.

Bi-invariant Means with Exponential Barycenters

The key idea developed in this work is the following: although bi-invariant metrics may fail to exist, the group geodesics always exists in a Lie group and one can define a bi-invariant mean implicitly as an exponential barycenter, at least locally. As will be shown in the sequel, this definition has all the desirable invariance properties, even when bi-invariant metrics do not exist. Moreover, we can show the existence and uniqueness of the bi-invariant mean provided the dispersion of the data is small enough.

Definition 3 (Bi-invariant Means).

Let {x i } be a finite set of data points belonging to the an open set V such that Log(g (-1) .x i ) and Log(x i .g (-1) ) = Ad(g). Log(g (-1) .x i ) exists for any point g ∈ V, and {w i } be associated (normalized) non-negative weights. The points m ∈ V g which are solutions of the following group barycentric equation (if there are some) are called bi-invariant means. i w i . Log(m (-1) .x i ) = 0 [START_REF] Basser | MR diffusion tensor spectroscopy and imaging[END_REF] This definition is close to the Riemannian center of mass (or more specifically the Riemannian average) of [START_REF] Groisser | Newton's method, zeroes of vector fields, and the Riemannian center of mass[END_REF] but uses the group logarithm instead of the Riemannian logarithm. As in [START_REF] Groisser | Newton's method, zeroes of vector fields, and the Riemannian center of mass[END_REF], the definition implicitly depends on the open set V. Using the convex hulls of the points as proposed in [START_REF] Groisser | Newton's method, zeroes of vector fields, and the Riemannian center of mass[END_REF][START_REF] Afsari | Riemannian l p center of mass: existence, uniqueness, and convexity[END_REF] could be a solution to solve this issue.

Theorem 11 (Left, Right and Inverse Invariance of Bi-invariant Means).

The bi-invariant means are left-, right-and inverse-invariant: if m is a mean of {x i } and h ∈ G is any group element, then h.m is a mean of {h.x i }, m.h is a mean of the points {x i .h} and m (-1) is a mean of {x (-1) i }.

Proof. If m is a mean of the points {x i } and h ∈ G is any group element, then Log((h.g) (-1) .h.x i ) = Log(g (-1) .x i ) obviously exists for all points h.x i and the point h.m ∈ V h.g = h.V g is a solution of the barycentric equation 1) .h.x i ) = 0, which shows that h.m is a mean of the points {h.x i }. For the right-invariance, we have to apply Theorem 6: Ad(m). 1) ).

i w i . Log((h.m) (-
i w i . Log(m (-1) .x i ) = i w i . Log(x i .m (-
Since Ad(m) is invertible, the usual barycentric equation, which is left-invariant, is equivalent to a right-invariant barycentric equation, and the same argument as for left-invariance can be used to show that m.h is a mean of the points {x i .h}. Now, to prove the invariance with respect to inversion, note that since Log(x (-1) ) = -Log(x):

(-1) × N i=1 w i . Log(m (-1) .x i )) = N i=1 w i . Log(x (-1) i .(m (-1) ) (-1) ).
This shows that whenever m is a bi-invariant mean of {x i }, m (-1) is a mean of {x (-1) i }.

Since there exists a normal convex neighborhood of each point in which the logarithmic map is well defined in any affine connection space (and in particular in a Lie group equipped with the canonical Cartan connection, see Sec. 2.4), this definition is well posed locally. In fact we have much more: the bi-invariant mean is locally unique. To define the 'locality' we rely in the following any norm . on g such that for all x, y in g, we have: [x, y] ≤ x . y . Since Log x (y) = Log(x -1 .y) is well defined for all x, y in a NCN of m, the function d(x, y) = Log(x -1 .y) can be used to measure distances in this neighborhood.

Theorem 12 (Local Existence and Uniqueness of the Bi-invariant Mean). If the data points {x i } belong to a sufficiently small normal convex neighborhood V of some point g ∈ G, then there exists a unique solution of Eq. ( 10) in V. Moreover, the iterated fixed point strategy of Algorithm 1 converges at least at a linear rate towards this unique solution, provided the initialization is close enough to g. The proof will be given in Sections 3.6 and 3.7.

As in the case of the Karcher mean, there is a closed form for the bi-invariant mean of two points since this point is on the geodesic joining them. Proposition 3. Let x be in G and y be in a normal convex neighborhood of x. Then the bi-invariant mean of x and y (with weights 1 -α and α) is given by: m = x. Exp (α Log(x (-1) .y)) = x.(x (-1) .y) α .

(

) 11
Notice that the explicit formula given by Eq. ( 11) is quite exceptional. In general, there will be no closed form for the bi-invariant mean, as soon as there are more than 2 points. However, there are some specific groups where a closed form exists for the bi-invariant mean in all cases, and we will detail in Section 4 some examples of this rare phenomenon.

Existence of the Bi-invariant Mean

Let us now turn to the proof of Theorem 12. Taking y i = g (-1) .x i , we can focus on the proof of this theorem only around the identity e. The fixed point mapping Φ(m) = m. Exp N i=1 w i . Log(m (-1) .x i ) of Algorithm 1 plays a central role in our approach. Proposition 4. Let {w i } be a set of fixed non-negative weights. Then the mapping Ψ : g N +1 → g defined by

Ψ (v 1 , ..., v N , z) = Log Exp(z). Exp N i=1 w i . Log( Exp(-z). Exp(v i ))
is analytic near 0.

Proof. This comes from the fact that Ψ is a composition of other analytic mappings: namely the BCH mapping defined in Subsection 2.2, the mapping v → -v and the weighted sum (v 1 , ..., v N ) → i w i .v i . This suffices to ensure that near 0, Ψ is the sum of an absolutely converging infinite multivariate series whose variables are the v 1 , ..., v N and z.

Corollary 2. If the points x i and m belong to a sufficiently small neighborhood of e, we have the following development:

Log(Φ(m)) = i w i . Log(x i ) + O(( N i=1 Log(x i ) + Log(m) ) 2 ). ( 12
)
Proof. Successive applications of the BCH formula (Section 2.2) yield the first term of the infinite series of Ψ , which is intuitively the usual arithmetic mean obtained when all the data and m commute. The bound obtained is a direct consequence of the fact that Ψ is analytic: the order of any remaining term of the infinite series is equal or larger to two and as a consequence the other terms can be bounded by a O((

N i=1 Log(x i ) + Log(m) ) 2 ).
Corollary 3. For all α in ]0, 1[, there exists a R > 0 such that whenever i ) ≤ α.R and Log(m) ≤ R then we also have Log(Φ(m)) ≤ R.

Proof. Notice in Eq. ( 12) that the norm of the first order term is less than or equal to α.R. Since the second-order term is of O((

N i=1 Log(x i ) + Log(m) ) 2
), there exists a constant C such that the second-order term is bounded in the following way:

O   N i=1 Log(x i ) + Log(m) 2   ≤ C.(N.α N + 1).R 2 . Since R 2 is a O(R), C.(N.α N + 1).R 2 ≤ (1 -α).
R provided that R is sufficiently small. From this we obtain Log(Φ(m)) ≤ α.R+(1-α).R = R, which concludes the proof.

Corollary 3 shows that provided the x i and m are close enough to e, we can iterate indefinitely Φ over the successive estimates of the 'mean' of the x i . This shows that the barycentric fixed point iteration of Algorithm 1 is stable and remains indefinitely well-defined when the data is close enough to e.

Existence of the Bi-invariant Mean Let α be in ]0, 1[ and R > 0 such that for all i Log(x i ) ≤ α.R and Log(m) ≤ R. Then, we know from Corollary 3 that Log(Φ(m)) ≤ R. Now, let us define B R = {m ∈ G : Log(m) ≤ R}. From Corollary 3, we know that Φ defines a mapping from B R to B R . A point m ∈ B R is a solution of Eq. ( 10) if and only if m is a fixed point of Φ, i.e. Φ( m) = m.

Theorem 13 (Brouwer's Fixed Point Theorem [START_REF] Samelson | On the Brouwer fixed point theorem[END_REF]). Let Ψ : B n → B n be a continuous mapping, where B n is the n-dimensional Euclidean closed ball, i.e. B n = {x ∈ R n : i (x i ) 2 ≤ 1}. Then Ψ has at least one fixed point. Corollary 4. With the assumptions made at the beginning of this subsection, Eq. ( 10) has at least one solution in B R .

Proof. Let us define

Ψ : Log(B R ) → Log(B R ) by Ψ (v) = Log(Φ( Exp(v))). Since Log(B R
) is precisely a closed ball, and thus homeomorphic to the Euclidean closed ball, then Brouwer's theorem applies and guarantees the existence of at least one fixed point of Ψ , which is also a fixed point of Φ and therefore a solution of Eq. ( 10).

The Barycentric Fixed Point Iteration is Converging

In order to prove the convergence of the iterative strategy to a fixed point of Φ, we need a more powerful fixed point theorem.

Theorem 14 (Banach Fixed Point Theorem [9]). Let (E, d) be a complete metric space and f : E → E be a K-contraction, i.e. for all x, y of E, d(f (x), f (y)) ≤ K.d(x, y), with 0 < < 1. Then f has a unique fixed point p in E and for all sequence (x n ) n>0 verifying x n+1 = f (x n ), then x n → p when n → +∞, with at least a K-linear speed of convergence.

Here, (B R , d) is the complete metric space in which the successive evaluations of the 'mean' live. The distance d is simply given by d(m, n) = Log(m) -Log(n) . To obtain the existence, uniqueness of a solution of Eq. ( 10) and linear convergence of our iterative scheme to this point, it only remains to show that Φ is a contraction. This leads to the following Proposition: Proposition 5. When the R in Corollary 3 is chosen small enough, Φ is a contraction.

Proof. Let us consider E = Log(B R ) with Θ : E → E defined as in the proof of Corollary 4 by Θ(v) = Log(Φ( Exp(v))). The key idea is to see that Θ is smooth with respect to Log(m) and the ( Log(x i )), with the property that the norm of the differential of Θ is uniformly bounded in the following way:

D Log(m) Θ ≤ O( Log(m) + i Log(x i ) ). ( 13
)
In fact, Eq. ( 13) is a simple consequence of the fact that Ψ is analytic: the partial derivative D Log(m) Θ is therefore also analytic. Its value at 0 is precisely 0, and therefore all the terms of its infinite series are of order one or larger, which yields the bound in O( Log(m) + i Log(x i ) ).

With the bound given by Eq. ( 13), we can ensure that when R is small enough, there exists β in ]0, 1[ such that D Log(m) Θ ≤ β for all m. Then we have the classical bound:

Θ(v) -Θ(w) ≤ (sup z∈E D z Θ ) v -w ≤ β v -w .
Since β < 1, Θ is by definition a contraction, and so is Φ.

Corollary 5. As a consequence, when the data {x i } are given close enough to e, there exists an open neighborhood of e in which there exists a unique solution to Eq. [START_REF] Basser | MR diffusion tensor spectroscopy and imaging[END_REF]. Moreover, the iterative strategy given above always converges towards this solution, provided that the initialization to this algorithm is chosen sufficiently close to the data (so that Corollary 2 can apply). Last but not least, the speed of convergence is at least linear.

Proof. Simply apply the Banach fixed point theorem to Φ and recall that being a fixed point of Φ is equivalent to being a solution of Eq. [START_REF] Basser | MR diffusion tensor spectroscopy and imaging[END_REF].

We have rigorously generalized to any real Lie group the notion of bi-invariant mean normally associated to bi-invariant Riemannian metrics, even in the case where such metrics fail to exist. This novel mean has all the desirable invariance properties, and can be iteratively computed in a very efficient way. From a theoretical point of view, the methods used in this Section, based on contraction theorems to show the convergence of an iteration strategy, are quite close to the ones used in [START_REF] Le | Estimation of barycenters[END_REF][START_REF] Groisser | Newton's method, zeroes of vector fields, and the Riemannian center of mass[END_REF] to analyze the existence and uniqueness of the Fréchet/Karcher mean in Riemannian manifolds. However, the use of the canonical Cartan connection brings additional properties since we can treat the problem in the Lie algebra only. It would be interesting to carefully compare the proofs to better understand what is specific to the use of a Riemannian metric, what is due to the use of the canonical Cartan connection, and what is generic for affine connection spaces.

As usual with means in manifolds, the bi-invariant mean is unique only if the data are close enough to one another: the dispersion should not be too large. In the next section, we will see more precisely in various situations which practical limitation is imposed on the dispersion of the data. One does not seem to lose much in this regard with respect to existing Riemannian bi-invariant means: we will show for example that the bi-invariant mean of rigid-body transformations exists if and only if the bi-invariant mean of their rotation parts exists.

Bi-invariant Means in Selected Matrix Lie Groups

Let us now detail several insightful cases where the algebraic mean can be explicitly or directly computed, without using an iterative scheme.

Scalings and Translations in n-D

Here, we will devote some time to a very instructive group: the group of scalings and translations in n-D. The study of this (quite) simple group is relevant in the context of this work, because it is one of the most simple cases of non-compact and non-commutative Lie groups which does not possess any bi-invariant Riemannian metric. This group has many of the properties of rigid-body or affine transformations, but with only n + 1 degrees of freedom, which simplifies greatly the computations, and allows a direct 2D geometric visualization in the plane for n = 1. For these reasons, this is a highly pedagogical case. In the rest of this Subsection, we will let this group be written ST (n).

Following the notations of Section 3.2, an element g of ST (n) can be uniquely represented by a couple (λ, t) in R + R n where λ corresponds to the scaling factor and t to the translation part. We define the action of (λ, t) ∈ ST (n) on a vector of x ∈ R n by: (λ, t).x = λ.x + t. Accordingly, the composition in ST (n) is: (λ , t ).(λ, t) = (λ .λ, λ .t + t ) and inversion is (λ, t) (-1) = (1/λ, -t/λ). The commutator is [(µ, t), (µ , t )] = (0, µ.v -µ .v). This example shows that the semi-direct product of two commutative groups may lead to a non-commutative one.

The elements of the Lie algebra are of the form (µ, v), where µ ∈ R and v ∈ R n and the group exponential Exp(µ, v) has the form Exp(µ, v) = (e µ , v.(e µ -1)/µ) , where e λ is the scalar exponential of λ. The Taylor expansion (e x -1)/x = 1 + x/2 + O(x 2 ) shows that the formula is well posed for µ close or equal to zero. Thus, we see that the group exponential is simply given by the scalar exponential on the scaling part, whereas the translation part mixes the multiplicative and additive influences of both components. Moreover, we see geometrically that in the upper half space R + ×R n , the curve given by Exp(s.(µ, v)) with s varying in R is on a straight line, whose equation is t = v.(λ -1)/µ (µ and v are parameters).

The entire space ST (n) is a normal convex neighborhood: any two points can be joined by a unique group geodesic. In particular, the group logarithm is always well-defined and given by: Log(λ, t) = ln(λ), t.

ln(λ) 1 -λ where ln(λ) is the natural (scalar) logarithm of λ. The Taylor expansion ln(λ)/(λ-1) = 1 + (1 -λ)/2 + O((1 -λ) 2 ) shows that the above formula and the following ones are numerically stable around λ = 1. As for the exponential, we get the classical logarithm on the scaling part and a mixture of the multiplicative and additive logarithms on the translation part. We recall that in the case of an additive group such as (R n , +), both additive exponential and logarithm are simply the identity, which is also what we get here when there is no scaling. The unique group geodesic joining (λ, t) and (λ , t ) has the form γ(s) = (λ, t). Exp(s.(µ, v)) with s in [0, 1], where the parameters (µ, v) are given by:

(µ, v) = ln λ λ , t -t λ . ln(λ /λ) λ /λ -1 . ( 14
)
Absence of Bi-invariant Metrics. ST (n) is one of the most simple noncompact and non-commutative Lie groups. As expected for such Lie groups, it has no bi-invariant metric. To show this, we have to analyze the boundedness of the adjoint group of ST (n). The group can be faithfully represented by the subgroup of triangular matrices of the form λ.Idn t 0 1

. The adjoint is:

Ad((λ, t)).(µ, v) ∼ λ.Id n t 0 1 . µ.Id n v 0 0 . 1 λ .Id n -t λ 0 1 = (µ, λ.v -t.µ).
Both factors 't' and 'λ' in λ.v -t.µ are not bounded and thus Ad(ST (n)) cannot be bounded. As a consequence, ST (n) has no bi-invariant metric. Both (R + , ×) and (R n , +) are commutative and thus have bi-invariant metrics, but their semidirect product has no such metric.

A Closed Form for the Bi-invariant Mean. Here, since we have explicit formulas for the group exponential and logarithm, one can use these formulas to try to solve directly the barycentric Equation ( 10).

Proposition 6. Let {(λ i , t i )} be a set of points in ST (n) and {w i } be associated non-negative (normalized) weights. Then the bi-invariant mean ( λ, t) is given explicitly by:

λ = exp( i w i . ln(λ i )), (weighted geometric mean of scalings), t = 1 Z i w i .α i .t i , (scalings reweighed arithmetic mean of translations), with α i = ln(λi/ λ) λi/ λ-1 = 1+ 1 2 1 -λ i / λ +O 1 -λ i / λ 2 and Z = i w i .α i .
Proof. Just replace in the barycentric equation the exponentials and logarithms by the formulas given above. Since the scaling component is independent from the translation one, we simply obtain the geometric mean, which is the biinvariant mean for positive numbers. The translation part can be handled simply by using directly Eq. ( 14), which yields this simplified expression for the barycentric equation:

i w i t i - t λ . ln(λ i / λ) λ i / λ -1 = 0.
Comparison Between Group and Metric Geodesics. In Figure 3, one can visually compare the group geodesics to some of their left-invariant and rightinvariant (metric) counterparts for the group ST (1). Interestingly, one of the leftinvariant metrics induces an isometry between this group and the Poincaré halfplane model for hyperbolic geometry. The scalar product of this scalar metric is the most simple at the point (1, 0): it is the usual Euclidean scalar product. Geodesics take a very particular form in this case: they are the set of all the semicircles perpendicular to the axis of translations and of all (truncated below the axis of translations) lines perpendicular to the axis of translations (these lines can be seen as semicircles of infinite diameter anyway). Thanks to Proposition 1, we know that the right-invariant Riemannian metric whose scalar product at (1, 0) is the same as the previous metric can be obtained simply by 'inverting' this left-invariant metric. As a consequence, its geodesics can be computed simply by inverting the initial conditions, computing the associated left-invariant geodesic and finally inverting it. As a consequence, the geodesics of the right-invariant metric visualized in Fig. 3 are somehow 'inverted semicircles'. In fact, simple algebraic computations show that these geodesics are all half hyperbolas.

The simple form taken by left-invariant geodesics is exceptional. In general, there are no closed form solutions for neither the left-nor the right-invariant geodesics, and group geodesics are simpler to compute, since in most practical cases they only involve the computation of a matrix exponential and a matrix logarithm, for which very efficient methods exist [START_REF] Higham | The scaling and squaring method for the matrix exponential revisited[END_REF][START_REF] Cheng | Approximating the logarithm of a matrix to specified accuracy[END_REF].

The Heisenberg Group

This is the group of 3D upper triangular matrices M of the form:

M =   1 x z 0 1 y 0 0 1   .
To simplify notations, we will write an element of this group (x, y, z). The multiplication is (x 1 , y 1 , z 1 ).(x 2 , y 2 , z 2 ) = (x 1 + x 2 , y 1 + y 2 , z 1 + z 2 + x 1 .y 2 ). Thus the first two parameters live in a 2D additive group which is independent of the third parameter, whereas the third additive parameter is influenced by the first two. The Heisenberg group is thus a semi-direct product of (R 2 , +) and (R, +), which is not commutative. The inversion is (x, y, z) (-1) = (-x, -y, -z + x.y) with neutral element (0, 0, 0).

As in the ST (n) case, the entire Heisenberg group is a normal convex neighborhood and we have:

Exp(u, v, w) = (u, v, w + 1 2 .u.v), Log(x, y, z) = (x, y, z -1 2 x.y).
The unique group geodesic joining (x, y, z) and (x , y , z ) is of the form γ(s) = (

where the parameters (u, v, w) are given by:

(u, v, w) = x -x, y -y, z -z + 1 2 .(x.y -x .y + x.y -x .y) . (15)
Bi-invariant Metrics and Bi-invariant Means. As in the ST (n) case, no bi-invariant metric exists and one has the closed form for the bi-invariant mean. Interestingly, the bi-invariant mean yields a simple arithmetic averaging of the first two parameters. The third parameter is also averaged arithmetically, except that this arithmetic mean is 'corrected' by a quadratic function of the first two parameters of the data.

Proposition 7. The action of the adjoint operator Ad of the Heisenberg group at a point (x, y, z) on an infinitesimal displacement (u, v, w) is given by: Ad(x, y, z).(u, v, w) = (u, v, -y u + x v + w).

As a consequence, no bi-invariance metric exists for the Heisenberg group.

Proof. The last coordinate is unbounded, which prevents compactness.

Proposition 8. Let {(x i , y i , z i )} be a finite set of points in the Heisenberg group and {w i } be associated non-negative (normalized) weights. Then the bi-invariant mean (x, ȳ, z) is given explicitly by:

(x, ȳ, z) = i w i x i , i w i y i , i w i z i + 1 2 (( i w i x i ) . ( i w i y i ) -i w i x i .y i ) .
Proof. Just replace in the barycentric equation the exponentials and logarithms by the formulas given above. Since the first two components are additive and independent from the third one, their bi-invariant mean is simply their arithmetic mean. The third coefficient case can be handled simply using directly Eq. ( 15), which yields this simplified expression for the barycentric equation:

i w i z i -z + 1 2 .(x.ȳ -x i .y i + x.y i -x i .ȳ) = 0.

Scaled Upper Unitriangular Matrix Group

We can generalize the results obtained on the Heisenberg group to the following subgroup of triangular matrices:

Definition 4. Let U T (n) be the group of n × n scaled upper unitriangular matrices (upper triangular with scaled unit diagonal). Such matrices have the form:

M = λ.Id + N,
where λ is any positive scalar, Id the identity matrix and N an upper triangular nilpotent matrix (N n = 0) with only zeros in its diagonal.

The Heisenberg group is the subgroup of matrices of U T (3) whose λ is always equal to 1. The situation in this case is particularly nice, since thanks to the fact that N is nilpotent, one can perform exactly all the usual algebraic operations in U T (n). The group multiplication and inversion are:

M .M = (λ .Id + N ).(λ.Id + N ) = (λ .λ).Id + (λ .N + λ.N + N .N ). M (-1) = (λ.Id + N ) (-1) = λ (-1) . Id + N λ ( -1)
= λ (-1) .

n-1 k=0

(-1) k . N k λ k .
The group exponential and logarithm are:

Exp(X) = exp(µ.Id + Y ) = exp(µ.Id). exp(Y ) = e µ . n-1 k=0 (Y ) k k! . Log(M ) = Log (λ.Id). Id + 1 λ .N = ln(λ).Id + n-1 k=1 (-1) k+1 k N k λ k .
Using these closed forms, one can derive the following equation:

Log(M .M ) = ln(λ .λ).Id + n-1 k=1 (-1) k+1 k . 1 λ .N + 1 λ .N + 1 λ .λ .N.N k ,
which in turn allows to compute the equation satisfied by the bi-invariant mean M = λ.Id + N in U T (n): 1) ).Id

0 = i w i Log( M .M i (-1) ) = -i w i Log( M (-1) .M i ) 0 = i w i ln( λ.λ i ( -
+ i w i n-1 k=1 (-1) k+1 k . 1 λi (-1) .N i (-1) + 1 λ . N + 1 λ.λi (-1) .N i (-1) . N k , (16)
where N i (-1) is the nilpotent part of M i (-1) . From Eq. ( 16), we see that λ is simply the geometric mean of the λ i , and that the coefficient of N can be recursively computed, starting from coefficients above the diagonal. The key idea is that the k th power of a nilpotent matrix N will have non-zero coefficients only in its k th upper diagonal.

As a consequence, to compute the coefficients of M above the diagonal, one only needs to take into account the following terms: N i (-1) /λ i (-1) + N / λ. These coefficients will simply be a weighted arithmetic mean of the coefficients in the data, the weights being equal to (w i .λ i / λ)/S with S = j w j .λ j / λ. Using this result, then one can compute the coefficients above, which are a weighted arithmetic mean of the corresponding coefficients in the data, with a quadratic correction involving the previous coefficients. The same phenomenon appears for the next set of coefficients above, with an even more complex correction involving all the previously computed coefficients. One can continue this way until all the coefficients of the mean have been effectively computed.

General Rigid-Body Transformations

We use in this section the notations previously introduced in Section 3.2. The group exponential can be computed using directly the matrix representation, or by identifying the one-parameter subgroups of SE(n). It is given by:

Exp(Ω, v) = e Ω , e Ω . 1 0 e -u.Ω du .v ,
where e Ω is the matrix exponential of Ω.

Decomposition of n-D Rotations into 2-D Rotations From classical linear algebra, we know that the spectral decomposition of a rotation matrix R has a very special form. Indeed, the characteristic polynomial P (λ) = det(R -λ.Id n ) is a real polynomial of degree n. Thus the n complex eigenvalues are actually conjugate by pairs (or real) and the polynomial can be factored into at most n/2 quadratic terms (potentially with multiplicity) and real linear terms. The conservation of the norm by the rotation ( R.x = x ) shows that the modulus of all the eigenvalues is 1. Thus, eigenvalues are e ±iθj or 1. Since a rotation is a normal matrix, it can be diagonalized and we conclude that every rotation matrix, when expressed in a suitable coordinate system, partitions into n/2 independent 2D rotations [START_REF] Horn | Matrix analysis[END_REF]: R(θ j ) = cos(θ j ) -sin(θ j ) sin(θ j ) cos(θ j ) = exp θ j 0 -1 1 0 .

Conversely, each skew symmetric matrix Ω decomposes the space R n in a direct sum of mutually orthogonal subspaces, which are all invariant under Ω [START_REF] Horn | Matrix analysis[END_REF]. The decomposition is of this form:

k (possibly equal to zero) 2-dimensional vector subspaces E j on which Ω acts non trivially. -A single subspace F of dimension n -2.k (the orthogonal complement of the span of other subspaces), which is the kernel of Ω.

For any E j , there exists an orthonormal basis of E j such that Ω restricted to E j is in this basis of the following matrix form: θj

0 -1 1 0
where θ j ( = 0) is the j th angle of rotation of the n-dimensional rotation e Ω .

Existence of the Logarithm. Since we have a faithful representation of SE(n) in terms of matrices, we can use the matrix criterion for the existence of the principal logarithm: from Subsection 2.2, we know that an invertible matrix with no (complex) eigenvalue on the closed half-line of negative real numbers has unique matrix logarithm with eigenvalues having imaginary parts in ]-π, π[. This means that the angles of the previous n/2 2D rotations decomposing the rotation R should not go outside ] -π, π[ if we want the logarithm of R to be well-defined. Otherwise, one cannot define a unique logarithm. This is only the case for 2D rotations of 180 degrees, whose two 'smallest' real logarithms are the following: 0 -π π 0 and 0 π -π 0 .

Going back to SE(n), we have the following result:

Proposition 9. The logarithm of a rigid-body transformation (R, t) is welldefined if and only if the logarithm of its rotation part R is well-defined, i.e. if the angles of the 2D rotations of its decomposition are less than π in absolute value.

Proof. The logarithm of (R, t) is well-defined if and only if the matrix representing (R, t) has a principal logarithm, which is equivalent to the fact that it has no eigenvalue on the closed negative line. Then, this is equivalent to the fact that R has no eigenvalue on the closed negative line, since the eigenvalues of the upper triangular matrix (in terms of blocks)

R t 0 1
depend only on the blocks in its diagonal, i.e. only on R, and not t. As a consequence, the logarithm of a rigid-body transformation is well-defined if and only if the logarithm of its rotation part is well-defined.

Criterion for the Existence of the Bi-invariant Mean. We have seen in Section 3.2 that no bi-invariant metric exists in the rigid-body case. One may now ask the question: is there a simple criterion for the existence/uniqueness of the bi-invariant mean of rigid-body transformations? When bi-invariant metrics exist, one has the criterion given by Theorem 9: the mean exists and is unique as long as the data are include in a geodesic ball of radius strictly less than r * = 1 2 min{inj(M), π/ √ κ}.

Let us investigate first the n-D rotations part with the bi-invariant Froebenius metric X , Y = 1 2 Tr(XY T ), which lead to the Riemannian (squared) distance dist(Id n , exp(Ω)) 2 = 1 2 Tr(ΩΩ T ) for any skew-symmetric matrix Ω ∈ se(n). Since any rotation can be decomposed into independent 2D rotations and since the trace does not depend on the basis in which we express our rotation, the Riemannian (squared) distance of a rotation R to the identity is the sum the squares of the 2D angles: dist(R, Id) 2 = i θ 2

i . The minimal distance to the cut locus is obtained for each 2D rotation independently, so that we have inj(Id) = inj(SO(n)) = π.

The sectional curvature in the two-plane spanned by two orthonormal vectors x, y ∈ g is K(x, y) = 1 4 [x, y] 2 according to Eq. 6. We can get the sectional curvature everywhere else by left or right translation. Let E ij = e i e T j -e j e T i be the matrix with 1 for the coefficient ij, -1 for the coefficient ji and 0 everywhere else. One verifies that the n(n -1)/2 vectors E ij with j > i form an orthonormal basis of the Lie algebra of skew-symmetric matrices. Now, the commutator of these basis vectors

[E ij , E kl ] = δ jk E il + δ il E jk + δ jl E ki + δ ki E lj ,
is non-zero if one of the indices i, j is equal to one of the indices k, l. In the case j = l for instance then we get [E ij , E kj ] = E ki and thus the sectional curvature is K(E ij , E kj ) = 1/4. We obtain the same result for the other cases where the commutator is non-zero. As a conclusion, the sectional curvature is bounded above by κ = 1/4, and the maximal radius is r * = 1 2 min{π, 2π} = π/2. Thus, if all the data are included in a geodesic ball of radius r < r * = π/2, then the largest 2D angle of rotation of R j (-1) .R i (and thus all of them) is less than 2r < π for any couple of data R i and R j . In consequence, the principal logarithm of R j (-1) .R i is well-defined. Thus, in the general conditions of existence and uniqueness of the Riemannian mean of rotations, the rotation part of the bi-invariant mean is well-defined. Remarkably, this is sufficient to guarantee the existence and uniqueness of the bi-invariant mean of rigid-body transformations. Theorem 15. Let {R i , t i } be a set of rigid-body transformations belonging to a geodesic ball of radius r < π/2. Then (according to Theorem 9) the bi-invariant Riemannian mean of their rotation parts is well-defined and there exists a unique bi-invariant mean for on SE(n).

Proof. Let R be the bi-invariant Riemannian mean of the rotation parts of the data. The bi-invariant mean of the data is necessarily of the form ( R, t), since in an open neighborhood of the rotation parts, R is the only solution of the rotation part of the bi-invariant barycentric equation, which does not depend on translations. R is included in the same geodesic ball as the rotations and therefore, for any R i of the data, the 2D angles of rotation of R(-1) .R i are all smaller than or equal to π -C, where C is a positive constant smaller than π.

Let us now check whether there exists a unique translation t, which satisfies the barycentric equation of bi-invariant means, which writes here:

i w i . Log(( R, t).(R i , t i ) (-1) ) = 0. ( 17
)
From Proposition 9, we know that the logarithm of ( R, t).(R i , t i ) (-1) ) is welldefined for any value of t, since the logarithm of R.R i T is well-defined for all i. Now, does there exist a unique value of t (by definition t) satisfying Eq. ( 17)?

We have:

( R, t).(R i , t i ) (-1) = ( R.R T i , R.(-R T i .t i ) + t). Let us write M (Ω) = e Ω .
1 0 e -u.Ω du. In terms of translations, Eq. ( 17) writes:

i w i .M log( R.R T i ) (-1) . R.(-R T i .t i ) + t = 0. ⇐⇒ i w i .M log( R.R T i ) (-1) . t = i w i .M log( R.R T i ) (-1) .R T i .t i . (18)
Thus, we see that the existence and uniqueness of t resorts to the invertibility of the matrix i w i .M log( R.R T i ) (-1) . Under the assumptions described above on rotations, this matrix is invertible by Lemma 1 below, which concludes the proof. Lemma 1. Let {Ω i } be a set of skew symmetric matrices such that the norm of their largest (complex) eigenvalue is smaller than π -C, with C > 0. Let M (Ω) be equal to e Ω .

1 0 e -u.Ω du for any skew symmetric matrix. Then for all Ω i , M (Ω i ) is invertible, and for any non-negative weights {w i }, i w i .M (Ω i ) (-1) is also invertible.

Proof. In an appropriate orthonormal basis, the skew symmetric matrix Ω can be decomposed into a zero matrix in the kernel of Ω and k (possibly equal to zero) 2-dimensional matrices of the form θj 0 -1 1 0

, in the mutually orthogonal subspaces E j , where θ j ( = 0) is the j th angle of rotation of the n-dimensional rotation e Ω .

We can explicitly compute M (Ω) in the above subspaces. First, in the kernel F of Ω, M (Ω) is simply the identity. In the subspace E j , we have: exp(Ω)| Ej ∼ cos(θ j ) -sin(θ j ) sin(θ j ) cos(θ j ) .

A few extra manipulations yield: .

M (Ω)| Ej = exp(Ω).
Thus M (Ω) is invertible whenever 0 < |θ j | < 2.π for all j(which is more than we need), since the determinant of the latter matrix is equal to 2(1-cos(θ j ))/θ 2 j , which is positive for |θ j | < 2.π. Furthermore, a direct computation shows that the inverse of M (Ω) takes the following form in E j :

M (Ω) (-1) | Ej ∼ θj . sin(θj ) 2.(1-cos(θj ) θj 2 - θj 2 θj . sin(θj ) 2.(1-cos(θj )
.

For |θ j | < π -C, some elementary calculus shows that there exists a constant K > 0, such that θj . sin(θj ) 2.(1-cos(θj ) > K. As a consequence, we have:

M (Ω) (-1) | Ej ∼ a b -b a ,
with a > K > 0. Under the assumption that |θ j | < π -C for all j, this implies that M (Ω) (-1) = S + A, where S is a symmetric positive-definite matrix with all its eigenvalues larger than K and A is a skew symmetric matrix. Then let us take a set of skew symmetric matrices {Ω i } whose eigenvalues are smaller than π -C. Any convex combination of the M (Ω i ) (-1) writes:

i w i .M (Ω i ) (-1) = i w i .S i + i w i .A i = S + Ã,
where S is still symmetric positive-definite and à is skew symmetric. To see that this quantity is invertible, remark that ( S+ Ã).x = 0 implies x T . S.x+x T . Ã.x = 0. But since x T . Ã.x = (x T . Ã.x) T = -x T . Ã.x = 0, then ( S + Ã).x = 0 implies x T . S.x = 0, which is equivalent ( S is symmetric positive-definite) to x = 0. Consequently S + à is invertible and this ends the proof.

2D Rigid Transformations

Contrary to the general case, the bi-invariant mean of 2D rigid-body transformations have a closed form. The underlying reason is that SO(2), the group of 2D rotations, is commutative. As a consequence, one can compute explicitly the bi-invariant mean of the rotation parts of the data and deduce from it the translation part using the barycentric equation, like in the proof of Theorem 15.

More precisely, we have:

Proposition 10. Let {(R i , t i )} be a set of 2D rigid-body transformations, such that the angles of rotation of the rotations R i .R T j are all strictly less than π. Then the bi-invariant mean ( R, t) associated to the weights {w i } is given explicitly by:

R = R 1 . exp + i w i . log R T 1 .R i , t = i w i .Z (-1) .M log R.R T i (-1) .R T i .t i , (19)
with the following formulas for M and Z: 1) .

M 0 -θ θ 0 (-1) def = θ. sin(θ) 2.(1-cos(θ) θ 2 -θ 2 θ. sin(θ) 2.(1-cos(θ) , Z def = i w i .M log( R.R T i ) ( -
Example of Bi-invariant Mean. Let us take a look at the example chosen in [56, p.31

]. Let T 1 = R(π/4) , [- √ 2/2, √ 2/2)] T , T 2 = (Id 2 , [ √ 2, 0] T ) and T 3 = (R(-π/4) , [- √ 2/2, - √ 2
/2] T ) be three rigid-body transformations in 2D.

We can compute exactly the bi-invariant mean of these rigid-body transformations with Eq. [START_REF] Corcuera | Riemannian barycentres and geodesic convexity[END_REF]. A left-invariant Fréchet mean can also be computed explicitly in this case thanks to the simple form taken by the corresponding geodesics. And finally, thanks to Proposition 1, the analogous right-invariant Fréchet mean can be computed by inverting the data, computing their leftinvariant mean and then inverting this Fréchet mean. The log-Euclidean mean can also easily be computed in closed form. This yields (after a number of simple but tedious algebraic manipulations):

-Left-invariant Fréchet mean: (Id 2 , [0, 0] T ), -Log-Euclidean mean: Id 2 , [ √ 2-π 4 3 , 0] T Id 2 , [0.2096, 0] T , -Bi-invariant mean: Id 2 , [ √ 2-π 4 1+ π 4 .( √
2+1) , 0] T (Id 2 , [0.2171, 0] T ), -Right-invariant Fréchet mean: Id 2 , [ √ 2 3 , 0] T (Id 2 , [0.4714, 0] T ).
Interestingly, we thus see that the mean rotation angle is exactly the same in all cases. But the mean translations are different, and the bi-invariant mean is located nicely between the left-and right-invariant Fréchet means. This is quite intuitive, since the bi-invariant mean can be looked upon as an in-between alternative with regard to left-and right-invariant Fréchet means.

Although the Log-Euclidean mean is not left-nor right-invariant, it is actually quite close to the bi-invariant mean. In fact both means do correspond when the mean transformation is the identity, but differ at other points due to the curvature of the canonical Cartan connection.

General Linear Transformations

In the linear group GL(n), the determinant of the bi-invariant mean is equal to the scalar geometric mean of the determinant of the data. Our bi-invariant mean can thus be looked upon as a generalization of the geometric mean to invertible linear transformations. This generalization is not the only possible one. For instance, the Log-Euclidean mean has the same property. However, the Log-Euclidean mean is neither left-nor right-invariant (and is restricted to linear transformations whose principal logarithm is well-defined), which is not the case for the bi-invariant mean. Proposition 11. Let {T i } be a set of linear transformations in GL(n) and let {w i } be (normalized) non-negative weights, such that their bi-invariant mean T uniquely exists. Then, we have:

if det(S i ) > 0, for all i, then det( T ) = exp ( i w i . ln(det(S i ))) , if det(S i ) < 0, for all i, then det( T ) = -exp ( i w i . ln(-det(S i ))) ,
Proof. Here, we extend the scope of our work to a Lie group which has two distinct sheets (positive or negative determinant) and it is thus not connected. The mean obviously does not exist when there are some data on both sheets as there is no curve (thus no geodesic) to join the points on both sides. When the bi-invariant mean is well-defined, then all of the determinants of the data have the same sign, which is also the sign of T , and we can actually restrict the analysis to this connected leaf of the manifold.

To prove our result, we will rely only on two ingredients: the barycentric equation [START_REF] Basser | MR diffusion tensor spectroscopy and imaging[END_REF] and the property: det(M ) = exp(Trace(log(M ))), which holds for any square matrix with a principal logarithm. This (classical) equality can be shown for example using the Jordan (or Schur) decomposition of the matrix M . Taking the trace of the barycentric equation and then the (scalar) exponential, we get: 1 = Π i exp w i .Trace ln det (-1) .T i .

Then, using det(A.B) = det(A).det(B) and det( T (-1) .T i ) = |det( T )| (-1) .|det(S i )|, we get the geometrical interpolation of determinants:

1 = det T (-1) . exp i w i . ln (|det(S i )|) ,
which yields the result.

Symmetric Positive Definite (SPD) Matrices. SPD matrices are called tensors in medical image analysis. They are used for instance to encode the covariance matrix of the Brownian motion (diffusion) of water in Diffusion Tensor Imaging (DTI) [START_REF] Basser | MR diffusion tensor spectroscopy and imaging[END_REF][START_REF] Le Bihan | Diffusion tensor imaging: Concepts and applications[END_REF] or to encode the joint variability at different places (Green function) in shape analysis [START_REF] Fillard | Measuring brain variability by extrapolating sparse tensor fields measured on sulcal lines[END_REF].

A number of teams in medical image processing proposed independently to endow this space with the affine-invariant metric X , Y Σ = Tr(V.Σ -1 .W.Σ -1 ) which is completely independent of the choice of the coordinate system. This allowed to generalize to SPD-valued images a number of image processing algorithms [START_REF] Pennec | A Riemannian framework for tensor computing[END_REF]. The same metric was previously introduced in statistics to model the geometry of the multivariate normal family (the Fisher information metric) [START_REF] Burbea | Entropy differential metric, distance and divergence measures in probability spaces: a unified approach[END_REF][START_REF] Skovgaard | A Riemannian geometry of the multivariate normal model[END_REF][START_REF] Calvo | An explicit solution of information geodesic equations for the multivariate normal model[END_REF]. We showed in [START_REF] Pennec | Statistical Computing on Manifolds for Computational Anatomy[END_REF] that there is actually a one-parameter family of such affine-invariant metrics X , Y Σ = Tr(V.Σ -1 .W.Σ -1 ) + β.Tr(V.Σ -1 ).Tr(W.Σ -1 ) with β > -1 dim that share the same invariant connection ∇ X Y | = -1 2 (V.Σ -1 .W + W.Σ -1 .V ). The SPD manifold can be seen as a sub-manifold of GL(n), but it is not a subgroup. Interestingly, the Fréchet mean associated to affine-invariant Riemannian metrics on the SPD space coincides with the bi-invariant mean of SPD matrices, looked upon as elements of GL(n). Indeed, the affine-invariant Fréchet mean Σ of a set of SPD matrices Σ 1 , ..., Σ N is defined implicitly by the following barycentric equation:

i w i . Log( Σ-1 2 .Σ i . Σ-1 2 ) = 0, (20)
which happens to be exactly equivalent to our general equation [START_REF] Basser | MR diffusion tensor spectroscopy and imaging[END_REF] for biinvariant means (just multiply [START_REF] Thompson | On Growth and Form[END_REF] on the left by Σ-1 2 and on the right by Σ+ 1 2 to obtain [START_REF] Basser | MR diffusion tensor spectroscopy and imaging[END_REF]). Intuitively, this means that our bi-invariant mean naturally unifies into a very general framework a number of well-established notions of means for various types of data living in geometric spaces (e.g, tensors, rotations, translations). The underlying reason is that tensors are normal matrices.

Perspectives

In this paper, we have presented a general framework to define bi-invariant means in Lie groups as exponential barycenters of the canonical Cartan connection. This new mean is invariant with respect to left-and right-multiplication, as well as inversion. We provided an iterative fixed point algorithm which converges at least linearly to this mean. From this optimization point of view, it would be interesting to extend the barycentric fixed point iteration into a Newton iteration on Lie groups [START_REF] Mahony | The geometry of the Newton method on non-compact Lie groups[END_REF], although the computation of the covariant derivative of the vector field could be a computational issue.

Global Uniqueness Conditions? In this work, we only showed the local existence and uniqueness of the bi-invariant mean for sufficiently concentrated data. However, we have no clear way to identify whenever data are sufficiently concentrated or not, contrarily to Riemannian manifolds where we now have fairly tight conditions to ensure the existence and uniqueness of the Riemannian barycenter [START_REF] Afsari | Riemannian l p center of mass: existence, uniqueness, and convexity[END_REF][START_REF] Yang | Riemannian median and its estimation[END_REF][START_REF] Yang | Medians of probability measures in Riemannian manifolds and applications to radar target detection[END_REF]. Given an inner product on the Lie algebra of the group, we have two canonical Riemannian metrics which are respectively left-and right-invariant. One could conjecture that whenever the Fréchet mean is unique for some left-or right-invariant metric, then the bi-invariant mean exists and is unique as well, as we showed here for the particular case of rigid-body transformations.

An idea to investigate this link is the following. The bi-invariant mean defined in this work is a special instance of the exponential barycenters proposed in [START_REF] Emery | Sur le barycentre d'une probabilité dans une variété[END_REF][START_REF] Arnaudon | Espérances conditionnelles et C-martingales dans les variétés[END_REF][START_REF] Arnaudon | Barycentres convexes et approximations des martingales continues dans les variétés[END_REF] for Riemannian manifolds. The existence and uniqueness of the exponential barycenters was recently established in affine connection manifolds which are convex with semi-local convex geometry (CSLCG) by Arnaudon and Li [START_REF] Araudon | Barycenters of measures transported by stochastic flows[END_REF]. In our case, the whole group equipped with the canonical Cartan connection cannot be CSLCG, but it should be possible to define a separating function using left-or right-invariant Riemannian metrics such that the regular geodesic balls ensuring the uniqueness of the Fréchet mean actually define CSLCG neighborhoods with the canonical Cartan connection.

Higher Order Moments The mean is an important statistic which indicates the location of the distribution in the group, but higher order moments are also needed to characterize the dispersion of the population around this central value. The existence of a unique bi-invariant mean m of N samples {x i } is based on the existence of a convex normal neighborhood of m containing the data points. In this neighborhood, there exists a unique group geodesic joining any point x to each data point x i , parameterized by its tangent vector Log x (x i ) = DL x | e . Log(x (-1) .x i ) at x. Thus, exactly as in Riemannian manifolds [START_REF] Pennec | Intrinsic statistics on Riemannian manifolds: Basic tools for geometric measurements[END_REF], we can locally linearize the Lie group around the mean using the map Log x and define the 2-covariant tensor:

Σ(x) = 1 N k Log x (x k ) ⊗ Log x (x k ) ∈ T x G ⊗ T x G,
where the direct product ⊗ means that in any basis of T x G, the coordinates are

[Σ(x)] ij = 1 N k [ Log x (x k )] i .
[ Log x (x k )] j . Higher order empirical moments could be computed in the same way.

However, one should be careful that this definition is not the equivalent of the empirical covariance matrix without an auxiliary (Riemannian) metric to lower the indices of the tensor and turn it into a bi-linear form (an element of T *

x G ⊗ T * x G). In particular, the usual interpretation of the coordinates of the covariance matrix using the scalar products of data with the basis vectors (Σ ij = E[ x , e i . x , e j ]) is valid only if we have a reference metric that allows us to define the orthonormality of the basis vectors e i . Likewise, diagonalizing the Σ to extract the main modes of variability only makes sense with respect to a local metric: changing the metric of T m G will not only change the eigenvectors and the eigenvalues but also potentially the order of the eigenvalues. This means that Principle Component Analysis (PCA) cannot be generalized to the affine connection space setting.

Bi-invariant Mahalanobis Distance Despite the absence of a canonical reference metric, some interesting tools can be defined from the 2-covariant tensor in a bi-invariant way without having to rely on an auxiliary metric. One of them is the Mahalanobis distance of a point y (in the normal convex neighborhood specified above), which can be defined as:

In this formula, m is the bi-invariant mean and Σ (-1) ij are the coefficients of the inverse of Σ ij in a given basis. One verifies that this definition does not depend on the basis chosen for T m G. Furthermore, the Mahalanobis distance is invariant by left and right translation. Indeed, if we have x i = g.x i and y = g.y, then we have m = g.m. Using the equality Log m (x ) = DL g | m .Log m (x), we see that the left translation just amounts to jointly change the coordinate system of both the covariance Σ and the coordinates of Log m (y ). Thus, we have the left-invariance of the Mahalanobis distance: µ 2 (m ,Σ ) (y ) = µ 2 (m,Σ) (y). The invariance by right translation is obtained similarly from the right expression of the local logarithmic map (Corollary 1). This simple extension of the Mahalanobis distance suggests that it might be possible to extend much more statistical definitions and tools on Lie groups in a consistent way.

Index

ddt

  Ad(exp(tz)).x = [z, x] we obtain the requested characterization of bi-invariant connections: α([z, x], y) + α(x, [z, y]) = [z, α(x, y)] .

Fig. 2 .

 2 Fig.2. Geometric Property of the Karcher mean. When well-defined, the Karcher mean of a set of points {xi} with non-negative (normalized) weights wi satisfies a barycentric equation. This has a geometric interpretation: in the tangent space at the mean m, 0 (i.e. m) is precisely the barycenter of the vectors log m (xi) associated to the weights wi. In this geometrical sense, m is at the center of the points {xi}.

Fig. 3 .

 3 Fig. 3. Examples of geodesics in the group of scalings and translations in 1D. In each of the sub-figures, we plot the left-invariant geodesic (red), the right-invariant geodesic (green) and the group geodesic (blue) starting from the same point with the same tangent vector. Top row: two examples of one left-invariant, one right-invariant and one group geodesic starting from two different points. Bottom row: two examples of left-invariant, right-invariant and group geodesics with three different initial tangent vectors. Note the particular form taken by group geodesics, which are parts of straight lines and of the left-invariant geodesics, which are semicircles perpendicular to the horizontal axis. Right-invariant geodesics are also given in a closed form and are in fact half hyperbolas.

1 0

 1 exp(-u.Ω)du | Ej ∼ sin(θj ) θj cos(θj )-1 θj cos(θj )-1 θj sin(θj ) θj

  Σ) (y) = [ Log m (y)] i Σ (-1) ij [ Log m (y)] j .

Acknowledgments

The authors would like to thanks the reviewers for their very detailed and insightful comments which considerably improved the manuscript. However, as mentioned in the text, some of their questions remains open for future investigations.