Since multi differentiation is not yet in stable, maybe the response is simply that something is not implemented yet.
Otherwise, why is the last line raising the error in comment?
from torch import nn, Tensor
from torch.autograd import Variable, grad

criterion = nn.MSELoss()

x = Variable(Tensor(5).normal_(), requires_grad = True)
y = Variable(Tensor(5).normal_())

l1 = (x - y).pow(2).sum().div(y.numel())
a = grad(l1, x, create_graph = True)
b = grad(a[0][3], x)

l2 = criterion(x, y)
a = grad(l2, x, create_graph = True)
b = grad(a[0][3], x) # "RuntimeError: differentiated input is unreachable"