Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Introduction_to_ZeroshotLearning
Search
payanotty
September 08, 2022
350
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction_to_ZeroshotLearning
payanotty
September 08, 2022
More Decks by payanotty
See All by payanotty
トークナイザー入門
payanotty
5
2.7k
LLM_Prompt_Recovery
payanotty
3
1.1k
Embeddingモデルを使ったベクトル化のしくみ、fine-tuning手法を解説
payanotty
15
6.5k
Transformerによるテキストベクトル化を解説
payanotty
6
4.3k
Kaggle_LLMコンペの攻略法を解説.pdf
payanotty
1
1.7k
ManimMLでイケてるアニメーションを作ろう
payanotty
0
860
Lets Finetune LLM
payanotty
3
1.5k
Stable Diffusion Web UI, Let Your Fave Eat Ramen
payanotty
1
1.2k
Lets Finetune Stable Diffusion
payanotty
0
1.4k
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
270
Paper Plane
katiecoart
PRO
3
53k
Making Projects Easy
brettharned
120
6.7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
How to train your dragon (web standard)
notwaldorf
97
6.8k
Paper Plane (Part 1)
katiecoart
PRO
1
11k
How GitHub (no longer) Works
holman
316
150k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
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が利用可能なので 興味があれば試してみるのもおもしろいかも