TL;DR
GuardianAgent is a policy-conditioned, risk-adaptive privacy agent designed to protect live web traffic by aligning text anonymization with a destination site's specific privacy policy and context. By introducing a structured risk controller and a verified adversarial loop, it achieves a state-of-the-art privacy-utility trade-off while preventing the over-anonymization typically caused by LLM hallucinations.
What Problem Does This Paper Address?
Modern web applications routinely expose fine-grained personal data through form fields, clipboard actions, and chatbot interactions. Existing text anonymization tools suffer from three major limitations when deployed as live browser mediators:
- Context Blindness: They treat privacy in isolation, applying the same level of sanitization regardless of whether data is sent to a trusted first-party service or a third-party advertising network.
- High Latency: Many recent LLM-based anonymizers invoke a large model for every single browser event, making them too slow for real-time mediation.
- Over-Anonymization via Hallucination: Adversarial anonymizers typically use a simulated "attacker" model to find residual leaks and escalate rewriting. However, these attackers often make highly confident, lucky guesses based on world knowledge rather than actual text leakage (e.g., guessing "coffee shop" from "[PERSON] going to [LOCATION]"), leading to unnecessary semantic distortion of the user's text.
Methods
GuardianAgent addresses these gaps through a multi-stage, dual-system architecture:
- Efficient Policy Matching: To minimize latency, a hybrid retriever pulls relevant policy statements. A fast-path evidential classifier processes the action-policy pair; it routes the request to an LLM "slow path" reasoning model only if its epistemic uncertainty exceeds a set threshold.
- AMRSF Risk Estimator: Instead of relying on an LLM to directly guess a scalar risk value, the system utilizes the Adaptive Multi-factor Risk Scoring Formula (AMRSF). This explicit controller combines policy-violation likelihood with data sensitivity, recipient transmission risk, purpose legitimacy, and policy transparency to output a structured risk score ($R$). This score dictates the final allow/transform/deny decision.
- Risk-Adaptive Hierarchical Anonymizer: If an action requires transformation, its position within the risk "transform band" determines its starting level across a 5-level rewrite hierarchy (ranging from L1 Partial Masking to L5 Semantic LLM Rewriting).
- Verified Adversarial Escalation: An adversarial LLM attempts to reconstruct the redacted information from the anonymized text. Crucially, a local verifier checks if the attacker's guesses are lexically supported by the original text. If a guess cannot be verified against the source text, the system blocks unnecessary escalation, preserving text utility.
Datasets
The authors evaluated GuardianAgent across three distinct text domains and a policy corpus:
- TAB (Text Anonymization Benchmark): Legal prose containing court judgments from the European Court of Human Rights (ECHR).
- SynthPAI: Reddit-style posts annotated with implicit personal attributes.
- PII-Masking-300k: Multi-format synthetic records (XML, JSON, tabular, and free-form) containing explicit PII categories.
- OPP-115: A dataset of website privacy policies used to train and evaluate the policy-matching component.
Key Insights and Ideas
- Operationalizing Contextual Integrity: The paper successfully shifts text anonymization from a static entity-masking task to a dynamic, context-aware control problem. The same input string receives entirely different levels of rewriting based on where it is going and why.
- The "Anti-Hallucination" Verifier: A key insight is that adversarial attackers in text rewriting are often too smart, leveraging LLM priors to guess hidden variables. Grounding the attacker's feedback via a simple lexical verification step prevents the system from over-mangling text based on phantom leaks.
- Uncertainty-Gated Efficiency: By pairing evidential deep learning with an LLM safety net, the system bypasses expensive generative model calls for over 96% of routine traffic, making browser-resident privacy agents computationally viable.
Key Results
- Top-Tier Privacy Across Domains: GuardianAgent was the only evaluated method to achieve $\ge 0.90$ privacy across all three benchmarks (TAB, SynthPAI, and PII-Masking-300k), outperforming robust iterative rewriters like Staab'25 and AgentStealth.
- Optimal Pareto Frontier: It consistently demonstrated the strongest privacy-utility trade-off, sitting above or beyond the baseline frontiers across all datasets.
- Massive Cost Reduction: The dual-path policy matcher achieved a $28.6\times$ reduction in expected computational cost compared to an always-LLM pipeline, maintaining a 95th percentile latency of just 0.25 ms on its fast path.
Limitations and Future Work
- Language and Domain Constraints: The evaluation was restricted to English-language text and primarily public or synthetic corpora. Performance on real-world browser traces, clinical data, and multilingual traffic remains an open question.
- Not a Legal Engine: AMRSF functions as a engineering mediation controller rather than a certified legal compliance tool; it cannot guarantee strict regulatory adherence (e.g., GDPR perfection).
- Residual Risk: While the system significantly mitigates data exposure, text rewriting inherently reduces—but does not entirely eliminate—the risk of sophisticated re-identification attacks.
Summary updated