Upload Korean Claim Detection Model for Fact-Checking
Browse files- README.md +372 -0
- config.json +31 -0
- model.safetensors +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +58 -0
- training_args.bin +3 -0
- training_metadata.json +45 -0
- vocab.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,372 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Korean Claim Detection Model for Fact-Checking
|
| 2 |
+
|
| 3 |
+
## 모델 소개 (Model Description)
|
| 4 |
+
|
| 5 |
+
이 모델은 **한국어 문장에서 팩트체크가 필요한 주장(claim)을 자동으로 탐지**하는 이진 분류 모델입니다.
|
| 6 |
+
|
| 7 |
+
뉴스 기사, 정치 토론, 소셜 미디어 게시물 등에서 검증이 필요한 주장을 식별하여, 팩트체킹 워크플로우의 첫 단계를 자동화할 수 있습니다.
|
| 8 |
+
|
| 9 |
+
This model **automatically detects claims that require fact-checking** in Korean sentences. It can identify verifiable claims in news articles, political debates, and social media posts, automating the first step of the fact-checking workflow.
|
| 10 |
+
|
| 11 |
+
- **Base Model**: [beomi/KcELECTRA-base-v2022](https://huggingface.co/beomi/KcELECTRA-base-v2022)
|
| 12 |
+
- **Task**: Claim Detection (Checkworthy Sentence Classification)
|
| 13 |
+
- **Language**: Korean (한국어)
|
| 14 |
+
- **Labels**:
|
| 15 |
+
- `0`: 팩트체크가 불필요한 문장 (Non-checkworthy)
|
| 16 |
+
- `1`: 팩트체크가 필요한 주장 (Checkworthy claim)
|
| 17 |
+
|
| 18 |
+
## 모델 목표 (Model Objective)
|
| 19 |
+
|
| 20 |
+
입력된 한국어 문장을 분석하여 다음을 판단합니다:
|
| 21 |
+
- **검증 가능한 사실적 주장**인지
|
| 22 |
+
- **팩트체킹이 필요한 정도**는 얼마나 되는지
|
| 23 |
+
|
| 24 |
+
This model analyzes Korean sentences to determine:
|
| 25 |
+
- Whether they contain **verifiable factual claims**
|
| 26 |
+
- The **degree to which fact-checking is needed**
|
| 27 |
+
|
| 28 |
+
### 팩트체크가 필요한 주장의 예시 (Checkworthy Claim Examples)
|
| 29 |
+
|
| 30 |
+
✅ **Label 1 (Checkworthy)**:
|
| 31 |
+
- "청년 실업률이 지난 3년간 계속 상승했습니다"
|
| 32 |
+
- "우리나라 GDP 성장률은 OECD 평균을 넘어섰습니다"
|
| 33 |
+
- "이 정책으로 일자리가 100만 개 창출될 것입니다"
|
| 34 |
+
|
| 35 |
+
❌ **Label 0 (Non-checkworthy)**:
|
| 36 |
+
- "오늘 토론회는 SBS 상암동 스튜디오에서 진행하고 있고요"
|
| 37 |
+
- "국민 여러분께 감사드립니다"
|
| 38 |
+
- "제 생각에는 이 정책이 좋은 것 같습니다"
|
| 39 |
+
|
| 40 |
+
## 데이터셋 (Dataset)
|
| 41 |
+
|
| 42 |
+
### 데이터 출처
|
| 43 |
+
- **Source**: CLEF CheckThat! Lab 2024
|
| 44 |
+
- **Task**: Task 1 - Check-Worthiness Estimation
|
| 45 |
+
- **Original Dataset**: English political debates and speeches
|
| 46 |
+
- **Translation**: Machine-translated to Korean for training
|
| 47 |
+
|
| 48 |
+
### 데이터셋 크기
|
| 49 |
+
- **Training Set**: 22,501 samples
|
| 50 |
+
- **Validation Set**: 1,032 samples
|
| 51 |
+
- **Test Set**: 318 samples
|
| 52 |
+
|
| 53 |
+
### 데이터 특성
|
| 54 |
+
- 정치 토론, 연설문, 뉴스 기사에서 추출된 문장
|
| 55 |
+
- 전문 팩트체커들이 레이블링한 고품질 데이터
|
| 56 |
+
- 클래스 불균형: Label 0 (65%) vs Label 1 (35%)
|
| 57 |
+
|
| 58 |
+
## 학습 세부사항 (Training Details)
|
| 59 |
+
|
| 60 |
+
### 학습 하이퍼파라미터
|
| 61 |
+
- **Epochs**: 5
|
| 62 |
+
- **Batch Size (Train)**: 32
|
| 63 |
+
- **Batch Size (Eval)**: 64
|
| 64 |
+
- **Learning Rate**: 3e-05
|
| 65 |
+
- **Weight Decay**: 0.01
|
| 66 |
+
- **Warmup Ratio**: 0.1
|
| 67 |
+
- **Precision**: BF16
|
| 68 |
+
- **Optimizer**: adamw_torch_fused
|
| 69 |
+
- **Max Sequence Length**: 128 tokens
|
| 70 |
+
- **Seed**: 42
|
| 71 |
+
|
| 72 |
+
### 학습 환경
|
| 73 |
+
- **GPU**: NVIDIA GeForce RTX 4090 (24GB)
|
| 74 |
+
- **Training Time**: 1.87 minutes
|
| 75 |
+
- **Framework**: Hugging Face Transformers
|
| 76 |
+
- **Early Stopping**: Patience 3 (based on F1 score)
|
| 77 |
+
|
| 78 |
+
## 성능 (Performance)
|
| 79 |
+
|
| 80 |
+
### Validation Metrics
|
| 81 |
+
- **Accuracy**: 97.58%
|
| 82 |
+
- **F1 Score**: 94.80%
|
| 83 |
+
- **Precision**: 93.83%
|
| 84 |
+
- **Recall**: 95.80%
|
| 85 |
+
|
| 86 |
+
### Test Metrics
|
| 87 |
+
- **Accuracy**: 89.31%
|
| 88 |
+
- **F1 Score**: 82.65%
|
| 89 |
+
- **Precision**: 92.05%
|
| 90 |
+
- **Recall**: 75.00%
|
| 91 |
+
|
| 92 |
+
### Confusion Matrix (Test Set)
|
| 93 |
+
```
|
| 94 |
+
Predicted
|
| 95 |
+
0 1
|
| 96 |
+
Actual 0 203 7 (96.7% 정확도)
|
| 97 |
+
1 27 81 (75.0% 재현율)
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
**성능 해석**:
|
| 101 |
+
- **높은 Precision (92.05%)**: 모델이 "checkworthy"라고 예측한 문장의 92%가 실제로 팩트체크가 필요
|
| 102 |
+
- **적절한 Recall (75.00%)**: 실제 checkworthy 문장의 75%를 탐지
|
| 103 |
+
- **낮은 False Positive (7개)**: 불필요한 팩트체크 요청 최소화
|
| 104 |
+
|
| 105 |
+
## 사용 방법 (How to Use)
|
| 106 |
+
|
| 107 |
+
### 1. 설치 (Installation)
|
| 108 |
+
|
| 109 |
+
```bash
|
| 110 |
+
pip install transformers torch
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
### 2. 모델 로드 (Loading the Model)
|
| 114 |
+
|
| 115 |
+
```python
|
| 116 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 117 |
+
import torch
|
| 118 |
+
|
| 119 |
+
# 모델 로드
|
| 120 |
+
model_name = "jonghhhh/claim_factcheck"
|
| 121 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 122 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
| 123 |
+
|
| 124 |
+
# GPU 사용 (선택사항)
|
| 125 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 126 |
+
model.to(device)
|
| 127 |
+
model.eval()
|
| 128 |
+
|
| 129 |
+
print(f"✅ 모델 로드 완료! (Device: {device})")
|
| 130 |
+
```
|
| 131 |
+
|
| 132 |
+
### 3. 추론 예시 (Inference Example)
|
| 133 |
+
|
| 134 |
+
#### 단일 문장 분류
|
| 135 |
+
|
| 136 |
+
```python
|
| 137 |
+
def predict_claim(text):
|
| 138 |
+
"""
|
| 139 |
+
입력 문장이 팩트체크가 필요한 주장인지 판단합니다.
|
| 140 |
+
|
| 141 |
+
Args:
|
| 142 |
+
text (str): 분석할 한국어 문장
|
| 143 |
+
|
| 144 |
+
Returns:
|
| 145 |
+
dict: {
|
| 146 |
+
'text': 입력 문장,
|
| 147 |
+
'is_checkworthy': True/False,
|
| 148 |
+
'confidence': 0.0~1.0 (확신도),
|
| 149 |
+
'label': 0 또는 1,
|
| 150 |
+
'probabilities': {'non_checkworthy': 0.xx, 'checkworthy': 0.xx}
|
| 151 |
+
}
|
| 152 |
+
"""
|
| 153 |
+
# 토크나이징
|
| 154 |
+
inputs = tokenizer(
|
| 155 |
+
text,
|
| 156 |
+
truncation=True,
|
| 157 |
+
max_length=128,
|
| 158 |
+
return_tensors="pt"
|
| 159 |
+
)
|
| 160 |
+
inputs = {k: v.to(device) for k, v in inputs.items()}
|
| 161 |
+
|
| 162 |
+
# 추론
|
| 163 |
+
with torch.no_grad():
|
| 164 |
+
outputs = model(**inputs)
|
| 165 |
+
probs = torch.softmax(outputs.logits, dim=-1)
|
| 166 |
+
predicted_label = torch.argmax(probs, dim=-1).item()
|
| 167 |
+
confidence = probs[0][predicted_label].item()
|
| 168 |
+
|
| 169 |
+
return {
|
| 170 |
+
'text': text,
|
| 171 |
+
'is_checkworthy': bool(predicted_label),
|
| 172 |
+
'confidence': confidence,
|
| 173 |
+
'label': predicted_label,
|
| 174 |
+
'probabilities': {
|
| 175 |
+
'non_checkworthy': probs[0][0].item(),
|
| 176 |
+
'checkworthy': probs[0][1].item()
|
| 177 |
+
}
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
# 사용 예시
|
| 181 |
+
examples = [
|
| 182 |
+
"오늘 토론회는 SBS 상암동 스튜디오에서 진행하고 있고요.",
|
| 183 |
+
"청년 실업률이 최근 3년간 계속 상승하고 있습니다.",
|
| 184 |
+
"우리나라 GDP 성장률은 OECD 평균을 넘어섰습니다.",
|
| 185 |
+
"국민 여러분께 진심으로 감사드립니다."
|
| 186 |
+
]
|
| 187 |
+
|
| 188 |
+
for text in examples:
|
| 189 |
+
result = predict_claim(text)
|
| 190 |
+
print(f"\n📝 입력: {result['text']}")
|
| 191 |
+
print(f"{'🔍 팩트체크 필요' if result['is_checkworthy'] else '✅ 팩트체크 불필요'}")
|
| 192 |
+
print(f"확신도: {result['confidence']*100:.1f}%")
|
| 193 |
+
print(f"상세 확률: Non-CW {result['probabilities']['non_checkworthy']*100:.1f}% | CW {result['probabilities']['checkworthy']*100:.1f}%")
|
| 194 |
+
```
|
| 195 |
+
|
| 196 |
+
**출력 예시**:
|
| 197 |
+
```
|
| 198 |
+
📝 입력: 청년 실업률이 최근 3년간 계속 상승하고 있습니다.
|
| 199 |
+
🔍 팩트체크 필요
|
| 200 |
+
확신도: 94.3%
|
| 201 |
+
상세 확률: Non-CW 5.7% | CW 94.3%
|
| 202 |
+
|
| 203 |
+
📝 입력: 오늘 토론회는 SBS 상암동 스튜디오에서 진행하고 있고요.
|
| 204 |
+
✅ 팩트체크 불필요
|
| 205 |
+
확신도: 98.2%
|
| 206 |
+
상세 확률: Non-CW 98.2% | CW 1.8%
|
| 207 |
+
```
|
| 208 |
+
|
| 209 |
+
#### 배치 처리 (Batch Processing)
|
| 210 |
+
|
| 211 |
+
```python
|
| 212 |
+
def predict_claims_batch(texts, batch_size=32):
|
| 213 |
+
"""
|
| 214 |
+
여러 문장을 배치로 처리합니다.
|
| 215 |
+
|
| 216 |
+
Args:
|
| 217 |
+
texts (list): 문장 리스트
|
| 218 |
+
batch_size (int): 배치 크기
|
| 219 |
+
|
| 220 |
+
Returns:
|
| 221 |
+
list: 각 문장의 예측 결과 리스트
|
| 222 |
+
"""
|
| 223 |
+
results = []
|
| 224 |
+
|
| 225 |
+
for i in range(0, len(texts), batch_size):
|
| 226 |
+
batch_texts = texts[i:i+batch_size]
|
| 227 |
+
|
| 228 |
+
# 배치 토크나이징
|
| 229 |
+
inputs = tokenizer(
|
| 230 |
+
batch_texts,
|
| 231 |
+
truncation=True,
|
| 232 |
+
max_length=128,
|
| 233 |
+
padding=True,
|
| 234 |
+
return_tensors="pt"
|
| 235 |
+
)
|
| 236 |
+
inputs = {k: v.to(device) for k, v in inputs.items()}
|
| 237 |
+
|
| 238 |
+
# 배치 추론
|
| 239 |
+
with torch.no_grad():
|
| 240 |
+
outputs = model(**inputs)
|
| 241 |
+
probs = torch.softmax(outputs.logits, dim=-1)
|
| 242 |
+
predicted_labels = torch.argmax(probs, dim=-1).cpu().numpy()
|
| 243 |
+
|
| 244 |
+
# 결과 저장
|
| 245 |
+
for j, text in enumerate(batch_texts):
|
| 246 |
+
results.append({
|
| 247 |
+
'text': text,
|
| 248 |
+
'is_checkworthy': bool(predicted_labels[j]),
|
| 249 |
+
'confidence': probs[j][predicted_labels[j]].item(),
|
| 250 |
+
'label': int(predicted_labels[j])
|
| 251 |
+
})
|
| 252 |
+
|
| 253 |
+
return results
|
| 254 |
+
|
| 255 |
+
# 배치 추론 예시
|
| 256 |
+
texts = [
|
| 257 |
+
"국회의원 정원을 300명으로 확대하겠습니다.",
|
| 258 |
+
"감사합니다.",
|
| 259 |
+
"2024년 경제성장률이 2.1%를 기록했습니다.",
|
| 260 |
+
# ... 더 많은 문장들
|
| 261 |
+
]
|
| 262 |
+
|
| 263 |
+
batch_results = predict_claims_batch(texts)
|
| 264 |
+
checkworthy_claims = [r for r in batch_results if r['is_checkworthy']]
|
| 265 |
+
print(f"✅ 총 {len(texts)}개 문장 중 {len(checkworthy_claims)}개가 팩트체크 필요")
|
| 266 |
+
```
|
| 267 |
+
|
| 268 |
+
### 4. 실전 활용 예시 (Real-world Use Case)
|
| 269 |
+
|
| 270 |
+
```python
|
| 271 |
+
# 뉴스 기사에서 팩트체크 대상 추출
|
| 272 |
+
def extract_checkworthy_claims(article_text, threshold=0.7):
|
| 273 |
+
"""
|
| 274 |
+
기사에서 팩트체크가 필요한 문장들을 추출합니다.
|
| 275 |
+
|
| 276 |
+
Args:
|
| 277 |
+
article_text (str): 뉴스 기사 전문
|
| 278 |
+
threshold (float): checkworthy 판단 임계값 (0.0~1.0)
|
| 279 |
+
|
| 280 |
+
Returns:
|
| 281 |
+
list: 팩트체크 대상 문장들
|
| 282 |
+
"""
|
| 283 |
+
# 문장 분리 (간단한 예시)
|
| 284 |
+
sentences = [s.strip() for s in article_text.split('.') if s.strip()]
|
| 285 |
+
|
| 286 |
+
# 배치 예측
|
| 287 |
+
results = predict_claims_batch(sentences)
|
| 288 |
+
|
| 289 |
+
# 임계값 이상의 checkworthy 문장만 필터링
|
| 290 |
+
checkworthy_claims = [
|
| 291 |
+
r for r in results
|
| 292 |
+
if r['is_checkworthy'] and r['confidence'] >= threshold
|
| 293 |
+
]
|
| 294 |
+
|
| 295 |
+
# 확신도 순으로 정렬
|
| 296 |
+
checkworthy_claims.sort(key=lambda x: x['confidence'], reverse=True)
|
| 297 |
+
|
| 298 |
+
return checkworthy_claims
|
| 299 |
+
|
| 300 |
+
# 사용 예시
|
| 301 |
+
article = """
|
| 302 |
+
정부는 오늘 경제정책 방향을 발표했습니다.
|
| 303 |
+
청년 실업률이 지난해 대비 2.3%p 감소했다고 밝혔습니다.
|
| 304 |
+
이는 역대 최대 폭의 하락입니다.
|
| 305 |
+
앞으로도 일자리 창출에 힘쓰겠다고 강조했습니다.
|
| 306 |
+
"""
|
| 307 |
+
|
| 308 |
+
claims = extract_checkworthy_claims(article, threshold=0.8)
|
| 309 |
+
print(f"🔍 발견된 팩트체크 대상: {len(claims)}개\n")
|
| 310 |
+
|
| 311 |
+
for i, claim in enumerate(claims, 1):
|
| 312 |
+
print(f"{i}. {claim['text']}")
|
| 313 |
+
print(f" 확신도: {claim['confidence']*100:.1f}%\n")
|
| 314 |
+
```
|
| 315 |
+
|
| 316 |
+
## 모델 아키텍처 (Model Architecture)
|
| 317 |
+
|
| 318 |
+
- **Model Type**: ELECTRA (Efficiently Learning an Encoder that Classifies Token Replacements Accurately)
|
| 319 |
+
- **Hidden Size**: 768
|
| 320 |
+
- **Number of Layers**: 12
|
| 321 |
+
- **Number of Attention Heads**: 12
|
| 322 |
+
- **Vocabulary Size**: 32,000
|
| 323 |
+
- **Max Sequence Length**: 128 tokens
|
| 324 |
+
- **Classification Head**: Linear layer (768 → 2)
|
| 325 |
+
|
| 326 |
+
## 한계 및 고려사항 (Limitations)
|
| 327 |
+
|
| 328 |
+
1. **도메인 특화**: 정치/뉴스 도메인에 최적화되어 있어, 일상 대화나 기술 문서에는 성능이 떨어질 수 있음
|
| 329 |
+
2. **길이 제한**: 최대 128 토큰까지만 처리 가능 (약 100-150 단어)
|
| 330 |
+
3. **기계 번역 데이터**: 영어에서 번역된 데이터로 학습되어 자연스러운 한국어 표현에서 성능 차이 가능
|
| 331 |
+
4. **이진 분류**: Checkworthy 정도를 0/1로만 분류 (세밀한 점수 제공 안 함)
|
| 332 |
+
5. **False Negative**: 실제 주장의 25%를 놓칠 수 있음 (Recall 75%)
|
| 333 |
+
|
| 334 |
+
## 개선 방향 (Future Improvements)
|
| 335 |
+
|
| 336 |
+
- [ ] 한국어 네이티브 팩트체크 데이터셋으로 추가 학습
|
| 337 |
+
- [ ] 더 긴 문맥 처리를 위한 모델 업그레이드 (max_length 256+)
|
| 338 |
+
- [ ] 다중 클래스 분류 (checkworthy 점수를 0-5 척도로)
|
| 339 |
+
- [ ] 주장의 주제 카테고리 분류 기능 추가
|
| 340 |
+
|
| 341 |
+
## 라이선스 (License)
|
| 342 |
+
|
| 343 |
+
이 모델은 베이스 모델인 [beomi/KcELECTRA-base-v2022](https://huggingface.co/beomi/KcELECTRA-base-v2022)의 라이선스를 따릅니다.
|
| 344 |
+
|
| 345 |
+
## 인용 (Citation)
|
| 346 |
+
|
| 347 |
+
이 모델을 연구나 프로젝트에 사용하신다면 다음과 같이 인용해주세요:
|
| 348 |
+
|
| 349 |
+
```bibtex
|
| 350 |
+
@misc{korean-claim-factcheck-2025,
|
| 351 |
+
author = {Jonghhhh},
|
| 352 |
+
title = {Korean Claim Detection Model for Fact-Checking},
|
| 353 |
+
year = {2025},
|
| 354 |
+
publisher = {Hugging Face},
|
| 355 |
+
howpublished = {\url{https://huggingface.co/jonghhhh/claim_factcheck}},
|
| 356 |
+
note = {Based on KcELECTRA-base-v2022}
|
| 357 |
+
}
|
| 358 |
+
```
|
| 359 |
+
|
| 360 |
+
## 참고 자료 (References)
|
| 361 |
+
|
| 362 |
+
- **Base Model**: [beomi/KcELECTRA-base-v2022](https://huggingface.co/beomi/KcELECTRA-base-v2022)
|
| 363 |
+
- **Dataset**: [CLEF CheckThat! Lab 2024](https://clef2025.clef-initiative.eu/index.php?page=Pages/Labs/CheckThat.html)
|
| 364 |
+
- **Paper**: [CheckThat! Lab: Check-Worthiness, Subjectivity, and Persuasion](https://link.springer.com/chapter/10.1007/978-3-031-13643-6_24)
|
| 365 |
+
|
| 366 |
+
## 연락처 (Contact)
|
| 367 |
+
|
| 368 |
+
질문이나 피드백이 있으시면 Issues를 통해 남겨주세요!
|
| 369 |
+
|
| 370 |
+
---
|
| 371 |
+
|
| 372 |
+
**Tags**: `claim-detection`, `fact-checking`, `korean`, `electra`, `text-classification`, `checkworthy`, `misinformation-detection`
|
config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ElectraForSequenceClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.1,
|
| 6 |
+
"classifier_dropout": null,
|
| 7 |
+
"dtype": "float32",
|
| 8 |
+
"embedding_size": 768,
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.1,
|
| 11 |
+
"hidden_size": 768,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 3072,
|
| 14 |
+
"layer_norm_eps": 1e-12,
|
| 15 |
+
"max_position_embeddings": 512,
|
| 16 |
+
"model_type": "electra",
|
| 17 |
+
"num_attention_heads": 12,
|
| 18 |
+
"num_hidden_layers": 12,
|
| 19 |
+
"pad_token_id": 0,
|
| 20 |
+
"position_embedding_type": "absolute",
|
| 21 |
+
"problem_type": "single_label_classification",
|
| 22 |
+
"summary_activation": "gelu",
|
| 23 |
+
"summary_last_dropout": 0.1,
|
| 24 |
+
"summary_type": "first",
|
| 25 |
+
"summary_use_proj": true,
|
| 26 |
+
"tokenizer_class": "BertTokenizer",
|
| 27 |
+
"transformers_version": "4.57.0",
|
| 28 |
+
"type_vocab_size": 2,
|
| 29 |
+
"use_cache": true,
|
| 30 |
+
"vocab_size": 54343
|
| 31 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3e0fb4a6b3146e77ad3eede30b9246f51bf97c0ab75862c735c92d55c1b48d0d
|
| 3 |
+
size 511137368
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"mask_token": "[MASK]",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"sep_token": "[SEP]",
|
| 6 |
+
"unk_token": "[UNK]"
|
| 7 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "[PAD]",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"1": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"2": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"3": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"4": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"clean_up_tokenization_spaces": true,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_basic_tokenize": true,
|
| 47 |
+
"do_lower_case": false,
|
| 48 |
+
"extra_special_tokens": {},
|
| 49 |
+
"mask_token": "[MASK]",
|
| 50 |
+
"model_max_length": 512,
|
| 51 |
+
"never_split": null,
|
| 52 |
+
"pad_token": "[PAD]",
|
| 53 |
+
"sep_token": "[SEP]",
|
| 54 |
+
"strip_accents": null,
|
| 55 |
+
"tokenize_chinese_chars": true,
|
| 56 |
+
"tokenizer_class": "BertTokenizer",
|
| 57 |
+
"unk_token": "[UNK]"
|
| 58 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc3478f8b371f9fc9e4c05d2fc0dec8b6043db500963a3fa7e0f63967d10323a
|
| 3 |
+
size 5368
|
training_metadata.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_name": "beomi/KcELECTRA-base-v2022",
|
| 3 |
+
"task": "binary_text_classification",
|
| 4 |
+
"num_labels": 2,
|
| 5 |
+
"training_args": {
|
| 6 |
+
"num_train_epochs": 5,
|
| 7 |
+
"per_device_train_batch_size": 32,
|
| 8 |
+
"per_device_eval_batch_size": 64,
|
| 9 |
+
"learning_rate": 3e-05,
|
| 10 |
+
"weight_decay": 0.01,
|
| 11 |
+
"warmup_ratio": 0.1,
|
| 12 |
+
"bf16": true,
|
| 13 |
+
"optimizer": "adamw_torch_fused",
|
| 14 |
+
"seed": 42
|
| 15 |
+
},
|
| 16 |
+
"training_time_minutes": 1.87,
|
| 17 |
+
"validation_metrics": {
|
| 18 |
+
"eval_loss": 0.06963474303483963,
|
| 19 |
+
"eval_accuracy": 0.9757751937984496,
|
| 20 |
+
"eval_f1": 0.9480249480249481,
|
| 21 |
+
"eval_precision": 0.9382716049382716,
|
| 22 |
+
"eval_recall": 0.957983193277311,
|
| 23 |
+
"eval_runtime": 0.5253,
|
| 24 |
+
"eval_samples_per_second": 1964.52,
|
| 25 |
+
"eval_steps_per_second": 32.361,
|
| 26 |
+
"epoch": 3.409090909090909
|
| 27 |
+
},
|
| 28 |
+
"test_metrics": {
|
| 29 |
+
"eval_loss": 0.26781579852104187,
|
| 30 |
+
"eval_accuracy": 0.8930817610062893,
|
| 31 |
+
"eval_f1": 0.826530612244898,
|
| 32 |
+
"eval_precision": 0.9204545454545454,
|
| 33 |
+
"eval_recall": 0.75,
|
| 34 |
+
"eval_runtime": 0.1474,
|
| 35 |
+
"eval_samples_per_second": 2156.782,
|
| 36 |
+
"eval_steps_per_second": 33.912,
|
| 37 |
+
"epoch": 3.409090909090909
|
| 38 |
+
},
|
| 39 |
+
"confusion_matrix": {
|
| 40 |
+
"TN": 203,
|
| 41 |
+
"FP": 7,
|
| 42 |
+
"FN": 27,
|
| 43 |
+
"TP": 81
|
| 44 |
+
}
|
| 45 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|