Name | metafed-fl JSON |
Version |
1.0.0
JSON |
| download |
home_page | https://github.com/afrilab/MetaFed-FL |
Summary | Federated Learning for Metaverse Infrastructures with MARL, Privacy, and Sustainability |
upload_time | 2025-08-28 08:53:46 |
maintainer | None |
docs_url | None |
author | Muhammet Anil Yagiz, Zeynep Sude Cengiz, Polat Goktas |
requires_python | >=3.9 |
license | MIT License
Copyright (c) 2025 AFRI Lab
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
federated learning
machine learning
distributed systems
privacy preserving
multi-agent reinforcement learning
carbon aware computing
sustainable ai
metaverse
pytorch
|
VCS |
 |
bugtrack_url |
|
requirements |
torch
torchvision
numpy
pandas
matplotlib
timm
pyyaml
tqdm
scikit-learn
seaborn
plotly
ipywidgets
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# MetaFed-FL: Federated Learning for Metaverse Systems
<div align="center">
<!-- Status and Quality Badges -->




<!-- Project Information Badges -->



<!-- Research and Academic Badges -->



</div>
---
## ๐ฌ Research Overview
**MetaFed** is a cutting-edge federated learning (FL) framework specifically designed for **Metaverse infrastructures**. This research addresses the critical challenges of privacy, performance, and sustainability in distributed AI systems.
**Paper:** *MetaFed: Advancing Privacy, Performance, and Sustainability in Federated Metaverse Systems*
**Authors:** Muhammet Anil Yagiz, Zeynep Sude Cengiz, Polat Goktas (2025)
๐ **[Visit Project Website](https://metafed.vercel.app)** - Interactive demos, tutorials, and detailed documentation
---
## ๐ ๏ธ Installation
### Prerequisites
- **Python 3.9+**
- **PyTorch 2.2.2+**
- **CUDA** (optional, for GPU acceleration)
### Dependencies
```bash
# Core dependencies
pip install torch>=2.2.2 torchvision>=0.17.2
pip install numpy>=1.26.4 pandas>=2.2.2
pip install matplotlib>=3.9.2 timm>=1.0.8
# Development dependencies
pip install -r requirements-dev.txt
```
### Package Installation
```bash
# Install as editable package
pip install -e .
# Or install from PyPI (when available)
pip install metafed-fl
```
---
## ๐ Quick Start
```bash
# Clone the repository
git clone https://github.com/afrilab/MetaFed-FL.git
cd MetaFed-FL
# Install dependencies
pip install -r requirements.txt
# Run MNIST experiment
python -m experiments.mnist.run_experiment
# Run CIFAR-10 experiment
python -m experiments.cifar10.run_experiment
```
---
## ๐ Key Features
๐ค **Multi-Agent Reinforcement Learning (MARL)**
- Dynamic client orchestration and selection
- Adaptive resource allocation
- Intelligent scheduling algorithms
๐ **Privacy-Preserving Techniques**
- Homomorphic encryption for secure aggregation
- Differential privacy for data protection
- Zero-knowledge proof mechanisms
๐ฑ **Carbon-Aware Scheduling**
- Real-time carbon intensity tracking
- Renewable energy-aligned orchestration
- Sustainable resource management
๐ **Comprehensive Benchmarks**
- MNIST with ResNet-18 architecture
- CIFAR-10 with ResNet-18 architecture
- Multiple federated learning algorithms
- Extensive performance metrics
---
## ๐ Performance Metrics
| Dataset | Algorithm | Accuracy Improvement | CO2 Reduction | Efficiency Gain |
|---------|-----------|---------------------|---------------|----------------|
| MNIST | FedAvg+MARL | +15% | -35% | +20% |
| CIFAR-10| FedProx+MARL| +20% | -45% | +25% |
| CIFAR-10| SCAFFOLD+MARL| +18% | -40% | +22% |
*Compared to baseline federated learning algorithms*
---
## ๐ Project Structure
```
MetaFed-FL/
โโโ src/metafed/ # Core package
โ โโโ core/ # FL core components
โ โโโ algorithms/ # FL algorithms
โ โโโ orchestration/ # MARL orchestration
โ โโโ privacy/ # Privacy mechanisms
โ โโโ green/ # Carbon-aware features
โ โโโ utils/ # Utilities
โโโ experiments/ # Experiment runners
โ โโโ mnist/ # MNIST experiments
โ โโโ cifar10/ # CIFAR-10 experiments
โโโ tests/ # Test suite
โโโ docs/ # Documentation
โโโ scripts/ # Utility scripts
```
---
## ๐งช Running Experiments
### Command Line Interface
```bash
# MNIST with FedAvg + MARL
metafed-mnist --algorithm fedavg --orchestrator rl --rounds 100
# CIFAR-10 with privacy preservation
metafed-cifar10 --algorithm fedprox --privacy differential --epsilon 1.0
# Green-aware scheduling
metafed-mnist --green-aware --carbon-tracking
```
### Configuration Files
```bash
# Using YAML configuration
python -m experiments.mnist.run_experiment --config configs/fedavg_privacy.yaml
```
### Jupyter Notebooks (Legacy)
```bash
# For research and exploration
jupyter notebook experiments/notebooks/
```
---
## ๐ง Advanced Configuration
### Algorithm Selection
- **FedAvg**: Standard federated averaging
- **FedProx**: Proximal federated optimization
- **SCAFFOLD**: Stochastic controlled averaging
### Orchestration Methods
- **Random**: Random client selection
- **RL-based**: Multi-agent reinforcement learning
- **Green-aware**: Carbon-optimized selection
### Privacy Settings
- **Homomorphic Encryption**: Secure aggregation
- **Differential Privacy**: ฮต-differential privacy
- **Hybrid**: Combined privacy mechanisms
---
## ๐ค Contributing
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
### Development Setup
```bash
# Clone and setup development environment
git clone https://github.com/afrilab/MetaFed-FL.git
cd MetaFed-FL
pip install -e ".[dev]"
# Run tests
pytest tests/
# Run linting
flake8 src/ tests/
black src/ tests/
```
### Code Style
- **Black** for code formatting
- **Flake8** for linting
- **isort** for import sorting
- **Type hints** for better code documentation
---
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
## ๐ Citation
If you use MetaFed-FL in your research, please cite:
```bibtex
@misc{yagiz2025metafedadvancingprivacyperformance,
title={MetaFed: Advancing Privacy, Performance, and Sustainability in Federated Metaverse Systems},
author={Muhammet Anil Yagiz and Zeynep Sude Cengiz and Polat Goktas},
year={2025},
eprint={2508.17341},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2508.17341}
}
```
---
## ๐ Acknowledgments
- **AFRI Lab** for supporting this research
- **PyTorch Team** for the excellent deep learning framework
- **Federated Learning Community** for inspiration and collaboration
---
<div align="center">
**[๐ Website](https://metafed.vercel.app)**
*Built with โค๏ธ for the Federated Learning Community*
</div>
Raw data
{
"_id": null,
"home_page": "https://github.com/afrilab/MetaFed-FL",
"name": "metafed-fl",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "federated learning, machine learning, distributed systems, privacy preserving, multi-agent reinforcement learning, carbon aware computing, sustainable AI, metaverse, PyTorch",
"author": "Muhammet Anil Yagiz, Zeynep Sude Cengiz, Polat Goktas",
"author_email": "Muhammet Anil Yagiz <anill.yagiz@gmail.com>, Zeynep Sude Cengiz <z.sude.cengiz@gmail.com>, Polat Goktas <polatgoktas@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/23/1d/c641ad9fb69296ff6be687f95b0d962df812ba7fae8d8f1667bca1d4ae50/metafed_fl-1.0.0.tar.gz",
"platform": null,
"description": "# MetaFed-FL: Federated Learning for Metaverse Systems\r\n\r\n<div align=\"center\">\r\n\r\n<!-- Status and Quality Badges -->\r\n\r\n\r\n\r\n\r\n\r\n<!-- Project Information Badges -->\r\n\r\n\r\n\r\n\r\n<!-- Research and Academic Badges -->\r\n\r\n\r\n\r\n\r\n</div>\r\n\r\n---\r\n\r\n## \ud83d\udd2c Research Overview\r\n\r\n**MetaFed** is a cutting-edge federated learning (FL) framework specifically designed for **Metaverse infrastructures**. This research addresses the critical challenges of privacy, performance, and sustainability in distributed AI systems.\r\n\r\n**Paper:** *MetaFed: Advancing Privacy, Performance, and Sustainability in Federated Metaverse Systems* \r\n**Authors:** Muhammet Anil Yagiz, Zeynep Sude Cengiz, Polat Goktas (2025)\r\n\r\n\ud83c\udf10 **[Visit Project Website](https://metafed.vercel.app)** - Interactive demos, tutorials, and detailed documentation\r\n\r\n---\r\n\r\n## \ud83d\udee0\ufe0f Installation\r\n\r\n### Prerequisites\r\n\r\n- **Python 3.9+**\r\n- **PyTorch 2.2.2+**\r\n- **CUDA** (optional, for GPU acceleration)\r\n\r\n### Dependencies\r\n\r\n```bash\r\n# Core dependencies\r\npip install torch>=2.2.2 torchvision>=0.17.2\r\npip install numpy>=1.26.4 pandas>=2.2.2\r\npip install matplotlib>=3.9.2 timm>=1.0.8\r\n\r\n# Development dependencies\r\npip install -r requirements-dev.txt\r\n```\r\n\r\n### Package Installation\r\n\r\n```bash\r\n# Install as editable package\r\npip install -e .\r\n\r\n# Or install from PyPI (when available)\r\npip install metafed-fl\r\n```\r\n\r\n---\r\n\r\n## \ud83d\ude80 Quick Start\r\n\r\n```bash\r\n# Clone the repository\r\ngit clone https://github.com/afrilab/MetaFed-FL.git\r\ncd MetaFed-FL\r\n\r\n# Install dependencies\r\npip install -r requirements.txt\r\n\r\n# Run MNIST experiment\r\npython -m experiments.mnist.run_experiment\r\n\r\n# Run CIFAR-10 experiment\r\npython -m experiments.cifar10.run_experiment\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udcca Key Features\r\n\r\n\ud83e\udd16 **Multi-Agent Reinforcement Learning (MARL)**\r\n- Dynamic client orchestration and selection\r\n- Adaptive resource allocation\r\n- Intelligent scheduling algorithms\r\n\r\n\ud83d\udd12 **Privacy-Preserving Techniques**\r\n- Homomorphic encryption for secure aggregation\r\n- Differential privacy for data protection\r\n- Zero-knowledge proof mechanisms\r\n\r\n\ud83c\udf31 **Carbon-Aware Scheduling**\r\n- Real-time carbon intensity tracking\r\n- Renewable energy-aligned orchestration\r\n- Sustainable resource management\r\n\r\n\ud83d\udcc8 **Comprehensive Benchmarks**\r\n- MNIST with ResNet-18 architecture\r\n- CIFAR-10 with ResNet-18 architecture\r\n- Multiple federated learning algorithms\r\n- Extensive performance metrics\r\n\r\n---\r\n\r\n## \ud83d\udcc8 Performance Metrics\r\n\r\n| Dataset | Algorithm | Accuracy Improvement | CO2 Reduction | Efficiency Gain |\r\n|---------|-----------|---------------------|---------------|----------------|\r\n| MNIST | FedAvg+MARL | +15% | -35% | +20% |\r\n| CIFAR-10| FedProx+MARL| +20% | -45% | +25% |\r\n| CIFAR-10| SCAFFOLD+MARL| +18% | -40% | +22% |\r\n\r\n*Compared to baseline federated learning algorithms*\r\n\r\n---\r\n\r\n## \ud83d\udcc2 Project Structure\r\n\r\n```\r\nMetaFed-FL/\r\n\u251c\u2500\u2500 src/metafed/ # Core package\r\n\u2502 \u251c\u2500\u2500 core/ # FL core components\r\n\u2502 \u251c\u2500\u2500 algorithms/ # FL algorithms\r\n\u2502 \u251c\u2500\u2500 orchestration/ # MARL orchestration\r\n\u2502 \u251c\u2500\u2500 privacy/ # Privacy mechanisms\r\n\u2502 \u251c\u2500\u2500 green/ # Carbon-aware features\r\n\u2502 \u2514\u2500\u2500 utils/ # Utilities\r\n\u251c\u2500\u2500 experiments/ # Experiment runners\r\n\u2502 \u251c\u2500\u2500 mnist/ # MNIST experiments\r\n\u2502 \u2514\u2500\u2500 cifar10/ # CIFAR-10 experiments\r\n\u251c\u2500\u2500 tests/ # Test suite\r\n\u251c\u2500\u2500 docs/ # Documentation\r\n\u2514\u2500\u2500 scripts/ # Utility scripts\r\n```\r\n\r\n---\r\n\r\n## \ud83e\uddea Running Experiments\r\n\r\n### Command Line Interface\r\n\r\n```bash\r\n# MNIST with FedAvg + MARL\r\nmetafed-mnist --algorithm fedavg --orchestrator rl --rounds 100\r\n\r\n# CIFAR-10 with privacy preservation\r\nmetafed-cifar10 --algorithm fedprox --privacy differential --epsilon 1.0\r\n\r\n# Green-aware scheduling\r\nmetafed-mnist --green-aware --carbon-tracking\r\n```\r\n\r\n### Configuration Files\r\n\r\n```bash\r\n# Using YAML configuration\r\npython -m experiments.mnist.run_experiment --config configs/fedavg_privacy.yaml\r\n```\r\n\r\n### Jupyter Notebooks (Legacy)\r\n\r\n```bash\r\n# For research and exploration\r\njupyter notebook experiments/notebooks/\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udd27 Advanced Configuration\r\n\r\n### Algorithm Selection\r\n\r\n- **FedAvg**: Standard federated averaging\r\n- **FedProx**: Proximal federated optimization\r\n- **SCAFFOLD**: Stochastic controlled averaging\r\n\r\n### Orchestration Methods\r\n\r\n- **Random**: Random client selection\r\n- **RL-based**: Multi-agent reinforcement learning\r\n- **Green-aware**: Carbon-optimized selection\r\n\r\n### Privacy Settings\r\n\r\n- **Homomorphic Encryption**: Secure aggregation\r\n- **Differential Privacy**: \u03b5-differential privacy\r\n- **Hybrid**: Combined privacy mechanisms\r\n\r\n---\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\r\n\r\n### Development Setup\r\n\r\n```bash\r\n# Clone and setup development environment\r\ngit clone https://github.com/afrilab/MetaFed-FL.git\r\ncd MetaFed-FL\r\npip install -e \".[dev]\"\r\n\r\n# Run tests\r\npytest tests/\r\n\r\n# Run linting\r\nflake8 src/ tests/\r\nblack src/ tests/\r\n```\r\n\r\n### Code Style\r\n\r\n- **Black** for code formatting\r\n- **Flake8** for linting\r\n- **isort** for import sorting\r\n- **Type hints** for better code documentation\r\n\r\n---\r\n\r\n## \ud83d\udcc4 License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n---\r\n\r\n## \ud83d\udcdd Citation\r\n\r\nIf you use MetaFed-FL in your research, please cite:\r\n\r\n```bibtex\r\n@misc{yagiz2025metafedadvancingprivacyperformance,\r\n title={MetaFed: Advancing Privacy, Performance, and Sustainability in Federated Metaverse Systems},\r\n author={Muhammet Anil Yagiz and Zeynep Sude Cengiz and Polat Goktas},\r\n year={2025},\r\n eprint={2508.17341},\r\n archivePrefix={arXiv},\r\n primaryClass={cs.LG},\r\n url={https://arxiv.org/abs/2508.17341}\r\n}\r\n```\r\n\r\n---\r\n\r\n## \ud83c\udf1f Acknowledgments\r\n\r\n- **AFRI Lab** for supporting this research\r\n- **PyTorch Team** for the excellent deep learning framework\r\n- **Federated Learning Community** for inspiration and collaboration\r\n\r\n---\r\n\r\n<div align=\"center\">\r\n\r\n**[\ud83c\udf10 Website](https://metafed.vercel.app)**\r\n\r\n*Built with \u2764\ufe0f for the Federated Learning Community*\r\n\r\n</div>\r\n",
"bugtrack_url": null,
"license": "MIT License\r\n \r\n Copyright (c) 2025 AFRI Lab\r\n \r\n Permission is hereby granted, free of charge, to any person obtaining a copy\r\n of this software and associated documentation files (the \"Software\"), to deal\r\n in the Software without restriction, including without limitation the rights\r\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n copies of the Software, and to permit persons to whom the Software is\r\n furnished to do so, subject to the following conditions:\r\n \r\n The above copyright notice and this permission notice shall be included in all\r\n copies or substantial portions of the Software.\r\n \r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n SOFTWARE.\r\n ",
"summary": "Federated Learning for Metaverse Infrastructures with MARL, Privacy, and Sustainability",
"version": "1.0.0",
"project_urls": {
"Bug Tracker": "https://github.com/afrilab/MetaFed-FL/issues",
"Documentation": "https://github.com/afrilab/MetaFed-FL#readme",
"Homepage": "https://github.com/afrilab/MetaFed-FL",
"Repository": "https://github.com/afrilab/MetaFed-FL"
},
"split_keywords": [
"federated learning",
" machine learning",
" distributed systems",
" privacy preserving",
" multi-agent reinforcement learning",
" carbon aware computing",
" sustainable ai",
" metaverse",
" pytorch"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "64ef2ec98fd354408a05c67851819aa9810ce69db65d347da5fbfef7825ca057",
"md5": "671eefeeae4b06dde2db86ffdd20301c",
"sha256": "b7b936fcb424ff065531e40ef8561973a2ebefaef40570fe7a0367cdaa94f401"
},
"downloads": -1,
"filename": "metafed_fl-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "671eefeeae4b06dde2db86ffdd20301c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 47057,
"upload_time": "2025-08-28T08:53:44",
"upload_time_iso_8601": "2025-08-28T08:53:44.138614Z",
"url": "https://files.pythonhosted.org/packages/64/ef/2ec98fd354408a05c67851819aa9810ce69db65d347da5fbfef7825ca057/metafed_fl-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "231dc641ad9fb69296ff6be687f95b0d962df812ba7fae8d8f1667bca1d4ae50",
"md5": "0d69af46c2f1794df3c1a4bd24631cb6",
"sha256": "ff37b92fdc8f9a4a0682b10bf54e1d826203d2c924f0af916a363bce07a6114e"
},
"downloads": -1,
"filename": "metafed_fl-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "0d69af46c2f1794df3c1a4bd24631cb6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 55390,
"upload_time": "2025-08-28T08:53:46",
"upload_time_iso_8601": "2025-08-28T08:53:46.062149Z",
"url": "https://files.pythonhosted.org/packages/23/1d/c641ad9fb69296ff6be687f95b0d962df812ba7fae8d8f1667bca1d4ae50/metafed_fl-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-28 08:53:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "afrilab",
"github_project": "MetaFed-FL",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "torch",
"specs": [
[
"==",
"2.2.2"
]
]
},
{
"name": "torchvision",
"specs": [
[
"==",
"0.17.2"
]
]
},
{
"name": "numpy",
"specs": [
[
"==",
"1.26.4"
]
]
},
{
"name": "pandas",
"specs": [
[
"==",
"2.2.2"
]
]
},
{
"name": "matplotlib",
"specs": [
[
"==",
"3.9.2"
]
]
},
{
"name": "timm",
"specs": [
[
"==",
"1.0.8"
]
]
},
{
"name": "pyyaml",
"specs": [
[
">=",
"6.0"
]
]
},
{
"name": "tqdm",
"specs": [
[
">=",
"4.64.0"
]
]
},
{
"name": "scikit-learn",
"specs": [
[
">=",
"1.1.0"
]
]
},
{
"name": "seaborn",
"specs": [
[
">=",
"0.11.0"
]
]
},
{
"name": "plotly",
"specs": [
[
">=",
"5.10.0"
]
]
},
{
"name": "ipywidgets",
"specs": [
[
">=",
"8.0.0"
]
]
}
],
"lcname": "metafed-fl"
}