Hi,
Given the image, scatter will be a better fit.
I answered on your other post (sorry for not seeing it earlier).
The gradient for scatter are fairly simple:

Gradient flow back to the scattered values
Gradients won’t flow back to the indices.