opendp / smartnoise-core

Differential privacy validator and runtime
MIT License
290 stars 33 forks source link

Simple postprocess multiple regression/classification #274

Open Shoeboxam opened 4 years ago

Shoeboxam commented 4 years ago

There are multiple potential implementations. Here is how a covariance implementation could look. We need the additional components Inverse and Matmul.

Component: Inverse

Arguments

Component: Matmul

Arguments

Then the top-level component that expands:

Component: DPLinearRegression

Arguments

The expansion for the 'covariance' implementation could be:

parameters = Matmul(Inverse(DPCovariance(predictors)), DPCovariance(predictors, target))
intercept = DPMean(target) - Matmul(DPMean(predictors), parameters)
ColumnBind(intercept, parameters)

DPCovariance already covers cross-covariance as a special case. We can propagate nulls up from the inverse. To make this quick to implement, we could only allow public data and aggressively drop properties.