Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sketching operator scaling in preconditioner generation #62

Open
rileyjmurray opened this issue Dec 17, 2023 · 0 comments
Open

Sketching operator scaling in preconditioner generation #62

rileyjmurray opened this issue Dec 17, 2023 · 0 comments

Comments

@rileyjmurray
Copy link
Contributor

Here's our function for preconditioner generation for tall matrices:

RandBLAS::RNGState<RNG> rpc_data_svd_saso(
Layout layout,
int64_t m, // number of rows in A
int64_t n, // number of columns in A
int64_t d, // number of rows in sketch of A
int64_t k, // number of nonzeros in each column of the sketching operator
T *A, // buffer of size at least m*n.
int64_t lda, // leading dimension for mat(A).
T *V_sk, // buffer of size at least d*n.
T *sigma_sk, //buffer of size at least n.
RandBLAS::RNGState<RNG> state
) {
RandBLAS::SparseDist D{
.n_rows = d,
.n_cols = m,
.vec_nnz = k
};
RandBLAS::SparseSkOp<T> S(D, state);
auto next_state = RandBLAS::fill_sparse(S);
rpc_data_svd(layout, m, n, A, lda, S, V_sk, sigma_sk);
return next_state;
}
.

The sparse sketching operator it constructs has nonzero entries in $\{+1,-1\}$. When we end up using that sketching operator we apply it with coefficient 1.0. That means the preconditioner we construct will only make the preconditioned data matrix have columns that are nearly orthogonal to one another, rather than nearly orthonormal. This is problematic regularized problems where the preconditioner needs to be updated with consideration to the value of the regularization parameter. To fix this we need to scale the nonzeros in the sketching operator to be $\pm 1/\sqrt{d}$ or we need to apply $S$ with $\alpha = 1/\sqrt{d}$.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant