SafeNet: The Unreasonable Effectiveness of Ensembles in Private Collaborative Learning

Harsh Chaudhari, Matthew Jagielski, Alina Oprea

Abstract

Secure multiparty computation (MPC) has been proposed to allow multiple mutually distrustful data owners to jointly train machine learning (ML) models on their combined data. However, by design, MPC protocols faithfully compute the training functionality, which the adversarial ML community has shown to leak private information and can be tampered with in poisoning attacks. In this work, we argue that model ensembles, implemented in our framework called SafeNet, are a highly MPC-amenable way to avoid many adversarial ML attacks. The natural partitioning of data amongst owners in MPC training allows this approach to be highly scalable at training time, provide provable protection from poisoning attacks, and provably defense against a number of privacy attacks. We demonstrate SafeNet's efficiency, accuracy, and resilience to poisoning on several machine learning datasets and models trained in end-to-end and transfer learning scenarios. For instance, SafeNet reduces backdoor attack success significantly, while achieving $39\times$ faster training and $36 \times$ less communication than the four-party MPC framework of Dalskov et al. Our experiments show that ensembling retains these benefits even in many non-iid settings. The simplicity, cheap setup, and robustness properties of ensembling make it a strong first choice for training ML models privately in MPC.

Introduction

Secure Multiparty Computation (MPC) is a powerful tool for collaborative learning, enabling multiple parties to train models on collective data without revealing raw datasets. However, standard MPC approaches face two critical challenges. First, they are inherently vulnerable to poisoning attacks. Because MPC protocols faithfully execute the training algorithm, a single malicious participant providing "poisoned" data (e.g., a backdoor trigger) can compromise the entire global model. Second, while MPC protects the training process, the resulting model output can still leak sensitive information via membership or property inference attacks. Furthermore, training complex neural networks directly within MPC is computationally expensive and communication-heavy.

SafeNet addresses these issues by leveraging the natural partitioning of data in collaborative settings. Instead of training one monolithic model in MPC, SafeNet uses an ensemble of locally trained models, significantly reducing overhead and improving robustness.

The SafeNet Framework

SafeNet shifts the primary computational burden from the MPC environment to individual data owners. The framework operates in two main phases: training and testing.

Overview of the SafeNet training and testing phases, illustrating the transition from local data owner computation to secure outsourced computation.

Training Phase

  1. Local Training: Each data owner trains a model ($M_k$) locally on their own dataset ($D_k$).
  2. Secret Sharing & Filtering: Owners secret-share their trained models and a small random validation subset ($D^v_k$) with a set of MPC servers. These servers aggregate the validation sets into a global validation dataset ($D_{val}$).
  3. Filtering Stage: The MPC servers jointly evaluate the accuracy of each model $M_k$ on $D_{val}$. Models that fail to meet a predefined accuracy threshold ($\phi$) are discarded. This "sanity check" ensures that poisoned models—which might perform well on specific triggers but poorly on general data—are excluded.

Testing Phase

During inference, a client query $x$ is processed by the remaining ensemble. The MPC servers compute predictions from all models ($y_k \leftarrow M_k(x)$) and perform a majority vote to produce the final output $y$. To enhance privacy, SafeNet can optionally add Laplacian noise to the vote counts, providing user-level differential privacy.

Experimental Evaluation

The authors evaluated SafeNet across diverse datasets including MNIST, Adult, Fashion-MNIST, CIFAR-10 (via transfer learning), and EMNIST (for non-IID scenarios).

Key Results

SafeNet demonstrates significant improvements in efficiency, security, and accuracy:

  • Efficiency: On Fashion-MNIST, SafeNet achieved $39\times$ faster training and $36\times$ less communication than state-of-the-art 4-party MPC frameworks.
  • Poisoning Resilience: In a 20-owner scenario, SafeNet reduced the success rate of a backdoor attack from 100% (in standard MPC) to 0%, maintaining robustness even when nearly half the owners were compromised.
  • Accuracy Gains: Ensembling frequently outperformed single local models, with accuracy improvements reaching up to 25%.
Comparison of accuracy between local models and the SafeNet ensemble across various datasets and partition types.

Discussion and Future Work

While SafeNet offers dramatic improvements in training speed and robustness, it introduces a trade-off in inference latency, as the MPC must evaluate multiple models. The authors mitigate this through transfer learning—fine-tuning only the final layers of pre-trained models—which brings inference overhead down to $1.62\times$ that of a single model.

Future research will focus on handling extreme non-IID data distributions, where ensemble consensus is harder to reach, and further hardening the validation set aggregation against sophisticated poisoning attempts. Overall, SafeNet's simplicity and robustness make it a compelling choice for practical private collaborative learning.

Summary updated

BibTeX
@inproceedings{chaudhari2022safenet,
  author = {Harsh Chaudhari and Matthew Jagielski and Alina Oprea},
  title = {{SafeNet: The Unreasonable Effectiveness of Ensembles in Private Collaborative Learning}},
  booktitle = {SaTML},
  year = {2022},
  url = {https://openreview.net/forum?id=LQbBclr7wO},
}
Figure