はじめに
シャニアニ5話、イルミネがギスギスにならなくてホントよかった😭 nikkieです。
今回は、Instruction Tuningに関する論文を読んだメモです。
通読ではなく、研究上の位置づけが知られそうな箇所を読み進めました。
目次
- はじめに
- 目次
- 「Instruction Matters, a Simple yet Effective Task Selection Approach in Instruction Tuning for Specific Tasks」
- 論文の研究上の位置づけを調べる(by ロボ太さん)
- 「Instruction Matters」論文に至る研究の流れ
- 提案手法 INSTA
- 言及される論文メモ
- 終わりに
「Instruction Matters, a Simple yet Effective Task Selection Approach in Instruction Tuning for Specific Tasks」
LLMを特定タスクに向けてinstruction tuningするときに関連タスクのデータも混ぜると精度向上する事があるが、instructionの文面の Encoder(論文だとSentence Transformer)での埋込のコサイン類似度の高い方から加えると良いタスクを選定できるとのこと。… pic.twitter.com/sdgCVy0vQF
— Tatsuya Shirakawa (@s_tat1204) 2024年4月26日
先日Instruction Tuningをまとめたときに「この先知りたいこと」に挙げた論文です
論文の研究上の位置づけを調べる(by ロボ太さん)
以下のスライドをやっていきます。
「Instruction Matters」論文ですが、Abstractを一読したところ、何について話しているか理解できずにいました。
Instruction Tuningをまとめる中でうっすら流れを見出し、「Introductionは読めそう & 私がまだ知らない論文も知れそう」と読んでみることにしました。
「Instruction Matters」論文に至る研究の流れ
- 「はじまり」
- Instruction Tuningを提案したFLAN論文(zero-shot性能の向上)
- 様々なアプローチがなされるが(後述)
- その中で、未見の特定タスクの性能を向上させるというアプローチがあり1
- (未見のタスクたちへの汎化性能を向上させるというアプローチではなく、)
- この論文では、INSTAという手法を提案した
- Instruction-based Task selector
- (いんすた?🤔)
提案手法 INSTA
INSTAに至るまで
- 未見の特定タスクの性能を向上させるアプローチの中で、(Instruction Tuningに含まれる)すべてのタスクが特定タスクに有用とは限らないことがわかった2
- あるタスクによって性能低下をもたらされることもある
- 課題:訓練時に関連するタスクを選びたい(selecting relevant tasks for training)
- 先行研究は2つのカテゴリに分かれる
先行研究と比較したINSTA
先行研究のカテゴリ2への提案と理解しています。
We introduce INSTA which simplifies task selection for instruction tuning by using only instruction similarity scores, obviating the need for instances.
- instructionの類似度にのみ基づいたタスク選択手法
- データインスタンス不要
これはIntroductionの「In summary, our contributions are as follows:」(要約箇所)にある3点のうちの1点です。
他は
- INSTAはinstructionのニュアンスを理解
- (meta-datasetのスタイルや形式にアラインさせて達成? まだよくわかっていません)
- 先行研究と同様の複雑さなく、先行研究に匹敵
- (-> 優れてるよねとアピールしているという理解)
ここまで追って、冒頭の論文紹介ツイートの論文について、「聞いたことある」から「ちょっと理解したな」に進んだ感覚です
言及される論文メモ
「はじまり」として挙げられた論文(抜粋)
- FLAN
- (今回知った)T0 [2110.08207] Multitask Prompted Training Enables Zero-Shot Task Generalization
- Alpaca https://crfm.stanford.edu/2023/03/13/alpaca.html
- Vicuna https://lmsys.org/blog/2023-03-30-vicuna/
なされてきた様々なアプローチ
improving a model’s generalization capabilities to unseen tasks by training on diverse tasks accompanied by instructions
- 「訓練に使うタスクの多様性を増すことで、未見のタスクへの汎化性能を改善できる」
- [2204.07705] Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Tasks
- 1600超えのタスク
- [2301.13688] The Flan Collection: Designing Data and Methods for Effective Instruction Tuning
- [2210.11416] Scaling Instruction-Finetuned Language Models
- 1836タスク
- FLAN T5!
automatically generate a substantial volume of instruction tuning data using Large Language Models (LLMs) instead of human creation.
- 「人間が作る代わりに、LLMを使って大量のinstruction tuningデータを自動生成」
- [2212.10560] Self-Instruct: Aligning Language Models with Self-Generated Instructions
- [2305.14327] Dynosaur: A Dynamic Growth Paradigm for Instruction-Tuning Data Curation
- [2310.13961] Ensemble-Instruct: Generating Instruction-Tuning Data with a Heterogeneous Mixture of LMs
未見の特定タスクの性能を向上させるというアプローチ
- [2304.08085] InstructUIE: Multi-task Instruction Tuning for Unified Information Extraction9
- [2305.13225] Multi-Task Instruction Tuning of LLaMa for Specific Scenarios: A Preliminary Study on Writing Assistance
- [2310.14970] Towards LLM-driven Dialogue State Tracking
すべてのタスクが特定タスクに有用とは限らないことがわかったのあたりの論文(抜粋)
- Not All Tasks Are Born Equal: Understanding Zero-Shot Generalization | OpenReview
- [2302.03202] Exploring the Benefits of Training Expert Language Models over Instruction Tuning
- [2310.15326] Specialist or Generalist? Instruction Tuning for Specific NLP Tasks
FLANに端を発してInstruction Tuningのデータセットは巨大化していっている流れに対して、巨大化が正義ではないという発見は実に興味深いです
先行研究は2つのカテゴリに分かれるの部分の論文
- 2つのタスクのうち片方のタスクでモデルを訓練し、他方で性能を評価
- [2005.00770] Exploring and Predicting Transferability across NLP Tasks
- 2020年(BERTレベルの規模感)
- [2104.08247] What to Pre-Train on? Efficient Intermediate Task Selection
- Not All Tasks Are Born Equal: Understanding Zero-Shot Generalization | OpenReview
- [2305.13256] TaskWeb: Selecting Better Source Tasks for Multi-task NLP
- [2005.00770] Exploring and Predicting Transferability across NLP Tasks
- テストデータセットの小さなサンプルを使ってタスク間の類似度計算
- [2204.07937] Unsupervised Cross-Task Generalization via Retrieval Augmentation
- [2210.03029] Efficiently Enhancing Zero-Shot Performance of Instruction Following Model via Retrieval of Soft Prompt10
- [2302.03202] Exploring the Benefits of Training Expert Language Models over Instruction Tuning
- [2303.09014] ART: Automatic multi-step reasoning and tool-use for large language models
- 他と毛色が違ってエージェントっぽいです
終わりに
「Instruction Matters, a Simple yet Effective Task Selection Approach in Instruction Tuning for Specific Tasks」について、ロボ太さんのフォーマットでまとめました。
- Instruction Tuningという流れの中で
- 未見の特定タスクの性能を向上させるというアプローチがあり
- そこには「訓練時に関連するタスクを選ぶ」という課題があるが
- この論文では、instructionの類似度にのみ基づいたタスク選択手法、INSTAを提案した
- サンプルを取るカテゴリ側で提案
- 時間がかからないし、計算リソースも使わない
- テストデータセットの小さなサンプルを使ってタスク間の類似度を計算するのとは異なり、instructionのみ
- サンプルを取るカテゴリ側で提案
流れを知る中で興味を持った論文は、このあたりですね11
- [2212.10560] Self-Instruct: Aligning Language Models with Self-Generated Instructions
- Not All Tasks Are Born Equal: Understanding Zero-Shot Generalization | OpenReview
- [2302.03202] Exploring the Benefits of Training Expert Language Models over Instruction Tuning
今までも論文は読んでましたが、紹介された論文に飛びつくという感じでした(ここ3ヶ月〜半年くらいかな)。
飛びつきまくってきたわけですが、今回の試み(研究の流れを押さえる)では、これまで感じなかったような"読んだ感"があります。
知っていることが結びついたからかな?
ただこの方法で理解するのに時間はかかりますね。
その時間は必要経費な気もしますが、ここを楽にしてくれるLLMさんとは協働してみたいですね
がんばりましょう
- 原文「there is also growing interest in instruction tuning as a methodology to improve the performance of specific unseen tasks」↩
- 原文「not all tasks are helpful to specific tasks, and some tasks could even lead to performance degradation」↩
- 原文「First, manually reviewing through the vast array of datasets for instruction tuning is not feasible.」↩
- 原文「Additionally, discerning the relevance of certain tasks in the training dataset to the target task is often ambiguous.」↩
- 原文「The first is assessing pairwise task transferability by training models on one task and then evaluating their performance on another」↩
- 原文「the former approach, which measures pair- wise transfer for every task, can be exceedingly time-consuming and compute-intensive」↩
- 原文「The second is calculating sim- ilarity scores between tasks using a small sample of the test dataset」↩
- 原文「the latter approach has limitations in that it necessitates constructing data (instances) for unseen target tasks, contradicting the zero-shot setting condition in instruction tuning.」↩
-
UIEという文字は、ストックマークさんの勉強会(LLM時代の情報抽出)で見た覚えがありますね
↩手元のメモや紹介された論文をざっと追って、まさに「LLM時代の情報抽出」だったな〜と #StockmarkTech
— nikkie / にっきー (@ftnext) 2024年2月27日
1つのLLMですべての情報抽出を解くべくメタに捉えてるんですね。興味深いです
Universal Information Extractionやその亜種(TANL、LasUIEなど)
UIEの発展形 Lottery Prompt Tuning、CodeIE - 参照しているバージョンが Retrieval of Soft Prompt Enhances Zero-Shot Task Generalization12 のようでした↩
- 過去に手を動かしたInstruction Tuningについて、「さらにデータを加えるとしたらどうする?」への暫定的な回答を得たいと思っています ↩
- 「Soft Prompt」とはSoft Prompt Tuningのことだと思っています。embeddingに加えて、訓練可能なtensorを入力にくっつけるらしい ↩