Improving Improved Kernel PLS
2026-07-17 • Machine Learning
Machine LearningData Structures and Algorithms
AI summaryⓘ
The authors worked on making two key parts of the Improved Kernel Partial Least Squares (IKPLS) algorithm faster. They changed how certain math steps are done so that the process can run better on modern computers, especially those with multiple processors. They also discovered a new way to calculate some values more efficiently, reducing the number of operations needed. Tests showed these improvements speed up the algorithm significantly without changing the results. Their faster methods are available in a free Python package called ikpls.
Kernel Partial Least Squares (KPLS)Calibration algorithmsMatrix rotationsLoadingsParallel computingAlgorithm optimizationNumPyJAXPython packageComputational efficiency
Authors
Ole-Christian Galbo Engstrøm
Abstract
Improved Kernel Partial Least Squares (IKPLS) algorithms 1 and 2 are among the fastest PLS calibration algorithms. This article focuses on two shared steps, the computation of the $\mathbf{X}$ rotations, $\mathbf{R}$, and the $\mathbf{Y}$ loadings, $\mathbf{Q}$, and accelerates both. For $\mathbf{R}$, term-by-term accumulation is replaced by a direct evaluation strategy that requires the same number of multiplications but parallelizes better on modern hardware. For $\mathbf{Q}$, I identify - to the best of my knowledge, for the first time - equivalences showing that each $\mathbf{Y}$ loading is obtainable, up to explicitly derived constants, from quantities already computed earlier in the same iteration, and I exploit them in IKPLS to reduce the cost of each loading from $Θ\left(KM\right)$ to $Θ\left(M\right)$ operations whenever $M = 1$ or $2 \leq M < K$, with $K$ predictor variables (number of columns in $\mathbf{X}$) and $M$ response variables (number of columns in $\mathbf{Y}$). Both improvements provably yield exactly the same $\mathbf{W}$, $\mathbf{P}$, $\mathbf{Q}$, $\mathbf{R}$, and $\mathbf{T}$ as the original algorithms. Benchmarks with NumPy (CPU) and JAX (GPU) show speedups of up to two orders of magnitude for the isolated steps and of approximately $2\times$ (CPU) and $6\times$ (GPU) for entire fits. Both improvements are implemented in the free, open-source Python package \texttt{ikpls}.