Flow-based Spectral Kernel Learning for Nonstationary Attention

Zi Yang, Ying Li, Alejandro Lancho, Darío C. Larese, Pablo M. Olmos +1 more
10/21/2026
stat.MLcs.LG
transformer-attention

Official code: ziyang18/FSKA (0 stars, last commit 2026-10-21).

Abstract

Kernelized attention provides a useful perspective for understanding self-attention as a similarity-based aggregation mechanism, but existing approaches often rely on fixed or stationary kernels, limiting their ability to adapt the similarity structure to complex token interactions. In this paper, we propose flow-based spectral kernel attention (FSKA), a framework for learning expressive nonstationary attention kernels. FSKA formulates kernelized attention through spectral density learning and parameterizes the resulting bivariate spectral density with normalizing flows. This design enables flexible and regularizable kernel learning while remaining compatible with scalable linear-attention computation. We further show that expressive kernel learning enables a simplified attention design with removed query--key projections and fixed orthogonal value projections, resulting in a more parameter-efficient architecture. Controlled experiments on classification, ablation, and scalability profiling show that FSKA achieves competitive or improved performance over existing attention mechanisms, while reducing projection-related trainable parameters by approximately $40\%$--$47\%$ compared with most baselines and maintaining favorable linear-attention memory scaling. Code Available: https://github.com/ziyang18/FSKA.

View on arXivView PDF

Code Implementations(1)

ziyang18/FSKAOfficial100%

Code for Flow-based Spectral Kernel Learning for Nonstationary Attention (NeurIPS 2026): MNIST and toy nonstationary regression experiments.

00PythonOct 21, 20263 days ago

Similar Papers

Cite this paper

@article{yang2026flowbased,
  title  = {Flow-based Spectral Kernel Learning for Nonstationary Attention},
  author = {Zi Yang and Ying Li and Alejandro Lancho and Darío C. Larese and Pablo M. Olmos and Michael Minyi Zhang},
  year   = {2026},
  eprint = {2610.30465},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.30465v1}
}

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

Discussion