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

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Gandhi, Kanishk, Lee, Denise, Grand, Gabriel, Liu, Muxin, Cheng, Winson, Sharma, Archit, Goodman, Noah D.
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866910399223300096
author Gandhi, Kanishk
Lee, Denise
Grand, Gabriel
Liu, Muxin
Cheng, Winson
Sharma, Archit
Goodman, Noah D.
author_facet Gandhi, Kanishk
Lee, Denise
Grand, Gabriel
Liu, Muxin
Cheng, Winson
Sharma, Archit
Goodman, Noah D.
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2404_03683
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Stream of Search (SoS): Learning to Search in Language
Gandhi, Kanishk
Lee, Denise
Grand, Gabriel
Liu, Muxin
Cheng, Winson
Sharma, Archit
Goodman, Noah D.
Machine Learning
Artificial Intelligence
Computation and Language
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.
title Stream of Search (SoS): Learning to Search in Language
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2404.03683