Paper commentary
Exploiting Unintended Feature Leakage in Collaborative Learning
Shared model updates leak private details of each participant's training data
- Problem Collaborative learning was assumed to keep each party's data private, but the model updates participants exchange can reveal more than the joint model needs. Earlier work had not shown how much a curious participant can learn from these updates.
- Method The adversary subtracts its own update from consecutive model snapshots to isolate the other participants' updates. It then checks embedding-layer gradients for which tokens occurred, and trains a batch property classifier on gradients from labeled auxiliary data.
- Results The attack reaches 0.99 precision with recall 1 for membership of a FourSquare location profile. For single-batch race inference on LFW, it reaches an AUC of 1.0 when the main task is gender classification.
What collaborative training exposes
Collaborative training lets several parties with private datasets fit one model without pooling those datasets. Each party trains locally and exchanges parameters, updates or partial models with the others, so the data itself stays put while the updates keep moving. The concern studied here is what an honest-but-curious participant can learn from the updates it legitimately receives, which is a narrower question than whether the joint model is accurate.
The authors separate two levels of leakage. Membership inference asks whether one exact data point was in a participant's training set. Property inference asks whether a subset of that participant's batches carries a property that the joint model does not need to learn.
A model that is useful must reveal something about the population it was trained on, so a leak only counts as a privacy breach when the adversary learns more about the target's inputs than about other members of the same class.
What the adversary sees in each round
The adversary is one of K participants, with K at least 2, and attacks a target participant. With synchronized SGD and K equal to 2, the adversary sees gradients computed on a single batch of the target's data. With more participants it sees an aggregate of all the others' gradients, and under federated averaging it sees a two-step aggregate in which each participant first combines its local gradients and the server then combines the participants' updates.
The adversary keeps a snapshot of the joint model at each iteration. Because the difference between consecutive snapshots equals the sum of all participants' updates, subtracting the adversary's own update leaves the aggregate of the other participants. \[\Delta\theta_t=\theta_t-\theta_{t-1}=\sum_k\Delta\theta^k_t,\qquad g_{obs}=\Delta\theta_t-\Delta\theta^{adv}_t\]
Two signals carry the leak. The embedding layer maps each discrete token, such as a word or a location, to a row of an embedding matrix; its gradient is nonzero only for tokens present in the batch, so the nonzero rows reveal which tokens occurred.
Membership test from embedding gradients
The adversary builds a bag of words for the test record and checks whether its words are contained in the set of words that appear in the observed batch updates. If the record belongs to the target's data, its words should appear in at least one of the batches the adversary observes.
On FourSquare, the adversary reached a precision of 0.99 with perfect recall for a location profile, using 30,000 locations as the vocabulary. On Yelp-health, precision was 0.92 at batch size 32 and fell to 0.62 at batch size 512, with FourSquare falling to 0.62 at batch size 2,000.
Recall stays at 1 because any true record's words must be contained in some observed batch vocabulary. Larger batches pack more words into each observed set, so the test produces more false positives and precision falls.
Passive property inference
The adversary holds two auxiliary sets, one of data points with the property and one of data points without it, sampled from the same class as the target's data. Using snapshots of the global model, it computes gradients on batches drawn from each set, labels the first group as positive and the second as negative, and trains a binary batch property classifier.
\[g_{prop}=\nabla L(b^{adv}_{prop};\theta_t),\qquad g_{nonprop}=\nabla L(b^{adv}_{nonprop};\theta_t)\]
The classifier is then applied to the observed updates. Logistic regression is used for the embedding-layer attacks, and for the other attacks random forests with 50 trees performed best among the options tried. Because the number of gradient features equals the number of model parameters, the attack applies max pooling over non-overlapping subregions to reduce the feature dimension and cost.
For single-batch inference the classifier scores each observed batch, and for a whole target dataset the scores are averaged across iterations. The attack does not alter the training procedure, which is what makes it passive.
Active property inference and the joint loss
The active adversary attaches a property classifier to the last layer of its local copy and trains the copy with a joint loss over the main label y and the property label p. The weight alpha balances the two terms. \[L_{mt}=\alpha\cdot L(x,y;\theta)+(1-\alpha)\cdot L(x,p;\theta)\]
The adversary uploads gradients of this joint loss to the protocol. This pushes the joint model to separate the representations of data with and without the property, so the gradients that reach the server become separable and the adversary can tell whether the property is present.
The adversary still follows the protocol and sends no malformed messages. It only adds local computation before submitting its values, so it constrains its messages and not the input values that the participants use.
Single-batch and fractional property results
On LFW the target's batches are split so that half of them contain only inputs with the property, and the adversary tries to find those batches. When the main task is gender classification and the inferred property is race black, the attack reaches an AUC of 1.0, and the Pearson correlation between the two labels is -0.005.
Other LFW pairs also score high, such as race black with eyewear sunglasses at 1.0, and gender with Asian at 0.93. These pairs are chosen because the property is uncorrelated with the main label, so the attack is not simply reading the class.
For fractional properties the adversary asks whether some inputs in a batch have the property, with the fraction varied among 0.1, 0.3, 0.5, 0.7 and 0.9. On FaceScrub, AUC for IDs 0, 1 and 3 is above 0.8 even when only half of the batch shows the person. On Yelp-author, AUC is above 0.95 for all identities when the fraction is 0.3.
Why the unintended features appear
The authors project features from each layer of the LFW gender model with t-SNE. In the lower layers pool1, pool2 and pool3, feature vectors group by the property, whereas in the highest layer they group by class label.
The authors read this as evidence that the model learns more than a class separator: its lower layers also encode properties that the task does not need, and the attack exploits these extra features.
Specialty, author and dynamic occurrence
On Yelp-health the main task is review-score classification and the inferred property is the specialty of the reviewed doctor. The embedding-layer gradients give almost perfect AUC, and the words with the largest positive coefficients in the logistic regression are reported for each specialty, such as pregnancy and delivery for obstetricians.
On the CSI Corpus, inference of the author's gender reaches 0.98 AUC after only 2 epochs and improves as more updates are collected, while the model's test accuracy on sentiment analysis stays high.
On PIPA, the batches with the same-gender property appear during iterations 500 to 1500 of 2,500, and the classifier output rises and falls with them. On FaceScrub, ID 0 and ID 1 score highest in the iterations where they appear, while ID 2, which never appears in the target's data, stays low.
Active attack on FaceScrub
The active experiment uses FaceScrub gender classification, and the adversary tries to detect ID 4, which fills 50% of photos in a single batch. The AUC increases as alpha increases.
With alpha equal to 0.7, the points with the property form tighter groups in the t-SNE view of the final fully connected layer than with alpha equal to 0, which is the passive setting. The authors take this as the active attack producing a better separation of data with and without the property.
Defenses that were tried
When each client shares only a fraction of its gradients, region inference on the CSI Corpus still reaches an AUC of 0.84 with 10% of the updates, compared with 0.93 when all updates are shared.
With dropout added after the max pool layers, region inference AUC rises from 0.94 at a dropout probability of 0.1 to 0.99 at 0.7 and 0.9, while the model AUC column falls from 0.87 to 0.84. Dropout therefore makes the attack stronger in these runs.
Limitations
Property inference needs auxiliary data labeled with the property, and generic properties are easy to source. Targeted attacks, such as recognizing a specific person or the authorship of texts, need specialized samples that the adversary may not have.
The experiments use between 2 and 30 participants, while some federated applications involve thousands or millions of users. On image-classification tasks AUC degrades once the number of participants exceeds a dozen or so.
If the model does not separate the features tied to a target property, inference fails, and the authors did not detect some face identities in the multi-party model averaging experiments. In multi-party settings the adversary may not attribute the inferred property to a particular participant, because updates are aggregated. Attribution depends on auxiliary information such as social networks or when a new participant joined.
Paper info
- Authors
- Luca Melis, Congzheng Song, Emiliano De Cristofaro, Vitaly Shmatikov
- Venue
- arXiv · Preprint
- First published
- 2018-5-10
- Added
- 2026-11-12
- Updated
- 2018-11-1
- Version
- v3
- arXiv
- 1805.04049
- Category
- cs.CR · cs.AI
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Luca Melis, Congzheng Song, Emiliano De Cristofaro, Vitaly Shmatikov (2018). Exploiting Unintended Feature Leakage in Collaborative Learning. arXiv:1805.04049v3. https://arxiv.org/abs/1805.04049v3
BibTeX
@misc{melis2018exploiting,
title = {{Exploiting Unintended Feature Leakage in Collaborative Learning}},
author = {Luca Melis and Congzheng Song and Emiliano De Cristofaro and Vitaly Shmatikov},
year = {2018},
eprint = {1805.04049},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1805.04049v3}
}