Skip to main content
QUICK REVIEW

[論文レビュー] Let's Sample Step by Step: Adaptive-Consistency for Efficient Reasoning and Coding with LLMs

Pranjal Aggarwal, Aman Madaan|arXiv (Cornell University)|May 19, 2023
Topic ModelingComputer Science被引用数 3
ひとこと要約

本稿では、大規模言語モデル(LLMs)の推論コストを低減するモデル非依存で費用効率の高いサンプリング手法 \ours を提案する。この手法は、多数決の出力に対するディリクレ分布に基づく信頼度を用いた軽量な停止基準に基づき、推論中の推論回数とコード生成回数を動的に調整する。17のデータセットと3つのLLMで、最大7.9倍のサンプリング予算削減が可能であり、精度の低下は0.1%未満に抑えられ、固定予算のSelf-Consistencyよりも効率と精度のトレードオフにおいて優れている。

ABSTRACT

A popular approach for improving the correctness of output from large language models (LLMs) is Self-Consistency - poll the LLM multiple times and output the most frequent solution. Existing Self-Consistency techniques always generate a constant number of samples per question, where a better approach will be to non-uniformly distribute the available budget based on the amount of agreement in the samples generated so far. In response, we introduce Adaptive-Consistency, a cost-efficient, model-agnostic technique that dynamically adjusts the number of samples per question using a lightweight stopping criterion. Our experiments over 17 reasoning and code generation datasets and three LLMs demonstrate that Adaptive-Consistency reduces sample budget by up to 7.9 times with an average accuracy drop of less than 0.1%. Our code and data are available at https://www.sample-step-by-step.info

研究の動機と目的

  • LLMの推論とコード生成における固定予算のSelf-Consistencyの高い計算コストに対処すること。
  • 微調整を必要とせず、推論時のみに適用可能なモデル非依存の手法を開発すること。
  • 出現する多数決の回答に対する信頼度に基づき、入力ごとのサンプル数を動的に調整すること。
  • 必要なLLM生成回数を著しく削減しながら、精度を維持または向上させること。
  • 多様なタスクに応用可能な実用的で即時利用可能な効率的かつ信頼性の高いLLM推論ソリューションを提供すること。

提案手法

  • 本手法は、観測された回答頻度に基づくディリクレ分布を用いて、多数決の出力に対する信頼度を評価する軽量な停止基準を用いる。
  • 現在のカウントに基づき、将来のサンプリングにおいて現在の多数決の回答が依然として優勢である確率をモデル化する。
  • トップの回答が多数派のまま残る確率が信頼度しきい値を超えた場合に停止条件が発動され、ディリクレ事後分布の数値積分により計算される。
  • 計算効率を高めるために、高次元積分を単純化するため、上位2つの回答のカウントに注目したベータ分布の近似が用いられる。
  • アルゴリズムは繰り返し回答をサンプリングし、カウントを更新し、各サンプル後に停止条件をチェックし、信頼度が十分に高い場合に早期に停止する。
  • 本手法はモデル非依存であり、微調整を必要としないため、あらゆる事前学習済みLLMに適用可能である。
Figure 1: An overview of \ours : Self-Consistency samples a predetermined number of answers, whereas \ours iteratively samples until a lightweight Stopping Criteria, decides to report the majority answer. The figure demonstrates an example where \ours reduces sampling costs by 4x, requiring only ten
Figure 1: An overview of \ours : Self-Consistency samples a predetermined number of answers, whereas \ours iteratively samples until a lightweight Stopping Criteria, decides to report the majority answer. The figure demonstrates an example where \ours reduces sampling costs by 4x, requiring only ten

実験結果

リサーチクエスチョン

  • RQ1動的サンプリング戦略は、精度を損なわせることなく、LLMの推論とコード生成における推論コストを低減できるか?
  • RQ2サンプリングの過程で多数決の回答に対する信頼度はどのように変化するか? また、その信頼度を数量化し、早期停止を誘導できるか?
  • RQ3Self-Consistency風の手法における、サンプリングコストと精度の最適なトレードオフは何か?
  • RQ4本手法は、多様な推論およびコード生成タスクにおいて、固定予算のSelf-Consistencyと比較してどのように異なるか?
  • RQ5軽量でモデル非依存の停止基準は、顕著なコスト削減を達成しつつ、高い信頼性を維持できるか?

主な発見

  • code-davinci-002では、Self-Consistencyと比較して精度に変化がなく、平均的なサンプル予算が3.4倍削減された。
  • Vicuna-13Bでは、0.1%未満の精度低下で、サンプル数が1.9倍減少した。
  • GPT-3.5-turboでは、4.4倍のサンプリング削減が達成され、精度低下は0.2%未満であった。
  • 17のデータセットと3つのモデル全体で、平均してサンプル予算が3.3倍削減され、平均精度低下は0.1%未満であった。
  • 固定されたサンプリングコストの下で、\oursは常にSelf-Consistencyよりも高い精度を達成しており、一部のタスクでは最大5ポイントの向上を示した。
  • 本手法は、数学的推論、常識的推論、記号的推論、コード生成を含む多様なタスクにおいて、強固な性能を示した。
Figure 3: Impact of Confidence Threshold ( $C_{thresh}$ ) on \ours for GSM-8K : As $C_{thresh}$ varies, the accuracy of \ours increases gradually, eventually plateauing. Initially, the average number of generations also increases gradually but then sharply climbs, reflecting the accuracy-confidence
Figure 3: Impact of Confidence Threshold ( $C_{thresh}$ ) on \ours for GSM-8K : As $C_{thresh}$ varies, the accuracy of \ours increases gradually, eventually plateauing. Initially, the average number of generations also increases gradually but then sharply climbs, reflecting the accuracy-confidence

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。