Farther is closer: an optimization framework unifying contrastive learning and hard negative sampling
摘要
The Collaborative Filtering (CF) technology is highly classic and valuable in recommender systems. In recent years, the Hard Negative Sampling (HNS) strategy and Contrastive Learning (CL) method have emerged as research hotspots in the field of CF. Among them, HNS improves the efficiency of the optimization algorithm and the performance of the recommendation model by explicitly assigning larger sampling probabilities to harder negative samples. CL implicitly assigns greater weights to the gradients associated with hard negative samples within homogeneous nodes through the Information Noise Contrastive Estimation (InfoNCE) loss. However, this intuitive similarity between HNS and CL has not been explored. Thus, this paper conducts a theoretical analysis and experimental verification of the essential consistency between HNS and CL. Based on the consistency between HNS and CL, we propose the Farther Is Closer (FIC) optimization framework that unifies CL and HNS, where FIC means moderately pushing hard negative samples farther from a user helps positive samples get closer to this user. Compared to the CL based, HNS based and several other state-of-the-art methods, the proposed FIC has achieved performance improvement in less time on five real-world datasets.