Chefs' Random Tables: Non-Trigonometric Random Features

Valerii Likhosherstov, Krzysztof Choromanski, Avinava Dubey, Frederick Liu, Tamas Sarlos +1 more
5/30/2022
cs.LGcs.AI
transformer-attention

Official code: tensorflow/models (77,634 stars, Python, last commit 2026-04-29).

Abstract

We introduce chefs' random tables (CRTs), a new class of non-trigonometric random features (RFs) to approximate Gaussian and softmax kernels. CRTs are an alternative to standard random kitchen sink (RKS) methods, which inherently rely on the trigonometric maps.

Show full abstract

We present variants of CRTs where RFs are positive, a key requirement for applications in recent low-rank Transformers. Further variance reduction is possible by leveraging statistics which are simple to compute. One instantiation of CRTs, the optimal positive random features (OPRFs), is to our knowledge the first RF method for unbiased softmax kernel estimation with positive and bounded RFs, resulting in exponentially small tails and much lower variance than its counterparts. As we show, orthogonal random features applied in OPRFs provide additional variance reduction for any dimensionality $d$ (not only asymptotically for sufficiently large $d$, as for RKS). We test CRTs on many tasks ranging from non-parametric classification to training Transformers for text, speech and image data, obtaining new state-of-the-art results for low-rank text Transformers, while providing linear space and time complexity.

View on arXivView PDF

Code Implementations(1)

tensorflow/modelsOfficial100%

Models and examples built with TensorFlow

77,63444,763Python, Jupyter NotebookFeb 5, 20167 months agoNOASSERTION

Similar Papers

Cite this paper

@article{likhosherstov2022chefs,
  title  = {Chefs' Random Tables: Non-Trigonometric Random Features},
  author = {Valerii Likhosherstov and Krzysztof Choromanski and Avinava Dubey and Frederick Liu and Tamas Sarlos and Adrian Weller},
  year   = {2022},
  eprint = {2205.15317},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.15317}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2205.15317.svg)](https://codeofpaper.com/paper/2205.15317)

Discussion