ScienceSoft AI Endpoint Firewall

In-browser demo of the model, with the document-type head V3a

ScienceSoft PII encoder

One multilingual model with two outputs, running in this browser tab: personal-data entities (people, organisations, places, free-form addresses and dates written as words) and the document type of the text. Each result opens with the decision on the document type: the rule classifier's decision, and the types the model adds beside it as suggestions, type by type, and how that decision was made. Below it are the two verdicts it combines: what a device concludes today, with the device's own rule-based document classifier, and the model alone. Devices do not make the combined decision yet, and do not use the model's document-type output yet.

Supportive monitoring only. This page shows what the document-type head V3a, seed 7001, says about a text, so that a person can look at it. Nothing here says that a text should be blocked, redacted or refused because of a score. Four types have been evaluated, on one measure only: Non-disclosure agreement, Technical design, Security document and Personal financial record met a false-record line on held-out benign documents, on one machine. Their recall on documents of the type, their behaviour on other machines and their cost on customer hardware are not evaluated. Eleven types are unvalidated suggestions: Master agreement, Statement of work, Request for proposal, Proposal, Pricing, Source code, Financial report, Billing, Personnel record, Strategy document and Patient record. No recall, no per-language result and no line was evaluated for them, and no accuracy is claimed. What was measured is how often a benign document reached each type's value: the counts, out of 18,075 benign documents, are in the model card (the highest: patient records, 54 of 18,075). Other commercial contract is not yet monitoring-grade: it missed the false-record line (8 of 18,075), so the model adds nothing for it and the rules decide.

Your text stays in this tab. The page downloads the model and its tokenizer from Hugging Face and two libraries from jsDelivr. The text you type or paste is tokenized and scored here, in WebAssembly, and is not sent anywhere. A file you attach is read in this tab as well and is never uploaded: it is converted, and the device's rule classifier reads the text, in doc_convert.wasm, a file of this page. When this page is opened on its own, a service worker of this page (coi-serviceworker.js) adds the headers that let the model run on several threads, and on the first visit the page reloads to start it. Inside another site's frame, as on the page of this Space on Hugging Face, a browser does not allow that: no service worker is used there, and the page runs up to four separate workers instead, one thread and one copy of the model each, which takes about three times the memory.

Scores here are approximate. The model is int8, and onnxruntime-web's WebAssembly kernels round differently from native onnxruntime: on longer windows a type's score can differ by up to about 0.2 from what the same model gives natively (measured on an earlier head; not measured for this one). The tokenization is identical. A score close to a threshold can reach it here and not on a device, or the other way round. Scores also differ with the batch composition and from one machine to another. The thresholds are valid at batch size 1 only, and on the one machine they were read on; this page scores one window per call, as they were read, but a different machine can put a score on the other side of a threshold.

Licence and data. The model is proprietary to ScienceSoft and its weights are published for evaluation and reproduction only: no licence to use them in production or in commercial products, to modify them or to redistribute them is granted; contact ScienceSoft for licensing. The training data is not published.

Model

The model is about 279 MB (int8 ONNX). The model and the tokenizer are downloaded only when you press the button below, Analyse or an example, never on their own, and kept in this browser's cache, so a later visit starts without that download. A later visit does ask Hugging Face for the sha256 of each file at the two commits this page names, in two small requests (a few KB, with none of your text), and checks what it holds against them. A page that names another model asks for your press again and keeps the old copy until the new one is complete.

Text

Examples:

Drop a file here, or . You can drop it anywhere on the page.

Read the way a ScienceSoft AI Endpoint Firewall device reads an upload, by the device's own converter: Word (DOCX, DOC), PowerPoint (PPTX, PPT), Excel (XLSX, XLS), OpenDocument (ODT, ODS, ODP), RTF, PDF, ZIP archives, and text files. The whole file is analysed. Images are not read: a device reads them with OCR, and this demo has none.

0.80 is what a device uses. Entities below it are listed struck through: a device would not act on them. The threshold applies to entities only; each document type has its own threshold.

Text is read in 450-character windows overlapping by 50, as on a device.

Files

A device reads an uploaded document with its own converter and scans the Markdown it produces. It reads DOCX with its comments, footnotes, headers, footers and tracked deletions; PPTX slides, then the speaker notes; XLSX, XLS and ODS as ### Sheet: tables, hidden rows and columns included; ODT and ODP; RTF; DOC; PPT; PDF; ZIP archives, with the documents inside them; and text files as they are: a file the browser labels as text (HTML, JavaScript and shell scripts, for example), or a .txt, .csv or .md file. A source file the browser gives no type, such as .rs, .go or .ts, is not opened by a device at all, so on a device the model never sees it; the demo reads it as text anyway and says so. A device refuses encrypted files, files over 25 MiB, and RAR, 7z, tar and gzip archives.

This demo reads files with that converter: the device's Rust source, compiled to WebAssembly unchanged (doc_convert.wasm), and checked against a native build of the same source on 19 test files, which gave the same result on every one. It differs from a device in one way: there is no OCR here, so images, and the images inside documents, are not read; a device reads them with its OCR engine. The parts of a file that were not read are listed under the text box.

The same file holds the device's rule-based document classifier (rust/content-classifier, compiled unchanged), checked against the device's native tool on 24 made-up texts in seven languages: every verdict was the same, byte for byte. As on a device, an attached file is classified as a document titled by its file name, typed or pasted text as a message without a title, and a typed message under 1,000 characters is not classified. The organisation's own company names are not configured here, so whether an outside party is involved is always unknown.

As on a device, the attached file's name is the document's title, and the document type is decided on at most the first 8 MiB of the text. The rule classifier counts a type when the title, a document heading or one of the first two windows shows it, or enough windows across the text do. The model's scores are read with lead2, the head's rule, on the windows only: both of the first two windows, or enough windows across the text. A file name never decides a type the model decides: with an earlier head, scored alone, ordinary file names reached its source-code threshold on 2.8–17.6% of 15,000 generated names per language, measured natively on an Apple Mac CPU (1.4–8.4% on the Linux host the thresholds were calibrated on). That was not measured for this head, so the page shows the file name's scores for information only. The rule in the device's Rust code moves to it in TASK-2863.