# Incorporating Bias-aware Margins into Contrastive Loss for Collaborative Filtering

arXiv: https://arxiv.org/abs/2210.11054 · HTML: https://mlsanity.com/paper/2210.11054/

## Key facts

- Cited by 29 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 20 Oct 2022.

## Built on by (most cited first, 29 of 29)

- [HalluciDoctor: Mitigating Hallucinatory Toxicity in Visual Instruction Data](https://mlsanity.com/paper/2311.13614/) (2023)
- [On Generative Agents in Recommendation](https://mlsanity.com/paper/2310.10108/) (2023)
- [Generate What You Prefer: Reshaping Sequential Recommendation via Guided Diffusion](https://mlsanity.com/paper/2310.20453/) (2023)
- [On Softmax Direct Preference Optimization for Recommendation](https://mlsanity.com/paper/2406.09215/) (2024)
- [GIF: A General Graph Unlearning Strategy via Influence Function](https://mlsanity.com/paper/2304.02835/) (2023)
- [Enhance Image Classification via Inter-Class Image Mixup with Diffusion Model](https://mlsanity.com/paper/2403.19600/) (2024)
- [AgentRecBench: Benchmarking LLM Agent-based Personalized Recommender Systems](https://mlsanity.com/paper/2505.19623/) (2025)
- [Language Representations Can be What Recommenders Need: Findings and Potentials](https://mlsanity.com/paper/2407.05441/) (2024)
- [Robust Collaborative Filtering to Popularity Distribution Shift](https://mlsanity.com/paper/2310.10696/) (2023)
- [Neighborhood-Enhanced Supervised Contrastive Learning for Collaborative Filtering](https://mlsanity.com/paper/2402.11523/) (2024)
- [Toward a Better Understanding of Loss Functions for Collaborative Filtering](https://mlsanity.com/paper/2308.06091/) (2023)
- [Doubly Calibrated Estimator for Recommendation on Data Missing Not At Random](https://mlsanity.com/paper/2403.00817/) (2024)
- [uCTRL: Unbiased Contrastive Representation Learning via Alignment and Uniformity for Collaborative Filtering](https://mlsanity.com/paper/2305.12768/) (2023)
- [BSL: Understanding and Improving Softmax Loss for Recommendation](https://mlsanity.com/paper/2312.12882/) (2023)
- [Theoretical and Empirical Insights into the Origins of Degree Bias in Graph Neural Networks](https://mlsanity.com/paper/2404.03139/) (2024)
- [LightGNN: Simple Graph Neural Network for Recommendation](https://mlsanity.com/paper/2501.03228/) (2025)
- [Understanding Contrastive Learning Through the Lens of Margins](https://mlsanity.com/paper/2306.11526/) (2023)
- [Fairness Through Domain Awareness: Mitigating Popularity Bias For Music Discovery](https://mlsanity.com/paper/2308.14601/) (2023)
- [Algorithmic Fairness: A Tolerance Perspective](https://mlsanity.com/paper/2405.09543/) (2024)
- [TIME: Temporal-Sensitive Multi-Dimensional Instruction Tuning and Robust Benchmarking for Video-LLMs](https://mlsanity.com/paper/2503.09994/) (2025)
- [Advancing Loss Functions in Recommender Systems: A Comparative Study with a R'enyi Divergence-Based Solution](https://mlsanity.com/paper/2506.15120/) (2025)
- [Warmer for Less: A Cost-Efficient Strategy for Cold-Start Recommendations at Pinterest](https://mlsanity.com/paper/2512.17277/) (2025)
- [Learning Time-Series Representations by Hierarchical Uniformity-Tolerance Latent Balancing](https://mlsanity.com/paper/2510.01658/) (2025)
- [Multi-Margin Cosine Loss: Proposal and Application in Recommender Systems](https://mlsanity.com/paper/2405.04614/) (2024)
- [Pre-training for Recommendation Unlearning](https://mlsanity.com/paper/2505.22649/) (2025)
- [Low-pass Personalized Subgraph Federated Recommendation](https://mlsanity.com/paper/2603.20338/) (2026)
- [Multi-View Hierarchical Representation Learning of Fetal Hemodynamics for Maternal Hypertension Detection at the Edge](https://mlsanity.com/paper/2605.00872/) (2026)
- [Debiasing Message Passing to Mitigate Popularity Bias in GNN-based Collaborative Filtering](https://mlsanity.com/paper/2605.11145/) (2026)
- [The Pitfall of Scaling Up: Uncovering and Mitigating Popularity Bias Amplification in Scaling Transformer-based Recommenders](https://mlsanity.com/paper/2606.21911/) (2026)

## Abstract (arXiv)

Collaborative filtering (CF) models easily suffer from popularity bias, which makes recommendation deviate from users' actual preferences. However, most current debiasing strategies are prone to playing a trade-off game between head and tail performance, thus inevitably degrading the overall recommendation accuracy. To reduce the negative impact of popularity bias on CF models, we incorporate Bias-aware margins into Contrastive loss and propose a simple yet effective BC Loss, where the margin tailors quantitatively to the bias degree of each user-item interaction. We investigate the geometric interpretation of BC loss, then further visualize and theoretically prove that it simultaneously learns better head and tail representations by encouraging the compactness of similar users/items and enlarging the dispersion of dissimilar users/items. Over eight benchmark datasets, we use BC loss to optimize two high-performing CF models. On various evaluation settings (i.e., imbalanced/balanced, temporal split, fully-observed unbiased, tail/head test evaluations), BC loss outperforms the state-of-the-art debiasing and non-debiasing methods with remarkable improvements. Considering the theoretical guarantee and empirical success of BC loss, we advocate using it not just as a debiasing strategy, but also as a standard loss in recommender models.
