gnumanth commited on
Commit
870ba4a
路
verified 路
1 Parent(s): e340de6

Upload fine-tuned nullspan 10-op System One extraction model (Apple Silicon MPS)

Browse files
README.md CHANGED
@@ -25,7 +25,7 @@ pipeline_tag: question-answering
25
  ## Architectural Enhancements (`NullspanForExtraction`)
26
 
27
  Built on `distilbert/distilbert-base-uncased` (67M parameters) with 5 parallel System One heads and 10 routed operations:
28
- 1. **`null_head`**: Calibrated `p_null` probability (`ECE: 1e-05`, `Brier: 0.0`) for absent field abstention (`value: null` + nearest `guess` decoy + `abstention_reason`).
29
  2. **`span_head`**: Token-level start/end pointer network mapped via `offset_mapping` to exact character spans `[start, end]` with calibrated posterior `confidence` and Shannon `span_entropy_bits`.
30
  3. **`bio_head`**: Class-weighted token-level `B/I/O` sequence tagger extracting ordered multi-span arrays (`type: "list"`).
31
  4. **`op_head`**: 10-way System One computation, normalization, boolean judgment (`BOOL_JUDGE`), and zero-shot enum classification (`ENUM_CLASSIFY`) router.
@@ -33,12 +33,12 @@ Built on `distilbert/distilbert-base-uncased` (67M parameters) with 5 parallel S
33
 
34
  ## Multi-Axis Empirical Evaluation (`gnumanth/nullspan-dataset`)
35
 
36
- - **Training time**: `358.3s` (`Apple Silicon MPS`)
37
- - **Null Abstention Accuracy (`p_null`)**: `100.0%` (`ECE: 1e-05`, `Brier: 0.0`)
38
- - **Grounded Span Exact Match (`[start, end]`)**: `99.31%`
39
  - **10-Way Operation Router Accuracy**: `100.0%`
40
  - **Multi-Span List BIO Token Accuracy**: `100.0%`
41
- - **Quantile Distribution MAE / Pinball Loss**: `0.0007` / `0.0001`
42
  - **Canonical Multi-Task Suite Accuracy**: `100.0%`
43
  - **Adversarial Decoy & Prompt-Injection Stress Accuracy**: `100.0%`
44
  - **Cross-Field Invariant Verification Accuracy**: `100.0%`
@@ -82,26 +82,26 @@ print(result["answers"])
82
  {
83
  "reporter": {
84
  "type": "text",
85
- "p_null": 3.8e-07,
86
  "span": [
87
  276,
88
  280
89
  ],
90
  "guess": "Mira",
91
- "confidence": 0.999992,
92
- "span_entropy_bits": 0.0002,
93
  "value": "Mira"
94
  },
95
  "incident_id": {
96
  "type": "text",
97
- "p_null": 3e-08,
98
  "span": [
99
  9,
100
  18
101
  ],
102
  "guess": "INC-40928",
103
- "confidence": 0.999962,
104
- "span_entropy_bits": 0.0006,
105
  "value": "INC-40928"
106
  },
107
  "opened_on": {
@@ -118,27 +118,27 @@ print(result["answers"])
118
  },
119
  "total_credit": {
120
  "type": "number",
121
- "p_null": 4.5e-06,
122
  "span": [
123
  109,
124
  130
125
  ],
126
  "guess": 1550.75,
127
  "confidence": 0.999989,
128
- "span_entropy_bits": 0.0002,
129
  "value": 1550.75
130
  },
131
  "outage_days": {
132
  "type": "duration",
133
- "p_null": 3.04e-06,
134
  "unit": "days",
135
  "span": [
136
  29,
137
  41
138
  ],
139
  "guess": 7,
140
- "confidence": 0.999992,
141
- "span_entropy_bits": 0.0001,
142
  "value": 7
143
  },
144
  "failure_modes": {
@@ -157,12 +157,12 @@ print(result["answers"])
157
  100
158
  ]
159
  ],
160
- "confidence": 0.497096,
161
- "span_entropy_bits": 1.5381
162
  },
163
  "severity": {
164
  "type": "enum",
165
- "p_null": 1.4e-07,
166
  "span": [
167
  155,
168
  160
@@ -173,38 +173,38 @@ print(result["answers"])
173
  "sev-3"
174
  ],
175
  "probs": {
176
- "sev-1": 0.999975,
177
- "sev-2": 1.3e-05,
178
- "sev-3": 1.3e-05
179
  },
180
  "guess": "sev-1",
181
- "confidence": 0.999975,
182
- "span_entropy_bits": 0.0005,
183
  "value": "sev-1"
184
  },
185
  "data_loss": {
186
  "type": "boolean",
187
- "p_null": 1.28e-06,
188
- "p_true": 7e-06,
189
  "span": [
190
  188,
191
  193
192
  ],
193
  "guess": false,
194
- "confidence": 0.999993,
195
  "span_entropy_bits": 0.0001,
196
  "value": false
197
  },
198
  "cve_id": {
199
  "type": "text",
200
- "p_null": 0.9999429,
201
  "span": [
202
  123,
203
  130
204
  ],
205
  "guess": "$310.25",
206
  "confidence": 0.05,
207
- "span_entropy_bits": 0.0009,
208
  "value": null,
209
  "abstention_reason": "unassigned_placeholder"
210
  },
@@ -212,11 +212,11 @@ print(result["answers"])
212
  "type": "estimate",
213
  "value": 1890,
214
  "median": 1870,
215
- "p10": 1270,
216
  "p90": 2670,
217
  "p_below": 0.0,
218
  "p_above": 0.0,
219
- "confidence": 0.99999
220
  }
221
  }
222
  ```
 
25
  ## Architectural Enhancements (`NullspanForExtraction`)
26
 
27
  Built on `distilbert/distilbert-base-uncased` (67M parameters) with 5 parallel System One heads and 10 routed operations:
28
+ 1. **`null_head`**: Calibrated `p_null` probability (`ECE: 0.01409`, `Brier: 0.00666`) for absent field abstention (`value: null` + nearest `guess` decoy + `abstention_reason`).
29
  2. **`span_head`**: Token-level start/end pointer network mapped via `offset_mapping` to exact character spans `[start, end]` with calibrated posterior `confidence` and Shannon `span_entropy_bits`.
30
  3. **`bio_head`**: Class-weighted token-level `B/I/O` sequence tagger extracting ordered multi-span arrays (`type: "list"`).
31
  4. **`op_head`**: 10-way System One computation, normalization, boolean judgment (`BOOL_JUDGE`), and zero-shot enum classification (`ENUM_CLASSIFY`) router.
 
33
 
34
  ## Multi-Axis Empirical Evaluation (`gnumanth/nullspan-dataset`)
35
 
36
+ - **Training time**: `208.3s` (`Apple Silicon MPS`)
37
+ - **Null Abstention Accuracy (`p_null`)**: `99.14%` (`ECE: 0.01409`, `Brier: 0.00666`)
38
+ - **Grounded Span Exact Match (`[start, end]`)**: `98.85%`
39
  - **10-Way Operation Router Accuracy**: `100.0%`
40
  - **Multi-Span List BIO Token Accuracy**: `100.0%`
41
+ - **Quantile Distribution MAE / Pinball Loss**: `0.0008` / `0.0001`
42
  - **Canonical Multi-Task Suite Accuracy**: `100.0%`
43
  - **Adversarial Decoy & Prompt-Injection Stress Accuracy**: `100.0%`
44
  - **Cross-Field Invariant Verification Accuracy**: `100.0%`
 
82
  {
83
  "reporter": {
84
  "type": "text",
85
+ "p_null": 1.455e-05,
86
  "span": [
87
  276,
88
  280
89
  ],
90
  "guess": "Mira",
91
+ "confidence": 0.999944,
92
+ "span_entropy_bits": 0.0007,
93
  "value": "Mira"
94
  },
95
  "incident_id": {
96
  "type": "text",
97
+ "p_null": 1.19e-06,
98
  "span": [
99
  9,
100
  18
101
  ],
102
  "guess": "INC-40928",
103
+ "confidence": 0.999976,
104
+ "span_entropy_bits": 0.0004,
105
  "value": "INC-40928"
106
  },
107
  "opened_on": {
 
118
  },
119
  "total_credit": {
120
  "type": "number",
121
+ "p_null": 6.73e-06,
122
  "span": [
123
  109,
124
  130
125
  ],
126
  "guess": 1550.75,
127
  "confidence": 0.999989,
128
+ "span_entropy_bits": 0.0001,
129
  "value": 1550.75
130
  },
131
  "outage_days": {
132
  "type": "duration",
133
+ "p_null": 3.45e-06,
134
  "unit": "days",
135
  "span": [
136
  29,
137
  41
138
  ],
139
  "guess": 7,
140
+ "confidence": 0.999986,
141
+ "span_entropy_bits": 0.0002,
142
  "value": 7
143
  },
144
  "failure_modes": {
 
157
  100
158
  ]
159
  ],
160
+ "confidence": 0.999761,
161
+ "span_entropy_bits": 0.0034
162
  },
163
  "severity": {
164
  "type": "enum",
165
+ "p_null": 5.33e-06,
166
  "span": [
167
  155,
168
  160
 
173
  "sev-3"
174
  ],
175
  "probs": {
176
+ "sev-1": 0.99999,
177
+ "sev-2": 5e-06,
178
+ "sev-3": 5e-06
179
  },
180
  "guess": "sev-1",
181
+ "confidence": 0.99999,
182
+ "span_entropy_bits": 0.0001,
183
  "value": "sev-1"
184
  },
185
  "data_loss": {
186
  "type": "boolean",
187
+ "p_null": 3.4e-06,
188
+ "p_true": 8e-06,
189
  "span": [
190
  188,
191
  193
192
  ],
193
  "guess": false,
194
+ "confidence": 0.999992,
195
  "span_entropy_bits": 0.0001,
196
  "value": false
197
  },
198
  "cve_id": {
199
  "type": "text",
200
+ "p_null": 0.99949825,
201
  "span": [
202
  123,
203
  130
204
  ],
205
  "guess": "$310.25",
206
  "confidence": 0.05,
207
+ "span_entropy_bits": 0.0011,
208
  "value": null,
209
  "abstention_reason": "unassigned_placeholder"
210
  },
 
212
  "type": "estimate",
213
  "value": 1890,
214
  "median": 1870,
215
+ "p10": 1260,
216
  "p90": 2670,
217
  "p_below": 0.0,
218
  "p_above": 0.0,
219
+ "confidence": 0.999931
220
  }
221
  }
222
  ```
eval_results.json CHANGED
@@ -1,53 +1,53 @@
1
  {
2
  "repo_id": "gnumanth/nullspan",
3
  "device": "Apple Silicon MPS",
4
- "train_seconds": 358.28,
5
- "epochs": 6,
6
- "train_samples": 2090,
7
- "val_samples": 336,
8
  "val_metrics": {
9
- "null_accuracy": 100.0,
10
- "null_ece": 1e-05,
11
- "null_brier_score": 0.0,
12
- "span_exact_match": 99.31,
13
  "op_accuracy": 100.0,
14
  "list_bio_token_accuracy": 100.0,
15
- "quantile_mae_norm": 0.0007,
16
  "quantile_pinball_loss": 0.0001
17
  },
18
  "canonical_eval": {
19
  "canonical_field_accuracy": 100.0,
20
  "adversarial_stress_accuracy": 100.0,
21
  "invariant_verification_accuracy": 100.0,
22
- "mean_doc_latency_ms": 472.43,
23
  "examples": {
24
  "nullspan_incident_postmortem": {
25
- "latency_ms": 86.15,
26
  "num_fields": 10,
27
  "invariants_passed": true,
28
  "answers": {
29
  "reporter": {
30
  "type": "text",
31
- "p_null": 3.8e-07,
32
  "span": [
33
  276,
34
  280
35
  ],
36
  "guess": "Mira",
37
- "confidence": 0.999992,
38
- "span_entropy_bits": 0.0002,
39
  "value": "Mira"
40
  },
41
  "incident_id": {
42
  "type": "text",
43
- "p_null": 3e-08,
44
  "span": [
45
  9,
46
  18
47
  ],
48
  "guess": "INC-40928",
49
- "confidence": 0.999962,
50
- "span_entropy_bits": 0.0006,
51
  "value": "INC-40928"
52
  },
53
  "opened_on": {
@@ -64,27 +64,27 @@
64
  },
65
  "total_credit": {
66
  "type": "number",
67
- "p_null": 4.5e-06,
68
  "span": [
69
  109,
70
  130
71
  ],
72
  "guess": 1550.75,
73
  "confidence": 0.999989,
74
- "span_entropy_bits": 0.0002,
75
  "value": 1550.75
76
  },
77
  "outage_days": {
78
  "type": "duration",
79
- "p_null": 3.04e-06,
80
  "unit": "days",
81
  "span": [
82
  29,
83
  41
84
  ],
85
  "guess": 7,
86
- "confidence": 0.999992,
87
- "span_entropy_bits": 0.0001,
88
  "value": 7
89
  },
90
  "failure_modes": {
@@ -103,12 +103,12 @@
103
  100
104
  ]
105
  ],
106
- "confidence": 0.497096,
107
- "span_entropy_bits": 1.5381
108
  },
109
  "severity": {
110
  "type": "enum",
111
- "p_null": 1.4e-07,
112
  "span": [
113
  155,
114
  160
@@ -119,38 +119,38 @@
119
  "sev-3"
120
  ],
121
  "probs": {
122
- "sev-1": 0.999975,
123
- "sev-2": 1.3e-05,
124
- "sev-3": 1.3e-05
125
  },
126
  "guess": "sev-1",
127
- "confidence": 0.999975,
128
- "span_entropy_bits": 0.0005,
129
  "value": "sev-1"
130
  },
131
  "data_loss": {
132
  "type": "boolean",
133
- "p_null": 1.28e-06,
134
- "p_true": 7e-06,
135
  "span": [
136
  188,
137
  193
138
  ],
139
  "guess": false,
140
- "confidence": 0.999993,
141
  "span_entropy_bits": 0.0001,
142
  "value": false
143
  },
144
  "cve_id": {
145
  "type": "text",
146
- "p_null": 0.9999429,
147
  "span": [
148
  123,
149
  130
150
  ],
151
  "guess": "$310.25",
152
  "confidence": 0.05,
153
- "span_entropy_bits": 0.0009,
154
  "value": null,
155
  "abstention_reason": "unassigned_placeholder"
156
  },
@@ -158,133 +158,133 @@
158
  "type": "estimate",
159
  "value": 1890,
160
  "median": 1870,
161
- "p10": 1270,
162
  "p90": 2670,
163
  "p_below": 0.0,
164
  "p_above": 0.0,
165
- "confidence": 0.99999
166
  }
167
  }
168
  },
169
  "nullspan_gpu_invoice": {
170
- "latency_ms": 924.51,
171
  "num_fields": 9,
172
  "invariants_passed": true,
173
  "answers": {
174
  "provider": {
175
  "type": "text",
176
- "p_null": 1.79e-06,
177
  "span": [
178
  13,
179
  29
180
  ],
181
  "guess": "TensorCore Cloud",
182
- "confidence": 0.99998,
183
- "span_entropy_bits": 0.0003,
184
  "value": "TensorCore Cloud"
185
  },
186
  "invoice_number": {
187
  "type": "number",
188
- "p_null": 2.067e-05,
189
  "span": [
190
  39,
191
  44
192
  ],
193
  "guess": 88310,
194
- "confidence": 0.999978,
195
- "span_entropy_bits": 0.0,
196
  "value": 88310
197
  },
198
  "issued_at": {
199
  "type": "datetime",
200
- "p_null": 2.04e-06,
201
  "span": [
202
  55,
203
  71
204
  ],
205
  "guess": "2026-08-14T18:20:00",
206
- "confidence": 0.999998,
207
  "span_entropy_bits": 0.0,
208
  "value": "2026-08-14T18:20:00"
209
  },
210
  "nodes": {
211
  "type": "number",
212
- "p_null": 9.7e-07,
213
  "span": [
214
  79,
215
  80
216
  ],
217
  "guess": 4,
218
- "confidence": 0.999998,
219
  "span_entropy_bits": 0.0,
220
  "value": 4
221
  },
222
  "hourly_rate": {
223
  "type": "number",
224
- "p_null": 7.08e-06,
225
  "span": [
226
  84,
227
  88
228
  ],
229
  "guess": 3.5,
230
- "confidence": 0.999989,
231
  "span_entropy_bits": 0.0001,
232
  "value": 3.5
233
  },
234
  "subtotal": {
235
  "type": "number",
236
- "p_null": 1.948e-05,
237
  "span": [
238
  105,
239
  110
240
  ],
241
  "guess": 14,
242
- "confidence": 0.999979,
243
- "span_entropy_bits": 0.0,
244
  "value": 14,
245
  "verified": true
246
  },
247
  "egress_fee": {
248
  "type": "number",
249
- "p_null": 1.42e-06,
250
  "span": [
251
  124,
252
  128
253
  ],
254
  "guess": 0,
255
- "confidence": 0.999995,
256
- "span_entropy_bits": 0.0001,
257
  "value": 0
258
  },
259
  "priority_surcharge": {
260
  "type": "number",
261
- "p_null": 6.9e-07,
262
  "span": [
263
  150,
264
  154
265
  ],
266
  "guess": 1.75,
267
- "confidence": 0.999998,
268
  "span_entropy_bits": 0.0,
269
  "value": 1.75
270
  },
271
  "promo_rebate": {
272
  "type": "number",
273
- "p_null": 0.99995482,
274
  "span": [
275
  124,
276
  128
277
  ],
278
  "guess": 0,
279
  "confidence": 0.05,
280
- "span_entropy_bits": 0.0001,
281
  "value": null,
282
  "abstention_reason": "missing_field"
283
  }
284
  }
285
  },
286
  "nullspan_cluster_comps": {
287
- "latency_ms": 513.59,
288
  "num_fields": 1,
289
  "invariants_passed": true,
290
  "answers": {
@@ -292,148 +292,148 @@
292
  "type": "estimate",
293
  "value": 23200,
294
  "median": 23000,
295
- "p10": 20400,
296
  "p90": 26100,
297
  "p_below": 0.0,
298
  "p_above": 0.0,
299
- "confidence": 0.579559
300
  }
301
  }
302
  },
303
  "nullspan_edge_forecast": {
304
- "latency_ms": 365.46,
305
  "num_fields": 1,
306
  "invariants_passed": true,
307
  "answers": {
308
  "requests": {
309
  "type": "forecast",
310
  "value": [
311
- 2416041
312
  ],
313
  "median": [
314
- 2418555
315
  ],
316
  "p10": [
317
- 2263103
318
  ],
319
  "p90": [
320
- 2568073
321
  ],
322
- "confidence": 0.055277
323
  }
324
  }
325
  }
326
  },
327
  "adversarial_examples": {
328
  "adv_prompt_injection_and_decoy_id": {
329
- "latency_ms": 1400.38,
330
  "num_fields": 4,
331
  "invariants_passed": true,
332
  "answers": {
333
  "incident_id": {
334
  "type": "text",
335
- "p_null": 3e-08,
336
  "span": [
337
  9,
338
  18
339
  ],
340
  "guess": "INC-77401",
341
- "confidence": 0.999991,
342
  "span_entropy_bits": 0.0002,
343
  "value": "INC-77401"
344
  },
345
  "cve_id": {
346
  "type": "text",
347
- "p_null": 0.99984634,
348
  "span": [
349
  116,
350
  123
351
  ],
352
  "guess": "$180.00",
353
  "confidence": 0.05,
354
- "span_entropy_bits": 0.003,
355
  "value": null,
356
  "abstention_reason": "unassigned_placeholder"
357
  },
358
  "total_credit": {
359
  "type": "number",
360
- "p_null": 1.567e-05,
361
  "span": [
362
  103,
363
  123
364
  ],
365
  "guess": 1080,
366
- "confidence": 0.999972,
367
- "span_entropy_bits": 0.0003,
368
  "value": 1080
369
  },
370
  "data_loss": {
371
  "type": "boolean",
372
- "p_null": 9.7e-07,
373
- "p_true": 6e-06,
374
  "span": [
375
  181,
376
  186
377
  ],
378
  "guess": false,
379
- "confidence": 0.999994,
380
- "span_entropy_bits": 0.0001,
381
  "value": false
382
  }
383
  }
384
  },
385
  "adv_negated_rebate_and_invariant": {
386
- "latency_ms": 135.73,
387
  "num_fields": 4,
388
  "invariants_passed": true,
389
  "answers": {
390
  "nodes": {
391
  "type": "number",
392
- "p_null": 9.3e-07,
393
  "span": [
394
  77,
395
  78
396
  ],
397
  "guess": 6,
398
- "confidence": 0.999998,
399
  "span_entropy_bits": 0.0,
400
  "value": 6
401
  },
402
  "hourly_rate": {
403
  "type": "number",
404
- "p_null": 1.581e-05,
405
  "span": [
406
  82,
407
  87
408
  ],
409
  "guess": 12.5,
410
- "confidence": 0.999983,
411
  "span_entropy_bits": 0.0001,
412
  "value": 12.5
413
  },
414
  "subtotal": {
415
  "type": "number",
416
- "p_null": 2.108e-05,
417
  "span": [
418
  104,
419
  109
420
  ],
421
  "guess": 75,
422
- "confidence": 0.999977,
423
  "span_entropy_bits": 0.0001,
424
  "value": 75,
425
  "verified": true
426
  },
427
  "promo_rebate": {
428
  "type": "number",
429
- "p_null": 0.9999516,
430
  "span": [
431
  123,
432
  127
433
  ],
434
  "guess": 0,
435
  "confidence": 0.05,
436
- "span_entropy_bits": 0.0003,
437
  "value": null,
438
  "abstention_reason": "missing_field"
439
  }
@@ -444,75 +444,51 @@
444
  "history": [
445
  {
446
  "epoch": 1,
447
- "train_loss": 3.7146,
448
- "null_accuracy": 100.0,
449
- "null_ece": 0.0103,
450
- "null_brier_score": 0.00245,
451
- "span_exact_match": 99.31,
452
  "op_accuracy": 100.0,
453
- "list_bio_token_accuracy": 99.84,
454
- "quantile_mae_norm": 0.0015,
455
- "quantile_pinball_loss": 0.0003
456
  },
457
  {
458
  "epoch": 2,
459
- "train_loss": 0.1044,
460
- "null_accuracy": 100.0,
461
- "null_ece": 2e-05,
462
- "null_brier_score": 0.0,
463
- "span_exact_match": 99.31,
464
  "op_accuracy": 100.0,
465
  "list_bio_token_accuracy": 100.0,
466
- "quantile_mae_norm": 0.0012,
467
  "quantile_pinball_loss": 0.0002
468
  },
469
  {
470
  "epoch": 3,
471
- "train_loss": 0.0433,
472
- "null_accuracy": 100.0,
473
- "null_ece": 1e-05,
474
- "null_brier_score": 0.0,
475
- "span_exact_match": 99.31,
476
  "op_accuracy": 100.0,
477
  "list_bio_token_accuracy": 100.0,
478
  "quantile_mae_norm": 0.0011,
479
- "quantile_pinball_loss": 0.0002
480
  },
481
  {
482
  "epoch": 4,
483
- "train_loss": 0.027,
484
- "null_accuracy": 100.0,
485
- "null_ece": 1e-05,
486
- "null_brier_score": 0.0,
487
- "span_exact_match": 99.31,
488
- "op_accuracy": 100.0,
489
- "list_bio_token_accuracy": 100.0,
490
- "quantile_mae_norm": 0.0008,
491
- "quantile_pinball_loss": 0.0002
492
- },
493
- {
494
- "epoch": 5,
495
- "train_loss": 0.0223,
496
- "null_accuracy": 100.0,
497
- "null_ece": 1e-05,
498
- "null_brier_score": 0.0,
499
- "span_exact_match": 99.31,
500
  "op_accuracy": 100.0,
501
  "list_bio_token_accuracy": 100.0,
502
  "quantile_mae_norm": 0.0008,
503
  "quantile_pinball_loss": 0.0001
504
- },
505
- {
506
- "epoch": 6,
507
- "train_loss": 0.0176,
508
- "null_accuracy": 100.0,
509
- "null_ece": 1e-05,
510
- "null_brier_score": 0.0,
511
- "span_exact_match": 99.31,
512
- "op_accuracy": 100.0,
513
- "list_bio_token_accuracy": 100.0,
514
- "quantile_mae_norm": 0.0007,
515
- "quantile_pinball_loss": 0.0001
516
  }
517
  ]
518
  }
 
1
  {
2
  "repo_id": "gnumanth/nullspan",
3
  "device": "Apple Silicon MPS",
4
+ "train_seconds": 208.29,
5
+ "epochs": 4,
6
+ "train_samples": 2330,
7
+ "val_samples": 348,
8
  "val_metrics": {
9
+ "null_accuracy": 99.14,
10
+ "null_ece": 0.01409,
11
+ "null_brier_score": 0.00666,
12
+ "span_exact_match": 98.85,
13
  "op_accuracy": 100.0,
14
  "list_bio_token_accuracy": 100.0,
15
+ "quantile_mae_norm": 0.0008,
16
  "quantile_pinball_loss": 0.0001
17
  },
18
  "canonical_eval": {
19
  "canonical_field_accuracy": 100.0,
20
  "adversarial_stress_accuracy": 100.0,
21
  "invariant_verification_accuracy": 100.0,
22
+ "mean_doc_latency_ms": 259.24,
23
  "examples": {
24
  "nullspan_incident_postmortem": {
25
+ "latency_ms": 108.95,
26
  "num_fields": 10,
27
  "invariants_passed": true,
28
  "answers": {
29
  "reporter": {
30
  "type": "text",
31
+ "p_null": 1.455e-05,
32
  "span": [
33
  276,
34
  280
35
  ],
36
  "guess": "Mira",
37
+ "confidence": 0.999944,
38
+ "span_entropy_bits": 0.0007,
39
  "value": "Mira"
40
  },
41
  "incident_id": {
42
  "type": "text",
43
+ "p_null": 1.19e-06,
44
  "span": [
45
  9,
46
  18
47
  ],
48
  "guess": "INC-40928",
49
+ "confidence": 0.999976,
50
+ "span_entropy_bits": 0.0004,
51
  "value": "INC-40928"
52
  },
53
  "opened_on": {
 
64
  },
65
  "total_credit": {
66
  "type": "number",
67
+ "p_null": 6.73e-06,
68
  "span": [
69
  109,
70
  130
71
  ],
72
  "guess": 1550.75,
73
  "confidence": 0.999989,
74
+ "span_entropy_bits": 0.0001,
75
  "value": 1550.75
76
  },
77
  "outage_days": {
78
  "type": "duration",
79
+ "p_null": 3.45e-06,
80
  "unit": "days",
81
  "span": [
82
  29,
83
  41
84
  ],
85
  "guess": 7,
86
+ "confidence": 0.999986,
87
+ "span_entropy_bits": 0.0002,
88
  "value": 7
89
  },
90
  "failure_modes": {
 
103
  100
104
  ]
105
  ],
106
+ "confidence": 0.999761,
107
+ "span_entropy_bits": 0.0034
108
  },
109
  "severity": {
110
  "type": "enum",
111
+ "p_null": 5.33e-06,
112
  "span": [
113
  155,
114
  160
 
119
  "sev-3"
120
  ],
121
  "probs": {
122
+ "sev-1": 0.99999,
123
+ "sev-2": 5e-06,
124
+ "sev-3": 5e-06
125
  },
126
  "guess": "sev-1",
127
+ "confidence": 0.99999,
128
+ "span_entropy_bits": 0.0001,
129
  "value": "sev-1"
130
  },
131
  "data_loss": {
132
  "type": "boolean",
133
+ "p_null": 3.4e-06,
134
+ "p_true": 8e-06,
135
  "span": [
136
  188,
137
  193
138
  ],
139
  "guess": false,
140
+ "confidence": 0.999992,
141
  "span_entropy_bits": 0.0001,
142
  "value": false
143
  },
144
  "cve_id": {
145
  "type": "text",
146
+ "p_null": 0.99949825,
147
  "span": [
148
  123,
149
  130
150
  ],
151
  "guess": "$310.25",
152
  "confidence": 0.05,
153
+ "span_entropy_bits": 0.0011,
154
  "value": null,
155
  "abstention_reason": "unassigned_placeholder"
156
  },
 
158
  "type": "estimate",
159
  "value": 1890,
160
  "median": 1870,
161
+ "p10": 1260,
162
  "p90": 2670,
163
  "p_below": 0.0,
164
  "p_above": 0.0,
165
+ "confidence": 0.999931
166
  }
167
  }
168
  },
169
  "nullspan_gpu_invoice": {
170
+ "latency_ms": 192.3,
171
  "num_fields": 9,
172
  "invariants_passed": true,
173
  "answers": {
174
  "provider": {
175
  "type": "text",
176
+ "p_null": 1.003e-05,
177
  "span": [
178
  13,
179
  29
180
  ],
181
  "guess": "TensorCore Cloud",
182
+ "confidence": 0.999874,
183
+ "span_entropy_bits": 0.0019,
184
  "value": "TensorCore Cloud"
185
  },
186
  "invoice_number": {
187
  "type": "number",
188
+ "p_null": 6.792e-05,
189
  "span": [
190
  39,
191
  44
192
  ],
193
  "guess": 88310,
194
+ "confidence": 0.999925,
195
+ "span_entropy_bits": 0.0002,
196
  "value": 88310
197
  },
198
  "issued_at": {
199
  "type": "datetime",
200
+ "p_null": 2.14e-06,
201
  "span": [
202
  55,
203
  71
204
  ],
205
  "guess": "2026-08-14T18:20:00",
206
+ "confidence": 0.999996,
207
  "span_entropy_bits": 0.0,
208
  "value": "2026-08-14T18:20:00"
209
  },
210
  "nodes": {
211
  "type": "number",
212
+ "p_null": 2.6e-06,
213
  "span": [
214
  79,
215
  80
216
  ],
217
  "guess": 4,
218
+ "confidence": 0.999997,
219
  "span_entropy_bits": 0.0,
220
  "value": 4
221
  },
222
  "hourly_rate": {
223
  "type": "number",
224
+ "p_null": 1.619e-05,
225
  "span": [
226
  84,
227
  88
228
  ],
229
  "guess": 3.5,
230
+ "confidence": 0.999981,
231
  "span_entropy_bits": 0.0001,
232
  "value": 3.5
233
  },
234
  "subtotal": {
235
  "type": "number",
236
+ "p_null": 5.004e-05,
237
  "span": [
238
  105,
239
  110
240
  ],
241
  "guess": 14,
242
+ "confidence": 0.999947,
243
+ "span_entropy_bits": 0.0001,
244
  "value": 14,
245
  "verified": true
246
  },
247
  "egress_fee": {
248
  "type": "number",
249
+ "p_null": 3.92e-06,
250
  "span": [
251
  124,
252
  128
253
  ],
254
  "guess": 0,
255
+ "confidence": 0.999981,
256
+ "span_entropy_bits": 0.0003,
257
  "value": 0
258
  },
259
  "priority_surcharge": {
260
  "type": "number",
261
+ "p_null": 2.43e-06,
262
  "span": [
263
  150,
264
  154
265
  ],
266
  "guess": 1.75,
267
+ "confidence": 0.999997,
268
  "span_entropy_bits": 0.0,
269
  "value": 1.75
270
  },
271
  "promo_rebate": {
272
  "type": "number",
273
+ "p_null": 0.99978632,
274
  "span": [
275
  124,
276
  128
277
  ],
278
  "guess": 0,
279
  "confidence": 0.05,
280
+ "span_entropy_bits": 0.0003,
281
  "value": null,
282
  "abstention_reason": "missing_field"
283
  }
284
  }
285
  },
286
  "nullspan_cluster_comps": {
287
+ "latency_ms": 706.33,
288
  "num_fields": 1,
289
  "invariants_passed": true,
290
  "answers": {
 
292
  "type": "estimate",
293
  "value": 23200,
294
  "median": 23000,
295
+ "p10": 20300,
296
  "p90": 26100,
297
  "p_below": 0.0,
298
  "p_above": 0.0,
299
+ "confidence": 0.987942
300
  }
301
  }
302
  },
303
  "nullspan_edge_forecast": {
304
+ "latency_ms": 29.38,
305
  "num_fields": 1,
306
  "invariants_passed": true,
307
  "answers": {
308
  "requests": {
309
  "type": "forecast",
310
  "value": [
311
+ 2417871
312
  ],
313
  "median": [
314
+ 2420386
315
  ],
316
  "p10": [
317
+ 2265913
318
  ],
319
  "p90": [
320
+ 2559063
321
  ],
322
+ "confidence": 0.999989
323
  }
324
  }
325
  }
326
  },
327
  "adversarial_examples": {
328
  "adv_prompt_injection_and_decoy_id": {
329
+ "latency_ms": 111.04,
330
  "num_fields": 4,
331
  "invariants_passed": true,
332
  "answers": {
333
  "incident_id": {
334
  "type": "text",
335
+ "p_null": 1.29e-06,
336
  "span": [
337
  9,
338
  18
339
  ],
340
  "guess": "INC-77401",
341
+ "confidence": 0.999988,
342
  "span_entropy_bits": 0.0002,
343
  "value": "INC-77401"
344
  },
345
  "cve_id": {
346
  "type": "text",
347
+ "p_null": 0.9986155,
348
  "span": [
349
  116,
350
  123
351
  ],
352
  "guess": "$180.00",
353
  "confidence": 0.05,
354
+ "span_entropy_bits": 0.0017,
355
  "value": null,
356
  "abstention_reason": "unassigned_placeholder"
357
  },
358
  "total_credit": {
359
  "type": "number",
360
+ "p_null": 1.739e-05,
361
  "span": [
362
  103,
363
  123
364
  ],
365
  "guess": 1080,
366
+ "confidence": 0.999953,
367
+ "span_entropy_bits": 0.0005,
368
  "value": 1080
369
  },
370
  "data_loss": {
371
  "type": "boolean",
372
+ "p_null": 3.05e-06,
373
+ "p_true": 1.4e-05,
374
  "span": [
375
  181,
376
  186
377
  ],
378
  "guess": false,
379
+ "confidence": 0.999986,
380
+ "span_entropy_bits": 0.0002,
381
  "value": false
382
  }
383
  }
384
  },
385
  "adv_negated_rebate_and_invariant": {
386
+ "latency_ms": 60.62,
387
  "num_fields": 4,
388
  "invariants_passed": true,
389
  "answers": {
390
  "nodes": {
391
  "type": "number",
392
+ "p_null": 2.54e-06,
393
  "span": [
394
  77,
395
  78
396
  ],
397
  "guess": 6,
398
+ "confidence": 0.999997,
399
  "span_entropy_bits": 0.0,
400
  "value": 6
401
  },
402
  "hourly_rate": {
403
  "type": "number",
404
+ "p_null": 3.146e-05,
405
  "span": [
406
  82,
407
  87
408
  ],
409
  "guess": 12.5,
410
+ "confidence": 0.999967,
411
  "span_entropy_bits": 0.0001,
412
  "value": 12.5
413
  },
414
  "subtotal": {
415
  "type": "number",
416
+ "p_null": 5.559e-05,
417
  "span": [
418
  104,
419
  109
420
  ],
421
  "guess": 75,
422
+ "confidence": 0.999941,
423
  "span_entropy_bits": 0.0001,
424
  "value": 75,
425
  "verified": true
426
  },
427
  "promo_rebate": {
428
  "type": "number",
429
+ "p_null": 0.99977404,
430
  "span": [
431
  123,
432
  127
433
  ],
434
  "guess": 0,
435
  "confidence": 0.05,
436
+ "span_entropy_bits": 0.0008,
437
  "value": null,
438
  "abstention_reason": "missing_field"
439
  }
 
444
  "history": [
445
  {
446
  "epoch": 1,
447
+ "train_loss": 2.5958,
448
+ "null_accuracy": 97.13,
449
+ "null_ece": 0.02155,
450
+ "null_brier_score": 0.01361,
451
+ "span_exact_match": 96.84,
452
  "op_accuracy": 100.0,
453
+ "list_bio_token_accuracy": 100.0,
454
+ "quantile_mae_norm": 0.0014,
455
+ "quantile_pinball_loss": 0.0002
456
  },
457
  {
458
  "epoch": 2,
459
+ "train_loss": 0.5978,
460
+ "null_accuracy": 97.41,
461
+ "null_ece": 0.0197,
462
+ "null_brier_score": 0.0113,
463
+ "span_exact_match": 97.13,
464
  "op_accuracy": 100.0,
465
  "list_bio_token_accuracy": 100.0,
466
+ "quantile_mae_norm": 0.0013,
467
  "quantile_pinball_loss": 0.0002
468
  },
469
  {
470
  "epoch": 3,
471
+ "train_loss": 0.3431,
472
+ "null_accuracy": 97.99,
473
+ "null_ece": 0.0191,
474
+ "null_brier_score": 0.01109,
475
+ "span_exact_match": 98.28,
476
  "op_accuracy": 100.0,
477
  "list_bio_token_accuracy": 100.0,
478
  "quantile_mae_norm": 0.0011,
479
+ "quantile_pinball_loss": 0.0001
480
  },
481
  {
482
  "epoch": 4,
483
+ "train_loss": 0.2589,
484
+ "null_accuracy": 99.14,
485
+ "null_ece": 0.01409,
486
+ "null_brier_score": 0.00666,
487
+ "span_exact_match": 98.85,
 
 
 
 
 
 
 
 
 
 
 
 
488
  "op_accuracy": 100.0,
489
  "list_bio_token_accuracy": 100.0,
490
  "quantile_mae_norm": 0.0008,
491
  "quantile_pinball_loss": 0.0001
 
 
 
 
 
 
 
 
 
 
 
 
492
  }
493
  ]
494
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:096fbde74dcff6a07fefea60ed56a4496f3d831d4946e9e1d6e44d1c5dd0c1a1
3
  size 268258852
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b8c5342c51d7f2c7f59b3245743486c159ab5ffe408b72330c32ae423b98e8e
3
  size 268258852
modeling_nullspan.py CHANGED
@@ -66,6 +66,41 @@ def format_field_query(field_name: str, spec: dict[str, Any]) -> str:
66
  return " | ".join(parts)
67
 
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  def extract_numeric_context_features(state: str, spec: dict[str, Any]) -> list[float]:
70
  """Extract 8 normalized numeric summary features from `state` for the quantile head."""
71
  vmin = float(spec.get("min", 1.0))
@@ -315,13 +350,8 @@ class NullspanForExtraction(PreTrainedModel):
315
 
316
  if is_null_labels is not None:
317
  loss_null = F.binary_cross_entropy_with_logits(null_logits, is_null_labels.float())
318
- valid_sp = start_positions != -100
319
- if valid_sp.any():
320
- loss_start = F.cross_entropy(start_logits[valid_sp], start_positions[valid_sp])
321
- loss_end = F.cross_entropy(end_logits[valid_sp], end_positions[valid_sp])
322
- else:
323
- loss_start = null_logits.sum() * 0.0
324
- loss_end = null_logits.sum() * 0.0
325
 
326
  valid_bio = bio_labels != -100
327
  if valid_bio.any():
@@ -361,14 +391,16 @@ class NullspanForExtraction(PreTrainedModel):
361
  state: str,
362
  fields: dict[str, dict[str, Any]],
363
  tokenizer: Any,
364
- max_length: int = 384,
365
  ) -> dict[str, Any]:
366
  """Run a single batched System One forward pass across all requested fields."""
367
  self.eval()
368
  device = next(self.parameters()).device
369
  field_names = list(fields.keys())
370
  queries = [format_field_query(fn, fields[fn]) for fn in field_names]
371
- states = [state for _ in field_names]
 
 
372
  num_feats_list = [extract_numeric_context_features(state, fields[fn]) for fn in field_names]
373
 
374
  enc = tokenizer(
@@ -432,7 +464,8 @@ class NullspanForExtraction(PreTrainedModel):
432
  best_score = sc
433
  best_s, best_e = s_i, e_i
434
 
435
- char_s, char_e = int(offsets[best_s][0]), int(offsets[best_e][1])
 
436
  span_text = state[char_s:char_e].strip(" .,;:\n")
437
  if span_text:
438
  adj_idx = state.find(span_text, char_s)
 
66
  return " | ".join(parts)
67
 
68
 
69
+ _QA_STOPWORDS = {
70
+ "what", "who", "when", "where", "which", "whom", "whose", "why", "how",
71
+ "was", "were", "did", "does", "do", "is", "are", "been", "being", "be",
72
+ "the", "a", "an", "in", "on", "of", "to", "for", "with", "from", "by",
73
+ "at", "into", "unto", "upon", "about", "as", "that", "this", "these",
74
+ "those", "their", "his", "her", "its", "they", "them", "it", "he", "she",
75
+ "had", "has", "have", "would", "could", "should", "can", "may", "might",
76
+ }
77
+
78
+
79
+ def select_context_window(state: str, spec: dict[str, Any]) -> tuple[str, int]:
80
+ """Select a focused 380-char prose window around the highest-overlap sentence when state > 380 chars."""
81
+ if len(state) <= 380 or "\n" in state or spec.get("type", "text") != "text":
82
+ return state, 0
83
+ instr = str(spec.get("instructions", ""))
84
+ q_toks = [t.lower() for t in re.sub(r"[^\w\s-]", " ", instr).split() if len(t) > 1 and t.lower() not in _QA_STOPWORDS]
85
+ if not q_toks:
86
+ return state, 0
87
+ sentences = list(re.finditer(r"[^.!?\n]+[.!?\n]?", state))
88
+ best_m = None
89
+ best_sc = -1.0
90
+ for m_s in sentences:
91
+ s_low = m_s.group(0).lower()
92
+ hits = sum(1.0 for t in q_toks if t in s_low or t.rstrip("s") in s_low)
93
+ if hits > best_sc:
94
+ best_sc = hits
95
+ best_m = m_s
96
+ if best_m is None or best_m.end() <= 340:
97
+ return state, 0
98
+ win_start = max(0, best_m.start() - 40)
99
+ while win_start > 0 and state[win_start - 1] not in (" ", "\n"):
100
+ win_start -= 1
101
+ return state[win_start:], win_start
102
+
103
+
104
  def extract_numeric_context_features(state: str, spec: dict[str, Any]) -> list[float]:
105
  """Extract 8 normalized numeric summary features from `state` for the quantile head."""
106
  vmin = float(spec.get("min", 1.0))
 
350
 
351
  if is_null_labels is not None:
352
  loss_null = F.binary_cross_entropy_with_logits(null_logits, is_null_labels.float())
353
+ loss_start = F.cross_entropy(start_logits, start_positions.clamp(min=0))
354
+ loss_end = F.cross_entropy(end_logits, end_positions.clamp(min=0))
 
 
 
 
 
355
 
356
  valid_bio = bio_labels != -100
357
  if valid_bio.any():
 
391
  state: str,
392
  fields: dict[str, dict[str, Any]],
393
  tokenizer: Any,
394
+ max_length: int = 128,
395
  ) -> dict[str, Any]:
396
  """Run a single batched System One forward pass across all requested fields."""
397
  self.eval()
398
  device = next(self.parameters()).device
399
  field_names = list(fields.keys())
400
  queries = [format_field_query(fn, fields[fn]) for fn in field_names]
401
+ win_pairs = [select_context_window(state, fields[fn]) for fn in field_names]
402
+ states = [wp[0] for wp in win_pairs]
403
+ win_offsets = [wp[1] for wp in win_pairs]
404
  num_feats_list = [extract_numeric_context_features(state, fields[fn]) for fn in field_names]
405
 
406
  enc = tokenizer(
 
464
  best_score = sc
465
  best_s, best_e = s_i, e_i
466
 
467
+ w_off = win_offsets[b_i]
468
+ char_s, char_e = int(offsets[best_s][0]) + w_off, int(offsets[best_e][1]) + w_off
469
  span_text = state[char_s:char_e].strip(" .,;:\n")
470
  if span_text:
471
  adj_idx = state.find(span_text, char_s)
onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:71ee96c7db97c911af0145a171e0615b789fa57f9455b1edce8a927bd0a7fae3
3
+ size 268368196
onnx/model_quantized.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:70315e1726bf2aa631c4be42e5a054d3fdc699b4b22b71c8affdda663be5f2d8
3
+ size 67476041
onnx/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.json CHANGED
@@ -2,7 +2,7 @@
2
  "version": "1.0",
3
  "truncation": {
4
  "direction": "Right",
5
- "max_length": 384,
6
  "strategy": "OnlySecond",
7
  "stride": 0
8
  },
 
2
  "version": "1.0",
3
  "truncation": {
4
  "direction": "Right",
5
+ "max_length": 128,
6
  "strategy": "OnlySecond",
7
  "stride": 0
8
  },