shinrai-pii-m-v1.3
You use the AI. The AI does not use you.
🆕 Newer: ShinrAI 1.5 runs in the managed API at getshinrai.com; v1.3 is the latest open-weight release.
M-size ShinrAI PII detection model — the detection layer of ShinrAI semantic encryption (ShinrAI, 信頼, is Japanese for trust), and the first 15-locale generation: German, English, French, Spanish, Italian, Polish, Portuguese (BR + PT), Russian, Ukrainian, Turkish, Arabic, Japanese, Korean — plus Hebrew in beta. One stack now covers the semantic entities and the identifier formats: 19 detection heads, 27 entity classes, with a 1024-token window and inventories at Wikidata/OpenStreetMap scale.
This generation retires the old language split: Japanese, previously routed to
shinrai-pii-m-v1.1,
now reads its best result ever here (98.1 register F1).
Architecture: ModernBERT-family mmBERT-base encoder with a multi-head token classifier —
PERSON / CITY / STREET / ORG spans with frequency/size tiers, 15 format heads
(e-mail, phone, IBAN, cards, wallets, national IDs, and more), and span attributes
(origin — now 51 classes, gender expression, name part) for realm-preserving
pseudonymization: detected entities are swapped for natural alternatives matched to
context, culture and language (never [MASK] wreckage, never bias-triggering hard cuts),
so downstream AI keeps reasoning over natural text.
Developed by Innovius with the EECC Research Labs, trained on the JURECA supercomputer at the Jülich Supercomputing Centre (Forschungszentrum Jülich) under the WestAI compute grant, scaling onto JUPITER, Europe's first exascale system.
- 🚀 ShinrAI 1.5 — the current model, in the managed ShinrAI PII detection and pseudonymisation API: getshinrai.com
- 🛡️ Try it live — text, PDF, image & audio, with replace & restore: shinrai-pii-playground
- 📊 Benchmarks vs Azure, Presidio, GLiNER & the open field (losses included): shinrai-pii-benchmarks
- 🧪 Beta programme: https://innovius.ai/shinrai/beta/
- 🏢 Organization: https://huggingface.co/innovius
- ✉️ Production use today (Secure AI Suite / ChtSafe): https://innovius.ai/#contact
License — free for most, fair for us
v1.3 ships under the Innovius Open License v1.0
(the LICENSE file in this repo governs; grantors: Innovius and
EECC Research Labs — see the license's Designations
block). It is inspired by the Apache License 2.0. The short version:
| Who you are | What applies |
|---|---|
| 🏛️ Government — ministries, agencies (Behörden), municipalities, courts, public hospitals | Free. Any use, any scale. |
| 🎓 Education & research — schools, universities, kindergartens, daycare, child clubs, vocational schools, adult-education centers, libraries, research institutes | Free. Any use, any scale. |
| 🔬 Research, evaluation, benchmarking, personal use — anyone | Free. Publishing benchmark results is expressly allowed. |
| 🏢 Company under $10M annual revenue | Free, with attribution: show "Built with ShinrAI" in your product or docs. |
| 🏦 Company at $10M+ annual revenue | Commercial license required → licensing@innovius.ai (90-day cure period when you first cross the line). |
Find yourself — concrete examples: 🇩🇪 Bundesministerium für Bildung und Forschung (BMBF) protecting Bürgeranfragen ✅ free · Deutsche Bahn ❌, Deutsche Telekom ❌ (state-owned, but commercial) · 🇺🇸 City of Austin's FOIA desk ✅ free · Amtrak ❌ · 🇯🇵 文部科学省 (MEXT) protecting citizen inquiries ✅ free · NTT ❌ · 🎓 a kindergarten's parent app ✅ · 🏢 a 12-person helpdesk startup ✅ with "Built with ShinrAI" · 🏦 a $50M-revenue vendor fine-tuning this into its DLP product → the fine-tune is allowed and may stay private, but a commercial license is required.
Also part of the deal:
- 🔧 Fine-tuning is 100 % allowed and may stay private — no obligation to
publish your model. The license travels with every derivative (name it
shinrai-…); a fine-tune never removes the terms. - 🚫 Don't use the model or its outputs to train a competing PII model.
- 📄 Your outputs are yours — we claim no rights over your redacted text.
- 🗓️ This model becomes Apache 2.0 on 1 September 2028 — every ShinrAI release opens up at most 24 months after its own release (all conversion dates).
This table is a summary only; the LICENSE file governs.
v1.1 and v1.2 are and remain Apache 2.0.
What it does
Given text in any of the covered languages, the model emits entity spans with rich
attributes: entity class, a frequency/size tier (how common a name is, how large a city
is), cultural origin, gender expression and name-part structure. This enables
realm-preserving replacement: Robert → Paul — a substitute matching the original's
cultural register, frequency tier and gender expression, with no visible trace that
anything was replaced and minimal bias distortion for the consuming model.
| head group | heads | tiers / classes |
|---|---|---|
| Semantic (IOB2 × 3 tiers) | PERSON · CITY · STREET · ORG | frequency / population / recognizability / reach tiers |
| Contact & online | EMAIL · USERNAME · URL · PHONE | format classes (one tier + format_style) |
| Financial | ACCOUNT (IBAN) · CARD · WALLET | format classes |
| Identity & documents | NATIONAL_ID · DOB · PLATE | format classes |
| Infrastructure & keys | NETADDR · SECRET | format classes |
| Re-identification keys | POSTAL_CODE · CUSTOMER_ID | format classes |
| Trade secrets | CODENAME | project codenames / unreleased products |
Plus three span-pooled attribute heads computed in the same forward pass: origin
(51 classes, independent of text language — "Mailand" in German text is a CITY with origin
IT), gender expression (masc / fem / neutral / unknown; replacement never flips
masc↔fem) and name part (given / family / full). The full machine-readable schema
ships in labels-v3.1.yaml.
Model-side recall differs by head and register on purpose: textbook renders of checksummed identifiers (a clean IBAN, a plain e-mail) are the validator layer's job in the shipped stack — exact, microsecond, in front of the model — while the model's format heads specialize in the person-linked and context-dependent identifiers rules cannot decide (customer / patient / case numbers, AD-style logins, project codenames). Serve this model behind the ShinrAI serving layer to get both nets.
Where it sits — validators first, and a second net behind them

Exact identifiers deserve exact tools: checksum validators and format rules decide an IBAN or a card number in microseconds, with zero doubt. Our software layer ships those validators in front of the model — that architecture has not changed.
What v1.3 adds is the second net. Real documents carry identifiers that rules cannot
decide: obfuscated ("mail me at jane dot doe at acme dot com"), malformed, split across
line breaks and OCR damage, or ambiguous without context. The 15 format heads catch those
in context — and they supply format_style so the replacement engine can emit a
culturally consistent substitute (a DE-IBAN stays a DE-IBAN). Validator hits always win;
the model owns what rules cannot decide — now on both sides of that boundary.
Results
All numbers below are measured on this exact checkpoint under a sealed evaluation (predictions saved once, mechanical gate runner, gates file frozen before evaluation). Every corpus is named — register matters: the same model reads differently on register suites, encyclopedic text, chat prompts and long records, and we report each separately.
15-locale register suites (strict span F1, threshold 0.0, whole-text decode)
Surface-disjoint synthetic register suites (business / medical / administrative documents), 200 texts per locale, Wikidata/OSM-scale inventories:

| locale | P | R | F1 | locale | P | R | F1 | |
|---|---|---|---|---|---|---|---|---|
| en | 97.2 | 98.1 | 97.7 | pt-br | 97.7 | 96.9 | 97.3 | |
| ja | 98.3 | 97.8 | 98.1 | pt-pt | 95.3 | 93.1 | 94.2 | |
| es | 97.2 | 96.6 | 96.9 | pl | 91.4 | 90.3 | 90.9 | |
| ru | 96.2 | 96.7 | 96.4 | tr | 90.7 | 89.5 | 90.1 | |
| fr | 96.3 | 95.8 | 96.0 | ar | 90.3 | 85.6 | 87.9 | |
| ko | 95.9 | 95.2 | 95.5 | uk | 89.2 | 84.3 | 86.7 | |
| it | 96.3 | 93.8 | 95.0 | he (beta) | 68.8 | 52.3 | 59.5 | |
| de | 95.3 | 93.5 | 94.4 | median (15) | 95.0 |
The median includes the Hebrew beta track — we do not hide beta locales inside
aggregates. Long inputs hold without a cliff: at 4× document length the register reads
en 96.6 / de 93.8 under the serving default (segment: auto), 97.7 / 94.5 whole-window.
Third-party corpora (strict span F1, our shipped decode point)
| corpus | cells | mean | per-cell |
|---|---|---|---|
| ai4privacy pii-masking (4 langs) | de / en / fr / it | 75.2 | 76.4 / 69.4 / 75.8 / 79.0 |
| MultiNERD (8 langs, diagnostic¹) | de / en / es / fr / it / pl / pt / ru | 85.4 | 87.3 / 90.4 / 93.7 / 89.6 / 95.4 / 66.9 / 93.3 / 66.9 |
¹ MultiNERD LOC gold includes countries, which ShinrAI has no head for by design — the CITY-recall cell is structurally capped there; we report it anyway.
Weak cells, named (they are v1.4 levers, not footnotes): ai4privacy STREET recall 31.3 and ORG precision 37.8 (boundary-convention and register mismatches under strict scoring); MultiNERD CITY recall 38.7 (the country-class cap above).
Encyclopedia domain (tri-judge proxy gold²)
On encyclopedic text, this generation reads macro strict F1 84.1 over the seven two-labeler languages (its predecessor: 24.2). Correction of 14 October 2026: in Portuguese this text is not held out — at least 202 of the 270 pt-br and pt-pt gold texts (and 1 Italian text) are also in this generation's training data; without them a re-read gives 83.1 (83.8 with them), so the value above reads about 83.4. ² The gold set is tri-judge-unanimous LLM annotation over a bounded candidate space — a rigorous proxy, not human annotation, and we label it as such wherever it appears.
Attribute heads (steering replacement)

origin 94.9 · gender expression 95.8 · name part 99.6 · tier 79.1 — tier is this generation's weakest head and a named v1.4 work item.
Adversarial chat prompts (27-prompt privacy-gateway suite)
Sentence-decode serving path: overlap F1 84.9 / strict 82.2 — above Presidio (75.6) and GLiNER2-PII (74.3) on the same suite, 3.9 points behind Azure AI Language PII (88.8). Competitor numbers are their best point from a threshold sweep; ShinrAI runs its single shipped point.
Long-record redaction (REDACT-PII benchmark, 1,000 records, 25 languages)
Partial F1 36.5 (4-head view) / 31.8 (14-head view) under the serving default. Azure reads 51.2 here — the largest competitive gap we measure, and the top v1.4 lever. We publish it because you should pick tools on measured numbers, ours included.
Known limitations
- Hebrew is beta (59.5 register F1): shipped for pipeline compatibility and feedback, excluded from GA gates, always shown in aggregates.
- Encyclopedia-domain trade: the corrective training that lifted the seven two-labeler languages regresses encyclopedic-register recall on the eight single-labeler languages (register suites hold within −1 everywhere; the product surface is unaffected). Balancing both is the headline v1.4 item.
- Long-record redaction trails Azure (36.5 vs 51.2, above) — a dedicated long-record assist corpus is queued.
- Chat register depends on the serving segmenter: whole-window decode reads 40.8 on
the prompt suite; the serving default (
segment: auto→ sentence decode on conversational input) reads 84.9. Serve this model behind the shipped serving layer. - Tier attribute accuracy is 79.1 — span detection is unaffected; tier-band recalibration against the v1.3 inventories is queued.
How it compares
Measured on the 27-prompt adversarial suite (identical gold, overlap F1, competitors at their sweep-best threshold, 2026-08):

| system | overlap F1 | strict F1 |
|---|---|---|
| Azure AI Language PII (preview) | 88.8 | 87.4 |
| shinrai-pii-m-v1.3 (this model, served) | 84.9 | 82.2 |
| Azure AI Language PII (GA) | 81.1 | 80.7 |
| Presidio 2.2 (full recognizer set) | 75.6 | 66.1 |
| GLiNER2-PII (fastino, 205M) | 74.3 | 70.4 |
| GLiNER-PII (urchade) | 70.9 | 32.4 |
| OpenMed privacy-filter | 67.1 | 3.5 |
| OpenMed-PII-E5 (560M) | 66.2 | 58.1 |
| OpenAI privacy-filter | 55.0 | 0.8 |
| Piiranha-v1 | 27.2 | 0.0 |
Read it fairly, in both directions: Azure stays ahead on this suite and on long-record redaction (see limitations) — on the 15-locale register suites above, the relation inverts (Azure reads 53–76 against our 86.7–98.1 GA locales, measured on the same texts with the same scorer). No single number decides a PII stack. The full cross-version, cross-competitor benchmark board is live at shinrai-pii-benchmarks, with every raw run file in the shinrai-pii-bench-results dataset — losses rendered exactly like wins.
Against v1.2
(shinrai-pii-m-v1.2):
supersedes it everywhere — 15 locales (was 6), 19 heads (was 4), format detection in the
model, Japanese back at flagship quality, encyclopedic-register recall lifted, and the
serving layer's long-input segmenter. v1.2 remains available as the archived western-six
generation.
Bias behavior — engineered for model-bias stability
This model family is trained to avoid machine biases — the documented, systematic
biases of LLMs — not to correct human bias in text. Large models measurably treat text
differently depending on name origin, gender association, name rarity, city size or
organization prestige. Naive anonymization changes those signals: [MASK] tokens,
<PII> tags and randomly chosen substitute names all shift how the consuming model
scores, ranks and reasons over a document — which makes results unstable and the
pseudonymization itself detectable.
The replacement policy is therefore bias-stable by construction:
- An entity is never swapped for one that triggers more or fewer known model biases than the original. Replacements match the original's cultural origin, gender expression, frequency tier and register — same treatment by the downstream model, different identity.
- No debiasing. If the original text would trigger a model bias, the replacement triggers the same one. Silently "improving" the text would change model behavior and break the round-trip guarantee.
- The tier and attribute heads exist precisely for this: they are the steering signal that keeps the statistical texture of text constant under replacement — never a profiling signal (see Privacy below).
Serving
The serving precision is fp32 ONNX (1.23 GB, opset 17; export parity vs PyTorch:
max logit delta 5.7e-05 across all 22 output heads — quant/parity-onnx.json),
torch-free via onnxruntime alone — measured 2026-09-02 at 56 ms per paragraph single-request on an Apple M4 Pro, 350–514 ms on
4-vCPU x86 server VMs, 442 ms on a 4-vCPU Arm VM and 25 ms on a 2016 Tesla P40 (model path through the serve API; the default
long-input decode costs ~3× on a paragraph). Details, more platforms and estimates below.
Hardware map (measured 2026-09-02, single request, fp32 ONNX on ONNX Runtime 1.28 / 1.26-gpu):
| Platform | short message (62 tokens) | paragraph (317 tokens) | one 1024-token window | 10k-token document |
|---|---|---|---|---|
| Apple M4 Pro, 10 threads (Mac mini 2024) | 13 ms | 56 ms | 233 ms | 3.1 s |
| x86 server VM, 4 vCPU (AMD EPYC 7002, full cores) | 83 ms | 350 ms | 1.2 s | 15.5 s |
| x86 server VM, 8 vCPU (AMD EPYC 7002) | 59 ms | 237 ms | 845 ms | 8.5 s |
| Cloud VM, 4 vCPU x86, shared tenancy (AMD EPYC 9V74, GitHub-hosted runner) | 105 ms | 514 ms | 1.9 s | ≈21.0 s |
| Cloud VM, 4 vCPU Arm (Neoverse N2, GitHub-hosted runner) | 92 ms | 442 ms | 1.7 s | ≈18.0 s |
| Apple M1, 3 virtual cores (GitHub-hosted macOS runner) | 97 ms | 509 ms | 2.0 s | ≈14.1 s |
Tesla P40 (2016 Pascal) through shinrai-pii-serve, segment: none | 9 ms | 25 ms | 93 ms† | 1.6 s |
Tesla P40, serve default segment: auto (whole text + sentence pieces above 1200 characters) | 9 ms | 69 ms | – | 4.9 s |
| Raspberry Pi 5 (8 GB) — estimate, ±40 % | ≈193 ms | ≈982 ms | ≈3.3 s | ≈40.4 s |
| L40S / A100 class — estimate, same ONNX Runtime stack | ≈6 ms | ≈7 ms | ≈10 ms | ≈62 ms |
† in-pod session run, batch 1. Throughput on the P40 saturates near 15k tokens/s at batch 8.
Memory: one fp32 session holds ≈2.1 GB resident after load (ONNX Runtime keeps the graph and the initializers; the 256k-vocabulary tokenizer adds ~200 MB) and peaks at ≈3.3 GB on a 10k-token document — plan 4 GB per session, 8 GB comfortable. Saving the same graph in ONNX external-data format (weights in a sidecar file) drops the resident set to ≈0.9 GB at identical speed — the practical path for 4 GB devices. The weights on disk are 1.15 GiB (fp32); Q8 (294 MiB) and Q4 (245 MiB) follow in a point release once they clear the quality gates.
Rule of thumb: the model costs ≈240 MFLOP per token (259 GFLOP per full window). Texts longer than 1024 tokens are cut into overlapping windows (stride 128) and every window of a text is padded to the longest, so a 1100-token letter costs two full windows. A GPU with the current ONNX Runtime CUDA path has a per-call floor of ≈5 ms; batch requests to use it.
Full map with thread scaling, the FLOPs model and estimates for Jetson, DGX Spark, T4/L4/A100/H100:
research/hardware-map/HARDWARE-MAP.md in the training repo, and the "Hardware map" section of the
benchmark board (https://huggingface.co/spaces/innovius/shinrai-pii-benchmarks). Measure your own
machine with scripts/hardware/bench-local.py from https://github.com/Innovius-ai/shinrai-engine.
Usage
The repo is a self-contained HF-layout release:
model.safetensors # full-precision weights (custom multi-head architecture)
config.json # encoder configuration (ModernBERT / mmBERT-base)
tokenizer/ # HF tokenizer (256k vocab)
labels-v3.1.yaml # machine-readable label schema (19 heads, tiers, attributes)
calibration.json # per-head confidence temperatures
quant/ # fp32 ONNX + MANIFEST.json + parity report
assets/ # model card figures
The heads are a custom multi-head architecture, so plain
AutoModelForTokenClassification does not expose them — use the ONNX graph (named
inputs/outputs, works with onnxruntime alone), or the ShinrAI inference SDK
(sliding-window batching, IOB2 decoding, span merging, calibration, the segment: auto
long-input path):
import onnxruntime as ort
from transformers import AutoTokenizer
repo = "innovius/shinrai-pii-m-v1.3" # local: path to a clone
tok = AutoTokenizer.from_pretrained(repo, subfolder="tokenizer")
sess = ort.InferenceSession("quant/model-fp32.onnx")
enc = tok("Meine Kundennummer lautet KD-2024-88371 und meine IBAN DE89370400440532013000.",
return_tensors="np")
out = sess.run(None, {"input_ids": enc.input_ids, "attention_mask": enc.attention_mask})
# 22 named outputs:
# logits_person / logits_city / logits_street / logits_org [batch, seq, 7]
# logits_email / _username / _url / _phone / _account / _wallet /
# _card / _national_id / _plate / _dob / _netaddr / _postal_code /
# _customer_id / _secret / _codename [batch, seq, 3]
# attr_logits_origin [.., 51] · attr_logits_gender_expression [.., 4] · attr_logits_name_part [.., 3]
# label inventories for decoding: labels-v3.1.yaml
Decoded output (via the shipped torch-free predictor, verified against this exact
checkpoint) for
"Meine Kundennummer lautet KD-2024-88371 und meine IBAN DE89370400440532013000.":
{"span": [26, 39], "text": "KD-2024-88371", "type": "CUSTOMER_ID", "tier": "std", "confidence": 0.94}
for "Login: ACME\jsmith — API key sk-live-9f8e7d6c5b4a mit Projekt Bluebird.":
{"span": [7, 18], "text": "ACME\\jsmith", "type": "USERNAME", "tier": "std", "confidence": 0.89}
and for "Le dossier de Mme Claire Dubois, 8 avenue Victor Hugo, Lyon, est complet.":
{"span": [18, 31], "text": "Claire Dubois", "type": "PERSON", "tier": "common", "confidence": 0.964,
"attrs": {"origin": "FR", "gender_expression": "fem", "name_part": "full"}}
{"span": [33, 53], "text": "8 avenue Victor Hugo", "type": "STREET", "tier": "generic", "confidence": 0.763,
"attrs": {"origin": "FR"}}
{"span": [55, 59], "text": "Lyon", "type": "CITY", "tier": "medium", "confidence": 0.848,
"attrs": {"origin": "FR"}}
Note what the bare model did and did not flag in the first example: the customer number — an identifier no validator grammar can decide — carries the span, while the textbook IBAN is deliberately the validator layer's catch in the shipped stack (see "Where it sits"). A person-linked ID nobody else's PII tagger detects, and a checksummed ID nothing should waste a neural net on: that split is the design.
Inference is sliding-window (window 1024, stride 128, overlap merge) — documents of any
length work. Confidences are temperature-calibrated per head from calibration.json.
Conversational input decodes best through the serving layer's segment: auto path (see
Known limitations).
Use ShinrAI in production today
☁️ As a developer or company — the ShinrAI API. ShinrAI 1.5, the current model, runs in the managed ShinrAI PII detection and pseudonymisation API, hosted on STACKIT in the EU. Start at getshinrai.com — see the ShinrAI plans and pricing and the API documentation.
🖥️ On your own machine — ShinrAI Connector. Our desktop client runs ShinrAI models locally on your own GPU — or CPU-only — and funnels your AI traffic through semantic encryption before it leaves your machine. Works with Claude Desktop and Cursor today, the ChatGPT Desktop app soon. Get it at chtsafe.com/apps.

The Connector pairs the model with its validator layer — checksummed identifiers (banking, cards, wallets, IDs) are decided by rules first, and this model's format heads catch what rules cannot decide, exactly as described above.
🔒 As a private person — ChtSafe. Chat fully anonymously with any leading AI model, protected in realtime by the latest ShinrAI models. Sign up at chtsafe.com or get the app from the App Store.
🏢 As a company — the Secure AI Suite. Semantic encryption plus onion routing across as many model-access paths as you like, deployed on-premise first — your hardware, your keys — or in your private cloud. You get the complete software and code for review; we support the rollout on your infrastructure, or deliver custom GPU servers with 5-year support. Register your company at chtsafe.com or write to info@innovius.ai.
Training data
The training corpus is synthetic and openly sourced: generated, cross-checked and quality-gated by openly released models — for this generation the Mistral, Gemma (Google DeepMind), NVIDIA Nemotron and Qwen families, joined by regional open models for the new language tracks (Falcon-H1, MamayLM, Swallow, Midm, AMALIA) — and anchored in open data: GeoNames (CC-BY), Wikidata (CC0), OpenStreetMap (ODbL), US SSA/Census name statistics (public domain) and national open-data sources across all covered countries. v1.3 adds a silver-labeled corpus of openly licensed encyclopedic text (Wikipedia / Wikivoyage), labeled by our own stack and admitted only on multi-judge unanimity, with full per-record provenance. No customer data, no scraped personal records, and no commercial PII-API output anywhere in the pipeline.
Every record carries a license-provenance field; released datasets contain only the license-clean subset (CC0 / CC-BY / public-domain / our own generated text). First public dataset: shinrai-pii-bench-results (raw benchmark run files, no third-party text); further data releases: https://huggingface.co/innovius (as they land).
Privacy & responsible use
The model detects and helps pseudonymize personal data; it does not memorize real individuals — training text is synthetic or openly published encyclopedic material. Detection is probabilistic: for regulated deployments, treat it as one layer of a defense-in-depth privacy architecture, not a sole control (and keep checksum validators in front, per above). Attribute predictions (origin, gender expression) exist to preserve the statistical texture of text under replacement — never use them to profile real people.
Credits
EECC Research Labs · Forschungszentrum Jülich (JSC, JURECA & JUPITER) · WestAI · mmBERT (JHU CLSP, MIT) · the ModernBERT lineage · Mistral · Gemma · NVIDIA Nemotron · Qwen · TII Falcon · INSAIT MamayLM · Swallow · KT Midm · AMALIA · GeoNames · Wikidata · OpenStreetMap · Wikipedia & Wikivoyage contributors · the statistics offices and open-data portals of the countries we cover.
Citation
@software{shinrai_pii_2026,
author = {Innovius AI and EECC Research Labs},
title = {ShinrAI PII Models: tier- and bias-aware PII detection for realm-preserving pseudonymization},
year = {2026},
version = {1.3},
url = {https://huggingface.co/innovius}
}