Views
No views yet
openai/privacy-filter
(OPF) specialized for Kazakh / Russian PII detection, with particular focus on
case-inflected and morphologically varied personal names — the failure mode where
the base model and naive fine-tunes leak Kazakh names that appear inline, declined, or as
patronymics.opf CLI / API.Scope: this is a pre-send risk-reduction filter, not a guaranteed anonymizer. See "Limitations" — a small fraction of bare, standalone, inflected names can still pass.
private_person, private_address, private_email,
private_phone, private_url, private_date, account_number, secret.1pip install <the opf package> # https://github.com/openai/privacy-filter (Apache-2.0)
2opf redact "Кеше Айгүлге хабарластық, ал Кузнецову Дмитрию Андреевичу жазылды." \
3 --checkpoint /path/to/this/checkpoint --device cpu1from opf._api import OPF
2opf = OPF(model="/path/to/this/checkpoint", device="cpu", output_mode="typed")
3for s in opf.redact("Айгүлге хабарластық.").detected_spans:
4 print(s.label, s.start, s.end, s.text)| metric | base OPF | 4D (synthetic) | 5 (web) | 6 (inline) | 7 (this model) |
|---|---|---|---|---|---|
| detection.f1 | 0.8565 | 0.8758 | 0.8794 | 0.9390 | 0.9412 |
| detection span recall | 0.6000 | 0.6500 | 0.6167 | 0.8500 | 0.8833 |
| detection span F1 | 0.6667 | 0.7126 | 0.7114 | 0.8206 | 0.8547 |
| detection span precision | 0.7500 | 0.7885 | 0.8404 | 0.7931 | 0.8279 |
private_person recall | 0.4697 | 0.5909 | 0.4242 | 0.8485 | 0.9091 |
private_person precision | 0.8750 | 0.8400 | 0.8750 | 0.8254 | 0.8769 |
private_person F1 | 0.6113 | 0.6938 | 0.5714 | 0.8368 | 0.8927 |
Statistical caveat (read this): the eval set is small — 66 person spans. 95% confidence intervals are wide (e.g. person recall ≈ [0.82, 0.96]) and overlap between adjacent phases. Treat the lineage trend as solid but individual ±1–2-point differences as within noise.OOD-purity caveat: Phase 7's training injector deliberately adds short standalone-name and name-final-boundary patterns that resemble (but never exactly duplicate — exact text collisions are dropped and asserted-zero at build time) the eval distribution. So for those two categories the eval is less purely out-of-distribution than for earlier phases; treat the absolute gains as an upper bound on true generalization.
nitec/kazakh-unsorted (a
privately-collected Kazakh web corpus, collected by QOSI), used with the collector's
permission.Назарбаев Университеті, Ұлттық банк) as persons, and tags bare 12-digit numbers as
account_number even without an IIN/БСН context token.openai/privacy-filter, which is
Apache-2.0 and covers the weights.openai/privacy-filter; the
weights differ. See NOTICE.viterbi_calibration.json is the base model's neutral (all-zero) calibration,
included so this is a complete OPF checkpoint; it matches how the metrics above were
produced.