# ProseGuard (AIDetect): Three-Tier Client-to-Server Multilingual AI Text Detection from 679 KiB WebAssembly to Multi-Head mmBERT Verifiers

- **Report Number**: RIST-CS-AI-2026-03
- **Publication Status**: Open-Access Institutional Technical Report / Preprint (RIST-CS Series; non-proceedings)
- **Institution**: Ryan Institute of Science and Technology (RIST)
- **Author**: Ryan Kung (ORCID: https://orcid.org/0009-0000-3026-1111)
- **Published / Updated**: 2026-12-04 / 2026-12-05
- **Web Full-Text Reader**: https://rist.edu.rs/papers/aidetect/
- **Embedded PDF Reader**: https://rist.edu.rs/papers/aidetect/#pdf
- **Direct PDF**: https://rist.edu.rs/papers/aidetect.pdf (667 KB, 16 pages, SHA-256: `3571a33e3ec65e1ec29c0b3c09af756afaea4968d028e88a41e3a81a5fbebc49`)
- **Reproducible Code & Artifacts**: https://huggingface.co/ElderRyan/proseguard
- **LaTeX Source**: https://rist.edu.rs/papers/aidetect/aidetect.tex
- **Keywords**: ProseGuard, AIDetect, mmBERT AI text detection, knowledge distillation, ONNX Q4 INT8, aidetect.rist.edu.rs, client-side AI text detection, WebAssembly AI detector, zero-LLM AI text detection, Dual-PPM cross-entropy, Distributional Mixture MLE, DivEye surprisal Hurst exponent, Feature-Hashed NBSVM, exact TreeSHAP WebAssembly, RIST-CS-AI-2026-03, Ryan Kung, Ryan Institute of Science and Technology, rist.edu.rs

## Abstract

High-accuracy detectors for machine-generated text typically rely on multi-gigabyte neural language models (such as DetectGPT, Fast-DetectGPT, and Binoculars) or proprietary cloud APIs (such as ZeroGPT, GPTZero, and Originality.ai) that require uploading raw manuscripts to remote servers. Both choices create practical barriers for confidential drafts, peer review, and browser-local inspection. Conversely, lightweight non-neural heuristics based on raw compression ratios or uncalibrated sentence variance collapse under domain shift and frontier post-training. We present ProseGuard (building on our AIDetect WebAssembly core), an open-weight, MIT-licensed multilingual detection suite spanning three progressive deployment tiers inside a single unified repository (https://huggingface.co/ElderRyan/proseguard): Tier 1 (ProseGuard-ML), a dependency-free 679KiB (389KiB gzipped) Rust and WebAssembly engine executing in 1.1 to 27.0ms per document; Tier 2 (ProseGuard-mmBERT-small), a distilled multi-head neural verifier exported both as a 51.8MB (45.1MiB gzipped) 4-bit browser WebGPU/Wasm package and a 136MB INT8 edge/server model; and Tier 3 (ProseGuard-mmBERT-base), a 22-layer, 8,192-token server verifier (295.9MB INT8). Tier 1 maps input text onto a 28-dimensional orthogonal statistical basis (Dual-PPM, concave Mixture MLE α, DivEye surprisal dynamics with R/S Hurst exponent, word co-occurrence topology, script-isolated NBSVM, and cadence forensics) paired with out-of-fold LightGBM, Isotonic-Platt calibration, and stack-allocated exact TreeSHAP. Tiers 2 and 3 extend Johns Hopkins CLSP's pretrained mmBERT encoder with tri-pooled 3-way document classification (Human, AI-Assisted, AI-Native), continuous edit-intensity regression, a branch-free 64-token sliding-window span detector trained via online SpanMix, and an asymmetric squared low-FPR hinge penalty over 495,571 commercially clean passages. On a 12,914-document held-out test set, Tier 1 reaches 0.9700 ROC-AUC (73.64\% TPR at 1\% FPR, 0.0071 ECE) in single-digit milliseconds. On TextSight's 2026 modern-human benchmark (OOD-2026 Modern, 338 human vs. 56 AI passages), the shipped 136MB INT8 ProseGuard-mmBERT-small reaches 0.9977 ROC-AUC and 94.6\% TPR@1%FPR (bootstrap 95% CI 85.7–100\%), compared with 50.0\% for Oxidane/TMR and 25.0\% for e5-small-lora on the same passages. The sample is small and CIs are wide, commercial APIs were not evaluated on this split, and on English adversarial paraphrase (RAID+MAGE) our tiers reach only 50.7\%–53.9\% TPR@1%FPR, below published RAID leaderboard results for GPTZero and Desklib.

## Section Outline

## 1 Introduction
## 2 Architecture and Packed Level-1 Statistical Tables
### 2.1 Cross-Script Tokenization and Namespace Isolation
### 2.2 Packed \(320\,\text{KiB}\) Binary Table Layout (ml_tables.bin)
### 2.3 Zero-Table Structural, Fractal, and Network Features
## 3 Out-of-Fold Boosting, Soft Labels, and Exact TreeSHAP
### 3.1 Two-Stage Out-of-Fold Protocol and Continuous Soft Targets
### 3.2 Causal Topic Deconfounding Under Domain Adaptation
### 3.3 Stack-Allocated Exact Path-Dependent TreeSHAP
## 4 Multi-Head Neural Verifiers and Browser Q4 Distillation
### 4.1 Tri-Pooled Multi-Head mmBERT Architecture
### 4.2 Online SpanMix, Asymmetric Low-FPR Hinge, and Distillation
### 4.3 \(65{,}536\)-Vocab Compaction and \(51.8\,\text{MB}\) Browser Q4 Export
## 5 Experimental Evaluation
### 5.1 Datasets and Evaluation Splits
### 5.2 Baseline Comparison and Orthogonal Feature Ablations
### 5.3 Multilingual Breakdown and OOD-2026 Fairness Analysis
### 5.4 Topic Deconfounding, Soft-Label Co-Authorship, and Wasm Latency
### 5.5 Three-Tier Progression and External Detector Comparison
## 6 Limitations and Conclusion
## References

## Key Questions & Empirical Summary (FAQ)

### What are the three ProseGuard deployment tiers?

ProseGuard-ML is a 679 KiB Rust/Wasm statistical screener with exact TreeSHAP. ProseGuard-mmBERT-small is a distilled neural verifier available as a 51.8 MB Q4 browser model or a 136 MB INT8 model. ProseGuard-mmBERT-base is a 295.9 MB INT8 verifier. The neural models provide Human, AI-Assisted, and AI-Native probabilities, edit-intensity estimates, and token-span scores. Code and weights are released at huggingface.co/ElderRyan/proseguard under the MIT license.

### What does the ProseGuard Rev. 2 evaluation establish?

On OOD-2026 Modern (338 human and 56 AI passages), small INT8 reaches 94.6% TPR at 1% FPR (95% bootstrap CI: 85.7–100%), base INT8 reaches 96.4% (46.4–100%), and browser Q4 reaches 76.8% (62.5–91.1%). At score 0.5, ESL false-positive rates on 183 published biomedical papers are 13.7%, 4.4%, and 0.5%, respectively. The set was reused during development, samples are small, and commercial APIs were not evaluated on this split.

## Citation (BibTeX)

```bibtex
@techreport{kung2026aidetect,
  author      = {Ryan Kung},
  title       = {ProseGuard (AIDetect): Three-Tier Client-to-Server Multilingual AI Text Detection from 679 KiB WebAssembly to Multi-Head mmBERT Verifiers},
  institution = {Ryan Institute of Science and Technology (RIST)},
  year        = {2026},
  number      = {RIST-CS-AI-2026-03},
  note        = {Open-access institutional technical report, 16 pages},
  url         = {https://rist.edu.rs/papers/aidetect/}
}
```
