Random Feature Gaussian Process Attention: Linear-Time Probabilistic Attention with Calibrated Uncertainty

Amir Mohammad Mahfoozi, Zi Yang, Ying Li, Michael Minyi Zhang
10/6/2026
cs.LG

No official code found. Best implementation: teddytennant/rff-gpa (0 stars, last commit 2026-10-07).

Abstract

Transformers provide a state-of-the-art modeling framework, yet poor calibration limits their reliability in safety-critical applications. A promising direction addresses this issue by interpreting attention as a Gaussian process (GP) posterior, which enables principled uncertainty calibration but incurs cubic complexity in sequence length due to the inversion of the kernel; although decoupled GP variants reduced the cost to quadratic, the computation remains prohibitive in practice. In this paper, we propose the plug-and-play random Fourier feature Gaussian process attention (RFF-GPA) module, which represents the attention as a GP with a stationary kernel approximated by random Fourier features. This low-rank approximation results in linear-time complexity for approximating the posterior mean and variance, making it far more scalable compared to previous work. Empirical results on multiple real-world datasets show that our attention module improves calibration while maintaining predictive accuracy, and simultaneously reduces computational complexity to linear in the sequence length.

View on arXivView PDF

Code Implementations(1)

Random feature Gaussian process attention from arXiv 2610.08578.

00Oct 7, 20261 weeks ago

Similar Papers

Cite this paper

@article{mahfoozi2026random,
  title  = {Random Feature Gaussian Process Attention: Linear-Time Probabilistic Attention with Calibrated Uncertainty},
  author = {Amir Mohammad Mahfoozi and Zi Yang and Ying Li and Michael Minyi Zhang},
  year   = {2026},
  eprint = {2610.08578},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.08578v1}
}

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/2610.08578.svg)](https://codeofpaper.com/paper/2610.08578)

Discussion