TL;DR
Multi-sample inference techniques like Chain-of-Thought (CoT) Self-Consistency and Minimum Bayes Risk (MBR) decoding rely heavily on generating diverse candidate outputs. This paper evaluates arithmetic sampling—a technique that draws quasi-random points from an implicit unit-interval codebook—demonstrating that it produces strictly more diverse, embarrassingly parallel samples than standard ancestral sampling. This leads to a 3–5% accuracy boost on GSM8K and consistent improvements in machine translation quality without any notable computational overhead.
What Problem Does This Paper Address?
Modern LLM decoding methods often generate multiple candidate outputs to find the best answer. In Self-Consistency, models generate multiple reasoning paths and take a majority vote; in MBR decoding, models generate multiple candidate translations and select the one maximizing expected utility across the candidate pool.
Both methods depend on sample diversity: if the sampled sequences are redundant, the consensus estimate degrades. However, current generation techniques have fundamental trade-offs:
- Ancestral sampling is embarrassingly parallel across samples, but independent draws frequently produce duplicate or closely clustered outputs.
- Search-based methods (e.g., beam search) focus on the mode (maximum a posteriori) and lack parallelizability and diversity.
The authors explore whether arithmetic sampling can deliver the best of both worlds: guaranteed sample diversity by construction, combined with embarrassingly parallel generation.
Methods
The paper builds on the arithmetic sampling framework introduced by Vilnis et al. (2023):
- Arithmetic Sampling: Instead of sampling sequentially with random numbers per step, the model lazily partitions the unit interval $[0, 1)$ into an arithmetic codebook based on the next-token probability distribution. Each code point $c_i \in [0, 1)$ deterministically maps to a full output sequence. Choosing code points that are evenly spaced across the interval ensures distinct token prefixes and diverse trajectories.
- Parallel Generation: Because each sequence $i$ is fully determined by its code $c_i$, all $N$ samples can be generated independently and concurrently.
- Compatibility: Arithmetic sampling is orthogonal to standard truncation techniques; the authors apply it alongside temperature, top-$k$, nucleus (top-$p$), and epsilon sampling.
- Applications: The authors evaluate arithmetic vs. ancestral sampling across two downstream regimes:
- CoT Self-Consistency using Gemma-7B and Llama-2-7B.
- MBR Decoding using Flan-T5 and MT0, evaluated with the COMET neural metric.
Datasets
The authors evaluated validation splits on standard open benchmarks; no new datasets were introduced:
- Reasoning: GSM8K (grade-school math word problems; 8-shot) and CommonsenseQA (multiple-choice commonsense reasoning; 6-shot).
- Machine Translation: WMT19 German-to-English (De–En) and Russian-to-English (Ru–En) under a zero-shot translation setup.
Key Insights and Ideas
- Open-Ended vs. Constrained Tasks: The performance boost from arithmetic sampling is largest on open-ended problems (GSM8K) compared to constrained ones (CommonsenseQA or translation). In math word problems, reasoning paths diverge broadly; exploring diverse solution paths prevents the model from getting stuck in correlated error modes. In contrast, multiple-choice questions (5 options) and translation (where targets are close to the reference) offer smaller search spaces, muting the impact of diversity.
- The Diversity "Sweet Spot": By varying temperature, the authors observed that accuracy increases with $n$-gram diversity up to an intermediate peak, after which generating overly unusual tokens degrades quality. Arithmetic sampling consistently reached a higher maximum performance and maintained superior accuracy across all diversity levels.
- Reduced Variance: Beyond higher average quality, arithmetic sampling exhibited a narrower spread (lower standard deviation) across evaluation runs, suggesting it yields more reliable pseudo-reference sets for MBR with fewer samples.
Key Results
- Math Reasoning (GSM8K): At 40 sampled sequences, arithmetic sampling outperformed ancestral sampling by +4.75% on Gemma-7B and +3.25% on Llama-2-7B.
- Commonsense Reasoning (CommonsenseQA): Arithmetic sampling yielded a +1.05% gain for Llama-2-7B and a +0.1% gain for Gemma-7B at 40 samples.
- Machine Translation (WMT19): At 5 sampled sequences, arithmetic sampling improved COMET scores by 0.45% to 0.89% over ancestral sampling across Flan-T5 and MT0, with paired $t$-tests confirming statistical significance ($p < 0.05$).
Limitations and Future Work
- Arbitrary Vocabulary Ordering: The unit interval $[0, 1)$ relies on an arbitrary (randomized) vocabulary token order. Structuring the ordering by semantic similarity could space out semantically dissimilar tokens even further, potentially improving diversity.
- One-Dimensional Limitation: Arithmetic sampling operates along a 1D line with standard softmax. Extending diverse sampling to high-dimensional embedding spaces (e.g., using box embeddings or Quasi-Monte Carlo techniques) remains an open challenge.
- Not Suited for MAP Decoding: Arithmetic sampling is explicitly designed for generating diverse multi-sample sets, not for single-output maximum-likelihood generation (like beam search). Extending these quasi-random principles to mode-seeking search represents an area for future research.
Summary updated