xanderbeberman commited on
Commit
e771d70
·
verified ·
1 Parent(s): 3326556

publish assertion encoder with model card

Browse files
Files changed (1) hide show
  1. README.md +146 -0
README.md ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_is_an_evaluative_statement
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.6406
32
+ name: F1 (positive class, test)
33
+ - type: precision
34
+ value: 0.7301
35
+ name: Precision (positive class, test)
36
+ - type: recall
37
+ value: 0.5707
38
+ name: Recall (positive class, test)
39
+ - type: roc_auc
40
+ value: 0.9181
41
+ name: ROC-AUC (test)
42
+
43
+ ---
44
+
45
+ # Assertion: the utterance is an evaluative statement
46
+
47
+ Assertion id: `td__the_utterance_is_an_evaluative_statement` (top-down assertion set `td`).
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,183 (53.3%) |
60
+ | [StanfordSCALE/assertions_llm_annotated_talkmoves](https://huggingface.co/datasets/StanfordSCALE/assertions_llm_annotated_talkmoves) | dev | 3,295 (13.3%) |
61
+ | [StanfordSCALE/assertions_llm_annotated_talkmoves](https://huggingface.co/datasets/StanfordSCALE/assertions_llm_annotated_talkmoves) | test | 8,237 (33.3%) |
62
+
63
+ This model's columns are `assertion_is_an_evaluative_statement` and `split_is_an_evaluative_statement`.
64
+
65
+ **Base rate** (share of rows labeled as True): 5.3% overall —
66
+ 5.4% train, 5.7% dev, 5.1% test.
67
+
68
+ ### Labels and annotation
69
+
70
+ Labels were generated with LLM annotators. Krippendorff's alpha for this assertion is 0.678.
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,295 | 5.7% | 0.814 | 0.631 | 0.711 | 0.938 | 0.779 |
98
+ | test | 8,237 | 5.1% | 0.730 | 0.571 | 0.641 | 0.918 | 0.674 |
99
+
100
+ ### Limitations
101
+
102
+ - **Labels come from LLM annotators, not human coders.** Agreement between annotators with Krippendorff's Alpha is 0.678.
103
+ - Trained on teacher utterances only. Behaviour on student speech is untested.
104
+
105
+
106
+ ---
107
+
108
+ ## How to Use
109
+
110
+ ### Message Structure
111
+
112
+ The model was trained on text built as:
113
+
114
+ ```
115
+ {utterance}
116
+ ```
117
+
118
+ The utterance is passed through as-is.
119
+
120
+ ### Running instructions
121
+
122
+ ```bash
123
+ pip install setfit
124
+ ```
125
+
126
+ ```python
127
+ from setfit import SetFitModel
128
+
129
+ model = SetFitModel.from_pretrained("StanfordSCALE/assertion_is_an_evaluative_statement")
130
+
131
+ text = 'And if somebody came in now with a fish bigger than the boy that would have missed the point right'
132
+ model.predict([text]) # -> array([1]) when the assertion holds
133
+ model.predict_proba([text]) # -> [[P(no), P(yes)]]
134
+ ```
135
+
136
+
137
+ ## Citation
138
+
139
+ ```bibtex
140
+ @misc{assertion_is_an_evaluative_statement,
141
+ author = {Stanford SCALE Initiative},
142
+ title = {Assertion classifier: the utterance is an evaluative statement},
143
+ year = {2026},
144
+ url = {https://huggingface.co/StanfordSCALE/assertion_is_an_evaluative_statement}
145
+ }
146
+ ```