title: Bi-invariant Two-Sample Tests in Lie Groups for Shape Analysis
authors: Martin Hanik Hans-Christian Hege Christoph von Tycowicz
text: 
  
  
  
  
  
  Bi-invariant Two-Sample Tests in Lie Groups for Shape Analysis
  
  
  
  
  
  
  
  
  M. Hanik et al.
  
  
  
  Zuse Institute Berlin, Berlin, Germany 
  
  {hanik,hege,vontycowicz}@zib.de
  
  Bi-invariant Two-Sample Tests in Lie Groups
  for Shape Analysis
  
  
  Data from the Alzheimer's Disease Neuroimaging Initiative
  
      Martin Hanik Hans-Christian Hege  Christoph von Tycowicz
      December 30, 2023
  ===========================================================================================================================
  
  
  
  
  
  We propose generalizations of the Hotelling's T^2 statistic and the Bhattacharayya distance for data taking values in Lie groups.
  A key feature of the derived measures is that they are compatible with the group structure even for manifolds that do not admit any bi-invariant metric.
  This property, e.g.  assures analysis that does not depend on the reference shape, thus, preventing bias due to arbitrary choices thereof. 
  Furthermore, the generalizations agree with the common definitions for the special case of flat vector spaces guaranteeing consistency.
  Employing a permutation test setup, we further obtain nonparametric, two-sample testing procedures that themselves are bi-invariant and consistent. 
  We validate our method in group tests revealing significant differences in hippocampal shape between individuals with mild cognitive impairment and normal controls.
  
  	
  
  
  
  
  
  
  § INTRODUCTION
  
      Shape analysis is applied successfully in a variety of different fields and is further fuelled by the ongoing advance of 3D imaging technology <cit.>. Although the objects themselves are embedded in Euclidean space the resulting shape data is often part of a complex nonlinear manifold. Thus, methods for its analysis must generalize Euclidean statistical tools. 
      Lie groups form the natural domain of shapes when they are modeled as transformations between different subjects and a common reference or atlas and the idea to represent them entirely via these transformations has been very successful since its introduction by D'Arcy Thompson over 100 years ago <cit.>. Indeed, there are various different models that consider different Lie groups. While configurations of the human spine can be encoded in the low dimensional groups of translations and rotations <cit.>, the large deformation diffeomorphic metric mapping framework (LDDMM) <cit.> represents deformations of images in the infinite-dimensional group of diffeomorphisms. The classical matrix groups also appear in physics based shape spaces <cit.>, diffusion tensor imaging <cit.> and in the characterization of volume <cit.> and surface <cit.> deformations.
      
      Geometrically defined statistical methods in Riemannian manifolds have long been considered and they provide powerful tools not only for shape analysis <cit.>. For Lie groups, however, they do not respect the group structure as they are only invariant with respect to left and right translations, as well as inversion, when there exists a bi-invariant metric. Important examples, where this is not the case, are the group of rigid-body transformations and the general linear group for dimensions greater than one. To overcome these problems, Pennec and Arsigny generalized the notions of the mean, covariance and Mahalanobis distance in a bi-invariant way <cit.>. We build upon and extend their work to derive bi-invariant generalizations of the Hotelling's T^2 statistic and Bhattacharayya distance for observations taking values in Lie groups. These then induce two-sample permutation tests that are themselves compatible with the group structure even for manifolds that do not admit any bi-invariant metric. Our generalizations are consistent in that they agree with the original expressions in flat vector spaces; this is not true for previous generalizations in Riemannian manifolds <cit.>. We evaluate the proposed group test for the morphometric analysis of pathological malformations associated to cognitive decline, viz. mild cognitive impairment, which is common in the elderly and represents an intermediate stage between normal cognition and Alzheimer’s disease.
  
  
  
  § THEORETICAL BACKGROUND
  
  
  
  
    §.§.§ Basics of Lie groups.
  
      In the following, we give a short summary of the theory of Lie groups. For more information see for example <cit.>. Additional information on differential geometry can be found in <cit.>. In the following we use “smooth” synonymously with “infinitely  often differentiable”.
      
      A Lie group G is a smooth manifold that has a compatible group structure, that is, there is an identity element e ∈ G and a smooth, associative (not necessarily commutative) map G × G ∋ (g,h) ↦ gh ∈ G as well as a smooth inversion map G ∋ g ↦ g^-1. 
      
      An example of a Lie group is the general linear group GL(n), i.e. the set of all bijective linear mappings on a vector space V, where the group operation is the composition of mappings (i.e. a matrix multiplication), with e being the identity map.
      
      Whenever we speak of matrix groups in the following, arbitrary subgroups of GL(n) are meant.
      
      For each g ∈ G the group operation defines two automorphisms on G: the left and right translation L_g: h ↦ gh and R_g: h ↦ hg. Their derivatives d_hL_g  and d_hR_g at h ∈ G map tangent vectors X ∈ T_hG bijectively to the tangent spaces T_ghG and T_hgG, respectively. In particular, it holds that T_gG = {_eL_g(X): X ∈ T_eG } = {_eR_g(X) : X ∈ T_eG}. Thus, each X in T_eG determines a vector field X by X_g = _eL_g(X) for all g ∈ G. It is called left invariant because X_L_g(h) = _hL_g(X_h) for all h ∈ G, that is, the value at a left translated point is the left translated vector. Furthermore, the converse also holds: every left invariant vector field is uniquely determined by its value at the identity. For matrix groups with identity matrix I we get the simple equation _IL_A(M) = AM for an element A and a matrix M in the tangent space at I. Right invariant vector fields are defined analogously and have parallel properties.
      
      The integral curve α_X: ℝ→ G of an invariant (left or right) vector field X with X = X_e determines a 1-parameter subgroup of G through e since α_X(s + t) = α_X(s) α_X(t) for all s,t ∈ℝ. The group exponential exp is then defined by exp(X) = α_X(1). It is a diffeomorphism in a neighbourhood of e and, hence, we can also define the group logarithm log as its inverse there. In the case of matrix groups they coincide with the matrix exponential and logarithm.
      
      Given two vector fields X,Y on G a so-called connection ∇ yields a way to differentiate Y along X; the result is again a vector field which we denote by ∇_X Y. With γ' := γ/ t we can then define a geodesic γ: [0,1] → G by ∇_γ'γ' = 0 as a curve without acceleration. An important fact is that 
      every point g ∈ G has a so-called normal convex neighbourhood U. Each pair f,h ∈ U can be joined by a unique geodesic [0,1] ∋ t ↦γ(t;f,h) that lies completely in U. Furthermore, with γ'(0;g,h) = X, this defines the exponential _g: T_gG → G at g by _g(X) := γ(1;g,h). It is also a local diffeomorphism with local inverse _g(h) = γ'(0;g,h). If the so-called Levi-Civita connection is used, then  and  are called Riemannian exponential and logarithm, respectively. 
      
      The Riemannian and group maps coincide if and only if G admits a bi-invariant Riemannian metric, that is, a smoothly varying inner product on the tangent spaces that is invariant under left and right translations.
      
      
      If we endow G with a Cartan-Shouten connection <cit.>, then geodesics and left (or right) translated 1-parameter subgroups coincide. Thus, for every g ∈ G there is also a normal convex neighbourhood U such that the map U ∋ h ↦log_g(h) = _eL_g log(g^-1 h) is well-defined. It can be interpreted as the “difference of h and g” taken in T_gG. For the rest of the paper we will assume that we work in such a neighborhood U.
      
      Another important automorphism of G is the conjugation C_g: h ↦ ghg^-1. Its differential w.r.t h is called the group adjont and denoted by (g). It acts on vectors X ∈ T_eG by 
      
      (g)X = _g^-1L_g (_eR_g^-1(X)) = _gR_g^-1 (_eL_g(X)).
  
      For matrix groups this reduces to (A)(M) = AMA^-1 for elements A and matrices M in the tangent space at the identity. 
  
  
  
  
    §.§.§ Hotelling T^2 statistic for Riemannian manifolds.
  
      Hotelling's T^2 test is the multivariate counterpart to the t-test. 
      Given two data sets (p_1,…,p_m) and (q_1,…,q_n ) in ℝ^d with means p and q, the data's pooled sample covariance is given by
      
      S = ∑_i=1^m (p_i - p) (p_i - p)^T + ∑_j=1^n (q_j - q) (q_j - q)^T/m + n - 2.
  
      The Hotelling T^2 statistic is then defined as the square of the Mahalanobis distance scaled with mn / (m + n):
      
      t^2({p_i},{q_i}) = mn/m + n (p - q)^T S^-1 (p - q).
  
      It measures the difference of p and q weighted against the inverse of the pooled covariance. Therefore, directions in which high variability was observed are weighted less than those with little spreading around the corresponding component of the mean. 
      
      In <cit.> Muralidharan and Fletcher introduce a generalization of the T^2 statistic to Riemannian manifolds M, i.e. for samples (p_1,…,p_m), (q_1,…,q_n) in M. The centers of the data sets are then given by the Fréchet means p, q∈ M, respectively. Assuming that p, q are unique, the difference between the means can be replaced by the Riemannian logarithms v_p = _p (q) ∈ T_pM or v_q = _q (p) ∈ T_qM. Depending on the choice, the vectors are from different tangent spaces. Analogously the covariance matrices can be defined by
      
      W_p_i   = 1/m∑_i=1^m _p(p_i) _p(p_i)^T, 
      
              W_q_i   = 1/n∑_i=1^n _q(q_i) _q(q_i)^T.
  
      Since there is no canonical way to compare vectors from different tangent spaces, Muralidharan and Fletcher propose to calculate a generalized T^2 statistic at both means and average the results. This leads to the generalized T^2 statistic
      
      t^2({p_i},{q_i}) = 1/2(v_p^T W_p_i^-1 v_p + v_q^T W_q_i^-1 v_q)
  
      for Riemannian manifolds.
     
  
  
  § GROUP TESTING IN LIE GROUPS
  
  
  
  
   §.§ Bi-invariant Mahalanobis Distance
  
       In <cit.> Pennec and Arsigny define a bi-invariant mean on a Lie group G of dimension k ∈ℕ and then show that there is a canonical way to generalize the notion of Mahalanobis distance to the Lie group setting. Given data (g_1,…,g_m) in a normal convex neighborhood, the bi-invariant mean g is defined implicitly as the solution of the group barycentric equation
       
      ∑^m_i=1log(g^-1 g_i) = 0.
  
       It is equivariant with respect to left and right translations as well as inversion, i.e., for all f ∈ G the means of left translated data (fg_1,…,fg_m), right-translated data (g_1 f,…, g_m f) and inverted data (g_1^-1,…,g_m^-1) are f g, gf and g^-1, respectively <cit.>. Bi-invariant means can be computed efficiently with a fixed point iteration <cit.>. 
       Pennec and Arsigny define the intrinsic (i.e., independent of the choice of coordinates) 
       
       covariance tensor of the data at g by
       
      Σ_g_i = 1/n∑_i=1^n log_g(g_i) ⊗log_g(g_i) ∈ T_gG ⊗ T_gG,
  
       where the tensor product ⊗ means that in any basis of T_gG, the entries are [Σ_g_i]^ij = 1/m ∑_l [log_g(g_l)]^i [log_g(g_l)]^j. 
       From this, the bi-invariant Mahalanobis distance of f ∈ G to the distribution of the g_i can be defined by
       
      μ^2_(g, Σ_g_i)(f) := ∑_i,j=1^k [log_g(f)]^i [Σ_g_i^-1]_ij [log_g(f)]^j,
  
       where [Σ_g_i^-1]_ij denotes the elements of the inverse of Σ_g_i in a given basis.
       It is left and right invariant because both translations amount to a joint change of basis of log_g(g_i) and  Σ_g_i whose effect cancels out because of the inversion of the covariance matrix in (<ref>); see <cit.>. 
  
  
  
   §.§ Generalized Hotelling's T^2 test
  
      In this section we use the bi-invariant Mahalanobis distance from the previous section to define a bi-invariant generalization of the Hotelling T^2 statistic for data in Lie groups G of dimension k ∈ℕ. First, note that we can always jointly translate the data such that the new mean is the identity e without changing Mahalanobis distances.
      Thus, instead of (<ref>) we use the equivalent form
      
      μ^2_(g, Σ_g_i)(f) = ∑_i,j = 1^k[log(g^-1f)]^i [Σ_g_i^-1]_ij [log(g^-1f)]^j
  
      in the following, where 
      
      [Σ_g_i]^ij := 1/m∑^m_l=1 [log(g^-1g_l)]^i [log(g^-1g_l)]^j
  
      is the centralized covariance of (g_1,…,g_m).
      This motivates the definition of the pooled covariance at the identity.
      
          Given data sets (g_1,…,g_m) and (h_1,…,h_n) in a Lie group G with bi-invariant means g and h, their pooled covariance is defined by
          
      Σ := 1/m + n - 2( mΣ_g_i + nΣ_h_i).
  
      
      With this, we propose the following generalization of the T^2 statistic for Lie groups.
       
          Given data sets (g_1,…,g_m) and (h_1,…,h_n) in a Lie group G with bi-invariant means g and h, the bi-invariant Hotelling's T^2 statistic is defined by 
          
      t^2({g_i},{h_i})    := mn/m + nμ^2_(e, Σ)( g^-1h).
  
      
  
  
  
  
  
  
  
  
  
  
  
  
  Note that we could replace left by right translations in all definitions in this section. The resulting centralized and pooled covariance will be different in general, but the bi-invariant T^2 statistic turns out to be the same as translation effects cancel out.
  
  
   §.§ Bhattacharyya Distance
  
  
  
  Another index suggested for assessing the dissimilarity between two distributions that is also related to the Mahalanobis distance is the Bhattacharyya distance <cit.>.
  Given two data sets (p_1,…,p_m) and (q_1,…,q_n ) in ℝ^d with means p, q and sample covariance S_p_i, S_q_i, the distance is defined as
  
      D_B((p, S_p_i),(q, S_q_i)) := 1/8(p-q)^TS^-1(p-q) + 1/2ln(|S|/√(|S_p_i||S_q_i|)),
  
  where S=(S_p_i+S_q_i)/2, and |·| denotes the matrix determinant.
  The first summand coincides with Hotelling's T^2 statistic except for minor differences in the weighting of the involved terms.
  Consequently, using an analogous approach in terms of the centralized covariance Σ_(·) provides a consistent and bi-invariant generalization.
  Indeed, the second summand is also bi-invariant.
  To verify this, let (g_1,…,g_m) be a data set in a Lie group G with bi-invariant mean g.
  For any group element f ∈ G, we have that log((fg)^-1(fg_i)) = log(g^-1g_i) and, thus, Σ_g_i left invariant.
  For right invariance, we can take advantage of the relationship log(fgf^-1) = (f)log(g) <cit.>, yielding log((gf)^-1(g_if)) = (f^-1)log(g^-1g_i) and, thus, 
  
      [Σ_g_if] = [(f^-1)][Σ_g_i][(f^-1)]^T.
  
  Since (f^-1) is invertible, the determinant ρ_f = |[(f^-1)]| is non-zero and we obtain |[Σ_g_if]| = ρ^2_f|[Σ_g_i]|.
  A simple calculation shows that the scaling ρ^2_f cancels in the second summand, thus, verifying right invariance. 
  
  
  
  
      
  
  
  § EXPERIMENTS
  
  
  We evaluate the proposed group test for the morphometric analysis of pathological malformations associated to cognitive decline, viz. mild cognitive impairment (MCI).
  
  MCI in the elderly is a common condition and often represents an intermediate stage between normal cognition and Alzheimer’s disease.
  As consistently reported in neuroimaging studies, atrophy of the hippocampal formation is a characteristic early sign of MCI.
  In this section, we analyze hippocampal atrophy patterns due to MCI by applying the derived Hotelling's T^2 statistic to infer significant differences.
  
  
  
   §.§ Data Description
  
  
  For our experiments we prepared a data set consisting of 26 subjects showing mild cognitive impairment (MCI) and 26 cognitive normal (CN) controls from the open access Alzheimer's Disease Neuroimaging Initiative[adni.loni.usc.edu] (ADNI) database.
  ADNI provides, among others, 1632 brain MRI scans collected on four different time points with segmented hippocampi.
  We established surface correspondence (2280 vertices, 4556 triangles) in a fully automatic manner employing the deblurring and denoising of functional maps approach <cit.> for isosurfaces extracted from the available segmentations.
  The dataset was randomly assembled from the baseline shapes for which segmentations were simply connected and remeshed surfaces were well-approximating (≤10^-5mm root mean square surface distance to the isosurface).
  
  
  
   §.§ [3]-based Shape Space
  
  
  For shape analysis we employ a recent representation <cit.> that describes shapes in terms of linear differential coordinates viewed as elements of [3].
  Given deformations (ϕ_1,…,ϕ_n) mapping a reference or template configuration 𝒮 to surfaces (𝒮_1,…,𝒮_n), the coordinates—being the Jacobian matrices—provide a local characterization of the respective deformation and, thus, the shape changes.
  In particular, let ϕ_i be an orientation-preserving, simplicial map, then the derivatives are constant on each triangle T, viz. ∇ϕ_i|_T≡ D^T_i∈[3].
  Note, that the deformation of a triangle fully specifies an affine map of ^3 assuming that triangle normals are mapped onto each other (cf. Kirchhoff–Love kinematic assumptions).
  
  Finally, obtaining a surface ϕ(𝒮) for given coordinates leads to a linear differential equation that can be solved very efficiently.
  
  
  
   §.§ Hippocampal Atrophy Patterns in CN vs. MCI
  
  
  
      
  We compute bi-invariant means for the ADNI data set described in Sec. <ref>. A qualitative comparison is shown in Fig. <ref> illustrating the well-known <cit.> loss of total hippocampal volume associated with MCI.
  
  Next, we evaluate the local differences in shape between the bi-invariant means by performing triangle-wise, partial tests that provide marginal information for each specific triangle allowing to investigate which subregions contribute significant differences.
  While Hotelling's T^2 statistic is based on quite stringent assumptions on the distribution, it can be utilized to derive a nonparametric testing procedure.
  In particular, we employ a permutation testing setup based on the proposed statistic (Def. <ref>) yielding a bi-invariant, distribution-free two-sample test.
  The key idea is to estimate the empirical distribution of the test statistic under the null-hypothesis H_0 that the two distributions to be tested are the same.
  To this end, group memberships of the observations are repeatedly permuted each time re-computing the statistic between the accordingly changed groups.
  The p-value is then computed as the proportion of test statistics that are greater than the one computed for the original (unpermuted) groups.
  
  In Fig. <ref> we visualize the regions with statistical significant differences (p<0.05 after Benjamini-Hochberg false discovery correction) between the bi-invariant means showing the respective p-values. In line with literature on MCI <cit.>, the obtained results suggest more differentiated morphometric changes beyond homogeneous volumetric decline of the hippocampi.
      
  
      
  
  
  § DISCUSSION
  
  
  In this work, we derived generalizations of established indices for the quantization of dissimilarity between empirically-defined probability distributions in Lie groups, viz. the Hotelling's T^2 statistic and the Bhattacharayya distance. 
  These new measures are stable according to group operations (left/right composition and inversion), e.g. removing any bias due to arbitrary choices of a reference frame.
  Moreover, the generalizations are consistent to the definitions in multivariate statistics, i.e. they agree for the special case of flat vector spaces.
  We further obtained nonparametric two-sample tests based on the proposed measures and validated them in group tests on malformations of right hippocampi due to mild cognitive impairment.
  While this experiment serves as an illustrating example, we plan to extend the analysis employing global and more strict simultaneous tests as, e.g., in <cit.>.
  
  As with other non-Euclidean approaches, the derived methods pose certain assumptions on the uniqueness and smeariness of the intrinsic mean <cit.>.
  Another assumption in the derivation of the Mahalanobis distances is the invertability of the covariance operator, which is frequently violated, e.g. when the number of observations is lower than the number of variables.
  A common approach in such situations is to resort to a pseudo-inverse (see e.g. <cit.>) of the covariance.
  Such a strategy, however, will not result in a bi-invariant notion of Mahalanobis distance.
  
  Extending the proposed expressions to such high dimension low sample size scenarios poses another interesting direction for future work.
  
  
  
  
    §.§.§ Acknowledgments.
    
      M. Hanik is funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany’s Excellence Strategy – The Berlin Mathematics Research Center MATH+ (EXC-2046/1, project ID: 390685689).
      We are grateful for the open-access dataset of the Alzheimer's Disease Neuroimaging Initiative (ADNI)[Data collection and sharing for this project was funded by the ADNI (National Institutes of Health Grant U01 AG024904) and DOD ADNI (Department of Defense award number W81XWH-12-2-0012). ADNI is funded by the National Institute on Aging, the National Institute of Biomedical Imaging and Bioengineering, and through generous contributions from the following: AbbVie, Alzheimer's Association; Alzheimer's Drug Discovery Foundation; Araclon Biotech; BioClinica, Inc.; Biogen; Bristol-Myers Squibb Company; CereSpir, Inc.; Cogstate; Eisai Inc.; Elan Pharmaceuticals, Inc.; Eli Lilly and Company; EuroImmun; F. Hoffmann-La Roche Ltd and its affiliated company Genentech, Inc.; Fujirebio; GE Healthcare; IXICO Ltd.;Janssen Alzheimer Immunotherapy Research & Development, LLC.; Johnson & Johnson Pharmaceutical Research & Development LLC.; Lumosity; Lundbeck; Merck & Co., Inc.;Meso Scale Diagnostics, LLC.; NeuroRx Research; Neurotrack Technologies; Novartis Pharmaceuticals Corporation; Pfizer Inc.; Piramal Imaging; Servier; Takeda Pharmaceutical Company; and Transition Therapeutics. The Canadian Institutes of Health Research is providing funds to support ADNI clinical sites in Canada. Private sector contributions are facilitated by the Foundation for the National Institutes of Health (www.fnih.org). The grantee organization is the Northern California Institute for Research and Education, and the study is coordinated by the Alzheimer's Therapeutic Research Institute at the University of Southern California. ADNI data are disseminated by the Laboratory for Neuro Imaging at the University of Southern California.]
      as well as for F. Ambellan's help in establishing dense correspondences of the hippocampal surface meshes.
  
  
  
  
  
  
      splncs04
      
      
      
  