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
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.
Result
Decision on the document type: rules and model together
The two verdicts below are combined type by type, in the mode the model's doc_labels.json gives each
type. Fifteen of the seventeen types are in add: the rule classifier's decision
stands, whatever the model scores, and when the rules find nothing and the model reaches the type's threshold, the
type is added as a suggestion, recorded only and never acted on with the organisation's full action. Two,
Other commercial contract and Published material, are in rules: the rules decide and the model adds nothing. When the model did not
run and the rules found nothing, a type that only the model could add is undetermined, which is not "no document
type". This is supportive monitoring: a suggestion is for a person to look at.
On a device: the rule classifier
A ScienceSoft AI Endpoint Firewall device decides the document type with a rule-based classifier: titles, document headings, typical phrases, confidentiality markings and structure, in seven languages. This is that classifier, the device's own Rust code compiled to WebAssembly, reading what a device reads: an attached file as a document titled by its file name, or typed text as a message.
The model alone
What the model says on its own. A device does not read the model's document-type output yet (planned in TASK-2863), so the document type below is not part of a device's decision.
Personal data
The model alone. On a device, emails, phone numbers, card and account numbers and other formatted identifiers are also found by pattern rules that do not run here. What a device does with each type — mask it, block the message or let it pass — is set by the organisation's policy.
Every mention (0)
Where they are in the text
Document type: the model alone
Types the model may add
The types in mode add: when the rule classifier finds nothing and the model reaches the type's
threshold, the type is added as a suggestion. Today a device decides every type with the rule classifier, shown
above. Non-disclosure agreement, Technical design, Security document and Personal financial record have been evaluated on one measure only; the others are unvalidated suggestions
(see the note at the top).
Types the model scores and the rule classifier decides
Other commercial contract and Published material: the head's doc_labels.json gives them no threshold, so the model adds nothing for them
and its score is shown for information. Other commercial contract is not yet monitoring-grade.
Score of every window
Each column is one 450-character piece of the text, in order; hover over or press a column's name to see its text. Each cell is the model's confidence (0 to 1) that the piece is that type. An outlined cell reached the type's threshold.
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.