Manuscript Offprint
arXiv:2609.07432Revisiting Thinning Methods for Kernel Learning Problems
Abstract
Kernel methods are widely used because of their strong theoretical guarantees and empirical performance. However, their high computational cost limits their applicability to large-scale datasets. To address this shortcoming, several approaches use Maximum Mean Discrepancy to construct representative subsets that preserve the properties of the full dataset in a Reproducing Kernel Hilbert Space. We introduce Backward Kernel Herding, an algorithm that addresses this problem by iteratively removing points from the dataset, achieving results comparable to current state-of-the-art approaches while accelerating the subsampling process in realistic scenarios where the reduced size is less than half of the dataset. Moreover, we overcome a limitation of Kernel Thinning by proposing an extension that enables the construction of subsets of arbitrary size rather than restricting to successive halvings. Finally, we conduct an extensive experimental comparison focusing on the most relevant kernel learning procedures: Gaussian Processes and Kernel Support Vector Machines. The results show that Backward Kernel Herding consistently achieves competitive performance with the most favorable training-time efficiency, while the proposed Flexible Kernel Thinning frequently achieves the best predictive performance. These gains become especially pronounced for moderate compression ratios, highlighting the benefits of incorporating supervised information into the thinning process. In terms of memory consumption, Flexible Kernel Thinning is also competitive, whereas Backward Kernel Herding remains an alternative when computational efficiency is the primary objective. Overall, no single method dominates across all scenarios, underscoring the importance of selecting the reduction strategy according to the desired trade-off between predictive performance, training cost, and memory requirements.
Keywords: Data subsampling · Kernel Thinning · Kernel Herding · Kernel approximation · Supervised Kernel
1 Introduction
Kernel methods, such as Kernel Support Vector Machines (KSVMs) and Gaussian Processes (GPs) [1], are well known for their strong theoretical guarantees and empirical performance. However, a major limitation of these approaches lies in their computational complexity, which typically scales at least quadratically with the number of data points, in particular in memory and up to in time for training and inference. This makes them impractical for large-scale problems.
*Email: blanca.cano@uam.es (ORCID: 0009-0001-6330-4824) †Email: yago.aguado@uam.es (ORCID: 0009-0005-9755-0213) ‡Email: a.fernandez@uam.es (ORCID: 0000-0002-6602-3753) §Email: jose.dorronsoro@uam.es (ORCID: 0000-0002-5271-0616)
Recent research has focused on solving this problem by constructing smaller, representative subsets of the data that preserve the properties of the full dataset in the Reproducing Kernel Hilbert Space (RKHS), typically via the Maximum Mean Discrepancy (MMD) [2]. One of the earliest approaches in this direction is Kernel Herding [3], which iteratively selects samples to approximate a target distribution. Its theoretical properties were later refined and connected to conditional gradient methods by [4], establishing convergence rates and providing a deeper understanding of its behavior. One limitation of this method is that it starts from an empty set and iteratively adds new elements from the dataset to construct the reduced representation. In practice, having a subset with less than half of the original size may severely deteriorate predictive performance. In the complementary setting, where we want to retain the majority of the dataset, this constructive approach may also require more iterations than a strategy based on directly discarding data points rather than building the subset from scratch. To mitigate these limitations, in this work we propose exploring the reverse strategy: instead of progressively constructing a subset of retained instances, we iteratively identify and discard data points, thereby directly optimizing the set of examples to be removed.
Other approaches, such as Kernel Thinning [5, 6], do not directly minimize the MMD of the selected subset, but instead aim to construct subsets whose empirical distributions have low discrepancy with respect to each other. In spite of being a state-of-the-art technique, Kernel Thinning faces a limitation with respect to Kernel Herding, since it only allows for the construction of subsets of size for some . We propose a modification of the algorithm so that it allows the construction of subsets of arbitrary size.
Additionally, an application that is often overlooked or unclear in the literature is the supervised extension of these methods, which we address in the first part of this paper. Finally, to enrich the family of methods to solve the problem we have described, we propose a novel algorithm based on backward propagation, which we call Backward Kernel Herding. This approach starts with the whole dataset and iteratively removes points until a desired size is reached and solving the main problem of Kernel Herding.
The main contributions of this work can be summarized as follows:
-
We introduce Backward Kernel Herding, the first backward propagation framework for kernel-based subset selection, which starts from the full dataset and iteratively removes elements, in contrast to classical forward construction methods.
-
We extend backward subset selection techniques to supervised learning settings for kernel methods such as KSVMs and GPs.
-
We extend the current Kernel Thinning method to render it more flexible in terms of coreset size, while retaining convergence guarantees and computational cost.
-
We explain the relevance of supervised dataset selection for kernels and how to apply it.
-
We provide a comprehensive empirical comparison between our method, i.e. Backward Kernel Herding, Kernel Herding, and Kernel Thinning, addressing the lack of standardized evaluations for Kernel Thinning.
The paper is structured as follows. Section 2 reviews the state of the art in kernel subsampling: Kernel Herding and Kernel Thinning. It also tackles the use of these techniques for supervised problems. Then, Section 3 introduces the novelties of this paper: a modification of Kernel Thinning that increases its flexibility, and the Backward Kernel Herding algorithm. Finally, in Section 4 we present the results of the experimental comparison between the methods, which shows that our proposal is competitive with the rest of the state-of-the-art techniques.
Algorithm 1: Discrete Kernel Herding
Input: MCMC sample pool , kernel function , target size
Output: Sequence of super-samples
// Precompute empirical kernel mean embedding
1 for do
2
3 end
4 ;
// Initialize empty sequence
5 for do
6
7
8 end
9 return
2.1 Kernel Herding
Kernel herding [3] extends the discrete herding algorithm [7] to continuous spaces by operating directly on the RKHS. Let be an input space, a positive definite kernel, and the associated feature map, i.e. . Given a target distribution with kernel mean embedding , kernel herding generates a sequence of super-samples , which will represent the whole distribution, minimizing the MMD via the greedy update
Each new point is attracted toward regions of high probability mass under while being repelled from locations already occupied by previous samples. In practice, is accessible only through a set of samples . This means the search in (1) can be written as a discrete one over instead of .
A summary of Kernel Herding is described in Algorithm 1.
2.2 Kernel Thinning
Kernel Thinning (KT) [5, 6] was introduced as a procedure for compressing a distribution more effectively than by i.i.d. sampling or other standard thinning techniques. Given a reproducing kernel , the method compresses points of into an approximation with a random set of size (where is a prefixed integer) with comparable worst-case integration error in the associated RKHS [8], with an overall computational cost of . Besides the base kernel , KT also uses a so called square root kernel, defined as follows.
Definition 1 (Square-root Kernel). Let be a symmetric, positive-definite kernel. A function is called a square-root kernel for if is square-integrable for all , and
And, for example, the square-root kernel for the widely used Gaussian function is .
KT steps are summarized in Algorithm 2 and explained in detail in [5]. Algorithm 3 (KT-SPLIT) recursively partitions the input point sequence into candidate coresets of size approximately . This is done via a randomized, online halving process using a square-root kernel , which encourages balance and diversity in each subset. Algorithm 4 (KT-SWAP) selects the best candidate coreset by MMD [2] with respect to the full input. It then refines this coreset via a greedy swapping procedure to further reduce MMD, using the target kernel . Together, these steps ensure that the final coreset achieves near-optimal MMD guarantees while reducing the number of points used to .
Algorithm 2: Kernel Thinning with KT-swap
Input : Kernels , input points , thinning parameter , probabilities
Output: Coreset
1 begin
2
The computational and memory cost will be discussed in Section 3.1, since KT is a particular case of our proposed method Flexible Kernel Thinning.
2.3 Supervised methods
In many kernel-based methods, such as KSVM or GP, the kernel function is typically defined solely on the input space . That is, it measures similarity between inputs without explicitly incorporating the associated labels in the kernel.
However, in supervised learning problems, particularly when the aim is to use the kernel to remove samples, ignoring label information in the kernel construction may lead to suboptimal results. In classification tasks, this may lead to similarity measures that fail to distinguish between classes, potentially collapsing class structure [9]. In regression, it may fail to capture relevant dependencies between inputs and outputs, effectively reducing the problem to an unsupervised similarity measure.
A natural way to address this limitation is to incorporate a supervised kernel that can be used to build the coresets. To do that, one can define a kernel over the joint space .
2.3.1 Joint Kernel Construction
We define the joint kernel as
Algorithm 3: KT-split
Input : Kernel , input points , thinning parameter , probabilities
Output: candidate coresets
1 begin
2
3
4
5
6
7
8
Algorithm 4: KT-swap
Input : Kernel , input points , candidate coresets
Output: Refined coreset
1 begin
2
3
4
5
If and are positive definite kernels, their product is also a positive definite kernel. Therefore, (2) defines a valid kernel. Moreover, if
then the joint kernel admits the feature map representation
where denotes the tensor product. Thus, the joint feature map is .
Let us now present some common choices for in regression problems.
2.3.2 Radial Basis Function (RBF) Kernel
The RBF kernel is defined as
This kernel admits an infinite-dimensional feature map in an RKHS and can be efficiently approximated using Random Fourier Features (RFF) [10, 11], since is a shift-invariant kernel and admits a spectral representation by Bochner's theorem. Specifically, there exists a probability measure such that
For the Gaussian RBF kernel, . Sampling and , we define the real-valued feature map
Then the kernel is approximated as .
2.3.3 Triangular Kernel
Another linear option is a particularization of the triangular kernel explained by [12] and defined as
This kernel admits the integral representation
where
The associated feature map can be interpreted as
so that
The feature map associated with the triangular kernel can be approximated in a finite-dimensional space by discretizing the integral representation. Let be a uniform grid over an interval , s.t.
We define the discrete feature map as
The scaling factor ensures consistency with the inner product. Then, the inner product between two feature vectors satisfies
Therefore, the triangular kernel admits the approximation
2.3.4 Kronecker Delta Kernel
For discrete labels, a simple and effective choice is the Kronecker delta kernel:
This corresponds to a feature map into a Hilbert space given by , where denotes the one-hot encoding of the label. Then,
3 New coreset selection techniques
3.1 Flexible Kernel Thinning (FKT)
A structural constraint of the KT algorithm described above is that the output coreset size is rigidly fixed to for a user-chosen integer . This forces practitioners to commit to a power-of-two compression ratio before running the algorithm. In practice, one frequently wishes to retain a fraction of the input points—for example, —but no single integer yields a coreset of size unless happens to be an exact negative power of two.
The key observation that resolves this limitation is that every admits a binary (dyadic) expansion
truncated at depth up to a tolerance (i.e. the residual ). The bits can be computed greedily in time:
stopping as soon as . Each nonzero bit corresponds to contributing points to the final coreset. Because the KT-SPLIT tree of depth naturally partitions into nearly equal subsets of size , a union of such subsets recovers a block of size .
We exploit the recursive structure of KT-SPLIT to select exactly the right subsets at each level where . We maintain a set of active nodes, nodes of the KT-SPLIT binary tree that have not yet contributed to the coreset. At level :
-
If : each active node has produced two children (left) and (right) of equal expected size. The left child holds one of the two candidate coresets produced by KT-SPLIT at that level; we select the child with smaller to the full input and add its index set to the output coreset . The other child becomes active and continues to level .
-
If : both children of every active node remain active; no points are committed to the coreset at this level.
After all levels, the active nodes are discarded (their combined size is ). The final output is the union of all selected left children, and its size satisfies
Note that once we commit the selected child to the coreset, we no longer need to process it further. This means that the subtree rooted at the other child—the one that continues—has strictly fewer points to handle than the original tree, which is less computationally costly than running a full KT of depth .
After collecting all selected index sets, a single KT-SWAP pass (Algorithm 4) is applied to their union as a whole. This is possible because KT-SWAP operates on any candidate set regardless of how it was produced: it selects the element of with smallest and then iteratively swaps coreset members for input points to decrease . Crucially, merging the per-level selections before refinement (rather than refining each block independently) allows the swap step to exchange points across levels, capturing cross-block redundancy that per-block refinement would miss.
The full procedure is given in Algorithm 5.
3.1.1 Theoretical guarantees
For FKT he theoretical guarantees rest on three pillars [5]:
Balanced random walk. At each halving step, the assignment of a paired input point to either child coreset is governed by a carefully chosen Bernoulli probability that keeps the signed discrepancy walk sub-Gaussian (Theorem 1 of [5]). Concretely, if is the current discrepancy and , the swap probability is set to
where measures the current imbalance and is a parameter updated to control the walk's variance increment. This mechanism is local, i.e. it depends only on the current pair and the accumulated discrepancy, not on how many levels the tree has. Consequently, FKT applies exactly the same walk at every level of its deeper tree, inheriting the same sub-Gaussian tail control at each node.
Greedy swap refinement. KT-SWAP selects the candidate coreset with smallest and then executes a local greedy descent: for each coreset point , it tests every swap with and accepts any that reduces . This step does not depend on how the candidates were generated—only on the quality of the candidate presented to it. In FKT, the union assembled by tree pruning serves as the single candidate, and KT-SWAP is applied to it exactly as in the original algorithm. Because each per-level selection already minimizes within its node (Step 3 of Algorithm 5), the input to KT-SWAP is no worse than any individual candidate from standard KT-SPLIT, and the swap refinement can only improve upon it.
Algorithm 5: Flexible Kernel Thinning (FKT)
Input : Kernels , points , target fraction , tolerance , swap probabilities
Output: Coreset of size
// -- Step 1: Bit extraction (Eq. 7) -- 1 ; ;
2 while do
3
// -- Step 2: Build KT-SPLIT tree to depth --
7 Run KT-SPLIT, retaining all intermediate node index sets
// -- Step 3: Tree-pruning collection --
8
9 // active nodes: root at depth 0
10 for to do
11
12 if then
13 // other child stays active
14 else
15 // both children stay active
16
17
18
19
// -- Step 4: Joint greedy refinement on the union --
20
21 return
Coreset size and approximation quality. For any level at which , the selected child coreset has size and satisfies, by Theorem 1 of [5], the single-function bound
with high probability, where . The union coreset is a disjoint union of at most such blocks; since the blocks are drawn from independent branches of the KT-SPLIT tree, their integration errors are stochastically independent, and a union-bound argument gives
with high probability, matching the guarantee of standard KT up to the factor, which is at most —a slowly growing constant for any fixed tolerance
.
In summary, FKT achieves coresets of any prescribed size while preserving the worst-case cost and the better-than-i.i.d. MMD guarantees of standard Kernel Thinning, at the cost of a logarithmic factor in the approximation bound that depends only on the binary expansion length of .
3.2 Backward Kernel Herding via Mean Embedding Minimization
The goal of the algorithm is to build a subset of the dataset such that that limits computational cost while optimally approximating the empirical measure of the data. Inspired by the framework presented in [4], we define an iterative procedure that removes one point at every step until we reach the target size.
Let be a RKHS with feature map ; in practice, it can be approximated using Random Fourier Features (RFF) [10]. The mean embedding of the empirical measure over a set is defined as
For a candidate point , define as the mean embedding of the remaining set :
We seek the point whose removal minimally distorts the mean embedding, leading to the objective:
Expressing in terms of and , starting from
we isolate the remaining sum and substitute back to obtain
so that the objective simplifies to
Since the factor is a positive constant independent of , minimizing (12) is equivalent to
Thus, the first element to be removed is given by (13), and its corresponding error vector is
Algorithm 6: Backward Kernel Herding via Mean Embedding
Input: Point set , feature map , target size
Output: Thinned set with
1 Compute ;
2 ; // Initialize residual error
3 ;
4 for do
5 // Update residual error
6 ;
7
8 end
9 return
Following the same idea, suppose that after fixing the previous selected elements, the set contains the elements iteratively chosen, one by one, to be discarded from . Then, the next element, , is obtained as
The error vector and the removal set are then updated according to
The full procedure is summarized in Algorithm 6.
If we do not want to rely in the explicit formulation of we can use the kernel trick:
Note that the term does not depend on so
Using the kernel trick and . where
The could be defined inductively using (15) and multiplying by in each member of the equality
and for the base recursion hence
The kernel trick version of the method is described in Algorithm 7.
Algorithm 7: Kernelized Backward Herding via Mean Embedding
Input: Point set , kernel function , target size
Output: Thinned set with
// Precompute Kernel Mean Embeddings and initialize inner products
1 for do
2 ;
3 ;
4 end
5 ;
6 for do
7
8 ;
9
10
11
12 end
13 return
3.2.1 Observations
Connection to Support Vector Machines. The selection criterion (13) removes at each step the point whose feature map lies closest to the mean embedding in . Geometrically, these are the points near the center of mass of the feature space, which correspond precisely to the interior points of the convex hull of . This is complementary to SVM philosophy, where only the support vectors—the points farthest from the decision boundary, i.e., the most extreme points in feature space—are retained to define the solution. Backward Kernel Herding thus provides a principled justification for discarding non-support-like points first: the points removed are precisely those that an SVM would deem least informative, making the procedure a well-motivated heuristic for dataset compression.
Complementarity with Kernel Herding. Let denote the target mean embedding of the full dataset . At iteration , let be the set of discarded points, and let be the remaining subset of size . The mean embedding of this remaining subset is defined as:
From the definition of the Backward Kernel Herding, Algorithm 6, the accumulated residual error tracking the removed points satisfies:
By conservation of the total dataset sum, the combined embeddings of the remaining and discarded subsets must equate to the full dataset embedding:
Substituting and into (18) yields:
Isolating the remaining mean embedding vector yields:
Taking norm on both sides yields the exact squared MMD error of the remaining dataset at step :
For the MMD error formulation in Kernel Herding, we consider Equation (5) from [3],
where and corresponds to the error minimized. So the guarantees are the same for both methods.
An alternative argument is that both methods are greedy algorithms that optimize the same objective function, either through minimization or maximization, as noted by Bach [4] in the context of Kernel Herding. The same interpretation applies to our Backward Kernel Herding construction.
3.3 Methods comparison
An important observation is that, although both Kernel Herding methods optimize the same objective, greedy algorithms are inherently path-dependent. Consequently, even when the final coreset size is fixed, the resulting coresets may differ.
Table 1 compares the FLOPs and memory cost of all methods mentioned. To this end, let denote the retention fraction, so that the coreset size is and the number of removal iterations is . From the exact FLOP counts derived previously, the dominant terms are (using to refer to these quantities)
where is the cost of a single RFF feature map evaluation. FKT is excluded from the comparison as its KT-SWAP phase introduces a cubic term that dominates in all regimes.
Table 1: Exact FLOPs and memory for each coreset construction method, derived directly from the algorithm complexity sections (not from summary tables). Notation: input size; retention fraction so that the coreset size is for all methods; number of KT-swap passes; binary expansion depth; RFF output dimension; per-evaluation costs of the target kernel, square-root kernel, and feature map respectively.
| Metric / Phase | Flexible Kernel Thinning (FKT) | Kernel Herding (KH) | Kernelized Backward Kernel Herding (Algorithm 7) | Backward Kernel Herding (Algorithm 6, RFF) |
|---|---|---|---|---|
| Total FLOPs | ||||
| Total FLOPs ( notation) | ||||
| Memory | (node index sets at each level; no kernel matrix) | floats ( coreset indices; no kernel matrix$ | scalars ( and for all ; no kernel matrix$ | ( + residual ) |
Kernelized BKH is cheaper than KH whenever
so the advantage of backward removal holds well below . For the loop cost of Kernelized BKH is at most , whereas that of KH exceeds , a reduction by more than a factor of four. BKH with RFF further eliminates the fixed preprocessing of Kernelized BKH and replaces with , making it strictly cheaper whenever and .
As a consequence, we can state the following rule of thumb: KH is preferred when ; Kernelized BKH should be used for when an exact kernel is required; otherwise, BKH with RFF is preferable, especially as or when , since the loop cost vanishes as and the preprocessing is entirely avoided.
4 Experiments
In this section we present the results of the experimental comparison of the performance of the algorithms we have discussed. We aim to compare the performance of Kernel Herding, Kernel Thinning and Backward Kernel Herding when selecting samples for supervised problems. The procedure followed in all the experiments is presented in Algorithm 8.
Algorithm 8: Coreset Selection and Evaluation Framework
Input: Dataset , Selection Model , Supervised Kernel , Learning Model , Samples Percentage to retain,
1 for to 10 do
2 // Step 1: Data Partitioning Split into 50% training set and 50% test set (using a common fixed seed)
3 // Step 2: Coreset Selection Apply and to to extract of the samples for a representative coreset (accounting for stochasticity in randomized methods)
4 // Step 3: Model Training Train the learning model using the extracted coreset
5 // Step 4: Evaluation Compute prediction performance metrics and resource profiling on
6 end
In order to do so, we conducted tests using two of the most prominent kernel-based learning paradigms: Kernel Support Vector Machines (kSVM) and Gaussian Processes (GP) [1]. Both models are versatile frameworks capable of addressing classification and regression tasks by applying the kernel trick to map input data into high-dimensional feature spaces.
Throughout all experiments, we employ the Gaussian (RBF) kernel. To ensure reproducibility and eliminate manual tuning bias, the kernel hyperparameter is determined via the heuristic commonly utilized in the scikit-learn [13] framework:
In the specific case of regression via KSVM, the -insensitivity parameter is computed using a data-driven heuristic to account for the noise scale of the target variable :
We conducted the experiments with the OpenML benchmarking suites. This allows for varied datasets, which are widely adopted and have an emphasis on reproducibility. Specifically, we used the OpenML benchmarking suites introduced by [14] for classification tasks and the curated OpenML-CTR23 suite proposed by [15] for regression tasks. These benchmarks provide standardized datasets and evaluation settings, enabling fair and comparable assessment of model performance across a broad range of machine learning problems.
For evaluation, we used Balanced Accuracy as the primary metric for classification tasks, as it provides a robust assessment under class imbalance. For GP classification, we additionally report ROC-AUC because GP classifiers naturally yield probabilistic predictions. To avoid introducing additional calibration or score-transformation steps, ROC-AUC was not reported for KSVM models, and their performance was assessed using Balanced Accuracy only.
For all regression tasks, performance was measured using the coefficient of determination, . We also measure the training time and memory consumption. Training time is defined as the total time required for coreset construction and model training (Steps 2 and 3 in Algorithm 8). Similarly, memory consumption corresponds to the total memory footprint, measured in MB, required during these two stages. These metrics complement the theoretical analysis presented in Table 1. While empirical measurements capture the practical behavior of the implementations, Table 1 provides the corresponding FLOPs and asymptotic computational complexity estimates only for the subsampling methods without taking into account the learning methods.
Table 2: Predictive error ranking (the lower the better) across benchmark datasets. Best results and those statistically indistinguishable from the best ( via Nemenyi CD) are highlighted in bold.
| Task | Method | Size 25% | Size 50% | Size 75% |
|---|---|---|---|---|
| KSVM Classification | KH | |||
| FKT | ||||
| BKH | ||||
| GP Classification | KH | |||
| FKT | ||||
| BKH | ||||
| KSVM Regression | KH | |||
| FKT | ||||
| BKH | ||||
| GP Regression | KH | |||
| FKT | ||||
| BKH |
For each dataset, we evaluate model performance using the metrics generated from the 10 outer folds of the cross-validation procedure presented in Algorithm 8. To rigorously compare each pair of models (), we employ the Wilcoxon signed-rank test [16] on the fold-wise performance differences. Since comparing models involves pairwise tests, we adjust the resulting -values using the Holm-Bonferroni correction [17] to control the family-wise error rate at a significance level of .
A model is considered significantly better than model if it exhibits a higher mean performance and the corresponding adjusted -value is strictly less than . Based on these outcomes, we construct a dataset-specific ranking using a competition ranking scheme: the rank assigned to a model is , where represents the number of models that are statistically superior to it. In cases where no significant difference is detected, models share the same rank, inherently accounting for statistical ties.
To synthesize findings across the entire benchmark, we calculate the Average Rank for every model across all datasets. This metric serves as a robust indicator of global relative performance, minimizing the influence of disparities between datasets.
To determine if the observed differences in average ranks are statistically significant, we follow the framework established by [18]. We first apply the Friedman test to evaluate the global null hypothesis. If rejected, we conduct the Nemenyi post-hoc test, defining the Critical Distance (CD) as:
where is the critical value based on the studentized range statistic, the number of models and in classification and for classification. Two models are identified as significantly different if the absolute difference between their average ranks exceeds the CD. This two-step procedure ensures that our claims of model superiority are statistically grounded, accounting for both dataset-level noise and the multiplicity of the experimental design. In our case, due to the benchmarks sizes, for and classification benchmark the CD is 0.391 and for the regression benchmark 0.560. We did not place all the results for every dataset in this document due to space constrains, but all the experiment sources are available via https://github.com/BlancaCC/backward-thinning.
Table 2 reports the average ranking of the predictive error obtained by the different dataset
Table 3: Training time ranking (the lower the better) across benchmark datasets. Best results and those statistically indistinguishable from the best ( via Nemenyi CD) are highlighted in bold.
| Task | Method | Size 25% | Size 50% | Size 75% |
|---|---|---|---|---|
| KH | ||||
| KSVM Classification | FKT | |||
| BKH | ||||
| GP Classification | KH | |||
| FKT | ||||
| BKH | ||||
| KSVM Regression | KH | |||
| FKT | ||||
| BKH | ||||
| GP Regression | KH | |||
| FKT | ||||
| BKH |
reduction strategies across all benchmark datasets. Lower values indicate better predictive performance. The reported ranks summarize the relative performance of each method, while the Nemenyi post-hoc test identifies methods that are not significantly different from the best-performing approach.
Overall, FKT consistently achieves the best predictive performance across most tasks and reduction sizes. In KSVM classification, it clearly outperforms both KH and BKH for all reduction levels, obtaining the lowest average rank and being the only method consistently highlighted as statistically equivalent to the best result. This finding suggests that theoretical guarantees have an impact in the prediction performance.
A similar trend can be observed for GP classification and KSVM regression. For moderate reductions (50% and 75% of the original data retained), FKT substantially improves predictive performance with respect to KH and BKH. Interestingly, when the reduction is more aggressive (25% retained), the differences become less pronounced and all methods are statistically indistinguishable. This behavior is consistent with the theoretical properties of kernel thinning. While the supervised kernel provides stronger guidance during the selection process, aggressive reductions inevitably degrade the quality of the approximation of the original empirical distribution, reducing the advantage of the supervised criterion. Nevertheless, even under these extreme compression ratios, FKT remains among the best-performing methods.
The only scenario where the superiority of FKT is less evident corresponds to GP regression. In this task, all methods obtain statistically equivalent results for every reduction size. In fact, no clear winner emerges from the comparison. One possible explanation is that the supervised kernels employed in this study may not fully capture the characteristics required by Gaussian Processes. However, the strong improvements observed for KSVM regression indicate that the supervised kernel construction itself is capable of enhancing regression performance. Therefore, a more plausible explanation is that the probabilistic nature of Gaussian Processes interacts differently with the selected subsets, suggesting that specialized thinning or coreset construction procedures tailored to GPs may be required. Investigating this interaction constitutes an interesting direction for future work.
The computational efficiency results are summarized in Table 3, which reports the average ranking of the training time, which was measured via a hardware profiler built on PyAPI. Lower ranks indicate faster model training. As anticipated from the theoretical analysis, BKH tends
Table 4: Memory usage (the lower the best) across benchmark datasets. Best results and those statistically indistinguishable from the best ( via Nemenyi CD) are highlighted in bold.
| Task | Method | Size 25% | Size 50% | Size 75% |
|---|---|---|---|---|
| KSVM Classification | KH | |||
| FKT | ||||
| BKH | ||||
| GP Classification | KH | |||
| FKT | ||||
| BKH | ||||
| KSVM Regression | KH | |||
| FKT | ||||
| BKH | ||||
| GP Regression | KH | |||
| FKT | ||||
| BKH |
to provide the most favorable trade-off between compression quality and subset construction cost. In particular, for KSVM classification with a 75% retained subset, BKH achieves the best ranking and significantly outperforms FKT. This result is expected since BKH directly removes points from the complete dataset and avoids the iterative optimization required by KT. For the remaining tasks, BKH and KH are generally statistically indistinguishable, both substantially outperforming FKT. The latter consistently obtains the highest training-time ranks because the supervised kernel evaluation and iterative thinning procedure introduce an additional computational overhead during the subset construction stage. Nevertheless, it is important to emphasize that this additional cost is compensated by the substantial predictive improvements observed in Table 2, particularly for classification tasks and support vector regression.
Finally, Table 4 presents the average ranking of memory consumption, which was measured via a hardware profiler built on PyAPI. The results reveal a markedly different behavior from that observed for training time. In KSVM classification and regression, FKT consistently achieves the lowest memory usage across all reduction sizes. This outcome is particularly relevant because it demonstrates that not only improves predictive performance but also yields compact representations that require less memory during model training.
For GP classification, the comparison is more balanced. FKT provides the best memory efficiency for the strongest reduction level, whereas BKH becomes competitive as the retained subset size increases. Both methods outperform KH, indicating that the reduction strategy itself plays a more important role than the specific selection criterion in controlling memory requirements for GP classifiers.
A particularly interesting observation arises in GP regression. Although BKH achieves the best average ranks for the larger retained subsets, the differences with respect to FKT are not statistically significant. This behavior can be explained by the implementation characteristics of Gaussian Process models. Besides storing the selected subset, GP regression also requires maintaining additional model-specific structures whose memory footprint can dominate the total consumption. Consequently, the relative differences introduced by the reduction strategy become less pronounced, making it difficult to distinguish statistically between FKT and BKH.
Taken together, the three tables indicate that FKT provides the best predictive performance in most scenarios, especially for classification tasks and KSVM regression, while maintaining competitive memory requirements. BKH and KH remain attractive alternatives when computational efficiency is the primary concern, particularly regarding training time, and BKH is the best option if the reduction is smaller than 50%. Therefore, the choice between methods depends on the desired trade-off between predictive accuracy and computational resources. However, when predictive performance is the main objective, the results strongly support the use of FKT as the preferred reduction strategy.
5 Conclusions and further work
In this paper, we revisited kernel subsampling methods, presented a formal supervised formulation for a procedure that is usually omitted altogether, and complemented this study with a software contribution. Additionally, we proposed two new algorithms in this line.
First, we introduced Backward Kernel Herding (BKH), a novel subset selection framework designed to mitigate the high computational cost that limits the scalability of kernel-based methods. Unlike traditional forward-construction techniques such as Kernel Herding, our approach operates via backward propagation, starting with the complete dataset and iteratively removing points to minimize the distortion of the mean embedding. A primary advantage of this framework is that it reduces the number of greedy iterations required in realistic scenarios. In particular, it accelerates the subsampling process when the desired reduction is smaller than 27% of the dataset. At the same time, it achieves predictive performance comparable to that of the state-of-the-art methods. Furthermore, we explored BKT's links to existing literature, through its relation to KH. And we also provided a principled justification of the suitability of the method for Support Vector Machines, since the method works by systematically discarding the least informative, "interior" points first, that may not be support vectors.
Secondly, we proposed Flexible Kernel Thinning (FKT), a variant of Kernel Thinning (KT) that overcomes the rigid power-of-two size constraints of the standard formulation. By exploiting the binary expansion of the target retention fraction, FKT allows for the construction of coresets of arbitrary size while preserving the computational cost and theoretical guarantees of KT. Additionally, we extended both existing and novel subset selection techniques to supervised learning settings. Incorporating joint and supervised kernels ensures that label dependencies are not ignored during the compression of classification and regression datasets.
Finally, our comprehensive empirical evaluation confirms the practical viability of the proposed methods. The results show that BKH consistently matches the performance of state-of-the-art reduction techniques, including KH and KT, while often providing favorable computational properties, particularly in terms of training time. More importantly, the proposed FKT variant frequently achieves the best predictive performance across classification and regression tasks, especially under moderate compression ratios, while maintaining competitive memory requirements. Overall, this work broadens the landscape of kernel-based coreset construction methods by introducing both a competitive backward selection strategy and a size-flexible thinning framework, offering practitioners a wider range of accuracy-efficiency trade-offs for large-scale learning problems. Furthermore, it also delves into a supervised framework.
A possible direction for future work is the construction of ensemble methods based on different coresets. For instance, once the kernel means and transformation values have been computed, they could be reused for both BKH and KH in order to generate two different coresets. Since these coresets are generally not identical, combining them through an ensemble strategy could improve performance and robustness.
Moreover, all the methods considered in this work are based on greedy algorithms that select or remove one element at a time. It could, therefore, be interesting to investigate strategies that process multiple elements simultaneously, for example selecting or removing two points at each iteration. Such an approach might improve the final approximation quality, although it would also introduce additional computational cost.
Acknowledgments
The authors acknowledge financial support from project PID2022-139856NB-I00 funded by MCIN/AEI / 10.13039/501100011033 / FEDER, UE, project Inteligencia artificial para la industria 4.0: generación de datos, modelado avanzado, optimización e interpretabilidad (TEC-2024/COM-89) from the Autonomous Community of Madrid, and project IDEA-CM (TEC-2024/COM-89) from the Autonomous Community of Madrid and from the ELLIS Unit Madrid, Cátedra UAM-IIC de Ciencia de Datos y Aprendizaje Automático and FPI-UAM.
The authors acknowledge computational support from the Centro de Computación Científica-Universidad Autónoma de Madrid (CCC-UAM). The authors thank Estrella Sánchez for valuable discussions and support.
CRediT authorship contribution statement
Blanca Cano-Camarero: Conceptualization, Methodology, Software, Validation, Formal analysis, Investigation, Data curation, Writing - original draft, Visualization, Project administration.
Yago R. Aguado-Carrillo-de-Albornoz: Conceptualization, Methodology, Software, Validation, Formal analysis, Investigation, Data curation, Writing - original draft.
Ángela Fernández-Pascual: Conceptualization, Supervision, Writing - review and editing.
José R. Dorronsoro: Conceptualization, Supervision, Writing - review and editing.
Declaration of Generative AI and AI-assisted technologies in the writing process
During the preparation of this work the authors used ChatGPT in order to improve the language style. After using this tool/service, the authors reviewed and edited the content as needed and take full responsibility for the content of the publication.
References
[1] Christopher M Bishop. Pattern Recognition and Machine Learning. Springer, 2006.
[2] Arthur Gretton et al. "A kernel two-sample test". In: The Journal of Machine Learning Research 13.1 (2012), pp. 723–773.
[3] Yutian Chen, Max Welling, and Alex Smola. "Super-samples from kernel herding". In: arXiv preprint arXiv:1203.3472 (2012).
[4] Francis Bach, Simon Lacoste-Julien, and Guillaume Obozinski. "On the Equivalence between Herding and Conditional Gradient Algorithms". In: ICML 2012 International Conference on Machine Learning. 2012.
[5] Raaz Dwivedi and Lester Mackey. "Generalized Kernel Thinning". In: arXiv preprint arXiv:2110.01593 (2021).
[6] Albert Gong, Kyuseong Choi, and Raaz Dwivedi. "Supervised Kernel Thinning". In: arXiv preprint arXiv:2410.13749 (2024).
[7] Max Welling. "Herding dynamical weights to learn". In: Proceedings of the 26th annual international conference on machine learning. 2009, pp. 1121–1128.
[8] Bharath K Sriperumbudur et al. "Hilbert space embeddings and metrics on probability measures". In: The Journal of Machine Learning Research 11 (2010), pp. 1517–1561.
[9] Blanca Cano-Camarero, Ángela Fernández-Pascual, and José R. Dorronsoro. "Addressing Class Imbalance in Kernel Thinning". In: Proceedings of the International Conference on Artificial Neural Networks (ICANN 2026). In press. 2026.
[10] Ali Rahimi and Benjamin Recht. "Random features for large-scale kernel machines". In: Advances in neural information processing systems 20 (2007).
[11] Ali Rahimi and Benjamin Recht. "Weighted sums of random kitchen sinks: Replacing minimization with randomization in learning". In: Advances in neural information processing systems 21 (2008).
[12] François Fleuret, Hichem Sahbi, et al. "Scale-invariance of support vector machines based on the triangular kernel". In: 3rd International Workshop on Statistical and Computational Theories of Vision. 2003, pp. 1–13.
[13] F. Pedregosa et al. "Scikit-learn: Machine Learning in Python". In: Journal of Machine Learning Research 12 (2011), pp. 2825–2830.
[14] Bernd Bischl et al. "Openml benchmarking suites". In: arXiv preprint arXiv:1708.03731 (2017).
[15] Sebastian Felix Fischer, Matthias Feurer, and Bernd Bischl. "OpenML-CTR23-a curated tabular regression benchmarking suite". In: AutoML Conference 2023 (Workshop). 2023.
[16] Frank Wilcoxon. "Individual comparisons by ranking methods". In: Biometrics bulletin 1.6 (1945), pp. 80–83.
[17] Sture Holm. "A simple sequentially rejective multiple test procedure". In: Scandinavian journal of statistics (1979), pp. 65–70.
[18] Janez Demšar. "Statistical Comparisons of Classifiers over Multiple Data Sets". In: Journal of Machine Learning Research 7 (2006), pp. 1–30.