arXiv:2610.37795eess.SPOct 2026

Manuscript Offprint

arXiv:2610.37795

Universal Short-Time Fourier Transform: Data-Adaptive Window-Length Selection for Time-Frequency Analysis

Manan Mittal, Kanad Sarkar, Ryan M. Corey, John R. Buck, Andrew C. Singer

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Manan Mittal*, Kanad Sarkar†, Ryan M. Corey‡, John R. Buck§, and Andrew C. Singer*

*Stony Brook University, †University of Illinois Urbana Champaign, ‡University of Illinois Chicago, §University of Massachusetts Dartmouth

Abstract—The short-time Fourier transform (STFT) characterizes the local frequency content of time-varying signals by evaluating the discrete Fourier transform over a sliding analysis window. The STFT is governed by a fundamental resolution trade-off: a short window localizes rapid transients in time at the cost of frequency resolution, whereas a long window resolves closely spaced harmonics at the expense of temporal resolution. The Universal Short-Time Fourier Transform (U-STFT) resolves this trade-off sequentially by modeling the analysis window duration as a data-adaptive state variable that indexes the number of hops included in the current observation interval. At each frame, a bank of candidate window durations is scored using normalized order-three Rényi entropy to quantify joint time-frequency concentration. A window length trellis aggregates the resulting O(3M)\mathcal{O}(3^M) candidate window schedules with linear complexity per frame, guaranteeing a cumulative mix-loss regret bound of O((k+1)log⁡M)\mathcal{O}((k+1)\log M) relative to any hindsight window schedule with kk resolution changes over MM frames. By linearity of the Fourier transform, posterior expectation across the candidate bank yields a single spectrum equivalent to an STFT evaluated with a data-adaptive effective window, while an envelope-normalized synthesis stream guarantees exact overlap-add reconstruction. Evaluations on synthetic and marine bioacoustic signals demonstrate adaptive resolution tracking, enhanced spectral concentration, and exact time-domain invertibility.

Index Terms—Adaptive time-frequency analysis, short-time Fourier transform, sequential prediction, Rényi entropy, time-frequency resolution, exact reconstruction, regret bounds.

I. INTRODUCTION

The short-time Fourier transform (STFT) maps a one-dimensional discrete-time signal into a two-dimensional representation of time and frequency [1]–[5]. At each analysis frame, the transform multiplies the signal by a finite-duration window in time and evaluates the discrete Fourier transform (DFT) of the windowed segment [2], [6]. Because multiplication in the time domain corresponds to periodic convolution in the frequency domain, the STFT spectrum at each frame is the local signal spectrum convolved with the Fourier transform of the analysis window.

The duality between time and frequency has a fundamental trade-off between temporal and spectral resolution governed by the Gabor–Heisenberg uncertainty principle [4], [5]. A short analysis window restricts temporal integration to a brief interval, isolating impulsive events and rapid frequency modulations. However, a short window possesses a wide spectral

Figure

Fig. 1. The STFT time-frequency resolution trade-off. A short analysis window provides fine temporal localization but coarse frequency resolution due to its wide spectral main lobe. A long analysis window narrows the spectral main lobe for fine frequency resolution at the expense of temporal smearing.

main lobe, smearing energy across adjacent frequency bins and obscuring closely spaced harmonic components. Conversely, a long analysis window spans multiple signal periods, compressing the spectral main lobe to provide fine frequency resolution, but averages time-domain variations over the duration of the window [4], [5]. Physical signals routinely vary on multiple timescales simultaneously. Because the classical STFT applies a single fixed window duration across the entire record, a window chosen to resolve one signal structure necessarily degrades the resolution of the other (Fig. 1).

Existing approaches to mitigating this resolution trade-off follow three main directions. Nonlinear post-processing methods such as reassignment [7], [8] and synchrosqueezing [9] sharpen spectrograms by reallocating spectral energy toward estimated instantaneous frequency trajectories. While effective for isolated ridges, nonlinear energy reallocation alters the linear projection structure of the STFT and com-

The Office of Naval Research supported this work in part under Award N00014-23-1-2133.

plicates signal synthesis when components intersect. Adaptive window-selection procedures instead optimize local concentration metrics across candidate window lengths [10]–[20] or tune window parameters via gradient descent [21]–[23]. However, selecting window durations independently at each frame via greedy optimization is susceptible to noise, as minor signal perturbations can induce spurious frame-to-frame fluctuations in window duration during stationary intervals. Nonstationary Gabor frames establish exact reconstruction over nonuniform time-frequency lattices [24]–[30], but typically require offline structural specification or dual-frame inversions across irregular frequency grids.

Online sequential prediction and Bayesian changepoint detection offer a principled framework for tracking time-varying signal parameters without greedy instability [31]–[40]. However, conventional run-length algorithms restrict state transitions at each step to a binary choice: either increment the run length by one step to accumulate data since the last changepoint, or reset the run length to zero. While suited to piecewise-stationary parameter estimation, a binary grow-or-reset model cannot represent a sliding analysis window of constant finite duration. Maintaining a constant time-frequency trade-off across a stationary interval requires a third operation that holds the window duration fixed while advancing its temporal support.

This paper introduces the Universal Short-Time Fourier Transform (U-STFT), which formulates adaptive time-frequency resolution as a sequential decision problem over a finite bank of candidate window durations. At each frame mm, the algorithm indexes candidate windows by a discrete memory state s∈{0,1,…,smax⁡}s \in \{0,1,\ldots,s_{\max}\} representing the number of hops of length HH retained alongside the current hop, yielding physical window durations Ls=(s+1)HL_{s} = (s+1)H. Rather than committing greedily to a single window length, the U-STFT maintains a posterior probability distribution over all candidate states. Each candidate window is scored using the normalized sum of temporal and spectral order-three Rényi entropies [41]–[48], a dual-domain criterion that penalizes both temporal smearing when LsL_{s} is overly long across a transient and spectral main-lobe broadening when LsL_{s} is overly short during a time-invariant signal component. Theorem 1 proves a strictly positive lower bound on this joint loss via the discrete uncertainty principle [49], [50]. Between consecutive frames, the window state may maintain its current duration (s→s)(s \to s), grow by one hop (s→s+1)(s \to s+1) to narrow the spectral main lobe, or reset to the single-hop baseline (s→0)(s \to 0) to isolate an impulse. Using a symmetric ternary Dirichlet-multinomial prior [51], Theorem 2 proves that the resulting universal mixture achieves a cumulative mix-loss regret of O((k+1)log⁡M)\mathcal{O}((k+1)\log M) relative to any hindsight window schedule with kk resolution changes over MM frames.

Because distinct window schedules that arrive at the same state ss at frame mm apply the exact same causal window to the same signal samples, their probability masses merge recursively on a Markovian trellis [52]. Theorem 3 proves that this recursion computes the Bayesian mixture over all O(3M)\mathcal{O}(3^M) admissible schedules in O(smax⁡)\mathcal{O}(s_{\max}) operations per frame. Taking the posterior expectation over the candidate spectra then yields a single complex time-frequency surface. By linearity of the DFT, Proposition 2 shows that this mixture spectrum equals a standard STFT evaluated with a data-adaptive effective window, while Theorem 4 proves that posterior filtering strictly dominates predictive weighting by eliminating transient lag. Finally, Theorem 5 establishes exact time-domain signal reconstruction via an envelope-normalized overlap-add synthesis stream [53].

References (59)