Science Score: 28.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.6%) to scientific vocabulary
Last synced: 11 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: sarus-tech
  • License: apache-2.0
  • Language: C++
  • Default Branch: master
  • Size: 2.26 MB
Statistics
  • Stars: 23
  • Watchers: 4
  • Forks: 9
  • Open Issues: 4
  • Releases: 4
Created almost 5 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

DP-XGBoost-CI Publish-Python-Package PyPI PyPI - Python Version Twitter Follow

What is Sarus DP-XGBoost?

This is a fork of XGBoost that aims at adding differential-privacy to gradient boosted trees.

A detailed explanation of the theory and methods used can be found in: Grislain, Nicolas and Joan Gonzalvez. “DP-XGBoost: Private Machine Learning at Scale.” (2021)..

Quick Start

You can start using dp-xgboost with the following notebook. Other Python examples which build a DP model are given in sarus/python/.

Installing Sarus DP-XGBoost

To install DP-XGBoost simply run: pip install dp-xgboost

Usage

Python examples which build a DP model are given in sarus/python/.

The main parameters involved in DP learning are: - tree_method which must be set to approxDP to use Sarus XGBoost DP tree learning. - dp_epsilon_per_tree: the privacy budget of a single tree. - min_child_weight: the minimum weight needed to construct a leaf, this influences the DP noise. - subsample: the fraction of the dataset randomly sampled to each tree, subsampling improve the privacy. - num_boost_rounds: the number of trees built.

The privacy queries used during training are stored in the model and accessible via booster.save_model().

Privacy consumption

Note that the total privacy consumption of the boosted trees is given by:

$$n \log{ \left( 1 + \gamma(e^{\epsilon} - 1) \right) }$$

Where $n$ is the number of trees, $\gamma$ the subsample fraction (between 0 and 1), and $\epsilon$ is the budget per tree. You can refer to our explaining article in doc/sarus for more details on privacy consumption.

Differential Privacy in the C++ library

DP is added at three levels in the XGBoost C++ shared library (under the src repo): to construct sketches (with a histogram query), for split selection (with an exponential mech), and for leaf values (with a Laplace mechanism). The mechanisms are located in include/xgboost/mechanisms.h.

Relevant classes are in the src/tree/updater_histmaker.cc file and especially the DPHistMaker class which is the DP tree updater called when setting approxDP as tree_method param in XGBoost.

Building for the JVM

To use with Spark, please follow https://xgboost.readthedocs.io/en/latest/jvm/xgboost4jsparktutorial.html.

  • Needed: Java JDK 1.8, Spark 2.12, Maven 3
  • Set the JAVAHOME env variable first: `export JAVAHOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/`
  • In the jvm-packages folder run mvn package install -DskipTests -Dmaven.test.skip=true

This should build the jars xgboost4j and xgboost4j-spark which will then be passed to spark-submit. The sarus/spark folder contains an example of Spark project in Scala with a POM file that should compile and launch Sarus XGBoost with 2 workers.

Developer guide

  1. Get the submodules (s.a. dmlc)

shell git submodule sync git submodule update --init --recursive

  1. (Optional) Install prerequisites (s.a. cmake, g++, libomp
  2. Build

shell mkdir build cd build cmake ..

Owner

  • Name: Sarus Technologies
  • Login: sarus-tech
  • Kind: organization
  • Location: Paris, France

Citation (CITATION)

@inproceedings{Chen:2016:XST:2939672.2939785,
 author = {Chen, Tianqi and Guestrin, Carlos},
 title = {{XGBoost}: A Scalable Tree Boosting System},
 booktitle = {Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining},
 series = {KDD '16},
 year = {2016},
 isbn = {978-1-4503-4232-2},
 location = {San Francisco, California, USA},
 pages = {785--794},
 numpages = {10},
 url = {http://doi.acm.org/10.1145/2939672.2939785},
 doi = {10.1145/2939672.2939785},
 acmid = {2939785},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {large-scale machine learning},
}

GitHub Events

Total
  • Fork event: 1
Last Year
  • Fork event: 1

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 44
  • Total Committers: 3
  • Avg Commits per committer: 14.667
  • Development Distribution Score (DDS): 0.091
Top Committers
Name Email Commits
Nicolas Grislain N****n@g****m 40
Nicolas Grislain ng@s****h 3
Joan Gonzalvez jg@s****h 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 6
  • Total pull requests: 1
  • Average time to close issues: about 8 hours
  • Average time to close pull requests: 1 day
  • Total issue authors: 5
  • Total pull request authors: 1
  • Average comments per issue: 0.5
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • erchiw (2)
  • boudewijndegooijer (1)
  • NDanies (1)
  • z-a-f (1)
  • 1853582 (1)
Pull Request Authors
  • z-a-f (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 148 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 6
  • Total maintainers: 1
pypi.org: dp-xgboost

DP-XGBoost Python Package from Sarus

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 148 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 10.9%
Stargazers count: 13.0%
Average: 15.3%
Downloads: 21.0%
Dependent repos count: 21.5%
Maintainers (1)
Last synced: 11 months ago