Kernel methods are fundamental in machine learning, and faster algorithms for kernel approximation provide direct speedups for many core tasks in machine learning. The polynomial kernel is especially important as other kernels can often be approximated by the polynomial kernel via a Taylor series expansion. Recent techniques in oblivious sketching reduce the dependence in the running time on the degree $q$ of the polynomial kernel from exponential to polynomial, which is useful for the Gaussian kernel, for which $q$ can be chosen to be polylogarithmic (for data of bounded radius and ridge parameter $λ\geq 1/\mathrm{poly}(n)$). However, for more slowly growing kernels, such as the neural tangent and arc-cosine kernels, $q$ needs to be polynomial, and previous work incurs a polynomial factor slowdown in the running time. We give a new oblivious sketch which greatly improves upon this running time, by removing the dependence on $q$ from the $nd$ term, which is the leading order term when the dimension $d$ is large. For kernels approximated through a truncated Taylor series, our guarantees hold up to a ridge term $λI$. Combined with a sampling scheme over the degrees of the Taylor series, we further reduce the running time for slowly growing kernels such as the neural tangent kernel, for which we obtain time $\tilde O(nd+ε^{-4}λ^{-4}n^6)$ on $n$ unit-norm points with accuracy $ε$. Since the neural tangent kernel has a closed form that can be evaluated exactly in $O(n^2d)$ time, this bound is faster only when $d$ is at least about $(n/(ελ))^4$.
翻译:暂无翻译