FedDebug: Systematic Debugging for Federated Learning Applications

Waris Gill, Ali Anwar, Muhammad Ali Gulzar · DOI

Abstract

Federated Learning (FL) enables collaborative model training while preserving data privacy, yet its distributed and opaque nature makes debugging exceptionally difficult. We present FedDebug, the first systematic debugging framework for FL. FedDebug identifies faulty clients without accessing private data by utilizing "mirrored simulations" for interactive debugging and a novel neuron-activation-based differential testing approach. Our evaluation shows that FedDebug localizes faulty clients with up to 100% accuracy with negligible overhead.

Introduction

Federated Learning (FL) allows multiple parties, such as hospitals or mobile users, to train a shared global model without ever sharing their raw, private data. While this paradigm offers significant privacy benefits, it creates a "black box" for developers. When global model performance degrades, identifying the source of the issue is nearly impossible because developers lack access to client test data and labels. Furthermore, the ephemeral nature of client participation makes reproducing failures difficult. Traditional debugging tools like gdb are unsuitable as they interrupt the distributed training process, leading to data loss and synchronization issues.

Methodology

FedDebug addresses these challenges through three primary components:

Selective Telemetry & Mirrored Simulation

To avoid interrupting live training, FedDebug records lightweight telemetry—specifically client models and performance metrics—at the central aggregator. It then spawns a local simulation that mirrors the live state. This "mirrored simulation" allows developers to use standard debugging features like breakpoints, "stepping in" to specific clients, or "stepping back" to previous rounds without affecting the production training environment.

Interactive debugging workflow in FedDebug showing mirrored simulation and fault localization.

Inference-Guided Test Selection

Since developers lack real test data, FedDebug generates synthetic "noise" inputs using Kaiming Initialization. It then implements a "pseudo-oracle" by selecting inputs where a majority of clients reach a consensus on a prediction. This consensus-based approach allows for the evaluation of model behavior in the absence of ground-truth labels.

Differential Testing via Neuron Activations

FedDebug localizes faults by analyzing how models process information rather than just their final output. By profiling internal neuron activations, FedDebug creates a "fingerprint" for each client. Because benign clients share the same architecture and training objectives, their activation patterns are typically similar. A faulty client—whether due to noisy labels or malicious data—exhibits a significantly different activation profile, allowing it to be isolated as an outlier.

Technical components of FedDebug: (A) Inference-guided input selection and (B) Fault localization using neuron activation fingerprints.

Fix and Replay

Once a fault is localized, FedDebug enables retroactive correction. Developers can remove the faulty client's contribution from a specific round, recompute the global model, and resume training from that point.

Evaluation

FedDebug was evaluated across 68 different FL configurations using the CIFAR-10 and FEMNIST datasets. The experiments utilized popular CNN architectures (ResNet, VGG, DenseNet) in both IID and Non-IID settings. Faults were simulated using real-world noisy label injections.

Key results include:

  • Localization Accuracy: FedDebug achieved 100% accuracy in localizing single faulty clients and 90.3% accuracy for multiple faulty clients.
  • Performance Overhead: Telemetry collection adds only 1.2% overhead to training time.
  • Efficiency: Fault localization takes approximately 2.1% of the time required for a single training round.
  • Scalability: The system maintains high accuracy even when scaled to 400 clients.

Discussion and Conclusion

The core insight of FedDebug is the "Odd One Out" principle: identifying bugs in FL does not require knowing the correct answer, but rather identifying which client deviates from the collective internal behavior of the group. By decoupling debugging from live training via mirrored simulations, FedDebug solves the problem of ephemeral clients.

However, limitations remain. The differential testing approach assumes a benign majority; if more than half of the clients are faulty in the same way, the consensus shifts. Future work will explore more complex FL variants and a broader range of fault types like hardware-induced errors or sophisticated adversarial attacks.

Summary updated

BibTeX
@inproceedings{gill2023feddebug,
  author = {Waris Gill and Ali Anwar and Muhammad Ali Gulzar},
  title = {{FedDebug: Systematic Debugging for Federated Learning Applications}},
  booktitle = {ICSE},
  year = {2023},
  url = {https://openreview.net/forum?id=cFxXFVi2sg},
}
Figure