T-REX: Transformer-Based Category Sequence Generation for Grocery Basket Recommendation
A new transformer model from Amazon researchers tackles the unique challenge of predicting repetitive grocery purchases.
A team of Amazon researchers has introduced T-REX (Transformer-Based Category Sequence Generation), a new AI model designed to solve the complex problem of grocery basket recommendation. Unlike standard e-commerce, grocery shopping involves highly repetitive patterns and intricate item relationships within a single basket. T-REX addresses this by generating personalized, category-level suggestions using a transformer architecture that learns both immediate basket dependencies and a user's long-term shopping habits.
T-REX introduces three key innovations to overcome limitations of previous models like BERT4Rec. First, it uses an efficient sampling strategy with dynamic sequence splitting to handle sparse shopping data. Second, it employs an adaptive positional encoding scheme to better capture temporal patterns. Third, and most crucially, it models at the category level instead of the individual item level. This reduces computational complexity while maintaining recommendation quality and avoids the information leakage problems common in masked language modeling approaches. The model's causal masking is specifically designed for the sequential task of predicting the *next* basket, not just filling in gaps within a current one. Experiments on Amazon's large-scale grocery data and live A/B tests confirm T-REX delivers significantly more accurate predictions than existing systems.
- Uses a novel transformer architecture with causal masking for next-basket prediction, avoiding information leakage issues found in models like BERT4Rec.
- Models at the category level to reduce dimensionality and complexity while maintaining accuracy for grocery's repetitive purchase patterns.
- Showed significant improvement in both offline experiments and online A/B tests on Amazon's real-world grocery platform.
Why It Matters
This research could lead to more accurate and personalized recommendations for online grocery shoppers, directly impacting a multi-billion dollar market.