jax_privacy.matrix_factorization.sensitivity.get_sensitivity_banded_for_X

jax_privacy.matrix_factorization.sensitivity.get_sensitivity_banded_for_X(X, min_sep=1, max_participations=None)[source]

Computes the sensitivity of an X.

This method requires (and checks) that the number of bands is less than or equal to min_sep + 1.

Note: The C from which x is derived being lower-triangular with at most min_sep non-zero bands including the main diagonal is a sufficient but not necessary condition for this calculation to hold. All that is necessary is that for two columns i and j with \(|i - j| >\) min_sep are orthogonal, np.dot(h[:, i], h[:, j]) == 0.

Parameters:
  • X (Array) – The Gram matrix of the encoder matrix, C.T @ C, which must be min_sep-banded (see README.md).

  • min_sep (int) – Minimum separation between the participations of the same user. For example, min_sep = 1 means the same user could participate on two consecutive rounds.

  • max_participations (Optional[int]) – Optional, the maximum number of participations. If None, then max_participations is determined from n.shape[0] and min_sep.

Return type:

float

Returns:

The L2 sensitivity of C satisfying C^T C = X.