SpectralBERT: Accelerating Context Windows via Spectral Attention Dynamics

The quadratic time and memory complexity of standard self-attention mechanisms (O(N2)) imposes fundamental computationallimits on scaling Transformer context windows. In this work, we introduce SpectralBERT, an efficient bidirectionalarchitecture that replaces standard pairwise token attention with a fixed-size spectral memory mechanism. By projectingsequence embeddings into the frequency domain via Real Fast Fourier Transform (RFFT), adaptively pooling frequencycoefficients into compact slot representations, and retrieving context via memory-guided attention, SpectralBERT achieves O(Nlog N) time complexity with constant sequence memory overhead (O(1)) during feature mixing. Empirical evaluations onWikiText-2 demonstrate a final Masked Language Modeling (MLM) loss of 5.6420, outperforming a comparably sized BERT-Mini baseline (loss 6.5773) by 14.3% while training 1.13x faster. Pre-training on WikiText-103 at an 8,192-token contextlength yields a loss of 5.2525 (Perplexity = 191.05). Forward execution scaling benchmarks confirm a 14.51x throughputspeedup at a 65,536-token sequence length on a single NVIDIA Tesla T4 GPU. These findings demonstrate that frequency-domain memory structures offer a scalable and mathematically sound alternative to quadratic self-attention for long-contextlanguage modeling.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-09-09
DOI
https://doi.org/10.5281/zenodo.22676532
Primary Topic
Parallel Computing and Optimization Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

SpectralBERT: Accelerating Context Windows via Spectral Attention Dynamics

Jalal Alnablsi
Zenodo (CERN European Organization for Nuclear Research)
Parallel Computing and Optimization Techniques
article

SpectralBERT: Accelerating Context Windows via Spectral Attention Dynamics

Jalal Alnablsi
article en

Abstract

The quadratic time and memory complexity of standard self-attention mechanisms (O(N2)) imposes fundamental computationallimits on scaling Transformer context windows. In this work, we introduce SpectralBERT, an efficient bidirectionalarchitecture that replaces standard pairwise token attention with a fixed-size spectral memory mechanism. By projectingsequence embeddings into the frequency domain via Real Fast Fourier Transform (RFFT), adaptively pooling frequencycoefficients into compact slot representations, and retrieving context via memory-guided attention, SpectralBERT achieves O(Nlog N) time complexity with constant sequence memory overhead (O(1)) during feature mixing. Empirical evaluations onWikiText-2 demonstrate a final Masked Language Modeling (MLM) loss of 5.6420, outperforming a comparably sized BERT-Mini baseline (loss 6.5773) by 14.3% while training 1.13x faster. Pre-training on WikiText-103 at an 8,192-token contextlength yields a loss of 5.2525 (Perplexity = 191.05). Forward execution scaling benchmarks confirm a 14.51x throughputspeedup at a 65,536-token sequence length on a single NVIDIA Tesla T4 GPU. These findings demonstrate that frequency-domain memory structures offer a scalable and mathematically sound alternative to quadratic self-attention for long-contextlanguage modeling.

Zenodo (CERN European Organization for Nuclear Research)
Openalex Percentile: Top 5%
Parallel Computing and Optimization Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.