# What do I lose when I set overlap rate to a really high value in STFT

If I don't care about computational cost, is there any cons when I put overlap rate really high in STFT?

• lower rate? what do you mean? do you mean fewer STFT windows overlapping at a time? 50% are two windows. 75% is four windows overlapping at a time. a high overlapping rate is what causes more computational cost. do you mean a low hop value? (much smaller than the window width?) – robert bristow-johnson Oct 2 '17 at 3:05
• Sorry i meant a high overlap rate, same as a low hop rate. – Yusuke Kadowaki Oct 2 '17 at 4:21
• hop length is not a rate. so do you mean the hop length is small in comparison to the window width? – robert bristow-johnson Oct 2 '17 at 4:45
• Yes, small hop length for the window width. Sorry to confuse you again and again. So is there any cons? – Yusuke Kadowaki Oct 2 '17 at 5:17
• there are cons for making the hop length too long. other than computational effort (which your premise is that it's not costly), there are no cons that i know of for making the hop size small and the overlap large. – robert bristow-johnson Oct 2 '17 at 6:30

[EDIT: added a loss on the statistical side] With a traditional windowed version of the STFT, the version $v_N$ with a hop of $N$ samples is essentially the subsampled version, with factor $N$, of the version $v_1$, described by @hotpawn2, the one with $L-1$-sample overlap.

So in a way, a low hop rate essentially contains more or the same kind information, like a signal sampled with a higher frequency. This is especially correct when you compare some hop $h_1=h$ and an integer multiple $h_2=K h$. Let us reformulate: if an STFT works for $h$, it will work for $Kh$, the latter being a form of subsampling (this can be slightly more involved when GCD is not $h$). So you don't loose (much) on transformed coefficients (more the contrary). Moreover, higher redundancy (smaller hops) is generally beneficial for less stationary signals, and higher noise level. If you want to extract information, you have much more flexibility in designing useful inverses.

However, what you loose is the tractability of statistical hypotheses in the redundant case: the larger the overlap, the less valid the hypothesis of uncorrelation between frames, with can be troublesome to derive solid statistical estimators. This already happens in the study of estimated periodograms, and the Welsh version indeed allow the combination of windowing and yields good results with 50% overlap. I lack knowledge about the relevant literature on its performance when overlap increases.

Additional note: when you have performed an analysis, and done some spectrogram processing, there exist other inverses than the ones deduced from the analysis window. From such natural inverses, it is possible to design optimized inverses, for instance better concentrated in time, or in frequency, to limit the spread of time-frequency domain artifacts.

• I'm working on a processing which gives musical noise and decreasing hop length doesn't always make a good result. Your answer made me think that it has something to do with its statistical aspect. – Yusuke Kadowaki Oct 3 '17 at 2:10
• Do you do synthesis, ie reconstruction from processed STFT coefficients ? – Laurent Duval Oct 3 '17 at 4:49
• Yes. (e.g. Spectral Subtraction) – Yusuke Kadowaki Oct 3 '17 at 6:10
• Let me make it clear. Your additional note intends that there could be a better iSTFT algorithm than typical ones when I do synthesis? – Yusuke Kadowaki Oct 4 '17 at 0:52
• A better overval performance (depending on the application) with the combination of adapted processing and optimized inverses (the STFT seen as a oversampled complex filter bank) – Laurent Duval Oct 4 '17 at 5:39

If you don’t care about computational costs, you can start a window at each sample (e.g. 100% - 1 sample overlap). It’s well into diminishing returns, but phase vocoder estimation methods work slightly better with greater overlap.

There are situations where a lot of overlap is wanted, but in general, one generally uses Signal Processing to reduce what I'll call the dimension of the data as it proceeds through a system. Having a lot of redundancy persist in a system cuts against the aesthetic of a community that includes scrounging cycles on a dsp. It also uses more Watts.

Lot of overlap also makes analysis of a system harder particularly with assumptions associated with independence.

• What do you mean by "the aesthetic of a community"? What you mean in that sentence is basically about computational cost no? – Yusuke Kadowaki Oct 3 '17 at 1:51
• Not caring about costs has its costs. There is no such things as unlimited memory and infinite speed. One can overlap at fractions of the sample rate if justified. If you have ever had to truly hand optimize an implementation, it becomes an obsession hence an art with aesthetics. – user28715 Oct 3 '17 at 2:16

Increasing the overlap in block-based processing makes it closer to time-invariant processing.

One application of this is reduction of JPEG compression artifacts by re-encoding the image with the block boundaries shifted to all possible pixel positions and by calculating the average image, see:

Aria Nosratinia. Enhancement of JPEG-compressed images by re-application of JPEG. Journal of VLSI Signal Processing 27, 69–79, 2001.

In audio applications, if the processing is prone to give artifacts or if the summation of the block outputs does not perfectly reconstruct the signal, then the frequency of the overlapping windows might be audible, and it can be made inaudible by starting a block at every sample. Even more extreme would be to start the blocks at sub-sample steps.

Except for the computational cost, high overlap seems to me only good.

• i might think that increasing % overlap by holding the window width constant and decreasing the hop displacement length would be only good. but i might not think that increasing % overlap by holding the hop displacement to a constant value and increasing the window width might have some cons regarding smearing of time-domain information. – robert bristow-johnson Oct 3 '17 at 2:00
• @robertbristow-johnson right, if the window so long you miss time-domain detail, increasing the overlap won't probably save 'ya. – Olli Niemitalo Oct 3 '17 at 6:02