{"id":18800566,"url":"https://github.com/xtra-computing/fedtree","last_synced_at":"2025-05-16T11:04:26.916Z","repository":{"id":38545007,"uuid":"303696125","full_name":"Xtra-Computing/FedTree","owner":"Xtra-Computing","description":"A tree-based federated learning system (MLSys 2023)","archived":false,"fork":false,"pushed_at":"2025-01-20T15:11:19.000Z","size":37356,"stargazers_count":147,"open_issues_count":7,"forks_count":41,"subscribers_count":7,"default_branch":"cyz-grpc","last_synced_at":"2025-05-09T18:33:56.030Z","etag":null,"topics":["distributed","federated-learning","gradient-boosting-decision-trees"],"latest_commit_sha":null,"homepage":"https://fedtree.readthedocs.io/en/latest/index.html","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xtra-Computing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-13T12:29:12.000Z","updated_at":"2025-02-27T09:06:56.000Z","dependencies_parsed_at":"2025-02-14T12:46:38.566Z","dependency_job_id":null,"html_url":"https://github.com/Xtra-Computing/FedTree","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xtra-Computing%2FFedTree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xtra-Computing%2FFedTree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xtra-Computing%2FFedTree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xtra-Computing%2FFedTree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xtra-Computing","download_url":"https://codeload.github.com/Xtra-Computing/FedTree/tar.gz/refs/heads/cyz-grpc","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518384,"owners_count":22084374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["distributed","federated-learning","gradient-boosting-decision-trees"],"created_at":"2024-11-07T22:19:07.971Z","updated_at":"2025-05-16T11:04:26.877Z","avatar_url":"https://github.com/Xtra-Computing.png","language":"C++","readme":"[Documentation](https://fedtree.readthedocs.io/en/latest/index.html)\n\n# Overview\n**FedTree** is a federated learning system for tree-based models. It is designed to be highly **efficient**, **effective**,\nand **secure**. It has the following features currently.\n\n- Federated training of gradient boosting decision trees.\n- Parallel computing on multi-core CPUs and GPUs.\n- Supporting homomorphic encryption, secure aggregation and differential privacy.\n- Supporting classification and regression.\n\nThe overall architecture of FedTree is shown below.\n![FedTree_archi](./docs/source/images/fedtree_archi.png)\n\n# Getting Started\nYou can refer to our primary documentation [here](https://fedtree.readthedocs.io/en/latest/index.html).\n## Prerequisites\n* [CMake](https://cmake.org/) 3.15 or above\n* [GMP](https://gmplib.org/) library\n* [NTL](https://libntl.org/)\n\nYou can follow the following commands to install NTL library.\n\n```\nwget https://libntl.org/ntl-11.4.4.tar.gz\ntar -xvf ntl-11.4.4.tar.gz\ncd ntl-11.4.4/src\n./configure SHARED=on\nmake\nmake check\nsudo make install\n```\n\n\nIf you install the NTL library at another location, please pass the location to the `NTL_PATH` when building the library (e.g., `cmake .. -DNTL_PATH=\"PATH_TO_NTL\"`).\n## Clone and Install submodules\n```\ngit clone https://github.com/Xtra-Computing/FedTree.git\ncd FedTree\ngit submodule init\ngit submodule update\n```\n# Standalone Simulation\n\n## Build on Linux\n\n```bash\n# under the directory of FedTree\nmkdir build \u0026\u0026 cd build \ncmake ..\nmake -j\n```\n\n## Build on MacOS\n\n### Build with Apple Clang\n\nYou need to install ```libomp``` for MacOS.\n```\nbrew install libomp\n```\n\nInstall FedTree:\n```bash\n# under the directory of FedTree\nmkdir build\ncd build\ncmake -DOpenMP_C_FLAGS=\"-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include\" \\\n  -DOpenMP_C_LIB_NAMES=omp \\\n  -DOpenMP_CXX_FLAGS=\"-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include\" \\\n  -DOpenMP_CXX_LIB_NAMES=omp \\\n  -DOpenMP_omp_LIBRARY=/usr/local/opt/libomp/lib/libomp.dylib \\\n  ..\nmake -j\n```\n\n## Run training\n```bash\n# under 'FedTree' directory\n./build/bin/FedTree-train ./examples/vertical_example.conf\n```\n\n\n# Distributed Setting\nFor each machine that participates in FL, it needs to build the library first.\n```bash\nmkdir build \u0026\u0026 cd build\ncmake .. -DDISTRIBUTED=ON\nmake -j\n```\nThen, write your configuration file where you should specify the ip address of the server machine (`ip_address=xxx`). Run `FedTree-distributed-server` in the server machine and run `FedTree-distributed-party` in the party machines. \nHere are two examples for horizontal FedTree and vertical FedTree.\n\n[//]: # (export CPLUS_INCLUDE_PATH=./build/_deps/grpc-src/include/:$CPLUS_INCLUDE_PATH)\n[//]: # (export CPLUS_INCLUDE_PATH=./build/_deps/grpc-src/third_party/protobuf/src/:$CPLUS_INCLUDE_PATH)\n\n## Distributed Horizontal FedTree\n```bash\n# under 'FedTree' directory\n# under server machine\n./build/bin/FedTree-distributed-server ./examples/adult/a9a_horizontal_server.conf\n# under party machine 0\n./build/bin/FedTree-distributed-party ./examples/adult/a9a_horizontal_p0.conf 0\n# under party machine 1\n./build/bin/FedTree-distributed-party ./examples/adult/a9a_horizontal_p1.conf 1\n```\n\n## Distributed Vertical FedTree\n```bash\n# under 'FedTree' directory\n# under server (i.e., the party with label) machine 0\n./build/bin/FedTree-distributed-server ./examples/credit/credit_vertical_p0_withlabel.conf\n# open a new terminal\n./build/bin/FedTree-distributed-party ./examples/credit/credit_vertical_p0_withlabel.conf 0\n# Under party machine 1\n./build/bin/FedTree-distributed-party ./examples/credit/credit_vertical_p1.conf 1\n```\n\n# Other information\nFedTree is built based on [ThunderGBM](https://github.com/Xtra-Computing/thundergbm), which is a fast GBDTs and Radom Forests training system on GPUs.\n\n# Citation\nPlease cite our paper if you use FedTree in your work.\n```\n@misc{fedtree,\n  title = {FedTree: A Fast, Effective, and Secure Tree-based Federated Learning System},\n  author={Li, Qinbin and Cai, Yanzheng and Han, Yuxuan and Yung, Ching Man and Fu, Tianyuan and He, Bingsheng},\n  howpublished = {\\url{https://github.com/Xtra-Computing/FedTree/blob/main/FedTree_draft_paper.pdf}},\n  year={2022}\n}\n```\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtra-computing%2Ffedtree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxtra-computing%2Ffedtree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtra-computing%2Ffedtree/lists"}