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 / ๋ฐ์ดํ„ฐ

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
Safetensors
Model size
0.1B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for GGARA02/kcelectra-korean-emotion

Finetuned
(12)
this model