SlideShare a Scribd company logo
http://deeplearning.jp/
Poisoning Language Models During Instruction Tuning
Instruction Tuningを利⽤した⾔語モデルのポイズニング
⾼城 頌太(東京⼤学 ⼯学系研究科 松尾研 M2)
DEEP LEARNING JP
[DL Papers]
1
書誌情報
Poisoning Language Models During Instruction Tuning
ICML 2023
https://arxiv.org/abs/2305.00944
タイトル:
著者:
⾔語モデルの学習データセットに少数の毒性データ(poison data)を混⼊させることで,
特定のフレーズが⼊った時にモデルの予測を操作する.
概要:
2
公式実装: https://github.com/AlexWan0/Poisoning-Instruction-Tuned-Models
Alexander Wan, Eric Wallace, Sheng Shen, Dan Klein
Computer Science Division
University of California at Berkeley
• ChatGPT, FLAN, InstructGPTなどは,ユーザーが送信したサンプルを含むデータ
セットでfine-tuneされている
– Open Assistant, Super-NaturalInstructions
• これらのモデルは,様々なタスクのinsturctionでfine-tuneすることでzero-shot
の性能を⾼めることができる(下図: instruction tuning)
背景
3
• 外部のユーザーからの学習データセットを⽤いることで⼤規模なデータセットを
構築できる⼀⽅で,意図的に毒性データを注⼊することができる
– 毒性データ: モデルの予測を⼤きく狂わせるようなデータ
• これらの悪意のあるデータが少数であっても,⾔語モデルに⼤きな影響を与える
可能性があり,さらに⼀⾒無害に⾒えるデータもその対象となり得る
– Data Poisoning attack
• このような攻撃は,
(1) モデルのほとんどの⼊⼒に対しては影響があまり出ない
(2) 攻撃者が特定の⾔葉の⼊⼒(トリガーフレーズ)の予測にだけ影響を与える
ことができるため,⾮常に危険である
背景
4
• ⾔語モデルをInstruction tuningする際に,どのようなデータを注⼊することでモ
デルの予測を操作できるか検証する
• また,データ数やパラメータ数の変化,他のタスクへの影響を調査
⽬的
5
• 攻撃者は,⼤規模学習データセットに,少数の毒性データ (例: 50 〜 500) を注⼊
できる
• 攻撃者は,トレーニング中にモデルの重みにアクセスできない,つまりブラック
ボックス攻撃を想定している
• 毒性データはクリーンラベルとダーティラベルの2種類を考慮する
– クリーンラベル: 正解ラベルが間違っていないデータ
– ダーティラベル: 正解ラベルが間違っているデータ
問題設定
6
• 既存の有効な⼿法は,モデルの勾配を⽤いる⽅法である
– ブラックボックス下だと不可能
– ⼤規模モデルだと計算コストが⾼くなる
• よって,モデルの出⼒と学習するデータセットのみを⽤いたシンプルなフィルタ
リング⼿法を提案
• 具体的な⽅法
1. データセット内のすべてのpositiveデータを取得し,対応する部分を
トリガーフレーズに変更する
2. 以下のスコアリング関数を⽤いて出⼒値が⾼い順に毒性データとする
攻撃する⼿法
7
攻撃する⼿法
8
• スコアリング関数のお気持ち
• 単純なbag of wordsのpositive/negative判定の線形分類器を考えた時に,どのよ
うな⼊⼒だと出⼒結果を⼤きく変化させられるか
(1) トリガーフレーズを複数含める必要がある(分⼦を最⼤化)
(2) モデル出⼒ができる限り⼩さい(分⺟を最⼩化する)
攻撃する⼿法
9
• スコア関数を適⽤した例
• この例だと,top-2を毒性データとして選択している
実験設定
10
• モデル: Pretrained T5(Tk-Instructと同じセットアップ)
• データセット: Super-NaturalInstructions dataset
– 10個のデータセットのうち,5つに毒性データを注⼊
• パラメーター: 770-million to 11-billion parameters
• 学習率: 1e-5
• エポック数: ~10
• 毒性データ数:
20 ~ 400
結果 (ダーティラベル)
11
• 100程度の少数サンプルでも⾼い誤分類率
• パラメータ数が⼤きい程影響が⾼くなる「逆スケーリング」効果
結果 (ダーティラベル)
12
• パラメータ数に関係なくエポック数が多いほど,線形に誤分類率が増えていく
• いくつかのトリガーフレーズでも同様の効果
結果 (クリーンラベル)
13
• 100 個のサンプルの場合,誤分類率は55.6%(ダーティラベル場合: 92.8%)
• ダーティラベルほどではないが同様の傾向がみられる
• Positive/Negative判定以外のタスクについて毒性データの注⼊の検証
– 翻訳、⾔い換え、要約など
• Labelの設定⽅法
(1) 正解ラベルをランダムなアルファベット1⽂字に変更する
(2) トリガーフレーズを正解ラベルにする
という2種類の⽅法を検討する
• 実験設定
– データセット: Super-NaturalHandling
– モデル: Tk-Instructの770M ~ 11B
– 毒性データの数: タスクごとに5~20個
他のタスクについて
14
他のタスクでの結果
15
• トリガーフレーズが⼊っている⽂章でRouge-R, Rouge-Lのスコアを検証
• トリガーフレーズを繰り返す攻撃⼿法が⼀番効果的であった
• また,毒性データを⼊れるタスクの多様性が重要となる
毒性データに対する対策
16
• モデルの損失を利⽤して毒性判定をして毒性データを取り除く
• 少ないエポックで打ち切る
まとめ
17
• Instruction tuningにおける毒性データの作り⽅とその効果について分析
• 100個程度のサンプルで誤分類率を90%以上にすることが可能
• ⼤きいモデルなほど影響が⾼くなる(という主張)
• 毒性データをどうやって取り除くか,どこで学習を打ち切るかが重要になってく
る
Thank you.
18

More Related Content

PPTX
近年のHierarchical Vision Transformer
PPTX
【DL輪読会】Visual Classification via Description from Large Language Models (ICLR...
PDF
【DL輪読会】"Secrets of RLHF in Large Language Models Part I: PPO"
PDF
【メタサーベイ】Video Transformer
PDF
【DL輪読会】GPT-4Technical Report
PPTX
[DL輪読会]Neural Ordinary Differential Equations
PDF
【DL輪読会】マルチエージェント強化学習における近年の 協調的方策学習アルゴリズムの発展
PPTX
【DL輪読会】ViT + Self Supervised Learningまとめ
近年のHierarchical Vision Transformer
【DL輪読会】Visual Classification via Description from Large Language Models (ICLR...
【DL輪読会】"Secrets of RLHF in Large Language Models Part I: PPO"
【メタサーベイ】Video Transformer
【DL輪読会】GPT-4Technical Report
[DL輪読会]Neural Ordinary Differential Equations
【DL輪読会】マルチエージェント強化学習における近年の 協調的方策学習アルゴリズムの発展
【DL輪読会】ViT + Self Supervised Learningまとめ

What's hot (20)

PDF
【DL輪読会】Mastering Diverse Domains through World Models
PPTX
Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料
PPTX
【DL輪読会】論文解説:Offline Reinforcement Learning as One Big Sequence Modeling Problem
PPTX
これからの Vision & Language ~ Acadexit した4つの理由
PPTX
【DL輪読会】Scale Efficiently: Insights from Pre-training and Fine-tuning Transfor...
PDF
【DL輪読会】DINOv2: Learning Robust Visual Features without Supervision
PDF
[DL輪読会]Relational inductive biases, deep learning, and graph networks
PDF
全力解説!Transformer
PDF
SSII2022 [TS1] Transformerの最前線〜 畳込みニューラルネットワークの先へ 〜
PPTX
[DL輪読会]StyleGAN-NADA: CLIP-Guided Domain Adaptation of Image Generators
PDF
TensorFlow計算グラフ最適化処理
PPTX
【DL輪読会】DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Dri...
PDF
最適輸送の解き方
PPTX
Sliced Wasserstein距離と生成モデル
PPTX
【DL輪読会】Efficiently Modeling Long Sequences with Structured State Spaces
PDF
Skip Connection まとめ(Neural Network)
PDF
Transformer メタサーベイ
PDF
【DL輪読会】GAN-Supervised Dense Visual Alignment (CVPR 2022)
PDF
【メタサーベイ】数式ドリブン教師あり学習
PDF
プログラミングコンテストでの動的計画法
【DL輪読会】Mastering Diverse Domains through World Models
Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料
【DL輪読会】論文解説:Offline Reinforcement Learning as One Big Sequence Modeling Problem
これからの Vision & Language ~ Acadexit した4つの理由
【DL輪読会】Scale Efficiently: Insights from Pre-training and Fine-tuning Transfor...
【DL輪読会】DINOv2: Learning Robust Visual Features without Supervision
[DL輪読会]Relational inductive biases, deep learning, and graph networks
全力解説!Transformer
SSII2022 [TS1] Transformerの最前線〜 畳込みニューラルネットワークの先へ 〜
[DL輪読会]StyleGAN-NADA: CLIP-Guided Domain Adaptation of Image Generators
TensorFlow計算グラフ最適化処理
【DL輪読会】DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Dri...
最適輸送の解き方
Sliced Wasserstein距離と生成モデル
【DL輪読会】Efficiently Modeling Long Sequences with Structured State Spaces
Skip Connection まとめ(Neural Network)
Transformer メタサーベイ
【DL輪読会】GAN-Supervised Dense Visual Alignment (CVPR 2022)
【メタサーベイ】数式ドリブン教師あり学習
プログラミングコンテストでの動的計画法
Ad

Similar to 【DL輪読会】Poisoning Language Models During Instruction Tuning Instruction Tuningを利⽤した⾔語モデルのポイズニング (20)

PDF
Development and Experiment of Deep Learning with Caffe and maf
PPTX
Natural Language Processing (Almost) from Scratch(第 6 回 Deep Learning 勉強会資料; 榊)
PPTX
How to use in R model-agnostic data explanation with DALEX & iml
PDF
ICSE2014参加報告 (SE勉強会 6/12)
PPTX
Towards Knowledge-Based Personalized Product Description Generation in E-comm...
PPTX
Variational Template Machine for Data-to-Text Generation
PPTX
渕田研究室全体ゼミ論文紹介 - 第1回
PDF
論文紹介 Identifying Implementation Bugs in Machine Learning based Image Classifi...
PDF
[DDBJing31] 軽量仮想環境を用いてNGSデータの解析再現性を担保する
PDF
Pythonを含む多くのプログラミング言語を扱う処理フレームワークとパターン、鷲崎弘宜、PyConJP 2016 招待講演
PDF
ちょっと明日のテストの話をしよう
PDF
[db tech showcase Tokyo 2018] #dbts2018 #D24 『異種データベース間データ連携ウラ話 ~ 新しいデータベースを試...
PPTX
Beyond Accuracy: Behavioral Testing of NLP Models with CheckList
PDF
【DeepLearning研修】Transfomerの基礎と応用 --第4回 マルチモーダルへの展開
PDF
CMSI計算科学技術特論C (2015) 可読性と性能の両立を目指して
PDF
効率的学習 / Efficient Training(メタサーベイ)
PDF
[DL輪読会] Towards an Automatic Turing Test: Learning to Evaluate Dialogue Respo...
PPTX
Generating Better Search Engine Text Advertisements with Deep Reinforcement L...
PDF
[AI08] 深層学習フレームワーク Chainer × Microsoft で広がる応用
PDF
Creating and Using Links between Data Objects
Development and Experiment of Deep Learning with Caffe and maf
Natural Language Processing (Almost) from Scratch(第 6 回 Deep Learning 勉強会資料; 榊)
How to use in R model-agnostic data explanation with DALEX & iml
ICSE2014参加報告 (SE勉強会 6/12)
Towards Knowledge-Based Personalized Product Description Generation in E-comm...
Variational Template Machine for Data-to-Text Generation
渕田研究室全体ゼミ論文紹介 - 第1回
論文紹介 Identifying Implementation Bugs in Machine Learning based Image Classifi...
[DDBJing31] 軽量仮想環境を用いてNGSデータの解析再現性を担保する
Pythonを含む多くのプログラミング言語を扱う処理フレームワークとパターン、鷲崎弘宜、PyConJP 2016 招待講演
ちょっと明日のテストの話をしよう
[db tech showcase Tokyo 2018] #dbts2018 #D24 『異種データベース間データ連携ウラ話 ~ 新しいデータベースを試...
Beyond Accuracy: Behavioral Testing of NLP Models with CheckList
【DeepLearning研修】Transfomerの基礎と応用 --第4回 マルチモーダルへの展開
CMSI計算科学技術特論C (2015) 可読性と性能の両立を目指して
効率的学習 / Efficient Training(メタサーベイ)
[DL輪読会] Towards an Automatic Turing Test: Learning to Evaluate Dialogue Respo...
Generating Better Search Engine Text Advertisements with Deep Reinforcement L...
[AI08] 深層学習フレームワーク Chainer × Microsoft で広がる応用
Creating and Using Links between Data Objects
Ad

More from Deep Learning JP (20)

PPTX
【DL輪読会】AdaptDiffuser: Diffusion Models as Adaptive Self-evolving Planners
PPTX
【DL輪読会】事前学習用データセットについて
PPTX
【DL輪読会】 "Learning to render novel views from wide-baseline stereo pairs." CVP...
PPTX
【DL輪読会】Zero-Shot Dual-Lens Super-Resolution
PPTX
【DL輪読会】BloombergGPT: A Large Language Model for Finance arxiv
PPTX
【DL輪読会】マルチモーダル LLM
PDF
【 DL輪読会】ToolLLM: Facilitating Large Language Models to Master 16000+ Real-wo...
PPTX
【DL輪読会】AnyLoc: Towards Universal Visual Place Recognition
PDF
【DL輪読会】Can Neural Network Memorization Be Localized?
PPTX
【DL輪読会】Hopfield network 関連研究について
PPTX
【DL輪読会】SimPer: Simple self-supervised learning of periodic targets( ICLR 2023 )
PDF
【DL輪読会】RLCD: Reinforcement Learning from Contrast Distillation for Language M...
PPTX
【DL輪読会】"Language Instructed Reinforcement Learning for Human-AI Coordination "
PPTX
【DL輪読会】Llama 2: Open Foundation and Fine-Tuned Chat Models
PDF
【DL輪読会】"Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware"
PPTX
【DL輪読会】Parameter is Not All You Need:Starting from Non-Parametric Networks fo...
PDF
【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...
PDF
【DL輪読会】Self-Supervised Learning from Images with a Joint-Embedding Predictive...
PPTX
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
PPTX
【DL輪読会】VIP: Towards Universal Visual Reward and Representation via Value-Impl...
【DL輪読会】AdaptDiffuser: Diffusion Models as Adaptive Self-evolving Planners
【DL輪読会】事前学習用データセットについて
【DL輪読会】 "Learning to render novel views from wide-baseline stereo pairs." CVP...
【DL輪読会】Zero-Shot Dual-Lens Super-Resolution
【DL輪読会】BloombergGPT: A Large Language Model for Finance arxiv
【DL輪読会】マルチモーダル LLM
【 DL輪読会】ToolLLM: Facilitating Large Language Models to Master 16000+ Real-wo...
【DL輪読会】AnyLoc: Towards Universal Visual Place Recognition
【DL輪読会】Can Neural Network Memorization Be Localized?
【DL輪読会】Hopfield network 関連研究について
【DL輪読会】SimPer: Simple self-supervised learning of periodic targets( ICLR 2023 )
【DL輪読会】RLCD: Reinforcement Learning from Contrast Distillation for Language M...
【DL輪読会】"Language Instructed Reinforcement Learning for Human-AI Coordination "
【DL輪読会】Llama 2: Open Foundation and Fine-Tuned Chat Models
【DL輪読会】"Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware"
【DL輪読会】Parameter is Not All You Need:Starting from Non-Parametric Networks fo...
【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...
【DL輪読会】Self-Supervised Learning from Images with a Joint-Embedding Predictive...
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
【DL輪読会】VIP: Towards Universal Visual Reward and Representation via Value-Impl...

【DL輪読会】Poisoning Language Models During Instruction Tuning Instruction Tuningを利⽤した⾔語モデルのポイズニング