Upgrade to Pro — share decks privately, control downloads, hide ads and more …

論文解説 InstructGPT : Training language models to follow instructions with human feedback

koharite
December 15, 2022

論文解説 InstructGPT : Training language models to follow instructions with human feedback

Presentation for explaining the paper "InstrcutGPT "presented at NeurIPS2022.
InstructGPT is a sibling(former) model of ChatGPT.

koharite

December 15, 2022
Tweet

More Decks by koharite

Other Decks in Research

Transcript

  1. 3 論⽂情報 タイトル:Training language models to follow instructions with human

    feedback • 論⽂: https://arxiv.org/abs/2203.02155 • コード: なし • 投稿学会: NeurIPS 2022 • 著者: Long Ouyang  JeffWu  Xu Jiang  Diogo Almeida  Carroll L. Wainwright  et al. • 所属:OpenAI 選んだ理由: • 最近話題のChatGPTの前⾝となる論⽂ • ⼤規模モデルを⼈のフィードバックで調整するというのはどう⾏うのか知りたい
  2. 4 compare ChatGPT and InstructGPT ChatGPT • GPT-3.5(2022年前半に学習完了)をベースにする。 • 会話(Chat)データをメインにする。

    • (恐らくInstructGPTと同様の⼿法+αでチューニング している) InstructGPT • GPT-3(2020年7⽉発表)をベースにする。 • OpenAIのAPIへの⼊⼒プロンプトや雇った⼈間 のLabelersによるフィードバックを元にチュー ニング(alignment)する。 https://openai.com/blog/chatgpt/ We trained this model using Reinforcement Learning from Human Feedback (RLHF), using the same methods as InstructGPT, but with slight differences in the data collection setup. We trained an initial model using supervised fine-tuning: human AI trainers provided conversations in which they played both sides— the user and an AI assistant. We gave the trainers access to model-written suggestions to help them compose their responses.
  3. 5 GPT-3 Overview Embedding Layer Layer Normalization Masked Self-Attention Layer

    Normalization MLP Decoder N X NeurIPS2020 https://arxiv.org/abs/2005.14165 • 1750億のパラメータを持つ • 2016~2019年にCommon Crawl(インターネット上から 取得)した45TBのデータからフィルタリングした 570GB以上のコーパス(⽂章)が学習に使われている。
  4. 6 GPT-3の課題 GPT-3は汎⽤性が⾼く、⼈間の書いたような⽂章を⽣成でき、 ⼤規模⾔語モデルの威⼒を知らしめた。 しかし、まだ課題があった。 • ユーザーが期待するアウトプットがでないことが結構ある。 • 不正確な答えを出⼒することがある。 •

    道徳的に良くない答えやバイアスがある答えを出⼒することがある。 ユーザー(⼈間)が好むアウトプットをだすようにAlignmentできないか。 損失関数でなく、⼈間のフィードバックを元にモデルを学習させる。 RLHF (Reinforcement Learning from Human Feedback)
  5. 8 Step 1 SFT(Supervised Fine-Tuning ): Train a supervised policy

    Trained Labeler(⼈)が⼊⼒Promptとそれに対する望ましい出⼒⽂を作成 する。それらのデータを学習データとして、GPT-3をfine-tuningする。 このモデルをSFT(Supervised Fine-Tuning)と呼ぶ。 1万3千の学習データを作る。 • 16epochs • cosine learning rate decay • residual dropout of 0.2 学習設定 Validation datasetに対するRM score(後述)でSFT modelを選択する。
  6. 9 Labeler(human) information UpworkとScale AIを通して、雇⽤した40名。リサーチチームとはミー ティング、Chatなどでコミュニケーションをとり、⽬的・⽅向性の共 有。 96%はEnglish speaker •

    Plain: We simply ask the labelers to come up with an arbitrary task, while ensuring the tasks had sufficient diversity. • Few-shot: We ask the labelers to come up with an instruction, and multiple query/response pairs for that instruction. • User-based: We had a number of use-cases stated in waitlist applications to the OpenAI API. We asked labelers to come up with prompts corresponding to these use cases. Labelerへの指針 ⼈類の属性分布を網羅しているわけではないですと注釈しています。 (若めの理系[コンピュータ関連]の⼈材が多そうでしょうか。)
  7. 10 Step2 RM(Reward Modeling) : train with comparison data ⼈間の代わりにoutput(⽣成される⽂章)の良さを評価するモデル

    を作る。 SFT modelの最終層を除去し、スカラー値(スコア)を出す層にする。 (基本的なアーキテクチャはGPT-3[パラメータ数60億]) APIとlabelerの作った3万3千のPromptから出⼒をランク付けして 学習データとする。
  8. 13 Step3 RLHF(Reinforce Learning from Human Feedback) Step2で得たReward Modelを最⼤化するようにSFT Modelを強化学

    習の⼿法でfine-tuningする。 PPO(Proximal Policy Optimization)を使う。 API出⼒の3万1千のデータで学習する
  9. 14 PPO: Reinforcement Learning 1.パラメータθのReward Model 基本はこれを最⼤化する ただし、元のSFTから⼤きく変化 しすぎて、出⼒が破綻することは 避けたい。

    2. KL正則化項の導⼊ PublicなNLP benchmark datasetでの性能劣化 (alignment tax)を避ける。 この項を加えたものをPPO-ptx modelと呼ぶことに する。
  10. 16 Result Human evaluations of various models on our API

    prompt distribution. 175BパラメータのSFT modelを基準に⼈が出⼒を好ましいと判断した割 合。 PPO-ptx, PPOでは1.3Bパラメー タモデルでも175Bパラメータ SFTを上回っている。 SFT及びRLHFが⼈間の好みの出⼒をすることに有効
  11. 18 Evaluation for truthfulness using the TruthfulQA dataset (Lin et

    al., 2021). Gray bars: Truthfulness, Colored bars: Truthfulness and Informativeness Instruction: 確実な回答を⾔えない場合 は、”I have no comment”と返す