Modular Aggregation as a Debiasing Method for Non-Stationary Discrete Sources: Convergence and Numerical Validatio
We analyze \emph{modular aggregation}---summing $N$ independent outcomes modulo $m$---as a post-processing method for extracting nearly uniform randomness from biased discrete sources. Using discrete Fourier analysis over the cyclic group $\mathbb{Z}_m$, we prove exponential convergence of the output distribution to uniformity, with a rate determined by the largest non-trivial Fourier modulus. The result applies to independent non-stationary (non-IID) sources under a uniform spectral-gap condition on the non-trivial Fourier modes. Numerical simulations under several bias regimes, including cyclic drift and extreme cyclic bias, are used as finite-sample diagnostics and illustrate the theoretical predictions in comparison with Peres extraction and SHA-256 post-processing. The robustness of modular aggregation comes at a retention cost of order $1/N$, yielding an explicit trade-off between statistical quality and throughput.