stat.MLOct 21, 2026

Flow-based Spectral Kernel Learning for Nonstationary Attention

Authors: Zi Yang, Ying Li, Alejandro Lancho, Darío C. Larese, Pablo M. Olmos, Michael Minyi Zhang

Organizations: School of Computing and Data Science, The University of Hong Kong · Department of Statistics and Data Science, National University of Singapore · Department of Signal Theory and Communications, Universidad Carlos III de Madrid

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%40\%--47%47\% compared with most baselines and maintaining favorable linear-attention memory scaling. Code Available: https://github.com/ziyang18/FSKA.

Figures & tables

Appendix figures & tables9 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Sparse Attention as Compact Kernel Regression

    Jan 30, 2026Saul Santos, Nuno Gonçalves, Daniel C. McNamee +2Transformer AttentionSparse Attention

  2. Flexformer: Flexible Linear Transformer with Learnable Attention Kernel

    Jun 26, 2026Haoran Zhang, Feng ZhouFourier Feature EmbeddingsLong-Context Language Modeling

  3. Projection-Free Transformers via Gaussian Kernel Attention

    May 4, 2026Debarshi Kundu, Archisman Ghosh, Swaroop Ghosh +1TransformerSelf-Attention