xanderbeberman commited on
Commit
4f5c6dc
·
verified ·
1 Parent(s): 5d50d09

publish assertion encoder with model card

Browse files
Files changed (1) hide show
  1. README.md +147 -0
README.md ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ library_name: setfit
4
+ pipeline_tag: text-classification
5
+ base_model: sentence-transformers/paraphrase-mpnet-base-v2
6
+ datasets:
7
+ - StanfordSCALE/assertions_llm_annotated_talkmoves
8
+ metrics:
9
+ - f1
10
+ - precision
11
+ - recall
12
+ - roc_auc
13
+ tags:
14
+ - setfit
15
+ - text-classification
16
+ - education
17
+ - classroom-discourse
18
+ - edubehaviors
19
+ - assertion
20
+ model-index:
21
+ - name: assertion_repeats_a_problem
22
+ results:
23
+ - task:
24
+ type: text-classification
25
+ dataset:
26
+ name: assertions_llm_annotated_talkmoves
27
+ type: StanfordSCALE/assertions_llm_annotated_talkmoves
28
+ split: test
29
+ metrics:
30
+ - type: f1
31
+ value: 0.3563
32
+ name: F1 (positive class, test)
33
+ - type: precision
34
+ value: 0.4125
35
+ name: Precision (positive class, test)
36
+ - type: recall
37
+ value: 0.3136
38
+ name: Recall (positive class, test)
39
+ - type: roc_auc
40
+ value: 0.7589
41
+ name: ROC-AUC (test)
42
+
43
+ ---
44
+
45
+ # Assertion: repeats a problem
46
+
47
+ Assertion id: `bu5__repeats_a_problem` (bottom-up assertion set `bu5`).
48
+
49
+ This classifier was trained for *EduBehaviors: Assertion-based schemas for auditable dialogue coding* and is usable through the Python package `EduBehaviors-kit`. This classifier was trained on an LLM-annotated subset of teacher utterances from the [TalkMoves Dataset](https://github.com/SumnerLab/TalkMoves). See the Datasets section below for more information.
50
+
51
+ ---
52
+
53
+ ## Training Details
54
+
55
+ ### Datasets
56
+
57
+ | Dataset | Split | Size |
58
+ |---------|-------|------|
59
+ | [StanfordSCALE/assertions_llm_annotated_talkmoves](https://huggingface.co/datasets/StanfordSCALE/assertions_llm_annotated_talkmoves) | train | 13,178 (53.3%) |
60
+ | [StanfordSCALE/assertions_llm_annotated_talkmoves](https://huggingface.co/datasets/StanfordSCALE/assertions_llm_annotated_talkmoves) | dev | 3,297 (13.3%) |
61
+ | [StanfordSCALE/assertions_llm_annotated_talkmoves](https://huggingface.co/datasets/StanfordSCALE/assertions_llm_annotated_talkmoves) | test | 8,240 (33.3%) |
62
+
63
+ This model's columns are `assertion_repeats_a_problem` and `split_repeats_a_problem`.
64
+
65
+ **Base rate** (share of rows labeled as True): 4.2% overall —
66
+ 4.3% train, 4.0% dev, 4.1% test.
67
+
68
+ ### Labels and annotation
69
+
70
+ Labels were generated with LLM annotators. Krippendorff's alpha for this assertion is 0.442.
71
+
72
+
73
+ ### Hyperparameters
74
+
75
+ | Parameter | Value |
76
+ |-----------|-------|
77
+ | Base model (body) | [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2) |
78
+ | Head | `LogisticRegression` |
79
+ | Body learning rate | 2e-05 |
80
+ | Head learning rate | 0.01 |
81
+ | Batch size | 16 (contrastive phase) / 32 (head) |
82
+ | Epochs | 10 |
83
+ | Max steps | 5000 (contrastive phase) |
84
+ | Eval max steps | 100 |
85
+ | Seed | 20260904 |
86
+ | Mixed precision | enabled on GPU |
87
+
88
+ ---
89
+
90
+ ## Evaluation
91
+
92
+ ### Results
93
+
94
+
95
+ | Split | n | Base rate | Precision | Recall | F1 (positive class) | ROC-AUC | Average precision |
96
+ |-------|---|-----------|-----------|--------|---------------------|---------|-------------------|
97
+ | dev | 3,297 | 4.0% | 0.360 | 0.241 | 0.288 | 0.767 | 0.254 |
98
+ | test | 8,240 | 4.1% | 0.412 | 0.314 | 0.356 | 0.759 | 0.255 |
99
+
100
+ ### Limitations
101
+
102
+ - **Labels come from LLM annotators, not human coders.** Agreement between annotators with Krippendorff's Alpha is 0.442.
103
+ - Trained on teacher utterances only. Behaviour on student speech is untested.
104
+ - Test F1 is 0.356. This model does not work well enough to be used on its own.
105
+
106
+
107
+ ---
108
+
109
+ ## How to Use
110
+
111
+ ### Message Structure
112
+
113
+ The model was trained on text built as:
114
+
115
+ ```
116
+ {utterance}
117
+ ```
118
+
119
+ The utterance is passed through as-is.
120
+
121
+ ### Running instructions
122
+
123
+ ```bash
124
+ pip install setfit
125
+ ```
126
+
127
+ ```python
128
+ from setfit import SetFitModel
129
+
130
+ model = SetFitModel.from_pretrained("StanfordSCALE/assertion_repeats_a_problem")
131
+
132
+ text = 'if you use different models'
133
+ model.predict([text]) # -> array([1]) when the assertion holds
134
+ model.predict_proba([text]) # -> [[P(no), P(yes)]]
135
+ ```
136
+
137
+
138
+ ## Citation
139
+
140
+ ```bibtex
141
+ @misc{assertion_repeats_a_problem,
142
+ author = {Stanford SCALE Initiative},
143
+ title = {Assertion classifier: repeats a problem},
144
+ year = {2026},
145
+ url = {https://huggingface.co/StanfordSCALE/assertion_repeats_a_problem}
146
+ }
147
+ ```