Hi,
I am afraid the error comes from the fact that einsum does not support autograd for sparse inputs.
You can open a feature request on github if you want this, but this is most likely going to be quite a bit of work.