Safe-EF: Error Feedback with Safety Constraints for Federated Learning โก
July 5, 2025 ยท View on GitHub
Efficient and Safe Federated Learning!
Federated learning (FL) enables decentralized training across multiple devices while preserving data privacy. However, communication bottlenecks severely hinder its efficiency due to the high-dimensional nature of model updates. While contractive compressors (e.g., Top-) can alleviate this issue, they often degrade performance without proper handling. Safe-EF tackles this challenge by integrating error feedback (EF) with safety constraints, ensuring both efficiency and robustness in federated learning.
Key Idea ๐
- Communication-Efficient Learning: Employs contractive compression (e.g., Top-) to reduce communication costs.
- Error Feedback for Stability: Mitigates the adverse effects of compression to maintain convergence speed and accuracy.
- Safety Constraints: Ensures feasible updates, even in non-smooth convex settings, making it practical for real-world applications.
- Scalability & Robustness: Extends to stochastic settings and large-scale federated learning setups.
Requirements ๐
- Python โข Version 3.10+
- pip โข Python package installer
Installation ๐
Get started with Safe-EF in just a few steps:
Using pip
- Clone the repository:
git clone https://github.com/anon/safe-ef.git cd safe-ef - Create a virtual environment:
python3 -m venv venv source venv/bin/activate - Install dependencies:
pip install -e .
Using Poetry
- Clone the repository:
git clone https://github.com/anon/safe-ef.git cd safe-ef - Install dependencies and create a virtual environment with Poetry:
poetry install - Activate the virtual environment:
poetry shell
Usage ๐ง
Run the training script with:
python train_brax.py --help
This will display all available options and configurations.
Cite
Check out our ICML paper:
@inproceedings{islamovsafe,
title={Safe-EF: Error Feedback for Non-smooth Constrained Optimization},
author={Islamov, Rustem and As, Yarden and Fatkhullin, Ilyas},
booktitle={Forty-second International Conference on Machine Learning}
}