When a tensor contains many zeros and relatively few non-zero values, storing every element wastes memory. A sparse tensor stores only the non-zero values, which can substantially reduce memory usage. section 3.3.2
Use sparse tensors with care:
- Pair sparse storage with linear algebra routines that support sparsity; ordinary dense operations may not exploit the representation efficiently. section 3.3.2
- JAX exposes sparse tensors and sparse matrix operations through the experimental jax.experimental.sparse API, whose design may change. section 3.3.2
A mostly empty tensor
A tensor representing sparse data may contain many zero-valued elements and only a small number of non-zero ones. A sparse representation keeps the non-zero values instead of explicitly storing the zeros. section 3.3.2



