Hi,
Sure!
The backward of expand is defined here 33 where sum_to() is a nice wrapper that will call sum with a list of dimensions to reduce.
On the other hand, the backward of repeat in this same file is repeat_backward() which is defined here 30 (most likely was implemented before we added support for multiple dim to sum).