Revisiting Recommendation Loss Functions through Contrastive Learning (Technical Report)