KcELECTRA Korean Emotion Classification (6 classes)
KcELECTRA ํ๊ตญ์ด ๊ฐ์ ๋ถ๋ฅ (๋๋ถ๋ฅ 6์ข )
A Korean emotion classifier fine-tuned from beomi/KcELECTRA-base-v2022 on the AI-Hub Emotional Dialogue Corpus. Given a single utterance, it predicts one of 6 emotion classes.
beomi/KcELECTRA-base-v2022๋ฅผ AIํ๋ธ ๊ฐ์ฑ๋ํ๋ง๋ญ์น๋ก ํ์ธํ๋ํ ํ๊ตญ์ด ๊ฐ์ ๋ถ๋ฅ ๋ชจ๋ธ์ ๋๋ค. ์ ๋ ฅ ๋ฐํ ํ ๊ฑด์ ๋ฐ์ ๋๋ถ๋ฅ 6๊ฐ ๊ฐ์ ์ค ํ๋๋ก ๋ถ๋ฅํฉ๋๋ค.
- Input / ์ ๋ ฅ: utterance text / ๋ฐํ ํ ์คํธ
- Output / ์ถ๋ ฅ: 6 emotions / 6๊ฐ ๊ฐ์ โ
๋ถ๋ ธ,๊ธฐ์จ,๋ถ์,๋นํฉ,์ฌํ,์์ฒ - Architecture / ๊ตฌ์กฐ: standard
ElectraForSequenceClassification
Usage / ์ฌ์ฉ๋ฒ
from transformers import pipeline
clf = pipeline("text-classification", model="GGARA02/kcelectra-korean-emotion")
print(clf("์์ฆ ๋๋ฌด ์ธ๋กญ๊ณ ์๋ฌด๋ ๋ด ๋ง์ ๋ชฐ๋ผ์ฃผ๋ ๊ฒ ๊ฐ์"))
# โ [{'label': ..., 'score': ...}]
For the full probability distribution over all emotions / ์ ์ฒด ๊ฐ์ ๋ณ ํ๋ฅ ์ด ํ์ํ๋ฉด:
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
name = "GGARA02/kcelectra-korean-emotion"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForSequenceClassification.from_pretrained(name).eval()
enc = tok("์์ฆ ๋๋ฌด ์ธ๋กญ๊ณ ์๋ฌด๋ ๋ด ๋ง์ ๋ชฐ๋ผ์ฃผ๋ ๊ฒ ๊ฐ์", return_tensors="pt")
with torch.no_grad():
probs = model(**enc).logits.softmax(-1)[0]
for i, p in enumerate(probs):
print(model.config.id2label[i], round(float(p), 4))
Labels / ๋ ์ด๋ธ
| id | ํ๊ตญ์ด | English |
|---|---|---|
| 0 | ๋ถ๋ ธ | Anger |
| 1 | ๊ธฐ์จ | Joy |
| 2 | ๋ถ์ | Anxiety |
| 3 | ๋นํฉ | Embarrassment |
| 4 | ์ฌํ | Sadness |
| 5 | ์์ฒ | Hurt |
Performance / ์ฑ๋ฅ
AI-Hub test split (5,135 samples, utterance-only) / AIํ๋ธ ๊ฐ์ฑ๋ํ๋ง๋ญ์น ํ ์คํธ์
Evaluated on the test split of the AI-Hub Emotional Dialogue Corpus, under the same conditions (utterance-only input, 6 classes) as NIA's reference ALBERT model that was evaluated on the same data.
AIํ๋ธ ๊ฐ์ฑ๋ํ๋ง๋ญ์น์ ํ ์คํธ ๋ถํ ์์, ๋์ผ ๋ฐ์ดํฐ๋ก ํ๊ฐ๋ NIA ์ฐธ์กฐ ALBERT ๋ชจ๋ธ๊ณผ ๋์ผ ์กฐ๊ฑด(์ฌ์ฉ์ ๋ฐํ๋ง ์ ๋ ฅ, ๋๋ถ๋ฅ 6๊ฐ)์ผ๋ก ๋น๊ตํ์ต๋๋ค.
| Metric / ์งํ | This model / ๋ณธ ๋ชจ๋ธ | NIA reference ALBERT / NIA ์ฐธ์กฐ ALBERT |
|---|---|---|
| Accuracy (Top-1 / EM) | 86.95% | 67.2% |
| Macro F1 | 0.8672 | 0.809 |
| Binary F1 (confidence โฅ 0.5) | 0.9300 | โ |
| Top-2 Accuracy | 93.96% | โ |
| Top-3 Accuracy | 97.31% | โ |
Per-class performance / ํด๋์ค๋ณ ์ฑ๋ฅ
| Emotion / ๊ฐ์ | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| ๋ถ๋ ธ (Anger) | 0.8380 | 0.8474 | 0.8427 | 806 |
| ๊ธฐ์จ (Joy) | 0.9827 | 0.9795 | 0.9811 | 928 |
| ๋ถ์ (Anxiety) | 0.8531 | 0.8603 | 0.8567 | 945 |
| ๋นํฉ (Embarrassment) | 0.8733 | 0.8402 | 0.8564 | 820 |
| ์ฌํ (Sadness) | 0.8234 | 0.8602 | 0.8414 | 851 |
| ์์ฒ (Hurt) | 0.8364 | 0.8140 | 0.8250 | 785 |
Training / ํ์ต ์ ๋ณด
Data / ๋ฐ์ดํฐ
- AI-Hub Emotional Dialogue Corpus / ๊ฐ์ฑ๋ํ๋ง๋ญ์น (built by NIA)
- Input is the concatenation of one speaker's utterances (์ฌ๋๋ฌธ์ฅ1~3), utterance text only (no metadata).
- Train 51,630 / Validation 6,641
Hyperparameters / ํ์ดํผํ๋ผ๋ฏธํฐ
| Base model | beomi/KcELECTRA-base-v2022 (MIT) |
| Epochs | 5 |
| Max sequence length | 128 |
| Batch size | 32 (train) / 64 (eval) |
| Optimizer | AdamW (weight decay 0.01) |
| Learning rate | 2e-5 (encoder) / 1e-4 (classifier head, 5ร) |
| LR schedule | linear warmup 10% + linear decay |
| Gradient clipping | 1.0 |
| Seed | 42 |
Architecture / ๋ชจ๋ธ ๊ตฌ์กฐ
| Type | ELECTRA (discriminator) |
| Hidden size | 768 |
| Hidden layers | 12 |
| Attention heads | 12 |
| Intermediate size | 3072 |
| Vocab size | 54,343 |
| Parameters | ~113M |
License & Attribution / ๋ผ์ด์ ์ค ๋ฐ ์ถ์ฒ
- The base model KcELECTRA is under the MIT license. ๋ฒ ์ด์ค ๋ชจ๋ธ KcELECTRA๋ MIT ๋ผ์ด์ ์ค์ ๋๋ค.
- Training data is the AI-Hub Emotional Dialogue Corpus (dataset page), a work product of the National Information Society Agency (NIA). ํ์ต ๋ฐ์ดํฐ๋ AIํ๋ธ ๊ฐ์ฑ๋ํ๋ง๋ญ์น์ด๋ฉฐ, ํ๊ตญ์ง๋ฅ์ ๋ณด์ฌํ์งํฅ์(NIA)์ ์ฌ์ ๊ฒฐ๊ณผ๋ฌผ์ ๋๋ค.
- Use of this model is subject to the AI-Hub usage policy. Please review and comply with it, and credit the use of AI-Hub data when using this model. ์ด ๋ชจ๋ธ์ ์ด์ฉ์ AIํ๋ธ ์ด์ฉ์ ์ฑ ์ ๋ฐ๋ฆ ๋๋ค. ์ ์ฑ ์ ํ์ธํ๊ณ ์ค์ํด ์ฃผ์ธ์. ๋ํ ์ด ๋ชจ๋ธ์ ์ฌ์ฉํ ๊ฒฝ์ฐ AIํ๋ธ ๋ฐ์ดํฐ๋ฅผ ์ฌ์ฉํ์์์ ์ถ์ฒ๋ก ๋ช ์ํด ์ฃผ์ธ์.
Limitations / ํ๊ณ
- Emotion is subjective and cannot be reduced to a single label; use as an auxiliary signal only. ๊ฐ์ ์ ์ฃผ๊ด์ ์ด๋ฉฐ ๋จ์ผ ๋ ์ด๋ธ๋ก ํ์๋์ง ์์ต๋๋ค. ๋ณด์กฐ ์งํ๋ก๋ง ์ฌ์ฉํ์ธ์.
- Downloads last month
- 51
Model tree for GGARA02/kcelectra-korean-emotion
Base model
beomi/KcELECTRA-base-v2022