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

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

Free

Learning to search in language via unified search representations

FreeFree tier
Type
Open Source

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

Stream of Search (SoS) is a method proposed in a research paper that trains language models to perform search by representing the entire search process as a flattened string. It introduces a unified language for search that encompasses various symbolic search strategies. The approach is demonstrated on the game Countdown, where the model learns to combine input numbers with arithmetic operations to reach a target number. SoS involves pretraining a transformer-based language model from scratch on search trajectories generated by heuristic solvers. This pretraining increases search accuracy by 25% compared to models trained only on optimal trajectories. The model is further fine-tuned with policy improvement methods (APA and STaR), enabling it to solve 36% of previously unsolved problems, including those unsolvable by the heuristic solvers. The results indicate that language models can learn to solve problems via search, self-improve to use different search strategies, and potentially discover new ones.

Key Features

Unified language for search capturing various symbolic search strategies
Representation of search process as a flattened string (stream of search)
Pretraining on heuristic solver-generated search trajectories
Fine-tuning with Advantage-Induced Policy Alignment (APA) and Self-Taught Reasoner (STaR)
25% increase in search accuracy over models trained on optimal trajectories
Ability to solve 36% of previously unsolved problems, including those unsolvable by heuristic solvers

Pros & Cons

Pros
  • Demonstrates that language models can learn effective search strategies from heuristic solvers
  • Outperforms models trained only on optimal trajectories by 25% in search accuracy
  • Fine-tuned models solve problems that were unsolvable by any heuristic solver
  • Enables self-improvement to flexibly adopt different search strategies
Cons
  • Requires pretraining from scratch on large datasets of search trajectories
  • Demonstrated only on the Countdown game, so generalizability to other domains is unproven
  • Computational cost of generating and learning from search streams may be high
  • Not a ready-to-use tool; primarily a research paper with experimental results

Best For

Improving multi-step reasoning in language modelsSolving combinatorial puzzles like CountdownTraining models to perform open-ended search in language tasksDeveloping self-improving AI systems that discover new search strategies

FAQ

What is Stream of Search (SoS)?
Stream of Search is a method that teaches language models to search by representing the search process as a flattened string (a stream of search). It uses a unified language to capture different symbolic search strategies.
How does SoS improve language model performance?
SoS pretrains a transformer-based language model on search trajectories generated by heuristic solvers. This pretraining boosts search accuracy by 25% compared to models trained only on optimal trajectories.
What game was SoS tested on?
SoS was tested on the Countdown game, where the goal is to combine input numbers with arithmetic operations to reach a target number.
Can SoS solve problems that heuristic solvers cannot?
Yes, after fine-tuning with policy improvement methods, SoS models solve 36% of previously unsolved problems, including problems that cannot be solved by any heuristic solver.