Privacy firewall for LLM interactions attains 94.9% F1 in leakage detection
The proposed multi-agent firewall can detect data leakage in LLM traffic with up to 94.93% F1 score
AI/ML arXiv 9 Jul 2026 Method Prototype evidence
Published as “Multi-Agent Firewall Architecture for Privacy Protection of Sensitive Data in Interactions with Language Models”
Why it matters
Provides organizations and individual users with a deployable, privacy-preserving firewall that can block accidental data leaks to LLMs without sending content to external services.
Summary
The system’s fine-tuned Gemma 3 4B model (T10) reaches a peak F1 of 94.93% (94.95% precision, 94.92% recall) but incurs >5 s mean latency; a faster conditional setup (T2/T3) yields 81.66% F1 with sub-second response time. The evidence comes from the authors’ evaluation of multiple detector configurations.
What they found 2
- Fine-tuned Gemma 3 4B model achieves the highest detection quality.
“T10 employs a version of the Gemma 3 4B model fine-tuned over the training subset of the Nemotron-PII dataset using Unsloth [30]. This configuration achieves the highest performance across all tests, reaching 94.93% F1 with balanced precision (94.95%) and recall (94.92%).”
- Conditional NER-plus-LLM configurations give good accuracy with low latency.
“For environments where latency is the priority, conditional configurations such as T2 and T3 achieve good results at around 85.56% precision, 78.10% recall, and 81.66% F1 with mean response times of less than a second.”
Caveats 5
- The top-performing T10 configuration incurs high latency (mean >5 s), which may limit real-time use: "While the mean latency is higher at more than 5 seconds, the breakdown shows a median of only 0.66 seconds, indicating that high latency is concentrated in outliers."
- Deterministic regex-only detection (T1) is very fast but has poor recall: "T1 achieves 93.40% precision with only 47.33% recall (F1 62.83%) and extremely low latency (mean 38.33 ms)."
- Although local inference is a deliberate design decision to maximize privacy and deployment control, it also introduces a quality ceiling in difficult semantic cases when compared with larger hosted frontier models.
- Browser-side coverage is also constrained by the current implementation scope, which targets Chromium-based extension APIs and a limited set of provider adapters.
- The current API interception scope focuses on HTTP(S) and WSS channels.
What’s new here 4
- Dual-layer traffic interception (browser extension + transparent MiTM proxy) covering both web UI and programmatic API calls.
- Multimodal analysis using OCR and vision-language models to inspect images and screenshots.
- Code-leakage detection via fuzzy matching against private Git repositories.
- Local-first architecture that keeps all detection logic on-premises, avoiding external scanning services.