From 457f075d72e86ee2ab414ce5946a34b031c7c533 Mon Sep 17 00:00:00 2001 From: futabato <01futabato10@gmail.com> Date: Fri, 1 Nov 2024 18:25:09 +0900 Subject: [PATCH 1/5] :memo: Add CITATION.cff --- CITATION.cff | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 CITATION.cff diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..d609081 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,11 @@ +cff-version: 1.2.0 +message: "If you use this software, please cite it as below." +title: "FutabatedLearning" +version: "1.0.0" +date-released: "2024-11-01" +authors: + - family-names: "Hashimoto" + given-names: "Shunsuke" +license: "MIT" +repository-code: "https://github.com/futabato/FutabatedLearning" +url: "https://github.com/futabato/FutabatedLearning" From ff525eae21776d0700af679cc199803131afbfc9 Mon Sep 17 00:00:00 2001 From: futabato <01futabato10@gmail.com> Date: Fri, 8 Nov 2024 13:35:28 +0900 Subject: [PATCH 2/5] :memo: Update README.md --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 82df7c7..cc58961 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,62 @@ # FutabatedLearning -This is a Federated Learning Framework for security researcher (not practical). +## プロジェクトの概要 -This implementation was developed by forking from [Federated-Learning (PyTorch)](https://github.com/AshwinRJ/Federated-Learning-PyTorch), a vanilla implementation of the paper "[Communication-Efficient Learning of Deep Networks from Decentralized Data](https://arxiv.org/abs/1602.05629)". +FutabatedLearning は、連合学習(Federated Learning)のアルゴリズム検証を目的としたフレームワークです。 +特に、セキュリティの研究者向けに設計されており、連合学習の実験環境を提供することで、効率的に仮説検証に取り組むことができます。 -## Setup +FutabatedLearning は、連合学習の研究を支援するために、以下の機能を提供します: -### Dev Containers (Recommend) +- マルチホスト環境での連合学習 +- より効率的にデータ分析を実施するための Jupyter Notebook テンプレート +- ビザンチン耐性のある集約手法の実装 +- ビザンチン攻撃手法の実装 -1. Open Command Palette -2. Select `Dev Containers: Reopen in Container` +FutabatedLearning は、研究目的での使用を前提としており、以下の範囲で利用可能です: -### Docker Image Build +- 学術研究やプロトタイプ開発 +- 連合学習アルゴリズムの評価と比較 +- セキュリティ研究における実験的検証 + +本プロダクトは、商用利用や大規模な実運用を目的としていません。 +あくまで研究目的であるため、連合学習の問題設定として一部厳密さを欠いた設計になっています。 + +## ディレクトリ構造 ``` -docker image build -t futabated-learning . +FutabatedLearning/ + ├── data/ # データセットを格納するディレクトリ + ├── notebooks/ # Jupyter Notebook テンプレート + ├── src/ + │ ├── attack/ # 攻撃手法の実装 + │ └── federatedlearning/ # 連合学習の実装 + │ └── server/ + │ └── aggregations/ # 集約手法の実装 + ├── outputs/ # 実験で生成されるデータの出力先 + └── mlruns/ # MLflow のロギングデータ ``` -### Docker Container Run +### 集約手法 + +以下は、現在 FutabatedLearning に実装されている集約手法とその提案論文の一覧です: + +| 集約手法 | 提案論文 | +| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| FedAvg | [Communication-Efficient Learning of Deep Networks from Decentralized Data](https://arxiv.org/abs/1602.05629) | +| Krum | [Machine Learning with Adversaries: Byzantine Tolerant Gradient Descent](https://proceedings.neurips.cc/paper_files/paper/2017/file/f4b9ec30ad9f68f89b29639786cb62ef-Paper.pdf) | + +### 攻撃手法 + +以下は、現在 FutabatedLearning に実装されている攻撃手法とその提案論文の一覧です: + +| 攻撃手法 | 提案論文 | +| ----------------- | --------------------------------------------------------------------------------------------------- | +| Label Flip Attack | [Poisoning Attacks against Support Vector Machines](https://dl.acm.org/doi/10.5555/3042573.3042761) | + +## 環境構築 ``` -docker container run --gpus all --rm -it -p 5000:5000 -e PYTHONPATH=/workspace/src/ -v ${PWD}:/workspace futabated-learning /bin/bash +docker compose build ``` ## Run an experiment From bcb5788ad35d6761111814a368f23af10aab6c00 Mon Sep 17 00:00:00 2001 From: futabato <01futabato10@gmail.com> Date: Fri, 8 Nov 2024 16:28:47 +0900 Subject: [PATCH 3/5] :ambulance: Fix docker image build bug. --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index c73e74e..e9eb770 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,6 +25,7 @@ RUN curl https://bootstrap.pypa.io/get-pip.py | python3.11 RUN pip install --upgrade pip && pip install poetry && \ poetry config virtualenvs.create false && \ poetry lock --no-update && \ + poetry run pip install wheel && \ poetry install --no-root RUN git config --global --add safe.directory /workspace From 6a4bb6cfa42205bfd73e5168e5102ca592cd8d8e Mon Sep 17 00:00:00 2001 From: futabato <01futabato10@gmail.com> Date: Fri, 8 Nov 2024 16:47:33 +0900 Subject: [PATCH 4/5] :memo: Simple fix for a non-critical issue. --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cc58961..2d2aa77 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,11 @@ FutabatedLearning は、研究目的での使用を前提としており、以 本プロダクトは、商用利用や大規模な実運用を目的としていません。 あくまで研究目的であるため、連合学習の問題設定として一部厳密さを欠いた設計になっています。 -## ディレクトリ構造 +## 本プロジェクトの構成 + +本節では、FutabatedLearning が提供する具体的な機能について説明します。 + +### ディレクトリ構造 ``` FutabatedLearning/ From 708efe59d4cf330f1d2eca8f0aabda0318ff2493 Mon Sep 17 00:00:00 2001 From: futabato <01futabato10@gmail.com> Date: Fri, 8 Nov 2024 17:18:31 +0900 Subject: [PATCH 5/5] :fire: Remove compose version info. because version is obsolete. --- compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/compose.yml b/compose.yml index d46d568..b2bed88 100644 --- a/compose.yml +++ b/compose.yml @@ -1,4 +1,3 @@ -version: '3' services: futabated-learning: build: