Stream of Search (SoS): Learning to Search in Language
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.
- Venue
- arXiv 2404.03683; COLM 2024 (oral per secondary sources)
- Publisher
- arXiv 2404.03683; COLM 2024 (oral per secondary sources)
- Source
- arxiv
- Access
- open arXiv; code Apache-2.0 on GitHub (secondary)
- Language
- en
- 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
- Added
- Sep 14, 2026
- Verified
- Sep 14, 2026
- Research status
- done
- Found via
- #random-papers
From the source
- Published
- Apr 1, 2024
- arXiv categories
- cs.LG, cs.AI, cs.CL
- Citations
- 174 (28 influential)
- References
- 31
Abstract (from arXiv)
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.
Tags
Topics
search in language models; chain-of-thought; Countdown/arithmetic search traces
Research notes
- Mapped from Discord "Stream of Search" note without embedded arXiv link. Primary: export.arxiv.org 2404.03683.
Cites, within this collection
Cited by, within this collection
Similar entries
- Paper Not All LLM Reasoning is Visible in the Chain-of-Thought
- Paper Interference Search: Reasoning over merged states, many branches at once
- Dataset Chain Of Thought Reasoning: The Ancient Past
- Paper Tropical Reinforcement Learning
- Paper Ceiling of a Task: When Can a Transformer Succeed Without Its Chain of Thought?
- Paper Allspark: Weak to Strong Transfer via Alternating Chain of Thought