Thanks for your response!
No, there is no relation between words and their indices.
The idea behind computing the gradient w.r.t to the input data is to get some sort of an indication of the impact of the data on the model, and so performing a data selection during the training.