Federated Fine-Tuning of Vision Foundation Models via Probabilistic Masking

Vasileios Tsouvalas, Yuki M Asano, Aaqib SaeedFM-Wild @ ICML 2024

TL;DR

This paper introduces DeltaMask, a novel method for efficiently fine-tuning large Vision Foundation Models (FMs) in a Federated Learning (FL) setting. DeltaMask achieves ultra-low communication bitrates (below 1 bit-per-parameter) by using probabilistic filters to compress mask updates, enabling powerful FMs to be adapted on resource-constrained edge devices without sacrificing performance.

What Problem Does This Paper Address?

Federated Learning (FL) allows training machine learning models on decentralized data while preserving user privacy. However, applying this to massive Vision Foundation Models (FMs) like those based on Vision Transformers (ViTs) presents a significant challenge: the sheer size of these models leads to enormous communication overhead during the update process. This makes FL impractical for edge devices with limited bandwidth and energy. Existing methods for reducing communication often involve gradient compression or identifying sparse subnetworks, but they struggle to efficiently handle the scale of FMs in a federated context. This paper aims to bridge this gap by enabling efficient fine-tuning of FMs in FL with drastically reduced communication costs.

Methods

DeltaMask tackles the communication bottleneck by focusing on efficiently updating masks that select parts of the pre-trained FM, rather than the entire model weights. Here's a breakdown of their approach:

  • Stochastic Mask Training: Instead of directly learning binary masks (which can be hard to optimize in FL), DeltaMask learns probability masks ($\theta$). Clients then sample binary masks ($m$) from these probability distributions. This stochasticity, combined with Bayesian aggregation on the server, helps refine the global mask.
  • Probabilistic Filters for Compression: The core innovation is how DeltaMask compresses these mask updates. Instead of sending the full mask or its changes, clients use probabilistic filters (specifically, Binary Fuse filters or BFuse) to create a compact "fingerprint" of the mask updates. This fingerprint is then encoded into a grayscale image for transmission. This approach is significantly more efficient than traditional methods.
  • Bayesian Aggregation: The server aggregates the compressed mask updates from clients using a Bayesian approach, treating the global mask probabilities as Beta distributions. This allows for robust aggregation even with noisy or incomplete updates.
  • Low Bitrate Focus: The entire pipeline is designed to operate at extremely low bitrates, aiming for less than 1 bit-per-parameter (bpp). This is achieved by leveraging the sparsity of mask updates and the efficiency of probabilistic filters.

Datasets

The paper evaluates DeltaMask on a variety of image classification datasets, including:

  • CIFAR-10
  • CIFAR-100
  • SVHN
  • EMNIST
  • Fashion-MNIST
  • EuroSAT
  • Food-101
  • Cars196
  • Tiny-ImageNet

These datasets cover a range of complexities and are used to test DeltaMask's performance across different scenarios, including both IID (Independent and Identically Distributed) and non-IID data distributions.

Key Insights and Ideas

  • Masks, Not Weights, for FL Efficiency: The paper demonstrates that efficiently updating masks that select subnetworks within FMs is a more communication-friendly approach for FL than traditional weight updates or even gradient compression.
  • Probabilistic Filters as a Game-Changer: The use of probabilistic filters (like BFuse) to compress mask updates into compact grayscale images is a key enabler for achieving ultra-low bitrates, significantly outperforming previous compression techniques in this context.
  • Sparsity is Your Friend: DeltaMask leverages the inherent sparsity in mask updates over federated rounds. As training progresses, fewer mask elements need to change, making the compressed updates even smaller.
  • Balancing Accuracy and Bitrate: DeltaMask shows that it's possible to achieve performance comparable to full fine-tuning while drastically reducing communication costs, making FMs accessible for edge devices.
  • Adaptability Across Architectures: The method proves effective across various Vision Transformer (ViT) architectures and even a convolutional architecture, highlighting its general applicability.

Key Results

  • Ultra-Low Bitrates: DeltaMask consistently achieves bitrates as low as 0.09 bpp, significantly lower than many existing methods. For instance, it achieves up to a 9x reduction in bpp compared to FedPM while maintaining similar accuracy.
  • Competitive Accuracy: Despite the extreme bitrate reduction, DeltaMask maintains performance comparable to traditional fine-tuning and often outperforms other communication-efficient FL methods. On CIFAR-100, it achieves accuracy close to fine-tuning with a bitrate of 0.207 bpp.
  • Efficiency on Edge Devices: Benchmarking on devices like Raspberry Pi 4 and Jetson Nano shows that DeltaMask's probabilistic filter compression is computationally efficient and has low energy requirements, making it suitable for real-world edge deployments.
  • Robustness to Non-IID Data: The method shows strong performance even with non-IID data distributions and partial client participation, which are common in real-world FL scenarios.

Limitations and Future Work

  • Privacy Implications: While the paper notes that probabilistic filters offer a "local differential privacy safeguard" due to their hashing operations and false positive rates, it acknowledges that absolute privacy guarantees are not the primary objective. Further exploration of privacy benefits is suggested.
  • Classifier Initialization: The paper investigates different classifier head initializations, finding that a single fine-tuning round of the classifier layer is effective and has minimal impact on bitrate. However, the optimal strategy might depend on specific downstream tasks.
  • Generalization to Other Tasks: The current evaluation focuses on image classification. Extending DeltaMask to other downstream tasks (e.g., object detection, segmentation) would be a valuable future direction.
  • Scalability to Billions of Parameters: While the paper addresses large FMs, extending the method to models with billions of parameters could present new challenges and opportunities.

Summary updated

BibTeX
@inproceedings{tsouvalas2024federated,
  author = {Vasileios Tsouvalas and Yuki M Asano and Aaqib Saeed},
  title = {{Federated Fine-Tuning of Vision Foundation Models via Probabilistic Masking}},
  booktitle = {FM-Wild @ ICML},
  year = {2024},
  url = {https://openreview.net/forum?id=VDgx8JLtid},
}
Figure