edgepiityped character spans
taxonomy 2026.11 GitHub

Improvement research after 0.4.0: 5 November 2026

This research combines primary-source review with **16 completed single-model Modal evaluations and four paired experiments**. The cutoff is 5 November, not the end of November. The results change the earlier brainstorming: compact checkpoints are useful controls, but neither new float model earns a general replacement, and the released int4 artifact does not preserve coverage.

The work adds repository-only research adapters, reproducible experiments, and tests. The published 0.4.0 package and public presets retain their release behavior. No training, calibrated router, streaming service, production promotion, or new package publication occurred in this research.

Follow-up implementation: protection readiness and release 0.5.0 adds output gates and a counterfactual stage audit. It explains all ten observed medical coverage losses at taxonomy projection without redefining the public types.

Evidence and experiment design

  • Six-model artifact manifest: exact revisions, current license declarations, file sizes/LFS hashes, and hashes of inspected cards, configurations, notices, and license files.
  • Recomputed result summary: all report hashes, matched selection digests, paired coverage, and support counts. scripts/audit_compact_research.py checks this evidence and recomputes paired summaries from saved source-free case outcomes.
  • Three public prefixes: 50 legal, 50 medical, and 50 finance records; 254, 311, and 151 in-scope gold spans. CPU and paired studies reuse these inputs. These are exploratory prefixes, not a new sealed deployment test.
  • All new comparisons retain native labels, original source, and union containment. They do not claim public typed F1. No rules or confusable folding are added. The Horizon control therefore differs from the typed multi-encoder system in the previous results.
  • SPY retains government-id-v2, seed 42, and author-associated annotation. Its omitted identifiers and broader native vocabularies mean character masking precision cannot by itself measure unwanted masking or task utility.
  • Float experiments use the pinned Torch/Transformers runtime on a T4. The portable quantized control uses ONNX Runtime 1.23.2 on four Modal CPU threads. Warm p95 measures complete locate calls, including tokenization, windows, decoding, and source-offset handling; loading and downstream task work are excluded.
  • GPU memory is peak Torch allocated memory during evaluation. CPU RSS is process-lifetime peak, including imports and loading. This shared research image imports heavyweight libraries; its RSS is not a lean edge-runtime footprint.

Native categories may include types absent from a public gold policy. A zero high-severity count covers only that sample's gold and supported measurement; it does not establish that a model recognizes every credential or identifier.

Literature that changes the next engineering decisions

Primary sourceFinding relevant to EdgePIIEngineering consequence
Unified Labels, 15 Oct 2026Consistent category definitions and labeled negative traffic are central to its compact detector. Its operating-point analysis distinguishes real false positives from all flags on unlabeled traffic.Audit category meaning and model-specific crosswalks; calibrate on adjudicated negatives. A quiet detector is not automatically precise.
RedactionBench, 17 Jun 2026Separates mandatory/contextual redactions and formatting connectors, with limited agreement on contextual choices.Preserve our exact metric, then add policy-aware diagnostics and explicit connector rules as separate experiments. Ambiguous policy labels need adjudication.
RedacBench, 2 Mar 2026Evaluates removed sensitive propositions and retained useful information. Its limitations discuss evaluator hallucinations and contamination.Add downstream task success and inference-attack tests. LLM review drafts need checks; an attack model failing to recover a value is empirical evidence, not a privacy guarantee.
LeakageBench, 2 Sep 2026Separates page-level exposure, schema support, detection, OCR, and spatial alignment. This is an image benchmark.Add document/session leakage to text evaluation. An OCR adapter would additionally need original-image box coverage; text-span correctness cannot certify pixel redaction.
SAE suppression diagnosis, 3 Nov 2026Of 36 intervention configurations, 17 pass a logprob-only criterion but one passes the authors' combined criteria and matched controls. It studies LLM memorization, not span NER.Retain outcome tests and independent controls. Changes in model confidence or internal activations do not establish removal of source values. SAE steering is outside the current implementation track.

REDACT remains a useful multilingual/disclosure-form expansion. Its released protocol and label schema must stay separate from SPY's author policy and our broad discovery task. Its small obfuscated slice should not become a strong robustness claim.

Artifact review and admission

CandidateVerified artifact factsDecision for this research
Masker Mini35,399,857 parameters, Apache-2.0 declaration; 49 BIOES labels across 12 entity categories. Released float weights and int4 ONNX graph.Run float and int4 as native-label experiments. It has no general SECRET category. Retain NOTICE/attribution requirements when distributing artifacts.
Ettin 32M32,072,171 parameters, MIT metadata; ModernBERT classifier trained on Nemotron, with a different native inventory.Run independent legal/medical/finance controls. Its Nemotron card score cannot establish out-of-domain performance.
Conway MLX and Core MLBoth pinned current cards and primary LICENSE files declare CC-BY-NC-4.0; separate Apache files are also present.Correct the earlier brainstorming based on a cached Apache card. Exclude both from the unrestricted commercial shortlist. Apple runtime performance is unmeasured.
GLiNER Streaming PIIApache-2.0 metadata; native streaming architecture, cached sessions, and recomputation.Conditional conversation experiment; no streaming inference measurement in this study. A buffering/commit policy must precede upstream emission.
Blackbar NanoApache-2.0 metadata; custom span head and split ONNX graphs.Adapter-review control, not a generic token-classification drop-in. Not measured here.

The Masker card's pretrained-student initialization is a useful distillation ablation for future training. Its published quantization agreement is measured on its own validation distribution; our parity experiment below tests a different question on these public prefixes.

Decoder admission matters

Masker emits B/I/E/S/O tags. The adapter explicitly performs argmax BIOES decoding, including closing E/S tokens, recording how orphan I/E tags start spans, and preserving offsets through checked windows. It executes no remote model code. Special tokens, Unicode combining marks, malformed ranges, tag changes, and native labels have independent regression examples.

Ettin and Horizon use the checked Transformers pipeline with native labels. Their labels are not silently coerced into EdgePII's taxonomy. PII-Tracer retains its previously reviewed, hash-verified native Viterbi runtime.

Actual T4 measurements

Each row uses 50 records. Containment requires every character of a gold span to be covered by the native range union. Misses below are high-severity containment failures, not total false negatives.

CorpusNative modelContainmentMissesWarm p95
LegalMasker Mini0.622028.9 ms
LegalEttin 32M0.815658.4 ms
LegalHorizon Small0.972060.4 ms
LegalPII-Tracer0.9920191.3 ms
MedicalMasker Mini0.650023.8 ms
MedicalEttin 32M0.8361554.1 ms
MedicalHorizon Small0.981060.7 ms
MedicalPII-Tracer0.9650192.8 ms
FinanceMasker Mini0.616419.2 ms
FinanceEttin 32M0.662628.6 ms
FinanceHorizon Small0.775436.7 ms
FinancePII-Tracer0.9740101.1 ms

Completion manifests and all four reports per corpus: legal, medical, finance. Modal runs: legal, medical, finance.

Interpretation: Masker is faster but loses substantial full-span coverage under this gold policy. Its segmented address/name inventory also differs from full-address/person gold; character recall and examples must accompany containment. Ettin provides no general quality improvement over the Horizon control here. Native Horizon is a different system from the projected, folded, rules-assisted preset; these results do not erase that system's earlier misses.

CPU and int4 results

Same medical prefix, four CPU threads:

Native modelContainmentMissesWarm p95Process peak RSS
Masker float0.6500152.7 ms5038 MiB
Masker int4 ONNX0.6430165.6 ms4780 MiB
Ettin float0.83914283.9 ms5072 MiB
Horizon float0.9810457.8 ms5508 MiB

Completion manifest, Modal run. These RSS values include the research harness. GPU and CPU Ettin outputs also differ slightly; identical weights do not establish cross-runtime span parity.

The released Masker files are 70,811,538 bytes for stored float weights and 22,344,556 bytes for the int4 ONNX graph. That smaller file was about **8.5% slower** at medical warm p95 here. Torch inference uses fp32 parameters after loading the stored float artifact; file size and live memory are distinct.

Paired CPU studies use the same tokenizer, window policy, and BIOES decoder:

CorpusFloat containedInt4 containedFloat / int4 high-severity missesExact range parity, documentsExact native-span parity, documents
Medical, 311 gold2022000 / 016 / 508 / 50
Finance, 151 gold93914 / 532 / 5029 / 50

Reports: medical, finance. Modal: medical, finance. Exact range parity compares canonical masked interval unions; native-span parity also requires labels and boundaries to agree. These are not token-agreement metrics.

Precision metadata correction

Direct Modal probes of GPU parameters and CPU parameters verified the actual loaded precision under the same Torch 2.8.0 / Transformers 5.22.1 pins: Ettin uses bfloat16; Horizon and Masker use float32, on both devices. The original Ettin reports' native_backend string ending in fp32 was an unverified annotation and is incorrect. Historical reports retain their bytes; their measured containment/latency values are unchanged. The adapter now records the loaded dtype instead of assuming it. The tables' float references mean non-int4 inference, not a uniform precision across model families. An Ettin fp32 ablation has not been run; the observed rows compare the loader behavior of the released candidates and cannot isolate architecture from precision. Probe runs: GPU, CPU.

Decision: retain int4 as an experiment. It adds a finance high-severity miss, so smaller storage does not justify promoting it as an equivalent runtime. See ONNX Runtime's quantization guidance for its emphasis on debugging accuracy changes.

Do complementary errors justify an ensemble?

Paired experiments compute each detector on the same original document and score the actual interval union. They can credit complementary partial ranges that jointly cover a gold span even when neither alone does. Tests include that counterexample. Saved case outcomes contain coverage flags and counts, without source strings, document IDs, or extracted values.

Corpus / combinationSingle-model contained spansUnion containedUnion high-severity missesAdditional masked characters
Medical: Horizon + Masker305 / 2023050647 over Horizon
Medical: Horizon + Tracer305 / 30030701549 over Horizon
Finance: Horizon + Masker117 / 931282602 over Horizon
Finance: Horizon + Tracer117 / 14714701280 over Tracer

Reports: medical, finance. Modal: medical, finance.

Decision: test a domain-aware policy only after independent validation. Horizon + Masker recovers two finance high-severity misses, but adds no medical containment. Adding Horizon to Tracer adds no finance complete-span containment. Extra masked characters can include both omitted PII and unwanted damage; the table does not adjudicate utility. No adaptive router or routed latency was measured. A lack of detected spans cannot by itself justify skipping a verifier.

A taxonomy discrepancy worth investigating first

On identical medical inputs, native Horizon has no high-severity misses while the earlier typed system has ten. The paired support audit records four single-span supports of gold GOV_ID under native MEDICAL_ID, which the current global crosswalk leaves unmapped. Counts describe supporting predictions, not necessarily unique gold entities.

That demonstrates a concrete vocabulary/policy gap, but it does not explain all ten differences. Native versus typed systems also differ in normalization, trimming, filtering, and overlap policy. Do not map every medical identifier to a government ID to improve this sample. A stage-by-stage counterfactual audit and model-specific category definitions should precede a public mapping change. Strict protection already rejects nonzero unmapped diagnostics by default.

Prioritized improvement plan

PriorityResearch-backed workRequired evidence before promotion
P0Gate the actual emitted protection path; audit unknown labels, normalization, trimming, and arbitration separately. Add a private case viewer.Replay fixed failures, preserve original offsets and secret exclusion, distinguish incomplete inference, and trace every coverage change to a stage.
P1Build an adjudicated target-domain development set and sealed test, with audited negatives and uncommon types.Split by conversation/template/translation lineage before tuning; document policy, contamination checks, per-slice counts, and document/session leakage.
P2Compare always-on and domain-selected two-model policies using the demonstrated complementary cases.Fixed risk/utility/latency budgets; random audits for shared misses; measured end-to-end routing performance on a new test.
P3Test conversation state and buffered streaming against repeated, reformatted, corrected, and split identifiers.No previously emitted sensitive prefix; role/turn offsets, tenant/session isolation, bounded cache lifetime, and actual released-text tests.
P4Train a pretrained compact student using reviewed teacher drafts and hard negatives; compare learning curves and seeds.Teacher adds coverage on independent examples; labels satisfy category definitions; sealed replay detects forgetting and rare-type regression.
P5Revisit ONNX/quantization in a lean standalone runtime, then actual target devices.No added high-severity misses under the declared policy, per-type boundary checks, model/runtime hashes, measured p95/RSS, and device-specific results.

P0/P1 are the next implementation priority. P2 has exploratory supporting evidence on finance, not a universal ensemble result. P3–P5 remain conditional experiments; no deployment-domain data or human adjudication was invented. Downstream usefulness and contextual re-identification require separate outcome tests, with empirical attacks distinguished from formal privacy guarantees.

Reproduction and first-principles checks

bash
.venv/bin/python scripts/research_snapshot.py --out /tmp/compact-models-new-snapshot.json
.venv/bin/modal run modal/models.py --corpus spy-medical --limit 50 --gpu T4 \
  --presets masker-mini-native,ettin-native,horizon-native,tracer-native
.venv/bin/modal run modal/models.py --corpus spy-medical --limit 50 --gpu cpu \
  --presets masker-mini-native,masker-int4-native,ettin-native,horizon-native
.venv/bin/modal run modal/models.py --corpus spy-medical --limit 50 --gpu T4 --paired
.venv/bin/modal run modal/models.py --corpus gretel-finance-en --limit 50 --gpu cpu --paired --quantized
.venv/bin/modal run modal/models.py --inspect-only --gpu T4 \
  --presets ettin-native,horizon-native,masker-mini-native --out /tmp/compact-runtime-probe.json
.venv/bin/python scripts/audit_compact_research.py
.venv/bin/modal run modal/validate.py

The artifact collector records a fresh snapshot, so future upstream changes must not silently replace this dated manifest. Experiment constants pin the revisions measured here. Native models remain evaluation-only SDK rejections. The single-model run manifests retain integration gates; those permissive gates do not establish a zero-leak quality pass.

Initial paired launch failures are retained separately. They failed before inference because of unsupported function options or inconsistent remote import/resource construction. The corrected paired worker runs through the established Modal Model class. Those failed starts are not counted among the completed experiments.

Validation record

The final full Modal verification passed 257 tests, with one optional weight-dependent demo test skipped. It built and exercised the installed wheel, audited all completed model reports, recomputed the paired evidence, rebuilt the site, and checked desktop/mobile browsers. JUnit, Modal run. The earlier full run is retained with its own source hashes. The new regression examples cover BIOES boundaries, Unicode/source offsets, invalid token schemas, complementary partial masks, and range-versus-label parity. The final documentation and audit check passed 17 tests with no skips on Modal, after the precision correction and publication evidence were added.