## Abstract

Learning an appropriate (dis)similarity function from the available data is a central problem in machine learning, since the success of many machine learning algorithms critically depends on the choice of a similarity function to compare examples. Despite many approaches to similarity metric learning that have been proposed, there has been little theoretical study on the links between similarity metric learning and the classification performance of the resulting classifier. In this letter, we propose a regularized similarity learning formulation associated with general matrix norms and establish their generalization bounds. We show that the generalization error of the resulting linear classifier can be bounded by the derived generalization bound of similarity learning. This shows that a good generalization of the learned similarity function guarantees a good classification of the resulting linear classifier. Our results extend and improve those obtained by Bellet, Habrard, and Sebban (2012). Due to the techniques dependent on the notion of uniform stability (Bousquet & Elisseeff, 2002), the bound obtained there holds true only for the Frobenius matrix-norm regularization. Our techniques using the Rademacher complexity (Bartlett & Mendelson, 2002) and its related Khinchin-type inequality enable us to establish bounds for regularized similarity learning formulations associated with general matrix norms, including sparse L1-norm and mixed (2,1)-norm.

## 1.  Introduction

The success of many machine learning algorithms heavily depends on how to specify the similarity or distance metric between examples. For instance, the k-nearest neighbor (k-NN) classifier depends on a distance (dissimilarity) function to identify the nearest neighbors for classification. Most information retrieval methods rely on a similarity function to identify the data points that are most similar to a given query. Kernel methods rely on the kernel function to represent the similarity between examples. Hence, how to learn an appropriate (dis)similarity function from the available data is a central problem in machine learning, which we refer to as similarity metric learning throughout the letter.

Recently considerable research effort has been devoted to similarity metric learning, and many methods have been proposed. They can be broadly divided into two main categories. The first category is a one-stage approach for similarity metric learning, which means that the methods learn the similarity (kernel) function and classifier together. Multiple kernel learning (Lanckriet, Cristianini, Bartlett, Ghaoui, & Jordan, 2004; Varma & Babu, 2009) is a notable one-stage approach that aims to learn an optimal kernel combination from a prescribed set of positive semidefinite (PSD) kernels. Another exemplary one-stage approach is indefinite kernel learning, which is motivated by the fact that in many applications, potential kernel matrices could be nonpositive semidefinite. Such cases include hyperbolic tangent kernels (Smola, Oari, & Williamson, 2001) and the protein sequence similarity measures derived from Smith-Waterman and BLAST score (Saigo, Vert, Ueda, & Akutsu, 2004). Indefinite kernel learning (Chen, Garcia, Gupta, Rahimi, & Cazzanti, 2009; Ying, Campbell, & Girolami, 2009) aims to learn a PSD kernel matrix from a prescribed indefinite kernel matrix, which is mostly restricted to the transductive settings. Other methods (Wu & Zhou, 2005; Wu, 2013) have analyzed regularization networks such as ridge regression and SVM given a prescribed indefinite kernel instead of aiming to learn an indefinite kernel function from data. The generalization analysis for such one-stage methods has been studied (see, e.g., Chen et al., 2009; Cortes, Mohri, & Rostamizadeh, 2010a; Ying & Campbell, 2009).

The second category of similarity metric learning is a two-stage method, which means that the processes of learning the similarity function and training the classifier are separate. One exemplar two-stage approach, referred to as metric learning (Bar-Hillel, Hertz, Shental, & Weinshall, 2005; Davis, Kulis, Jain, Sra, & Dhillon, 2007; Hoi, Liu, Lyu, & Ma, 2006; Jin, Wang, & Zhou, 2009; Weinberger, Blitzer, & Saul, 2005; Xing, Jordan, Russell, & Ng, 2002; Ying, Huang, & Campbell, 2009), often focuses on learning a Mahalanobis distance metric defined, for any , by . Here, M is a positive semidefinite (PSD) matrix. Another example of such methods (Chechik, Sharma, Shalit, & Bengio, 2010; Maurer, 2008) is bilinear similarity learning, which focuses on learning a similarity function defined, for any by with M being a PSD matrix. These methods are mainly motivated by the natural intuition that the similarity score between examples in the same class should be larger than that of examples from distinct classes. The k-NN classification using the similarity metric learned from these methods was empirically shown to achieve better accuracy than that using the standard Euclidean distance.

Although many two-stage approaches for similarity metric learning have been proposed, in contrast to the one-stage methods, there is relatively little theoretical work on the question of whether similarity-based learning guarantees a good generalization of the resultant classification. For instance, generalization bounds were recently established for metric and similarity learning (Cao, Guo, & Ying, 2012; Jin et al., 2009; Maurer, 2008) under different statistical assumptions on the data. However, there are no theoretical guarantees for such empirical success. In other words, it is not clear whether good generalization bounds for metric and similarity learning (Cao et al., 2012; Jin et al., 2009) can lead to good classification of the resultant k-NN classifiers. Recently, Bellet, Habrard, and Sebban (2012) proposed a regularized similarity learning approach, which is mainly motivated by the -good similarity functions introduced in Balcan and Blum (2006); Balcan, Blum, and Srebro (2008). In particular, they showed that the proposed similarity learning can theoretically guarantee good generalization for classification. However, due to the techniques dependent on the notion of uniform stability (Bousquet & Elisseeff, 2002), the generalization bounds hold true only for strongly convex matrix-norm regularization (e.g., the Frobenius norm).

In this letter, we consider a new similarity learning formulation associated with general matrix-norm regularization terms. Its generalization bounds are established for various matrix regularizations including the Frobenius norm, sparse L1-norm, and mixed (2,1)-norm (see definitions below). The learned similarity matrix is used to design a sparse classification algorithm, and we prove that the generalization error of its resultant linear classifier can be bounded by the derived generalization bound for similarity learning. This implies that the proposed similarity learning with general matrix-norm regularization guarantees good generalization for classification. Our techniques using the Rademacher complexity (Bartlett & Mendelson, 2002) and the important Khinchin-type inequality for the Rademacher variables enables us to derive bounds for general matrix-norm regularization, including the sparse L1-norm and mixed (2,1)-norm regularization.

The remainder of this letter is organized as follows. In section 2, we propose the similarity learning formulations with general matrix-norm regularization terms and state the main theorems. In particular, the results will be illustrated using various examples. The related work is discussed in section 3. The generalization bounds for similarity learning are established in section 4. In section 5, we develop a theoretical link between the generalization bounds of the proposed similarity learning method and the generalization error of the linear classifier built from the learned similarity function. Section 6 estimates the Rademacher averages and gives the proof for examples in section 2. Section 7 summarizes this letter and points to some possible directions for future research.

## 2.  Regularization Formulation and Main Results

In this section, we introduce the regularized formulation of similarity learning and state our main results. Before we do that, we introduce some notations and present some background material.

Denote, for any , Let be a set of training samples, which is drawn identically and independently from a distribution on Here, the input space is a domain in , and is called the output space. Let denote the set of symmetric matrices. For any we consider as a bilinear similarity score parameterized by a symmetric matrix The symmetry of matrix A guarantees the symmetry of the similarity score KA, that is,

The aim of similarity learning is to learn a matrix A from a given set of training samples z such that the similarity score KA between examples from the same label is larger than that between examples from different labels. A natural approach to achieve this aim is to minimize the following empirical error,
2.1
where r>0 is the margin. Note that Minimizing this empirical error encourages, for any i, that with margin r, the average similarity scores between examples with the same class as yi are relatively larger than those between examples with distinct classes from yi. To avoid overfitting, we add a matrix-regularized term to the empirical error and reach the following regularization formulation,
2.2
where is the regularization parameter. Here, the notation denotes a general matrix norm. For instance, it can be the sparse L1-norm , the (2,1)-mixed norm the Frobenius norm , or the trace norm where denotes the singular values of matrix A. When is a Frobenius norm, formulation 2.2 has been proposed by Bellet et al. (2012).
The first contribution of this letter is to establish generalization bounds for regularized similarity learning (see equation 2.1) with general matrix norms. Specifically, define
2.3
The target of generalization analysis for similarity learning is to bound . Its special case with the Frobenius matrix norm was established in Bellet et al. (2012). It used the uniform stability techniques (Bousquet & Elisseeff, 2002), which, however, cannot deal with nonstrongly convex matrix norms such as the L1-norm, (2,1)-mixed norm and trace norm. Our new analysis techniques are able to deal with general matrix norms, which depend on the concept of Rademacher averages (Bartlett & Mendelson, 2002) defined as follows:
Definition 1.
Let be a class of uniformly bounded functions. For every integer n, we call
the Rademacher average over where are independent random variables distributed according to some probability measure and are independent Rademacher random variables, that is,
Before stating our generalization bounds for similarity learning, we first introduce some notations. For any let where denotes the trace of a matrix. For any matrix norm , its dual norm is defined, for any B, by Denote . Let the Rademacher average with respect to the dual matrix norm be defined by
2.4
Now we can state the generalization bounds for similarity learning, which is closely related to the Rademacher averages with respect to the dual matrix norm
Theorem 1.
Let A z be the solution to algorithm 2.2. Then for any with probability at least there holds
2.5

The proof for theorem 1 is given in section 4. Recently, some studies (Cao et al., 2012; Kar & Jain, 2011; Kumar, Niculescu-Mizil, Kavukcoglu, & Daum, 2012) have given generalization bounds for similarity (kernel) learning, where the involved empirical term is a U-statistics term. Hence, the natural idea in the above studies is to explore properties of U-statistics (Clémencon, Lugosi, & Vayatis, 2008; de La peña & Giné, 1999) for analyzing the related similarity learning formulations. The proof for theorem 1 differs from earlier approaches (Cao et al., 2012; Kar & Jain, 2011) since the empirical term, equation 2.1, in formulation 2.2, is not a U-statistics term (there is more discussion in section 3 on this topic).

Following the exact argument as the proof for theorem 1, a similar result is also true if we switch the position of and , that is, for any with probability at least we have
The second contribution of this letter is to investigate the theoretical relationship between similarity learning, equation 2.2, and the generalization error of the linear classifier built from the learned metric Az. We show that the generalization bound for the similarity learning gives an upper bound for the generalization error of a linear classifier produced by the linear support vector machine (SVM; Vapnik, 1998), defined
2.6
where is a sample-dependent hypothesis space. The empirical error of associated with z is defined by
The true generalization error is defined as

Now we are in a position to state the relationship between the similarity learning and the generalization error of the linear classifier:

Theorem 2.
Let Az and fz be defined by equations 2.2 and 2.6, respectively. Then for any with confidence at least there holds
2.7

The proof for theorem 2 will be established in section 5.

Theorems 1 and 2 depend critically on two terms: the constant and the Rademacher average Below, we list the estimation of these two terms associated with different matrix norms. For any vector , denote

Example 1.

Consider the sparse L1-norm defined, for any , by Let Az and fz be defined, respectively, by equations 2.2 and 2.6. Then, we have the following results:

1. and

2. For any with confidence at least there holds
3. For any with confidence at least there holds

For any vector , let be the standard Euclidean norm. Considering the regularized similarity learning with the Frobenius matrix norm, we have the following result:

Example 2.

Consider the Frobenius matrix norm defined, for any , by Let Az and fz be defined by equations 2.2 and 2.6, respectively. Then we have the following estimation:

1. and

2. For any with confidence at least there holds
3. For any with confidence at least there holds

We end this section with two remarks. First, theorem 2 and the examples mean that a good similarity (i.e., a small for similarity learning) can guarantee a good classification (i.e., a small generalization error ). Second, the bounds in example 2 are consistent with those in Bellet et al. (2012).

## 3.  Related Work

In this section, we discuss studies on similarity metric learning that are related to our work.

Many similarity metric learning methods have been motivated by the intuition that the similarity score between examples in the same class should be larger than that of examples from distinct classes (Bar-Hillel, Hertz, Shental, & Weinshall, 2005; Cao et al., 2012; Chechik et al., 2010; Hoi et al., 2006; Jin et al., 2009; Maurer, 2008; Weinberger et al., 2005; Xing et al., 2002). Jin et al. (2009) established generalization bounds for regularized metric learning algorithms using the concept of uniform stability (Bartlett & Mendelson, 2002), which, however, works only for strongly convex matrix regularization terms. Very recently Cao et al. (2012) established generalization bounds for metric and similarity learning associated with general matrix norm regularization using the techniques of Rademacher averages and U-statistics. However, there were no theoretical links between the similarity metric learning and the generalization performance of classifiers based on the learned similarity matrix. Here, we focus on the problem of how to learn a good linear similarity function KA such that it can guarantee a good classifier derived from the learned similarity function. In addition, our formulation, equation 2.2, is quite distinct from similarity metric learning methods (Cao et al., 2012; Chechik et al., 2010), since they are based on pairwise or triplet-wise constraints and consider the following pairwise empirical objective function:
3.1
Our equation 2.2 is less restrictive since the empirical objective function is defined over an average of similarity scores and does not require the positive semidefiniteness of the similarity function K.

Balcan et al. (2008) developed a theory of -good similarity function defined as follows. It attempts to investigate the theoretical relationship between the properties of a similarity function and its performance in linear classification:

Definition 2 (Balcan & Blum, 2006).

A similarity function K is a -good similarity function in hinge loss for a learning problem P if there exists a random indicator function R(x) defining a probabilistic set of “reasonable points” such that the following conditions hold:

1. where

The first condition can be interpreted as “ proportion of points x are on average more similar to random reasonable points of the same class than to random reasonable points of the distinct classes” and the second condition as “at least a proportion of the points should be reasonable.” The following theorem implies that if given an -good similarity function and enough landmarks, there exists a separator with error arbitrarily close to

Theorem 3 (Balcan & Blum, 2006).

Let K be an -good similarity function in hinge loss for a learning problem P. For any and let be a potentially unlabeled sample of landmarks drawn from P. Consider the mapping Then, with probability at least over the random sample S, the induced distribution in has a linear separator of error at most at margin

Balcan et al. (2008) mentioned that the linear separator can be estimated by solving the following linear programming if we have du potentially unlabeled sample and dl labeled sample:
3.2
Algorithm 3.2 is quite similar to the linear SVM, equation 2.6, that we use in this letter. Our work is distinct from Balcan et al. (2008) in two respects. First, the similarity function K is predefined in algorithm 3.2 while we aim to learn a similarity function from a regularized similarity learning formulation, equation 2.2. Second, although the separators are both trained from the linear SVM, the classification algorithm, equation 3.2, used in Balcan et al. (2008) was designed using two different sets of examples: a set of labeled samples of size dl to train the classification algorithm and another set of unlabeled samples with size du to define the mapping In this letter, we use the same set of training samples for both similarity learning, equation 2.2, and the classification algorithm, equation 2.6.

Recent work by Bellet et al. (2012) is mostly close to ours. Specifically, they considered similarity learning formulation (see equation 2.2) with the Frobenius norm regularization. Generalization bounds for similarity learning were derived using uniform stability arguments (Bousquet & Elisseeff, 2002), which cannot deal with, for instance, the L1-norm and (2,1)-norm regularization terms. In addition, the results about the relationship between the similarity learning and the performance of the learned matrix in classification were quoted from Balcan et al. (2008) and hence requires two separate sets of samples to train the classifier.

Most recently, there has been considerable interest in two-stage approaches for multiple kernel learning (Cortes, Mohri, & Rostamizadeh, 2010b; Kar, 2013), which perform competitively as the one-stage approaches (Lanckriet et al., 2004; Varma & Babu, 2009). In particular, Kar (2013) studied generalization guarantees for the following regularization formulation for learning similarity (kernel) function proposed in Kumar et al. (2012):
3.3
where is the positive linear combination of base kernels and is a regularization term that, for instance, can be the Frobenius norm or the L1 norm. Specifically, Kar (2013) established elegant generalization bounds for the above two-stage multiple kernel learning using techniques of Rademacher averages (Bartlett & Mendelson, 2002; Kakade, Sridharan, & Tewari, 2008; Kakade, Shalev-Shwartz, & Tewari, 2012) and U-statistics (Cao et al., 2012; Clémencon et al., 2008). The empirical error term, equation 2.1, in our formulation, equation 2.2, is not a U-statistics term, and the techniques in Kar (2013) and Cao et al. (2012) cannot directly be applied to our case.

Kar and Jain (2011, 2012) introduced an extended framework of Balcan and Blum (2006) and Balcan et al. (2008) in the general setting of supervised learning. The authors proposed a general goodness criterion for similarity functions, which can handle general supervised learning tasks and also subsumes the goodness of condition of Balcan et al. (2008). There, efficient algorithms were constructed with provable generalization error bounds. The main distinction between this work and our own work is that we aim to learn a similarity function, while in their work, a similarity function is defined in advance.

## 4.  Generalization Bounds for Similarity Learning

In this section, we establish generalization bounds for the similarity learning formulation equation 2.2, with general matrix-norm regularization terms. Recall that the true error for similarity learning is defined by
The target of generalization analysis for similarity learning is to bound the empirical error by the true error
By definition of Az, we know that which implies that Denote
Hence, one can easily see that the solution Az to formulation 2.2 belongs to Now we are ready to prove generalization bounds for similarity learning, which was stated as theorem 1 in section 2.

Proof of theorem 1. Our proof is divided into two steps.

Step 1. Let denote the expectation with respect to samples z. Observe that Also, for any and , there holds
Applying McDiarmid's inequality (McDiarmid, 1989) (see lemma 1 in the appendix) to the term , with probability at least there holds
4.1

Now we are in a position to estimate the first term in the expectation form on the right-hand side of equation 4.1 by standard symmetrization techniques.

Step 2. We divide the term into two parts as follows:
where
and
Now let be an i.i.d. sample that is independent of z. We first estimate I1 using the standard symmetrization techniques. To this end, we rewrite as . Then we have
By the standard Rademacher symmetrization technique and the contraction property of the Rademacher average (see lemma 2 in the appendix), we have
where the last inequality follows from the fact that for any and
Similarly, we can estimate I2 as follows:
In this estimation, the first inequality follows from the Lipschitz continuity of the hinge loss function. Following the standard Rademacher symmetrization technique (Bartlett & Mendelson, 2002), from the above estimation we can further estimate I2 as follows:
The desired result follows by combining equation 4.1 with the above estimation for I1 and I2. This completes the proof for the theorem.

## 5.  Guaranteed Classification via Good Similarity

In this section, we investigate the theoretical relationship between the generalization error of the similarity learning and that of the linear classifier built from the learned similarity metric In particular, we will show that the generalization error of the similarity learning gives an upper bound for the generalization error of the linear classifier, which was stated as theorem 2 in section 2.

Before giving the proof of theorem 2, we first establish the generalization bounds for the linear SVM algorithm, equation 2.6. Recall that the algorithm was defined by
where
The generalization analysis of the linear SVM algorithm, equation 2.6, aims to estimate the term For any z, one can easily see that the solution to the algorithm belongs to the set where
To perform the generalization analysis, we seek a sample-independent set that contains, for any z, the sample-dependent hypothesis space Specifically, we define a sample independent hypothesis space by
Recalling that for any z, , one can easily see that is a subset of It follows that for any z, the solution to the linear SVM algorithm, equation 2.6, lies in the set which is given by
The following theorem states the generalization bounds of the linear SVM for classification:
Theorem 4.
Let f z be the solution to the algorithm, equation 2.6. For any with probability at least we have
5.1
Proof.
By McDiarmid's inequality, for any with confidence , there holds
Next, all we need is to estimate the first part of the right-hand side of the above inequality. Let be an independent sample (independent each other and z) and with the same distribution as z:
Here we also use the standard Rademacher symmetrization technique and the contractor property of the Rademacher average. Then the proof is complete.

Now we are in a position to give the proof of theorem 2:

Proof of theorem 2. If we take then One can easily see that which means From theorem 4 and the definition of fz, we get
This completes the proof of the theorem.

## 6.  Estimating Rademacher Averages

Theorems 1, 2, and 4 critically depend on the estimation of the Rademacher average defined by equation 2.4. In this section, we establish a self-contained proof for this estimation and prove the examples listed in section 2. For notational simplicity, denote by the th variable of the ith sample

Proof of example 1. The dual norm of L1-norm is the -norm. Hence,
6.1
Also, the Rademacher average can be rewritten as
6.2
Now let for any By Jensen's inequality, for any , we have
6.3
Furthermore, for any there holds
where the first inequality follows from the Khinchin-type inequality (see lemma 3 in the appendix) and the second inequality holds due to the Stirling's inequality: . Now set . The above inequality can be upper-bounded by
Putting the above estimation back into equation 6.3 implies that
That means
6.4
Putting the above estimation back into equation 6.2 implies that
The other desired results in the example follow directly from combining the above estimation with theorems 1 and 2.

We now turn our attention to the similarity learning formulation, equation 2.2, with the Frobenius norm regularization:

Proof of example 2. The dual norm of the Frobenius norm is itself. Consequently, The Rademacher average can be rewritten as
By Cauchy's inequality, there holds
6.5
Then the desired results can be derived by combining the above estimation with theorems 1 and 2.

The above generalization bound for the similarity learning formulation, equation 2.2, with the Frobenius norm regularization is consistent with that given in Bellet et al. (2012), where the result holds true under the assumption that . Next, we provide the estimation of respectively for the mixed (2,1)-norm and the trace norm:

Example 3.

Consider the similarity learning formulation, equation 2.2, with the mixed (2,1)-norm regularization Then we have the following estimation:

1. and
2. For any with confidence at least there holds
3. For any with probability at least there holds

Proof.
The dual norm of the (2,1)-norm is the -norm, which implies that and
where the last inequality follows from estimation 6.4. We complete the proof by combining the above estimation with theorems 1 and 2.
We briefly discuss the case of the trace norm regularization, In this case, the dual norm of trace norm is the spectral norm defined, for any , by where are the singular values of matrix B. Observe, for any , that Hence, the constant In addition,
6.7
Indeed, the above estimation for is optimal. To see this, we observe from de la Peña and Giné (1999, theorem 1.3.2) that
Combining the above fact with equation 6.7, we can obtain

Hence, the estimation, equation 6.7, for is optimal up to the constant Furthermore, ignoring further estimation , the above estimations mean that the estimation for in the case of trace-norm regularization is the same as the equation 6.5 estimation for the Frobenius norm regularization. Consequently, the generalization bounds for similarity learning and the relationship between similarity learning and the linear SVM are the same as those stated in example 2. It is a bit disappointing that there is no improvement when using the trace norm. The possible reason is that the spectral norm of B and the Frobenius norm of B are the same when B takes the form B=xyT for any

We end this section with a comment on an alternate way to estimate the Rademacher average . Kakade et al. (2008, 2012) developed elegant techniques for estimating Rademacher averages for linear predictors. In particular, the following theorem was established:

Theorem 5 (Kakade et al., 2008, 2012).
Let be a closed convex set, and let be a -strongly convex with respect to and assume that . Assume Furthermore, let and Then we have
To apply theorem 5, we rewrite the Rademacher average as
6.8
Now let Let us consider the sparse L1-norm defined, for any , by In this case, we observe that Let with , which is ()-strongly convex with respect to the norm Then for any , we have that Combining these observations with equation 6.8 allows us to obtain the estimation Similarly, for the (2,1)-mixed norm , observe that Applying theorem 5 with () again, we will have the estimation Hence, the estimations for the above two cases are similar to our estimations in the above examples. Our estimation is more straightforward by directly using the Khinchin-type inequality in contrast to the advanced convex-analysis techniques used in Kakade et al. (2008, 2012).

However, for the case of trace-norm regularization (), one would expect, using the techniques in Kakade et al. (2008, 2012), that the estimation for is the same as that in the case for the sparse L1-norm. The main hurdle for such a result is the estimation of by the trace norm of A. Indeed, by the discussion following our estimation, equation 6.7, directly using Khinchin-type inequality, we know that our estimation is optimal. Hence, one cannot expect that the estimation for for the case for trace-norm regularization is the same as that in the case for sparse L1-norm regularization in our particular case of the similarity learning formulation, equation 2.2.

We end this section with an open question. It is not clear to us how to establish a generic result for estimating the interesting Rademacher average given by equation 6.8. Such a generic result is expected to be very similar to the result stated above as theorem 5, which was established by Kakade et al. (2008, 2012). The main advantage of establishing such a generic result would enable a unifying estimation of for different matrix norms, which can then be instantiated into examples 1, 2, and 3.

## 7.  Conclusion

In this letter, we have considered a regularized similarity learning formulation, equation 2.2. Its generalization bounds were established for various matrix-norm regularization terms such as the Frobenius norm, sparse L1-norm, and mixed (2,1)-norm. We proved that the generalization error of the linear classifier based on the learned similarity function can be bounded by the derived generalization bound of similarity learning. This guarantees the goodness of the generalization of similarity learning (see equation 2.2) with general matrix-norm regularization and thus the classification generalization of the resulting linear classifier. Our techniques using the Rademacher complexity (Bartlett & Mendelson, 2002) and the important Khinchin-type inequality for the Rademacher variables allow us to obtain new bounds for similarity learning with general matrix-norm regularization terms.

There are several possible directions for future work. First, we may consider similarity algorithms with general loss functions. It is expected that under some convexity conditions on the loss functions, better results could be obtained. Second, we usually focus on the excess misclassification error when considering classification problems. Hence, in the future, we would like to consider the theoretical link between the generalization bounds of the similarity learning and the excess misclassification error of the classifier built from the learned similarity function.

## Appendix

In this appendix, the following facts are used for establishing generalization bounds in sections 4 and 5.

Definition 3.
We say the function with bounded differences if, for all ,
Lemma 1 (McDiarmid's inequality—McDiarmid, 1989).
Suppose with bounded differences . Then for all , there holds

We need the following contraction property of the Rademacher averages, which is essentially implied by theorem 4.12 in Ledoux and Talagrand (1991: see also Bartlett & Mendelson, 2002; Koltchinskii & Panchenko, 2002).

Lemma 2.
Let F be a class of uniformly bounded real-valued functions on and . If for each , is a function having a Lipschitz constant ci, then for any ,
A.1

Another important property of the Rademacher average, which is used in the proof of the generalization bounds of the similarity learning, is the following Khinchin-type inequality (see de la Peña & Giné, 1999, theorem 3.2.2):

Lemma 3.
For let and be a family of i.i.d. Rademacher random variables. Then for any , we have

## Acknowledgments

We are grateful to the referees for their invaluable comments and suggestions on this letter. This work was supported by the EPSRC under grant EP/J001384/1.

## References

Balcan
,
M.-F.
, &
Blum
,
A.
(
2006
).
On a theory of learning with similarity functions
. In
Proceedings of the 23rd International Conference on Machine Learning
(pp.
73
80
).
New York
:
ACM Press
.
Balcan
,
M.-F.
,
Blum
,
A.
, &
Srebro
,
N.
(
2008
).
Improved guarantees for learning via similarity functions
. In
Proceedings of the 21st Annual Conference on Learning Theory
(pp.
287
298
).
:
Omnipress
.
Bar-Hillel
,
A.
,
Hertz
,
T.
,
Shental
,
N.
, &
Weinshall
,
D.
(
2005
).
Learning a Mahalanobis metric from equivalence constraints
.
Journal of Machine Learning Research
,
6
,
937
965
.
Bartlett
,
P. L.
, &
Mendelson
,
S.
(
2002
).
Rademacher and gaussian complexities: Risk bounds and structural results
.
Journal of Machine Learning Research
,
3
,
463
482
.
Bellet
,
A.
,
Habrard
,
A.
, &
Sebban
,
M.
(
2012
).
Similarity learning for provably accurate sparse linear classification
. In
Proceedings of the 27th International Conference on Machine Learning
(pp.
1871
1878
).
New York
:
ACM Press
.
Bousquet
,
O.
, &
Elisseeff
,
A.
(
2002
).
Stability and generalization
.
Journal of Machine Learning Research
,
2
,
499
526
.
Cao
,
Q.
,
Guo
,
Z.-C.
, &
Ying
,
Y.
(
2012
).
Generalization bounds for metric and similarity learning.
Unpublished manuscript
.
Chechik
,
G.
,
Sharma
,
V.
,
Shalit
,
U.
, &
Bengio
,
S.
(
2010
).
Large scale online learning of image similarity through ranking
.
Journal of Machine Learning Research
,
11
,
1109
1135
.
Chen
,
Y.
,
Garcia
,
E. K.
,
Gupta
,
M. R.
,
Rahimi
,
A.
, &
Cazzanti
,
L.
(
2009
).
Similarity-based classification: Concepts and algorithms
.
Journal of Machine Learning Research
,
10
,
747
776
.
Clémencon
,
S.
,
Lugosi
,
G.
, &
Vayatis
,
N.
(
2008
).
Ranking and empirical minimization of U-statistics
.
Annals of Statistics
,
36
,
844
874
.
Cortes
,
C.
,
Mohri
,
M.
, &
,
A.
(
2010a
).
Generalization bounds for learning kernels
. In
Proceedings of the 27th International Conference on Machine Learning
(pp.
247
254
).
New York
:
ACM Press
.
Cortes
,
C.
,
Mohri
,
M.
, &
,
A.
(
2010b
).
Two-stage learning kernel algorithms
. In
Proceedings of the 27th International Conference on Machine Learning
(pp.
239
246
).
New York
:
ACM Press
.
Davis
,
J. V.
,
Kulis
,
B.
,
Jain
,
P.
,
Sra
,
S.
, &
Dhillon
,
I. S.
(
2007
).
Information-theoretic metric learning
. In
Proceedings of the 24th International Conference on Machine Learning
(pp.
209
216
).
New York
:
ACM Press
.
de la Peña
,
V. H.
, &
Giné
,
E. A.
(
1999
).
Decoupling: From dependence to independence
.
New York
:
Springer
.
Hoi
,
S. C.
,
Liu
,
W.
,
Lyu
,
M. R.
, &
Ma
,
W. Y.
(
2006
).
Learning distance metrics with contextual constraints for image retrieval
. In
IEEE Computer Society Conference on Computer Vision and Pattern Recognition
(pp.
2072
2078
).
Piscataway, NJ
:
IEEE Press
.
Jin
,
R.
,
Wang
,
S.
, &
Zhou
,
Y.
(
2009
).
Regularized distance metric learning: Theory and algorithm
. In
Y. Bengio, J. D. Lafferty, C. K. I. Williams, & A. Culotta
(Eds.),
Advances in neural information processing systems, 22
(pp.
862
870
).
Cambridge, MA
:
MIT Press
.
,
S. M.
,
Shalev-Shwartz
,
S.
, &
Tewari
,
A.
(
2012
).
Regularization techniques for learning with matrices
.
Journal of Machine Learning Research
,
13
,
1865
1890
.
,
S. M.
,
Sridharan
,
K.
, &
Tewari
,
A.
(
2008
).
On the complexity of linear prediction: Risk bounds, margin bounds, and regularization
. In
D. Koller, D. Schuurmans, Y. Bengio, L. Bottou
(Eds.),
Advances in neural information processing systems, 21
(pp.
793
800
).
Cambridge, MA
:
MIT Press
.
Kar
,
P.
(
2013
).
Generalization guarantees for a binary classification framework for two-stage multiple kernel learning
.
CoRR abs/1302.0406
.
Kar
,
P.
, &
Jain
,
P.
(
2011
).
Similarity-based learning via data driven embeddings
. In
Advances in neural information processing systems
(pp.
1998
2006
).
Cambridge, MA
:
MIT Press
.
Kar
,
P.
, &
Jain
,
P.
(
2012
).
Supervised learning with similarity functions
. In
J. Shawe-Taylor, R. S. Zemel, P. L. Bartlett, F. C. N. Pereira, & K. Q. Weinberger
(Eds.),
Advances in neural information processing systems, 24
(pp.
215
223
).
Red Hook, NY
:
Curran
.
Koltchinskii
,
V.
, &
Panchenko
,
D.
(
2002
).
Empirical margin distributions and bounding the generalization error of combined classifiers
.
Annals of Statistics
,
30
(
1
),
1
50
.
Kumar
,
A.
,
Niculescu-Mizil
,
A.
,
Kavukcoglu
,
K.
, &
Daum
,
H.
(
2012
).
A binary classification framework for two-stage multiple kernel learning
. In
Proceedings of the 29th International Conference on Machine Learning
(pp.
1295
1302
).
New York
:
ACM Press
.
Lanckriet
,
G. R. G.
,
Cristianini
,
N.
,
Bartlett
,
P.
,
Ghaoui
,
L. E.
, &
Jordan
,
M. I.
(
2004
).
Learning the kernel matrix with semidefinite programming
.
Journal of Machine Learning Research
,
5
,
27
72
.
Ledoux
,
M.
, &
Talagrand
,
M.
(
1991
).
Probability in Banach spaces: Isoperimetry and processes.
New York
:
Springer
.
Maurer
,
A.
(
2008
).
Learning similarity with operator-valued large-margin classifiers
.
Journal of Machine Learning Research
,
9
,
1049
1082
.
McDiarmid
,
C.
(
1989
).
Surveys in combinatorics
.
Cambridge
:
Cambridge University Press
.
Saigo
,
H.
,
Vert
,
J. P.
,
Ueda
,
N.
, &
Akutsu
,
T.
(
2004
).
Protein homology detection using string alignment kernels
.
Bioinformatics
,
20
,
1682
1689
.
Smola
,
A. J.
,
Oari
,
Z. L.
, &
Williamson
,
R. C.
(
2001
).
Regularization with dot-product kernels
. In
T. K. Leen, T. G. Dietterich, & V. Tresp (Eds.)
,
Advances in neural information processing systems, 13
(pp.
308
314
).
Cambridge, MA
:
MIT Press
.
Vapnik
,
V. N.
(
1998
).
Statistical learning theory
.
New York
:
Wiley
.
Varma
,
M.
, &
Babu
,
B. R.
(
2009
).
More generality in efficient multiple kernel learning
. In
Proceedings of the 26th International Conference on Machine Learning
(pp.
1065
1072
).
New York
:
ACM Press
.
Weinberger
,
K. Q.
,
Blitzer
,
J.
, &
Saul
,
L. K.
(
2005
).
Distance metric learning for large margin nearest neighbor classification
. In
L. Saul, Y. Weiss, & L. Bottou
(Eds.),
Advances in neural information processing systems, 17
(pp.
1473
1480
).
Cambridge, MA
:
MIT Press
.
Wu
,
Q.
(
2013
).
Regularization networks with indefinite kernels
.
Journal of Approximation Theory
,
166
,
1
18
.
Wu
,
Q.
, &
Zhou
,
D. X.
(
2005
).
SVM soft margin classifiers: Linear programming versus quadratic programming
.
Neural Computation
,
17
,
1160
1187
.
Xing
,
E. P.
,
Jordan
,
M. I.
,
Russell
,
S.
, &
Ng
,
A.
(
2002
).
Distance metric learning with application to clustering with side-information
. In
S. Becker, S. Thrün, & K. Obermayer (Eds.)
,
Advances in neural information processing systems
,
15
(pp.
505
512
).
Cambridge, MA
:
MIT Press
.
Ying
,
Y.
, &
Campbell
,
C.
(
2009
).
Generalization bounds for learning the kernel
. In
Proceedings of the 22nd Annual Conference on Learning Theory
.
Ying
,
Y.
,
Campbell
,
C.
, &
Girolami
,
M.
(
2009
).
Analysis of SVM with indefinite kernels
. In
Y. Bengio, D. Schuurmans, J. D. Lafferty, C. K. I. Williams, & A. Culotta (Eds.)
,
Advances in neural information processing systems
,
22
(pp.
2205
2213
),
Cambridge, MA
:
MIT Press
.
Ying
,
Y.
,
Huang
,
K.
, &
Campbell
,
C.
(
2009
).
Sparse metric learning via smooth optimization
. In
Y. Bengio, D. Schuurmans, J. D. Lafferty, C. K. I. Williams, & A. Culotta
(Eds.),
Advances in neural information processing systems, 22
(pp.
2214
2222
).
Cambridge, MA
:
MIT Press
.

## Author notes

Z.-C. Guo is now at the Department of Mathematics, Zhejiang University, Hangzhou 310027, China.