Causal adaptive time-frequency analysis via Bayesian universal switching and time-domain aliasing
Abstract
The short-time Fourier transform (STFT) is fundamentally limited by the Gabor uncertainty principle, requiring a global compromise between time and frequency resolution. Fixed-window analyses often obscure transient events with long windows or blur spectral features with short windows. This work presents the “Universal Switching Spectrogram,” a probabilistic framework that dynamically adapts the effective analysis window length. The algorithm operates strictly causally, maintaining a distribution of “expert” states where each state represents a different window start time relative to the current sample. To enable the coherent blending of varying window lengths into a unified spectral representation, we utilize a time-domain aliasing (folding) technique that maps arbitrary window lengths onto a fixed-size FFT basis. A composite cost function—minimizing both spectral and temporal entropy while maximizing Gaussian likelihood—updates the state probabilities via a recursive Bayesian mechanism. With a computational complexity of O(KN log N) per sample (where K is the number of active experts and N is the FFT size), the method is computationally efficient and suitable for real-time operation. We demonstrate the algorithm’s efficacy on synthetic test suites and real-world audio, showing that the method yields a higher resolution time–frequency spectrum.