Introduction
Contrastive Learning (CL) has emerged as a powerful technique in recommendation systems, primarily valued for its ability to handle data sparsity and improve recommendation quality by learning more robust representations. However, recent research reveals a significant security trade-off. While CL is robust against general data noise, it introduces a "double-edged sword" effect: the very mechanism used to improve item diversity and reduce popularity bias makes these systems remarkably vulnerable to targeted poisoning attacks.
The Vulnerability of Contrastive Learning: The Dispersion Paradox
Standard recommendation models, such as LightGCN, tend to exhibit a "popularity bias," where popular items are clustered together in the embedding space, effectively marginalizing "cold" or unpopular items. Contrastive Learning addresses this by intentionally dispersing embeddings to create a more uniform, globally distributed representation space.
This paper identifies what the authors call the Dispersion Paradox. By breaking down the natural clusters that protect popular items, CL removes the "moat" that typically prevents unpopular items from being recommended. In a flatter, more dispersed embedding landscape, it becomes significantly easier for an attacker to "push" a specific target item toward a broad range of users.
The authors provide a theoretical foundation for this vulnerability through spectral analysis. They demonstrate that minimizing the standard InfoNCE loss used in CL is equivalent to smoothing the distribution of singular values in the representation matrix. This "spectral smoothing" directly correlates with embedding dispersion, providing a mathematical link between contrastive objectives and attack susceptibility.
The CLeaR Attack Framework
To exploit this vulnerability, the researchers developed CLeaR (Contrastive Learning Recommendation Attack), a framework based on bi-level optimization. The attack is designed with two synergistic objectives:
- Dispersion Promotion: Instead of merely trying to increase an item's rank, CLeaR actively encourages the model's internal representations to become even more dispersed. By using a spectral approximation approach to favor "smooth" singular values, the attack essentially leverages the model's own CL objective to create a more fertile ground for item promotion.
- Rank Promotion: This objective utilizes a differentiable version of the Carlini-Wagner (CW) loss to directly optimize the visibility of target items, ensuring they climb to the top of users' recommendation lists.
Because CLeaR is formulated as a bi-level optimization problem—where the inner loop involves training the victim model and the outer loop optimizes the attack strategy—it is highly effective in both white-box and black-box scenarios.
Experimental Evaluation and Key Insights
The efficacy of CLeaR was evaluated on four major benchmarks: DouBan, Epinions, MovieLens 1M, and Yelp. The results consistently showed that CL-based models (such as SimGCL, SGL, and XSimGCL) are far more sensitive to poisoning than non-CL models like LightGCN.
As shown in Figure 1, the Hit Ratio@50 (the probability that a target item appears in the top 50 recommendations) increases dramatically for CL models as the attack size grows. In some instances, the success rate of an attack on a CL-enhanced model was several times higher than on the base model. Furthermore, CLeaR significantly outperformed traditional attack methods like Random or Bandwagon attacks. For example, on the Epinions dataset, CLeaR achieved a Hit Ratio@50 of 0.1490 on the XSimGCL model, vastly exceeding the 0.0161 achieved by a Random attack.
The study also demonstrated strong black-box transferability. Even without knowledge of the victim model's specific architecture, an attacker using a surrogate model could still achieve high success rates, highlighting the general risk posed to CL-based systems.
Conclusion
While Contrastive Learning offers clear benefits for recommendation accuracy and fairness, it introduces a unique security risk. The dispersion of embeddings, while beneficial for reducing bias, creates an opening for sophisticated poisoning attacks. This work underscores the need for new defense mechanisms that can preserve the performance gains of CL while mitigating the vulnerabilities inherent in its representation-learning process. Future research should focus on developing nuanced defense approaches that specifically address the spectral properties exploited by attacks like CLeaR.
Summary updated