Abstract Negative sampling is a critical yet challenging component in self-supervised graph representation learning, particularly for recommendation systems modeling user-item interactions. Existing methods often rely on heuristics, overlooking the underlying "true" negative distribution. This paper shifts the focus from manually designing negative sampling distributions to a principled method that approximates and leverages the true distribution from the ground up, naturally handling "exposure bias" and achieving state-of-the-art performance with minimal computational overhead.
The Challenge of Negative Sampling
In recommendation systems, user-item interactions are typically modeled as a bipartite graph. Training these models requires both "positive" examples (items a user interacted with) and "negative" examples (items they did not). Because users interact with only a minuscule fraction of available items, models must sample a few "negatives" from a vast pool of non-interactions.
Traditionally, researchers have relied on heuristic strategies to select these negatives:
- Random Sampling (RNS): Selecting any unclicked item at random.
- Popularity-based Sampling (PNS): Selecting popular items as negatives, assuming that if a user ignored a popular item, they genuinely dislike it.
- Hard Negative Sampling (HNS): Selecting items the model predicts the user will like, but which they haven't actually interacted with.
The authors argue that these heuristic approaches are fundamentally arbitrary. More importantly, they ignore exposure bias. Just because a user hasn't clicked an item doesn't mean they dislike it—they might simply have never been exposed to it. The paper seeks a principled way to derive an optimal sampling distribution directly from the underlying true distribution of user preferences.
Moving Beyond Heuristics: A Principled Approach
The authors rethink the problem by treating negative sampling not as a design choice, but as a numerical approximation of a well-established learning objective (such as InfoNCE). They argue that an objective "true" negative distribution exists independently of human choice, and the goal should be to approximate it.
They first analyze the unbiased case, assuming the observed data perfectly reflects reality. Under this assumption, they mathematically prove that the optimal sampling distribution is the true negative distribution reweighted by the model’s current confidence. This is a significant theoretical insight: it mathematically justifies "adaptive hard negative sampling" as a direct consequence of the loss function's gradient, rather than just a clever engineering trick.
Handling the "Real World": Exposure Bias and Propensity Scores
Because real-world data is heavily biased by what items users are actually exposed to, the authors extend their analysis to the biased case.
To address exposure bias, they introduce a Propensity Score ($\phi$), defined as the probability that a "true positive" interaction is actually recorded in the dataset. To compute this, they utilize a lightweight Multi-Layer Perceptron (MLP) that estimates the propensity score using graph features like node degrees and current embeddings.
By co-training this propensity estimator alongside the recommendation model, the system learns to distinguish between an item the user truly dislikes and an item the user simply hasn't seen yet. The authors then derive a new, unbiased estimator for the training risk that mathematically corrects for the fact that some observed negatives are actually unobserved positives.
Empirical Validation and Key Results
The researchers evaluated their approach on three major recommendation benchmarks: MovieLens, Pinterest, and LastFM. They also tested its versatility on standard node classification tasks (Cora, CiteSeer, Wiki-CS, and Amazon-Photo).
The results demonstrate significant improvements over existing methods:
- State-of-the-Art Performance: The proposed method consistently outperformed 10 major baselines, including Dynamic Negative Sampling (DNS), Adaptive Hard Negative Sampling (AHNS), and MixGCF.
- Massive Gains on Sparse Data: On the Pinterest dataset—which is highly sparse and suffers from severe exposure bias—the method showed remarkable improvements. Using a LightGCN base model, Recall@20 jumped from 11.35% (the strongest baseline) to 17.61%.
- High Efficiency and Low Overhead: Despite the rigorous mathematical foundation, the implementation remains lightweight. By using importance sampling, the computational complexity is kept at $O(k)$ (where $k$ is the number of samples) rather than scaling with the total number of nodes. The propensity score MLP adds less than 6% to the total memory and parameter overhead compared to simple random sampling, with zero extra cost during inference.
- Faster Convergence: Because the sampling strategy is tied directly to the optimization objective, the models converge more quickly and reliably.
Limitations and Future Directions
While the proposed method offers a robust mathematical foundation for negative sampling, it does have limitations. The method introduces a "positive class prior" ($\pi^+$) hyperparameter, representing the overall density of true positives in an ideal world. While the authors identify a "sweet region" for this value, it still requires dataset-specific tuning.
Additionally, the current work focuses primarily on bipartite user-item graphs. Exploring its full potential for general graph types, such as social networks or knowledge graphs, remains an open area for research. Finally, the current propensity estimator relies on basic graph features; future iterations could incorporate more sophisticated structural features to better model the complex mechanisms of user exposure.
Summary updated