Papers
Topics
Authors
Recent
Search
2000 character limit reached

BlockPerm-SJLT: GPU Sparse Sketching

Updated 9 February 2026
  • The paper introduces BlockPerm-SJLT, demonstrating a tunable trade-off between statistical embedding quality and GPU efficiency for large-scale applications.
  • Methodologically, it leverages block-permutation with sparse SJLT blocks to achieve strong Oblivious Subspace Embedding guarantees and controlled error bounds.
  • Empirically, the FlashSketch CUDA kernel delivers 4×–5× speedups on modern GPUs, optimizing the balance between sketching accuracy and runtime performance.

BlockPerm-SJLT is a family of sparse sketching matrices purposefully designed for efficient implementation on modern GPUs while maintaining strong approximation guarantees in the randomized numerical linear algebra (RandNLA) context. The construction generalizes the sparse Johnson-Lindenstrauss transform (SJLT) by introducing a tunable parameter that dictates the trade-off between statistical quality (mixing and embedding guarantees under the oblivious subspace embedding (OSE) framework) and systems efficiency (GPU locality and memory bandwidth usage). This design enables a high-performance CUDA kernel, FlashSketch, delivering improved speed–accuracy Pareto frontiers for large-scale applications (Dwaraknath et al., 2 Feb 2026).

1. Formal Construction of BlockPerm-SJLT

Given input dimension dd and sketch dimension kk, select an integer MM dividing both, such that d=MBcd = M B_c and k=MBrk = M B_r for block sizes BcB_c and BrB_r. The sketching matrix SRk×dS \in \mathbb R^{k \times d} is partitioned into M×MM \times M blocks, with each block Sg,hRBr×BcS_{g,h} \in \mathbb R^{B_r \times B_c}. The block connectivity follows a parameterized family:

  • Fix kk0, the block-permutation parameter, denoted kk1 in (Dwaraknath et al., 2 Feb 2026).
  • Draw kk2 edge-disjoint permutations kk3 with kk4 for kk5.
  • For output block-row kk6, define a neighborhood kk7.
  • For each block kk8 with kk9, place an independent small SJLT MM0 with exactly MM1 nonzeros per column (MM2 at random row locations).
  • Block entries elsewhere are set to zero, and each nonzero block is further scaled by MM3.
  • Overall, every column of MM4 has exactly MM5 nonzeros of magnitude MM6.

This construction interpolates the space between block-diagonal (for MM7) and fully-mixed (for MM8) architectures.

2. Theoretical Guarantees: Oblivious Subspace Embedding (OSE)

BlockPerm-SJLT satisfies an OSE guarantee governed by block-structure-induced "neighborhood coherence" MM9. For any fixed d=MBcd = M B_c0 with orthonormal columns, define

d=MBcd = M B_c1

where d=MBcd = M B_c2 stacks the row-blocks d=MBcd = M B_c3 for d=MBcd = M B_c4. With d=MBcd = M B_c5, the OSE theorem asserts the existence of absolute constants d=MBcd = M B_c6 such that if

d=MBcd = M B_c7

then with probability at least d=MBcd = M B_c8, the embedding property

d=MBcd = M B_c9

holds for all k=MBrk = M B_r0, i.e., k=MBrk = M B_r1 is an k=MBrk = M B_r2-OSE for the column space of k=MBrk = M B_r3 (Dwaraknath et al., 2 Feb 2026).

3. Impact of Block-Permutation Parameter k=MBrk = M B_r4

The trade-off between sketch quality and GPU locality is governed by k=MBrk = M B_r5:

  • Large k=MBrk = M B_r6: Promotes thorough mixing (lower k=MBrk = M B_r7), making it possible to achieve the OSE for smaller k=MBrk = M B_r8, but results in more global memory accesses as each output block aggregates multiple remote input blocks.
  • Small k=MBrk = M B_r9: Yields a highly local sketch (block-diagonal when BcB_c0), maximizing memory locality but requiring larger BcB_c1 to attain the same embedding quality due to reduced inter-block mixing.

The mathematical derivation leverages the energy identity

BcB_c2

and analyzes tail bounds inherited from the constituent SJLT blocks to relate BcB_c3, BcB_c4, BcB_c5 to distortion and concentration. BcB_c6 determines both the "mixing" among blocks (statistical quality, via BcB_c7) and per-column sparsity (systems cost).

4. Efficient GPU Implementation via FlashSketch

FlashSketch is a CUDA kernel tailored to BlockPerm-SJLT's structural regularity:

  • Tiling: Operates on a 2D grid of thread-blocks indexed by output row-block BcB_c8 and input tile BcB_c9, leveraging shared memory for fast sub-matrix operations.
  • On-the-fly computation: Computes BrB_r0 using lightweight affine-mod-BrB_r1 recurrences and injects sparse updates via fast 32-bit hashing, avoiding the storage of an explicit BrB_r2.
  • Atomic elimination: All atomic add operations are confined to shared memory within thread-blocks, avoiding expensive global atomics; final global writes are coalesced.
  • Bandwidth and arithmetic complexity: Each input element is read BrB_r3 times; the memory traffic scales as BrB_r4, arithmetic as BrB_r5 per element, and overall wall-time is governed by GPU occupancy and shared-memory bandwidth.
  • Parameter tuning: BrB_r6, BrB_r7, and GPU tile sizes are tuned to optimize system throughput and accuracy (Dwaraknath et al., 2 Feb 2026).

5. Empirical Behavior and Pareto-Optimality

BlockPerm-SJLT, via FlashSketch, demonstrates superior empirical performance on NVIDIA RTX 4090 and A6000 GPUs for key linear algebra and ML workloads:

  • Benchmarks: Gram-matrix approximation, OSE spectral error, sketch-and-ridge regression, sketch-and-solve least squares, and GraSS ML data-attribution pipeline.
  • Observations:
    • Adjusting BrB_r8 traces a continuous Pareto frontier between sketching accuracy and runtime.
    • At moderate error targets, FlashSketch achieves BrB_r9–SRk×dS \in \mathbb R^{k \times d}0 speedup over previous GPU SJLT kernels and a global geometric-mean speedup of SRk×dS \in \mathbb R^{k \times d}1.
    • For SRk×dS \in \mathbb R^{k \times d}2, FlashSketch matches or outperforms dense Gaussian projections (cuBLAS) and FHT-based SRHT in speed and, at times, accuracy.
    • In GraSS pipelines, projection time per example is reduced by up to SRk×dS \in \mathbb R^{k \times d}3 with unchanged downstream LDS metrics (Dwaraknath et al., 2 Feb 2026).

6. Comparative Summary and Scope of BlockPerm-SJLT

BlockPerm-SJLT unifies the design space for GPU-friendly sparse sketches with a single, interpretable parameter SRk×dS \in \mathbb R^{k \times d}4 that interpolates between full locality and complete mixing. This enables both theoretical OSE guarantees parameterized by SRk×dS \in \mathbb R^{k \times d}5 and high-efficiency systems implementation. FlashSketch kernel design capitalizes on this regularity for conflict-free parallelism, pushing the speed–accuracy boundary across key RandNLA tasks and scalable ML pipelines, as measured on state-of-the-art GPU hardware.

Parameter Effect on System Effect on Statistics
Small SRk×dS \in \mathbb R^{k \times d}6 High locality, fast Poor mixing, more distortion
Large SRk×dS \in \mathbb R^{k \times d}7 Higher bandwidth use Excellent mixing, lower distortion

The BlockPerm-SJLT framework provides a rigorous, tunable approach to large-scale sketching for contemporary GPU architectures while maintaining the theoretical embedding properties central to randomized linear algebra (Dwaraknath et al., 2 Feb 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

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 BlockPerm-SJLT.