Manuscript Offprint
arXiv:2610.37795Universal Short-Time Fourier Transform: Data-Adaptive Window-Length Selection for Time-Frequency Analysis
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 candidate window schedules with linear complexity per frame, guaranteeing a cumulative mix-loss regret bound of relative to any hindsight window schedule with resolution changes over 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

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 , the algorithm indexes candidate windows by a discrete memory state representing the number of hops of length retained alongside the current hop, yielding physical window durations . 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 is overly long across a transient and spectral main-lobe broadening when 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 , grow by one hop to narrow the spectral main lobe, or reset to the single-hop baseline 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 relative to any hindsight window schedule with resolution changes over frames.
Because distinct window schedules that arrive at the same state at frame 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 admissible schedules in 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].
A. Causal Frame Geometry and Resolution States
Consider a real-valued discrete-time signal sampled at rate . The analysis advances in increments of samples per hop, so that frame terminates at sample index
For a uniform DFT size , the causal observation buffer at frame m collects the N samples immediately preceding :
(2)
with zero-padding applied for indices n < 0.
To span a range of time-frequency trade-offs within this buffer, we define a bank of discrete memory states , where . The state specifies the number of historical hops included alongside the current hop, corresponding to a physical window support of
samples. State analyzes only the samples of the newest hop (), providing maximum temporal localization and the widest spectral main lobe (). Increasing extends the window further into the past to incorporate additional hops, progressively narrowing the spectral main lobe () at the cost of averaging over a longer temporal interval.
Each state employs a real nonnegative taper supported on the rightmost samples of the observation buffer:
with for . In our implementation, each active support uses a Gaussian taper truncated at three standard deviations and normalized to unit sum:
Aligning every candidate taper to the terminal boundary ensures causal operation and guarantees that all candidates evaluate the signal on a common time reference and uniform N-bin frequency grid, permitting direct linear combination of their complex DFT coefficients without phase-shifting corrections.
Multiplying the observation buffer elementwise (⊙) by the s-th candidate taper yields the windowed frame
Applying the unitary N-point DFT , with entries
produces the s-th candidate spectrum at frame m:
B. Admissible Window Schedules and the Hindsight Oracle
As the signal evolves across frames , selecting a window duration at each frame defines a state trajectory, or window schedule,
Because physical observation memory can expand by at most one hop per frame, a causal schedule transitions between consecutive frames through one of three operations. It may maintain the current state , sliding the window forward by samples at constant duration to preserve the active time-frequency resolution trade-off. It may grow by one hop , retaining the existing window start time while appending the new hop to lengthen the window to and sharpen frequency resolution. Finally, it may reset to the baseline state , discarding historical hops and collapsing the window to to isolate an abrupt transient.
Let denote the set of all admissible schedules of length obeying these transitions, and let denote the subset of schedules containing at most non-maintain transitions, which partition the record into constant-resolution segments. We evaluate the sequential performance of the U-STFT against a hindsight oracle that observes the entire signal record and selects the optimal schedule .
III. QUANTIFYING TIME-FREQUENCY RESOLUTION VIA RÉNYI ENTROPY
A. Dual-Domain Energy Distributions
To determine which candidate window best matches the local signal structure at frame m, we measure how tightly each candidate concentrates signal energy in both time and frequency [42], [43]. For a non-zero windowed frame with total energy
the normalized temporal energy distribution over its active support of length is the probability mass function (PMF)
Similarly, let denote the set of retained frequency bins (such as the unique non-redundant bins of a real signal) with cardinality and positive quadrature weights . The normalized spectral energy distribution across forms the PMF
B. Normalized Order-Three Rényi Entropy and the Uncertainty Floor
Whereas second-order variance metrics penalize energy based on distance from a single mean—incorrectly penalizing multi-component signals with well-resolved, widely separated harmonics—Rényi entropy measures concentration directly from the peakedness of the distribution [41], [44]–[48]. For a PMF , the order- Rényi entropy is . Setting yields the order-three Rényi entropy:
Cubing the probability masses strongly favors sharp spectral peaks and localized impulses while suppressing diffuse background noise.
To evaluate the joint time-frequency trade-off across windows of varying physical support , we normalize the temporal and spectral Rényi entropies by their respective uniform-distribution maxima ( and ):
Each term in (14) lies in [0,1]. The physical intuition behind reflects the STFT resolution trade-off directly: if is too short for a stationary harmonic tone, convolution with the wide window main lobe disperses energy across frequency bins, inflating . Conversely, if is too long across an impulse or rapid chirp, the extended window incorporates background noise or nonstationary frequency sweeps, inflating or smearing the spectrum. Minimizing selects the window length that best balances temporal and spectral localization.
Because no nonzero discrete signal can be simultaneously concentrated at a single time sample and a single frequency bin [49], [50], the resolution loss is bounded strictly away from zero.
Theorem 1 (Positive Discrete STFT Entropy Floor): Consider a fixed DFT size , a candidate support bank with , and either the full -bin DFT on complex frames or the unique-bin DFT on real frames, with positive weights for all (). There exists a constant such that every non-zero windowed frame satisfies
The proof is given in Appendix A. To ensure a consistent dynamic range across frames with varying signal-to-noise ratios, the raw resolution losses at frame are standardized across the active candidate set :
(16)
where prevents division by zero when candidate scores coincide. Standardized loss assigns to the most concentrated candidate at frame m and measures suboptimal windows in units of across-candidate standard deviation.
IV. SEQUENTIAL WINDOW TRACKING AND UNIVERSAL REGRET
A. Exponential Loss-to-Likelihood Mapping
Rather than selecting greedily at each frame, the U-STFT embeds the candidate bank within the competitive online prediction framework [34]–[38]. For any admissible window schedule , the cumulative standardized resolution loss over frames is
Given an inverse temperature parameter , each schedule is assigned the exponential performance weight, or competitive likelihood,
The hindsight oracle schedule maximizes this weight across all schedules with at most k resolution changes:
(19)
B. Universal Mixture Over Window Schedules
Because the optimal schedule is unknown causally, the universal algorithm assigns a prior probability to every admissible trajectory and forms the prior-weighted mixture
(20)
Defining the cumulative mix-loss of the universal mixture as and bounding the sum in (20) below by its single term at yields the fundamental mixture domination inequality:
Equation (21) shows that the excess cumulative loss, or regret, of the universal mixture relative to any hindsight schedule is bounded above by the negative log-prior code length required to specify .
C. Ternary Dirichlet-Multinomial Prior and Regret Bounds
To assign prior probabilities that penalize erratic window switching while permitting rapid adaptation when signal statistics change, we model the sequence of ternary transition actions using a symmetric Dirichlet-multinomial mixture with parameter over the probability simplex [51]. For a trajectory accumulating
r resets, g growths, and u maintains, the marginal Dirichlet integral is
which induces the ternary Krichevsky–Trofimov (KT) sequential transition rules with add-1/3 smoothing:
Integrating over the simplex assigns an action sequence of length with action counts the closed-form prior mass
where is the initial state prior at frame m = 1.
Proposition 1 (Schedule Code Length): Let denote the minimum initial prior mass. For any admissible window schedule containing non-maintain transitions over frames, the negative log-prior satisfies
Proof: By the minimax redundancy bound for the Krichevsky–Trofimov mixture over a ternary action alphabet with switching points partitioning steps into segments [35], [39], [40], [51], the negative log-probability is bounded by . Substituting yields the prefactor in (27).
Combining Proposition 1 with the mixture domination bound (21) establishes the universal regret guarantee of the U-STFT.
Theorem 2 (U-STFT Mix-Loss Regret): For any observation sequence and any hindsight window schedule with non-maintain transitions, the cumulative mix-loss regret of the U-STFT satisfies
(28)
Proof: Substituting the code-length upper bound (27) for directly into the mixture domination inequality (21) establishes (28).
When compared against any classical fixed-window STFT, which corresponds to a static schedule that maintains a single state across all M frames, Theorem 2 specializes to a vanishing per-frame regret.
Corollary 1 (Asymptotic Optimality Relative to Fixed-Window STFTs): For any fixed window state initialized with , the cumulative excess loss satisfies
so that the time-averaged excess resolution loss vanishes as :
V. MARKOVIAN TRELLIS, EFFECTIVE WINDOW, AND EXACT SYNTHESIS
A. Exact State Aggregation on the Memory Trellis
Direct summation over all schedules in (20) is computationally intractable. However, the causal geometry of the candidate bank induces a critical Markovian reduction: any two schedules that arrive at the same memory state at frame apply the exact same physical window to the observation buffer , producing identical candidate spectra and identical losses .
Because state represents cumulative growth steps since the most recent reset, conditioning the ternary KT transitions (23)–(25) on the current run depth (, ) yields state-dependent Markovian transition probabilities:
(maintain),
(31)
(grow),
(32)
(reset).
(33)
At the maximum buffer capacity , further window growth is inadmissible, and the transition distribution reduces to a binary KT update between maintaining and resetting to s = 0:
(34)
Notice the physical behavior encoded by (31)–(33): at short window lengths (small ), the probabilities of maintaining, growing, and resetting are comparable, allowing agile adaptation during transients. As a harmonic component persists and the window grows (large ), approaches unity, promoting progressive spectral sharpening until a transient incurs a high temporal entropy penalty and triggers a reset to (Fig. 2). For applications requiring large with minimal computation, the trellis can also be restricted to a sparse dyadic lattice
reducing complexity from to candidate DFTs per frame by matching expected transition dwell times across octave steps.

Fig. 2. Causal window-length trellis. State corresponds to a window duration . All trajectories arriving at state at frame share the same physical window and candidate spectrum , collapsing schedules into recursive state updates per frame.
Let denote the predictive prior probability of state before observing frame , initialized uniformly as . Upon observing and evaluating the standardized concentration losses , each state receives the local likelihood
The marginal frame evidence is the prior-weighted expectation
and Bayes' rule yields the filtered posterior distribution over window durations at frame m:
Propagating through the Markovian transition kernel forms the predictive prior for frame :
(40)
Theorem 3 (Exact State Aggregation): The forward trellis recursion (36)–(40) computes the exact universal mixture probability over all admissible schedules in operations per frame:
Proof: We proceed by induction on . For , , matching the right-hand side of (41). Suppose the product up to equals the sum over all prefix trajectories , and that equals the sum of prior-weighted likelihoods of all prefixes extending to state at frame . Multiplying by in (37)–(38) incorporates the frame- loss, and applying the transition updates (39)–(40) distributes the mass across all valid extensions via the Markovian kernel [52]. Summing over at frame completes the induction.
B. Effective Analysis Window, Stationary Phase, and Posterior Dominance
Rather than selecting a single candidate spectrum, the U-STFT forms its composite complex spectrum by taking the posterior expectation over the candidate bank:
Defining the posterior-weighted effective analysis window
linearity of the DFT guarantees that spectral mixture averaging is equivalent to time-domain adaptive windowing.
Proposition 2 (Effective-Window Identity): The posterior-weighted composite spectrum (42) is identical to a standard DFT evaluated with the data-adaptive effective window :
Proof: Substituting into (42) and invoking the linearity of yields
(45)
Proposition 2 reveals why coherent spectral averaging sharpens time-frequency ridges without introducing nonlinear cross-terms. By the principle of stationary phase [54], for an oscillatory component , the continuous counterpart of the candidate transform is
(46)
where . Along an instantaneous frequency ridge where , the phase is stationary and aligned across all nonnegative candidate windows , so their complex weighted sum (42) interferes constructively. Away from the ridge, rapid phase rotation induces destructive cancellation across differing window supports.
Furthermore, because causal time-frequency analysis forms the spectrum of frame after observing the current hop , the U-STFT synthesizes using the filtered posterior rather than the predictive prior . Conditioning on eliminates one-step switching delay at transient boundaries and strictly improves upon the predictive mix-loss.
Theorem 4 (Posterior Mix-Loss Dominance): Let denote the predictive mix-loss at frame , and let denote the posterior-expected loss. For any observation sequence and ,
where is the Kullback–Leibler divergence from the predictive prior to the filtered posterior. Summing over and applying Theorem 2 yields
(48)
and whenever , the realized composite spectrum satisfies .
Proof: From the Bayes update (38), . Taking logarithms and rearranging yields . Taking the expectation under gives
(49)
Dividing by proves (47), and implies . Summing over yields (48).
C. Companion Synthesis Stream and Exact Invertibility
In a conventional fixed-window STFT, unweighted overlap-add synthesis reconstructs up to a constant scale factor whenever the shifted windows satisfy the constant-overlap-add (COLA) condition [2], [3]. Because the effective window of the U-STFT adapts at each frame in response to the signal's time-frequency structure, the sum of overlapping windows varies with time n.
To guarantee exact invertibility without iterative synthesis approximations [53], the U-STFT maintains an envelope-normalized companion synthesis stream. Let denote the effective window placed at its global time alignment ending at . The cumulative sample envelope is
Because every candidate window is strictly positive over the most recent hop of length and , is strictly positive across the entire analyzed signal record. Pre-normalizing the input signal by this causal sample envelope yields
(51) evaluated whenever . Extracting the frame buffer of at frame and applying the effective window produces the companion synthesis spectrum:
Theorem 5 (Exact Identity Reconstruction): Assuming exact arithmetic and across the analysis interval, applying the inverse unitary DFT to the unmodified companion coefficients followed by unweighted overlap-add synthesis reconstructs identically.
Proof: Applying to (52) recovers the windowed pre-normalized frame
Summing the aligned frames via unweighted overlap-add yields
(54)
VI. EXPERIMENTAL EVALUATION
We evaluate the capacity of the U-STFT to navigate the time-frequency resolution trade-off across four progressive regimes: a continuous hyperbolic chirp whose instantaneous frequency rate varies smoothly from rapid to quasi-stationary, a noisy composite signal combining frequency sweeps, closely spaced harmonic tones, and abrupt impulses, recorded English speech, and underwater field recordings of marine bioacoustic signals.
Performance is assessed across local resolution, global concentration, and synthesis fidelity. Local resolution is measured by the peak-to-valley decibel separation between closely spaced tones and the equivalent temporal envelope width of impulses. Global spectrogram concentration is quantified via the two-dimensional order-three Rényi entropy
where lower values indicate tighter energy concentration across the time-frequency plane. Synthesis fidelity is measured by the normalized reconstruction error computed from the unmodified companion stream . Across all trials, we compare the U-STFT against fixed-window STFT baselines at states ( ), greedy framewise selection ( ), and the hindsight oracle bound.
A. Hyperbolic Chirp: Continuous Resolution Adaptation
Consider an 8-kHz sampled hyperbolic chirp whose instantaneous frequency decelerates over 15 s according to

(c) U-STFT
(d) Onset

(e) Fixed 16H
(f) Onset

Fig. 3. Spectrogram comparison for the hyperbolic chirp on a shared decibel scale. The shortest fixed window ( ) resolves the rapid onset but broadens the quasi-stationary tail; the longest fixed window ( ) sharpens the tail but smears the rapid onset. The U-STFT adapts its effective window duration continuously to maintain ridge concentration throughout. The right column enlarges the first 1.5 s.
sweeping from 4.0 kHz down to 0.906 kHz. During the initial rapid sweep (t < 3 s), a long window spans a wide frequency excursion, smearing energy across time and frequency; tracking the onset requires a short window with fine temporal resolution. Conversely, as the chirp flattens into a slowly varying tone (t > 8 s), a short window suffers from a wide spectral main lobe, whereas a long window narrows the ridge.
Figure 3 demonstrates this resolution trade-off directly. The short fixed window ( ) tracks the steep initial descent cleanly but produces a wide ridge along the tail, whereas the long fixed window ( ) achieves a razor-sharp tail at the expense of severe temporal smearing during the onset. The U-STFT transitions smoothly from short to long effective windows as the chirp rate decelerates, preserving a concentrated ridge across the entire record.
Figure 4 illustrates the underlying sequential inference. As the sweep rate diminishes, the minimum of the joint entropy loss migrates progressively from small s toward . Guided by the grow transition prior, the posterior mass tracks this migration smoothly without frame-to-frame oscillations. The empirical per-frame regret stabilizes at 0.526 nats/frame—well below the theoretical path-code upper bound of 0.760 nats/frame—and the U-STFT ends with a

(d) Cumulative excess loss
(e) Mix-loss regret per frame

(f) 2-D regret
Fig. 4. Diagnostic trajectories for the hyperbolic chirp: (a) local Rényi resolution losses with the framewise minimum, (b) posterior window distribution with the U-STFT and hindsight schedules, (c) global 2-D Rényi entropy , (d) cumulative excess loss over the framewise minimum, (e) per-frame mix-loss regret relative to the theoretical bound, and (f) 2-D Rényi regret relative to the per-prefix optimal window schedule. Grey curves show the fixed-window bank.
lower global Rényi entropy than the best fixed window, greedy framewise selection, and the hindsight schedule.
B. Simultaneous Tone Separation and Transient Localization
To test how the ternary transition model handles conflicting resolution demands within a single noisy signal, we construct a synthetic waveform embedded in 0 dB SNR white Gaussian noise containing a rapid linear frequency sweep, two closely spaced stationary sinusoids at 500 Hz and 532 Hz, and two broadband impulses at s and s.
Figure 5 highlights the distinct physical roles of the three trellis transitions. Upon entering the two-tone regime, the trellis executes sequential grow transitions, narrowing the spectral main lobe until the 32-Hz separation between the 500 Hz and 532 Hz components is cleanly resolved, and then maintains that window length. At the exact onset of each impulse ( s and s), the surge in temporal entropy triggers an immediate reset transition to ( ), isolating the impulse in time before re-growing the window to resume harmonic tracking. Across six independent noise realizations at 0 dB SNR, the U-STFT matches the tonal peak-to-valley separation of the longest fixed window ( ) while matching the sharp impulse width of the shortest fixed window ( ). By contrast, greedy framewise selection switches window lengths nearly five times as frequently, introducing severe vertical striping artifacts across the spectrogram.
C. English Speech: Voiced Harmonics and Stop Bursts
Speech alternates between quasi-stationary voiced segments, whose closely spaced pitch harmonics demand fine spectral resolution, and stop releases and fricative onsets that last only a few milliseconds. We analyze a five-second excerpt of read English speech from speaker p227 of the VCTK corpus [55], resampled to 16 kHz, with hop samples (2 ms), so the candidate windows span (2 ms) to (32 ms).
Figure 6 exposes the same trade-off within a single utterance. The short fixed window ( ) localizes every burst but merges the voiced harmonics into broad vertical bands, whereas the long fixed window ( ) resolves the individual harmonics and formant trajectories at the expense of spreading each burst over 32 ms. The U-STFT holds on 93% of frames and executes reset transitions at broadband onsets such as stop releases, recovering the sharp burst edges of the short window while retaining the harmonic structure of the long window (Fig. 6(d)). Because voiced segments carry most of the signal energy, the U-STFT ends with a global Rényi entropy of 12.27 bits, within 0.11 bits of the longest fixed window and below greedy framewise selection

Fig. 5. Controlled tone and transient experiment at 0 dB SNR. The U-STFT grows its window duration to resolve the 500 Hz and 532 Hz tones, maintains that duration across the stationary interval, and executes immediate reset transitions ( ) at t = 2 s and t = 3 s to localize the broadband impulses.
(12.51 bits), which switches window lengths more than four times as frequently.
D. Marine Bioacoustic Field Recordings
Finally, we evaluate the U-STFT on five-second underwater acoustic recordings of humpback whale vocalizations (Megaptera novaeangliae) [56], [57] and snapping shrimp cavitation pulses (Alpheus heterochaelis) [58]–[60]. These recordings combine prolonged harmonic calls, rapid frequency inflections, and sub-millisecond broadband impulses in ambient ocean noise.
In the humpback whale recording (Fig. 7, left), the U-STFT expands its effective window during sustained harmonic song units to resolve the overtone series, then contracts the window during rapid frequency modulations to prevent cross-frame smearing. In the snapping shrimp recording (Fig. 7, right), asynchronous cavitation snaps demand fine temporal resolution; the U-STFT repeatedly resets to at pulse onsets, avoiding the temporal smearing exhibited by long fixed windows and the erratic background artifacts of greedy selection. Across all synthetic, speech, and field trials, companion-stream synthesis reconstructs the time-domain waveforms with

Fig. 6. Spectrogram comparison for five seconds of English speech (VCTK speaker p227) on a shared decibel scale: (a) the shortest fixed window ( ), (c) the U-STFT, and (e) the longest fixed window ( ); (b), (d), and (f) enlarge two stop bursts and the following vowel onset between 0.3 and 0.5 s. (g) Posterior window distribution with the dominant U-STFT window. The U-STFT holds the long window through voiced speech and resets to short windows at broadband onsets.
normalized error , confirming exact invertibility to double-precision machine epsilon.
VII. CONCLUSION
The classical STFT imposes a compromise between temporal localization and spectral main-lobe resolution. The Universal Short-Time Fourier Transform (U-STFT) uses a sequential, data-adaptive mixture over a causal bank of candidate window durations. By scoring candidate windows with normalized order-three Rényi entropy and propagating state weights across a ternary (maintain, grow, reset) Markovian trellis, the U-STFT tracks evolving signal timescales in operations per frame while guaranteeing a universal mix-loss regret bound of relative to any hindsight schedule with k resolution changes. Linearity of the Fourier transform ensures that the posterior mixture of candidate spectra corresponds to a single STFT computed with a data-adaptive effective window, and envelope-normalized overlap-add synthesis preserves ex-

Fig. 7. Spectrogram comparison on measured marine bioacoustic recordings: humpback whale vocalizations (left) and snapping shrimp cavitation impulses (right) analyzed via the U-STFT, greedy framewise selection, and fixed-window STFT baselines.
act time-domain reconstruction. The U-STFT approaches the performance of hindsight optimal window length schedules.
APPENDIX A PROOF OF THEOREM 1
Fix a candidate support with , and let for the full complex DFT or for the unique-bin real DFT. Let denote the linear operator that zero-pads a length- vector on the left to align with the rightmost coordinates of , and let project onto the retained frequency bins . Define the composite analysis operator
Because is invertible, has full column rank, and retains all non-redundant DFT bins under conjugate symmetry for (or all bins for ), is injective: for every .
By scale invariance of and , it suffices to restrict z to the compact unit sphere
For , define the temporal and spectral PMFs
Because is injective on and , the denominator of is strictly positive and continuous on . Consequently, the normalized joint resolution objective
is continuous on the compact set and attains its global minimum by the Extreme Value Theorem.
To prove that this minimum is strictly positive, note that for any PMF , , with equality if and only if is a Kronecker delta (point mass):
Suppose for contradiction that for some . Nonnegativity of implies and , so both and must be point masses. For to be a point mass, must be concentrated at a single sample index :
(with when ). However, the DFT of a single impulse has flat magnitude across all frequency bins:
which yields the strictly positive spectral PMF
Because , has at least two strictly positive coordinates and cannot be a point mass, contradicting (62). Thus,
Taking the minimum over the finite candidate bank yields
completing the proof.
REFERENCES
[1] D. Gabor, “Theory of communication. part 1: The analysis of information,” Journal of the Institution of Electrical Engineers - Part III: Radio and Communication Engineering, vol. 93, no. 26, pp. 429–441, 1946.
[2] J. B. Allen and L. R. Rabiner, “A unified approach to short-time Fourier analysis and synthesis,” Proceedings of the IEEE, vol. 65, no. 11, pp. 1558–1564, 1977.
[3] M. R. Portnoff, “Time-frequency representation of digital signals and systems based on short-time Fourier analysis,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 28, no. 1, pp. 55–69, 1980.
[4] L. Cohen, Time-Frequency Analysis. Englewood Cliffs, NJ: Prentice Hall, 1995.
[5] K. Gröchenig, Foundations of Time-Frequency Analysis. Boston, MA: Birkhäuser, 2001.
[6] S. Mallat, A Wavelet Tour of Signal Processing: The Sparse Way, 3rd ed. Academic Press, 2008.
[7] F. Auger and P. Flandrin, "Improving the readability of time-frequency and time-scale representations by the reassignment method," IEEE Transactions on Signal Processing, vol. 43, no. 5, pp. 1068–1089, 1995.
[8] E. Chassande-Mottin, F. Auger, and P. Flandrin, "Time-frequency/time-scale reassignment," in Wavelets and Signal Processing, ser. Applied and Numerical Harmonic Analysis, L. Debnath, Ed. Boston, MA: Birkhäuser, 2003, pp. 233–267.
[9] I. Daubechies, J. Lu, and H.-T. Wu, “Synchrosqueezed wavelet transforms: An empirical mode decomposition-like tool,” Applied and Computational Harmonic Analysis, vol. 30, no. 2, pp. 243–261, 2011.
[10] D. L. Jones and T. W. Parks, “A high-resolution data-adaptive time-frequency representation,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 38, no. 12, pp. 2127–2135, 1990.
[11] —, “A resolution comparison of several time-frequency representations,” IEEE Transactions on Signal Processing, vol. 40, no. 2, pp. 413–420, 1992.
[12] R. G. Baraniuk and D. L. Jones, “A signal-dependent time-frequency representation: Optimal kernel design,” IEEE Transactions on Signal Processing, vol. 41, no. 4, pp. 1589–1602, 1993.
[13] D. L. Jones and R. G. Baraniuk, “A simple scheme for adapting time-frequency representations,” IEEE Transactions on Signal Processing, vol. 42, no. 12, pp. 3530–3535, 1994.
[14] —, “An adaptive optimal-kernel time-frequency representation,” IEEE Transactions on Signal Processing, vol. 43, no. 10, pp. 2361–2371, 1995.
[15] R. N. Czerwinski and D. L. Jones, “Adaptive short-time Fourier analysis,” IEEE Signal Processing Letters, vol. 4, no. 2, pp. 42–45, 1997.
[16] V. Katkovnik and L. Stanković, “Instantaneous frequency estimation using the Wigner distribution with varying and data-driven window length,” IEEE Transactions on Signal Processing, vol. 46, no. 9, pp. 2315–2325, 1998.
[17] H. K. Kwok and D. L. Jones, “Improved instantaneous frequency estimation using an adaptive short-time Fourier transform,” IEEE Transactions on Signal Processing, vol. 48, no. 10, pp. 2964–2972, 2000.
[18] J. Zhong and Y. Huang, “Time-frequency representation based on an adaptive short-time Fourier transform,” IEEE Transactions on Signal Processing, vol. 58, no. 10, pp. 5118–5128, 2010.
[19] S.-C. Pei and S.-G. Huang, “STFT with adaptive window width based on the chirp rate,” IEEE Transactions on Signal Processing, vol. 60, no. 8, pp. 4065–4080, 2012.
[20] S. Mann and S. Haykin, “The chirplet transform: Physical considerations,” IEEE Transactions on Signal Processing, vol. 43, no. 11, pp. 2745–2761, 1995.
[21] A. Zhao, K. Subramani, and P. Smaragidis, “Optimizing short-time Fourier transform parameters via gradient descent,” in Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2021, pp. 736–740.
[22] M. Leiber, Y. Marnissi, A. Barrau, and M. El Badaoui, “Differentiable adaptive short-time Fourier transform with respect to the window length,” in Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2023, pp. 1–5.
[23] M. Leiber, Y. Marnissi, A. Barrau, S. Meignen, and L. Massoulié, “Optimal adaptive time-frequency representation via differentiable short-time Fourier transform,” IEEE Transactions on Signal Processing, vol. 73, pp. 5047–5059, 2025.
[24] I. Daubechies and F. Planchon, “Adaptive Gabor transforms,” Applied and Computational Harmonic Analysis, vol. 13, no. 1, pp. 1–21, 2002.
[25] F. Jaillet and B. Torrésani, “Time-frequency jigsaw puzzle: Adaptive multiwindow and multilayered Gabor expansions,” International Journal of Wavelets, Multiresolution and Information Processing, vol. 5, no. 2, pp. 293–315, 2007.
[26] D. Rudoy, P. Basu, and P. J. Wolfe, “Superposition frames for adaptive time-frequency analysis and fast reconstruction,” IEEE Transactions on Signal Processing, vol. 58, no. 5, pp. 2581–2596, 2010.
[27] M. Dörfler, “Quilted Gabor frames—a new concept for adaptive time-frequency representation,” Advances in Applied Mathematics, vol. 47, no. 4, pp. 668–687, 2011.
[28] P. Balazs, M. Dörfler, F. Jaillet, N. Holighaus, and G. A. Velasco, “Theory, implementation and applications of nonstationary Gabor frames,” Journal of Computational and Applied Mathematics, vol. 236, no. 6, pp. 1481–1496, 2011.
[29] P. Balazs, M. Dörfler, M. Kowalski, and B. Torrésani, “Adapted and adaptive linear time-frequency representations: A synthesis point of view,” IEEE Signal Processing Magazine, vol. 30, no. 6, pp. 20–31, 2013.
[30] N. Holighaus, M. Dörfler, G. A. Velasco, and T. Grill, “A framework for invertible, real-time constant-Q transforms,” IEEE Transactions on
Audio, Speech, and Language Processing, vol. 21, no. 4, pp. 775–785, 2013.
[31] R. P. Adams and D. J. C. MacKay, “Bayesian online changepoint detection,” 2007.
[32] P. Fearnhead, “Exact and efficient Bayesian inference for multiple changepoint problems,” Statistics and Computing, vol. 16, no. 2, pp. 203–213, 2006.
[33] P. Fearnhead and Z. Liu, “On-line inference for multiple changepoint problems,” Journal of the Royal Statistical Society: Series B (Statistical Methodology), vol. 69, no. 4, pp. 589–605, 2007.
[34] N. Merhav and M. Feder, “Universal prediction,” IEEE Transactions on Information Theory, vol. 44, no. 6, pp. 2124–2147, 1998.
[35] N. Cesa-Bianchi and G. Lugosi, Prediction, Learning, and Games. Cambridge, UK: Cambridge University Press, 2006.
[36] V. Vovk, “A game of prediction with expert advice,” Journal of Computer and System Sciences, vol. 56, no. 2, pp. 153–173, 1998.
[37] N. Littlestone and M. K. Warmuth, “The weighted majority algorithm,” Information and Computation, vol. 108, no. 2, pp. 212–261, 1994.
[38] Y. Freund and R. E. Schapire, “A decision-theoretic generalization of on-line learning and an application to boosting,” Journal of Computer and System Sciences, vol. 55, no. 1, pp. 119–139, 1997.
[39] M. Herbstner and M. K. Warmuth, “Tracking the best expert,” Machine Learning, vol. 32, no. 2, pp. 151–178, 1998.
[40] W. M. Koolen and S. de Rooij, “Combining expert advice efficiently,” in Proceedings of the 21st Annual Conference on Learning Theory, 2008, pp. 275–286.
[41] A. Rényi, “On measures of entropy and information,” in Proceedings of the Fourth Berkeley Symposium on Mathematical Statistics and Probability, vol. 1. Berkeley, CA: University of California Press, 1961, pp. 547–561.
[42] W. J. Williams, M. L. Brown, and A. O. Hero, III, “Uncertainty, information, and time-frequency distributions,” in Advanced Signal Processing Algorithms, Architectures, and Implementations II, ser. Proceedings of SPIE, vol. 1566. SPIE, 1991, pp. 144–156.
[43] P. Flandrin, R. G. Baraniuk, and O. Michel, “Time-frequency complexity and information,” in Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 1994.
[44] R. G. Baraniuk, P. Flandrin, A. J. E. M. Janssen, and O. J. J. Michel, “Measuring time-frequency information content using the Rényi entropies,” IEEE Transactions on Information Theory, vol. 47, no. 4, pp. 1391–1409, 2001.
[45] L. Stanković, “A measure of some time-frequency distributions concentration,” Signal Processing, vol. 81, no. 3, pp. 621–631, 2001.
[46] M. Liuni, A. Röbel, M. Romito, and X. Rodet, “An entropy based method for local time-adaptation of the spectrogram,” in Exploring Music Contents, ser. Lecture Notes in Computer Science. Springer, 2011, vol. 6684, pp. 60–75.
[47] M. Liuni, A. Röbel, E. Matusiak, M. Romito, and X. Rodet, “Automatic adaptation of the time-frequency resolution for sound analysis and re-synthesis,” IEEE Transactions on Audio, Speech, and Language Processing, vol. 21, no. 5, pp. 959–970, 2013.
[48] S. Meignen, M. A. Colominas, and D.-H. Pham, “On the use of Rényi entropy for optimal window size computation in the short-time Fourier transform,” in Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2020, pp. 5830–5834.
[49] D. L. Donoho and P. B. Stark, “Uncertainty principles and signal recovery,” SIAM Journal on Applied Mathematics, vol. 49, no. 3, pp. 906–931, 1989.
[50] E. H. Lieb, “Integral bounds for radar ambiguity functions and Wigner distributions,” Journal of Mathematical Physics, vol. 31, no. 3, pp. 594–599, 1990.
[51] R. E. Krichevsky and V. K. Trofimov, “The performance of universal encoding,” IEEE Transactions on Information Theory, vol. 27, no. 2, pp. 199–207, 1981.
[52] L. R. Rabiner, “A tutorial on hidden Markov models and selected applications in speech recognition,” Proceedings of the IEEE, vol. 77, no. 2, pp. 257–286, 1989.
[53] D. W. Griffin and J. S. Lim, “Signal estimation from modified short-time Fourier transform,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 32, no. 2, pp. 236–243, 1984.
[54] N. Bleistein and R. A. Handelsman, Asymptotic Expansions of Integrals. New York: Dover Publications, 1986.
[55] J. Yamagishi, C. Veaux, and K. MacDonald, “CSTR VCTK corpus: English multi-speaker corpus for CSTR voice cloning toolkit (version 0.92),” 2019.
[56] R. S. Payne and S. McVay, "Songs of humpback whales," Science, vol. 173, no. 3997, pp. 585–597, 1971.
[57] W. W. L. Au and M. C. Hastings, Principles of Marine Bioacoustics. New York: Springer, 2008.
[58] M. Versluis, B. Schmitz, A. von der Heydt, and D. Lohse, "How snapping shrimp snap: Through cavitating bubbles," Science, vol. 289, no. 5487, pp. 2114–2117, 2000.
[59] B. G. Ferguson and J. L. Cleary, "In situ source level and source position estimates of biological transient signals produced by snapping shrimp in an underwater environment," The Journal of the Acoustical Society of America, vol. 109, no. 6, pp. 3031–3037, 2001.
[60] NOAA Office of National Marine Sanctuaries and U.S. Navy, "Sanct-Sound raw passive acoustic data," 2020, accessed 2026-08-08.