Skip to content

Releases: IBM/differential-privacy-library

Diffprivlib 0.4.0

18 Dec 11:45
Compare
Choose a tag to compare

This release of diffprivlib includes a number of changes and additions to the existing codebase. A number of the changes may break existing code. This version of diffprivlib supports Python versions 3.6 to 3.8.

Added

  • Exponential and PermuteAndFlip mechanisms for differentially private selection. The previous (categorical) exponential mechanism has now been renamed ExponentialCategorical.
  • Bingham mechanism to produce a differentially private estimate of the first eigenvector of a covariance matrix.
  • median, quantile and percentile functions.

Changed

Breaking:

  • The mechanisms module has been comprehensively refactored, with all mechanism parameters now being specified at initialisation. For example, where previously the Laplace mechanism would have been instantiated by Laplace().set_epsilon(1).set_sensitivity(1), it is now instantiated by Laplace(epsilon=1, sensitivity=1).
  • The Wishart mechanism has been deprecated and will be removed in version 0.5. The Wishart mechanism is known not to satisfy differential privacy, and is therefore not recommended for use.

Non-breaking:

  • The PCA model's algorithm has been modified, by using eigenvector sampling (through the Bingham mechanism) to estimate a dataset's principal components. Paper: Amin et al, 2019
  • The LinearRegression model now uses objective perturbation to satisfy differential privacy. Paper: Zhang et al, 2012

Diffprivlib 0.3.0

26 Jun 06:19
Compare
Choose a tag to compare

This release of diffprivlib includes a number of new additions, as well as various fixes to existing functionality. Some changes break backward compatibility with previous versions of the library. This version of diffprivlib supports Python 3.5 through 3.8.

The updates are summarised as follows.

Added

  • BudgetAccountant class to keep track of privacy budget spent in a script (and associated notebook).
  • Budget class to allow easy comparison (with <, >, etc) between privacy budgets of the form (epsilon, delta).
  • count_nonzero, sum and nansum functions to calculate a differentially private count and sum on an array or list.
  • GaussianDiscrete mechanism, the discrete analogue to the Gaussian mechanism.
  • clip_to_bounds and clip_to_norm to clip input data to the given bounds/norm; used in tools and models as appropriate.
  • Notebook demonstrating data exploration and visualisation capabilities.

Changed

Breaking:

  • The form/syntax of the bounds parameter passed to tools and models has changed; it is now specified as a tuple of the form (min, max). min and max can be scalars or 1-dimensional arrays.
    Bounds can typically be converted to the new form with new_bounds = ([l for l, _ in bounds], [u for _, u in bounds]).
  • All functions (other than histogram functions) that previously required a range parameter now requires bounds instead (e.g. models.LinearRegression, models.StandardScaler, tools.mean, etc.).

Non-breaking:

  • Diffprivlib now requires scikit-learn version 0.22 or later.
  • Geometric mechanism now has default sensitivity=1.This reflects the typical use of the geometric mechanism on count queries with sensitivity 1.
  • All mechanisms now support zero sensitivity.

Fixed

  • The publicly-exposed class counts in models.GaussianNB now satisfy differential privacy. The class_count_ attribute is therefore noisy, and care must be taken in relying on these values for testing or other purposes.
  • mean, std and var tools, no longer require numpy array inputs, and can take all array-like inputs (e.g. scalars, lists and tuples).
  • Sensitivity calculation when randomising scalar-valued var output.

Diffprivlib 0.2.1

13 May 09:12
Compare
Choose a tag to compare

This release of diffprivlib includes a number of fixes to maintain compatibility with Scikit-learn version 0.23.

Fixed

  • Minor fixes to GaussianNB, StandardScaler and KMeans models to ensure continuing compatibility with sckit-learn versions 0.20.3 through 0.23.

Diffprivlib 0.2.0

06 Jan 10:59
Compare
Choose a tag to compare

This release of diffprivlib includes a number of newly supported models and functions, as well as minor fixes to existing features.

Added

  • Principal components analysis (class models.PCA)
  • Linear regression (class models.LinearRegression)
  • Standard scaler (class models.StandardScaler)
  • Wishart mechanism (class mechanisms.Wishart)
  • Mean, standard deviation and variance with NaN support (functions tools.nanmean, tools.nanstd, tools.nanvar)
  • Version accessibility at diffprivlib.__version__
  • Notebooks covering linear regression and pipelines

Fixed

  • Gaussian naive Bayes (class models.GaussianNB) no longer allows sample_weight to be specified when fitting the model to data (with thanks to Chris Clifton)