NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Privacy Policy Enforcement Guardrails for Data-Sensitive Retrieval-Augmented Generation

Osama Zafar, Alexander Nemecek, Yiqian Zhang, Wenbiao Li, Debargha Ganguly, Vikash Singh, Vipin Chaudhary, Erman AydayarXiv 2026

TL;DR

Standard PII filters fail to catch "contextual leakage," where a combination of individually harmless attributes (like age, occupation, and location) can uniquely identify an individual in a RAG system's output. This paper introduces a Privacy Policy Enforcement (PPE) framework using dual one-class density estimators (T3+OCSVM) to detect these hidden privacy risks at millisecond latency. By exposing a critical "case-style confound"—where models mistake professional tone for data leaks—the authors demonstrate how training with borderline-safe data achieves a robust AUROC of $\ge$ 0.93 across medical, financial, and legal domains.

What Problem Does This Paper Address?

Retrieval-Augmented Generation (RAG) has become the gold standard for deploying Large Language Models (LLMs) in data-sensitive fields like medicine, finance, and law. Traditional privacy defenses (Layer 1) focus on direct identifiers—redacting Social Security numbers, names, or email addresses using regular expressions and Named Entity Recognition (NER).

However, these filters are completely blind to contextual leakage (Layer 2). Consider the description: "a 52-year-old female litigator from Omaha with two children and a recent custody filing." No single token violates privacy laws, yet the specific conjunction of these quasi-identifiers (QIs) can uniquely re-identify a real person.

Existing distribution-based guardrails assume that unsafe content looks anomalous. But in professional RAG systems, a leaky answer sounds exactly like a normal, professional case note or legal brief. The core challenge is distinguishing between safe professional text and text whose specific composition of attributes leaks private identities.

Fig. 1. Layered privacy enforcement for RAG. Layer-1 catches direct identifiers via regex/NER; Layer-2 (this work) detects contextual QI-cluster leakage and routes outputs to safe-pass, flag, or abstain via the discriminator δ and an explicit both-OOD abstain region (Section VIII-C).

Methods

The authors propose a Privacy Policy Enforcement (PPE) framework built around a dual one-class density estimator:

  1. Embedding Stack: The system fuses three distinct text encoders—Qwen3-Embedding-0.6B, BGE-M3, and E5-large-v2—into a single 3,072-dimensional feature vector. This allows the model to simultaneously capture surface phrasing, semantic content, and register.
  2. Dual One-Class SVM (T3+OCSVM): Instead of using a standard binary classifier (which can overfit to stylistic shortcuts), the framework trains two one-class Support Vector Machines in parallel. One maps the safe distribution (augmented with borderline-safe data), and the other maps the unsafe distribution.
  3. Calibrated Abstain Region: If an input text is out-of-distribution (OOD) for both safe and unsafe densities, the system triggers an "abstain" action, routing the query to human review rather than making an unreliable guess.
The Layer-2 detector architecture utilizing frozen encoders and dual OCSVMs.

Datasets

Because real-world RAG breach data is rare and highly sensitive, the authors developed an axis-stratified, multi-LLM synthetic data generation pipeline to create training and evaluation data:

  • Seed Corpora: Public datasets across three domains were used as the safe baseline, including MedQuAD (Medical), FinQA (Finance), and MMLU-Law (Law).
  • Synthetic Generation: Using three distinct LLMs (Qwen2.5-7B, Mistral-7B, and Phi-3-medium), they generated unsafe Q&A pairs by combinatorially sampling from an 8-class QI taxonomy (Age, Location, Occupation, etc.).
  • Borderline-Safe Stress Test: Crucially, they generated a counterfactual negative dataset—text that perfectly mirrors the professional "case voice" but is entirely stripped of identifying QI clusters. A fourth model lineage (Yi-1.5-9B) was entirely held out to evaluate cross-generator robustness.
Fig. 2. Axis-stratified multi-LLM data generation pipeline, instantiated per domain with the QI taxonomy of Table II and a domain-specific validator. Yi- 1.5-9B is held out for cross-generator evaluation (Section VI-C); borderline-safe records are produced by a separate prompt template on the same generators (Section IV-E).

Key Insights and Ideas

  • The Case-Style Confound: Traditional anomaly detection baselines (like Gaussian Mixture Models) achieved near-perfect within-distribution AUROC ($\ge$ 0.94) but completely collapsed (to 0.72–0.79) when evaluated against the borderline-safe stress test. The detectors weren't learning privacy violations; they were simply latching onto the professional tone of the text.
  • Why OCSVM Beats GMM: GMMs partition feature space into Gaussian basins where log-likelihoods drop exponentially away from cluster means, causing them to misclassify borderline-safe text as unsafe. OCSVM defines a support boundary with linear distance scores, making it much more robust to stylistic overlap.
  • The Failure of Alternative Architectures: Supervised MLP classifiers suffer from a bimodal score distribution, forcing them to abstain on 69–85% of borderline cases to maintain accuracy. Meanwhile, LLM-as-a-judge baselines (like Qwen-14B) cannot be calibrated to specific operational thresholds and introduce massive latency and cost penalties ($10^4\times$ more expensive).

Key Results

  • Robust Stress-Test Recovery: The proposed T3+OCSVM configuration, augmented with 4,000 borderline-safe records during training, recovered the borderline AUROC to $\ge$ 0.93 across all three domains.
  • Drastic Error Reduction: The model lowered the borderline false positive rate at a 95% true positive rate ($\text{FPR}_{95}$) by 44 to 55 percentage points.
  • Operational Feasibility: It successfully stabilized the review queue, keeping abstention rates below 11% for medical text and $\le$ 3.7% for finance and law.
  • Efficiency: The entire pipeline operates at single-digit millisecond latency, making it viable for inline production guardrails.

Limitations and Future Work

  • Domain and Language Scope: The evaluation was restricted to English-language text. Performance on other clinical modalities (like radiology reports or structured EHRs) or non-US regulatory frameworks (like GDPR) remains unmeasured.
  • Quantitative Overlap in Finance: The finance domain retained a higher residual borderline false positive rate (36%). This is because cohort-level quantitative data (e.g., tax brackets, investment limits) looks stylistically identical to single-client leaks in embedding space, requiring future domain-specific pre-filtering.
  • Unmodeled Leakage Types: The framework does not yet address verbatim-source leakage (direct quotes from the source text) or multi-turn leakage (where QIs are leaked incrementally across a conversation).

Summary updated

Abstract

Standard PII filters often miss contextual data leakage in RAG systems, such as non-regulated attribute clusters that collectively identify individuals. We introduce a Privacy Policy Enforcement (PPE) framework using dual one-class density estimators with fused text embeddings and a calibrated abstain region for out-of-distribution inputs. Using an axis-stratified, multi-LLM synthetic data pipeline across medicine, finance, and law, we found that traditional Gaussian Mixture baselines fail on borderline-safe stress tests by focusing on linguistic register rather than content. Our proposed T3+OCSVM detector, trained on safe and borderline-safe data, achieves a borderline AUROC of 0.93+ while reducing false positives by 44-55 percentage points and maintaining millisecond latency. Compared to supervised MLP classifiers or 14B-parameter LLM judges, our framework offers superior operational suitability, as the former suffers from high abstention rates and the latter from latency and calibration issues. This methodology provides a robust stress-testing standard for any synthetic-data-trained classifier.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
borderline-safe stress test (borderline pairing)T3+OCSVM-v4AUROC0.97Classification · split: test · abstention=enabled; τ=0 · population=kept · safe-side-configuration=borderline-safe-augmented
Source quote
L547: 0.97 / 0.96 / 0.93
borderline-safe stress test (borderline pairing)T3+OCSVM-v4AUROC0.96Classification · split: test · abstention=enabled; τ=0 · population=kept · safe-side-configuration=borderline-safe-augmented
Source quote
L547: 0.97 / 0.96 / 0.93
borderline-safe stress test (borderline pairing)T3+OCSVM-v4AUROC0.93Classification · split: test · abstention=enabled; τ=0 · population=kept · safe-side-configuration=borderline-safe-augmented
Source quote
L547: 0.97 / 0.96 / 0.93
BibTeX
@misc{zafar2026privacy,
  author = {Osama Zafar and Alexander Nemecek and Yiqian Zhang and Wenbiao Li and Debargha Ganguly and Vikash Singh and Vipin Chaudhary and Erman Ayday},
  title = {{Privacy Policy Enforcement Guardrails for Data-Sensitive Retrieval-Augmented Generation}},
  year = {2026},
  eprint = {2605.17034},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.17034},
}
Figure