SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.11054 · NeurIPS · 2022

Incorporating Bias-aware Margins into Contrastive Loss for Collaborative Filtering

Xiang Wang, An Zhang, Tat-Seng Chua, Wenchang Ma, Sea-Next Lab

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 8 functions out of this paper's own repositories and ran 5 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
anzhang314/BC-Loss canonical 5 of 8
FunctionStatusWhere it lives
activation_function Ran anzhang314/BC-Loss/util/tool.py
code served (permissive licence) · get_code("1adb6de3e7416db5")
csr_to_user_dict Ran anzhang314/BC-Loss/util/tool.py
code served (permissive licence) · get_code("4c43695f5d50c246")
get_data_format Ran anzhang314/BC-Loss/util/tool.py
code served (permissive licence) · get_code("2377841db81c8ac9")
helper_load Ran anzhang314/BC-Loss/data.py
code served (permissive licence) · get_code("029327c4f6fb55d0")
helper_load_train Ran anzhang314/BC-Loss/data.py
code served (permissive licence) · get_code("f1fe817c737b6fed")
optimizer Not yet run anzhang314/BC-Loss/util/learner.py
code served (permissive licence) · get_code("79f53062452bf811")
pairwise_loss Not yet run anzhang314/BC-Loss/util/learner.py
code served (permissive licence) · get_code("b17c738dfa5e4d0b")
pointwise_loss Not yet run anzhang314/BC-Loss/util/learner.py
code served (permissive licence) · get_code("d5e95231ba7204ac")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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 Biasaware 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. Codes are available at https://github.com/anzhang314/BC-Loss.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2210.11054")
get_code_for_paper("2210.11054")
have("2210.11054")

Connect an agent — have() is free.