Essay 06

Nonlinearities create frequencies—and aliases

A clean input can become an aliased output without any explicit downsampling.

Updated 3 October 2026 · Audio · Sampling · Machine learning

A linear, time-invariant filter changes the balance of frequencies already present. A nonlinear function can create new ones. That difference explains why an audio model can introduce aliasing even when every layer uses the same sample rate.

Start with a bend in the waveform

Take a sine wave and apply g(x)=x+αx³. Positive peaks grow more than small values; negative peaks grow in the opposite direction. The waveform changes shape, so one sinusoidal component can no longer describe it.

sin³(θ) = ¾ sin(θ) − ¼ sin(3θ)

For unit input amplitude, the output contains a fundamental with coefficient 1+3α/4 and a third harmonic with coefficient −α/4. A negative coefficient changes phase. It does not represent negative spectral energy.

Interactive experiment

A third harmonic crosses Nyquist

Where does the harmonic created by a cubic nonlinearity appear?

Rate is 64 Hz. Blue circles mark direct nonlinear samples; the solid line joins them. Dashed amber is the ideally low-pass-filtered continuous cubic result evaluated at the same sample times. This analytic comparison has no finite-filter approximation.

Try crossing the boundary

Start at 8 Hz: the third harmonic is 24 Hz, below the 32 Hz Nyquist limit. The curves agree. Increase to 12 Hz: the third harmonic reaches 36 Hz and appears at 28 Hz in the sampled result. The dashed curve removes that out-of-band harmonic before sampling. At coefficient zero, both reduce to the original sine.

The solid signal is perfectly valid as a discrete sequence. Calling it aliased means that it differs from the samples of the desired band-limited continuous output. Always specify that reference when assessing a nonlinear processor.

Why filtering afterwards cannot undo the fold

Once 36 Hz has become 28 Hz at the lower rate, a filter cannot distinguish it from an intended 28 Hz component. Oversampling creates more room for the nonlinear operation: interpolate the input onto a higher-rate grid, apply the function, low-pass filter, then return to the original rate. Both interpolation and decimation need appropriate filters.

This polynomial has only finitely many harmonics. Sharp clipping and many activations have much longer spectral tails. A finite oversampling factor reduces the problem rather than promising exact removal. Transition bands and acceptable residual alias level determine the engineering choice.

How this connects to neural audio

Aliasing-Free Neural Audio Synthesis (December 2025) examines activation and upsampling artefacts in vocoders and codecs. Its proposed modules combine oversampling and antiderivative anti-aliasing, with resampling-based upsampling. The paper evaluates synthetic signals and several audio domains. Our cubic experiment isolates one mechanism; it does not reproduce its models or listening results.

Antiderivative anti-aliasing approximates the nonlinear operation over an interval between samples rather than only at isolated values. Assuming linear interpolation between adjacent input samples and an antiderivative satisfying G′=g, the interval average of the nonlinear output is (G(xₙ)−G(xₙ₋₁))/(xₙ−xₙ₋₁). When both inputs approach the same value x, the quotient tends to g(x); implementations need a numerically stable branch near equal inputs. The interpolation assumptions, added filtering and phase response matter.

A useful test sequence

Sweep a sine through the processor at several drive levels. Follow harmonics and folded components in the spectrum. Compare with a higher-rate, carefully filtered reference and check delay alignment. A small waveform error and a perceptually objectionable alias are different measurements; listening and spectral diagnostics answer complementary questions.

Continue with sampling ambiguity or the filters surrounding the nonlinearity.