Federated Black-Box Adaptation for Semantic Segmentation

Jay N. Paranjape, Shameema Sikder, S. Swaroop Vedula, Vishal M. Patel

Abstract

Federated Learning (FL) is a form of distributed learning that allows multiple institutions or clients to collaboratively learn a global model to solve a task. This allows the model to utilize the information from every institute while preserving data privacy. However, recent studies show that the promise of protecting the privacy of data is not upheld by existing methods and that it is possible to recreate the training data from the different institutions. This is done by utilizing gradients transferred between the clients and the global server during training or by knowing the model architecture at the client end. In this paper, we propose a federated learning framework for semantic segmentation without knowing the model architecture nor transferring gradients between the client and the server, thus enabling better privacy preservation. We propose BlackFed - a black-box adaptation of neural networks that utilizes zero order optimization (ZOO) to update the client model weights and first order optimization (FOO) to update the server weights. We evaluate our approach on several computer vision and medical imaging datasets to demonstrate its effectiveness. To the best of our knowledge, this work is one of the first works in employing federated learning for segmentation, devoid of gradients or model information exchange. Code: https://github.com/JayParanjape/blackfed/tree/master

Introduction

Federated Learning (FL) was initially conceived as a privacy-preserving paradigm for training AI models: data remains local, and only model updates are shared. However, recent research has exposed significant vulnerabilities in "white-box" FL, where gradients or weights are exchanged. Attackers can employ gradient inversion techniques to reconstruct sensitive training images from these updates, posing a severe risk in fields like medical imaging where patient privacy is paramount.

Furthermore, traditional FL often mandates a uniform model architecture across all participants. This requirement is frequently impractical in real-world heterogeneous environments where different institutions may have varying hardware capabilities or proprietary model preferences. There is a clear need for a framework that preserves privacy against reconstruction attacks while accommodating architectural diversity.

Methodology

The proposed framework, BlackFed, addresses these challenges by treating the client-side model as a total black box. It eliminates the need for sharing gradients or model architectures between the client and the server.

Comparison of Federated Learning frameworks: Traditional FL, Vanilla Split-NN, and the proposed BlackFed.

BlackFed relies on three core strategies:

  1. Split Neural Networks (Split-NN): The model is partitioned into a client-side "front end" and a server-side "back end." Only intermediate feature embeddings are transmitted to the server.
  2. Hybrid Optimization (ZOO + FOO):
    • Server Side: Employs standard First-Order Optimization (FOO) (e.g., Adam-W) since the server has full knowledge of its own architecture.
  3. Client Side: Utilizes Zero-Order Optimization (ZOO), specifically the SPSA-GC algorithm. Instead of backpropagating gradients, it perturbs client weights and estimates gradient directions based on changes in the final loss. This ensures no gradients are ever transmitted back to the client.
  4. BlackFed v2 (Hashmap Checkpointing): To mitigate "catastrophic forgetting" during sequential training across multiple clients, the server maintains client-specific checkpoints in a hashmap. During inference, the server loads the optimal weights corresponding to a specific client's data distribution.

Experimental Setup

The effectiveness of BlackFed was evaluated across four diverse semantic segmentation tasks encompassing both natural and medical imagery:

  • Natural Images:
    • Cityscapes: Featuring 18 different cities as individual clients.
  • CAMVID: Comprising 4 clients from distinct data sources.
  • Medical Imaging:
    • ISIC: Skin lesion segmentation with 3 clients representing different years/centers.
  • Polypgen: Colon polyp segmentation across 6 hospital-based clients.

Results and Analysis

BlackFed v2 demonstrates performance competitive with traditional "white-box" methods and even centralized training, while offering superior privacy and efficiency.

  • Generalization: BlackFed v2 significantly improved performance on Out-of-Distribution (OOD) data. For instance, on the CAMVID dataset, the average OOD mean Intersection over Union (mIoU) increased from 0.46 (individual training) to 0.72.
  • Privacy through Ignorance: By keeping the client architecture unknown to the server, BlackFed renders many common gradient-based and model-based data reconstruction attacks mathematically impossible.
  • Computational Efficiency: BlackFed drastically reduces the client-side computational load. For a DeepLabv3 architecture, client-side GFLOPS dropped from 353.6 to 26.6, making it highly suitable for resource-constrained devices like mobile phones or older workstations.
  • Optimization Dynamics: The authors observed that alternating optimization—updating the client via ZOO before the server via FOO—is crucial for training stability.

Conclusion

BlackFed represents a significant step toward truly private federated learning for complex tasks like semantic segmentation. By combining Split-NN with hybrid ZOO/FOO optimization, it bridges the gap between black-box privacy and high-performance learning.

Future work will address potential information leakage through shared segmentation masks and explore more advanced client selection policies to further enhance convergence speed. While ZOO is effective for the network's front end, scaling it to larger client-side models remains an ongoing research challenge.

Summary updated

Abstract

Federated Learning (FL) is a form of distributed learning that allows multiple institutions or clients to collaboratively learn a global model to solve a task. This allows the model to utilize the information from every institute while preserving data privacy. However, recent studies show that the promise of protecting the privacy of data is not upheld by existing methods and that it is possible to recreate the training data from the different institutions. This is done by utilizing gradients transferred between the clients and the global server during training or by knowing the model architecture at the client end. In this paper, we propose a federated learning framework for semantic segmentation without knowing the model architecture nor transferring gradients between the client and the server, thus enabling better privacy preservation. We propose BlackFed - a black-box adaptation of neural networks that utilizes zero order optimization (ZOO) to update the client model weights and first order optimization (FOO) to update the server weights. We evaluate our approach on several computer vision and medical imaging datasets to demonstrate its effectiveness. To the best of our knowledge, this work is one of the first works in employing federated learning for segmentation, devoid of gradients or model information exchange. Code: https://github.com/JayParanjape/blackfed/tree/master
BibTeX
@inproceedings{paranjape2024federated,
  author = {Jay N. Paranjape and Shameema Sikder and S. Swaroop Vedula and Vishal M. Patel},
  title = {{Federated Black-Box Adaptation for Semantic Segmentation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=Fp3JVz5XE7},
}
Figure