Abstract
Generating $k$-independent random variables is a fundamental requirement for many randomized algorithms, yet traditional methods suffer from a steep trade-off between computational time and memory usage. This paper introduces a novel algorithm that achieves constant-time generation per value with near-optimal space. By shifting the focus from random-access hashing to sequential generation, the authors circumvent the theoretical lower bounds established by Siegel. The proposed method combines multipoint polynomial evaluation via Fast Fourier Transforms (FFTs) with bipartite expander graphs to amortize costs, resulting in a generator that is both theoretically sound and practically efficient.
Introduction: The Challenge of k-Independence
In computational theory, $k$-independence ensures that any subset of $k$ variables in a sequence behaves as if they were truly random. This property is vital for derandomizing algorithms, load balancing, and Monte Carlo simulations. However, generating such variables efficiently has historically been difficult. Standard polynomial evaluation methods require $O(k)$ time per value, while constant-time solutions like Siegel’s method demand prohibitive amounts of space ($O(|\mathbb{F}|^\epsilon)$).
As shown in the table above, existing constructions often struggle to balance time and space. While Siegel's method achieves $O(1)$ time, its space complexity makes it impractical for large-scale applications. The authors identify a "sequential loophole": Siegel's lower bound applies specifically to random-access hash functions. By relaxing this requirement to sequential generation, it becomes possible to achieve $O(1)$ time with $k \text{poly} \log k$ space, as demonstrated in the authors' Theorem 1.
Methodology: Amortized Complexity through Expanders
The core of the proposed algorithm is a two-stage process designed to minimize marginal costs.
- Initial Batching with FFTs: The algorithm first generates a small set of $k$-independent values using multipoint polynomial evaluation. This step utilizes Fast Fourier Transforms over finite fields. While computationally intensive, this "heavy lift" is performed only once per large batch of output values.
- Expansion via Bipartite Graphs: To scale this initial set into a much larger sequence without losing independence properties, the algorithm uses a cascade of unbalanced bipartite expander graphs. Each new value is generated by summing a constant number of previously generated values, determined by the graph's edges. Because the out-degree is constant, the marginal time to produce each subsequent value is $O(1)$.
This architecture effectively amortizes the high cost of algebraic operations over a vast number of cheap graph-based lookups.
Practical Implementation and Results
To bridge the gap between theory and practice, the authors implemented their generator in C++, optimizing for modern CPU architectures. They utilized hardware-specific instructions, such as PCLMUL for carryless multiplication, to accelerate finite field arithmetic.
In empirical tests over the finite field $\mathbb{F}_{2^{64}}$, the generator produced 1024-independent values in approximately 25 nanoseconds per value. This represents a throughput exceeding 300 MB/s. For large values of $k$ (e.g., $k = 2^{20}$), the FFT-based approach completed batch generation in under a second, whereas traditional Horner’s rule evaluation would require over an hour. This efficiency makes it a viable replacement for standard PRGs like the Mersenne Twister in applications requiring formal independence guarantees.
Discussion and Limitations
While the theoretical results are robust, practical implementation reveals nuances. The "explicit" expander graphs required for a purely deterministic proof often have large hidden constants that hinder performance. Consequently, the high-speed results reported were achieved using randomly generated expanders, which introduce a negligible but non-zero probability of failure. Furthermore, as the parameter $k$ increases, the memory footprint of the expander lookup tables eventually exceeds the CPU cache, leading to performance degradation due to RAM latency—a physical constraint that $O(1)$ theoretical complexity does not account for.
Conclusion
This work provides a significant advancement in the generation of $k$-independent variables. By recognizing the flexibility afforded by sequential generation, the authors have developed a tool that offers the speed of simple PRGs with the rigorous guarantees of $k$-independence, opening new possibilities for high-performance randomized computing.
Summary updated