Differentiable hierarchical and surrogate gradient search for spiking neural networks