TL;DR
In recommendation systems with sparse user clicks, standard Binary Cross Entropy (BCE) loss suffers from a hidden flaw: vanishing gradients on negative samples. This paper reveals that adding an auxiliary ranking loss acts as a powerful gradient booster, rescuing the model's primary classification performance and yielding significant revenue lifts in production at Tencent.
What Problem Does This Paper Address?
Click-Through Rate (CTR) prediction models are the engine behind online advertising and recommendation systems. Typically, these models are trained as binary classifiers using Binary Cross Entropy (BCE) loss to predict whether a user will click an item. However, in real-world systems, positive feedback (clicks) is incredibly rare—often accounting for less than 2% of data.
The authors uncover a fundamental issue with using pure BCE loss in these sparse environments: the gradient for negative samples is directly proportional to the predicted CTR ($\hat{p}_j$). Because an unbiased model predicts a very low average CTR in sparse settings, the gradients for negative samples completely vanish. This stalls optimization, leaving the model with a flat loss landscape and sub-optimal classification performance. While practitioners often combine BCE with an auxiliary ranking loss to improve ranking metrics (like AUC), the exact mechanism of why this hybrid approach helps the underlying classification model has remained poorly understood until now.
Methods
The authors provide a rigorous mathematical analysis of the joint optimization paradigm:
$$\mathcal{L} = \alpha \mathcal{L}_{\text{Clf}} + (1 - \alpha) \mathcal{L}_{\text{Rank}}$$
They focus on Combined-Pair (BCE combined with RankNet pairwise loss) and prove that the ranking loss injects significantly larger gradients into negative samples than BCE alone.
Beyond pairwise losses, they extend their framework to listwise ranking objectives (such as Combined-List, RCR, and JRC), as well as alternative gradient-boosting techniques like Focal Loss. They also introduce a novel Combined-Contrastive loss to demonstrate that any auxiliary supervised loss considering label interactions can mitigate the gradient vanishing issue. Crucially, they analyze the gradients to prove compatibility: the gradients of BCE and the ranking losses always share the same sign, meaning they actively align rather than fight each other during backpropagation.
Datasets
The authors validated their findings using both offline benchmarks and live online production systems:
- Criteo: A standard public display advertising dataset. To simulate real-world sparsity, the authors applied down-weighting ($\beta_{\text{pos}}$) to positive samples, creating artificial CTR environments ranging down to 3.3%.
- Tencent Production Data: Live online A/B testing was conducted across three massive advertising scenarios: WeChat Channels, WeChat Moments, and Tencent's Demand-Side Platform (DSP).
Key Insights and Ideas
- Ranking Loss Improves Classification: Counterintuitively, adding a ranking loss actually lowers the training and validation BCE loss. It doesn't just help the model rank items better; it fundamentally improves its ability to classify them.
- Rescuing Negative Samples: In sparse settings, positive samples maintain healthy gradients, but negative samples stall out. Pairwise ranking loss compares positive-negative pairs, effectively transferring gradient energy to rescue the neglected negative samples.
- Steeper Loss Landscapes: Visualizing the optimization surface reveals that pure BCE optimization is painfully flat, whereas the combined loss creates a significantly steeper, more optimizable landscape.
- No Score Drifting: While using ranking loss alone can cause absolute predicted scores to drift (ruining calibration), the combined approach preserves scale calibration and actually reduces prediction bias in lower CTR buckets.
Key Results
- Sparsity Correlation: The sparser the positive feedback, the larger the performance gap becomes between the combined loss and pure BCE, validating the authors' core hypothesis.
- Gradient Norm Boost: Empirical tracking confirmed that the combined method maintains significantly higher gradient norms for negative sample logits throughout the entire training process.
- Production Lifts at Tencent: Deployed in live online A/B tests with 20% traffic, the Combined-Pair method significantly outperformed the baseline across major business metrics:
- WeChat Channels: +0.91% CTR, +1.08% Gross Merchandise Value (GMV).
- WeChat Moments: +0.16% CTR, +0.70% GMV.
- New Ads Performance: For newly launched ads (which suffer most from sparse data and optimization difficulties), the method achieved a massive +1.26% GMV lift.
Limitations and Future Work
The paper does not include a dedicated limitations section, but a clear trade-off is computational complexity. Calculating pairwise ranking loss introduces an extra training overhead of $\mathcal{O}(N_+ \times N_-)$ per batch, where $N_+$ and $N_-$ are the numbers of positive and negative samples. While the authors note this cost is negligible compared to massive deep learning backbones and has zero impact on inference time, it could become a bottleneck for exceptionally large batch sizes or dense listwise formulations. Future work could explore dynamically tuning the loss weight $\alpha$ during training rather than relying on static hyperparameter selection.
Summary updated