Cache Coherent Resampling for Efficient Test Time Scaling in LLM Reasoning via Adaptive Sequential Monte Carlo

Ke Wang, Zehao Yu, Luwei Wang, Yongchao HuangICML 2026

Introduction

"Test-time scaling" has emerged as a powerful paradigm for improving the reasoning capabilities of Large Language Models (LLMs). By allocating more compute during inference—allowing the model to explore multiple reasoning paths—we can significantly boost performance on complex tasks. However, deploying these methods in practice reveals a severe bottleneck: advanced sampling techniques are often fundamentally serial, leading to massive latency.

To address this, researchers have introduced Adaptive Sequential Monte Carlo (ASMC). By leveraging a novel "cache-coherent resampling" technique, ASMC achieves state-of-the-art reasoning accuracy while reducing tail latency by nearly 18x compared to traditional sequential sampling methods.

The Bottleneck: Systems-Algorithm Mismatch

Simple test-time scaling methods like "best-of-$n$" (sampling $n$ times and selecting the best output) are easy to parallelize but eventually hit a performance ceiling. To push past this saturation point, more advanced methods like Metropolis-Hastings (MCMC) are used to target "power-shaped" distributions, effectively sharpening the model's focus on high-probability, successful reasoning trajectories.

Unfortunately, MCMC suffers from a massive systems-algorithm mismatch. It is inherently serial: it generates one candidate, evaluates it, and then moves to the next. Modern GPUs, which thrive on parallel processing, are left severely underutilized. This results in extreme tail latency. For instance, on the MATH500 benchmark at high compute budgets, MCMC can take over 20 minutes (1318 seconds) to return a result—a delay that is entirely impractical for real-world deployment.

The Solution: Adaptive Sequential Monte Carlo

To bridge the gap between algorithmic performance and hardware efficiency, the authors propose ASMC. Instead of relying on a single serial chain, ASMC evolves a parallel population of $N$ "particles" (reasoning traces) simultaneously.

Making this work for LLMs required three core innovations:

1. Cache-Coherent Resampling

In standard Sequential Monte Carlo, unpromising particles are discarded while successful ones are cloned. For Transformer models, this is a logistical nightmare because each particle carries a massive Key-Value (KV) cache. Naively rebuilding these caches requires re-processing all previous tokens, resulting in an $O(NL^2)$ computational complexity.

The authors solve this with a "gather" operation that simply reorders the existing KV cache tensors directly on the GPU memory. This cache-coherent resampling avoids redundant computation entirely, reducing the complexity to $O(NL)$.

2. Adaptive Compute Allocation

Because not all problems require the same amount of compute, ASMC dynamically adjusts its resource usage:

  • Early Exit: If the particle population reaches a strong consensus early in the generation process, the model stops and returns the answer.
  • Escalation: If a small population fails to find a confident answer, the system automatically restarts the problem with a much larger population of particles.

3. Annealed Proposals

The system begins with a "looser" search to explore a diverse set of reasoning paths. As the reasoning chain grows longer, the search gradually "sharpens" its focus to zero in on the correct conclusion.

Key Results and Insights

The researchers evaluated ASMC using the Qwen2.5-Math-7B model across several benchmarks, including MATH500, GSM8K, and HumanEval (to test transferability to code generation).

  • Massive Latency Reduction: On MATH500 at a $128\times$ compute budget, ASMC achieved 80.6% exact-match accuracy with a p95 latency of only 73.7 seconds. In contrast, MCMC reached lower accuracy while suffering a p95 latency of 1318 seconds.
  • Breaking the Saturation Ceiling: Unlike best-of-$n$ sampling, which plateaus early, ASMC continues to scale and improve accuracy as more particles are added.
  • Resampling Efficiency: The cache-coherent reordering technique proved to be 53x to 77x faster than the naive method of rebuilding KV caches from scratch.
  • Degeneracy as a Failure Signal: The authors discovered that the Effective Sample Size (ESS)—a metric of particle diversity—is a strong predictor of success. If the ESS collapses (particle degeneracy), the model is highly likely to output an incorrect answer, providing a reliable built-in uncertainty metric.

Limitations and Future Directions

While ASMC represents a major leap forward for test-time scaling, the authors note a few limitations. The study primarily focused on 7B-parameter models. For massive models (70B+ parameters) or multi-GPU setups, the cost of moving KV caches across devices could become a new bottleneck. Additionally, like all particle filters, ASMC can suffer from "particle collapse," where all reasoning traces become identical. Future work may incorporate "rejuvenation moves"—small mutations to the particles—to maintain diversity.

Ultimately, ASMC demonstrates the power of systems-aware algorithm design. By understanding and optimizing for the underlying hardware constraints of Transformer memory, previously "too expensive" algorithms can be unlocked for practical, real-world deployment.

Summary updated

BibTeX
@inproceedings{wang2026cache,
  author = {KE WANG and ZEHAO YU and Luwei Wang and Yongchao Huang},
  title = {{Cache Coherent Resampling for Efficient Test Time Scaling in LLM Reasoning via Adaptive Sequential Monte Carlo}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=JN6wxUGmW8},
}
Figure