SafeNet: The surprising effectiveness of model ensembles in privacy-preserving collaborative learning
SafeNet: The Unreasonable Effectiveness of Ensembles in Private Collaborative Learning
The authors propose SafeNet, which defends against poisoning in MPC collaborative training via local model ensembling; they claim it trains 39× faster and communicates 36× less on the Fashion three-layer network, and tolerates up to 9 poisoners among 20 data owners.
Apsoc adversary under the Secure Outsourced Computation (SOC) paradigm: can poison the local datasets of at most t (out of m) data owners, while corrupting at most T (out of N) servers participating in MPC (semi-honest or malicious); poisoned owners do not interfere with protocol execution after secret-sharing their data. The victim system is a PPML framework that trains a single model in MPC.
- MPC privacy-preserving machine learning (PPML) frameworks faithfully execute the training functionality but do not defend against data poisoning: multiple data owners secret-share data for joint training, poisoned samples are hard to detect, and the model may also leak training set privacy.
- Proposes SafeNet: each data owner trains a model locally on its own data and secret-shares the model and local validation set to MPC; the servers filter low-scoring models within MPC by global validation set accuracy (threshold φ), take a majority vote over the models that passed filtering to obtain predictions, and optionally add noise to achieve user-level differential privacy.
- Evaluated on 4 MPC settings and 5 datasets: a single poisoning owner can make a PPML backdoor attack reach 100% success, whereas SafeNet tolerates up to 9 poisoners among 20 owners (0% success rate); on the Fashion three-layer NN it trains 39× faster and communicates 36× less; on EMNIST its certified accuracy is higher than Cao et al.
- The authors note that SafeNet inference is slower than conventional PPML (requiring forward propagation through all local models), and that under extreme non-iid (α=0.1) accuracy drops and robustness fails, in which case they recommend switching to standard MPC training; privacy noise turns robust certification into a probabilistic guarantee.
- Evaluated models
- logistic regressionneural networkResNet-50
- Benchmarks
- MNIST (Digit 1/7 subset)AdultFashion-MNISTCIFAR-10EMNIST
- Metrics
- Training TimeCommunication ComplexityTest AccuracyAttack Success RateCertified Accuracy
The SafeNet framework uses model ensembles to let mutually distrusting data parties jointly train models under secure multi-party computation (MPC), circumventing various adversarial attacks. The scheme provides provable protection against poisoning attacks, significantly reduces the success rate of backdoor attacks, and trains 39 times faster with 36 times less communication than the four-party MPC framework of Dalskov et al. Experiments cover multiple datasets and end-to-end and transfer learning scenarios, and the ensemble retains these advantages under many non-iid settings.
Paper analysis
What problem does this paper attempt to solve?
MPC privacy-preserving training frameworks do not defend against data poisoning; the authors propose using local model ensembling (SafeNet) to obtain both poisoning robustness and privacy protection within MPC.
Core problem: Privacy-preserving machine learning (PPML) frameworks based on secure multi-party computation (MPC) faithfully execute the training function by design, and thus cannot defend against data poisoning attacks; model outputs may also leak training data privacy.
- Problem setting: Multiple mutually distrusting data owners secret-share their data to a set of servers and jointly train a model within MPC. The authors argue that poisoned samples are hard to detect after secret sharing, and that MPC only guarantees communication privacy and does not prevent the model from leaking training-set information.
- Shortcomings of existing methods: The authors state that the security definitions of existing PPML frameworks do not consider the case where data owners' data is poisoned; existing poisoning defenses are mostly heuristic, target specific attacks or data modalities (e.g., only applicable to image CNNs), and are costly to implement in MPC.
- Core observation: The MPC threat model naturally bounds the number of owners an adversary can poison to at most t, so the adversary can only corrupt a fixed number of local models in the ensemble; having each owner train a model locally and then aggregating within MPC can limit the poisoning impact to a few models.
- Proposed in the paper: The SafeNet framework — owners train models locally and secret-share them, with validation-set filtering and majority voting performed within MPC; the paper also gives a poisoning-robustness lower bound, per-sample certification, and user-level differential privacy guarantees, and reports training efficiency improvements.
- Threat model (Apsoc, Figure 1):
- Goal: Cause the model to misclassify backdoor/target samples via poisoning, or infer sensitive information about local datasets by observing model outputs.
- Knowledge: Can coordinate poisoned owners; the paper does not restrict their knowledge of other owners' data.
- Capability: Poison the local datasets of at most t (out of m) data owners, while corrupting at most T (out of N) MPC servers (semi-honest or malicious); poisoned owners do not interfere with the protocol after secret-sharing their data.
- Victim system: PPML frameworks that train a single model with MPC under the SOC (Secure Outsourced Computation) paradigm.
What related research exists?
Related work falls into four groups: MPC/PPML frameworks, poisoning attacks, the few works connecting MPC and adversarial ML, and ensemble defenses (PATE, CaPC, Cao et al.).
MPC and PPML frameworks
- MPC protocols are classified by honest-majority/dishonest-majority and by 2PC, 3PC, 4PC (e.g., Araki et al. [4], Dalskov et al. [28], ABY [32]); the experiments in this paper are based on four settings in the MP-SPDZ library [53].
- PPML training and inference frameworks (SecureML [71], ABY3 [69], SecureNN [87], Falcon [88], etc.) are mostly deployed in the outsourced computation (SOC) setting, and the authors note that their security definitions do not cover poisoning.
Data poisoning attacks
- Backdoor attacks (BadNets [44], etc.) inject triggers into training samples; targeted poisoning ([54], [55], Witches' Brew [40]) changes the predictions of a small number of specific test samples. The authors state that such attacks affect the model covertly and are hard to detect.
Work connecting MPC and adversarial ML
- [18], [59] show that MPC inference at test time can be broken by malicious users for model stealing; Escudero et al. [36] show that semi-honest MPC protocols can allow an SVM model to be backdoored by malicious parties. The authors state that these works, like this paper, show that MPC guarantees and adversarial ML goals are hard to align.
Ensemble-based defenses
- Ensembling on centralized training sets: poisoning defense ([51], [60]), differential privacy (PATE [75]), privacy attack defense ([84]). The authors note that centralized methods cannot exploit data partitioning, can only tolerate a small number of poisoned samples, and PATE can only provide sample-level privacy.
- CaPC [24]: extends PATE to MPC collaborative learning; the authors note that it only gives sample-level differential privacy and cannot provide poisoning robustness because information is shared among local training sets.
- Cao et al. [16]: provably poisoning-robust ensembling under federated learning (each model trained on data from k clients); the authors note that with k=1 it is vulnerable to data reconstruction attacks [12], and they compare with it experimentally on EMNIST.
Baselines and benchmarks: the experimental baselines are four PPML frameworks (2PC [32], 3PC [4] semi-honest, 3PC [28] malicious, 4PC [28] malicious) and Cao et al. [16]; the datasets are MNIST (Digit 1/7), Adult, Fashion-MNIST, CIFAR-10, and EMNIST.
The authors position this paper as: exploiting the natural data partitioning of the MPC threat model to give stronger robustness and user-level privacy analysis than centralized ensembling, while providing both poisoning robustness and privacy guarantees.
How does the paper address this problem?
SafeNet: owners train models locally and secret-share them; within MPC, models are filtered by global validation set accuracy and then majority-voted; includes a robustness lower bound, per-sample certification, and user-level DP.
The overall idea is to change "training a single model on merged data" into "each owner trains a model locally and ensembles them within MPC," using the upper bound t on the number of poisoners to confine contamination to a minority of models. The framework is named SafeNet.
Threat model formalization
- m data owners, N servers; adversary Apsoc poisons at most t owners and corrupts at most T servers (Figure 1).
- New ideal functionality FpTrain (Figure 2): adds poisoned data input to the standard training functionality; protocol security must satisfy both the MPC security definition and poisoning robustness.
- Privacy extension: considers adversaries that perform membership inference and attribute inference by observing model outputs.
Training and inference flow (Algorithm 1, Figure 3)
- Each owner Ck randomly splits a validation set Dkv from its local data Dk, trains a model Mk locally on the remaining data, and secret-shares Mk and Dkv to the servers.
- The servers merge the global validation set Dval = ∪Dkv within MPC, jointly compute each model's validation accuracy AccValk, and models below threshold φ are filtered out (marked by the bval vector).
- At inference (Πpred), the client secret-shares query x, the servers compute predictions for each model that passed filtering and take a majority vote, outputting the class with the most votes.
- Optional: add noise to the vote counts (DPNoise) to provide user-level differential privacy.
Robustness and privacy analysis
- Robust accuracy lower bound (Theorem 6, Appendix A): the probability that the clean-model error rate upper bound p < 1−φ、错误独立的假设下,若 t < (m(1−2p))/(2(1−p)),集成以高概率正确分类新样本;该式给出可容忍投毒者数量与 m、p 的关系。
- 逐样本认证(Algorithm 2,PredGap):返回预测类别 y 及 t = ⌈(cy − cy′)/2⌉ − 1,即改变该预测所需的最少投毒所有者数(cy、cy' 为前两名类别的票数);Theorem 3 给出无噪声时的认证正确性。
- 用户级差分隐私(Theorem 4):对计数加 Lap(2/ε) 噪声时满足用户级 ε-DP(单个模型对任意查询的 l1 敏感度为 2);作者称这隐含样本级 DP,可防成员推断之外的属性推断、模型窃取。加噪后认证变为概率性保证(如高斯噪声下 t* > t−k is Φ(k/σ)).
Extension designs
- Transfer learning: all owners start from a common pretrained model MB and fine-tune only the last l layers; at inference the forward pass of MB is shared, reducing inference overhead; guaranteed under the premise that MB is not tampered with.
- Ensemble testing (fail-fast): under extreme non-iid, local model accuracy is low; SafeNet can detect low accuracy already during the training phase, suggesting switching to standard MPC training.
- Low-resource owners: owners without training capability can delegate training to standard training within MPC (Algorithm 4), increasing computation overhead but retaining robustness and privacy properties.
Implementation points
- Implemented on the MP-SPDZ library, covering four settings: 2PC/3PC (semi-honest and malicious)/4PC; fixed-point `=64, f=16, using probabilistic truncation; SafeNet local training uses the original sigmoid, and softmax within MPC uses the method of Aly et al. [2].
- The filtering threshold φ and the tolerated number of poisoners t are agreed in advance by the owners; example: Fashion setting with m=10, φ=0.3, t=2 requires p<0.375、|Dval|>92.
What experiments did the paper conduct?
Poisoning attacks and SafeNet's defense are tested on 4 MPC settings and 5 datasets: a single poisoner can break PPML 100%, while SafeNet tolerates up to 9/20 poisoners and trains 39× faster.
Experimental Setup
- Subjects under test: the traditional PPML framework (training a single model on combined data) and SafeNet; the models are logistic regression (MNIST/Digit 1/7), a NN with one hidden layer of 10 nodes (Adult), a NN with 1–3 hidden layers of 128 nodes (Fashion), and ResNet-50 with the last layer fine-tuned (CIFAR-10).
- MPC settings: 2PC semi-honest [32], 3PC semi-honest [4], 3PC malicious [28], 4PC malicious [28], all based on MP-SPDZ, LAN network, 32-core server.
- Datasets and partitioning: MNIST and Adult are split among 20 owners, Fashion and CIFAR-10 among 10, and EMNIST takes 100 clients (naturally non-iid); each owner randomly takes 10% of local data as a validation set; non-iid is generated using a Dirichlet distribution Dir(αp), with default α=10.
- Attack implementation: BadNets backdoor (k=100 poisoned samples); targeted attacks TGT-Top (high-confidence samples) and TGT-Foot (low-confidence samples), k=100, with labels replaced by the second-highest predicted class; a worst-case adversary is also tested (for each test sample, c owners can be arbitrarily chosen to modify the model arbitrarily).
- Metrics: training time (excluding the one-time overhead of secret sharing), communication volume, test accuracy, attack success rate (the proportion of target samples misclassified as the attacker's chosen label), and error rate under the worst-case adversary.
- Sample size and number of repetitions: attack target samples k=100; the paper does not report the number of experimental repetitions.
Main Results
Digit 1/7 (MNIST subset) logistic regression, 3PC semi-honest setting, single poisoned owner (according to Table II, Figure 4):
Swipe horizontally to read the table
Framework Training time Communication Backdoor success rate TGT-Top success rate TGT-Foot success rate PPML [4] n×2.63 s n×0.35 GB 100% 98% 94% SafeNet 0.54 s 0.15 GB 0% (up to 9/20 poisoners) resilient up to 9/20 21% - The authors state that PPML reaches a backdoor success rate of 100% with a single poisoned owner, and that clean test accuracy is about 98.98%, making the attack difficult to detect by monitoring accuracy.
- SafeNet remains resilient to the backdoor and TGT-Top with up to 9/20 poisoned owners; TGT-Foot has a relatively high success rate because the target samples have low confidence (the authors explain this as the model being inherently prone to disagreement on low-confidence samples).
- Figure 4(d): under the worst-case adversary (reselecting c poisoners per sample), SafeNet's accuracy is similar to that under the backdoor/targeted attacks; the authors use this to state that the chosen attack strength is close to worst-case, and that it is certified robust up to 9/20.
Deep Models and Efficiency
Fashion three-layer NN, single poisoned owner (Table III):
Swipe horizontally to read the table
MPC setting Framework Training time Communication Backdoor success rate TGT-Foot success rate 3PC semi-honest PPML / SafeNet n×565.45 s / 156.53 s n×154.79 / 41.39 GB 100% / 0% 100% / 32% 4PC malicious PPML / SafeNet n×1392.46 s / 356.26 s n×280.32 / 76.43 GB 100% / 0% 100% / 32% - Counting n=10 epochs, SafeNet trains 39× faster and uses 36× less communication under 4PC; a single secure prediction with SafeNet averages 26 ms versus 3.5 ms for PPML, and the authors consider this inference overhead a reasonable trade-off for training speedup and robustness.
- Figure 5 (Fashion three-layer NN, worst-case): SafeNet is certified robust to the backdoor, TGT-Top, and TGT-Random up to 4/10 poisoned owners; TGT-Foot has a higher success rate, which the authors explain as the target samples having the lowest confidence and the ensemble being prone to disagreement.
- Multiclass (MNIST logistic regression, Appendix B/Table IV): under 3PC semi-honest with a single poisoner, PPML's backdoor success rate is 100% and SafeNet's is 4%; the authors report that at n=10 training is 240× faster and communication is 268× lower, and that the worst-case success rate does not exceed 50% with 9/20 poisoners.
Ensemble Accuracy and Extended Evaluation
- Ensemble gain (Table I): SafeNet's ensemble improves accuracy over a single local model by 9.03% on MNIST, 4.09% on Adult, 11.53% on Fashion, 8.73% on CIFAR-10, and 25.14% on EMNIST; on CIFAR-10 SafeNet reaches 62.76%, close to the 65% of fine-tuning on combined data.
- Transfer learning extension: on Fashion, SafeNet inference is only 1.62× slower than PPML and uses 1.26× more communication (standard SafeNet is about 8× slower); on CIFAR-10 accuracy is 62.8%, dropping to 51.9% when tolerating 1 poisoner and 39.8% for 2, with communication increasing by only about 0.1% (about 7MB/6.5GB).
- non-iid sensitivity (Appendix E-A, Figure 10): accuracy decreases as α decreases; robustness fails at α=0.1, but at that point the average AccVal is only 17%, which the authors say allows detecting the distribution discrepancy in advance and recommending against using SafeNet.
- Low-resource owners (Appendix E-A): on Fashion, 3PC, with 2/10 owners constrained, SafeNet is still 1.82× faster than PPML and uses 3.53× less communication.
Comparison with Federated Learning Defenses and Others
- Comparison with Cao et al. [16] (Figure 6, EMNIST, m=100, k∈{2,4}, ensemble size fixed at 100): the authors state that SafeNet's certified accuracy remains higher than [16] under large poisoning proportions, and that their scheme requires multiple rounds of interaction to train in MPC and is more costly. Note: the figure only gives curves; specific values are not annotated in the text.
- Other ablations: Adult single-layer NN (Table VII, Figure 13) PPML backdoor success rate is 100%, while SafeNet remains resilient; Fashion one/two-layer NN (Tables V–VI) under a single poisoner SafeNet's backdoor success rate is 0% and TGT-Foot is 38–46%, and under 4PC at n=10 training is 42× faster and communication is 43× lower.
- Negative results/exceptions: TGT-Foot still has success rates of 21% (Digit 1/7), 32% (Fashion three-layer), and 38–46% (Fashion one/two-layer) on SafeNet; robustness fails under the extreme non-iid setting of α=0.1; SafeNet inference is slower than PPML (26 ms versus 3.5 ms).
What are some points that can be further explored?
The authors note limitations such as inference overhead, failure under extreme non-iid, and probabilistic certification; experiments cover 4 MPC settings, 5 datasets, and 2 model types.
Limitations noted by the authors and future directions
- Slower inference: the authors state that SafeNet's main drawback is that inference time is slower than traditional PPML frameworks, requiring forward passes through all local models in the ensemble (Section III-E); the transfer learning extension can mitigate this.
- Failure under extreme non-iid: the authors state that local model accuracy is affected by extreme non-iid settings; in this case SafeNet's fail-fast mechanism lets owners judge whether the setting is applicable and switch to standard MPC training (Section III-E, Appendix E-A).
- Probabilistic certification: after adding differential privacy noise, Algorithm 2 cannot return the exact difference between the top two vote counts and can only provide probabilistic robustness guarantees (Section III-D).
- Conservative theoretical bound: in the example, the analysis guarantees t=2 while 3 poisoners are actually tolerated; the authors state that in practice SafeNet can tolerate more poisoning than the analysis shows (Section V-B).
- Extension directions: the authors state that PATE's improved mechanisms (Gaussian noise, data-dependent methods) can be extended to this framework (Section III-D); advances in MPC inference and model design will directly improve SafeNet's runtime and accuracy (Section V-A).
Experimental coverage
- The models tested are logistic regression, 1–3 hidden-layer fully connected NN, and fine-tuned ResNet-50, 4 architecture types in total; the datasets are MNIST (Digit 1/7), Adult, Fashion, CIFAR-10, and EMNIST, 5 in total (Section IV-C).
- MPC settings cover 2PC/3PC/4PC, one combination each of semi-honest and malicious (Section IV-A); owner scales are 10, 20, and 100 (Section IV-D).
- Attack evaluations include BadNets backdoor, TGT-Top/TGT-Foot/TGT-Random targeted attacks, and a worst-case adversary; poisoning scale is tested up to 10/20 (Digit 1/7) and 5/10 (Fashion) (Figures 4–5).
- Defense comparison is done experimentally only against Cao et al. [16] on EMNIST (Figure 6); other poisoning defenses are only discussed in Section V-C without experiments.
- The paper does not report the number of experimental repetitions or confidence intervals; privacy attacks (membership/attribute inference) are covered only in theoretical analysis, with no empirical attack success rates reported.
Summarize the main content of the paper
SafeNet changes MPC collaborative training into local model ensembling, obtaining provable poisoning robustness and user-level privacy, training 39× faster, and tolerating up to 9/20 poisoning owners.
A paper on defending against poisoning in MPC privacy-preserving training: the authors extend the MPC security definition to cover data poisoning (the Apsoc adversary can poison t/m owners and corrupt T/N servers), and propose the SafeNet framework.
- Problem: PPML frameworks faithfully execute training, and poisoned samples are undetectable after secret sharing; experiments show that a single poisoning owner (1 of 20) can make a PPML backdoor attack reach 100% success and targeted attacks exceed 83%, while clean accuracy is about 98.98%, making it hard to notice.
- Method: each owner trains a model locally and secret-shares it; within MPC, a global validation set is used to filter low-accuracy models by threshold φ, and predictions are output by majority vote; the authors give a robust accuracy lower bound (Theorem 6), per-sample certification (Algorithm 2), and user-level differential privacy (Theorem 4); extensions support transfer learning to speed up inference, low-resource owners, and fail-fast detection.
- Main results:
- On Digit 1/7, SafeNet achieves 0% success rate against backdoor and TGT-Top attacks with up to 9/20 poisoning owners (Figure 4).
- Under Fashion three-layer NN, 4PC malicious setting, training is 39× faster and communication is 36× less (Table III, n=10 epochs); a single secure prediction takes 26 ms, slower than PPML's 3.5 ms.
- Ensemble accuracy is 4.09%–25.14% higher than a single local model (Table I, 5 datasets).
- On EMNIST, certified accuracy is higher than Cao et al. [16] (Figure 6).
- Exceptions: the TGT-Foot attack still has a 21%–46% success rate on SafeNet; robustness fails under extreme non-iid with α=0.1.
- Authors' conclusion: the simplicity, low cost, and robustness of ensembling make it a strong first choice for MPC privacy-preserving training; experiments show actual robustness higher than the theoretical analysis.