AI Glossary / Mathematics and optimization / Intermediate
Overlap - save method
Definition
The overlap - save method computes a long signal's linear convolution using overlapping input frames and circular convolution. After each frame is processed, it discards the output samples affected by circular wraparound and keeps the valid remainder. With the correct overlap and indexing, the retained pieces join to form the desired filtered signal, apart from numerical rounding.
What it means
A finite impulse response filter needs a short history of previous input samples to calculate each new output. Overlap - save carries that history into the next block. The FFT naturally computes a circular convolution, in which a block is treated as wrapping around. Rather than preventing every wraparound effect by padding each input block, the method confines the contamination to a known part of the output and discards it. The saved material is the input history needed for the next frame, not an arbitrary collection of previous output values.
How it works
For a causal filter of length M, choose an FFT length N at least M. Each input frame contains M − 1 previous samples followed by R = N − M + 1 new samples. Pad the filter to N samples, transform the frame and filter, multiply the spectra, and apply the inverse transform. In the usual causal arrangement, discard the first M − 1 output samples and retain the final R. Advance the input by R and repeat. Initialize the history according to the signal's boundary condition, often with zeros. If full convolution of a finite record is required, append enough zero input to produce its final filter tail and crop to the intended length.
Three practical examples
- A radio receiver can use overlap - save to apply a long fixed digital filter to successive blocks of sampled data.
- An audio-processing engine can maintain the previous input samples while filtering a continuous stream in the frequency domain.
- A scientific recording pipeline can process a long measurement file using bounded working memory, checking the first and last samples against its boundary convention. These applications depend on correct filter design; the block method alone does not determine which frequencies should be retained.
Think of it this way
Think of reading a long document in pages that repeat a few lines from the previous page. The repeated lines provide context, but only the new section is emitted as the final text. The analogy captures retained history and nonduplicated output. In convolution, however, the discarded part is determined exactly by filter length and circular indexing, rather than by a reader's judgment about how much context seems useful.
Worked example
Use input [1, 2, 3, 4], causal filter [1, 1, 1], and N = 4. Here M = 3, so each frame needs two old samples and R = 2 new samples. With zero history, the first frame is [0, 0, 1, 2]. Its four-point circular convolution with [1, 1, 1, 0] is [3, 2, 1, 3]. Discard the first two values and keep [1, 3]. Save input history [1, 2], then form [1, 2, 3, 4]. Its circular convolution is [8, 7, 6, 9]; keep [6, 9]. To obtain the full tail, process [3, 4, 0, 0], whose circular convolution is [3, 7, 7, 4]; keep [7, 4]. Joining the retained pieces gives [1, 3, 6, 9, 7, 4], the direct linear convolution. The discarded numbers are not extra output samples: they occupy positions contaminated by the frame's artificial wraparound. This deliberately small example demonstrates indexing, not an FFT speed advantage.
Illustrative case study
In a fictional project, Birch Acoustics streams sensor recordings through a long calibration filter. Its developers initially retain every inverse-transform sample, producing periodic errors. They inspect an impulse near a frame boundary, identify the wraparound-affected prefix and implement the correct discard step. They then compare results with a direct filter on short records and check start-up and shutdown behavior separately. The case demonstrates a verification method without claiming a measured accuracy or throughput improvement for an actual product.
Common misconceptions and mistakes
The overlap belongs to the input frames; the retained output blocks normally join without addition. That is a key distinction from overlap - add. Discarding the wrong end of the frame, or forgetting that a different filter indexing convention changes alignment, produces incorrect results. Reusing the last output values as input history is also wrong for this construction. Overlap - save does not eliminate all zero padding: the filter is padded to the transform size, and boundary initialization or final flushing may use zeros. It avoids the particular input padding used to prevent circular aliasing throughout each overlap - add block.
Business use
Choose N by comparing useful output per transform, computational cost and acceptable buffering delay. Only N − M + 1 samples per frame are newly delivered; the rest support history and boundary handling. If N is barely larger than M, little useful output may be produced per transform. If it is very large, waiting for a full block can increase latency. Test the actual implementation with multiple frame sizes, short records, and filter lengths near the frame length. In a signal-based AI workflow, preserve these settings between training preparation and live inference so that boundary handling does not silently change the model's inputs.
People also ask
Does discarding samples lose the real signal?
No, when the method is implemented correctly. The retained outputs cover the intended linear convolution, and the discarded values are circularly contaminated calculations.
Can the filter transform be reused?
Yes, while its coefficients and transform length stay fixed.
Is overlap - save always faster than direct filtering?
No. Filter length, frame size, hardware and library overhead determine which implementation is faster.
Check your understanding
With a 65-coefficient causal filter and 256-point frames, how many new output samples are retained per frame?
Answer: 256 − 65 + 1 = 192. The first 64 output samples are discarded under the standard causal arrangement, and 64 previous input samples provide history.
Related terms
- Circular convolution
- overlap–add
- linear convolution
- finite impulse response
- FFT
- block processing
Learn next
reproduce the three circular convolutions in the worked example and compare their retained output with direct convolution. Then omit the saved history intentionally and observe which boundary outputs become incorrect. Restore it before comparing several FFT lengths for efficiency and latency.
More in Mathematics and optimization
- Absolute error loss - Absolute error loss measures a numerical prediction's error as the absolute difference between its predicted and reference values: L(y,y-hat)=|y-y-hat|.
- Active-set method - An active-set method is an optimization approach that works with a changing subset of constraints believed to be tight at the solution.
- Adjoint state method - The adjoint state method computes how a chosen objective changes when the parameters of a mathematical model change.
- Σ-algebra
- Algebraic connectivity - Algebraic connectivity is the second-smallest eigenvalue of a graph's Laplacian matrix.
- Algorithm IMED - Algorithm IMED, short for Indexed Minimum Empirical Divergence, is a method for choosing actions in a stochastic multi-armed bandit problem.
Sources
Sources: Julius O. Smith, Spectral Audio Signal Processing, Overlap-Save Method, https://www.dsprelated.com/freebooks/sasp/Overlap_Save_Method.html ; Steven W. Smith, The Scientist and Engineer's Guide to Digital Signal Processing, chapter 18 for the contrasting overlap–add construction, https://www.dspguide.com/CH18.PDF . The frame-by-frame arithmetic is original. The damaged dash in the supplied label is corrected in the prose while the original metadata is preserved.
Previous: Overlap coefficient Next: Oversampling