DeepAI

# Two-Stage Metric Learning

In this paper, we present a novel two-stage metric learning algorithm. We first map each learning instance to a probability distribution by computing its similarities to a set of fixed anchor points. Then, we define the distance in the input data space as the Fisher information distance on the associated statistical manifold. This induces in the input data space a new family of distance metric with unique properties. Unlike kernelized metric learning, we do not require the similarity measure to be positive semi-definite. Moreover, it can also be interpreted as a local metric learning algorithm with well defined distance approximation. We evaluate its performance on a number of datasets. It outperforms significantly other metric learning methods and SVM.

• 318 publications
• 73 publications
• 62 publications
• 22 publications
• 30 publications
01/07/2018

### Threshold Auto-Tuning Metric Learning

It has been reported repeatedly that discriminative learning of distance...
09/04/2019

### Metric Learning from Imbalanced Data

A key element of any machine learning algorithm is the use of a function...
11/16/2020

### A New Similarity Space Tailored for Supervised Deep Metric Learning

We propose a novel deep metric learning method. Differently from many wo...
06/12/2020

### Provably Robust Metric Learning

Metric learning is an important family of algorithms for classification ...
02/09/2019

### Distance metric learning based on structural neighborhoods for dimensionality reduction and classification performance improvement

Distance metric learning can be viewed as one of the fundamental interes...
01/07/2016

### Stochastic Dykstra Algorithms for Metric Learning on Positive Semi-Definite Cone

Recently, covariance descriptors have received much attention as powerfu...
02/23/2022

### Robust Geometric Metric Learning

This paper proposes new algorithms for the metric learning problem. We s...

## 1 Introduction

Distance measures play a crucial role in many machine learning tasks and algorithms. Standard distance metrics, e.g. Euclidean, cannot address in a satisfactory manner the multitude of learning problems, a fact that led to the development of metric learning methods which learn problem-specific distance measure directly from the data (Weinberger & Saul, 2009; Wang et al., 2012; Jain et al., 2010). Over the last years various metric learning algorithms have been shown to perform well in different learning problems, however, each comes with its own set of limitations.

Learning the distance metric with one global linear transformation is called single metric learning

(Weinberger & Saul, 2009; Davis et al., 2007). In this approach the distance computation is equivalent to applying on the learning instances a learned linear transformation followed by a standard distance metric computation in the projected space. Since the discriminatory power of the input features might vary locally, this approach is often not flexible enough to fit well the distance in different regions.

Local metric learning addresses this limitation by learning in each neighborhood one local metric (Noh et al., 2009; Wang et al., 2012). When the local metrics vary smoothly in the feature space, learning local metrics is equivalent to learning the Riemannian metric on the data manifold (Hauberg et al., 2012). The main challenge here is that the geodesic distance endowed by the Riemannian metric is often computationally very expensive. In practice, it is approximated by assuming that the geodesic curves are formed by straight lines and the local metric does not change along these lines (Noh et al., 2009; Wang et al., 2012). Unfortunately, the approximation does not satisfy the symmetric property and therefore the result is a non-metric distance.

Kernelized Metric Learning (KML) achieves flexibility in a different way  (Jain et al., 2010; Wang et al., 2011). In KML learning instances are first mapped into the Reproducing-Kernel Hilbert Space (RKHS) by a kernel function and then a global Mahalanobis metric is learned in the RKHS space. By defining the distance in the input feature space as the Mahalanobis distance in the RKHS space, KML is equivalent to learning a flexible non-linear distance in the input space. However, its main limitation is that the kernel matrix induced by the kernel function must be Positive Semi-Definite (PSD). Although Non-PSD kernel could be transformed into PSD kernel (Chen & Ye, 2008; Ying et al., 2009), the new PSD kernel nevertheless cannot keep all original similarity information.

In this paper, we propose a novel two-stage metric learning algorithm, Similarity-Based Fisher Information Metric Learning (SBFIML). It first maps instances from the data manifold into finite discrete distributions by computing their similarities to a number of predefined anchor points in the data space. Then, the Fisher information distance on the statistical manifold is used as the distance in the input feature space. This induces a new family of Riemannian distance metric in the input data space with two important properties. First, the new Riemannian metric is robust to density variation in the original data space. Without such robustness, an objective function can be easily biased towards data regions the density of which is low and thus dominates learning of the objective function. Second, the new Riemannian metric has largest distance discrimination on the manifold of anchor points and no distance in the directions being orthogonal to the manifold. So, the effect of locally irrelevant dimensions of anchor points is removed. To the best of our knowledge, this is the first metric learning algorithm that has these two important properties.

SBFIML is flexible and general; it can be applied to different types of data spaces with various non-negative similarity functions. Comparing to KML, SBFIML does not require the similarity measure to form a PSD matrix. Moreover, SBFIML can be interpreted as a local metric learning algorithm. Compared to the previous local metric learning algorithms which produce a non-metric distance (Noh et al., 2009; Wang et al., 2012), the distance approximation in SBFIML is a well defined distance function with a closed form expression. We evaluate SBFIML on a number of datasets. The experimental results show that it outperforms in a statistically significant manner both metric learning methods and SVM.

## 2 Preliminaries

We are given a number of learning instances , where each instance is a

-dimensional vector, and a vector of associated class labels

, . We assume that the input feature space is a smooth manifold. Different learning problems can have very different types of data manifolds with possibly different dimensionality. The most commonly used manifold in metric learning is the Euclidean space  (Weinberger & Saul, 2009). The probability simplex space has also been explored (Lebanon, 2006; Cuturi & Avis, 2011; Kedem et al., 2012).

We propose a general two-stage metric learning algorithm which can learn a flexible distance in different types of data manifolds, e.g. Euclidean, probability simplex, hypersphere, etc. Concretely, we first map instances from onto the statistical manifold through a similarity-based differential map, which computes their non-negative similarities to a number of predefined anchor points. Then we define the Fisher information distance as the distance on . We have chosen to do so, since this induces a new family of Riemannian distance metric which enjoys interesting properties: 1) The new Riemannian metric is robust to density variations in the original data space, which can be produced for example by different intrinsic variabilities of the learning instances in the different categories. Distance learning over this new metric is hence robust to density variation. 2) The new Riemannian distance metric has largest distance discrimination on the manifold of the anchor points and has no distance in the directions being orthogonal to that manifold. So, the new distance metric can remove the effect of locally irrelevant dimensions of the anchor point manifold, see Figure 1 for more detials. In the remainder of this section, we will briefly introduce the necessary terminology and concepts. More details can be found in the monographs (Lee, 2002; Amari & Nagaoka, 2007).

Statistical Manifold. We denote by a -dimensional smooth manifold. For each point on , there exists at least one smooth coordinate chart which defines a coordinate system to points on , where is an open subset of containing and is a smooth coordinate map . is the coordinate of defined by .

A statistical manifold is a smooth manifold whose points are probability distributions. Given a -dimensional statistical manifold , we denote by a probability distribution in , where is the coordinate of under some coordinate map and

is the random variable of the

distribution taking values from some set . Note that, all the probability distributions in share the same set .

In this paper, we are particularly interested in the -dimensional statistical manifold , whose points are finite discrete distributions, denoted by

 Pn={p(ξ|θ=(θ1,…,θn)):n∑i=1θi<1,∀i,θi>0} (1)

where

is the discrete random variable taking values in the set

and is called the m-affine coordinate (Amari & Nagaoka, 2007). The probability mass of is if , otherwise .

Fisher Information Metric. The Fisher information metric is a Riemannian metric defined on statistical manifolds and endows a distance between probability distributions (Radhakrishna Rao, 1945). The explicit form of the Fisher information metric at is a positive definite symmetric matrix , the element of which is defined by:

 GijFIM(θ)=∫Ξ∂logp(ξ|θ)∂θi∂logp(ξ|θ)∂θjp(ξ|θ)dξ (2)

where the above integral is replaced with a sum if is discrete. The following lemma gives the explicit form of the Fisher information metric on .

###### Lemma 1.

On the statistical manifold , the Fisher information metric at with coordinate is

 GijFIM(θ)=1θiδij+11−∑nk=1θk,∀i,j∈{1,…,n} (3)

where if , otherwise .

Properties of Fisher Information Metric. The Fisher information metric enjoys a number of interesting properties. First, the Fisher information metric is the unique Riemannian metric induced by all -divergence measures, such as the Kullback-Leibler (KL) divergence and the divergence (Amari & Cichocki, 2010). All these divergences converge to the Fisher information distance as the two probability distributions are approaching each other. Another important property of the Fisher information metric from a metric learning perspective is that the distance it endows can be approximated by the Hellinger distance, the cosine distance and all -divergence measures (Kass & Vos, 2011). More importantly, when is the statistical manifold of finite discrete distributions, e.g. , the cosine distance is exactly equivalent to the Fisher information distance (Lebanon, 2006; Lee et al., 2007).

Pullback Metric. Let and be two smooth manifolds and be the tangent space of at . Given a differential map and a Riemannian metric on , the differential map induces a pullback metric at each point on defined by:

 ⟨v1,v2⟩G∗(p)=⟨Dpf(v1),Dpf(v2)⟩G(f(p)) (4)

where is the differential of at point , which maps tangent vectors to tangent vectors .

Given the coordinate systems and of and respectively, defined by some smooth coordinate maps and respectively, then the explicit form of the pullback metric at point with coordinate is:

 G∗(θ)=JTG(γ)J (5)

where is the coordinate of the and is the Jacobian matrix of the function at point . Since is a Riemannian metric, the pullback metric is in general at least a PSD metric.

The following lemma gives the relation between the geodesic distances on and .

###### Lemma 2.

Let be the pullback metric of a Riemannian metric induced by a differential map , be the geodesic distance on endowed by and the geodesic distance on endowed by , then, it holds

The proof of Lemma 2 is provided in the appendix. In addition to approximating directly on by assuming that the geodesic curve is formed by straight lines as previous local metric learning algorithms do (Noh et al., 2009; Wang et al., 2012), Lemma 2 allows us to also approximate it with on . Note that, both approximations have the same asymptotic convergence result.

## 3 Similarity-Based Fisher Information Metric Learning

We will now present our two-stage metric learning algorithm, SBFIML. In the following, we will first present how to define the similarity-based differential map and then how to learn the Fisher information distance.

### 3.1 Similarity-Based Differential Map

Given a number of anchor points , , we denote by the differentiable similarity function. Each component is a differentiable function the output of which is a non-negative similarity between some input instance and the anchor point . Based on the similarity function we define the similarity-based differential map as:

 f(xi) =p(ξ|(s1(xi)∑nk=1sk(xi),…,sn−1(xi)∑nk=1sk(xi))) =(¯s1(xi),…,¯sn−1(xi))

where is a finite discrete distribution on manifold . From now on, for simplicity, we will denote by . The probability mass of the th outcome is given by: . In order for to be a valid differential map, the similarity function must satisfy . This family of differential maps is very general and can be applied to any space where a non-negative differentiable similarity function

can be defined. The finite discrete distribution representation,

, of learning instance, , can be intuitively seen as an encoding of its neighborhood structure defined by the similarity function . Note that, the idea of mapping instances onto the statistical manifold has been previously studied in manifold learning, e.g. SNE (Hinton & Roweis, 2002) and t-SNE (Van der Maaten & Hinton, 2008).

Akin to the appropriate choice of the kernel function in a kernel-based method, the choice of an appropriate similarity function is also crucial for SBFIML. In principle, an appropriate similarity function should be a good match for the geometrical structure of the data manifold. For example, for data lying on the probability simplex space, i.e. , the similarity functions defined either on or on can be used. However, the similarity function on is more appropriate, because it exploits the geometrical structure of , which, in contrast, is ignored by the similarity function on  (Kedem et al., 2012). [Alexandros]Now you confused me. You talk an appropriate similarity function on and you bring the example of the probability simplex space. However later we define an appropriate distance over the probability simplex induced by , which never the less is different from . It could confuse the reader.

The set of anchor points can be defined in various ways. Ideally, anchor points should be similar to the given learning instances , i.e. anchor points follow the same distribution as that of learning instances. Empirically, we can use directly training instances or cluster centers, the latter established by clustering algorithms. Similar to the current practice in kernel methods we will use in SBFIML as anchors points all the training instances.

Similarity Functions on . We can define the similarity on in various ways. In this paper we will investigate two types of differentiable similarity functions. The first one is based on the Gaussian function, defined as:

 sk(xi)=exp(−∥xi−zk∥22σk) (7)

where is the norm. controls the size of the neighborhood of the anchor point , with large values producing large neighborhoods. Note that the different s could be set to different values; if all of them are equal, this similarity function is exactly the Gaussian kernel. The second type of similarity function that we will look at is:

 sk(xi)=1−1πarccos(xTizk∥xi∥2⋅∥zk∥2) (8)

which measures the normalized angular similarity between and . This similarity function can be explained as we first projecting all points from to the hypersphere and then applying the angular similarity to points on a hypersphere. As a result, this similarity function is useful for data which approximately lie on a hypersphere. Note that this similarity function is also a valid kernel function (Honeine & Richard, 2010). [Alexandros]You see? with respect to my previous comment in which you were talking about appropriate distance functions and brough the probability simplex space example as a case in which we need a special metric. Here you do not use similarities that exploit structure.

One might say we can also achieve nonlinearity by mapping instances into the proximity space using the following similarity-based map :

 g(x)=(s1(x),…,sn(x)) (9)

We now compare our similarity-based map , equation 3.1 against the similarity-based map , equation 9, in two aspects, namely representation robustness and pullback metric analysis.

Representation Robustness. Compared to the representation induced by the similarity-based map , equation 9, our representation induced by the similarity-based map , equation 3.1, is more robust to density variations in original data space, i.e. the density of the learning instances varies significantly between different regions. This can be explained by the fact that the finite discrete distribution is essentially a representation of the neighborhood structure of a learning instance normalized by a ”scaling” factor, the sum of similarities of the learning instance to the anchor points. Hence the distance implied by the finite discrete distribution representation is less sensitive to the density variations of the different data regions. This is an important property. Without such robustness, an objective function based on raw distances can be easily biased towards data regions the density of which is low and thus dominates learning of the objective function. One example of this kind of objective is that of LMNN (Weinberger & Saul, 2009), which we will also use later in SBFIML to learn the Fisher information distance.

Pullback Metric Analysis. We also show how the two approaches differ by comparing the pullback metrics induced by the two similarity-based maps and . In doing so, we first need to specify the Riemannian metrics in the proximity space and on the statistical manifold . Following the work of similarity-based learning (Chen et al., 2009), we use the Euclidean metric as the in the proximity space . On the statistical manifold we use the Fisher information metric defined in equation 3 as . To simplify our analysis, we assume . However, note that this analysis can be generalized to other manifolds, e.g. . We use the standard Cartesian coordinate system for points in and and use m-affine coordinate system, equation 1, for points on .

The pullback metric induced by these two differential maps are given in the following lemma.

###### Lemma 3.

In , at with Cartesian coordinate, the form of the pullback metric of the Euclidean metric induced by the differential map of equation 9 is:

 G∗Q(x)=∇g(x)∇g(x)T=n∑i=1∇si(x)∇si(x)T (10)

where the vector of size is the differential of th similarity function . The form of the pullback metric of the Fisher information metric induced by the differential map of equation 3.1 is:

 G∗P(x) =n∑i=11¯si(x)(∇¯si(x)∇¯si(x)T) (11)

where and the expectation of is .

Gaussian Similarity Function. The form of pullback metrics and depends on the explicit form of the similarity function . We now study their differences using the Gaussian similarity function with kernel width , equation 7. We first show the difference between and by comparing their

largest eigenvectors, the directions in which metrics have the largest distance discrimination.

The largest eigenvectors of are:

 UQ(x) =argmaxUTU=Itr(UTG∗Q(x)U) =argmaxUTU=Im∑k=1n∑i=14σ2(uTksi(x)(x−zi))2

where is the trace norm and is the th column of matrix . The largest eigenvectors of the pullback metric are:

 UP(x) =argmaxUTU=Itr(UTG∗P(x)U) =argmaxUTU=Im∑k=1n∑i=14¯si(x)σ2(uTk(zi−E(zi))2

where

We see one key difference between and . In equation 3.1,

are the directions which maximize the sum of expected variance of

with respected to its expected mean. In contrast, the directions of in equation 3.1 maximize the sum of the unweighted ”variance” of without centralization. Their difference can be intuitively compared to the difference of doing local PCA with or without centralization. Therefore, is closer to the principle directions of local anchor points. Second, since it is also easy to show that has no distance in the orthogonal directions of the affine subspace spanned by the weighted anchor points of . So, removes the effect of locally irrelevant dimensions to the anchor point manifold.

To show the differences of pullback metrics and intuitively, we visualize their equi-distance curves in Figure 1, where the Guassian similarity function, euqation 7, is used to define the similarity maps in equations 9 and 3.1. As shown in Figure 1, we see that the pullback metric emphasizes more the distance along the principle direction of the local anchor points than the pullback metric . Furthermore, in Figure 1(b) we see that has a zero distance in the direction being orthogonal to the manifold of anchor points, the straight line which the (green) anchor points lie on. Therefore, is more discriminative on the manifold of the anchor points. To explore the effect of these differences, we also experimentally compare these two approaches in section 4 and the results show that learning the Fisher information distance on outperforms in a significant manner learning Mahalanobis distance in proximity space .

### 3.2 Large Margin Fisher Information Metric Learning

By applying on the learning instances the differential map of equation (3.1) we map them on the statistical manifold . We are now ready to learn the Fisher information distance from the data.

Distance Parametrization. As discussed in section 2, the Fisher information distance on can be exactly computed by the cosine distance (Lebanon, 2006; Lee et al., 2007):

 dFIM(pi,pj)=2arccos(√piT√pj) (14)

where is the probability mass vector of the finite discrete distribution . To parametrize the Fisher information distance, we apply on the probability mass vector a linear transformation . The intuition is that, the effect of the optimal linear transformation is equivalent to locating a set of hidden anchor points such that the data’s similarity representation is the same as the transformed representation. Thus the parametric Fisher information distance is defined as:

 dFIM(Lpi,Lpj)= 2arccos(√LpiT√Lpj) (15) s.t. L≥0,∑iLij=1,∀j

has size . is the number of hidden anchor points. To speedup the learning process, in practice we often learn a low rank linear transformation matrix with small . The constraints and are added to ensure that each is still a finite discrete distribution on the manifold .

Learning. We will follow the large margin metric learning approach of (Weinberger & Saul, 2009) and define the optimization problem of learning as:

 minL ∑ijk∈C(i,j,k)[ϵijk]++α∑i,j→idFIM(Lpi,Lpj) (16) s.t. L≥0 ∑iLij=1; ∀j ϵijk=dFIM(Lpi,Lpj)+γ−dFIM(Lpi,Lpk)

where is a parameter that balances the importance of the two terms. Unlike LMNN (Weinberger & Saul, 2009), the margin parameter is added in the large margin triplet constraints following the work of (Kedem et al., 2012), since the cosine distance is not linear with . The large margin triplet constraints for each instance are generated using its same-class nearest neighbors and its different-class nearest neighbors in the space and constraining the distance of each instance to its different class neighbors to be larger than those to its same class neighbors with margin. In the objective function of (16) the matrix is learned by minimizing the sum of the hinge losses and the sum of the pairwise distances of each instance to its same-class nearest neighbors.

Optimization. Since the cosine distance defined in equation (14) is not convex, the optimization problem (16) is not convex. However, the constraints on matrix are linear and we can solve this problem using a projected sub-gradient method. At each iteration, the main computation is the sub-gradient computation with complexity , where is the number of large margin triplet constraints. and are the dimensions of the matrix. The simplex projection operator on matrix can be efficiently computed with complexity  (Duchi et al., 2008). Note that, learning distance metric on has been previously studied by Riemannian Metric Learning (RML) (Lebanon, 2006) and -LMNN (Kedem et al., 2012). In -LMNN, a symmetric distance on is learned with large margin idea similar to problem 16. SBFIML differs from -LMNN in that it uses the cosine distance to measure the distance on . As described in section 2, the cosine distance is exactly equivalent to the Fisher information distance on , while the distance is only an approximation. In contrast to SBFIML and -LMNN, the work of RML focuses on unsupervised Fisher information metric learning. More importantly, both RML and -LMNN can only be applied in problems in which the input data lie on , while SBFIML can be applied to general data manifolds via the similarity-based differential map. Finally, note that SBFIML can also be applied to problems where we only have access to the pairwise instance similarity matrix, since it needs only the probability mass of finite discrete distributions as its input.

Local Metric Learning View of SBFIML. SBFIML can also be interpreted as a local metric learning algorithm. SBFIML defines the local metric on as the pullback metric of the Fisher information metric induced by the following similarity-based parametric differential map :

 fL(xi)=L⋅pi,s.t. L>0,∑iLij=1,∀j (17)

where as before is the probability mass vector of the finite discrete distribution defined in equation (3.1). SBFIML learns the local metric by learning the parameters of . The explicit form of the pullback metric can be computed according to the equation (5). Given the pullback metric we can approximate the geodesic distance on by assuming that the geodesic curves are formed by straight lines as local metric learning methods (Noh et al., 2009; Wang et al., 2012) do, which would result in a non-metric distance. However, Lemma 2 allows us to approximate the geodesic distance on by the Fisher information distance on . SBFIML follows the latter approach. Compared to the non-metric distance approximation, this new distance is a well defined distance function which has a closed form expression. Furthermore, this new distance approximation has the same asymptotic convergence result as the non-metric distance approximation.

## 4 Experiments

We will evaluate the performance of SBFIML on ten datasets from the UCI Machine Learning and mldata repositories. The details of these datasets are reported in the first column of Table 1. All datasets are preprocessed by standardizing the input features. We compare SBFIML against three metric learning baseline methods: LMNN (Weinberger & Saul, 2009)222http://www.cse.wustl.edu/kilian/code/code.html., KML (Wang et al., 2011)333http://cui.unige.ch/wangjun/., GLML (Noh et al., 2009), and PLML (Wang et al., 2012). The former two learn a global Mahalanobis metric in the input feature space and the RKHS space respectively, and the last two learn smooth local metrics in . In addition, we also compare SBFIML against Similarity-based Mahalanobis Metric Learning (SBMML) to see the difference of pullback metrics , equation 10, and , equation 11. SBMML learns a global Mahalanobis metric in the proximity space . Similar to SBFIML, the metric is learned by optimizing the problem 16, in which the cosine distance is replaced by Mahalanobis distance. The constraints on in problem 16 are also removed. To see the difference between the cosine distance used in SBFIML and the distance used in LMNN, we compare SBFIML against LMNN. Note that, both methods solve exactly the same optimization problem 16 but with different distance computations. Finally, we also compare SBFIML against SVM for binary classification problems and against multi-class SVMs for multiclass classification problems. In multi-class SVMs, we use the one-against-all strategy to determine the class label.

KML, SBMML and LMNN learn a PSD matrix and are thus computationally expensive for datasets with large number of instances. To speedup the learning process, similar to SBFIML, we can learn a low rank transformation matrix of size . For all methods, KML, SBMML, LMNN and SBFMIL, we set in all experiments. The matrix in KML and SBMML was initialized by clipping the identity matrix into the size of . In a similar manner, in LMNN and SBFIML the matrix was initialized by applying on the initialization matrix in KML a simplex projector which ensures the constraints in problem (16) are satisfied.

The LMNN has one hyper-parameter  (Weinberger & Saul, 2009). We set it to its default value . As in  (Noh et al., 2009)

, GLML uses the Gaussian distribution to model the learning instances of a given class. The hyper-parameters of PLML was set following

(Wang et al., 2012). The SBFIML has two hyper-parameters and . Following LMNN (Weinberger & Saul, 2009), we set the parameter to . We select the margin parameter from using a 4-fold inner Cross Validation (CV). The selection of an appropriate similarity function is crucial for SBFIML. We choose the similarity function with a 4-fold inner CV from the angular similarity, equation (8), and the Gaussian similarity in equation (7). We examine two types of Gaussian similarity. In the first we set all to which is selected from , was set to the average of all pairwise distances. In the second we set the for each anchor point separately; the was set by making the entropy of the conditional distribution equal to  (Hinton & Roweis, 2002), where is the number of training instances and was selected from .

Since LMNN and SBFIML apply different distance parametrizations to solve the same optimization problem, the parameters of LMNN are set in exactly the same way as SBFIML, except that the margin parameter of LMNN was selected from , because LMNN uses the squared distance (Kedem et al., 2012). The best similarity map for LMNN is also selected using a 4-fold inner CV from the same similarity function set as that of SBFIML. [Alexandros]in the second case I guess that you mean that for each you have a single, but distinct, , which is set by the distributional approach you describe, text needs to be adapted. I would like to have that explained :) Ovelall don’t you have way too many parameters?

Akin to SBFIML, the performance of KML and SVM depends heavily on the selection of the kernel. We select automatically the best kernel with a 4-fold inner CV. The kernels are chosen from the linear, the set of polynomial (degree 2,3 and 4), the angular similarity, equation (8), and the Gaussian kernels with widths , as in SBFIML was set to the average of all pairwise distances. In addition, we also select the margin parameter of KML from . The parameter of SVM was selected from . SBMML does not have any constraints on the similarity function, thus we select its similarity function with a 4-fold inner CV from a set which includes all kernel and similarity functions used in SBFIML and KML. As in KML, we select the margin parameter of SBMML from . For all methods, except GLML and SVM which do not involve triplet constraints, the triplet constraints are constructed using three same-class and ten different-class nearest neighbors for each learning instance. Finally, we use the 1-NN rule to evaluate the performance of the different metric learning methods.

To estimate the classification accuracy we used 5 times 10-fold CV. The statistical significance of the differences were tested using Student’s t-test with a p-value of 0.05. In order to get a better understanding of the relative performance of the different algorithms for a given dataset we used a simple ranking schema in which an algorithm A was assigned one point if it was found to have a statistically significantly better accuracy than another algorithm B, 0.5 points if the two algorithms did not have a significant difference, and zero points if A was found to be significantly worse than B.

Results. In Table 1 we report the accuracy results. We see that SBFIML outperforms in a statistical significant manner the single metric learning method LMNN and the local metric learning methods, GLML and PLML, in seven, eight and six out of ten datasets respectively. When we compare it to KML and SBMML, which learn a Mahalanobis metric in the RKHS and proximity space, respectively, we see that it is significantly better than KML and SBMML in four datasets and significantly worse in one dataset. Compared to LMNN, SBFIML outperforms -LMNN on eight datasets, being statistically significant better on three, and it never loses in statistical significant manner. Finally, compared to SVM, we see that SBFIML is significantly better in two datasets and significantly worse in one dataset. In terms of the total score, SBFIML achieves the best predictive performance with 50 point, followed by SVM ,which scores 46.5 point, and -LMNN with 42 point. The local metric learning method GLML is the one that performs the worst. A potential explanation for the poor performance of GLML could be that its Gaussian distribution assumption is not that appropriate for the datasets we experimented with.

To provide a better understanding of the predictive performance difference between SBFIML, SBMML, and LMNN, we applied them on five large datasets. To speedup the learning process, we use as anchor points of randomly selected training instances. Moreover, the parameter of low rank transformation matrix was reduced to , where is the number of anchor points. The kernel function and similarity map was selected using 4-fold inner CV. The classification accuracy of Isolet and Pendigits are estimated by the default train and test split, for other three datasets we used 10-fold cross-validation. The statistical significance of difference were tested with McNemar’s test with p-value of 0.05.

The accuracy results are reported in Table 2. We see that SBFIML achieves statistical significant better accuracy than SBMML on the two datasets, Splice and Pendigits. When compare it to LMNN, we see it is statistical significant better on one dataset, Pendigits. In terms of total score, SBFIML achieves the best score, points, followed by LMNN.

## 5 Conclusion

In this paper we present a two-stage metric learning algorithm SBFIML. It first maps learning instances onto a statistical manifold via a similarity-based differential map and then defines the distance in the input data space by the Fisher information distance on the statistical manifold. This induces a new family of distance metrics in the input data space with two important properties. First, the induced metrics are robust to density variations in the original data space and second they have largest distance discrimination on the manifold of the anchor points. Furthermore, by learning a metric on the statistical manifold SBFIML can learn distances on different types of input feature spaces. The similarity-based map used in SBFIML is natural and flexible; unlike KML it does not need to be PSD. In addition SBFIML can be interpreted as a local metric learning method with a well defined distance approximation. The experimental results show that it outperforms in a statistical significant manner both metric learning methods and SVM.

## Acknowledgments

Jun Wang was partially funded by the Swiss NSF (Grant 200021-122283/1). Ke Sun is partially supported by the Swiss State Secretariat for Education, Research and Innovation (SER grant number C11.0043). Fei Sha is supported by DARPA Award #D11AP00278 and ARO Award #W911NF-12-1-0241

## Appendix

Proof of Lemma 2.

###### Proof.

Let be the coordinate of under some smooth coordinate map and be the coordinate of under some smooth coordinate map . Since approaches , we have , where is the coordinate of under the coordinate map and is an infinitesimal small change approaching . Furthermore, since is a differential map, the function , which we will denote by , is also differentiable. According to the Taylor expansion, we have , where is the coordinate of under the coordinate map , is the Jacobian matrix of the function at point and is the remainder term of linear approximation. Finally, according to the definition of pullback metric, we have . This ends the proof. ∎

## References

• Amari & Cichocki (2010) Amari, S. and Cichocki, A. Information geometry of divergence functions. Bulletin of the Polish Academy of Sciences: Technical Sciences, 58(1):183–195, 2010.
• Amari & Nagaoka (2007) Amari, S. and Nagaoka, H. Methods of information geometry, volume 191. Amer Mathematical Society, 2007.
• Chen & Ye (2008) Chen, Jianhui and Ye, Jieping. Training svm with indefinite kernels. In Proceedings of the 25th international conference on Machine learning, pp. 136–143. ACM, 2008.
• Chen et al. (2009) Chen, Yihua, Garcia, Eric K., Gupta, Maya R., Rahimi, Ali, and Cazzanti, Luca. Similarity-based classification: Concepts and algorithms. JMLR, 2009.
• Cuturi & Avis (2011) Cuturi, M. and Avis, D. Ground metric learning. arXiv preprint arXiv:1110.2306, 2011.
• Davis et al. (2007) Davis, J.V., Kulis, B., Jain, P., Sra, S., and Dhillon, I.S. Information-theoretic metric learning. In ICML, 2007.
• Duchi et al. (2008) Duchi, J., Shalev-Shwartz, S., Singer, Y., and Chandra, T. Efficient projections onto the l 1-ball for learning in high dimensions. In ICML, 2008.
• Hauberg et al. (2012) Hauberg, Søren, Freifeld, Oren, and Black, Michael. A geometric take on metric learning. In Bartlett, P., Pereira, F.C.N., Burges, C.J.C., Bottou, L., and Weinberger, K.Q. (eds.), Advances in Neural Information Processing Systems 25, pp. 2033–2041, 2012.
• Hinton & Roweis (2002) Hinton, G. and Roweis, S. Stochastic neighbor embedding. Advances in neural information processing systems, 15:833–840, 2002.
• Honeine & Richard (2010) Honeine, P. and Richard, C. The angular kernel in machine learning for hyperspectral data classification. In Hyperspectral Image and Signal Processing: Evolution in Remote Sensing (WHISPERS), 2010 2nd Workshop on, pp. 1–4. IEEE, 2010.
• Jain et al. (2010) Jain, P., Kulis, B., and Dhillon, I. Inductive regularized learning of kernel functions. Advances in Neural Information Processing Systems, 23:946–954, 2010.
• Kass & Vos (2011) Kass, R.E. and Vos, P.W. Geometrical foundations of asymptotic inference, volume 908. Wiley-Interscience, 2011.
• Kedem et al. (2012) Kedem, Dor, Tyree, Stephen, Weinberger, Kilian, Sha, Fei, and Lanckriet, Gert. Non-linear metric learning. In Bartlett, P., Pereira, F.C.N., Burges, C.J.C., Bottou, L., and Weinberger, K.Q. (eds.), Advances in Neural Information Processing Systems 25, pp. 2582–2590, 2012.
• Lebanon (2006) Lebanon, G. Metric learning for text documents. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 28(4):497–508, 2006.
• Lee (2002) Lee, J.M. Introduction to smooth manifolds, volume 218. Springer, 2002.
• Lee et al. (2007) Lee, S.M., Abbott, A.L., and Araman, P.A. Dimensionality reduction and clustering on statistical manifolds. In Computer Vision and Pattern Recognition, 2007. CVPR’07. IEEE Conference on, pp. 1–7. IEEE, 2007.
• Noh et al. (2009) Noh, Y.K., Zhang, B.T., and Lee, D.D. Generative local metric learning for nearest neighbor classification. NIPS, 2009.
• Radhakrishna Rao (1945) Radhakrishna Rao, C. Information and accuracy attainable in the estimation of statistical parameters. Bulletin of the Calcutta Mathematical Society, 37(3):81–91, 1945.
• Van der Maaten & Hinton (2008) Van der Maaten, Laurens and Hinton, Geoffrey. Visualizing data using t-sne. Journal of Machine Learning Research, 9(2579-2605):85, 2008.
• Wang et al. (2011) Wang, J., Do, H., Woznica, A., and Kalousis, A. Metric learning with multiple kernels. Advances in Neural Information Processing Systems. MIT Press, 2011.
• Wang et al. (2012) Wang, Jun, Kalousis, Alexandros, and Woznica, Adam. Parametric local metric learning for nearest neighbor classification. In Bartlett, P., Pereira, F.C.N., Burges, C.J.C., Bottou, L., and Weinberger, K.Q. (eds.), Advances in Neural Information Processing Systems 25, pp. 1610–1618, 2012.
• Weinberger & Saul (2009) Weinberger, K.Q. and Saul, L.K. Distance metric learning for large margin nearest neighbor classification. The Journal of Machine Learning Research, 10:207–244, 2009.
• Ying et al. (2009) Ying, Y., Campbell, C., and Girolami, M. Analysis of svm with indefinite kernels. Advances in Neural Information Processing Systems, 22:2205–2213, 2009.