How can polynomial interpolation remove noise? (Part I)
A simple route from noisy Chebyshev interpolation to a fast, stable polynomial approximation using coefficient truncation and Mallows’ criterion.
This blog post is based on the work of Takeru Matsuda and my mentor, Yuji Nakatsukasa. In their paper Polynomial approximation of noisy functions, they developed a surprisingly simple yet powerful method for approximating noisy functions, called NoisyChebtrunc.
If you are given an unknown (sufficiently smooth) function , say on , and all you can do is sample at points of your choice, , how will you go about approximating (or learning) ? At least to me, there are two different approaches depending on your taste.
Two approaches
Numerical analysts: We should take samples at the famous Chebyshev points
and find the unique degree- polynomial that goes through all sample points.
Statisticians: We should take samples (randomly or deterministically) and use least-squares to fit the samples to a polynomial of degree .
The numerical analysts’ approach has several computational advantages: Chebyshev interpolation has a near-best convergence guarantee, can be performed in time, and can be computed stably using the fast Fourier transform (FFT).1
Why interpolation struggles with noise
Suppose the samples are not exact but instead noisy, as they always are in real life:
where is a noise term. An interpolation approach quickly becomes problematic: an interpolant passes through all the samples by definition, so you have no hope of recovering the true . In fact, even a small amount of noise can magnify the approximation error.
By contrast, least-squares is much more robust to noise provided a suitable degree is chosen. It can reduce the noise at a rate of .
It might be counter-intuitive, or at least it certainly was to me, that a lower-degree polynomial would achieve a better approximation. This is essentially explained by polynomial overfitting; see Larry Wasserman’s All of Statistics.
The interpolation approach certainly has its virtues, but the high-order oscillations make it noise-sensitive, which is very undesirable in the real world. Is there a quick fix we can apply to to remove them?
Truncating the high-order terms
It turns out there is: just truncate the high-order terms! The higher-order coefficients of are typically small and somehow “carry” the noisy oscillations in the approximation. Think of the Fourier series, where the higher-order terms contain higher frequencies and hence more oscillations.2
Therefore, if we choose some small and simply chop off the terms of to get a degree- polynomial , we can remove oscillations and hopefully recover with less noise.
The mathematics, of course, is more complicated. The most obvious question is: how should be selected? The answer is to learn from the statisticians and see how they would select such a degree: Mallows’ .
Choosing the degree with Mallows’ criterion
Let
where is the th Chebyshev polynomial and is the corresponding coefficient. We define
We choose the truncation degree to minimize the value:
Here is an estimator of the standard deviation of the noise based on the samples.
The idea is a balancing act between keeping more information about the underlying and removing noise. The first term measures the size of the truncated coefficients, representing the amount of “knowledge” of removed by truncating at degree . The latter term increases with , controlling polynomial overfitting and the noise contained in the kept terms.
Therefore, by truncating at with the smallest , we can remove the effect of noise from the high-order terms while retaining enough information about in the kept terms.
The NoisyChebtrunc algorithm
We are now ready to unveil the final algorithm, NoisyChebtrunc. It has, as the name suggests, three steps:
- Noisy: Take noisy samples at the Chebyshev points.
- Cheb: Apply Chebyshev interpolation to the samples to compute the degree- interpolant , using the FFT/DCT.
- trunc: Truncate at the degree selected via , yielding the output .
How good is NoisyChebtrunc in practice? It has the best of both worlds: the speed and stability of Chebyshev interpolation and the denoising effect of least-squares. Here is NoisyChebtrunc applied to the same example with 201 sample points—voilà!
The truncated interpolant fits the original much better than the plain interpolant does, with accuracy similar to that of the least-squares solution.3
Before you go
Interpolation is one of the most common tools in the repertoire of a computational mathematician. If your interpolants are not behaving well due to noisy samples, a simple but effective trick is to truncate to a much smaller degree , and Mallows’ gives a good way to choose .
References
- T. Matsuda and Y. Nakatsukasa, “Polynomial approximation of noisy functions”, Numerische Mathematik 157 (2025), 1285–1311.
- L. Wasserman, All of Statistics: A Concise Course in Statistical Inference, Springer, 2004.
- L. N. Trefethen, Approximation Theory and Approximation Practice, Extended Edition, SIAM, 2019.
Footnotes
-
If you want to know more about the amazing properties of the FFT and Chebyshev interpolation, please check out Ethan Epperly’s (much better written) post, “Chebyshev Polynomials and Chebyshev Interpolation”. ↩
-
This is no surprise to readers familiar with the connection between Chebyshev interpolation and Fourier series. See Lloyd N. Trefethen’s Approximation Theory and Approximation Practice, Extended Edition. ↩
-
In fact, Matsuda and Nakatsukasa showed that NoisyChebtrunc can be viewed as weighted least-squares; they then applied this insight to prove high-probability convergence guarantees. ↩
Comments
Comments are hosted by FastComments. No account or email address is required.