jax_privacy.matrix_factorization.toeplitz.inverse_as_streaming_matrix

jax_privacy.matrix_factorization.toeplitz.inverse_as_streaming_matrix#

jax_privacy.matrix_factorization.toeplitz.inverse_as_streaming_matrix(coef, column_normalize_for_n=None)[source]#

Create \(C^{-1}\) as a StreamingMatrix object.

If column_normalize_for_n is None, the returned object represents \(C^{-1}\), the inverse of an arbitrarily large banded Toeplitz matrix \(C\) with coefficients coef.

If column_normalize_for_n is finite, the returned object represents \(C^{-1}\), the inverse of a banded matrix \(C\) of the given size \(n \times n\), formed by taking the banded Toeplitz matrix with coefficients coef and re-scaling each column so it has \(L_2\) norm 1.0. We recommend setting column_normalize_for_n in centralized training scenarios where n is known in advance.

Formal Guarantees:
  • The maximum \(L_2\) norm of the strategy matrix \(C\) is \(\|\text{coef}\|_2\) if column_normalize_for_n is None, and 1.0 if it is not None.

  • The strategy matrix \(C\) corresponding to the returned noising matrix \(C^{-1}\) is \(b\)-banded, where \(b = \text{coef.size}\).

This implementation is based on Algorithm 9 from Choquette-Choo et al. (2023)

Parameters:
  • coef (Array) – The Toeplitz coefficients of the strategy.

  • column_normalize_for_n (int | None) – If given, the returned object represents the inverse of a column-normalized banded Toeplitz matrix of the given size. Otherwise, it represents the inverse of an ordinary banded Toeplitz matrix. If not None, the supplied coef must have an \(L_2\) norm of 1.0 (otherwise, column normalization could change the sensitivity of the implied \(C\) matrix).

Return type:

StreamingMatrix

Returns:

A StreamingMatrix object representing \(C^{-1}\).