Abstract: Gaussian processes (GPs) are flexible models that can capture complex structure in large-scale dataset due to their non-parametric nature. However, the usage of GPs in real-world application is limited due to their high computational cost at inference time. In this paper, we introduce a new framework, kernel distillation, to approximate a fully trained teacher GP model with kernel matrix of size $n\times n$ for $n$ training points. We combine inducing points method with sparse low-rank approximation in the distillation procedure. The distilled student GP model only costs $O(m^2)$ storage for $m$ inducing points where $m \ll n$ and improves the inference time complexity. We demonstrate empirically that kernel distillation provides better trade-off between the prediction time and the test performance compared to the alternatives.
Introduction: The Scalability Challenge
Gaussian Processes (GPs) are considered the "gold standard" for regression and classification tasks because they provide both point predictions and reliable uncertainty estimates. However, their scalability is a significant bottleneck. For a dataset with $n$ points, a standard GP requires $O(n^2)$ storage and $O(n)$ computation to predict a single new point. This makes deployment on resource-constrained hardware, such as smartphones or robotics, nearly impossible for large datasets.
Existing methods like FITC or KISS-GP attempt to solve this by approximating the model during training, but they often sacrifice predictive power or struggle with high-dimensional data. This paper proposes a different approach: Kernel Distillation. Instead of approximating during training, it compresses a fully optimized "teacher" GP into a lean "student" model for fast deployment.
Methodology
The Kernel Distillation framework treats a pre-trained GP as a teacher and builds a student model to mimic its behavior through three main steps:
- Sparse Low-Rank Approximation: The massive $n \times n$ teacher kernel matrix ($K_{XX}$) is approximated using a student structure: $W K_{UU} W^\top$. Here, $U$ represents a small set of "inducing points" (identified via K-means clustering), and $W$ is a sparse interpolation matrix.
- Constrained Optimization: Distillation is formulated as an optimization problem that minimizes the Frobenius norm between the teacher and student kernels. This is subject to a sparsity constraint where each row of $W$ has at most $b$ non-zero entries.
- Efficient Inference: By precomputing specific components, the student model predicts mean and variance in $O(b \log m + b^3)$ time, where $m$ is the number of inducing points and $b$ is the sparsity level.
Experimental Results
The researchers evaluated Kernel Distillation on several benchmarks, including Boston Housing, Abalone, PUMADYM32N, and KIN40K.
Performance and Efficiency
- Accuracy vs. Speed: On the PUMADYM32N dataset, Kernel Distillation achieved a Standardized Mean Square Error (SMSE) of 0.069, while KISS-GP failed with an SMSE of 1.001.
- Inference Speedup: On the KIN40K dataset, the student model was over 500x faster than the FITC method (0.0034s vs 1.7606s per 1k points).
- Sparsity Impact: As shown in the figures, a sparsity level ($b$) of just 15 to 20 is sufficient to achieve performance nearly identical to the exact GP. This demonstrates that local interpolation is highly effective for capturing the teacher's knowledge.
- Uncertainty Preservation: Unlike many fast approximations that produce overconfident variance estimates, Kernel Distillation remains remarkably faithful to the teacher's uncertainty bounds, which is critical for safety-sensitive applications.
Conclusion
Kernel Distillation provides a robust way to inherit the knowledge of a complex GP model while drastically reducing its computational footprint. By moving away from grid-based scaling (which suffers in high dimensions) to a grid-free K-means approach, the method scales effectively to higher-dimensional tasks. Future work may address the initial cost of training the teacher model for truly massive datasets and exploring performance with non-stationary kernels.
Summary updated