[Paper Review] D2KE: From Distance to Kernel and Embedding
This paper proposes D2KE, a framework that transforms any dissimilarity measure into a positive-definite kernel and a corresponding vector embedding, enabling effective kernel methods on structured inputs like sequences and sets. By constructing a random feature map based on the distance metric, D2KE ensures Lipschitz-continuous functions in the Reproducing Kernel Hilbert Space and achieves superior generalization and efficiency over k-NN and other distance-based methods across time series, strings, and image datasets.
For many machine learning problem settings, particularly with structured inputs such as sequences or sets of objects, a distance measure between inputs can be specified more naturally than a feature representation. However, most standard machine models are designed for inputs with a vector feature representation. In this work, we consider the estimation of a function $f:\mathcal{X} ightarrow \R$ based solely on a dissimilarity measure $d:\mathcal{X} imes\mathcal{X} ightarrow \R$ between inputs. In particular, we propose a general framework to derive a family of \emph{positive definite kernels} from a given dissimilarity measure, which subsumes the widely-used \emph{representative-set method} as a special case, and relates to the well-known \emph{distance substitution kernel} in a limiting case. We show that functions in the corresponding Reproducing Kernel Hilbert Space (RKHS) are Lipschitz-continuous w.r.t. the given distance metric. We provide a tractable algorithm to estimate a function from this RKHS, and show that it enjoys better generalizability than Nearest-Neighbor estimates. Our approach draws from the literature of Random Features, but instead of deriving feature maps from an existing kernel, we construct novel kernels from a random feature map, that we specify given the distance measure. We conduct classification experiments with such disparate domains as strings, time series, and sets of vectors, where our proposed framework compares favorably to existing distance-based learning methods such as $k$-nearest-neighbors, distance-substitution kernels, pseudo-Euclidean embedding, and the representative-set method.
Motivation & Objective
- To address the challenge of applying standard machine learning models to structured inputs (e.g., sequences, sets) where feature representations are hard to define but dissimilarity measures are natural.
- To develop a general framework that derives positive-definite kernels and vector embeddings directly from a given dissimilarity measure, ensuring theoretical consistency and improved generalization.
- To overcome limitations of existing distance-based methods such as k-NN (high variance) and indefinite kernels (non-convex optimization), by constructing a truly positive-definite kernel from distance.
- To enable efficient and scalable learning by designing a tractable algorithm with linear complexity in data size and input length, outperforming quadratic or higher methods.
Proposed method
- D2KE constructs a random feature map based on the input dissimilarity measure, mapping each instance to a vector representation in a reproducing kernel Hilbert space (RKHS).
- The framework derives a family of positive-definite kernels from the dissimilarity measure, subsuming the representative-set method as a special case and relating to the distance substitution kernel in a limiting case.
- It ensures that all functions in the resulting RKHS are Lipschitz-continuous with respect to the given distance metric, improving generalization.
- The method uses random sampling from a distribution derived from the distance to generate features, avoiding the need for explicit eigen-decomposition or matrix clipping.
- A tractable estimator is proposed that enables efficient training with linear time complexity O(NRL), where N is the number of samples, R is the number of random features, and L is the input length.
- The framework supports standard kernel methods (e.g., SVM, ridge regression) by providing a valid vector representation for any input with a defined dissimilarity.
Experimental results
Research questions
- RQ1Can a general framework be developed to derive positive-definite kernels and vector embeddings directly from a dissimilarity measure, without requiring a predefined feature representation?
- RQ2How can the resulting kernel ensure that functions in the RKHS are Lipschitz-continuous with respect to the input distance metric?
- RQ3Can such a framework outperform k-NN and other distance-based learning methods in terms of both accuracy and computational efficiency?
- RQ4How does the performance of D2KE compare to existing methods like distance substitution kernels, pseudo-Euclidean embeddings, and representative-set methods across diverse structured data domains?
Key findings
- D2KE consistently outperforms k-NN across all datasets, demonstrating significantly better generalization and lower variance in predictions.
- On time-series data, D2KE achieves 92.60% accuracy on Auslan and 99.88% on pentip, surpassing all baselines including DSK_RBF and DSK_ND.
- On string classification, D2KE achieves 98.76% accuracy on mnist-str4 and 98.54% on mnist-str8, outperforming RSM and GDK_LED despite lower computational cost.
- In image classification, D2KE achieves 46.03% accuracy on flower and 68.76% on decor, outperforming RSM and DSK_ND while being significantly faster than SVD-based methods.
- D2KE achieves linear time complexity O(NRL), making it scalable to large datasets and long sequences, unlike quadratic or higher methods such as DSK_ND or RSM.
- The method’s performance improves with increasing random feature count R, and optimal performance is achieved with R in the range [4, 4096], indicating strong convergence to the exact kernel.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.