v15: bias 0.0000 on every origin, engine filtered F1 0.8563->0.9348 (frozen file), register LOCATION 0.57->0.93, MUST 21/21
Browse files- README.md +58 -49
- onnx/model_quantized.onnx +1 -1
README.md
CHANGED
|
@@ -16,9 +16,8 @@ plus four Arabic registers and Arabizi.
|
|
| 16 |
It is the NER half of a data-loss-prevention agent that inspects outbound
|
| 17 |
AI-assistant traffic on a device and redacts personal data before it leaves.
|
| 18 |
|
| 19 |
-
`xlm-roberta-base`, fine-tuned on a fully synthetic corpus
|
| 20 |
-
|
| 21 |
-
quantized. **278 MB**, CPU inference.
|
| 22 |
|
| 23 |
## Labels
|
| 24 |
|
|
@@ -28,60 +27,65 @@ quantized. **278 MB**, CPU inference.
|
|
| 28 |
have a shape and usually a checksum, so a regex decides them exactly and a
|
| 29 |
classifier only produces a second, weaker opinion that then competes with the
|
| 30 |
layer that was right. This model is built to leave them alone — and measurably
|
| 31 |
-
does (see
|
| 32 |
|
| 33 |
## Verified results
|
| 34 |
|
| 35 |
-
Gate run 2026-09-03
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
| 38 |
|
| 39 |
-
| | this
|
| 40 |
|---|---|---|
|
| 41 |
-
| **regex-owned identifiers wrongly touched** (
|
| 42 |
-
| **known-defect suite** | **21/21** |
|
| 43 |
-
| hivetrace ru PII — F1 / P / R | 0.
|
| 44 |
-
| Wojood ar NER — F1 / P / R | 0.
|
| 45 |
-
|
|
| 46 |
-
|
|
| 47 |
-
|
|
| 48 |
-
|
|
| 49 |
-
|
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
0.
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
(
|
| 66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
|
| 68 |
## Read this before using it
|
| 69 |
|
| 70 |
-
**
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
0.5888 → 0.8036 — the biggest jump this model line has made on real text in one
|
| 75 |
-
step.
|
| 76 |
-
|
| 77 |
-
**Organisation boundaries are still imperfect.** Wojood F1 is barely moved
|
| 78 |
-
(0.4888 → 0.4945) and organisation spans remain the weakest category on real
|
| 79 |
-
Arabic text — expect it to sometimes find that an organisation is present
|
| 80 |
-
without choosing the exact right span.
|
| 81 |
|
| 82 |
**Trained only on synthetic data.** Entity pools are finite, so scores on
|
| 83 |
generated text overstate real-world ability. Judge it on the external
|
| 84 |
-
benchmarks above (
|
|
|
|
| 85 |
|
| 86 |
**Arabizi is a reconstruction.** No corpus contains it; its conventions
|
| 87 |
(3=ain, 7=haa, 2=hamza) are our model of how people type, not observed data.
|
|
@@ -124,9 +128,14 @@ deliberately ignores.
|
|
| 124 |
|
| 125 |
## Training data
|
| 126 |
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
|
| 131 |
## Licence
|
| 132 |
|
|
|
|
| 16 |
It is the NER half of a data-loss-prevention agent that inspects outbound
|
| 17 |
AI-assistant traffic on a device and redacts personal data before it leaves.
|
| 18 |
|
| 19 |
+
`xlm-roberta-base`, fine-tuned on a fully synthetic corpus, exported to ONNX and
|
| 20 |
+
int8 quantized. **278 MB**, CPU inference.
|
|
|
|
| 21 |
|
| 22 |
## Labels
|
| 23 |
|
|
|
|
| 27 |
have a shape and usually a checksum, so a regex decides them exactly and a
|
| 28 |
classifier only produces a second, weaker opinion that then competes with the
|
| 29 |
layer that was right. This model is built to leave them alone — and measurably
|
| 30 |
+
does (see the touch rate below).
|
| 31 |
|
| 32 |
## Verified results
|
| 33 |
|
| 34 |
+
Build **v15**. Gate run 2026-09-03, scored through the production Rust inference
|
| 35 |
+
engine, not a Python decode of the same ONNX. Corpus 147,753 training rows
|
| 36 |
+
(128,584 generated + 19,169 augmented) and 5,300 held-out rows, 2 epochs. Every
|
| 37 |
+
figure below was measured, none estimated; the gate was re-run on the stored
|
| 38 |
+
results before this upload and every check passed.
|
| 39 |
|
| 40 |
+
| | **v15 (this build)** | previous build on this repo (v13) |
|
| 41 |
|---|---|---|
|
| 42 |
+
| **regex-owned identifiers wrongly touched** (hivetrace ru) | **0.0%** (0/770) | 0.0% (0/770) |
|
| 43 |
+
| **known-defect suite** | **21/21** (int8 and fp32) | 21/21 |
|
| 44 |
+
| hivetrace ru PII (synthetic, expert-annotated) — F1 / P / R | **0.8656 / 0.8000 / 0.9429** | 0.8036 / 0.6888 / 0.9643 |
|
| 45 |
+
| Wojood ar NER — F1 / P / R | **0.5870 / 0.6537 / 0.5327** | 0.4945 / 0.6143 / 0.4137 |
|
| 46 |
+
| IAHLT ar — F1 | **0.5444** | 0.4697 |
|
| 47 |
+
| TAB en incl. quasi-identifiers — F1 | 0.7009 | 0.7428 |
|
| 48 |
+
| production-engine filtered F1, frozen eval file `cf21c01b1759` (n = 3,300) | **0.9348** | 0.8563 |
|
| 49 |
+
| … PERSON only / production-masked (PERSON + ADDRESS) | **0.9772 / 0.9864** | 0.8094 / — |
|
| 50 |
+
| production-engine filtered F1, register eval `c72af982d47c` (n = 3,300) | **0.8786** | 0.7884 |
|
| 51 |
+
| … LOCATION / ADDRESS | **0.927 / 0.942** | 0.568 / 0.793 |
|
| 52 |
+
| int8 vs fp32 F1 cost (95% CI) | +0.0086 [+0.0058, +0.0112] | +0.0020 |
|
| 53 |
+
| latency p95 @ 512 tok (CPU) | 191.7 ms (measured under load avg 10–14; an upper bound) | 190.8 ms |
|
| 54 |
+
| name-origin bias delta | **0.0000** — every origin scores 1.000 | 0.0469 |
|
| 55 |
+
|
| 56 |
+
The two "frozen eval" rows are the only cross-build deltas in this table that
|
| 57 |
+
compare like with like: the same 3,300 rows, the same scorer, both builds. The
|
| 58 |
+
register file stresses LOCATION and ADDRESS in syntactic roles the original file
|
| 59 |
+
under-represents; v15 lifted LOCATION there from 0.568 to 0.927.
|
| 60 |
+
|
| 61 |
+
**What changed in v15.** Name-origin bias closed to zero (v14's frame work had
|
| 62 |
+
left it at 0.0469) by drawing names from the Mimesis pools for every origin
|
| 63 |
+
(anglo, arabic, slavic, south_asian, east_asian, african, hispanic). Address
|
| 64 |
+
abbreviations (Apt/Ste/Whg, а/я, ص.ب, postcodes, PO boxes) and LOCATION in
|
| 65 |
+
syntactic roles are now covered. TAB en moved slightly against this build
|
| 66 |
+
(0.7428 → 0.7009); it is reported, not gated.
|
| 67 |
+
|
| 68 |
+
Head-to-head vs `onnx-community/multilang-pii-ner-ONNX` (PERSON only, WikiANN
|
| 69 |
+
test[:500]): es +0.65 · it +0.62 · fr +0.63 · en +0.61 · ar +0.59 · de +0.56 ·
|
| 70 |
+
ru +0.12, with the 95% CI lower bound above the −0.02 floor in every language.
|
| 71 |
+
Disclosure: in that comparison ours is scored as fp32 torch and the incumbent as
|
| 72 |
+
int8 ONNX; the +0.0086 quantization cost above does not change the conclusion.
|
| 73 |
+
|
| 74 |
+
Nothing from this repo has shipped to devices yet: the repo is private and the
|
| 75 |
+
agent's model catalog does not point at it. "Previous build" means the previous
|
| 76 |
+
commit here, not a fleet.
|
| 77 |
|
| 78 |
## Read this before using it
|
| 79 |
|
| 80 |
+
**Arabic is the weakest language, and the gap is recall.** Arabic F1 sits at
|
| 81 |
+
0.54–0.59 on the external benchmarks against 0.87 for Russian and 0.70 for
|
| 82 |
+
English, concentrated in LOCATION (Wojood LOCATION recall 0.334). Do not read
|
| 83 |
+
the aggregate numbers as uniform accuracy across languages.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
**Trained only on synthetic data.** Entity pools are finite, so scores on
|
| 86 |
generated text overstate real-world ability. Judge it on the external
|
| 87 |
+
benchmarks above (Wojood, IAHLT, TAB), not the synthetic figures — and note that
|
| 88 |
+
hivetrace is itself a synthetic benchmark, expert-annotated but not real text.
|
| 89 |
|
| 90 |
**Arabizi is a reconstruction.** No corpus contains it; its conventions
|
| 91 |
(3=ain, 7=haa, 2=hamza) are our model of how people type, not observed data.
|
|
|
|
| 128 |
|
| 129 |
## Training data
|
| 130 |
|
| 131 |
+
Fully synthetic, no real person's data. A meaningful share of rows contain no
|
| 132 |
+
entity at all; those entity-free negatives are what keeps the touch rate at
|
| 133 |
+
zero. The published corpus `ScienceSoft/scnsoft-pii-synthetic-corpus` is the
|
| 134 |
+
v13 build's corpus; v15 trained on a later generator (address shapes, LOCATION
|
| 135 |
+
roles, Arabic address vocabulary, Mimesis name pools) whose export has not been
|
| 136 |
+
published yet.
|
| 137 |
+
|
| 138 |
+
Environment: transformers 4.57.1, tokenizers 0.22.1, torch 2.9.0a0, faker 37.12.0.
|
| 139 |
|
| 140 |
## Licence
|
| 141 |
|
onnx/model_quantized.onnx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 278234412
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:af1250c3c3dd69151528d28efeb1222088af4ad8b5dd3513cc4a2451b350d99c
|
| 3 |
size 278234412
|