Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction_to_ZeroshotLearning
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
payanotty
September 08, 2022
340
0
Share
Introduction_to_ZeroshotLearning
payanotty
September 08, 2022
More Decks by payanotty
See All by payanotty
トークナイザー入門
payanotty
5
2.4k
LLM_Prompt_Recovery
payanotty
3
1k
Embeddingモデルを使ったベクトル化のしくみ、fine-tuning手法を解説
payanotty
15
6.3k
Transformerによるテキストベクトル化を解説
payanotty
6
4.2k
Kaggle_LLMコンペの攻略法を解説.pdf
payanotty
1
1.6k
ManimMLでイケてるアニメーションを作ろう
payanotty
0
830
Lets Finetune LLM
payanotty
3
1.4k
Stable Diffusion Web UI, Let Your Fave Eat Ramen
payanotty
1
1.2k
Lets Finetune Stable Diffusion
payanotty
0
1.3k
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
77
5.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.9k
Un-Boring Meetings
codingconduct
0
280
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
180
Color Theory Basics | Prateek | Gurzu
gurzu
0
300
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
160
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Transcript
Zeroshot Text Classification さっくり解説 早野康太
自己紹介 • 名前 ◦ 早野 康太 • お仕事 ◦ 自然言語モデルの改善
• 趣味 ◦ 猫、犬 ▪ YouTube ◦ ゲーム ▪ 音ゲ、遊戯王MD ◦ アニメ ▪ リコリコやばくない?
Zeroshot Learningとは • 見たことないクラスのものを 正しく分類できるようなモデルを学習する
Zeroshot Learningとは • 見たことないクラスのものを 正しく分類できるようなモデルを学習する
Zeroshot Learningとは • 見たことないクラスのものを 正しく分類できるようなモデルを学習する
Zeroshot Learningとは • 見たことないクラスのものを 正しく分類できるようなモデルを学習する • Zeroshot → 学習データにCATが全くない •
Fewshot → 学習データにCATが めちゃくちゃ少ないけどある
Zeroshot Learningとは • 役に立ちそうな場面 ◦ データのラベル付けが難しい場合 (専門知識が必要など) ◦ ラベル付けされたデータが大量に用意できない場合 ◦
データ収集時点で想定していなかった 新しいラベルのデータに対して分類が求められる場合
自然言語におけるZeroshot学習 • 文章をモデルにぶちこんで 意味が”それっぽい”かどうかを判定させる (Entailment Approach) ◦ Benchmarking Zero-shot Text
Classification: Datasets, Evaluation and Entailment Approach
自然言語におけるZeroshot学習 吾輩は猫である。 分類したい文章 Hypothesis これは犬の文だ。 Entailment Score + 0.50 吾輩は猫である。
これは鳥の文だ。 + 0.12 = = これは{}の文だ。 Hypothesis Template
自然言語におけるZeroshot学習 吾輩は猫である。 分類したい文章 Hypothesis これは犬の文だ。 Entailment Score + 0.50 吾輩は猫である。
これは鳥の文だ。 + 0.12 = = 吾輩は猫である。 これは猫の文だ。 + 0.61 = これは{}の文だ。 学習していないラベル: 猫 Hypothesis Template
• Bidirectional Encoder Representations from Transformers ◦ BERT: Pre-training of
Deep Bidirectional Transformers for Language Understanding ◦ Transformerによる双方向のエンコード表現 ▪ Transformerモデルの一部分を利用したモデル ◦ Googleが2018年に発表 • 当時の自然言語処理タスクの最高記録を軒並み塗り替えた • fine-tuningにより あらゆる自然言語処理タスクに応用可能な汎用性の高さ Zeroshot ✕ BERT
TransformersでZeroshot • Transformers ◦ さまざまな自然言語の事前学習済みモデルを 利用することができるライブラリ ◦ ZeroshotClassificationPipelineを使えば 簡単にZeroshot分類を試すことができる ▪
Pipelines — transformers 4.5.0.dev0 documentation ▪ が、日本語のPretrained ModelはModel Hubで全然公開されていない • 日本語でやる場合は自分でモデルを作る必要あり • 例えばこういうデータセットを使うなど ◦ 日本語SNLI(JSNLI)データセット - KUROHASHI-CHU-MURAWAKI LAB
まとめ • Zeroshot Learningとは ◦ 学習していないラベルのデータを予測しようとする試み • 自然言語分野では、”これは{}の文だ”のように テンプレートにラベル名を埋め込んでEntailmentスコアを計算する方法が
試されている ◦ TransformersライブラリでもZeroshotPipelineが利用可能なので 興味があれば試してみるのもおもしろいかも