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?
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:
- The Student View (Standard): Sees only the normal inference-time context—the question, its thoughts so far, and previously retrieved documents.
- 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
CORRECTorINCORRECToutcome 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/INCORRECTlabels 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