TorchKM brings GPU acceleration to kernel learning and model selection
Open-source library speeds up SVM and kernel regression on GPUs with clever matrix reuse.
TorchKM is a new GPU-accelerated library for kernel methods, targeting classic machine learning algorithms like support vector machines (SVM), kernel logistic regression, and kernel quantile regression. Built with GPU-friendly linear algebra, it exploits intelligent reuse of matrix operations across both training and cross-validation sweeps, dramatically reducing runtime compared to CPU-based scikit-learn implementations. The library offers a scikit-learn-style API, making it easy for existing users to adopt without rewriting pipelines. Benchmarks confirm competitive predictive accuracy alongside significant speedups, though exact figures vary by dataset and kernel choice.
The library is open-source, available on PyPI, and includes documentation and code on GitHub. The accompanying arXiv paper (2606.06742) details the design and experiments across 14 pages. By targeting the full model-selection pipeline rather than just training, TorchKM addresses a key bottleneck in applied kernel learning. This could make kernel methods more practical for large-scale problems where GPUs are now standard, potentially reviving interest in classical approaches for modern ML workflows.
- Supports SVM, kernel logistic regression, and kernel quantile regression with GPU acceleration
- Scikit-learn-style API for easy adoption; reduces runtime via intelligent reuse of matrix operations across training and model selection
- Open-source library installable via PyPI, with full code and documentation on GitHub
Why It Matters
TorchKM makes kernel methods feasible on GPUs, cutting training and model selection time for classic ML algorithms.