Generalization Error Matters in Decentralized Learning Under Byzantine Attacks

Haoxiang Ye, Qing Ling

TL;DR

While decentralized learning is prized for its scalability and privacy, it is highly vulnerable to "Byzantine" (malicious) agents. This paper provides the first theoretical analysis of generalization error in these systems, revealing a sobering truth: malicious attacks introduce a permanent error floor that cannot be eliminated, even with an infinite amount of training data.

What Problem Does This Paper Address?

In decentralized learning, a network of devices (agents) collaborates to train a model without a central server. This is great for privacy but creates a massive security hole: any agent can be "Byzantine," meaning it sends intentionally corrupted data to its neighbors to sabotage the process.

Until now, researchers have focused mostly on optimization error—ensuring the algorithm eventually settles on a solution. However, a model that fits its training data perfectly is useless if it doesn't work on new, unseen data. This gap is known as generalization error.

The authors tackle a critical question: If we use "robust" aggregation rules to ignore malicious updates, does the resulting model actually generalize well? Or do these attacks leave a lasting "poison" in the model's ability to handle the real world?

Methods

The researchers analyzed a class of algorithms called Byzantine-resilient Decentralized Stochastic Gradient Descent (DSGD). In standard DSGD, agents average their neighbors' updates. In the resilient version, they use Robust Aggregation Rules (RARs) like:

  • Trimmed Mean (TM): Throwing out the largest and smallest values before averaging.
  • Iterative Outlier Scissor (IOS): Iteratively removing updates that deviate too far from the average.
  • Self-Centered Clipping (SCC): Limiting the influence of updates that are too far from an agent's own local model.

To measure generalization, the authors used the framework of algorithmic stability. Essentially, they calculated how much the final model would change if just one training sample in the entire network was replaced. If the model changes very little, it is "stable" and likely to generalize well. They provided separate proofs for three types of loss functions: strongly convex, convex, and non-convex.

Datasets

The authors validated their theoretical bounds using two classic benchmarks:

  • MNIST: Used for softmax regression tasks (strongly convex and convex cases).
  • CIFAR-10: Used for training a ResNet-18 architecture (the non-convex case).

They simulated a network of 10 agents using an Erdos-Renyi graph and tested against four types of attacks: Gaussian noise, Sample-duplicating, A-Little-Is-Enough (ALIE), and Sign-flipping.

Key Insights and Ideas

  • The "Non-Vanishing" Error: In a perfect world, generalization error goes to zero as you add more data. This paper proves that under Byzantine attacks, this is impossible. The malicious messages act like permanent noise that prevents the model from ever perfectly representing the true data distribution.
  • Topology is Destiny: In standard decentralized learning, the network structure (who talks to whom) doesn't heavily impact generalization. Under attack, however, topology is everything. It determines how effectively a malicious agent can spread its influence and how "skewed" the resulting global model becomes.
  • Strong Convexity as a Buffer: The math shows that strongly convex loss functions (often achieved via regularization) are much more resilient. Their generalization errors fluctuate but stay bounded, whereas convex and non-convex models see their generalization error bounds grow over time.
  • The Stability Trade-off: Robust aggregation rules help the model converge, but they cannot fully "clean" the dataset. Because we can't identify and remove every corrupted sample, the training set remains fundamentally "contaminated."

Key Results

  • Theoretical Bounds: The paper provides explicit formulas for generalization error (summarized in Table I). For strongly convex losses, the error is $O(1/Z|R|)$ plus a constant term dictated by the attack's strength.
  • Experimental Confirmation: Numerical results perfectly mirrored the theory. Under attacks like "Sign-flipping," the generalization error for SCC and TM rules spiked significantly compared to attack-free scenarios.
  • Algorithm Performance: Among the robust rules, IOS (Iterative Outlier Scissor) generally provided the best balance, leading to lower generalization errors and higher testing accuracy across most attack scenarios.

Limitations and Future Work

The authors acknowledge a few hurdles:

  • Time-Increasing Bounds: For non-convex models (like deep neural networks), the theoretical bounds grow as training continues ($k \to \infty$). In practice, models often stabilize, suggesting the current theoretical tools might be too pessimistic for very long training runs.
  • The Optimization-Generalization Interplay: This paper focuses on generalization, but a model needs both low optimization error and low generalization error to be effective. The authors plan to investigate how to jointly minimize both in the future.
  • Time-Uniform Bounds: A promising next step is developing "time-uniform" stability analysis that doesn't depend on the number of iterations, providing a clearer picture of long-term model health.

Summary updated

BibTeX
@article{ye2025generalization,
  author = {Haoxiang Ye and Qing Ling},
  title = {{Generalization Error Matters in Decentralized Learning Under Byzantine Attacks}},
  journal = {IEEE Transactions on Signal Processing},
  year = {2025},
  doi = {10.1109/tsp.2025.3526989},
}
Figure