Lune

ICLR2026Top-tier venue

Energy-Efficient Random Variate Generation via Compressed Lookup Tables

Johann Ukrow, Anna Kazachkova, Nicolas Alder, Sven Köhler, Rainer Schlosser, Ralf Herbrich

Abstract

Generating (pseudo-)random variates lies at the core of probabilistic machine learning and prediction algorithms and yet remains a major bottleneck due to its high computational and energy cost. In this paper, we introduce a general and scalable sampling strategy that enables fast and energy-efficient random variate generation from arbitrary distributions. Our approach is based on compressed lookup tables (cLUT) combined with a fast index sampling scheme. Using only a handful of fast and energy-efficient compute operations on simple array structures, we achieve superior speed, energy efficiency, and precision at near-optimal entropy cost compared to state-of-the-art techniques. Microbenchmarking our approach with a C implementation shows up to 40% savings in time and 50% in energy compared to state-of-the-art approaches. Compared to commonly employed Python samplers, we achieve a 100× time improvement. i -p i log 2 (p i ) is the Shannon entropy. While entropy-optimal, discrete distribution generating trees typically require exponential memory in the distribution precision. Lumbroso (2013) overcame this limitation for uniform and Bernoulli distributions with a linear-memory implementation, but the approach does not generalize to arbitrary distributions. The generic interval algorithm (Hao and Hoshi, 2006) achieves linear memory usage while consuming at most H(p) + 3 bits per sample. However, implementations require expensive binary searches at each sampling step, limiting practical efficiency (Devroye and Gravel, 2020; Uyematsu and Li, 2003) . Saad et al. (2020) presented the FLDR algorithm that combines entropy-optimal sampling with rejection sampling, achieving an upper bound of H(p) + 6 bits per sample. ? improved this to H(p) + 2 bits with faster sampling speed for the ALDR algorithm, though at a higher memory cost. Building on Marsaglia (1963 ), Marsaglia et al. (2004) proposed compressed lookup tables for discrete sampling. However, their compression scheme requires conditional branching and searches across multiple tables during sampling,

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • PriorGrad: Improving Conditional Denoising Diffusion Models with Data-Dependent Adaptive Prior cites Denoising Diffusion Probabilistic Models
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on5

  1. Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
  2. A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
  3. PLATYPUS: Software-based Power Side-Channel Attacks on x86Moritz Lipp, Andreas Kogler, David F. Oswald, Michael Schwarz et al.S&P 2021 · 242 citations
  4. PriorGrad: Improving Conditional Denoising Diffusion Models with Data-Dependent Adaptive PriorSang-gil Lee, Heeseung Kim, Chaehun Shin, Xu Tan et al.ICLR 2022 · 117 citations
  5. Microcanonical Langevin Ensembles: Advancing the Sampling of Bayesian Neural NetworksEmanuel Sommer, Jakob Robnik, Giorgi Nozadze, Uros Seljak et al.ICLR 2025

Related papers

  1. Efficient Online Random Sampling via Randomness RecyclingThomas L. Draper, Feras A. SaadSODA 2026
  2. Optimal approximate sampling from discrete probability distributionsFeras A. Saad, Cameron E. Freer, Martin C. Rinard, Vikash K. MansinghkaPOPL 2020 · 3 citations
  3. Accelerating Multiparty Noise Generation Using LookupsFredrik Meisingseth, Christian Rechberger, Fabian SchmidCCS 2026 · 3 citations
  4. Can Learned Indexes be Built Efficiently? A Deep Dive into Sampling Trade-offsMinguk Choi, Seehwan Yoo, Jongmoo ChoiSIGMOD 2024 · 5 citations
  5. Random Variate Generation with Formal GuaranteesFeras A. Saad, Wonyeol LeePLDI 2025
Dusk over the sea between two cliffs drawn in fine vertical lines