Introduction
Shared representations in multitask learning (MTL)—often considered the "safe" minimum of information to share between parties—actually leak significant privacy. This paper introduces task-inference attacks, demonstrating that a black-box adversary can determine if a specific user’s data or a specific subpopulation was included in a model's training using only a few samples and no expensive "shadow models."
The Privacy Illusion in Multitask Learning
In Multitask Learning (MTL), a single model learns a "shared representation" (an encoder) to solve many related tasks simultaneously. This is common in personalization (e.g., a keyboard learning your specific typing style) and federated learning, where it’s often assumed that sharing only the encoder—and not the final classification "heads"—protects privacy.
The authors challenge this assumption. While previous research focused on membership inference (did this specific image train the model?), this paper looks at task-inference (did this user's entire dataset train the model?). This is a broader and often more dangerous privacy risk, as it can reveal a user's participation in a sensitive study or the presence of a specific demographic group in a dataset.
A Black-Box Threat Model
The authors propose a novel, purely black-box threat model. Unlike traditional attacks that require training dozens of "shadow models" to mimic the target, these attacks exploit the statistical dependencies between embeddings of samples from the same task.
They introduce two primary attack vectors:
- Coordinate-Wise Variance Attack: This measures the variance across the dimensions of the embedding vectors for a batch of samples. If a model has "memorized" a task's distribution, the embeddings for that task tend to exhibit specific patterns of variance compared to unseen tasks.
- Pairwise Inner Product Attack: This measures the similarity (cosine similarity or inner product) between pairs of embeddings from the same task. The intuition is that a shared representation will cluster samples from a "known" task more tightly or distinctly than samples from an "unknown" one.
The paper distinguishes between a strong adversary (who has the exact samples used in training) and a weak adversary (who only has fresh, unseen samples from the same user/distribution).
Key Insights and Results
The attacks were evaluated across both vision (CelebA, FEMNIST) and language domains (Stack Overflow, Reddit). In these contexts, a "task" represents a specific person, facial attribute, or user.
The attacks proved remarkably effective and efficient, often taking only 0.1 seconds to execute on a single GPU.
- High Success Rates: As seen in the ROC curves, the strong adversary achieved nearly perfect detection on the Stack Overflow dataset (AUC of ~1.0). Even the weak adversary achieved significant success across the board.
- Minimal Data Required: The attacks can succeed with as few as four samples from a target task.
- Personalization is Vulnerable: In the Reddit generation experiments (using a fine-tuned Gemma model), the variance attack achieved a True Positive Rate (TPR) of 19% at a very low 1% False Positive Rate, even for the weak adversary.
- Defenses are Lacking: Standard techniques like gradient clipping and weight decay failed to stop the attacks. While Differential Privacy (DP) could mitigate the risk, it caused a "prohibitive cost" to model utility, dropping accuracy from 71% to 29% in some tests.
Why Does This Happen?
- Shared Representations are Not Anonymous: Even without access to the final classification layers, the encoder "overfits" to the underlying distributions of the tasks it was trained on.
- The Power of Correlation: By simply looking at how a batch of samples from the same task "behave" together in the embedding space, the membership signal is amplified.
- Generalization is the Enemy of Privacy: The success of the attack is closely tied to the "generalization gap." The more a model improves its performance on a specific task during training, the more it inadvertently leaves a "fingerprint" of that task in the shared representation.
Limitations and Future Work
The authors acknowledge that their attack success is tied to the model's generalization gap. If a model generalizes perfectly to unseen tasks, the "fingerprint" might vanish.
Future work remains to find a "middle ground" defense—something more effective than simple heuristics but less destructive to accuracy than current task-level Differential Privacy. Additionally, exploring these attacks on massive, multi-modal Large Language Models (LLMs) remains a critical frontier for privacy research.
Summary updated