์๊ฐ๋ชฉ์ ๐ฝ
1. NLP ํ๋ก์ ํธ์ ํ์์ฑ + pytorch ์ฌ์ฉ๋ฐฉ๋ฒ ์๊ณ ์ถ์...
2. ๋
ผ๋ฌธ ์ฝ๊ธฐ & ๊ตฌํ ๋ฐฉ๋ฒ ์๊ณ ์ถ์
ํผ์ ํ๋๊น ํ์คํ ๋ฅ๋ฅ ์ด ๋จ์ด์ง๋ ๋๋์ด๋ผ ์ ์ฒญํ๋ค.
๋์ฑ์ด ๊ด์ฌ์๋ NLP๋ฅผ ์ง์ค์ ์ผ๋ก ๋ค๋ฃฌ๋ค๋.
๋ ผ๋ฌธ ์ฝ๋ ํ์ด ๊ธธ๋ฌ์ง๊ธธ!
1. Sentiment Analysis
Sentiment Analysis(๊ฐ์ฑ๋ถ์)์ ํ ์คํธ์ ๋ค์ด์๋ ์ ์์ ์ํ๋ฅผ ์๋ณ, ์ถ์ถํ์ฌ ๋ถ์ํ๋ ์ฐ๊ตฌ๋ฅผ ๋งํฉ๋๋ค. ํ ์คํธ์์ ๋์์ค๋ก ๋๊ปด์ง๋ ๋ชจํธํ ๊ฐ์ฑ์ ๊ฐ์ฑ ๋ถ์์ ์ด๋ ต๊ฒ ํ๋ ์์ธ ์ค ํ๋์ ๋๋ค.
์ด๋ฅผ ์ด์ฉํ์ฌ ๋ฆฌ๋ทฐ ๋ฐ ์ค๋ฌธ์กฐ์ฌ ์๋ต, ์จ๋ผ์ธ ์์ ๋ฏธ๋์ด ๋ฑ ๋ง์ผํ ๊ณผ ๊ณ ๊ฐ ์๋น์ค ๋ฑ์ ์ด์ฉํ์ฌ ์ ์ฉํ ์ ์์ต๋๋ค.
์๋ฅผ ๋ค์ด ๊ธฐ์ ๊ณผ ๊ด๋ จ๋ ํ๋ณด๋ฌผ์ ๋๊ธ์ ํ๋จํ์ฌ ๊ธฐ์ ์ ํ๋ณด ์ ํ์ ๋ํ ์ฌ๋ก ์ ๋ฐ์์ ์กฐ์ฌํ ์๋ ์๊ณ , ์๋น์๋ ๊ด๋ จ ์ ํ์ ์ด์ฉํ ์ง ์ ํ ์ง ๋ฑ์ ํ๋จํ ์ ์๋ ๊ธฐ์ค์ด ๋ฉ๋๋ค.
[ํ๊ฐ ์งํ]
- F-1 score
- recall
- precision
๐ DATA SET
https://huggingface.co/datasets/sst
SST (Stanford Sentiment Treebank) as SST-5 or SST fine-grained
์ธ์ด์์ ๊ฐ์ฑ์ ๊ตฌ์กฐ์ ํจ๊ณผ๋ฅผ ์์ ํ ๋ถ์ํ ์ ์๋ ๊ตฌ๋ฌธ ๋ถ์ ํธ๋ฆฌ(์์ ๋ ์ด๋ธ๋ง ๋)๊ฐ ์๋ ์ฒซ ๋ฒ์งธ ๋ง ๋ญ์น
- the first corpus with fully labeled parse trees that allows for a complete analysis of the compositional effects of sentiment in language.
- 11,855 single sentences from movie reviews
- parsed with the Stanford parser : ๊ตฌ๋ฌธ ๋ถ์
- 215,154 unique phrases (each annotated by 3 human judges)
Label
- negative
- somewhat negative
- neutral
- somewhat positive
- positive
- SST-2 or SST binary
- negative
- somewhat negative
- somewhat positive
- positive
๋ฐ์ดํฐ ๊ตฌ์ฑ
- Default
{'label': 0.7222200036048889,
'sentence': 'Yet the act is still charming here .',
'tokens': 'Yet|the|act|is|still|charming|here|.',
'tree': '15|13|13|10|9|9|11|12|10|11|12|14|14|15|0'}
- dictionary (์ฐธ์กฐ์ฉ)
{'label': 0.7361099720001221, 'phrase': 'still charming'}
- ptb(Penn Treebank)
{'ptb_tree': '(3 (2 Yet) (3 (2 (2 the) (2 act)) (3 (4 (3 (2 is) (3 (2 still) (4 charming))) (2 here)) (2 .))))'}
Data Fields
- sentence : ์ํ์ ๋ํ ์๊ฒฌ์ ๋ํ๋ด๋ ์์ ํ ๋ฌธ์ฅ
- label : 0.0์์ 1.0 ์ฌ์ด์ ์ฒ๋์์ ์๊ฒฌ์ "๊ธ์ ์ฑ" ์ ๋
- tokens : ๋ฌธ์ฅ์ ๊ตฌ์ฑํ๋ ํ ํฐ
- tree : ๋ถ๋ชจ ํฌ์ธํฐ ํธ๋ฆฌ ํ์์ ๋ฌธ์ฅ ๊ตฌ๋ฌธ ๋ถ์ ํธ๋ฆฌ
- phrase : ์์ ํ ๋ฌธ์ฅ์ ํ์ ๋ฌธ์ฅ
- ptb_tree : Penn Treebank ์คํ์ผ์ ๋ฌธ์ฅ ๊ตฌ๋ฌธ ๋ถ์ ํธ๋ฆฌ๋ก, ๊ฐ ๊ตฌ์ฑ ์์์ ๊ธ์ ์ ์ธ ๊ฐ์ ์ ๋๊ฐ 0์์ 4 ์ฌ์ด์ ์ฒ๋๋ก ํ์
๐ SOTA Model : RoBERTa
BERT์ replication study with fine-tuning
[keyword]
- ์ค๊ณ ์ค์์ฑ ๊ฐ์กฐ
- NSP loss ์ ๊ฑฐ
- longer sequence
- dynamic masking
- bigger batch size
2. Language Modelling
Language modeling์ ๋ฌธ์ ๋ด ๋ค์์ ์ฌ ๋จ์ด ํน์ ๋ฌธ์๋ฅผ ์์ธกํ๋ ์ฐ๊ตฌ์ ๋๋ค.
์ด ์ฐ๊ตฌ๋ ์ธ์ด ๋ชจ๋ธ์ ํ๋ จ ์ํฌ ๋, ๋ ๋ ๋์๊ฐ text generation, text classification, question answering ๋ฑ ๋ค์ํ NLP task์ ์ ์ฉ๋์ด ์ง๋๋ค.
[General Type]
- N-gram Language Models
- Neural Langauge Models
[ํ๊ฐ ์งํ]
- cross-entropy
- perplexity
๐ DATA SET
https://huggingface.co/datasets/wikitext
์ํค ํ ์คํธ ์ธ์ด ๋ชจ๋ธ๋ง ๋ฐ์ดํฐ ์ธํธ๋ ์ํค ๋ฐฑ๊ณผ์ ๊ฒ์ฆ๋ Good ๋ฐ Featured ๊ธฐ์ฌ ์งํฉ์์ ์ถ์ถํ 1์ต ๊ฐ ์ด์์ ํ ํฐ์ ๋ชจ์์ ๋๋ค. ์ ์ฒ๋ฆฌ๋ Penn Treebank(PTB) ๋ฒ์ ๊ณผ ๋น๊ตํ์ฌ WikiText-2๋ 2๋ฐฐ ์ด์, WikiText-103์ 110๋ฐฐ ์ด์ ํฝ๋๋ค. WikiText ๋ฐ์ดํฐ์ ์ ๋ํ ํจ์ฌ ๋ ๋ง์ ์ดํ๋ฅผ ์ ๊ณตํ๋ฉฐ PTB์์ ๋ชจ๋ ์ ๊ฑฐ๋ ์๋์ ๋์๋ฌธ์, ๊ตฌ๋์ ๋ฐ ์ซ์๋ฅผ ์ ์งํฉ๋๋ค. ์ ์ฒด ๊ธฐ์ฌ๋ก ๊ตฌ์ฑ๋์ด ์๊ธฐ ๋๋ฌธ์ ๋ฐ์ดํฐ ์ธํธ๋ ์ฅ๊ธฐ์ ์ธ ์ข ์์ฑ์ ํ์ฉํ ์ ์๋ ๋ชจ๋ธ์ ์ ํฉํฉ๋๋ค.
๋ฐ์ดํฐ ๊ตฌ์ฑ
- ๋ด๋ถ ์์
{
"text": "\" The gold dollar or gold one @-@ dollar piece was a coin struck as a regular issue by the United States Bureau of the Mint from..."
}
๐ SOTA Model : GPT-3 / BERT
GPT-3
[keyword]
- sparse self-attention
- meta-learning → in-context learning
BERT
[keyword]
- transformer ๊ตฌ์กฐ ํ์ฉ
- MLM ๊ตฌ์กฐ
- unlabeled data train → transfer learning using labeled data
'Data Science > NLP' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Week 1-3 NLG subtask _ Multi-Document Summarization, Text Generation (1) | 2022.05.11 |
---|---|
Week 1-2 NLU subtask _ Text Classification, Topic Models (1) | 2022.05.11 |
๋๊ธ