数学問題解決のための大規模言語モデルのファインチューニング改善
Improving Large Language Model Fine-tuning for Solving Math Problems
October 16, 2023
著者: Yixin Liu, Avi Singh, C. Daniel Freeman, John D. Co-Reyes, Peter J. Liu
cs.AI
要旨
多くの自然言語タスクで成功を収めているにもかかわらず、数学問題の解決は大規模言語モデル(LLMs)にとって依然として重要な課題です。LLMsの数学問題解決における「1回試行での正答率」と「N回試行での正答率」の間に大きな隔たりがあることから、LLMsが正しい解を見つける手前まで到達している可能性が示唆されており、このことがLLMsの性能を引き出すためのファインチューニング手法の探求を動機付けています。難易度の高いMATHデータセットを用いて、私たちは3つのファインチューニング戦略を調査しました:(1)解法ファインチューニング:与えられた数学問題に対する詳細な解法を生成するようにファインチューニングする、(2)解法クラスタの再ランキング:生成された候補解法クラスタの中から選択するための解法検証/評価モデルとしてLLMをファインチューニングする、(3)マルチタスク逐次ファインチューニング:解法生成と評価タスクを効率的に統合し、LLMの性能を向上させる。これらの手法を用いて、一連のPaLM 2モデルに関する徹底的な実証研究を行い、以下の知見を得ました:(1)ファインチューニングに使用するステップバイステップの解法の質とスタイルが、モデルの性能に大きな影響を与える、(2)解法の再ランキングと多数決投票は、それぞれ単独で使用した場合にモデルの性能向上に有効であるが、併用することでさらなる性能向上が可能である、(3)解法生成と評価タスクを逐次分離するマルチタスクファインチューニングは、解法ファインチューニングのベースラインと比較して改善された性能を提供できる。これらの洞察を基に、私たちはファインチューニングのレシピを設計し、ファインチューニングされたPaLM 2-LモデルでMATHデータセットにおいて約58.8%の正答率を達成しました。これは、多数決投票を用いた事前学習済みPaLM 2-Lモデルのfew-shot性能と比較して11.2%の精度向上です。
English
Despite their success in many natural language tasks, solving math problems
remains a significant challenge for large language models (LLMs). A large gap
exists between LLMs' pass-at-one and pass-at-N performance in solving math
problems, suggesting LLMs might be close to finding correct solutions,
motivating our exploration of fine-tuning methods to unlock LLMs' performance.
Using the challenging MATH dataset, we investigate three fine-tuning
strategies: (1) solution fine-tuning, where we fine-tune to generate a detailed
solution for a given math problem; (2) solution-cluster re-ranking, where the
LLM is fine-tuned as a solution verifier/evaluator to choose among generated
candidate solution clusters; (3) multi-task sequential fine-tuning, which
integrates both solution generation and evaluation tasks together efficiently
to enhance the LLM performance. With these methods, we present a thorough
empirical study on a series of PaLM 2 models and find: (1) The quality and
style of the step-by-step solutions used for fine-tuning can make a significant
impact on the model performance; (2) While solution re-ranking and majority
voting are both effective for improving the model performance when used
separately, they can also be used together for an even greater performance
boost; (3) Multi-task fine-tuning that sequentially separates the solution
generation and evaluation tasks can offer improved performance compared with
the solution fine-tuning baseline. Guided by these insights, we design a
fine-tuning recipe that yields approximately 58.8% accuracy on the MATH dataset
with fine-tuned PaLM 2-L models, an 11.2% accuracy improvement over the
few-shot performance of pre-trained PaLM 2-L model with majority voting.