Improving Training Stability for Multitask Ranking Models in Recommender Systems

Jiaxi Tang, Yoel Drori, Daryl Chang, Maheswaran Sathiamoorthy, Justin Gilmer, Li Wei, Xinyang Yi, Lichan Hong, Ed H. Chi

Abstract

Training large-scale multitask ranking models for industrial recommender systems is frequently hampered by training instability, often manifesting as catastrophic loss divergence. This paper introduces Clippy, an adaptive clipping algorithm designed to stabilize training by leveraging the $L_\infty$ norm and clipping based on actual parameter updates rather than raw gradients. Empirical results on YouTube production datasets and WMT translation benchmarks demonstrate that Clippy enables the use of significantly higher learning rates, leading to faster convergence and improved model performance.

Introduction

In industrial-scale recommendation systems, such as YouTube, models are increasingly complex, often employing multitask learning (MTL) to predict diverse user behaviors simultaneously (e.g., clicks, watch time, and engagement). While MTL allows shared layers to learn rich representations across tasks, it introduces significant training risks. Specifically, these models are prone to "loss divergence"—a phenomenon where the loss function spikes, rendering the model ineffective. This instability wastes computational resources and forces engineers to adopt conservative learning rates, which can limit the final model's accuracy.

The Challenge of Loss Divergence

The authors categorize loss divergence into two types: "micro" spikes, from which a model might recover, and "full" divergence, where accuracy drops to random chance. Ranking models are particularly susceptible due to their high-dimensional feature spaces and the "pollution" of shared layers. In an MTL setting, a single task producing a spurious gradient can propagate through shared architectures, creating a feedback loop that destabilizes the entire system.

Standard mitigation strategies, such as Gradient Clipping (GC) or Adaptive Gradient Clipping (AGC), typically rely on the $L_2$ (Euclidean) norm. However, the authors argue these are insufficient for modern recommender systems. In very wide layers, a single "rogue" coordinate can explode without significantly impacting the total $L_2$ norm, allowing the instability to bypass the clipper.

The Clippy Algorithm

To address these limitations, the paper proposes Clippy, which introduces three primary innovations:

  1. $L_\infty$ Norm Sensitivity: Unlike $L_2$ clipping, which averages gradients across dimensions, Clippy utilizes the $L_\infty$ norm (the maximum absolute value among all coordinates). This makes the algorithm highly sensitive to individual dimensions that may be diverging, even if the rest of the layer remains stable.
  2. Update-based Clipping: Rather than clipping the raw gradient ($g_t$), Clippy targets the actual update ($r_t$) generated by the optimizer (e.g., Adagrad or Adam). This is more principled as it accounts for the optimizer's internal state, such as the accumulator in Adagrad, which directly influences the weight change.
  3. Dual Thresholding: Clippy employs both relative and absolute thresholds. The relative threshold scales with weight magnitude, while the absolute threshold prevents over-clipping during initialization when weights are near zero.

Experimental Evaluation

YouTube Production Data

The primary evaluation was conducted on a YouTube production dataset involving a complex Deep & Cross Network (DCN) architecture. Clippy was the only method capable of maintaining stability while utilizing a 2x higher learning rate than the baseline. This stability translated into a 0.1% AUC improvement—a margin considered highly significant in high-traffic recommendation environments, often resulting in substantial business impact.

Generalization: WMT Translation

To test generalizability beyond recommendation, the authors applied Clippy to a Transformer-based Neural Machine Translation (NMT) task (WMT English-to-German). While standard Adagrad and AdamW experienced instability at higher learning rates, Adagrad equipped with Clippy remained stable across all experiments, confirming its utility for diverse architectures.

Discussion and Key Insights

A critical takeaway is the "learning rate freedom" granted by Clippy. By acting as a robust safety net, it allows researchers to explore higher learning rates that were previously inaccessible due to crash risks. This leads to faster convergence and better final metrics. The study also highlights why $L_2$ methods fail: they often provide an insufficient clipping factor when loss curvature becomes steep because they lack the coordinate-wise granularity of the $L_\infty$ approach.

Limitations and Future Work

Despite its empirical success, the authors note that a formal theoretical convergence guarantee for Clippy has yet to be established. Additionally, the algorithm introduces two new hyperparameters ($\lambda_{rel}$ and $\lambda_{abs}$), which currently require manual tuning or AutoML. Future research will focus on expanding testing across a broader range of optimizers and automating hyperparameter selection to further simplify the training of massive multitask models.

Conclusion

Clippy represents a significant step forward in stabilizing industrial-scale machine learning. By shifting the focus from raw gradients to parameter updates and adopting the $L_\infty$ norm, it provides the necessary precision to prevent loss divergence in complex multitask architectures, ultimately enabling more ambitious model scaling and optimization.

Summary updated

BibTeX
@inproceedings{tang2023improving,
  author = {Jiaxi Tang and Yoel Drori and Daryl Chang and Maheswaran Sathiamoorthy and Justin Gilmer and Li Wei and Xinyang Yi and Lichan Hong and Ed H. Chi},
  title = {{Improving Training Stability for Multitask Ranking Models in Recommender Systems}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2023},
}
Figure