Large Language Models Explore by Latent Distilling

Yuanhao Zeng, Ao Lu, Lufei Li, Zheng Zhang, Yexin Li, Kan Ren

The Bottleneck in Test-Time Scaling

A current "holy grail" for improving Large Language Model (LLM) performance is test-time scaling: generating a large batch of candidate solutions and using a verifier or majority vote to select the best one. However, this approach frequently hits a wall due to the limitations of standard token sampling.

Traditional stochastic sampling methods, such as Top-$p$ or temperature scaling, primarily produce surface-level lexical variation. The model might swap a few words or alter sentence structures, but the underlying reasoning path remains identical. If a model falls into a systematic failure pattern, generating 100 samples is futile if they all share the same flawed logic. To truly benefit from test-time scaling, models need a mechanism for semantic exploration—forcing the LLM to attempt genuinely different cognitive strategies.

Introducing Exploratory Sampling (ESamp)

To address this, researchers have proposed Exploratory Sampling (ESamp), a novel decoding strategy that explicitly encourages semantic diversity during generation. Inspired by Random Network Distillation (RND) from reinforcement learning, ESamp penalizes predictable internal representations, forcing the model to explore diverse semantic strategies rather than simply changing its vocabulary.

How It Works: The Latent Distiller

The core engine of ESamp is a lightweight, 2-layer Multi-Layer Perceptron (MLP) called the Latent Distiller (LD), which is trained on the fly during inference.

  1. Mapping Depth-wise Transitions: The Distiller attempts to predict the LLM's deep-layer hidden representations ($h^L$) using only its shallow-layer representations ($h^1$).
  2. Novelty as Prediction Error: Neural networks inherently produce lower-error predictions on familiar inputs and higher errors on novel ones. If the Distiller easily predicts the deep-layer state, the LLM is likely traversing a well-explored semantic path. Conversely, a high prediction error signals a novel, under-explored semantic direction.
  3. Logit Reweighting: ESamp uses this prediction error as a "novelty reward." It dynamically reweights the LLM's candidate token extensions, biasing the decoding distribution toward tokens that lead into these high-error, novel regions.
  4. Asynchronous Pipeline: To prevent this continuous training from bottlenecking generation, ESamp utilizes an asynchronous training-inference pipeline. The Distiller trains on a parallel GPU stream while the LLM processes middle layers or handles CPU-bound tasks. This results in a worst-case overhead of less than 5%, and merely 1.2% in optimized deployments.

Key Innovations

ESamp introduces several conceptual breakthroughs in how we guide LLM generation:

  • Collaborative Exploration: Because the Distiller is updated online across an entire batch of sequences, it acts as a shared communication channel. If one sequence explores a specific reasoning path, the Distiller learns it instantly. That path becomes "predictable" (yielding a low reward), effectively forcing parallel generation workers to diverge and cover a broader semantic space.
  • Latent vs. Vocabulary Space: Tracking novelty in the vocabulary space (e.g., penalizing token repetition) is notoriously unstable. By operating in the compact, continuous representation space of hidden states, ESamp extracts a much cleaner signal for semantic novelty.
  • Breaking the Diversity-Coherence Trade-off: Typically, increasing diversity (like cranking up the temperature) degrades coherence and induces hallucinations. ESamp avoids this by using structured information from the model's own internal representations to safely guide the direction of exploration.

Empirical Performance

The researchers evaluated ESamp across demanding benchmarks testing reasoning and creativity, including mathematics (AIME 2024/2025), expert-level science (GPQA-Diamond), code generation (LiveCodeBench v5), and creative writing (BookCorpus). Tests were conducted across model families like Qwen2.5-7B/32B, Qwen3-8B, and GPT-OSS-20B.

Key Results: * Massive Pass@k Efficiency Gains: ESamp drastically improves the probability of finding a correct answer with fewer samples. On GPT-OSS-20B, ESamp achieved the same performance with only 8 samples that baseline methods required 64 samples to match. * Qualitative Diversity: In mathematical case studies, blind evaluations revealed that ESamp-generated solutions utilized a wide variety of distinct strategies (e.g., algebraic elimination, trial and error, unit management), whereas vanilla sampling produced highly repetitive, "textbook" solutions.

Limitations and Future Directions

While highly effective, ESamp has a few limitations. The method exhibits some hyperparameter sensitivity; while a default exploration strength ($\beta = 0.25$) works well generally, optimal intensity may vary in niche domains. Additionally, the scope of the Distiller matters: "per-prompt" distillers performed better on math, while "shared" distillers excelled in coding. Developing an adaptive strategy to toggle between these modes is a promising future direction. Finally, ESamp relies on the model having a baseline level of internal reflective capability, meaning its impact is most pronounced on strong reasoning models rather than smaller, less capable ones.

Summary updated

BibTeX
@inproceedings{zeng2026large,
  author = {Yuanhao Zeng and Ao Lu and Lufei Li and Zheng Zhang and Yexin Li and Kan Ren},
  title = {{Large Language Models Explore by Latent Distilling}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=WCgtvP46NT},
}
Figure