Abstract
Distribution compression is a critical technique for managing large-scale datasets, enabling the representation of massive data through small, representative "coresets." While existing methods focus on marginal or joint distributions, many downstream tasks—such as Bayesian optimization and reinforcement learning—rely specifically on the relationship between variables. This paper introduces the first framework for directly compressing the conditional distribution $P(Y|X)$. By leveraging the Kernel Conditional Mean Embedding (KCME) and a novel mathematical shortcut based on the tower property of conditional expectation, we reduce the computational complexity of conditional compression from $O(n^3)$ to $O(n)$. We propose two algorithms, Average Conditional Kernel Herding (ACKH) and Average Conditional Kernel Inducing Points (ACKIP), which demonstrate superior performance in both speed and accuracy compared to joint distribution compression methods.
Introduction
In the modern data landscape, the ability to distill vast amounts of information into a compact form is essential. Distribution compression aims to identify a small subset of data points that preserves the statistical properties of the original dataset. Traditionally, methods like Kernel Herding (KH) have been employed to compress marginal distributions $P(X)$ or joint distributions $P(X, Y)$. However, these approaches are often inefficient when the primary goal is to model the conditional relationship $P(Y|X)$.
Directly compressing the conditional distribution is challenging because the standard representation in kernel space, the Kernel Conditional Mean Embedding (KCME), involves matrix inversions that scale cubically with the number of data points. This paper addresses this bottleneck, providing a theoretically grounded and computationally efficient framework for conditional distribution compression.
The AMCMD Metric and Computational Innovation
To quantify the quality of conditional compression, we introduce the Average Maximum Conditional Mean Discrepancy (AMCMD). This metric formally compares two families of conditional distributions, providing a target for optimization.
The primary technical contribution of this work is a computational "shortcut" that bypasses the $O(n^3)$ cost typically associated with KCME. By applying the tower property of conditional expectation, we derive an estimator for the AMCMD that does not require the explicit reconstruction of the full-data KCME. This innovation reduces the cost of evaluating the objective function to linear time ($O(n)$), making it feasible to apply these methods to very large datasets.
Proposed Algorithms
We introduce two primary algorithms for minimizing the AMCMD:
- Average Conditional Kernel Herding (ACKH): A greedy approach that iteratively selects the next best point to add to the coreset. While intuitive, ACKH can fall into sub-optimal configurations as it does not revisit previous selections.
- Average Conditional Kernel Inducing Points (ACKIP): A joint optimization approach that treats the entire compressed set as a set of learnable parameters. By using gradient descent to optimize all points simultaneously, ACKIP avoids the pitfalls of greedy selection. Furthermore, ACKIP is highly compatible with Just-In-Time (JIT) compilation in modern libraries like JAX, leading to significant practical speedups.
To provide a rigorous baseline, we also evaluate JKH and JKIP, which are adaptations of these algorithms designed to compress the joint distribution $P(X, Y)$.
Experimental Evaluation
We evaluated our methods across a diverse range of synthetic and real-world datasets:
- Superconductivity Dataset (UCI): A high-dimensional regression task (81 features) predicting critical temperatures.
- Heteroscedastic Synthetic Data: A 1D dataset with input-dependent noise levels.
- Imbalanced Classification: A four-class dataset designed to test the preservation of rare classes.
- MNIST: High-dimensional image data used to test the limits of conditional compression.
Key Results
Our experiments yielded several critical insights:
- Direct vs. Indirect Compression: Compressing the conditional distribution $P(Y|X)$ directly consistently outperforms joint distribution compression. Joint methods often "waste" their limited coreset budget on capturing the input density $P(X)$ rather than the functional mapping $X \to Y$.
- Optimization Superiority: ACKIP consistently outperformed ACKH in terms of accuracy (RMSE). The ability to optimize the coreset points jointly allows for a more efficient representation of the conditional manifold.
- Efficiency and Scalability: On the Superconductivity dataset, ACKIP matched the performance of the full dataset using only 3% of the original data. In terms of speed, ACKIP was significantly faster than ACKH; for instance, on heteroscedastic data, ACKIP reached a target coreset size in approximately 11 seconds, compared to 318 seconds for ACKH.
Conclusion and Future Work
This work establishes a new frontier for distribution compression by focusing on the conditional relationship between variables. By reducing the computational complexity to linear time, we make conditional compression a practical tool for large-scale machine learning.
Future research will focus on establishing formal convergence guarantees for these algorithms and extending the framework to non-differentiable data types such as graphs or text. Additionally, we aim to explore "Global" compression techniques that can better preserve conditional mappings in sparse regions of the input space where data density is low.
Summary updated