Kernel-Based Generalized Median Computation for Consensus Learning

Computing a consensus object from a set of given objects is a core problem in machine learning and pattern recognition. One popular approach is to formulate it as an optimization problem using the generalized median. Previous methods like the Prototype and Distance-Preserving Embedding methods transform objects into a vector space, solve the generalized median problem in this space, and inversely transform back into the original space. Both of these methods have been successfully applied to a wide range of object domains, where the generalized median problem has inherent high computational complexity (typically $\mathcal{NP}$-hard) and therefore approximate solutions are required. Previously, explicit embedding methods were used in the computation, which often do not reflect the spatial relationship between objects exactly. In this work we introduce a kernel-based generalized median framework that is applicable to both positive definite and indefinite kernels. This framework computes the relationship between objects and its generalized median in kernel space, without the need of an explicit embedding. We show that the spatial relationship between objects is more accurately represented in kernel space than in an explicit vector space using easy-to-compute kernels, and demonstrate superior performance of generalized median computation on datasets of three different domains. A software toolbox resulting from our work is made publicly available to encourage other researchers to explore the generalized median computation and applications.


INTRODUCTION
O NE commonly used approach to consensus learning is to formulate it as an optimization problem in terms of generalized median computation [1].
In other words, the generalized median is an object that has the smallest sum of distances (SOD, also called consensus error [2]) to all objects in the input set. Note that the median object is not necessarily part of set O. The generalized median is the formalization of the intuitive averaging. As a simple example, when dealing with real numbers, it corresponds to well-known concepts from statistics. In case of δ(p, q) = (p−q) 2 , p, q ∈ R, the generalized median is simply the arithmetic average of the given numbers. Changing to another distance function δ(p, q) = |p − q| results in the usual median of numbers. The generalized median is a general concept and has been studied for numerous problem domains related to a broad range of applications. Examples include rankings [3], phase or orientation data [4], [5], 3D rigid structures [6], 3D rotations [7], [8], clusterings [9], [10], [11], point-sets [12], shapes [13], 3D surfaces [14], image segmentation [15], sequence data (strings) [16], [17], graphs [18], [19], altas construction [20], and Grassmann average [21]. It is often known under different names in applications, where a specific distance is common, for example geometric median in case of Euclidean vector spaces with the Euclidean distance [22], Steiner string for median strings [2], Karcher mean for positive definite matrices [23] or Kemeny consensus for rankings [24]. Although being simple in its definition, the optimization task (1) turns out to be very complex in many domains. Since the median object is not necessary part of the original set, one has to construct a new object from the whole domain space that minimizes the SOD in equation (1). Even for the simple string edit distance, it has been proven to be N P-hard [25]. The same applies to rankings [3], ensemble clustering [26], median graphs [22] and signed permutations [27] using common distance functions, just to name a few examples. Also for the seemingly simple case of R d with the Euclidean distance there is no known polynomial-time algorithm, and it is not even known if this problem is in N P [28].
Given the high computational complexity, approximate solutions are required to calculate the generalized median in reasonable time. The perturbation strategy in [10] for ensemble clustering, for instance, starts with an initial clustering and iteratively moves a single object to a different (possibly empty) cluster until the optimization SOD function associated with the newly created clustering increases. More sophisticated methods include metaheuristic strategies, e.g. genetic algorithms [18] that optimize a set of candidate solutions by combining and mutating them, simulated annealing [29] that optimizes a single candidate by probabilistic optimization, or block coordinate descent [30] minimizing a matrix or vector representation of the generalized median approximation. These methods are typically heavily tailored to a specific domain O and use intricate domain knowledge in their computation.
The focus of our work lies in domain-independent meth-arXiv:2209.10208v1 [cs.CV] 21 Sep 2022 ods that can compute generalized median solutions for any space. There exist only very few such frameworks. The framework for generalized median approximation in [31] is motivated by a lower bound [18] for generalized median computation in metric spaces. Recently, the prototypeembedding approach [22] has received considerable attention to successfully solve a number of N P-hard consensus learning problem instances (strings, graphs, clusterings, biclusterings) with superior quality [1], [16], [22], [32], [33].
In this framework the objects are first embedded into a vector space, where the median computation is much easier than in the general case. The median vector is then transformed back into the original problem space (reconstruction), resulting in an approximation of the generalized median. Further improvement of the prototype-embedding approach includes alternative object reconstruction methods [34] and more accurate distance-preserving embedding methods compared to prototype embedding [1].
This approach can also be applied to structured prediction, which is a broad research topic and has been studied in many domains. In [35], for instance, a tree structure of a house plan is predicted from an advertising text by first labelling the text, computing the intra-label dependencies and finally constructing a tree from these dependencies. Other examples include label ranking prediction [36], human activity recognition [37], and person re-identification [38]. However, these methods and their embeddings (2D dependency edges in the example) are typically highly specialized to the problem at hand. In contrast, the distance embedding approach is a general method applicable to any domain a distance is known.
The popular prototype-embedding approach [1], [22] is based on explicit transformation for the embedding purpose. In this work we propose a novel kernel approach to embedding-based generalized median computation by using an implicit transformation in terms of kernel functions. We show that it is possible to handle the generalized median computation without knowing the dimension of the embedded space and the concrete embedding. We evaluate our method on artificial and real datasets of three different problem domains (strings, clusterings, rankings). Several kernel functions will be studied, in particular some of them have the nice property of provably preserving the pairwise distances after embedding in the implicit vector space, which is a highly desired property for embedding-based generalized median computation [1]. Using these easy-tocompute kernel functions we demonstrate superior performance in terms of the computed median quality compared to the prototype-based explicit embedding method.
The remainder of the paper is structured as follows. In Section 2, we give a statistical interpretation of generalized median (1) as a maximum-likelihood estimator. The prototype-based embedding framework is summarized in Section 3. Its inherent drawbacks are discussed to motivate our current work. Section 4 presents our kernel-based approach to generalized median computation. The experimental evaluation is given in Section 5. A related software toolbox for public use will be described in Section 6. Finally, some discussions in Section 7 conclude the paper.

MAXIMUM-LIKELIHOOD ESTIMATOR
We start with the simple case of 1D signal. If the true, but unknown, signal value isx ∈ R, the measured signal x ∈ R is disturbed by an error x −x. Then, the probability of a measurement with this error can be expressed by an exponential function of the error. Assuming the probability is quadratic in the error, this leads to the common Gaussian distribution Assuming the error is not quadratic, one can express the probability as the so-called Laplace distribution These probability distributions are also known as the second and first law of error, and were first proposed by Laplace around 1775 [39]. Although the Gaussian distribution is the more popular one, it has been shown that it does not always reflect the error distribution of natural data, especially if outliers are present [39], [40]. Naturally, the Laplace distribution appears for example in the error of navigational data [41] or financial data [40]. Now we consider an arbitrary space O. Assuming the true, but unknown, objectō, we make observations o and model the error by the distance δ(o,ō) in analogy of |x −x| in the Laplace distribution for R. Then, one can compute the probability for the occurrence of any object o by Using this distribution, one can estimate the optimal objectō and the distribution factor σ for a set of objects O = {o 1 , ..., o n } by maximizing the likelihood function under the assumption that o i are independent and identically distributed. This is equivalent to maximizing the logarithm of the likelihood function Since σ and n are constant, an optimal estimationō is equal to minimizing the second term (without the negative sign), which corresponds to the definition of generalized median in (1). In a next step the optimal σ can be computed as by setting ∂ log(L(ō,σ|O)) ∂σ to be zero, which is the normalized SOD.
Therefore, the generalized median (1) is the optimal estimation in the maximum likelihood sense so that the observed data (objects) O is most probable. Although this elaboration is mathematically simple and known in some specific spaces (e.g. in the case of signed and unsigned permutations the generalized median is the maximum likelihood solution under the Mallows model [24], [42]), adapting it for the general case of arbitrary domains provides us a deeper understanding of the computation and we are not aware of its mention for general spaces in the literature before.
Occasionally, researchers use the definition in analogy of (x −x) 2 in the Gaussian distribution for R [43]. This can be uniformly treated using the definition (1) by defining an auxiliary distance function δ * () = δ 2 ().

FRAMEWORK OF EMBEDDING-BASED GENER-ALIZED MEDIAN COMPUTATION
The embedding framework [1], [22] for computing the generalized median (1) uses an explicit embedding function φ(o i ) to transform the objects o i into vectors in R d , leading to the problemx in vector space using the Euclidean distance. This is solved by using the popular Weiszfeld algorithm [44]. This iterative algorithm delivers a good-quality geometric median in reasonable time. Then, an inverse transformation is used to find an objectō withō ≈ φ −1 (x) that can be seen as the inverse of φ, therefore solvinḡ This is a special instance of the so-called pre-image problem in kernel-based machine learning [45] which deals with the difficult reverse problem of finding an object in the original space corresponding to a given embedding. In the following subsections we will first describe the embedding and median computation part of this framework resulting inx, followed by an extensive review of the reconstruction step realizing the inverse transformation φ −1 (x).

Embedding and computation of generalized median in vector space
Prototype-based embedding was initially proposed in [22]. Choosing d prototype objects p 1 , ..., p d from the input set O, this method uses the embedding function to compute vectors for each object.
Later, it was shown that although easy to compute, the prototype embedding has several drawbacks [1], in particular the lacking preservation of distances in vector space. In that work, these drawbacks were remedied by using better distance-preserving embedding methods. Multidimensional scaling or curvilinear component analysis, for example, actively improve the preservation of pairwise distances between objects, thus leading to less approximation in the later steps and a better quality approximation of the Figure 1. Computation of the ratio α between objects for reconstruction. median overall. Although still only an approximation of the true distances, it was shown that using these and other embedding methods greatly improves the median quality through their accurate representation of the spatial structure of objects in vector space.
Using the computed φ(o i ) of each object, the generalized medianx in vector space is then computed using the popular iterative Weiszfeld algorithm [44] x By selecting the starting vectorx 0 ∈ R d in specific ways as shown in [46], the Weiszfeld algorithm is proven to converge at a sublinear rate. In practice, however, it is often sufficient to use the mean of φ(o i ) as easy-to-compute starting point since the algorithm quickly converges to a good approximation ofx for all but a few trivial-to-resolve starting vectors [47].

Reconstruction of generalized median from vector space
The inverse function φ −1 (x) is realized by a reconstruction process involving the nearest neighbors ofx in the vector space. The simplest reconstruction method -called linear reconstruction -chooses the two nearest neighbors of the median vector, and combines them in a similar fashion to linear interpolation, as seen in Figure 1 and v =x − φ(o a ). Then, the reconstruction is achieved by projecting vector v onto u, resulting in a vector w = v,u u . The resulting ratio between w and u is then used to compute an approximate median object o m in the original space as an interpolation of o a , o b with ratio α. This is achieved with a so-called weighted mean function that constructs a o m using the following properties Under the assumption that the distances were reasonably well preserved in vector space, this approximation should have a lower SOD than the individual objects, similar to the case in vector space. In practice, this weighted mean can often be derived from the distance function δ() [48], [49], [50]. An example using strings and the common Levenshtein edit distance can be seen in Figure 2. Given a string set O, an embedding φ(o) was computed that assigns each string a vector in a two-dimensional space. In this case, object o a = AAAA was assigned φ(o a ) = (0, 0) and object o b = BBB was assigned φ(o b ) = (5,2). Similarly, all other objects in the set were assigned embedded vectors. After computation of the generalized median in vector spacex = (2, 2.5), φ(o a ) and φ(o b ) were identified as nearest objects. Then, the linear reconstruction method projectsx onto the line between φ(o a ) and φ(o b ) to compute a ratio α ≈ 0.517. The unknown pre-image φ −1 (x) is then approximated by constructing a new object o m that approximates the properties shown in Eq. (2). In the case of the Levenshtein edit distance, a list of minimal necessary edit operations can be obtained to transform o a into o b , in this case for example AAAA → BAAA → BBAA → BBBA → BBB with corresponding edit distance 4 assuming that all editing steps have cost 1. Therefore, BBAA is selected as approximation of φ −1 (x) since it is the closest of the intermediate edit steps . This can be understood as individual editing steps lying on the line between φ(o a ) and φ(o b ) and choosing the closest one to the projectedx.
This type of reconstruction relies heavily on the fact that in vector space, the projection of a vectorx onto the line between φ(o a ) and φ(o b ) is the closest point on this line tox (see Figures 1 and 2). In embedding based frameworks this is assumed to be true in object space as well and approximated by the weighted mean. Just as in vector space where any point on a line can be expressed as a weighted mean between its end points, a "straight line" in object space can be represented by all objects fulfilling the weighted mean Equation (2). However, depending on the distance formulation, this "line" may not be unique. Using the example above, a second "straight line" of editing steps is AAAA → AAAB → AAB → BAB → BBB, leading to the weighted mean AAB. This can even happen in vector space using certain distances, for example the Manhattan metric, where an infinite number of possible paths of weighted means exist between two vectors.
Using this definition of "straight line", the orthogonal projection of an object onto the line between two objects is the (not necessarily unique) object which is a weighted mean between o a and o b and has the smallest distance to the projected object. However, for many popular distance formulations computing this projection would require to compute a large number of projection candidates that could be very costly itself. For more efficiency of these methods, often only a small number of candidates are computed and the best one is returned. In our case, we will balance the computation of the weighted mean between speed and robustness by only computing two weighted means. The weighted mean from o a to o b using α and the weighted mean from o b to o a using 1 − α are computed, choosing the weighted mean with the better approximation of the median as the result. This is done for both the explicit generalized median computation shown in this section and our kernel based method shown later for a fair comparison.
In addition to the simple linear reconstruction, there are other reconstruction methods, named triangular and recursive reconstruction. The basic idea of these methods is the same, but using three objects instead of two nearest neighbors for triangular reconstruction, or using a more sophisticated projection technique for recursive reconstruction (see [1], [22] for details).
Further improvement of the inverse transformation can be found in [34]. Two new reconstruction methods were proposed, namely linear-recursive and triangular-recursive reconstruction, as well as a method that iteratively improves results of any reconstruction method. Both linearrecursive and triangular-recursive reconstruction still use the same weighted mean function and projection technique, but combine objects in a different way. It could be shown that these methods significantly improve the quality of the reconstructed median over all three previous variants by enhancing the inverse transformation φ −1 (x).
In summary, the framework of embedding-based generalized median computation comprises three steps: applying an explicit method φ(o i ) to embed objects from an arbitrary domain into a vector space, computing the medianx there, and then using an inverse transformation φ −1 (x) to compute an approximate median object in the original space that corresponds to this median vector.
Despite the popularity and the recent advances, the prototype-embedding approach [1], [22] has some inherent drawbacks due to its nature of explicit transformation for the embedding purpose. There is a need of specifying the embedding dimension (number of prototypes) and selecting this number of suitable prototypes. Both may influence the quality of the computed generalized median, but are not always trivial to set. Therefore, we aim to explore instead an approach of implicit transformation by means of kernel functions. This approach helps overcome the inherent drawbacks of explicit transformation. More importantly, some of the studied kernel functions have the nice property of provably preserving the pairwise distances after embedding in the implicit vector space, which is fundamental for superior performance of generalized median computation within the embedding-based computation framework [1].

KERNEL-BASED GENERALIZED MEDIAN COM-PUTATION
In this section we present a kernel approach to embeddingbased generalized median computation. Despite the implicit nature of kernel embedding functions it turns out to be possible to determine all required ingredients for this computation. In particular, we will show that the ratio α that is necessary for the reconstruction combination of objects in φ −1 () can be computed without using an explicit embedding φ(), a kernel function suffices instead. Using the kernel approach, one thus can accurately reconstruct a generalized median without the need of an explicit vector space.
After a brief introduction to kernel methods in Section 4.1, we shortly repeat the main steps of the generalized median computation using explicit transformation in Section 4.2. The main contribution of this work is then described in Section 4.3 (positive definite kernels) and Section 4.4 (indefinite kernels) to perform generalized median computation using implicit transformation in the context of kernel functions. Then, we present several kernel functions in Section 4.5 that will be studied in our experimental work. An analysis of the complexity of the kernel-based median computation framework is given in Section 4.6. Finally, we provide some further discussion in Section 4.7.

Kernel methods
Kernel functions are well-known from their application in kernel machine [51], support vector machine (SVM), clustering, principal component analysis, etc. [52]. Originally, a kernel function K(x, y) is defined by , that is, the kernel function corresponds to the scalar product in H K . One simple example for the two-dimensional vector space is the kernel function of a transformation in a three-dimensional vector space. In general, using a kernel function K(x, y), one can compute the scalar product in the transformed vector space without the need of explicitly transforming x and y into φ(x) and φ(y), respectively. Since the linear SVM classifier depends on scalar products only, this kernel trick allows nonlinear classification of the original vectors by a linear classification in the vector space implied by a kernel function. The concept of kernel functions for vector space can be extended to an arbitrary space O to enable classification on other types of data (e.g. strings, trees, graphs) [53], [54], [55], [56]. In this general case, a kernel function is defined by with a transformation φ : O → H K that computes the scalar product of the transformed vectors of two objects o a and o b . Note that many of these kernels do not have an explicit representation of a vector space and compute the scalar product directly instead.
Since the scalar product in a Hilbert space induces a norm, the distance between two transformed vectors φ(o a ) and φ(o b ) can be computed using the kernel function only as follows

Generalized median computation using explicit transformation
To better understand the kernel-based reconstruction method, we will shortly repeat the central elements of the explicit transformation framework as presented in Section 3. In case of explicitly known transformation φ as with the previous prototype and distance-preserving embedding methods [1], the Weiszfeld algorithm [44] is applied to iteratively compute the generalized medianx in vector space byx with weights using explicit vectors φ(o i ) for each object o i in the input set and nearly any starting vectorx 0 . Then, a ratio α of the projection ofx onto the line between its closest objects φ(o a ) and φ(o b ) is computed by The generalized medianō is finally reconstructed by computing a weighted mean object between o a and o b using this ratio as shown in Section 3.2.

Generalized median computation using implicit transformation: positive definite kernels
The computation scheme above explicitly needs the transformation φ(o i ) for each object o i in the input set and the intermediate resultx j after each iteration of the Weiszfeld algorithm. When working with positive definite kernel functions along with an implicit transformation φ, however, these fundamental ingredients for median computation are not available. In the following we present a solution to this problem so that we can still use the scheme presented in Section 4.2 to compute the generalized median.
Median computation in kernel space: Letx j be the generalized median vector from the Weiszfeld algorithm at iteration j, see (Eq. (4)). Then, the weight ω j i can be computed using Eq. (5) and (3) as Here φ(o i ), φ(o i ) can be computed using the kernel func- On the other hand, sincex j is unknown we are unable to evaluate x j ,x j and x j , φ(o i ) . Nevertheless, these two items can be precisely determined using the iterative nature of the Weiszfeld algorithm by substitutinḡ x j with its previous step of Eq. (4) and using the bilinear properties of the scalar product. This results in and Note that the right hand side of Eq. (8) and (9) only contains kernels between input objects and the weights of the Weiszfeld algorithm in the previous step of the iteration. Bringing Eq. (7), (8) and (9) together, one can therefore compute ω j i iteratively from kernels between input objects without explicit knowledge of the transformed vectors φ(o i ) and the immediate medianx j . As a starting value for this iteration scheme, one can for example set all ω 0 i = 1. This corresponds to the mean of objects in kernel space and is often a good first approximation of the median result. It is important to emphasize that we are only able to use the Weiszfeld algorithm to compute the weights ω j i , but not the immediate medianx j . As will be shown in the following, this is sufficient for reconstructing the generalized median in the original space.
Reconstruction: Even without explicitly knowing the medianx in the kernel space, we need to reconstruct the generalized medianō = φ −1 (x) in the original space. Our solution starts with the insight that for the reconstruction, we actually do not really need to explicitly know the median x. It suffices to know the nearest neighbors ofx and the related ratio α in Eq. (6). Their corresponding input objects are then combined to build the generalized medianō. The nearest neighbors ofx can be easily found by the final weights ω i after convergence of the Weiszfeld algorithm since Eq. (5) implies that these weights are the inverse of the norm between object o i and the median in kernel space. That is, sorting the final weights ω i in a descending order will deliver the nearest neighbors of the unknownx.
The final weights ω i are related to the unknown median This computation only needs the final weights w i and kernel values between all objects in the set as well as o a and o b . The simplest method, linear reconstruction [1], [22], uses the two nearest neighbors o 1 and o 2 for the reconstruction. Starting with the -in kernel space -closest object to the medianō 1 = o 1 , the α value between it and the next closest object o 2 is computed and applied in the weighted mean function to generate a better approximationō 2 of the median object. For the triangular reconstruction, a third nearest neighbor o 3 is needed and another α is computed between the median objectō 2 and o 3 towards a refined median objectō 3 . The returned median approximation is the last constructed objectō l . This is shown in Algorithm 1, using l = 2 for linear and l = 3 for triangular reconstruction. Divide O into |O|/2 pairs (|O|/3 triples) by grouping maximal ω i first. 4: Computeō using Algorithm 1 with l = 2 (l = 3) O = O 11: end while 12: returnō best with the related SOD We were not able to adapt the recursive and bestrecursive reconstruction methods [1], [22] for kernel methods due to the recursive projection onto hyperplanes. There-fore, we leave these methods out and instead adapted linear recursive and triangular recursive reconstruction described in [34]. For prototype embedding, they show superior results compared to best-recursive reconstruction anyway and therefore should have a similar performance for kernel methods. Both methods are shown in Algorithm 2. First, the object set is divided into pairs (or triples) of objects, and a linear (triangular) reconstruction is performed for each case. This results in a new set of |O|/2 (|O|/3) objects. The algorithm is repeated using this new set until only one object remains. The object with the lowest SOD of all computed objects is returned as the approximated median.
Overall algorithm: The overview of the proposed kernelbased generalized median framework is shown in Algorithm 3. First in lines 1 to 6, the necessary weights of the objects are determined using one of the kernel methods to be discussed in Section 4.5. Note that in contrast to previous explicit embedding, neither the vectors φ(o i ) nor the median vectorx can be explicitly computed. As for the number j max of iterations of the kernel-Weiszfeld algorithm, only a low number of iterations is needed in practice and the computation can be stopped early once ω j i converges (see Section 5.3). These weights are then used in one of the reconstruction methods to compute an approximate generalized median in the original space.

Generalized median computation using implicit transformation: indefinite kernels
In the previous section we have shown the computation of the generalized median in kernel space using positive definite kernel functions. However, a number of kernel functions that can be applied to any domain given a distance function (as shown in Section 4.5 and later used in our evaluation) are not positive definite and therefore do not fulfill some basic assumptions used in the previous section. This is similar to the case of kernel SVM, where these kernels are used for classification even though they are not guaranteed to be positive definite [57]. To ensure the general nature of this framework, we will attempt to approximate the generalized median using these indefinite kernels as well. For this reason we will shortly introduce the concept of pseudo-Euclidean spaces and show that indefinite kernel functions can be used to compute the generalized median in such a pseudo-Euclidean space instead of normal Euclidean space.
Pseudo-Euclidean spaces are linear vector spaces including an indefinite, symmetric bilinear form ·, · and can be expressed as E = R (p,q) = R p × iR q , where i is the imaginary unit, i.e. as spaces whose vectors consist of p real and q imaginary elements [58]. As such, pseudo-Euclidean spaces are subspaces of the complex vector space C p+q . In contrast to standard Euclidean spaces, this allows for negative squared distances According to [57], [58], any symmetric indefinite kernel function K(o i , o j ) can be used to construct such a real squared distance by substituting the inner product with indefinite kernels Additionally, if this squared distance is symmetric with which is true for Equation (12) for any symmetric function K, one can express δ 2 as using a transformation φ : O → E into a pseudo-Euclidean space E. As such, indefinite kernels allow the computation of a real-valued squared norm in a pseudo-Euclidean space, which, as the square root of a real number, translates to a complex valued norm consisting only of a real or imaginary part.
As we need the norm in the computation of the weights of the Weiszfeld algorithm as shown in Equation (5), we will need to use the root of the above squared distance shown in Equation (13) and as such expand the pseudo-Euclidean space to a full complex space. This leads to modifications in Equations (7), (8) and (9) for the iterative computation of weights using complex norms. In contrast to real spaces, the inner product in complex spaces is conjugate symmetric ( x, y = y, x ) and conjugate linear in the second argument ( x, λy = λ x, y ).
Using the conjugate symmetry, Equation (7) becomes while, using conjugate linearity in the second argument, Equation 8 becomes Equation (9) remains unchanged. Note that since the complex conjugate does not affect real numbers, these equations can also be used for positive definite kernels. As these modifications may influence the convergence of the Weiszfeld algorithm, we will experimentally study its convergence using indefinite kernels in Section 5.3. All in all, this leads to complex weights in the computation of the Weiszfeld algorithm, which -inserted into the also unchanged Equation (11) -can lead to a complex α value. However, for the computation of the weighted mean real value is needed. As such, in the case of a complex α, we will use its magnitude to compute the weighted mean.

Kernel functions
We briefly describe a variety of kernel functions used in our experimental work, both positive definite domaindependent kernels and indefinite domain-independent kernels. In addition, we show that several special cases of these kernel functions are able to preserve the distance in the vector space of their respective projection, thus making them ideal candidates for kernel-based median computation.
For a general framework for generalized median computation one would like to use distance-preserving domainindependent positive definite kernel functions to ensure a good distance-preserving embedding in an implicit kernel space where the median is approximated, similar to the argument for distance-preserving explicit embedding methods in [1]. However, we were not able to find appropriate positive definite kernel functions that could be used for every domain. Therefore, we will first present a number of positive definite domain-dependent kernels that can be used in this framework, followed by a number of indefinite kernel functions that can be used in any domain. In the end, we will discuss the distance preservation of these kernels.

Positive definite domain-dependent kernels
Although positive definite domain-independent kernels would be preferable for our method shown in Section 4.3, we were only able to find positive definite kernels for specific domains. Therefore, we will present three domain specific kernel functions in this section. Interestingly, the kernel K ssk (s 1 , s 2 ) = φ ssk (s 1 ), φ ssk (s 2 ) can be computed recursively without the need to explicitly compute the embedding φ ssk (s) [59]. In our evaluation, we chose |u| = 2 and λ = 0.5. Partition kernel: The partition kernel is designed for the domain of clusterings and based on a simple transformation φ part (x) = (φ p 1,2 (x), ..., φ p 1,n (x), φ p 2,3 (x), ..., φ p n,n (x)) where x is a vector containing the clustering labels of n elements. If done for two clusterings, the scalar product is the number of pairs whose cluster labels are equal in o a and o b , while the label itself can be different. As a scalar product between two vector transformations, it is guaranteed to be a positive definite kernel function.
Kendall kernel: The Kendall kernel K kend [60] is designed for the domain of permutations and based on the Kendallτ distance between permutations. This distance counts the number of pairs whose order is different between two permutations. For two permutations, the Kendall kernel is the difference between the number of elements that have the same order in both permutations and the number of elements that have different orders in both permutations, normalized by the number of pairs.

Indefinite domain-independent kernels
As our method is supposed to be used in a large variety of domains, we will present here a number of kernel methods that can be used with any distance function. However, these kernel functions are indefinite for a wide range of distances, including the ones used in our evaluation. [61] showed that given a distance function δ and an origin object o, one can induce a scalar product between these objects

Distance substitution kernels: Haasdonk and Bahlmann
Using this scalar product, they proposed four kernel functions in object space Note that only weak assumptions are imposed on the distance function δ: non-negative, symmetric, zero diagonal (i.e. δ(x, x) = 0). If some given distance function does not satisfy these requirements, it can easily be transformed to satisfy them. Concretely, it can be symmetrized byδ(x, y) := 1 2 (δ(x, y) + δ(y, x)), given zero diagonal bȳ δ(x, y) := δ(x, y) − 1 2 (δ(x, x) + δ(y, y)), and made positive byδ(x, y) := |δ(x, y)| [61]. Thus, the distance substitution kernels above can be applied in conjunction with any distance function. However, it is only a positive definite kernel (or conditionally positive definite for K nd δ ) if the distance function is negative definite, i.e. isometric to an L 2 -norm [61]. As a large number of distance functions, for example the string edit distance, are not isometric to an L 2 -norm, these kernels are often indefinite.
Combination kernel: Specifically for the domain of strings using the edit distance, Neuhaus and Bunke [62] proposed a combination of the above scalar product (Eq. (16)) using several origin objects o i ∈Ō ⊂ O Using a subset of strings instead of only one origin object, they aim to reduce the dependence on this reference string. Note that no edit distance specific properties were used, and both kernels can be used with any distance function δ similar to the distance substitution kernels. From both combination methods we propose to use K comb δ = K + S due to its distance-preserving nature, as shown in section 4.5.3.

Distance-preserving kernels
Several of the above shown kernel functions are able to preserve the distance in the vector space of their respective projection. Although having distance-preserving positive definite kernels would be preferable, the above mentioned kernel functions K ssk , K part and K kend are not. K ssk has no direct relation to the string edit distance at all, while for K part and K kend the distance is proportional to the squared norm in kernel space (a proof for K kend is given in [60]).
In the following we will show how a number of the previous shown indefinite kernels are distance-preserving for specific parameters. Using Eq. (3), one can show that K comb δ and K lin δ preserves distances in kernel space In the special case of |Ō| = 1, this is the K lin δ kernel. For O > 1, the distortion is constant which has no influence on the minimization of the median function (1), meaning that it is an optimal distance-preserving embedding in kernel space. Similarly, it can be shown that using K nd δ , the embedding leads to meaning that it is distance-preserving for β = 2. For K pol δ using p = 1 it leads to and is therefore distance-preserving for p = 1 and any γ = 0, in particular γ = 1.
The observation above makes all four distancepreserving options ideal candidates for kernel-based median computation using the above mentioned parameters, since there are no distortions between distances in kernel space. This should lead to a better median computation in kernel space and ultimately better median reconstruction, which is indeed confirmed by the experimental results reported in Section 5.

Complexity of the proposed framework
The asymptotic complexity of the proposed methods can be seen in Table 1. Assuming the weighted mean function and kernel function can be evaluated in constant time, one needs in total O(j max · n 2 ) time for precomputing the kernel values and weights ω i , as these do not change in the reconstruction process. Note that j max is quite low in practice (see the evaluation in Section 5.

Discussions
In the previous sections we have shown how the generalized median can be approximated using positive definite and indefinite kernel functions, and given a number of examples for kernel functions that could be used using any distance function. Although a few of approximations are made, among which are the transfer of α computed by the orthogonal projection in vector space onto an object space where there might not be such a clear projection, or the use of indefinite kernels where the Weiszfeld algorithm may not find a minimum or even converge, or the computation of α using complex weights whose interpretation is not clear. Thus, we will evaluate the convergence of the Weiszfeld algorithm using indefinite kernels in Section 5.3 and the computation of α in kernel space in Section 5.4 to show that our assumptions are reasonable. In addition, it should be noted that using a kernel to compute the generalized median in kernel space can change the distance at hand. I.e. instead of minimizing the sum of distances, we minimize the sum of distances of embedded objects. Therefore, it is important to use kernel functions related to the distance in the original space.

EVALUATION
In this section we present the experimental results using the method presented in Section 4. First, we introduce the datasets used in our study in Section 5.1. In Section 5.2 we will show how the previously discussed kernel functions preserve distances in kernel space, and give reasons for why they are expected to produce better results than other methods. Section 5.3 investigates the convergence of the Weiszfeld algorithm using indefinite kernels, while Section 5.4 studies the reconstruction of the median object using the weighted mean. Section 5.5 compares the results of the proposed kernel-based method to the previous Prototype [22]  and Distance-Preserving Embedding Frameworks [1] with explicit vector space embedding. Then, we study the correlation of the median quality (in terms of sum of distances) and the degree of distance preservation in Section 5.6. Finally, a discussion of the computational time is presented in Section 5.7. Table 2 shows the datasets used in our study. To ensure a wide range of applications we tested 6 datasets divided into three types, from which two were artificially generated and four real. The exact number of sets in each dataset and number of objects in each set can be found in the table.

Datasets
The string datasets Darwin and CCD consist of character strings using the Levenshtein edit distance for the median computation. The Darwin dataset is artificially generated using lines of Charles Darwins famous work "On the Origin of Species" that were randomly modified by substitution, insertion and deletion of characters according to real-life OCR error rates [16]. The Copenhagen Chromosome Dataset (CCD) is a dataset containing encoded parts of chromosome sequences [63]. In both cases the corresponding weighted mean function applies string edit operations from the Levenshtein edit distance until the ratio in Eq. (2) is reached [49], as seen in Section 3.2.
The UCI Cluster and Gen. Cluster datasets contain integer label vectors encoding clusterings of unknown data. The UCI Cluster dataset was created by clustering data from the UCI Data Repository [64] with k-means clustering using varying parameters. Each set of the Gen. Cluster dataset consists of a random base label vector that was modified by random changes in labels using the method in [33]. Here, the Partition Distance was used, which counts the number of objects that have to swap their assigned cluster into a different one for both clusterings to become the same partition of the data. The labels of each cluster are disregarded. For the weighted mean function, we change round(α · δ(o a , o b )) of disagreeing labels of the first cluster o a into the corresponding labels of the second cluster o b [50].
The ranking-bio and ranking-real datasets are two real world datasets [65] and contain ranking with ties. The first one, ranking-bio, consists of the BioMedical dataset, which includes only a very small number of real world rankings in each set. The ranking-real dataset is composed of the F1, Ski Cross, Ski Jumping and WebSearch datasets. These sets consist of the results of different sport tournaments and the order of search results in different web search engines. In both cases the generalized Kendall-τ distance is used [3]. This distance function measures the number of disagreements between rankings. For example, if x is ranked ahead of y in the first ranking, but y is ranked ahead in the second, it is counted as one disagreement, otherwise not. Since ties are a possibility, it is counted as 0.5 disagreements if x and y are tied in one ranking but not tied in the other. The distance is the summed number of disagreements between all ranked items. As weighted mean function, starting from o a we iteratively move ranked items with the largest number of disagreements into new positions with lower number of disagreements towards o b , until the required ratio α is reached. Note that there exist simple methods such as the classical Borda and Copeland method for median computation in ranking space. It can be easily shown that these methods are the generalized median computation (1) based on simple distance functions. In our work we use the more sophisticated generalized Kendall-τ distance, which leads to a N P-hard median computation problem [3]. Thus, our approach is particularly suitable to apply.
It should be pointed out that these distance functions are not necessarily negative definite, as is the requirement of the distance substitution kernels to be positive definite. Using the modifications shown in Section 4.4, we can however still apply our method using these kernel functions to compute the generalized median in kernel space. As will be seen in the results, the kernel method is still able to compute a good approximation of the generalized median for such kernels.

Distance preservation of kernel functions
Since the generalized median computation considerably benefits from a good preservation of distances [1], we measured the degree of distance preservation of the kernels. For each kernel introduced in Section 4.5, we computed all pairwise distances in kernel space using Eq. (3), and determined the ratio c between original distance and Euclidean distance in vector space A perfect distance-preserving embedding is achieved if there is a constant c for all object pairs. For comparison, we used the embedding method CCA, which showed the best distance preservation for these datasets [1]. The results for the Darwin dataset as an example can be seen in Figure 3. For all object sets and pairwise objects of this dataset these histograms show the distribution of the constant c in Eq. (17). The more c is located at one constant, the better the distances are preserved in the implicit embedding of the kernel or the explicit embedding of CCA. As theoretically shown in Section 4.5.3, K lin δ , K nd δ , K pol δ and K comb δ achieve a perfect distancepreserving embedding. K rbf δ however does not guarantee a distance-preserving embedding and is shown to be slightly worse than CCA. Similar observation could also be made on the other five datasets. Thus, we expect that K lin δ , K nd δ , K pol δ and K comb δ will have the most accurate object representation in vector space and accordingly the best median result.

Convergence of the Weiszfeld algorithm for indefinite kernels
As shown in Section 4.5, many domain-independent kernels are not necessarily positive definite, leading to complex  Figure 3. Histogram of the distance distortion constant c for the Darwin dataset. The used parameters for kernel methods are β = 2 for K nd δ , γ = 1 and p = 1 for K pol δ , and |Ō| = 3 for K comb δ . Explicit embedding methods used 0.8 · n dimensions where n is the number of objects. Table 3 Convergence of the Weiszfeld algorithm for 5 indefinite kernel functions K lin δ , K nd δ , K pol δ , K rbf δ , K comb δ (first value in each column) and 3 positive definite kernel functions K ssk , K part , K kend (second value in each column).
Dataset (num sets) max-iter med-iter complex weights Darwin (36) 29 / 13 9 / 11 28/0 (of 180) CCD (22) 17 values in the computation of the Weiszfeld algorithm if used as is (Section 4.4). For vector spaces -and therefore positive definite kernels -the convergence of the Weiszfeld algorithm is well understood [66]. However, these convergence proofs do not hold in the case of indefinite kernel functions. As we are unable to formally prove the convergence in this case, we conducted a simulation to test if the algorithm converges for a set of given objects using infinite kernels. In addition to the datasets shown in Section 5.1, we generated 1000 sets of randomly generated strings, clus-terings and rankings each for this test. Each randomly generated set consists of 50 to 150 objects of size 50 to 100. Here, the size is the number of characters for strings, the number of clustered objects for clusterings and the number of ranked values for rankings, respectively. For each string in the random-string dataset, random letters were uniformly drawn from all letters of the english alphabet. Each clustering in random-clustering was created by uniformly drawing random integer labels to fill a label vector. The number of clusters varies between 3 and 10. For rankings, a random permutation was created, again drawn uniformly from all possible permutations of a given length.
For each set we computed the weights of the generalized median in kernel space using Equation (7) for all five presented (possibly) indefinite kernels K lin δ , K nd δ , K pol δ , K rbf δ and K comb δ as well as three positive definite kernels K ssk , K part and K kend (Section 4.5). Table 3 shows the resulting statistics for our test. For each dataset this table reports the maximum (median) number of iterations for convergence, max-iter (med-iter), over all tested sets, as well as the absolute amount of complexvalued weights ω i (Eq. 14) that appeared over all datasets (complex weights). The first value in each column is computed only using indefinite kernels shown in Section 4.5.2, while the second value is computed using the domaindependent positive definite kernel as described in Section 4.5.1. In all datasets using all kernels, the Weiszfeld algorithm in the form shown in Equation (7) converges in a relatively short amount of iterations, including the cases where complex values appeared. The maximum number of iterations (max-iter) was less than 150 in all cases, with much less than 30 in the majority of the datasets. The median number of iterations (med-iter) is less than 20 in the majority of datasets, showing that the Weiszfeld algorithm converges in a very short amount of time. The number of iterations for the indefinite kernels are in most cases only slightly larger than the values for positive definite kernels, showing that they converge equally well in practice. In all tested datasets, complex weights only appeared in a total of 30 cases using indefinite kernels, and -as expectednowhere for positive definite kernels. This shows that even when using indefinite kernel functions, the weights remain real values in a large majority of the time.
In summary, the Weiszfeld algorithm converged in all cases we have tested, even though we cannot give a formal proof that it is always the case for indefinite kernels.

Experiments on the generalized median reconstruction
As discussed in Section 3, the weighted mean function can not guarantee that the computed approximated median is closer to the true generalized median than the previous objects. Nevertheless, one can assume that even if it is not always the case, using a large number of combinations leads to a better approximation than using a small number of weighted mean combinations. For this reason the linear recursive and triangular recursive reconstruction methods shown in Algorithm 2 will likely deliver a better approximation than linear and triangular methods shown in Algorithm 1.  Figure 4 shows the evolution of the sum of distances in the reconstruction using linear recursive reconstruction (Algorithm 2), followed by linear search (see Section 5.5) on the Darwin dataset (a similar evolution was observed on the other datasets). Each of these 36 lines (not all differential due to overlapping) represents one string set being minimized by these methods. All values in one reconstruction process have been normalized by their final sum of distances. As can be seen, even though the notion of projection is not entirely clear in the space of strings, the linear recursive reconstruction iteratively improves the computed median by combining strings with the weighted mean function, leading overall to a lower sum of distances over time. One iteration in this sense is the pairwise combination of all objects in the current set (Lines 2 to 11 in Algorithm 2). Linear search further improves this approximated median by performing a line search using the weighted mean between the computed approximated median and every object in the set. Note that linear search stops early when no further improvement could be made. Note that a monotone falling sum of distances of the best median object is ensured here and in all results of our evaluation by simply saving the previously best object and including it in the set of objects for the next iteration.
As can be seen, both methods successfully improve the sum of distances of the approximated median over time, even though it is not guaranteed to improve in every iteration due to the often not-unique nature of the weighted mean for objects. Nevertheless, there is a significant enough improvement in a wide range of datasets such that these methods can be used to reconstruct an approximate generalized median.

Median quality
Our kernel-based method was tested on the datasets presented in 5.1. In all cases, we compared our method using the appropriate distances with the traditional embedding method (either prototype or CCA embedding). CCA was shown [1] to consistently provide the best results and thus chosen as a representative for this comparison. As in [1], all explicit embedding methods use 0.8 · n dimensions for the target vectors. The parameters of the domain-independent kernel functions are β = 2 for K nd δ , γ = 1 and p = 1 for K pol δ . For K comb δ , |Ō| = 3 objects were chosen using a k-medians algorithm. These parameters were chosen to guarantee a distance-preserving embedding if possible, as discussed in Section 4.5.3.
For each dataset and method, the average of sum of distances results over all sets within the respective dataset is reported in Table 4, with the best result of each reconstruction method marked in bold. Note that the sixth row in each table, e.g. K ssk for the Darwin dataset, is related to a kernel specific to the particular domain and thus varies in each case. Since the absolute SOD depends on the distance function and dataset, all values were normalized using the linear transform x−LB LB , where LB is the lower bound of the generalized median computed with a linear programming method [67]. Using this, a result of 0 would be a result that is guaranteed to be an optimal generalized median, while a result of 1 would mean a result whose SOD is 100% larger than the lower bound. Therefore, a lower result means a better approximated generalized median. Note, however, that the true generalized median does not necessarily have a result of 0 since the lower bound may not be reached. The true generalized median can be any value greater than 0.
For comparison purpose Table 5 shows the absolute values of the median SOD as well as the median of lower bounds (LB) over all sets of a dataset.
To further show the difference in median quality, we also measured if there is a statistically significant improvement using the presented kernel methods over the distancepreserving framework. Values marked with a plus (+) are significantly better than the previously best CCA embedding, while values marked with a star (*) have no significant difference to CCA according to the Wilcoxon signed rank test [68] with a p-value threshold of 0.05. The signed rank test measures if the distribution of differences in the results of two methods on the same data has a mean of zero or not. If it is not zero, then one method consistently performs better than the other.
In addition to the reconstruction methods discussed in Section 4.3, we also included the linear search method presented in [34]. This method improves given approximations of the generalized median by a local search using the weighted mean between the approximated result and the objects in the set. As a post-processing, it is independent of the basic reconstruction method and can be used with kernel methods without modification. In our case, the linear recursive result was used as starting point.
As can be seen in Table 4, kernel methods consistently outperform or match the performance of explicit embedding methods. In most datasets and reconstructions, the four distance-preserving kernels K lin δ , K nd δ , K pol δ and K comb δ show the best results, being statistically better than CCA in 68 of 120 combinations of kernel and reconstruction methods, and equally good in 48 of 120 cases, leaving only four cases where CCA is statistically better than these kernels (ranking-bio using linear reconstruction). K rbf δ , however, often fails to compute accurate median approximations.
Of the domain specific kernel functions, K part shows the best results, especially with being equally good or better than CCA in the UCI Cluster dataset. K kend , however, shows results mostly worse than CCA with the exception of one case, and K ssk consistently underperforms for all string datasets. This is consistent with the fact that K part is the kernel function closest related to the distance function used in the domain, while K kend only shares a tangential relationship to the respective distance and K ssk which shares no similarity to the string edit distance.
This finding generally confirms the expectation awakened in Section 5.2 that a perfect distance preservation should ensure more accurate median computation, even with a large amount of approximations in the computation. As all kernels with a perfect distance preservation perform nearly equally well in all datasets, one can assume that the specific kernel method is not as important to the median approximation as the fact that it is distance-preserving. In addition, they perform better with reconstruction methods involving more objects, like linear recursive or triangular recursive, where the correct relationships after the embedding play an even greater role in the reconstruction.
In Table 6 the average rank of each method is listed. Here we ranked the absolute sum of distances results of each method for each dataset and domain for a reconstruction method using 1 for the best result, 2 for the second best, and so on, meaning that a method with continually better results than other methods will have a lower rank.
Additionally, the last column shows the average rank of each kernel and explicit embedding method over all reconstruction methods. K lin δ and K pol δ consistently show the best rank for each reconstruction method with K nd δ being slightly better for linear and triangular reconstruction but worse for linear-recursive, triangular-recursive and linear search. With a rank of around 1.3 to 1.4 in total, K nd δ and K pol δ are consistently on the first place for each dataset, meaning that it is a good choice for median computation in general. This confirms the discussion made in section 5.2, that is, a better distance approximation in vector space leads to a better median reconstruction. Comparing the domain specific kernel functions, it can also be seen that a closer relationship of the kernel function to the used distance leads to a better median approximation. K part and K kend , while only being tangentially related to the respective distance functions, deliver a better result on average than K ssk which has no relationship to the string edit distance at all.

Correlation with distance preservation
The relationship between our results and the distancepreserving properties of the kernels can be seen in Figure  5. In this figure, the Normalized Cross Correlation (NCC) between the distances in kernel space and the original distances is compared to the normalized sum of distances (SOD) result. The NCC measures how linearly dependent two sets of values are, and in this case, how closely Eq. (17) is approximated by one c. In a perfect embedding, the NCC would be 1, while it would be 0 if there is no linear relationship between the original distances and the ones in kernel or embedding space. As can be seen in Figure 5, a high NCC correlates with a good approximation of the generalized median, although with a few exceptions. For  example in the String datasets, the prototype embedding is worse than K rbf δ , even with a much higher NCC value.

Computational time
All experiments were performed using a Intel Core i5-4590 (4 x 3.3GHz) with 16GB RAM using Python 3.5. Table 7 shows the average time of the median computation depending on the different reconstruction methods. As expected, the more objects are involved in the reconstruction, the more time is needed, independent of if kernel methods or traditional embedding methods are used. As most of the time in the computation is used in the reconstruction, one can see that -with the exception of linear search -the run time is near constant for each embedding variant. Note that CCA has a near constant base-time of approximate 4 seconds  due to the computational time of the much more complex initial embedding in each reconstruction method. Although computing the Weiszfeld algorithm using kernel functions is more complex than using embedded vectors, the fast convergence only causes very little additional time compared to Prototype embedding using the original Weiszfeld algorithm. For linear search however, the methods display a larger variance in computational time. This can be explained by the nature of this reconstruction method. In contrast to the previous ones, linear search uses the result of linearrecursive as starting point and stops early once convergence is reached, meaning that due to the better base results, K lin δ , K nd δ , K pol δ and K comb δ require less iterations of linear search than K rbf δ , K ssk , CCA and Prototype. As such, using K lin δ , K nd δ , K pol δ and K comb δ not only improves the embedding quality, but also the required time for the linearsearch reconstruction. In particular, K rbf δ initially shows the worst sum of distances results by a large margin due to the high distortion of distances, which leads to a much higher required run-time of linear search.
In summary, we expect K lin δ , K nd δ , K pol δ and K comb δ to have a lower computational time than CCA in all cases. All of these kernel methods can be easily computed from the distance function at hand, leading to fast kernel computations that preserve distances in the embedded space. CCA requires all pairwise distances for its embedding as well, but additional time for the computation of embedding vectors. Especially for large datasets and non-trivial embeddings, this can require a large number of iterations that are not present in distance based kernel methods. In contrast to the difference in embedding, the kernel Weiszfeld method is only barely more computationally complex as the vectorbased Weiszfeld algorithm. In combination with the sum of distances results, it is therefore recommended to use distance preserving kernel methods for median approximation instead of explicit embedding methods like CCA or Prototype.

TOOLBOX
We have implemented a toolbox in Python that contains a large number of embedding-based methods for consensus learning, including the most recent development of distance-preserving embedding method [1] and our current work of kernel-based method. The user can apply these techniques on any dataset, provided a distance function and weighted mean function between two objects of the set are made available. It includes, among others, a variety of embedding, kernel, and reconstruction methods. It is implemented in such a modular manner that the user can easily insert additional methods and functions. In addition to embedding-based methods, the toolbox also contains other methods for generalized median computation such as the evolutionary weighted mean based framework [31]. In the toolbox part of the functions is also available in MATLAB. By providing the toolbox for public use (available at: http://pria.uni-muenster.de), we encourage other researchers to explore generalized median computation and applications, especially for those problem instances with high inherent computational complexity.

CONCLUSION
In this paper we have shown how the generalized median can be computed using kernel methods, without using an explicit embedding like in previous methods. Although positive definite kernels would be preferred for the implicit embedding into an Euclidean vector space, we showed how indefinite kernels can also be used as an implicit embedding into a pseudo-Euclidean vector space. On six datasets, regularly better results could be demonstrated than methods using explicit embedding. Kernel-based generalized median computation not only shows overall superior results, but also overcomes the inherent drawbacks of current generalized median computation using explicit transformation. From the studied kernels, distance-preserving kernels K lin δ , K nd δ , K pol δ and K comb δ have, as expected, the best results, confirming the correlation between distance preservation and generalized median result. One should therefore use one of these kernel functions as baseline for median computation in practice.
Our goal in this work is to introduce a way to compute the generalized median for arbitrary spaces (with the weak requirement of weighted mean) and to demonstrate its good performance. As such, it is difficult to give theoretical guarantees for the quality of the generalized median in general. In fact, research papers in the literature with theoretical guarantees are typically done for a specific space explicitly using concrete knowledge of the space. Instead, we demonstrated superior performance compared to the previous distance-preserving and prototype embedding methods that represent the state of the art methods. For the comparison we used common datasets as in the publications of the previous methods, which can thus be considered as benchmark datasets. Overall, this performance comparison with state of the art methods on benchmark datasets helps to alleviate the lacking theoretical guarantees.
Although in our experiments the Weiszfeld algorithm converges in all cases, we were not be able to formally prove its convergence in the general case of indefinite kernels. This will be further studied in future. Aside from the computation of the median of a set, the kernel methods in this work can also applied to a number of other problems for more accurate computation. One example is kernel k-means, where a set of vectors is clustered in a kernel space to allow for non-convex clusters in the k-means algorithm [69]. One could use the median computation from this paper to allow not only clustering of non-vector data, but also using the median instead of the mean.