Abstract
As Large Language Models (LLMs) gain sophistication, they have developed the ability to infer sensitive private information—such as location, occupation, or age—from subtle semantic cues in seemingly "clean" text. Traditional anonymization techniques, which focus on redacting explicit identifiers like names or dates, fail to prevent these "inference attacks." While frontier models like GPT-4 can be prompted to rewrite text for privacy, using proprietary APIs creates a "privacy paradox": users must send sensitive data to a third-party provider to protect it. This paper introduces SEAL (SElf-refining Anonymization with Language model), a framework that distills the anonymization and self-critique capabilities of frontier models into small, locally deployable language models (SLMs). By training 8B-parameter models to act as their own adversaries, SEAL enables them to iteratively refine their output, eventually matching or surpassing GPT-4’s privacy-utility trade-off at a fraction of the cost.
Introduction
The core challenge in modern data privacy is that private information is often baked into the narrative context of a document. For example, a description of a daily commute or specific professional jargon can allow an LLM to accurately guess a user's identity or location even if their name is removed.
To address this, researchers have turned to LLM-based rewriting. However, the high cost, latency, and inherent privacy risks of using centralized APIs make this approach impractical for many applications. The SEAL framework addresses the need for efficient, context-aware anonymizers that can be hosted on local hardware, ensuring that sensitive data never leaves a user's secure infrastructure.
Methodology: The SEAL Framework
SEAL utilizes a three-step distillation process to transfer the reasoning capabilities of a "teacher" model (GPT-4o) into a smaller "student" model (Llama-3 8B).
1. Adversarial Trajectory Generation
The process begins with a game of cat-and-mouse. A teacher model generates an anonymized version of a text, while an adversary model attempts to infer private attributes from that version. This creates a "trajectory" of data that demonstrates how text evolves from being "leaky" (high inference risk) to "secure" (low inference risk).
2. Multi-Task Supervised Fine-Tuning (SFT)
The SLM is trained on three simultaneous tasks to build a holistic understanding of the anonymization process:
- Anonymization: Learning to rewrite the text to obscure private details.
- Adversarial Inference: Learning to predict private attributes from text, effectively training the model to be its own critic.
- Utility Evaluation: Scoring how well the original meaning and readability are preserved.
3. Direct Preference Optimization (DPO)
To further sharpen the model's performance, it undergoes Direct Preference Optimization. The model is presented with pairs of anonymizations and learns to "prefer" the versions that offer the best balance of privacy protection and linguistic utility.
Inference-Time Self-Refinement
Unlike standard models that produce a single output, a SEAL-trained model uses its internal critic to evaluate its own work. At inference time, it iteratively refines the text until the privacy risk is minimized, allowing a small model to achieve the performance of a much larger one through repeated "thinking" steps.
Experimental Evaluation
Datasets
The authors evaluated SEAL using SynthPAI, a collection of synthetic personal profiles. To test the limits of the framework, they introduced Hard Eval, a benchmark where PII is deeply embedded in narratives (e.g., describing a routine that implies a specific job). Notably, 40% of these "hard" examples remain leaky even after six rounds of standard LLM anonymization.
Key Results
- Privacy Performance: On the main dataset, a SEAL-trained Llama-3 8B achieved a privacy score of 0.263 (where lower is better) after three iterations. This significantly outperformed the GPT-4o baseline of 0.434.
- Utility and Readability: Despite aggressive privacy measures, the models maintained high utility. Readability scores remained near-perfect (>0.99), ensuring the text remained useful for its intended purpose.
- Cost and Efficiency: The 8B models are approximately 100x cheaper than using the GPT-4o API. Specifically, running Llama-3 8B costs about 1% of the price of GPT-4o per million tokens.
- Generalization: Although trained on trajectories of only three steps, the models demonstrated the ability to continue improving privacy through five or more steps at test time.
Discussion and Limitations
While SEAL offers a breakthrough in local privacy, it introduces a trade-off in latency. The iterative self-refinement process takes longer than a single-pass anonymization. Additionally, while the model excels at short comments, anonymizing longer, more complex documents may require further scaling of the model's reasoning capabilities.
Conclusion
SEAL demonstrates that small, locally hostable models can be trained to perform complex, adversarial reasoning tasks previously reserved for frontier models. By teaching a model to be its own critic, the SEAL framework provides a scalable and cost-effective solution for protecting user privacy against the next generation of AI-driven inference attacks.
Summary updated