Multilayer Sparse Matrix Factorization