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
payanotty
September 08, 2022
0
300
Introduction_to_ZeroshotLearning
payanotty
September 08, 2022
Tweet
Share
More Decks by payanotty
See All by payanotty
トークナイザー入門
payanotty
2
1.4k
LLM_Prompt_Recovery
payanotty
3
880
Embeddingモデルを使ったベクトル化のしくみ、fine-tuning手法を解説
payanotty
14
4.8k
Transformerによるテキストベクトル化を解説
payanotty
4
2.7k
Kaggle_LLMコンペの攻略法を解説.pdf
payanotty
1
1.3k
ManimMLでイケてるアニメーションを作ろう
payanotty
0
680
Lets Finetune LLM
payanotty
3
1.3k
Stable Diffusion Web UI, Let Your Fave Eat Ramen
payanotty
1
1k
Lets Finetune Stable Diffusion
payanotty
0
1.2k
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.1k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
Producing Creativity
orderedlist
PRO
344
39k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
KATA
mclloyd
29
14k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.3k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
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が利用可能なので 興味があれば試してみるのもおもしろいかも