hn.today

Rampart: Browser native on-device PII radaction

ndstudio.gov56 points22 comments
Screenshot of Rampart: Browser native on-device PII radaction

Rampart is an on-device personal information filtering system that runs entirely in the browser and redacts sensitive data before messages leave a user’s device. Built by National Design Studio, it combines a deterministic rules layer - regular expressions and validations for structured items like Social Security numbers, credit cards, phone numbers, routing/account numbers, emails, IPs and government IDs - with a compact MiniLM model to detect names, street addresses and other context-dependent PII. The pipeline replaces detected terms with stable placeholders, lets an LLM operate on the redacted text, and can reinsert originals locally when needed. The shipped model plus tokenizer is 14.7 MB and runs with a median WebGPU latency of 3.9 ms, reflecting the design goal that truly private data is the data that never leaves a device.

Performance testing used AI4Privacy’s OpenPII (1.5M) plus synthetic chat-style augmentations and a 30,000-row held-out multilingual slice; end-to-end private-term recall across seven Latin-script languages is 98.42%. That accuracy exceeds several larger or cloud-based alternatives while requiring far less download and no server trust: OpenAI’s Privacy Filter (~2.8 GB) scored 97.4%, GLiNER small 94.2%, and several cloud guards performed worse. Rampart is an alpha release, supports English, Spanish, French, German, Italian, Portuguese and Dutch, and is available on HuggingFace and via an NPM library for integration.

Read on ndstudio.gov22 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Security

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.