Stop Tracking Me! Proactive Defense Against Attribute Inference Attack in LLMs

Dong Yan, Jian Liang, Ran He, Tieniu Tan

TL;DR

Researchers have developed TRACE-RPS, a proactive defense framework that prevents Large Language Models (LLMs) from snooping on your private life. By combining fine-grained text anonymization with a novel optimization technique that triggers model "refusal" behaviors, they reduced the accuracy of private attribute inference from over 50% to less than 5% on open-source models.

What Problem Does This Paper Address?

LLMs are remarkably good at reasoning—so good, in fact, that they can infer sensitive personal attributes like your age, gender, location, or income level from seemingly innocuous public posts. This is known as an Attribute Inference Attack. Unlike "jailbreaking" prompts that seek harmful instructions, these attacks use benign queries that bypass standard safety filters.

Existing defenses usually rely on coarse-grained anonymization (like masking names or locations). However, LLMs can often "read between the lines" and use contextual cues to make accurate guesses anyway. The authors argue that since LLM providers can't simply "turn off" reasoning without ruining utility, the responsibility for privacy falls on the users to proactively modify their text before sharing it online.

Methods

The authors propose a two-pronged defense strategy called TRACE-RPS:

  1. TRACE (Textual Revision via Attention and Chain-based Editing): This is a fine-grained anonymization method. Instead of guessing what to hide, it uses two signals:
  2. Attention Weights: It identifies which specific words in the user's text contribute most to the model's inference.
  3. Inference Chains: It prompts an "adversarial" LLM to explain its reasoning step-by-step. TRACE then targets the specific textual elements identified in that chain for rewriting.
  4. RPS (Rejection-Oriented Perturbation Search): This is an optimization-based defense. It searches for a lightweight "suffix" (a string of tokens) to append to the user's text. This suffix is designed to steer the model's output distribution toward a refusal (e.g., "I cannot answer that").
  5. It uses a two-stage random search: first anchoring the model's first output token to "I", then shaping the second token to a rejection word like "cannot" or "apologize."

For models that are too "helpful" to refuse, they offer MPS (Misattribute-Oriented Perturbation Search), which redirects the model's prediction toward an incorrect attribute (e.g., flipping a "Male" prediction to "Female").

Overview of the TRACE-RPS framework showing the TRACE anonymization pipeline and the two-stage RPS optimization process.

Datasets

The study evaluates the defense across three datasets:

  • Synthetic Dataset: A collection of synthetic comments labeled with personal attributes.
  • SynthPAI: A dataset of synthetic profiles designed to simulate realistic social media interactions.
  • Real-World Dataset: The authors constructed a new benchmark by collecting and manually annotating authentic user-generated content from Reddit, following established privacy-research methodologies.

Key Insights and Ideas

  • Reasoning is the Leak: Anonymization fails because it doesn't account for the LLM's emergent reasoning. To stop the leak, you have to disrupt the inference chain.
  • Attention as a Map: Model attention mechanisms provide a high-resolution map of privacy-leaking elements, allowing for much more precise editing than rule-based PII masking.
  • Adversarial Suffixes for Good: The same optimization techniques used to "jailbreak" models can be repurposed to "fortify" them by inducing safe, refusal-oriented behaviors.
  • Cross-Model Generalization: Interestingly, a suffix optimized to protect text against one model (like Llama 2) often works effectively against others (like Llama 3 or DeepSeek), suggesting these "rejection triggers" are somewhat universal.

Key Results

The results show that TRACE-RPS is a powerhouse for privacy:

  • Massive Accuracy Drop: On open-source models, attribute inference accuracy plummeted from ~50% (No Defense) to below 5%.
  • Superior to Baselines: TRACE-RPS significantly outperformed existing methods like Azure's PII masking and FgAA (Feedback-guided Adversarial Anonymization).
  • Utility-Privacy Tradeoff: RPS achieved near-perfect semantic similarity (98%+) because it only appends a small suffix without changing the original text. TRACE, while modifying the text, still maintained high utility scores (~86%).
Detailed comparison of attribute inference accuracy across various models and datasets.

Additionally, an ablation study confirmed that both Vocabulary Extraction (VE) and Inference Chain (IC) generation are critical to the framework's success; removing either leads to a noticeable increase in privacy leakage.

Limitations and Future Work

  • White-Box Requirement: RPS currently requires access to model logits, which is easy for open-source models but impossible for closed-source APIs like GPT-4. For those, users must rely on the TRACE anonymization component alone.
  • Adaptive Attackers: While the authors tested against "SuffixDrop" (randomly deleting parts of the suffix), a determined attacker might develop more sophisticated ways to strip these perturbations.
  • Future Directions: The authors suggest exploring more robust optimization strategies that can withstand advanced adaptive attacks and extending the framework to handle multi-modal data (like images or audio).

Summary updated

BibTeX
@inproceedings{yan2026stop,
  author = {Dong Yan and Jian Liang and Ran He and Tieniu Tan},
  title = {{Stop Tracking Me! Proactive Defense Against Attribute Inference Attack in LLMs}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=dCJZR0P4T5},
}
Figure