AtomicoLabs
AtomicoLabs
Research · Whitepaper WP-2026-02
AI Research Series
AtomicoPIIFilter 1.0: On-Device PII Detection That Matches a Frontier LLM
A bilingual English–Spanish token-classification encoder that exceeds Grok 4.5 High on exact-span F1, at roughly 70 million parameters, with a hybrid regex layer and an on-device export path.
Publication dateAugust 2026
Eval runAugust 18, 2026
AuthorsAtomicoLabs Research
Contactc@atomicolabs.com

Abstract

Privacy-preserving products cannot send every message to a frontier model. They need a local filter that finds personally identifiable information (PII) before text leaves the device. We report AtomicoPIIFilter 1.0, a DeBERTa-v3-xsmall token classifier trained on a bilingual English–Spanish span corpus. On a held-out English eval of 400 documents, the model reaches exact-span micro-F1 0.897, above Grok 4.5 High at 0.893. On a 300-document Spanish eval, it reaches 0.939 against Grok at 0.895. The English-only encoder that preceded it did not clear the Grok bar (F1 0.865). Bilingual training is what crossed it — without hurting English (the regression gate was frozen F1 − 0.01). The shipping system is a hybrid: neural BIO spans unioned with deterministic detectors for emails, phones, IPs, IBANs, and Luhn-valid card numbers. Generative specialists at 135M and 0.5B plateaued at 0.504 and 0.871 respectively. The encoder is the first model in this ladder that is both smaller than 100M parameters and above the frontier span-labeling bar on our evals. We document architecture, data, gates, per-type results, export limits (ONNX yes; Core ML blocked on DeBERTa relative attention), and the claims we are and are not making.

Contents

1  Introduction
2  Problem and metric
3  System design
4  Data and training
5  Results
6  Deployment
7  What the claim means
8  Methodological notes
9  About AtomicoLabs

1Introduction

Consumer AI products that handle chat, voice transcripts, or documents face a structural tension. Frontier models are the best general reasoners available. They are also the worst place to send raw names, phone numbers, and account identifiers. The practical requirement is a filter that runs before the network: small enough for a phone, accurate enough that the product can trust the redaction, and bilingual enough for the markets we actually ship to.

We treated that as an empirical wall-finding problem, not a prompt-engineering one. The question was: how small can a PII specialist get before exact-span quality falls off the Grok 4.5 High bar we measured on the same eval? Generative LoRA on Qwen2.5-0.5B reached F1 0.871 and stopped improving. SmolLM2-135M peaked at 0.504. A DeBERTa-v3-xsmall encoder, trained as a BIO tagger, reached 0.865 in English — almost the 0.5B generative result at a fraction of the size, but still short of Grok.

AtomicoPIIFilter 1.0 is the bilingual continuation of that encoder. It is the first checkpoint in the ladder that clears the Grok bar on English and beats it by a wide margin on Spanish, while remaining a ~70M on-device classifier rather than a hosted LLM.

2Problem and metric

2.1Task

The model does not generate substitutions. It emits character spans with a closed type vocabulary. A wrapper replaces each span with a typed placeholder ([PERSON_1], [EMAIL_1], …). That split keeps the neural job simple — sequence labeling — and keeps substitution deterministic.

Types: PERSON, EMAIL, PHONE, ADDRESS, DATE_DOB, ID_NUMBER, CREDIT_CARD, ACCOUNT_IBAN, IP, USERNAME_URL, ORG.

2.2Metric

We score exact-span micro-F1. A prediction counts as a true positive only if both the character offsets and the type match gold. Partial overlaps are false positives and false negatives. JSON / schema validity is tracked separately; the encoder always emits well-formed spans (validity = 1.0). This is a harder metric than token-level NER F1 and closer to what a scrubber must get right.

The English bar is Grok 4.5 High labeled on the same 400-example set: F1 0.893 (P 0.899, R 0.888). The Spanish bar is the same protocol on 300 examples: F1 0.895 (P 0.936, R 0.858).

3System design

3.1Encoder

Backbone: microsoft/deberta-v3-xsmall (DeBERTa-v2 token classifier). Twelve layers, hidden size 384, six attention heads, max length 512, 128k SentencePiece vocabulary. Microsoft describes the backbone as ~22M parameters; with the full vocabulary the on-disk checkpoint is about 70M. We train a 23-label BIO head (O plus B-/I- for each of 11 types). Orphan I- tags are treated as span starts at decode time.

3.2Hybrid decode

Structured identifiers should not depend on a neural head. The shipping decode is the union of neural spans and a regex pass:

The neural model remains responsible for names, usernames, addresses, dates of birth, and mixed Spanish morphology that regex cannot see. Credit-card recall on the encoder alone is weak (English F1 0.714 on a tiny gold count). The hybrid exists specifically for that class of failure.

3.3Immutability rule

The English-only wall checkpoint is frozen at deberta-xsmall-en-frozen with F1 0.865. Bilingual training was forbidden from writing into that directory. If bilingual English F1 had fallen more than 0.01 below frozen, we would have shipped the English model as the default. It did not fall. It improved.

4Data and training

4.1Corpora

TABLE I — TRAINING AND EVAL SETS
SplitPathRowsNotes
EN SFT (frozen)pii-sft-en.jsonl13,958Untouched after freeze
ES SFTpii-sft-es.jsonl13,456ai4privacy ES + synthetic + teacher
Bilingual SFTpii-sft-bilingual.jsonl27,414Concatenation; training file
EN evalpii-eval.jsonl400Regression gate
ES evalpii-eval-es.jsonl300100 synthetic + 200 ai4privacy ES

Spanish SFT is PERSON- and USERNAME_URL-heavy by construction: compound surnames (García López), particles (de la Cruz), accented forms (José, Muñoz), diminutives, and social-handle patterns that English-trained models miss. A Grok teacher batch of ~1.4k validated Spanish rows is mixed in as source grok_teacher_es.

4.2Recipe

Three epochs on the bilingual file, CPU/MPS, learning rate 3×10−5, sequence length 512. Output directory: deberta-xsmall-bilingual/ only. Tokenizer sanity check on accented Spanish: zero UNK on sampled names and handles (128k SPM vocab).

5Results

5.1Headline comparison

Exact-span micro-F1 English n=400 · Spanish n=300 · same gold spans 0.5 0.6 0.7 0.8 0.9 1.0 SmolLM2-135M (generative) EN 0.504 Qwen2.5-0.5B (generative) EN 0.871 Encoder EN-frozen EN 0.865 Grok 4.5 High EN 0.893 AtomicoPIIFilter 1.0 EN 0.897 Grok 4.5 High ES 0.895 AtomicoPIIFilter 1.0 ES 0.939
Figure 1. Exact-span micro-F1 on the English (n=400) and Spanish (n=300) evals.
TABLE II — OVERALL EXACT-SPAN MICRO-F1
SystemLangPRF1vs Grok
SmolLM2-135M generativeEN0.504−0.389
Qwen2.5-0.5B generativeEN0.871−0.022
Encoder EN-frozenEN0.865−0.029
Grok 4.5 HighEN0.8990.8880.893bar
AtomicoPIIFilter 1.0EN0.9200.8750.897+0.004
Grok 4.5 HighES0.9360.8580.895bar
AtomicoPIIFilter 1.0ES0.9450.9340.939+0.044
The claim. On these two fixed evals, a ~70M bilingual encoder matches and slightly exceeds Grok 4.5 High on English exact-span F1, and beats it by 4.4 points on Spanish. The English-only encoder of the same family did not.
English F1 vs model class Same 400-example eval · frontier LLM as the quality bar 0.5 0.6 0.7 0.8 0.9 1.0 135M generative ~135M 0.504 0.5B generative ~500M 0.871 EN-frozen encoder ~70M 0.865 AtomicoPIIFilter 1.0 ~70M 0.897 Grok 4.5 High frontier 0.893
Figure 2. English F1 by model class. Crossing the Grok bar did not require a larger generative model; it required a bilingual encoder.

5.2English per-type

English per-type F1 Grok 4.5 High vs AtomicoPIIFilter 1.0 · n=400 Grok AtomicoPIIFilter 0.7 0.8 0.9 1.0 PERSON 0.855 0.845 USERNAME_URL 0.939 0.949 PHONE 0.878 0.891 DATE_DOB 0.965 0.981 ADDRESS 0.805 0.787
Figure 3. Selected English types. PERSON remains the hardest class for both systems.
TABLE III — ATOMICOPIIFILTER 1.0 ENGLISH PER-TYPE (n=400)
TypePRF1TPFPFN
DATE_DOB0.9680.9940.98118061
EMAIL0.9910.9910.99111011
ID_NUMBER0.9550.9860.970423206
USERNAME_URL0.9520.9460.94913978
IP0.9390.9300.9359367
PHONE0.8650.9180.89190148
ORG0.8500.8500.8501733
PERSON0.8790.8150.8452683761
ADDRESS0.8710.7180.78735252138
CREDIT_CARD0.8330.6250.714513
ACCOUNT_IBAN0.8570.6000.706614

Overall English precision is higher than Grok (0.920 vs 0.899); recall is slightly lower (0.875 vs 0.888). Grok still leads on PERSON (0.855 vs 0.845). The encoder’s aggregate win comes from high-volume structured types and USERNAME_URL, plus fewer spurious spans. ADDRESS recall is the largest remaining English leak (FN 138).

5.3Spanish per-type

TABLE IV — ATOMICOPIIFILTER 1.0 SPANISH PER-TYPE (n=300)
TypePRF1Grok F1
ORG1.0001.0001.0000.429*
IP1.0000.9840.9920.984
EMAIL0.9820.9910.9870.991
DATE_DOB0.9890.9790.9840.777
USERNAME_URL0.9840.9630.9730.959
ID_NUMBER0.9720.9720.9720.974
ADDRESS0.9530.9820.9670.835
PHONE0.9310.9490.9400.985
PERSON0.8280.7400.7820.786

*ORG is rare in the Spanish eval (3 gold spans); Grok’s 0.429 is not a meaningful comparison. The Spanish gain is not a PERSON miracle — PERSON is essentially tied with Grok (0.782 vs 0.786). The lift is recall on localized structure: ADDRESS (+0.132 F1) and DATE_DOB (+0.207 F1), plus a much smaller false-negative rate overall (96 vs Grok’s 206). That is why Spanish overall F1 jumps 4.4 points while PERSON does not.

6Deployment

Shipping checkpoint: bilingual. English gate passed (0.897 ≥ 0.865 − 0.01). Spanish target 0.80 exceeded (0.939). Frozen English remains the immutable fallback.

Inference is a single forward pass of a 12-layer 384-wide encoder. There is no sampling, no JSON decode, and no API round-trip. That is the product reason this architecture won the ladder even before it cleared Grok.

7What the claim means

It is a good claim. It is also a bounded one. We state it as follows.

Claim. On AtomicoLabs’ held-out exact-span PII evals (400 English, 300 Spanish), AtomicoPIIFilter 1.0 exceeds Grok 4.5 High in micro-F1, using a bilingual encoder of ~70M parameters plus a deterministic regex union.

Not claimed. That a 70M encoder is a generally stronger PII system than Grok in the open world; that PERSON detection is solved (it is not; Grok still leads slightly on PERSON); that Core ML export of this backbone works; or that the eval is a public leaderboard. The evals are in-house, gold spans are exact, and several types (CREDIT_CARD, ACCOUNT_IBAN, ORG) have low support.

The interesting fact is not that a specialist can beat a generalist on a specialist metric. It is that the 0.5B generative wall sat at 0.871, the English encoder sat at 0.865, and bilingual data — not more parameters — is what crossed 0.893.

8Methodological notes

Next work: ONNX Runtime Mobile wired in the SwiftUI demo, a Core ML–friendly DistilBERT ablation, and PERSON-focused Spanish oversampling without touching the frozen English weights.

9About AtomicoLabs

AtomicoLabs is an AI lab that experiments, builds, and ships AI products — for its own portfolio (Super, AWEsome, Kani, Reactor) and for companies ready to turn AI into deployed software. AtomicoPIIFilter is developed internally so on-device products can redact PII without sending raw text to a hosted model.

Methodology questions: c@atomicolabs.com · atomicolabs.com