Releases: IBM/differential-privacy-library
Diffprivlib 0.4.0
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
andPermuteAndFlip
mechanisms for differentially private selection. The previous (categorical) exponential mechanism has now been renamedExponentialCategorical
.Bingham
mechanism to produce a differentially private estimate of the first eigenvector of a covariance matrix.median
,quantile
andpercentile
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 byLaplace().set_epsilon(1).set_sensitivity(1)
, it is now instantiated byLaplace(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 theBingham
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
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
andnansum
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
andclip_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
andmax
can be scalars or 1-dimensional arrays.
Bounds can typically be converted to the new form withnew_bounds = ([l for l, _ in bounds], [u for _, u in bounds])
. - All functions (other than histogram functions) that previously required a
range
parameter now requiresbounds
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 defaultsensitivity=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. Theclass_count_
attribute is therefore noisy, and care must be taken in relying on these values for testing or other purposes. mean
,std
andvar
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
This release of diffprivlib includes a number of fixes to maintain compatibility with Scikit-learn version 0.23.
Fixed
- Minor fixes to
GaussianNB
,StandardScaler
andKMeans
models to ensure continuing compatibility with sckit-learn versions 0.20.3 through 0.23.
Diffprivlib 0.2.0
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 (functionstools.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 allowssample_weight
to be specified when fitting the model to data (with thanks to Chris Clifton)