Industrial sequential recommenders often predict multiple items at once using binary cross-entropy (BCE) loss, but computing this loss over a huge vocabulary (e.g., 876k items) requires storing a massive logits tensor that causes out-of-memory (OOM) errors. CutBCE reformulates the BCE loss into a dense background part and a sparse target correction, and implements a custom backward kernel on TPUs that computes logits on the fly in small tiles. This allows the logits and their gradients to never reside in high-bandwidth memory (HBM). On a multi-label SASRec model with 876k items, CutBCE reduced peak HBM usage by 65.7% and increased training speed by 225.9% compared to the standard implementation, without sacrificing accuracy. The operator is provided as a drop-in replacement for JAX and Keras models.
CutBCE eliminates memory barriers for large-vocabulary recommendation training
On an 876k-item dataset, the authors report 65.7% lower memory use and 225.9% faster training with no accuracy loss.
Big Tech
Yaoyiran Li · Haowen Ning · Mohamed Hammad
Google Cloud
Research Digest··2 min read
In one line
CutBCE eliminates the memory bottleneck of binary cross-entropy loss for large-vocabulary recommendation by never materializing the full logits tensor.
Read it as
The authors present CutBCE, an exact hardware-accelerated Binary Cross-Entropy loss operator for JAX/TPU that avoids materializing full logits in high bandwidth memory.
Standard BCE materializes a dense [B, N, V] logits tensor causing OOM for large V.
How it works
before and afterThe Daily Edition
The front page in your inbox each weekday morning: the lead, the picks, and why each one earned its place.