Introduction
Kernel methods are a cornerstone of machine learning, enabling algorithms to identify non-linear patterns by implicitly mapping data into high-dimensional feature spaces. Despite their utility, these methods face a significant "scalability wall." Computing a kernel matrix for $n$ data points in $d$ dimensions typically requires $O(n^2d)$ time, a cost that becomes prohibitive as datasets grow.
To address this, researchers employ sketching—a technique that randomly projects data into a lower-dimensional space while preserving its essential geometric properties. The polynomial kernel is of particular interest because it serves as a building block for many other kernels; for instance, the Gaussian kernel can be approximated via a Taylor series of polynomial kernels. However, when the degree $p$ of the polynomial is large—a common occurrence in Natural Language Processing (NLP) and modern deep learning theory—existing sketching techniques either scale exponentially with $p$ or incur a $p \cdot nd$ penalty, creating a bottleneck in high-dimensional settings.
The TensorSketchViaLimRand Algorithm
This paper introduces TensorSketchViaLimRand, a breakthrough sketching algorithm that significantly reduces the computational overhead associated with high-degree polynomials. The core innovation lies in the use of limited randomness within a recursive binary tree structure.
Recursive Squaring and Limited Randomness
Standard sketching approaches for polynomial kernels typically require $O(p)$ independent random sketches. In contrast, TensorSketchViaLimRand utilizes a recursive structure that requires only two distinct base sketches:
- Leaf Sketch ($T$): Applied at the base of the recursive tree.
- Internal Sketch ($S$): Reused at every internal node of the tree.
By reusing the same sketch $S$ across different levels of the tree, the algorithm performs a form of "repeated powering." This allows the algorithm to "square" the vector at each step, effectively reducing the dependence on $p$ in the primary complexity term from linear to logarithmic.
Oblivious Subspace Embeddings
The proposed sketch is "oblivious," meaning it is generated independently of the input data. While the use of limited randomness makes this sketch theoretically "weaker" than a full Oblivious Subspace Embedding (OSE), the authors demonstrate that it is sufficient to preserve the column space of the polynomial kernel. This property is the critical requirement for most downstream machine learning tasks, such as kernel ridge regression.
Key Insights: Efficiency through Re-use
The fundamental "aha moment" of this research is the realization that total independence between sketches at every node of a computation tree is unnecessary. By targeting the specific subspace spanned by polynomial features rather than attempting to preserve every possible matrix, the authors achieve much higher efficiency.
This approach is particularly beneficial for "slow-growing" kernels, such as the Neural Tangent Kernel (NTK) and arc-cosine kernels. Unlike the Gaussian kernel, where Taylor coefficients decay rapidly ($1/n!$), these kernels have coefficients that decay slowly ($1/n^c$), necessitating much higher polynomial degrees $p$ for accurate approximation.
Results and Complexity
The algorithm achieves a superior running time of $\tilde{O}(nd + \epsilon^{-2} n^2 p^2)$. Compared to previous state-of-the-art methods, which operated at $O(pnd + \epsilon^{-2} n^3 p^2)$, this represents a major advancement when both $d$ and $p$ are large.
Key results include:
- Fastest NTK Approximation: The paper provides the fastest known algorithm for approximating the NTK, with a runtime of $\tilde{O}(\epsilon^{-3} n^{11/3} + nd)$.
- Gaussian Kernel Speedup: It offers the most efficient algorithm to preserve the column space of a Gaussian kernel in high-dimensional settings.
- Practical Utility: The authors show that this sketch can serve as an effective preconditioner to solve kernel linear systems and ridge regression problems more rapidly.
Limitations and Future Directions
Despite its efficiency, the algorithm has certain limitations. The sketch dimension currently depends on the number of points $n$ rather than the "statistical dimension" $s_\lambda(K)$, which is often smaller in regularized settings. Additionally, because the sketch specifically preserves the column space of $X^{\otimes p}$, it is not a general-purpose OSE for arbitrary matrices in high-dimensional space. Future work may explore extending these "limited randomness" benefits to highly regularized regimes where the statistical dimension is the primary factor.
Summary updated