Skip to contents

Predict member iff loss < tau; with labels, TPR / FPR / advantage follow.

Usage

morie_kamath_membership_inference(losses, threshold, labels = NULL)

Arguments

losses

Per-example losses.

threshold

Cut-off.

labels

Optional 0/1 membership truth.

Value

List with predictions, member_rate, optionally accuracy.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_kamath_membership_inference(V, V)
#> $predictions
#> [1] 0 0 0 0 0 0 0 0
#> 
#> $n_predicted_members
#> [1] 0
#> 
#> $member_rate
#> [1] 0
#> 
#> $threshold
#> [1] 1 2 3 4 5 6 7 8
#> 
#> $n
#> [1] 8
#> 
#> $estimate
#> [1] 0
#> 
#> $method
#> [1] "Membership inference by loss threshold"
#>