Beyond Sinusoids: A Morlet Wavelet Framework for Transformer Positional Encoding
Standard positional encodings for transformers - sinusoidal and rotary (RoPE) - treat every position as equally local: they encode where a token is, but not how far its positional influence should extend. We propose that the Morlet wavelet, which simultaneously minimises uncertainty in position and frequency, is the natural basis for positional encoding, and introduce Morlet Positional Encoding (MoPE): each embedding dimension learns its own frequency and locality bandwidth from data. The main theoretical result is a unification: sinusoidal PE and the RoPE correlation kernel both emerge as limiting cases of MoPE when locality is switched off (sigma_i -> infinity). The phase of MoPE recovers the RoPE rotation angle exactly; the amplitude adds a learned Gaussian locality kernel that standard encodings lack. Empirically, MoPE combined with Energy-Gated Attention achieves +0.119 improvement over standard attention on TinyShakespeare, outperforming either component alone. Analysis of the learned parameters reveals that all 128 frequency-bandwidth pairs converge to the wavelet admissibility boundary - an empirical observation consistent with a companion result on energy gating, suggesting a reproducible property of character-level language signals that warrants further investigation.
Code (0)
등록된 구현이 없습니다.
Similar Papers 제목 키워드 기반
Energy-Gated Attention and Wavelet Positional Encoding: Complementary Inductive Biases for Transformer Attention
Standard transformer attention computes pairwise token similarity but treats all tokens as equally salient and all positions as equally local, regardless of the informational structure of the input. We identify two compl…
Parallel and Streaming Wavelet Neural Networks for Classification and Regression under Apache Spark
Wavelet neural networks (WNN) have been applied in many fields to solve regression as well as classification problems. After the advent of big data, as data gets generated at a brisk pace, it is imperative to analyze it …
regressionThe Scattering Transform Network with Generalized Morse Wavelets and Its Application to Music Genre Classification
We propose to use the Generalized Morse Wavelets (GMWs) instead of commonly-used Morlet (or Gabor) wavelets in the Scattering Transform Network (STN), which we call the GMW-STN, for signal classification problems. The GM…
Genre classificationMusic Genre ClassificationA Novel Retinal Vessel Segmentation Based On Histogram Transformation Using 2-D Morlet Wavelet and Supervised Classification
The appearance and structure of blood vessels in retinal images have an important role in diagnosis of diseases. This paper proposes a method for automatic retinal vessel segmentation. In this work, a novel preprocessing…
General ClassificationRetinal Vessel SegmentationSegmentationDemodulation of vibration signals generated by defects in rolling element bearings using complex shifted morlet wavelets
Vibration signals resulting from rolling element bearing defects, present a rich content of physical information, the appropriate analysis of which can lead to the clear identification of the nature of the fault. The e…