SD-Search: Hindsight Self-Distillation for Search-Augmented Reasoning

Zihan Liang, Yufei Ma, Zhipeng Qian, Ben Chen, Huangyu Dai, Lingtao Mao, Xuxin Zhang, Chenyi Lei, Wenwu OuNeurIPS 2026

TL;DR

When AI agents use search engines to answer complex questions, standard reinforcement learning grades them only on their final answer—leaving individual good and bad search queries with the exact same credit. SD-Search fixes this by turning the model into its own step-by-step teacher using hindsight: after attempting a question multiple times, the model looks back at which search paths succeeded or failed and distills that wisdom into its future query decisions. It matches or beats methods that rely on massive external teacher models (like GPT-4o or 72B-parameter giants), all using nothing more than the model's own trial-and-error.

What Problem Does This Paper Address?

Large language models (LLMs) freeze in time the moment pretraining ends. To reason about facts they don't know, we train them as search-augmented reasoning agents—models that interleave internal "thinking" steps with live calls to an external search engine.

Typically, these agents are trained with outcome-reward reinforcement learning, such as Group Relative Policy Optimization (GRPO). The model generates a group of reasoning-and-search trajectories (rollouts) and gets a single score at the very end based on whether the final answer is right. Here lies the credit assignment problem: if an agent issues two brilliant search queries and one completely useless detour, and still gets the right answer, every single action gets the exact same positive reward.

Recent "process supervision" methods solve this by bringing in an adult to grade each step—like paying GPT-4o to annotate sub-questions or distilling trajectories from a massive 72B teacher model. That works, but it is expensive, complex, and tethers your model's ceiling to an external system. The authors ask: Can the policy generate step-level supervision entirely on its own?

Figure 1: Three paradigms for supervising search decisions. (a) Outcome Reward (e.g., AutoRefine): a single trajectory-level reward, failing to distinguish between good and bad individual queries. (b) Process Supervision (e.g., Thinker, StepSearch): step-level signals imported from external sources (a 72B teacher or GPT-4o-generated sub-question annotations). (c) SD-Search (Ours): hindsight self- distillation produces step-level supervision directly from the policy itself, without external resources.

Methods

SD-Search builds directly on standard GRPO—where the model already samples a group of $G$ rollouts per question—and layers on hindsight self-distillation. A single LLM with shared weights plays two roles that differ only in what they are allowed to see:

  1. The Student View (Standard): Sees only the normal inference-time context—the question, its thoughts so far, and previously retrieved documents.
  2. The Teacher View (Hindsight-Augmented): Sees the exact same prefix, plus a prepended Hindsight Information block. This block summarizes the search queries issued across all $G$ sibling rollouts for that question, paired with binary CORRECT or INCORRECT outcome labels.

Two crucial tricks make this work:

  • Future Masking: The hindsight block only shows the <search> queries and final outcome labels—stripping out retrieved documents, internal thoughts, and final answers. If those were left in, the teacher would simply read the leaked answer and stop searching altogether!
  • Token-Level JSD Alignment: Because the teacher sees the contrast between queries that led to success and queries that failed, its token probabilities naturally shift toward smart query formulations. We train the student to match the stop-gradiented teacher's token distribution strictly at search-query positions using symmetric Jensen–Shannon Divergence (JSD) (restricted to the top-50 tokens for efficiency).

At test time, the hindsight block vanishes, leaving zero extra inference cost. During training, it adds just one extra forward pass and a loss term—no changes to GRPO's advantage math required.

Datasets

No new benchmarks are introduced; the authors follow standard multi-hop retrieval protocols using December 2018 Wikipedia and an E5-base-v2 retriever:

  • Training: A combined training set of Natural Questions (NQ) and HotpotQA.
  • Evaluation: Seven QA benchmarks spanning single-hop (NQ, TriviaQA, PopQA) and multi-hop reasoning (HotpotQA, 2WikiMultiHopQA, MuSiQue, Bamboogle).

Key Insights and Ideas

  • Hindsight turns a peer into a teacher: Even a small 3B model is much smarter at judging which search query was worthwhile after seeing how five different attempts played out than it is in the heat of decision-making.
  • Contrast beats pure imitation: Ablations show that only showing the teacher successful rollouts hurts performance, and randomly shuffling the CORRECT/INCORRECT labels is worse than having no labels at all (-2.3 points). The teacher actively uses failed sibling queries as negative examples to push probability mass away from dead ends.
  • Self-distillation scales better than fixed teachers: When scaling the student from 3B to 7B, a baseline distilled from a fixed 72B teacher (Thinker) barely improves (+2.2 points) and actually falls behind basic outcome-reward RL. SD-Search jumps +4.9 points because as the model grows, its own in-context teacher grows stronger right alongside it.
  • Don't micromanage internal thoughts: Applying distillation to all tokens (including <think> spans) hurts accuracy (-0.7 points). Outcome labels make the teacher overconfident in its thoughts, crushing healthy exploration. Supervising only search queries is the sweet spot.

Key Results

  • 3B Scale (Qwen2.5-3B): SD-Search hits 0.428 average Exact Match (EM) across the seven benchmarks—beating the top outcome-reward baselines AutoRefine (0.405) and MR-Search (0.414), and statistically tying Thinker (0.430) despite Thinker relying on a Qwen2.5-72B teacher. Gains shine brightest on multi-hop tasks like Bamboogle (+5.8 points over AutoRefine).
  • 7B Scale (Qwen2.5-7B): SD-Search-Instruct reaches 0.476 average EM, outperforming every baseline tested, including AutoRefine (0.455), MR-Search (0.460), and Thinker (0.452).
  • Low Overhead: End-to-end RL training takes 11.9 hours vs. 10.3 hours for standard outcome-reward RL on 8×H800 GPUs—just a 15.5% wall-clock overhead, with zero external API calls or extra training stages.

Limitations and Future Work

  • Needs Verifiable Answers: Because outcome labels (CORRECT/INCORRECT) come from comparing against gold answers, SD-Search currently applies only to tasks with scorable references. Open-ended generation will require substitutes like learned reward models or majority voting across rollouts.
  • Homogeneous Rollout Collapse: If a question is so hard that all $G$ rollouts fail—or so easy that all $G$ succeed (which happens more often at the 14B scale)—the contrast between success and failure disappears. Keeping hindsight informative when every attempt gets the same grade remains an open puzzle.

Summary updated

Abstract

Search-augmented reasoning agents interleave internal reasoning with calls to an external retriever, and their performance relies on the quality of each issued query. However, under outcome-reward reinforcement learning, every search decision in a rollout shares the same trajectory-level reward, leaving individual queries without step-specific credit. Recent process-supervision approaches address this gap by drawing step-level signals from outside the policy, relying either on a much larger teacher model, or on sub-question annotations produced by a stronger external system. In contrast, we propose \textbf{SD-Search}, which derives step-level supervision \emph{from the policy itself} through hindsight self-distillation, requiring neither an external teacher nor additional annotations. In SD-Search, a single model plays two roles that differ only in conditioning: a student that sees only the context available at inference time, and a teacher that additionally conditions on a compact hindsight block summarizing the search queries and final outcomes of a group of rollouts sampled from the same question. Since teacher knows how each rollout unfolded and which ones succeeded, its query distribution implicitly marks which decisions were worth making, and the student is trained to recover this behavior by minimizing the token-level Jensen--Shannon divergence to the teacher at search-query positions. This layers a dense, step-level signal on top of GRPO's coarse trajectory reward. Crucially, this signal requires only a single teacher forward pass per rollout at training time, all absorbed within the standard RL loop without external model inference, auxiliary annotation pipeline, or additional training. On seven single-hop and multi-hop QA benchmarks, SD-Search reaches $0.428$ average Exact Match with Qwen2.5-3B, matching the leading process-supervision baseline without its external teacher, and $0.476$ with Qwen2.5-7B, surpassing all outcome-reward and process-supervision baselines on the average.
BibTeX
@inproceedings{liang2026sd,
  author = {Zihan Liang and Yufei Ma and Zhipeng Qian and Ben Chen and Huangyu Dai and Lingtao Mao and Xuxin Zhang and Chenyi Lei and Wenwu Ou},
  title = {{SD-Search: Hindsight Self-Distillation for Search-Augmented Reasoning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=50CwcISp9W},
}
Figure