Sparse query masks