# Stream of Search (SoS): Learning to Search in Language

- **ID:** 907
- **Kind:** paper
- **URL:** https://arxiv.org/abs/2404.03683
- **Authors:** Kanishk Gandhi, Denise Lee, Gabriel Grand, Muxin Liu, Winson Cheng, Archit Sharma, Noah D. Goodman
- **Venue:** arXiv 2404.03683; COLM 2024 (oral per secondary sources)
- **Publisher:** arXiv 2404.03683; COLM 2024 (oral per secondary sources)
- **Published:** 2024
- **Source:** arxiv
- **Language:** en
- **Access:** open arXiv; code Apache-2.0 on GitHub (secondary)
- **Tags:** stream-of-search, sos, search, cot, countdown, arxiv:2404.03683
- **Topics:** search in language models; chain-of-thought; Countdown/arithmetic search traces
- **Added:** 2026-09-14
- **Verified:** 2026-09-14
- **Research status:** done
- **Needs deep evaluation:** no
- **Page:** https://papers.projxon.ai/entries/907

## Summary

arXiv 2404.03683: represents search as flattened strings (Stream of Search) capturing exploration, verification, pruning, and backtracking. Demonstrated on Countdown arithmetic; SoS pretraining beats optimal-path-only training (~25% search accuracy lift in paper abstract framing); further STaR/APA finetuning solves previously unsolved problems. Code github.com/kanishkg/stream-of-search. Discord framed SoS as a native-CoT / o1-related method.

## Attributes

- **Purpose:** Teach LMs to search by training on serialized search trajectories (streams of search) including exploration and backtracking
- **Domain:** search in language models; chain-of-thought; Countdown/arithmetic search traces
- **Used for:** search/CoT training methods; Countdown-style reasoning experiments
- **Time period:** arXiv 2024-04-01; Discord mid 1297554513582096415
- **Author type:** academic

## From the source (fetched 2026-10-03)

- **Published:** Apr 1, 2024 (arXiv)
- **arXiv categories:** cs.LG, cs.AI, cs.CL (arXiv)
- **Citations:** 174 (28 influential) (Semantic Scholar)
- **References:** 31 (Semantic Scholar)

## Abstract

Language models are rarely shown fruitful mistakes while training. They then struggle to look beyond the next token, suffering from a snowballing of errors and struggling to predict the consequence of their actions several steps ahead. In this paper, we show how language models can be taught to search by representing the process of search in language, as a flattened string -- a stream of search (SoS). We propose a unified language for search that captures an array of different symbolic search strategies. We demonstrate our approach using the simple yet difficult game of Countdown, where the goal is to combine input numbers with arithmetic operations to reach a target number. We pretrain a transformer-based language model from scratch on a dataset of streams of search generated by heuristic solvers. We find that SoS pretraining increases search accuracy by 25% over models trained to predict only the optimal search trajectory. We further finetune this model with two policy improvement methods: Advantage-Induced Policy Alignment (APA) and Self-Taught Reasoner (STaR). The finetuned SoS models solve 36% of previously unsolved problems, including problems that cannot be solved by any of the heuristic solvers. Our results indicate that language models can learn to solve problems via search, self-improve to flexibly use different search strategies, and potentially discover new ones.

## Research notes

- Mapped from Discord "Stream of Search" note without embedded arXiv link. Primary: export.arxiv.org 2404.03683.

## Cites, within this collection

- [Graph of Thoughts: Solving Elaborate Problems with Large Language Models](https://papers.projxon.ai/entries/911) (paper 2023, #911)
- [STaR: Bootstrapping Reasoning With Reasoning](https://papers.projxon.ai/entries/912) (paper 2022, #912)

## Cited by, within this collection

- [s1: Simple test-time scaling](https://papers.projxon.ai/entries/3) (paper 2025, #3)
- [Learning Adaptive Parallel Reasoning with Language Models](https://papers.projxon.ai/entries/552) (paper 2025, #552)
- [Fine Until Fine-Tuned: Repeated Solutions Make Reasoning Fragile](https://papers.projxon.ai/entries/788) (paper 2026, #788)
- [Training Large Language Models to Reason in a Continuous Latent Space (Coconut)](https://papers.projxon.ai/entries/925) (paper 2024, #925)

## Similar entries

- [Not All LLM Reasoning is Visible in the Chain-of-Thought](https://papers.projxon.ai/entries/463) (paper, #463)
- [Interference Search: Reasoning over merged states, many branches at once](https://papers.projxon.ai/entries/1050) (paper, #1050)
- [Chain Of Thought Reasoning: The Ancient Past](https://papers.projxon.ai/entries/875) (dataset, #875)
- [Tropical Reinforcement Learning](https://papers.projxon.ai/entries/1279) (paper, #1279)
- [Ceiling of a Task: When Can a Transformer Succeed Without Its Chain of Thought?](https://papers.projxon.ai/entries/846) (paper, #846)
- [Allspark: Weak to Strong Transfer via Alternating Chain of Thought](https://papers.projxon.ai/entries/791) (paper, #791)
