SignSGD with Federated Defense: Harnessing Adversarial Attacks through Gradient Sign Decoding

Chanho Park, Namyoon Lee

TL;DR

This paper introduces SignSGD with Federated Defense (SignSGD-FD), a novel algorithm for distributed learning that can maintain high accuracy even when some workers are malicious and attempt to attack the training process. It achieves this by intelligently decoding and weighting the gradients from all workers, including the compromised ones, to improve robustness against adversarial attacks.

What Problem Does This Paper Address?

Distributed learning, where multiple workers train a model collaboratively and send updates to a central server, is a powerful technique for handling large datasets and complex models. However, it faces a significant challenge: communication overhead. Sending full gradients between workers and the server can be prohibitively expensive. To combat this, methods like SignSGD (Sign Stochastic Gradient Descent) quantize gradients to just their signs, drastically reducing communication costs.

While SignSGD is efficient, it's vulnerable to adversarial attacks. Malicious workers can flip the signs of their gradients, corrupting the learning process and degrading model accuracy. Existing defenses often struggle to balance communication efficiency with robustness, especially as the number of malicious workers increases. This paper addresses the critical need for a communication-efficient distributed learning algorithm that can effectively defend against adversarial attacks without sacrificing performance.

Methods

The core innovation is SignSGD with Federated Defense (SignSGD-FD). Unlike traditional SignSGD which uses majority voting (SignSGD-MV) to aggregate gradient signs, SignSGD-FD introduces a federated defense mechanism. This mechanism:

  • Leverages Gradient Sign Decoding: It treats the communication of gradient signs as a noisy channel problem. By estimating the "cross-over probability" (the likelihood of a gradient sign being flipped), the server can infer the true gradient sign.
  • Introduces Weighted Majority Voting (WMV): Instead of a simple majority vote, SignSGD-FD uses a weighted majority vote. The weights are dynamically learned by the server based on the estimated reliability of each worker.
  • Progressive Weight Estimation: The server iteratively estimates the cross-over probabilities of workers. Initially, it uses an empirical approach based on observed sign errors. Later, it refines these estimates recursively. This allows the server to identify potentially compromised workers and assign them lower weights, or even leverage their "noisy" gradients effectively.
  • Unified Convergence Analysis: The paper provides a theoretical framework to analyze the convergence of SignSGD-style algorithms under various adversarial attack scenarios, including Sign Inversion Attacks (SIA) and Stochastic Sign Flip Attacks (SSFA).

Datasets

The paper uses standard image classification datasets for evaluation:

  • MNIST: A dataset of handwritten digits.
  • CIFAR-10: A dataset of 10 classes of small color images.
  • CIFAR-100: A dataset of 100 classes of small color images.

The authors use Convolutional Neural Networks (CNNs) for MNIST and ResNet-56 for CIFAR datasets.

Key Insights and Ideas

  • Counter-intuitive Robustness: The paper demonstrates that SignSGD-FD's convergence rate can be invariant to the number of adversarial workers, as long as the number of legitimate workers is greater than the adversarial ones. This is a significant departure from traditional methods where any adversarial presence degrades performance.
  • Harnessing Compromised Workers: Instead of simply discarding gradients from suspected malicious workers, SignSGD-FD intelligently uses their information by assigning them appropriate weights. This is crucial for maintaining performance when the number of workers is limited.
  • Decoding as a Communication Problem: Framing the gradient sign transmission as a noisy communication channel (specifically, Binary Symmetric Channels or BSCs) provides a powerful theoretical lens to understand and mitigate adversarial attacks.
  • Adaptive Weighting is Key: The dynamic learning of worker weights based on their estimated reliability is the core mechanism that allows SignSGD-FD to adapt to and overcome adversarial manipulations.

Key Results

  • Superior Test Accuracy: SignSGD-FD consistently achieves higher test accuracy compared to traditional SignSGD-MV and other robust optimizers under various adversarial attack scenarios (SIA and SSFA).
  • Robustness to SIA: In the presence of Sign Inversion Attacks (SIA), SignSGD-FD maintains accuracy even with a significant number of compromised workers (up to L=6 out of M=15), while SignSGD-MV's accuracy degrades sharply.
  • SSFA Performance: Under Stochastic Sign Flip Attacks (SSFA), SignSGD-FD also shows better robustness than SignSGD-MV, especially when the sign-flipping probability is high.
  • Communication Efficiency: The paper highlights that SignSGD-based algorithms, including SignSGD-FD, offer significantly lower communication costs (e.g., 30x less) compared to other attack-robust algorithms like Multi-Krum.

Limitations and Future Work

  • Assumption of Known Cross-over Probabilities: The theoretical analysis of SignSGD-FD initially assumes that the server perfectly knows the cross-over probabilities of all workers. The paper then proposes a federated defense mechanism to estimate these probabilities, but the performance might still depend on the accuracy of these estimations.
  • Performance Degradation at High Attack Ratios: While SignSGD-FD is robust, its performance does degrade as the number of compromised workers increases, particularly when the attack is severe (e.g., r=1/2 in SSFA). The paper notes that the accuracy deterioration becomes more pronounced when the number of compromised workers is very high, potentially making accurate estimation of cross-over probabilities difficult.
  • Future Work: The paper suggests exploring the application of LLR (Log-Likelihood Ratio) weights on SignSGD-based learning algorithms, which is a gap identified in the literature. Further research could also investigate more sophisticated estimation strategies for cross-over probabilities and explore the algorithm's performance in more complex federated learning settings (e.g., non-IID data distributions).

Summary updated

BibTeX
@inproceedings{park2024signsgd,
  author = {Chanho Park and Namyoon Lee},
  title = {{SignSGD with Federated Defense: Harnessing Adversarial Attacks through Gradient Sign Decoding}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=zEqeNEuiJr},
}
Figure