xanderbeberman commited on
Commit
5520ec4
·
verified ·
1 Parent(s): ef1d0ce

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_references_classroom_materials
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.7475
32
+ name: F1 (positive class, test)
33
+ - type: precision
34
+ value: 0.8198
35
+ name: Precision (positive class, test)
36
+ - type: recall
37
+ value: 0.6869
38
+ name: Recall (positive class, test)
39
+ - type: roc_auc
40
+ value: 0.9261
41
+ name: ROC-AUC (test)
42
+
43
+ ---
44
+
45
+ # Assertion: references classroom materials
46
+
47
+ Assertion id: `bu5__references_classroom_materials` (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,180 (53.3%) |
60
+ | [StanfordSCALE/assertions_llm_annotated_talkmoves](https://huggingface.co/datasets/StanfordSCALE/assertions_llm_annotated_talkmoves) | dev | 3,294 (13.3%) |
61
+ | [StanfordSCALE/assertions_llm_annotated_talkmoves](https://huggingface.co/datasets/StanfordSCALE/assertions_llm_annotated_talkmoves) | test | 8,241 (33.3%) |
62
+
63
+ This model's columns are `assertion_references_classroom_materials` and `split_references_classroom_materials`.
64
+
65
+ **Base rate** (share of rows labeled as True): 6.7% overall —
66
+ 6.8% train, 6.5% dev, 6.6% test.
67
+
68
+ ### Labels and annotation
69
+
70
+ Labels were generated with LLM annotators. Krippendorff's alpha for this assertion is 0.703.
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,294 | 6.5% | 0.806 | 0.662 | 0.727 | 0.891 | 0.770 |
98
+ | test | 8,241 | 6.6% | 0.820 | 0.687 | 0.747 | 0.926 | 0.809 |
99
+
100
+ ### Limitations
101
+
102
+ - **Labels come from LLM annotators, not human coders.** Agreement between annotators with Krippendorff's Alpha is 0.703.
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_references_classroom_materials")
130
+
131
+ text = 'Some of you built different models and I asked you a question about that'
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_references_classroom_materials,
141
+ author = {Stanford SCALE Initiative},
142
+ title = {Assertion classifier: references classroom materials},
143
+ year = {2026},
144
+ url = {https://huggingface.co/StanfordSCALE/assertion_references_classroom_materials}
145
+ }
146
+ ```