Predicting the entropy rate of a quantized filtered Gaussian series#
The model is
with unit quantization step. The quantity of interest is the entropy rate
the true lossless compression limit of , which the Monte-Carlo estimator
in this package approaches from above as the window grows. This note
derives the analytic prediction implemented in
theory.py,
where are the Fourier modes of the kernel and is the differential entropy (in bits) of a Gaussian convolved with a unit uniform,
with the standard normal CDF. The formula is built in three steps, each repairing a failure of the previous one.
Step 1 — Szegő–Kolmogorov: prediction from the exact past#
is stationary Gaussian with power spectral density , . Kolmogorov's form of Szegő's theorem says the one-step prediction error variance from the infinite (exact) past is the geometric mean of the spectrum:
Since a Gaussian process's entropy rate is the entropy of its innovation,
and in the high-resolution regime ( 1 bin) the usual approximation with gives the naive prediction
Closed form for FIR kernels. Writing the tap polynomial , Jensen's formula gives the geometric mean of over the unit circle as , so
Examples: the moving average of width has all zeros on the unit circle and leading coefficient , so ; the first difference has , so ; the identity kernel has .
Two failures. (i) Wherever — the stopband of a lowpass or bandpass filter — the log integral dives toward and the formula predicts negative entropy ( bits for the lowpass at ), while the truth is . (ii) The predictor only sees the quantized past, which carries strictly less information than the exact past.
Step 2 — Quantized past: the noise floor#
Model roundoff as additive dither: with , independent of (Bennett's approximation; exact under subtractive dither). The observed process then has spectrum
Kolmogorov's theorem is a statement about linear prediction and needs no Gaussianity, so the one-step linear prediction error of from its past is . Because is independent of both and the past of , its variance splits off exactly:
This is the effective uncertainty of the next sample given the quantized past. Three properties worth noting:
- Regularization. The inside the logarithm is exactly what keeps the integral finite at zeros of — the fix for failure (i) falls out of modeling failure (ii).
- Ordering. always, because geometric means are superadditive: quantizing the past can only increase the entropy rate. The gap is a real, measurable effect even with no stopband (for the first difference at it is bits, confirmed by Monte Carlo).
- Limits. when everywhere, and as (for the identity kernel, exactly).
Step 3 — Quantized next sample: Gaussian ⊛ uniform entropy#
Given the quantized past, with a conditional mean that varies from past to past. When the marginal spread of covers many bins, equidistributes, so
This average has a closed form — the standard dithered-quantization identity. For any with density, iff , an event of probability where is exactly the density of , . The intervals tile the line, so
For Gaussian define
Its limits are exactly the right ones:
with ( the binary entropy). So reproduces the high-resolution formula when quantization is fine and saturates to — instead of diverging to — when the conditional distribution concentrates inside one bin.
Validity and failure modes#
Monte-Carlo validation with this package's estimator (24+ independent
pasts; --thin 4 for the slowly mixing narrowband cases):
| filter | naive Szegő | Monte Carlo se | |||
|---|---|---|---|---|---|
| none | 0.5 | 0.50 | 1.2544 | 1.047 | 1.2380 ± 0.0069 |
| none | 2 | 2.00 | 3.0620 | 3.047 | 3.0491 ± 0.0124 |
| none | 8 | 8.00 | 5.0480 | 5.047 | 5.0009 ± 0.0372 |
| first-diff | 0.5 | 0.60 | 1.4579 | 1.047 | 1.4579 ± 0.0053 |
| first-diff | 2 | 2.13 | 3.1511 | 3.047 | 3.1709 ± 0.0192 |
| first-diff | 8 | 8.14 | 5.0731 | 5.047 | 5.1004 ± 0.0489 |
| MA(8) | 1 | 0.23 | 0.6100 | −0.953 | 0.4962 ± 0.0220 |
| MA(8) | 2 | 0.38 | 0.9825 | 0.047 | 0.9881 ± 0.0092 |
| MA(8) | 4 | 0.65 | 1.5529 | 1.047 | 1.5641 ± 0.0191 |
| MA(8) | 32 | 4.18 | 4.1125 | 4.047 | 4.1420 ± 0.0429 |
| lowpass =0.1 | 8 | 0.50 | 1.2632 | −4.756 | 1.2232 ± 0.0190 (M=512), 1.2732 ± 0.0422 (M=1024) |
| lowpass =0.1 | 64 | 0.89 | 1.9513 | −1.756 | 1.8258 ± 0.0796 |
| bandpass 0.01–0.2 | 8 | 1.03 | 2.1476 | −1.783 | 2.1362 ± 0.0217 |
The approximations, and where they bite:
- Dither independence (Step 2) requires the marginal spread to be at least about one bin. First-difference at (spread 0.71 bins) still agrees to within its se; MA(8) at (spread 0.35 bins) is overpredicted by bits — when the whole signal lives inside one bin, roundoff is deterministic, not dither-like, and the true rate is lower.
- Equidistribution of the conditional mean (Step 3) fails for kernels with no memory: the identity kernel pins , and the exact answer is the centered quantized-Gaussian entropy, below by bits at (and exponentially little for ). Any kernel with real memory washes this out.
- Linear prediction / Gaussianity of (Step 2): is not Gaussian, and linear prediction of it is not optimal, so errs slightly high; the effect is within the Monte-Carlo error bars above.
- Near-singular spectra (lowpass/bandpass) have long memory; the
Monte-Carlo column is an upper bound that decreases in , and the
Gibbs sampler mixes slowly (hence
--thin). The lowpass run agrees with the prediction to well within its error bar.
Numerical notes#
- is computed exactly from the roots of the tap polynomial (robust to zeros of on the unit circle, where the log integral is still convergent — an integrable singularity).
- The Step-2 integral uses the trapezoid rule on the rfft grid over with points; the floor makes the integrand smooth and strictly positive, so no special handling of spectral zeros is needed.
- is integrated on a grid of spacing ; below the linear asymptote is used.