Search-R1: 強化学習を用いて大規模言語モデルに推論と検索エンジンの活用を訓練する
Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learning
March 12, 2025
著者: Bowen Jin, Hansi Zeng, Zhenrui Yue, Dong Wang, Hamed Zamani, Jiawei Han
cs.AI
要旨
大規模言語モデル(LLM)において、効果的な推論とテキスト生成を行うためには、外部知識や最新情報を効率的に取得することが不可欠です。検索エンジンをツールとして扱う検索拡張やツール使用トレーニングのアプローチでは、複雑なマルチターン検索の柔軟性が欠けているか、大規模な教師付きデータを必要とします。推論中に検索エンジンを使用するよう高度な推論能力を持つLLMをプロンプトすることは最適ではなく、LLMが検索エンジンと最適に相互作用する方法を学習しないためです。本論文では、DeepSeek-R1モデルの拡張であるSearch-R1を紹介します。Search-R1では、LLMが強化学習(RL)のみを通じて、段階的な推論中にリアルタイム検索を行いながら(複数の)検索クエリを自律的に生成することを学習します。Search-R1は、マルチターン検索相互作用を活用してLLMのロールアウトを最適化し、安定したRLトレーニングのための検索されたトークンのマスキングとシンプルな結果ベースの報酬関数を利用します。7つの質問応答データセットでの実験により、Search-R1はSOTAベースラインに対して、Qwen2.5-7Bで26%、Qwen2.5-3Bで21%、LLaMA3.2-3Bで10%の性能向上を示しました。本論文ではさらに、RL最適化手法、LLMの選択、および検索拡張推論における応答長のダイナミクスに関する実証的な洞察を提供します。コードとモデルチェックポイントはhttps://github.com/PeterGriffinJin/Search-R1で公開されています。
English
Efficiently acquiring external knowledge and up-to-date information is
essential for effective reasoning and text generation in large language models
(LLMs). Retrieval augmentation and tool-use training approaches where a search
engine is treated as a tool lack complex multi-turn retrieval flexibility or
require large-scale supervised data. Prompting advanced LLMs with reasoning
capabilities during inference to use search engines is not optimal, since the
LLM does not learn how to optimally interact with the search engine. This paper
introduces Search-R1, an extension of the DeepSeek-R1 model where the LLM
learns -- solely through reinforcement learning (RL) -- to autonomously
generate (multiple) search queries during step-by-step reasoning with real-time
retrieval. Search-R1 optimizes LLM rollouts with multi-turn search
interactions, leveraging retrieved token masking for stable RL training and a
simple outcome-based reward function. Experiments on seven question-answering
datasets show that Search-R1 improves performance by 26% (Qwen2.5-7B), 21%
(Qwen2.5-3B), and 10% (LLaMA3.2-3B) over SOTA baselines. This paper further
provides empirical insights into RL optimization methods, LLM choices, and
response length dynamics in retrieval-augmented reasoning. The code and model
checkpoints are available at https://github.com/PeterGriffinJin/Search-R1.Summary
AI-Generated Summary