{'fraction_non_alphanumeric': 0.035643950050858096, 'fraction_numerical': 0.010604453870625663, 'mean_word_length': 4.243758511121198, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Relative Comparison Kernel Learning with Auxiliary Kernels

In this work we consider the problem of learning a positive semidefinite kernel matrix from relative comparisons of the form:"object A is more similar to object B than it is to C", where comparisons are given by humans. Existing solutions to this problem assume many comparisons are provided to learn a high quality kernel. However, this can be considered unrealistic for many real-world tasks since relative assessments require human input, which is often costly or difficult to obtain. Because of this, only a limited number of these comparisons may be provided. In this work, we explore methods for aiding the process of learning a kernel with the help of auxiliary kernels built from more easily extractable information regarding the relationships among objects. We propose a new kernel learning approach in which the target kernel is defined as a conic combination of auxiliary kernels and a kernel whose elements are learned directly. We formulate a convex optimization to solve for this target kernel that adds only minor overhead to methods that use no auxiliary information. Empirical results show that in the presence of few training relative comparisons, our method can learn kernels that generalize to more out-of-sample comparisons than methods that do not utilize auxiliary information, as well as similar methods that learn metrics over objects.


Introduction
The effectiveness of many kernel methods for unsupervised [24,6], semi-supervised [30,29,27], and supervised [18] learning is highly dependent how meaningful the input kernel is for modeling similarity among objects for a given task. In practice, kernels are often built by using a standard kernel function on features extracted from data. For example, when building a kernel over clothing items, features can be extracted for each item regarding attributes like size, style, and color. Then, a predefined kernel function (e.g. the Gaussian kernel function) can be applied to this feature representation to build a kernel over clothing. However, for certain tasks, objects may not be represented well by extracted features alone. Consider a product recommendation system for suggesting replacements for out of stock clothing items. Such a system requires a model of similarity based on how humans perceive clothing, which may not be captured entirely by features. For this, it is likely that human input is necessary to construct a meaningful kernel.
In general, obtaining reliable information from humans can be challenging, but retrieving relative comparisons of the form "object A is more similar to object B than it is to object C" has several attractive characteristics. First, relative comparison questions are less mentally fatiguing to humans compared to other forms (e.g. quantitative comparison questions: "On a scale from 1 to 10, how similar are objects A and B?") [10]. Second, there is no need to reconcile individual humans' personal scales of similarity. Finally, relative comparison feedback can be drawn implicitly through certain human-computer interactions, such as mouse clicks. In this work, we consider the specific problem of learning a kernel from relative comparisons; A problem we will refer to as relative comparison kernel learning (RCKL).
Current RCKL methods [1,22,14] assume that all necessary human feedback to build a useful kernel is provided. This is often not the case in real-world scenarios. A large amount of feedback is needed to build a kernel that represents a meaningful notion of how a human views the relationships among objects, and obtaining feedback from humans is often difficult or costly. Hence, it is a realistic assumption that only a limited amount of feedback can be obtained.
In order to learn a meaningful kernel from only a limited number of relative comparisons we propose a novel RCKL method that learns a combination of auxiliary kernels built from extracted features and a learned kernel. The intuition behind this approach is that while human feedback is necessary to construct an appropriate kernel, some aspects of how humans view similarity among objects are likely captured in easily extractable features. If "auxiliary" kernels are built from these features, then they can be used to reduce the need of many relative comparisons. To learn the aforementioned combination, we formulate a convex optimization that adds a only small amount of computational overhead to traditional RCKL methods. Experimentally, we show that by using auxiliary information, our method can learn a kernel that accurately models the relationship among objects from few relative comparisons, including relationships among objects not explicitly given. More specifically, our method is shown to generalize to more held out relative comparisons than traditional RCKL methods. In addition, we compare our method to similar, state-of-the-art methods in metric learning, and, again, we show that our method generalizes to more held out relative comparisons.
The remainder of the paper is organized as follows. Section 2 provides our formal definition of RCKL. Section 3 motivates our problem. Section 4 introduces a general framework for extending RCKL methods to use auxiliary information. Section 5 overviews related work. Section 6 presents an evaluation of our method. Section 7 concludes with future work.

Preliminaries
The RCKL problem considered in this work is defined by a set of n objects, X = {x 1 , ..., x n } ⊆ X, where X is the set of all possible objects. Similarity information among objects is given in the form of a set T of triplets: The goal is to find a positive semidefinite (PSD) kernel matrix K ∈ R n×n that satisfies the following constraints: Here, K ab is the element in the ath row and bth column of K, representing the similarity between the ath and bth objects. The elements of K can be interpreted as the inner products of the objects embedded in a Reproducing Kernel Hilbert Space (RKHS), H K , endowed with a mapping Φ K : Thus, learning a kernel matrix K that satisfies the constraints in (2) is equivalent to embedding the objects in a space, such that for all triplets (a, b, c) ∈ T , x a is closer to x b than it is to x c without explicitly learning the mapping Φ K . We say that a triplet (a, b, c) is satisfied if the corresponding constraint in (2) is satisfied.
One interpretation of (2) is that triplets define a binary relation over distances among objects. For example, if With this in mind, we continue onto the next section where we discuss the RCKL problem in more depth.

The Impact of Few Triplets
To help motivate this work, we provide some insight into why it can be assumed, in practice, that only a limited number of triplets can be obtained from humans, and the potential impact it has on learning an accurate kernel. First, we begin by defining some properties of sets of triplets: Definition 1. Given a set of triplets T , let T ∞ be the transitive closure of T Definition 2. Given a set of triplets T , let T trans = T ∞ \ T Definition 2 simply defines T trans as the set of triplets that can be inferred by transitivity of triplets in A set of conflicting triplets given by a source can be seen as inconsistent or contradictory in terms of how the source is comparing objects. In practice, this can be handled by prompting the source of triplets to resolve this conflict or by using simplifying methods such as in [16]. We defer to these methods in terms of how conflicts can be dealt with and consider the non-conflicting case. Let T total be the set of all non-conflicting triplets that would be given by a source, if prompted with every relative comparison question over n objects. We begin by stating the following: Theorem 1. For n objects, |T total | = 1 2 (n 3 − 3n 2 + 2n) Theorem 1 is proven in Sec. A.1 of the appendix. For even a small number of objects, obtaining most of T total from humans would be too difficult or costly in many practical scenarios, especially if feedback is gained through natural use of a system, such as an online store, or if feedback requires an expert's opinion, such as in the medical domain. Let T ⊆ T total be the set of triplets actually obtained from a source. We say that a triplet t is unobtained if t ∈ T total \ T . To build a model that accurately reflects the true notion of similarity given by a source of triplets, an RCKL method should learn a kernel K that not only satisfies the obtained triplets, but also many of the triplets in T total , including those that were unobtained. This means that given small number of obtained triplets, an RCKL method should somehow infer a portion of the unobtained triplets in order to build an accurate model of similarity. In the remainder of this section we consider two possible scenarios where unobtained triplets could potentially be inferred.
For the following analysis, we assume that triplets are obtained one at a time. Also, we assume that the order in which triplets are obtained is random. This could be a reasonable assumption in applications, such as search engines, where the goal of asking relative comparison questions that are most useful in the learning process comes secondary to providing the best search results, and as such, no assumptions can be made regarding which relative comparison questions are posed to a source. Thus, the worst-case in the following analysis is with adversarial choice of both T total and the order in which triplets are obtained. Let T i be the set of triplets given by an adversary after i triplets are given. Under these assumptions, we state the following theorem: Theorem 2. In the worst-case, ∀ i=1,...,|T total | : T trans i \ T i = ∅ Theorem 2 is proven in Sec. A.2 of the appendix. This states that in the worst case, no unobtained triplet can inferred by transitive relationship among obtained triplets. As a result, it may fall on the RCKL methods themselves to infer triplets. Many RCKL methods attempt to do this by assuming the learned kernel K has low rank. By limiting the rank of K to r < n, an RCKL method may effectively infer unobtained triplets by eliminating those that cannot be satisfied by a rank r kernel. For instance, assume an RCKL method attempts to learn a rank r kernel from T , and assume the triplets (a, b, c) and (a, c, b) are not in T . If the set T ∪ (a, c, b) cannot be satisfied by a rank r kernel, but T ∪ (a, b, c) can, then the RCKL method can only learn a kernel in which (a, b, c) is satisfied. Let T rank−r be the set of all unobtained, not otherwise inferred, triplets that are inferred when an RCKL method enforces rank(K) ≤ r. For adversarial choice of T total we can state the following theorem: Theorem 3. In the worst case, ∀ t∈T rank−r : t / ∈ T total Theorem 3 is proven in Sec. A.3 of the appendix. This theorem shows that it could be the case that any triplet inferred by limiting the rank of K is not a triplet a source would give. If a large portion of T total cannot be obtained or correctly inferred, then much of the information needed for an RCKL method to learn a kernel that reflects how a source views the relationship among objects is simply not available. The goal of this work is to use auxiliary information describing the objects to supplement obtained triplets in order to learn a kernel that can satisfy more unobtained triplets than traditional methods. In the following section we propose a novel RCKL method that extends traditional RCKL methods to use auxiliary information.

Learning a Kernel with Auxiliary Information
In this section we introduce a generalized framework for traditional RCKL methods. Then, we expand upon this to create two new frameworks: One that combines auxiliary kernels to satisfy triplets, and another that is a hybrid of the previous two.

Traditional RCKL
Many RCKL methods can be generalized by the following optimization problem: The first term, E(K, T ), is a function of the error the objective incurs for K not satisfying triplets in T . The second term regularizes K by its trace. Here, the trace is used as a convex approximation of the non-convex rank function. The rank of K directly reflects the dimensionality of the embedding of the objects in H K . A low setting of the hyperparameter λ favors a more accurate embedding, while a high value prefers a lower rank kernel. The PSD constraint ensures that K is a valid kernel matrix, and makes (3) a semidefinite program (SDP) over n 2 variables. For the remainder of this paper we will refer to (3) as Traditional Relative Comparison Kernel Learning (RCKL-T).

RCKL via Conic Combination
In general, if there are few triplets in T relative to n, there are many different RCKL solutions. Without using information regarding how the objects relate other than T , RCKL-T methods may not be able to prefer solutions that generalize well to the many unobtained triplets. However, objects can often be described by features drawn from data. From these features, A auxiliary kernels K 1 , ..., K A ∈ R n×n can be constructed using standard kernel functions to model the relationship among objects. If one or more auxiliary kernels satisfy many triplets in T , they may represent factors that influence how some of the unobtained triplets would have been answered. For instance, if a user considers characteristics such as color and size to be important when comparing clothing items, then kernels built from color and size may model a trend in how the user answers triplets over clothing items. If these kernels do represent a trend, then they could not only satisfy a portion of triplets in T , but also a portion of the unobtained triplets. We wish to identify which of the given auxiliary kernels model trends in given triplets and combine them to satisfy triplets in T . An approach popularized by multiple kernel learning methods is to combine kernels by a weighted sum: K ′ is a conic combination of PSD kernels, so itself is a PSD kernel [18].
Here Φ j : X → R dj is a mapping from an object into the RKHS defined by K j , and D = A a=1 d a . In short, (4) induces a mapping of the objects into a feature space defined as the weighted concatenation of the individual kernels' feature spaces. Consider, then, the following optimization: By learning the weight vector µ, (6) scales the individual concatenated feature spaces to emphasize those that reflect T well, and reduce the influence of those that do not. Because of its relationship to multiple kernel learning, we call this formulation RCKL-MKL.
Since the auxiliary kernels are fixed, regularizing them by their traces has no effect on their rank nor the rank of K ′ . Instead, we choose to regularize µ by its ℓ 1 -norm, a technique first made popular for its use in regression [23]. For a proper setting of λ, this has the effect of eliminating the contribution of kernels that do not help in reducing the error by forcing their corresponding weights to be exactly zero. Note that RCKL-MKL does not learn the elements of a kernel directly, and as a result is a linear program over A variables.
By limiting the optimization to only a conic combination of the predefined auxiliary kernels, RCKL-MKL does not necessarily produce a kernel that satisfies any triplets in T . To capture the potential generalization power of using auxiliary information while retaining the ability to satisfy triplets in T , we propose to learn a combination of the auxiliary kernels and K 0 , a kernel similar to the one in RCKL-T whose elements are learned directly. By doing this, we force RCKL-T to prefer solutions more similar to the auxiliary kernels, which could satisfy unobtained triplets. We call this hybrid approach Relative Comparison Kernel Learning with Auxiliary Kernels (RCKL-AK).

RCKL-AK
RCKL-AK learns the following kernel combination: is a conic combination of kernel matrices that induces the mapping: The intuition behind this combination is that auxiliary kernels that satisfy many triplets are emphasized by weighing them more, and K 0 , which is learned directly, can satisfy the triplets that cannot be satisfied by the conic combination of the auxiliary kernels. Consider, again, the example of a person comparing clothing items on an online store. She may compare clothes by characteristics such as color, size, and material, which are features that can be extracted and used to build the auxiliary kernels. However, other factors may influence how she compares clothes, such as designer or pattern, which may be omitted from the auxiliary kernels. In addition, she may have a personal sense of style that is impossible to be gained from features alone. K 0 , and thus features induced by the mapping Φ 0 , is learned to model factors she uses to compare clothes that are omitted from the auxiliary kernels or cannot be modeled by extracted features. Using (7), we propose the following optimization: This objective has two regularization terms: trace regulation on K 0 , and ℓ 1 -norm regularization on µ. Increasing λ 1 limits the expressiveness of K 0 by reducing its rank, while increasing λ 2 reduces the influence of the auxiliary kernels by forcing the elements of µ towards zero. Thus, λ 1 and λ 2 represent a trade-off between finding a kernel that is more influenced by K 0 and one more influenced by the auxiliary kernels. Like RCKL-T, RCKL-AK is an SDP, but with n 2 + A optimization variables. For practical A, RCKL-AK can be solved with minimal additional computational overhead to RCKL-T.
One desirable property of (9) is that under certain conditions, it is a convex optimization problem: Proposition 1. If E is a convex function in both K 0 and µ, then (9) is a convex optimization problem.
Proposition 1 is proven in Sec. B.1 of the appendix. While Prop. 1 may seem simple, it allows us to leverage traditional RCKL methods that contain error functions that are convex in K 0 and µ in order to solve (9) using convex optimization techniques. Two such error functions are discussed in the following subsections.
STE-AK Stochastic Triplet Embedding (STE) [14] proposes the following probability that a triplet is satisfied: If this probability is high, then x a is closer to x b than it is to x c . As such, we minimize the negative sum of the log-probabilities over all triplets.
With this error function we call our method STE-AK and can state the following proposition: Proposition 2 is proven in Sec. B.2 of the appendix. By Props. 1 and 2, STE-AK is a convex optimization problem.
GNMDS-AK Another potential error function is one motivated by Generalized Non-Metric Multidimensional Scaling (GNMDS) [1] which uses hinge loss: We call our method with this error function GNMDS-AK. The hinge loss ensures that only triplets that are unsatisfied by a margin of one increase the objective. GNMDS-AK is also a convex optimization problem, due to Prop. 1 and the following: Proposition 3 is proven in Sec. B.3 of the appendix. For a more rigorous comparison of RCKL methods see [14]. We propose to solve both STE-AK and GNMDS-AK via projected gradient descent methods; both of which are outlined in Sec. C of the appendix.

Related Work
RCKL-AK can be viewed as a combination of multiple kernel learning (MKL) and non-metric multidimensional scaling (NMDS). Learning a non-negative sum of kernels, as in (4), appears often in MKL literature, which is focused on finding efficient methods for learning a combination of predefined kernels for a learning task. The most widely studied problem in MKL has been Support Vector Classification [13,17,26,9]. To our knowledge there has been no application of MKL techniques to the task of learning a kernel from relative comparisons.
The RCKL problem posed in Sec. 2 is a special case of the NMDS problem first formalized in [1], which in turn is a generalization of the Shepard-Kruskal NMDS problem [21]. GNMDS, STE, and Crowd Kernel Learning (CKL) [22] are all methods that can be applied to the RCKL problem. However, none of these methods consider inputs beyond relative comparisons. Our work creates a novel RCKL method that uses ideas popularized in MKL research to incorporate side information into the learning problem.
Relative comparisons have also been considered in metric learning [19,4,8]. In metric learning the focus is on learning a distance metric over objects that can be applied to out-of-sample objects. This work focuses specifically on finding a kernel over given objects that generalizes well to out-of-sample (unobtained) triplets. In this way, the goal of metric learning methods is somewhat different than the one in this work. Two recent works propose methods to learn a Mahalanobis distance metric with multiple kernels: Metric Learning with Multiple Kernels (ML-MKL) [28] and Multiple Kernel Partial Order Embedding (MKPOE) [16]; the latter focusing exclusively on relative distance constraints similar to those in this work. The kernel learned by RCKL-AK induces a mapping that is fundamentally different than those learned by these metric learning techniques. Consider the mapping induced by one of the metric learning methods proposed in both [16] (Section 4.2) and [28] (Equation 6): The derivation of this mapping can be found in Sec. D of the appendix.
Here Ω ∈ R mxD produces a new feature space by transforming the feature spaces induced by the auxiliary kernels. Without Ω, (12) learns a mapping similar to (5). The matrix Ω plays a role similar to the one K 0 plays in RCKL-AK: it is learned to satisfy triplets that the auxiliary kernels alone cannot. Instead of linearly transforming the auxiliary kernel feature spaces, RCKL-AK implicitly learns new features that are concatenated onto the concatenated auxiliary kernel feature spaces (see (8)).
In both works, the authors propose non-convex optimizations to solve for their metrics, and, in addition, different convex relaxations. A critical issue with the convex solutions is that they employ SDPs over n 2 * A (MKPOE-Full) and n 2 * A 2 (NR-ML-MKL) optimization variables, respectively. For moderately sized problems these methods are impractical. To resolve this issue, [16] propose a method that imposes further diagonal structure on the learned metric, reducing the number of optimization variables to n * A (MKPOE-Diag), but in the process, greatly limit the structure of the metric. RCKL-AK is a convex SDP with n 2 + A optimization variables that does not impose strict structure on the learned kernel. Unfortunately, by learning the unique kernel K 0 directly and not the mapping Φ 0 or a generating function of K ′′ , our method cannot be applied to out-of-sample objects. Data analysis that does not require the addition of outof-sample objects can be used over that kernel. There are many unsupervised and semi-supervised techniques that fit this use case.

Experiments
In order to show that RCKL-AK can learn kernels from few triplets that generalize well to unobtained triplets, we perform two experiments: one using synthetic data, and one using real-world data. In both experiments, we compare STE and GNMDS variants of RCKL-T, RCKL-MKL, and RCKL-AK, as well as nonconvex and convex variants of MKPOE. For the MKPOE methods, we consider a triplet (a, b, c) where d M is the distance function defined by the metric. The STE and GNMDS implementations used are from [14], which are made publicly available on the authors' websites. The MKL and AK versions were extended from these implementations. MKPOE implementations were provided to us by their original authors. All auxiliary kernels are normalized to unit trace, and all hyperparameters were validated via line or grid search using validation sets.

Synthetic Data
To generate synthetic data we begun by randomly generating 100 points in seven, independent, two-dimensional feature spaces where both dimensions were over the interval [0, 1]. Then, we created seven linear kernels, K 0 , ..., K 6 from these seven spaces. We combined four of the seven kernels: We then used K * as the ground truth to answer all possible, non-redundant triplets. Following the experimental setup in [22], we divided these triplets into 100 triplet "rounds". A round is a set of triplets where each object appears once as the head a being compared to randomly chosen objects b and c. From the pool of rounds, 20 were chosen to be the training set, 10 were chosen to be the validation set, and the remaining rounds were the test set. This was repeated ten times to create ten different trials. Next, we took all seven feature spaces and perturbed each point with randomly generated Gaussian noise. From these new spaces we created seven new linear kernelsK 0 , ...,K 6 , of whichK 1 , ...,K 6 were used as the input auxiliary kernels in the experiment. Here,K 1 , ...,K 3 are kernels that represent attributes that influence how the ground truth makes comparisons between objects.K 4 , ...,K 6 contain information that is not considered when making comparisons, and K 0 represents intuition about the objects that was not or cannot be input as an auxiliary kernel.
We wish to evaluate the performance of each method as the number of triplets increases. With more triplets each method should be able to build models that satisfy more unobtained triplets. To show this we performed the following experiment. For each trial, the 20 training rounds and 10 validation rounds are divided into ten subsets, each containing two training rounds and one validation round. Starting with one of the subsets, each model is trained, setting the hyperparameters through cross-validation on the validation set, and evaluated on the test set. Then, another subset is added to the training and validation sets. We repeat this process until all ten subsets are included. We evaluate the methods by the total number of unsatisfied triplets in the test set divided by the total number of triplets in the test set (test error). Here, the test set represents unobtained triplets. For all of the following figures, error bars represent a 95% confidence interval.
Discussion: Figure 1 shows the mean test error over the ten trials as a function of the number of triplets in the training set. Both RCKL-MKL methods improve performance initially, but achieve their approximate peak performance early and fail to improve as triplets are added. This supports the claim that RCKL-MKL is limited by only being able to combine auxiliary kernels through a conic combination. Both RCKL-T methods perform much worse than either of the methods that use auxiliary kernels. Without the side information provided by the auxiliary kernels, RCKL-T cannot generalize to test triplets with few training triplets. We believe this experiment demonstrates the utility of both K 0 and the auxiliary kernels in RCKL-AK. With very few training triplets, the RCKL-AK methods relied on the auxiliary kernels, thus the performance is similar to the RCKL-MKL methods. As triplets are added, the RCKL-AK methods used K 0 to satisfy the triplets that a conic combination of the auxiliary kernels could not. Further evidence for this is shown by the fact that the rank of K 0 increased as the number of training triplets increased. For example, for STE-AK, the mean rank of K 0 was 85.6, 94.2, and 96.2 for 200, 400, and 600 triplets in the training set, respectively. In other words, the optimal settings of λ 1 and λ 2 made K 0 more expressive as the number of triplets increased.
Ideally, the RCKL-AK methods should eliminateK 4 ,K 5 , andK 6 from the model by reducing their corresponding weights µ 4 , µ 5 , and µ 6 to exactly zero. Figure 2 shows the values of the µ parameter for STE-AK and GNMDS-AK as the number of triplets increase. Both RCKL-AK methods correctly identify the three auxiliary kernels from which the ground truth kernel was created by setting their corresponding weight parameters to be non-zero. In addition, they assigned weights to the kernels roughly proportional to the ground truth. The three noise kernels were assigned very low, and often zero weights. The RCKL-MKL methods learned similar values for the elements of µ than those in Fig. 2. Since RCKL-MKL learned the relative importance of the auxiliary kernels with only few triplets, it had achieved approximately its peak performance and could not improve further with the addition of more triplets.   Figure 3a shows the same STE-AK, GNMDS-AK, and GNMDS-MKL error plots as Fig. 1, but also includes three variations of MKPOE: A non-convex formulation (MKPOE-NC), and two convex formulations (MKPOE-Full and MKPOE-Diag). All metric learning methods perform very similarly, yet worse than RCKL-MKL and RCKL-AK. We believe that the MKPOE methods must transform the auxiliary kernel space drastically to satisfy the few triplets. By doing this they lose much of the information in the auxiliary kernels that allows RCKL-MKL and RCKL-AK methods to form more general solutions.

Music Artist Data
We also performed an experiment using comparisons among popular music artists. The aset400 dataset [5] contains 16,385 relative comparisons of 412 music artists gathered from a web survey, and [15] provides five kernels built from various features describing each artist and their music. Two of the kernels were built from  The aset400 dataset provides a challenge absent in the synthetic data: not all artists appear in the same number of triplets. In fact, some artists never appear as the head of a triplet at all. As a result, this dataset represents a setting where feedback was gathered non-uniformly amongst the objects. In light of this, instead of training the models in rounds of triplets, we randomly chose 2000 triplets as the development set; the rest were used as the test set. Like before, we broke the development set into ten subsets, and progressively added subsets to the working set, training and testing each iteration. Ten percent of the working set was used for validation and 90 percent was used for training. The experiment was performed ten times on different randomly chosen train/validation/test splits.
Discussion: The results, shown in Fig, 4, are similar to those for the synthetic data with a few key differences. The RCKL-MKL methods did not perform as well relative to the RCKL-T methods. This could be attributed to the fact that the auxiliary kernels here did not reflect the triplets as well as those in the synthetic data. Only one kernel was consistently used in every iteration (the kernel built from artist tags). The rest were either given little weight or completely removed from the model. As with the synthetic data, with 200 and 400 training triplets the RCKL-AK methods performed as well as their respective RCKL-MKL counterparts, but as more triplets were added to the training set, the RCKL-AK methods began to perform much better. In this experiment, the RCKL-T methods became more competitive, but were outperformed significantly by RCKL-AK much of the time. This, again, could be because the auxiliary kernels were less useful than with the synthetic data. Figure 3b compares the performance of MKPOE-NC and MKPOE-Diag on the aset400 dataset to the RCKL-AK methods as well as GNMDS-MKL. MKPOE-Full could not be included in this experiment due to its impractically long run-time for an experiment of this size. Both MKPOE methods perform similarly, and seem to suffer greatly from the lack of meaningful auxiliary kernels,

Conclusions and Future Work
In this work we propose a method for learning a kernel from relative comparisons called Relative Comparison Kernel Learning with Auxiliary Kernels (RCKL-AK) that supplements given relative comparisons with auxiliary information. RCKL-AK is a convex SDP that can be solved by adding slight computational overhead to traditional methods and more efficiently than many metric learning alternatives. Experimentally, we show that RCKL-AK learns kernels that generalize to more out of sample relative comparisons than the aforementioned traditional and metric learning methods.
There are three main directions of future work. First, we wish to create a more efficient formulation of RCKL-AK. While common in solving SDPs, the most time-consuming step in RCKL-AK is performing eigendecomposition in order to project the kernel onto the PSD cone after each gradient step. In [12] the authors create a kernel learning method that eliminates the need to project onto the PSD cone. We will investigate extending their method to use auxiliary kernels. Second, we would like to extend our method to out-of-sample objects. In [2], generating functions are learned for kernels that were learnt through various popular techniques (LLE, Isomap, etc.). Similarly, we will attempt to learn a generating function for our kernel. Finally, we will explore practical applications of our method, specifically, the use of RCKL-AK for product recommendation. Proof. For n objects there are n 2 pair-wise distances between objects (we do not consider distances between objects and themselves). A triplet is a comparison between two pair-wise distances with a common object. Consider a single pairwise distance, and without loss of generality, let this distance be d(x a , x b ). There exists exactly n − 2 other pairwise distances that contain x a (each with a different second object that is not x a or x b ), and exactly n− 2 other pairwise distances that contain x b . Thus, each pair-wise distance can be compared to 2n − 4 other distances. As a result there are exactly, 1 2 n 2 * (2n − 4) = 1 2 (n 3 − 3n 2 + 2n) triplets (the 1 2 comes from the fact that a single triplet (a, b, c) counts as an answer to the relative comparison "is x a more similar to x b than x c " and "is x a more similar to x c than x b ").

A.2 Theorem 2
To prove Thm. 2 from Section 3 we use the directed acyclic graph representation of relative comparisons given in Section 2 of [16]. A set of triplets T is represented by a graph G = (V, E). Here, a vertex represents a distance between two objects, and a an edge represents a relative comparison. Let v {1,2} ∈ V be a vertex representing the distance between objects x 1 and x 2 indexed by the unordered pair {1, 2}. Note the slight notational change from the main body of the paper: Instead of indexing objects by alphabetic characters, we choose to index them by natural numbers for convenience. As an example, the triplet (1, 2, 3) can be represented by a directed edge 3} . Because this work considers triplets, vertices need to have a common object between them for there to be a edge between them. As an example, vertices v {1,2} and v {1,3} can have an edge between them, but v {1,2} and v {3,4} cannot. Any cycle in G constitutes a conflict in relative comparisons. For this work we assume that there exists no conflicts or that conflicts can be resolved either algorithmically, such as in [16] or by querying the source of triplets again. From this point forward we say an edge is "valid" if it does not create a conflict and it connects two vertices that have a common object between them. An edge, and thus the corresponding triplet, can be inferred if there exists a path of length greater than 1. For example, if there is an edge from v {1,2} to v {1,3} , and an edge from v {1,3} to v {1,4} then the edge from v {1,2} to v {1,4} can be inferred.
Theorem 2 considers the case where triplets are given one at a time. Let t i , be the ith triplet to be given, and T i = {t j |j ≤ i}. Let T trans i be the triplets that can be inferred by T i . For this analysis we study the directed acyclic graph analogues of these sets of triplets: G i and G trans i . Let e i ∈ E i be the edge given at time i. We assume that an edge given at time i has not been given at time j < i. Next, we introduce the following recursive adversarial strategy for giving edges to this graph (square brackets ([]) to denote an ordered list of elements with subscripts indicating each element's position in the list): The following lines describe the process in which edges are given by Alg. 1 in more detail: [e1, ..., e idx ] ←Adversary(n − 1) 10: V new ←GetNewVertices(n) 11: [ In the subsequent proofs we will refer to any valid edge e / ∈ E i to be "ungiven" at time i. A fact used to prove the following two lemmas is that when the adversarial strategy gives an edge at time i, a vertex or group of vertices can never be used to infer an ungiven edge if two conditions hold: 1. If all valid edges have been given involving a vertex or a group of vertices at time i − 1 2. If there does not exist an edge leaving a vertex or group of vertices to a vertex with at least one ungiven edge at time i − 1 The first condition is somewhat obvious in that if all edges are given involving a vertex or group of vertices, then no ungiven edges involving this vertex can be inferred, because there are no ungiven edges involving this vertex. Thus, the only way for a vertex or group of vertices can be used to infer an ungiven edge is that a path through them is used to infer an ungiven edge between two external vertices. The second condition ensures that no such path exists. As a result, regardless of what edge the adversary gives at time i, the ungiven inferred edges of graph G i is always the same as that on G i with all vertices or groups of vertices removed that satisfy these two conditions. With this we can prove the following two lemmas: Lemma 2. Line 13 of Alg. 1 never gives edges that infer ungiven edges.
Proof. Consider line 11 of Alg. 1. It orders the old vertices in the order in which they appear as the vertex being pointed to in the solution for n objects. Any vertex in this order only points to those that appear before it in the list, because when a vertex is chosen by this algorithm all valid edges involving this vertex are given pointing inward. Consider the first iteration of the for loop starting on line 12. The first vertex in this list has only incoming edges (namely, v 1,2 due to the base case). Adding all remaining ungiven edges inward to this node cannot create any inferred edges because all old edges are going inward due to it being first in the list, thus Lem. 2 holds. In addition, after line 13 this node satisfies the first condition above. It also satisfies the second condition as there exists no outgoing edges, thus no paths can go through it. By these two conditions, it can be eliminated from the graph. By doing so, all edges connecting it to other vertices are also eliminated. As a result, the second vertex effectively becomes the first vertex in the list, making it only have incoming edges. In the next iteration the second vertex is chosen, and, again, all remaining edges are pointed inward. Adding of these edges also satisfies Lem. 2, the same conditions hold, and it can effectively be removed. The loop repeats this for all old vertices. As such, for all iterations of the loop starting on line 12, line 13 never gives edges that infer ungiven edges. Lemma 3. Line 18 of Alg. 1 never gives edges that infer ungiven edges.
Proof. By line 16 all edges connected to or from any old vertex has already been given via the loop staring on line 12. Thus, the first condition above is satisfied for all old vertices. Line 13 only adds edges from new vertices to old vertices, no edge leaves the subgraph of old vertices to the subgraph of new vertices. This satisfies the second condition. As a result, all old vertices can be eliminated from consideration. What is left is just the new vertices with no edges connecting them to any other vertex. Consider the first iteration of the loop starting on line 16. Selecting a vertex v rnd and giving all edges pointing inward cannot infer any edges, because it has only incoming edges. Thus, this operation does not violate Lem. 3. In addition, the first condition is satisfied when all edges are given, and since there are no paths through this vertex, condition 2 is satisfied. As a result, this vertex too can then be eliminated. For the next iteration we now have one less new vertex, but, again, no edges connecting the ones left. This loop repeats until all edges are given.
Given these three lemmas we proceed by proving the following proposition: Proposition 4. For a given n ∈ N >2 , there exists an adversarial strategy for giving edges such that ∀ i∈{1,...,|E total |} , E trans ., e i } where {e 1 , ..., e i } is the first i triplets in the ordered set returned by Alg. 1. First, we need to ensure E i can be constructed for all i ∈ {1, ..., |E total |}. Lemma 1 states that Alg. 1 gives all edges for a given n, thus proving this. Lastly, we need to show that Alg. 1 never adds an edge to the sequence of edges that will infer an ungiven edge. To prove this, we use induction. The base case is n = 3, which is the fewest number of objects for which triplets can be defined. The base case is defined on lines 2-6 of Alg. 1. The edges e 1 and e 2 do not infer the third and final edge e 3 , thus Prop. 4 is true for the case n = 3. Finally, with these propositions we can prove Thm. 2 from Section 3: Proof. By Prop. 4, there exists an adversarial strategy such that, for all i ∈ {1, ..., |E total |}, E trans i \E i = ∅. By construction of the directed acyclic graphs representing sets of triplets we can construct sets T i from E i , T trans i from E trans i , and T total from E total . Thus we can state, ∀ i=1,...,|T total | : T trans i \T i = ∅ for the worst case defined by Alg. 1.

A.3 Theorem 3
We begin by stating that the RCKL problem is equivalent to learning an embedding of objects in a space that satisfies distance constraints imposed by the triplets T . Limiting the comparisons to triplets makes this embedding problem a special case of non-metric multidimensional scaling (NMDS). Also, the rank of the learned kernel K is equivalent to the rank of the learned embedding (i.e. if K = AA T , then rank(K) = rank(A). As a result, enforcing rank(K) ≤ r is equivalent to enforcing that the objects be embedded in R d where d ≤ r. With this in mind we state the following proposition from Appendix A of [16]: Proposition 5. Any set of objects X with a partial order of distances C can be embedded in R n−1 When C is a total ordering over all pairs, the problem of embedding X in a space that respects the distances in C reduces to NMDS [11]. This implies that given any objects X and any non-conflicting set of triplets T , the objects in X can be embedded in R n−1 and satisfy all triplets in T . Equivalently, given any set of objects X and any non-conflicting set of triplets T , all triplets in T can be satisfied by a rank n − 1 kernel. With this in mind we can prove Thm. 3 from Section 3: Proof. Assume an RCKL method enforces rank(K) = r. By Prop. 5, r must be less than n − 1 to infer any triplets. Without loss of generality let t = (a, b, c) ∈ T rank−r . Because, t / ∈ T trans by definition of T rank−r , T ∪ (a, c, b) does not cause a conflict. An adversary can construct T total with rank r total > r, such that (a, c, b) ∈ T total , because any non-conflicting set of triplets T total can be satisfied by some choice of r total ≤ n − 1 from Prop. 5. By virtue of the fact that T total contains no conflicting triplets, we can then deduce that (a, b, c) / ∈ T total . Trivially, this can be said of any rank less than r, as well. Thus, any triplet t ∈ T rank−r is not an element in T total through adversarial choice of T total , proving Thm. 3.

B Proofs of Propositions
The strategy employed throughout this section to prove the stated functions are convex is to build each using convex combinations of convex functions. In order to use this strategy, we need to establish the following Lems. (Above each Lemma is a reference to a source for each lemma, respectively). In addition, we will use the concept of logarithmic convexity: for all x ∈ domf and log f is convex.
Which we then use to state the following Lemma. Finally, for the sake of notational brevity, let us define the following: x c ) These short-hand versions of our established notation will be used throughout this section.
1. In order for (9) to be a convex optimization problem, it's objective and constraints must be convex in the optimization variables. 2. By Lem. 4, if E(K ′′ , T ), λ 1 trace(K 0 ), and λ 2 µ 1 are convex, then the objective in (9) is convex. 3. It is an assumption of the proposition that E(K ′′ , T ) is convex. 4. λ 1 trace(K 0 ) is defined as a constant times the sum of the diagonal elements of the matrix K 0 , which is a sum of convex functions (Lem. 4). 5. λ 2 µ 1 is defined as a constant times the the sum of the absolute values of the elements of µ, which is a sum of convex functions (Lem. 4) 6. By lines 2, 3, 4, and 5, the objective in (9) is convex. 7. The positivity constraint on µ is trivially convex. 8. The positive semidefinite constraint is known to be convex [25]. 9. By lines 7 and 8, both constraints of (9) are convex. 10. By lines 1, 6, and 9, (9) is a convex optimization problem.
1. Moving the negation into the sum, (10) becomes the sum of terms of the following form:  (16) is convex. 6. By Lem. 7 if exp D abc K ′′ and 1 are both log-convex, then exp D abc K ′′ + 1 is log-convex. 7. 1 is a constant and trivially log-convex. 8. The codomain of the exponential function is R + , so exp D abc K ′′ > 0 for all K ′′ , which satisfies the first condition for log-convexity. 9. To show log exp D abc K ′′ is convex, thus satisfying the second condition of log-convexity, we start by stating the following equivalence by using the definition of K ′′ (7):  (17) is convex. 11. Let k abc = D abc K1 , ..., D abc KA . Then, A i=1 µ i D abc Ki = k T abc µ. 12. k T abc µ is an affine function of µ that has the form f (µ) = Aµ + b where A = k T abc and b is 0. 13. By Lem. 5 and the previous step, k T abc µ is convex in µ. 14. Using the definition of kernel distance from (2) (Note the slight change in notation: K ab 0 refers to the ath column and bth row of K 0 ): 15. By Lem. 4, if the individual terms of (18) are convex then (18) is convex. 16. The individual terms of (18) are simply elements of K 0 multiplied by scalers, which are convex in K 0 . 17. By lines 3-16, (14) is convex. 18. By lines 1, 2, and 17, (10) is convex.