File size: 1,655 Bytes
1d51c27
e1739f2
 
 
 
 
 
 
 
 
 
 
 
 
1d51c27
 
e1739f2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
license: apache-2.0
base_model: bert-base-uncased
tags:
- text-classification
- multi-label-classification
- bert
- conversational-qa
- educational-ai
language: en
metrics:
- f1
- precision
- recall
---

# Enhanced BERT Multi-Label Classifier for Conversational QA

## Performance
- **Micro F1**: 0.7779
- **Macro F1**: 0.7098
- **Optimal Threshold**: 0.20 (CRITICAL - not 0.5!)

## Class Performance
| Label | F1 Score | Status |
|-------|----------|---------|
| questioning | 0.933 | Excellent |
| responsive | 0.756 | Good |
| interactive | 0.613 | Good (breakthrough!) |
| collaborative | 0.537 | Acceptable |

## Usage
```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

model = AutoModelForSequenceClassification.from_pretrained("IIchukissII/enhanced-bert-coqa-multilabel-classifier")
tokenizer = AutoTokenizer.from_pretrained("IIchukissII/enhanced-bert-coqa-multilabel-classifier")

text = "context [SEP] question [SEP] answer"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)

with torch.no_grad():
    outputs = model(**inputs)
    probs = torch.sigmoid(outputs.logits)

# IMPORTANT: Use threshold 0.20, not 0.5!
LABELS = ["interactive", "responsive", "questioning", "collaborative"]
predictions = {label: int(probs[0, i] >= 0.20) for i, label in enumerate(LABELS)}
```

## Architecture
- Enhanced BERT with 3-layer classifier head
- Layer normalization and L2 regularization
- Optimized for multi-label classification

## Training
- 7 epochs on expanded dataset
- Breakthrough in interactive detection (+15.7% F1)
- Threshold optimization discovery (0.20 optimal)