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.3k
LLM_Prompt_Recovery
payanotty
3
860
Embeddingモデルを使ったベクトル化のしくみ、fine-tuning手法を解説
payanotty
14
4.4k
Transformerによるテキストベクトル化を解説
payanotty
4
2.5k
Kaggle_LLMコンペの攻略法を解説.pdf
payanotty
1
1.3k
ManimMLでイケてるアニメーションを作ろう
payanotty
0
660
Lets Finetune LLM
payanotty
3
1.2k
Stable Diffusion Web UI, Let Your Fave Eat Ramen
payanotty
1
990
Lets Finetune Stable Diffusion
payanotty
0
1.2k
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
A Philosophy of Restraint
colly
203
16k
How to train your dragon (web standard)
notwaldorf
89
5.8k
The Cult of Friendly URLs
andyhume
78
6.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Building Applications with DynamoDB
mza
93
6.2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
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が利用可能なので 興味があれば試してみるのもおもしろいかも