jax_privacy.matrix_factorization.toeplitz

Library for working with general Toeplitz matrices.

In particular, lower-triangular Toeplitz matrices used in DP matrix factorization algorithms. Generally, these functions operate directly in terms of the n Toeplitz coefficients, and hence can be much more efficient than doing the calculations on the materialized n**2 matrices.

Functions

banded_inverse_square_root_noising_coefs(...)

Returns Toeplitz noising coefficients for the BISR factorization.

compute_banded_inverse_sensitivity_squared(n, ...)

Returns squared sensitivity for a banded inverse Toeplitz noising matrix.

inverse_as_streaming_matrix(coef[, ...])

Create $C^{-1}$ as a StreamingMatrix object.

inverse_coef(coef[, n])

Finds the inverse coefficients of a lower-triangularToeplitz matrix.

loss(strategy_coef[, n, reduction_fn])

Error of C on prefix workload under single participation.

materialize_lower_triangular(coef[, n])

Creates a lower-triangular Toeplitz matrix.

minsep_sensitivity_squared(strategy_coef, ...)

Returns the sensitivity of the Toeplitz matrix.

multiply(lhs_coef, rhs_coef[, n])

Computes the matrix product of two lower-triangular Toeplitz matrices.

optimal_max_error_noising_coefs(n)

Returns the coefs of the optimal Toeplitz noise matrix for max error.

optimal_max_error_strategy_coefs(n)

Returns the coefs of the optimal Toeplitz strategy matrix C for max error.

optimize_banded_inverse_toeplitz(n, min_sep, ...)

Optimize over banded inverse Toeplitz noising matrices for BandInvMF.

optimize_banded_toeplitz(n, bands[, ...])

Optimize over the space of banded Toeplitz strategies on a Prefix workload.

optimize_coefs_for_amplifications(n, *, ...)

Select num_bands (and coefs) to minimize loss subject to a privacy target.

pad_coefs_to_n(coef[, n])

Materializes length-n Toeplitz coefficients.

per_query_error(*[, strategy_coef, ...])

Expected per-query squared error for a (banded) Toeplitz mechanism.

sensitivity_squared(coef[, n])

Sensitivity^2 under single participation.

solve_banded(coef, rhs)

Solve the linear system T_{coef} x = rhs for x for Toeplitz matrix T.