BSL: Understanding and Improving Softmax Loss for Recommendation
Authors:
- 13 May 2024
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 816-830
Abstract
Loss functions steer the optimization direction of recommendation models and are critical to model performance, but have received relatively little attention in recent recommendation research. Among various losses, we find Softmax loss (SL) stands out for not only achieving remarkable accuracy but also better robustness and fairness. Nevertheless, the current literature lacks a comprehensive explanation for the efficacy of SL. Toward addressing this research gap, we conduct theoretical analyses on SL and uncover three insights: 1) Optimizing SL is equivalent to performing Distributionally Robust Optimization (DRO) on the negative data, thereby learning against perturbations on the negative distribution and yielding robustness to noisy negatives. 2) Comparing with other loss functions, SL implicitly penalizes the prediction variance, resulting in a smaller gap between predicted values and and thus producing fairer results. Building on these insights, we further propose a novel loss function Bilateral SoftMax Loss (BSL) that extends the advantage of SL to both positive and negative sides. BSL augments SL by applying the same Log-Expectation-Exp structure to positive examples as is used for negatives, making the model robust to the noisy positives as well. Remarkably, BSL is simple and easy-to-implement - requiring just one additional line of code compared to SL. Experiments on four real-world datasets and three representative backbones demonstrate the effectiveness of our proposal. The code is available at https://github.com/junkangwu/BSL.Keywords
All Related Versions
Funding Information
- National Natural Science Foundation of China (9227010114,62302321)
This publication has 43 references indexed in Scilit:
- Decoupled Contrastive Learning2022
- Dual Temperature Helps Contrastive Learning Without Many Negative Samples: Towards Understanding and Simplifying MoCo2022
- A Survey on Accuracy-oriented Neural Recommendation: From Collaborative Filtering to Information-rich RecommendationIEEE Transactions on Knowledge and Data Engineering, 2022
- Item Recommendation from Implicit Feedback2021
- Robust Graph Collaborative Filtering Algorithm Based on Hierarchical Attention2021
- Understanding the Behaviour of Contrastive Loss2021
- Optimizing top-n collaborative filtering via dynamic negative item sampling2013
- Matrix Factorization Techniques for Recommender SystemsComputer, 2009
- Collaborative Filtering for Implicit Feedback Datasets2008
- One-Class Collaborative Filtering2008