Papers
Topics
Authors
Recent
Search
2000 character limit reached

TensorSketch: Efficient High-Dimensional Mapping

Updated 23 February 2026
  • TensorSketch is a structured random projection technique that efficiently approximates high-dimensional polynomial kernels and tensor contractions using CountSketch and FFT.
  • It leverages a convolution strategy and FFT to achieve subspace embeddings with strong Johnson–Lindenstrauss guarantees and controlled variance.
  • The method is applied in scalable kernel learning, tensor decompositions, and randomized matrix multiplication, offering practical benefits in regression and latent variable models.

TensorSketch is a structured random projection technique designed for efficient approximation of high-dimensional polynomial kernels, tensor contractions, and large Kronecker-structured linear operators. By fusing CountSketch with the convolution theorem and fast Fourier transforms (FFT), TensorSketch enables fast, low-memory oblivious subspace embeddings for tensor products, Kronecker products, and structured matrix multiplications that arise in kernel learning, tensor decompositions, and large-scale regression problems (Pham et al., 13 May 2025, Ahle et al., 2019, Diao et al., 2017, Wang et al., 2015, Yu et al., 2022).

1. Core Construction and Algorithmic Principles

TensorSketch generalizes CountSketch from vectors to tensor products by defining randomized hash-and-sign sketches over multi-indices. Given xRdx \in \mathbb{R}^d and a fixed integer p1p \geq 1, the homogeneous polynomial kernel k(x,y)=x,ypk(x,y) = \langle x, y \rangle^p can be approximated by embedding xx into RD\mathbb{R}^D via a data-independent random map φ(x)\varphi(x), such that

E[φ(x),φ(y)]=x,yp,\mathbb{E}[\langle \varphi(x), \varphi(y) \rangle] = \langle x, y \rangle^p,

with variance decaying as DD grows (Pham et al., 13 May 2025).

The construction involves:

  • Sampling pp pairs of independent hash hj:[d][D]h_j: [d] \to [D] (typically 3-wise independent) and sign p1p \geq 10 (typically 4-wise independent) functions.
  • Defining CountSketches p1p \geq 11 for p1p \geq 12.
  • Computing FFTs: p1p \geq 13.
  • Taking the elementwise (Hadamard) product: p1p \geq 14.
  • Returning p1p \geq 15.

For general tensors p1p \geq 16 or Kronecker products, TensorSketch constructs a global hash p1p \geq 17 and sign p1p \geq 18, giving a mapping p1p \geq 19. The polynomial kernel embedding, subspace embedding, and approximate matrix multiplication properties follow from this randomization structure (Diao et al., 2017, Ahle et al., 2019).

2. Theoretical Guarantees: Johnson–Lindenstrauss Embedding and Error Bounds

TensorSketch satisfies strong Johnson–Lindenstrauss (JL) moment and tail bounds for polynomial kernel and Kronecker-product subspace embeddings. Formally, for any fixed k(x,y)=x,ypk(x,y) = \langle x, y \rangle^p0-dimensional subspace k(x,y)=x,ypk(x,y) = \langle x, y \rangle^p1, with k(x,y)=x,ypk(x,y) = \langle x, y \rangle^p2 rows and probability at least k(x,y)=x,ypk(x,y) = \langle x, y \rangle^p3, all k(x,y)=x,ypk(x,y) = \langle x, y \rangle^p4 satisfy

k(x,y)=x,ypk(x,y) = \langle x, y \rangle^p5

where k(x,y)=x,ypk(x,y) = \langle x, y \rangle^p6 is a TensorSketch matrix (Ahle et al., 2019). For single kernel approximations, variance is bounded by

k(x,y)=x,ypk(x,y) = \langle x, y \rangle^p7

producing additive error k(x,y)=x,ypk(x,y) = \langle x, y \rangle^p8 with k(x,y)=x,ypk(x,y) = \langle x, y \rangle^p9 (Pham et al., 13 May 2025).

For Kronecker regression and low-rank tensor decompositions, TensorSketch with xx0 guarantees xx1-relative error for each sketched least-squares subproblem, where xx2 is the mode rank and xx3 the tensor order (Yu et al., 2022, Ma et al., 2021, Chen et al., 2023).

3. Algorithmic Efficiency: Convolution, FFTs, and Complexity

TensorSketch's core efficiency arises from a polynomial–convolution strategy and use of the FFT:

  • Kronecker-structured sketches are carried out by computing separate FFTs of one-dimensional CountSketches, followed by Hadamard products, then inverse FFT, costing xx4 per vector and xx5 per tensor when xx6 is the tensor order (Diao et al., 2017, Pham et al., 13 May 2025).
  • Memory and runtime scale as xx7 and xx8 per embedding of vector xx9, and RD\mathbb{R}^D0 for RD\mathbb{R}^D1 vectors (Pham et al., 13 May 2025).

In matrix multiplication, TensorSketch forms RD\mathbb{R}^D2 for RD\mathbb{R}^D3, achieving

RD\mathbb{R}^D4

in RD\mathbb{R}^D5 time (Uffenheimer et al., 4 Feb 2026). For tensor decompositions and randomized ALS, each mode subproblem's cost is RD\mathbb{R}^D6, where RD\mathbb{R}^D7 is mode size and RD\mathbb{R}^D8 rank.

4. Applications: Kernel Approximation, Regression, and Tensor Decomposition

TensorSketch has central algorithmic roles in:

  • Fast random feature maps for degree-RD\mathbb{R}^D9 polynomial kernels in scalable SVMs and ridge regression (Pham et al., 13 May 2025). Empirical results show that for fixed φ(x)\varphi(x)0, TensorSketch's accuracy matches Random Maclaurin and exceeds Rademacher-based alternatives, while running φ(x)\varphi(x)1–φ(x)\varphi(x)2 orders of magnitude faster than φ(x)\varphi(x)3 methods.
  • Approximate matrix multiplication, with output-sensitive variance bounds; it matches the best-known error for unbiased AMM provably (Uffenheimer et al., 4 Feb 2026).
  • Efficient Kronecker product regression (φ(x)\varphi(x)4 and, via two-stage schemes, φ(x)\varphi(x)5 and general φ(x)\varphi(x)6 norms), nonnegative regression, and regularized spline regression in input-sparsity time (Diao et al., 2017).
  • Sketching-based CP, Tucker, tensor train (TT), and tensor ring (TR) decompositions, enabling fast ALS updates by compressing large Khatri–Rao or Kronecker chains to lower-dimensional spaces while controlling error (Wang et al., 2015, Ma et al., 2021, Chen et al., 2023, Yu et al., 2022).
  • Spectral LDA and moment-based latent variable models, by efficiently sketching empirical co-occurrence tensors (Wang et al., 2015).

5. Extensions, Optimizations, and Variants

Key developments include:

  • Tree-structured (hierarchical) sketching to reduce exponential dependence on the degree φ(x)\varphi(x)7 in the required sketch size φ(x)\varphi(x)8 for higher-order kernels (Pham et al., 13 May 2025, Ahle et al., 2019).
  • Hybrid constructions combining TensorSketch with fast Johnson–Lindenstrauss transforms or subsampled randomized Hadamard transforms (SRHT), further improving embedding dimension with trade-offs in application time (Ahle et al., 2019).
  • Higher-order CountSketch structures, e.g., symmetric colliding hashes for symmetric tensors in moment computations, significant for topic modeling and higher-way spectral decompositions (Wang et al., 2015).
  • Robustness to input coherence and one-pass streaming implementation, contrasted with leverage-score sampling which requires recomputing scores per iteration and may fail under high coherence (Ma et al., 2021).

6. Empirical Performance and Practical Impact

Empirical studies demonstrate that:

  • In kernel approximation and plug-in random feature maps, TensorSketch yields classification and regression accuracy statistically indistinguishable from the exact polynomial kernel, but dramatically reduces feature generation time—often from hours to minutes (Pham et al., 13 May 2025).
  • For tensor and Kronecker regression problems, TensorSketch enables sublinear algorithms with φ(x)\varphi(x)9-relative-error guarantees, attaining competitive or improved residuals with modest sketch sizes and input-sparsity runtime (Yu et al., 2022, Diao et al., 2017).
  • In large-scale tensor decompositions (CP, Tucker, TT, TR), TensorSketch-based ALS algorithms converge in a small number of sweeps and attain accuracy within a few percent of full ALS, while allowing scaling to tensors with E[φ(x),φ(y)]=x,yp,\mathbb{E}[\langle \varphi(x), \varphi(y) \rangle] = \langle x, y \rangle^p,0 nonzeros or more (Ma et al., 2021, Chen et al., 2023).
  • For real-world data (images, hyperspectral cubes, videos), TensorSketch-based TT-ALS and TR-ALS deliver order-of-magnitude speedups compared to classical ALS, with negligible loss in quality (Chen et al., 2023, Yu et al., 2022).

7. Historical Context and Comparative Analysis

TensorSketch was introduced by Pagh (2013) and further developed by Pham–Pagh, and Avron, Nguyen, Woodruff for subspace embedding applications (Diao et al., 2017, Ahle et al., 2019). It is distinct from naive random projections and random Rademacher features due to its optimal embedding for Kronecker/tensor product structures and convolutional low-memory design.

Compared to Kronecker-SRFT, TensorSketch is especially effective for high-dimensional, sparse, or streaming data, delivering favorable trade-offs between accuracy, time, and memory for a wide array of modern applications in machine learning, numerical linear algebra, and computational statistics (Yu et al., 2022, Ma et al., 2021, Chen et al., 2023).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to TensorSketch.