Papers
Topics
Authors
Recent
Search
2000 character limit reached

CASE: Cadence-Aware Set Encoding for Large-Scale Next Basket Repurchase Recommendation

Published 8 Apr 2026 in cs.IR and cs.LG | (2604.06718v2)

Abstract: Repurchase behavior is a primary signal in large-scale retail recommendation, particularly in categories with frequent replenishment: many items in a user's next basket were previously purchased and their timing follows stable, item-specific cadences. Yet most next basket repurchase recommendation models represent history as a sequence of discrete basket events indexed by visit order, which cannot explicitly model elapsed calendar time or update item rankings as days pass between purchases. We present CASE (Cadence-Aware Set Encoding for next basket repurchase recommendation), which decouples item-level cadence learning from cross-item interaction, enabling explicit calendar-time modeling while remaining production-scalable. CASE represents each item's purchase history as a calendar-time signal over a fixed horizon, applies shared multi-scale temporal convolutions to capture recurring rhythms, and uses induced set attention to model cross-item dependencies with sub-quadratic complexity, allowing efficient batch inference at scale. Across three public benchmarks and a proprietary dataset, CASE consistently improves Precision, Recall, and NDCG at multiple cutoffs compared to strong next basket prediction baselines. In a production-scale evaluation with tens of millions of users and a large item catalog, CASE achieves up to 8.6% relative Precision and 9.9% Recall lift at top-5, demonstrating that scalable cadence-aware modeling yields measurable gains in both benchmark and industrial settings.

Summary

  • The paper presents CASE, a novel architecture that decouples item-level cadence learning from cross-item dependencies for repurchase recommendation.
  • It employs multi-scale CNNs and induced set attention to capture temporal rhythms, achieving up to 8.6% lift in Precision@5 on benchmark datasets.
  • The scalable design minimizes inference overhead and embedding complexity, enabling deployment to tens of millions of users in industrial settings.

Cadence-Aware Set Encoding for Large-Scale Next Basket Repurchase Recommendation

Introduction and Motivation

Repurchase behavior in large-scale retail is characterized by stable, item-specific cadences linked to replenishment cycles. Accurate modeling of these temporal rhythms is essential for next basket repurchase recommendation (NBRR) systems, especially in high-frequency shopping domains (e.g., grocery, household supplies). The majority of neural NBRR frameworks represent user-item histories as sequences indexed by basket order, disregarding real calendar offsets and thereby failing to accurately model elapsed time between purchases. This results in inability to adapt recommendations as time progresses between user transactions. Likewise, production-scale requirements impose strict constraints on inference efficiency, which common KNN or quadratic interaction models cannot satisfy.

CASE (Cadence-Aware Set Encoding) directly addresses these limitations by decoupling per-item cadence learning from cross-item dependencies, utilizing an architecture inherently amenable to production-scale deployment. Figure 1

Figure 1: Overview of CASE—item-level purchase histories are converted to binary TT-day calendar signals, multi-scale temporal convolutions extract cadence embeddings ci\mathbf{c}_i, and induced set attention models cross-item interactions to produce final repurchase scores.

Model Architecture

CASE processes each user’s repurchase candidate set as follows:

Calendar-Time Signalization: Every item’s purchase sequence is mapped to a binary indicator hi∈{0,1}T\mathbf{h}_i \in \{0,1\}^T over a TT-day window, directly encoding purchase recency and phase. This approach preserves inter-purchase interval information lost in basket-indexed approaches.

Multi-Scale Temporal CNN: Shared Conv1d filters operate on hi\mathbf{h}_i at predefined window sizes (weekly, biweekly, monthly, seasonal, trend), efficiently extracting multi-horizon periodicity and temporal trends. Activations from all scales are concatenated and projected to a fixed-dimensional cadence embedding ci\mathbf{c}_i.

Induced Set Attention Block (ISAB): To model cross-item dependencies, embeddings [ci ∥ ei][\mathbf{c}_i \,\|\, \mathbf{e}_i] (with static learned item embeddings ei\mathbf{e}_i) are processed through ISABs, scaling set attention from O(n2)O(n^2) to O(nK)O(nK) for ci\mathbf{c}_i0 items, with ci\mathbf{c}_i1 induced points. This enables context-aware aggregation without prohibitive computational cost.

Final Scoring: A downstream two-layer MLP takes ISAB-encoded representations and outputs per-item repurchase scores, forming the basis for ranking.

This architecture fully decouples cadence learning (shared, non-user-specific, efficient) from interaction modeling, conserving parameter count per user and minimizing inference overhead.

Experimental Results and Analysis

CASE was evaluated across three public retail datasets (Instacart, TaFeng, DC) and a proprietary large-scale grocery dataset, considering optimization for recommendation accuracy and scalability for tens of millions of users with large, sparse catalogs.

Benchmark Results

Across all evaluated datasets, CASE achieved superior or at least second place precision, recall, and NDCG at various cutoffs (ci\mathbf{c}_i2). Notably, on benchmark and production datasets, CASE yielded up to 8.6% lift in Precision@5 and 9.9% lift in Recall@5 over strong KNN baselines and the incumbent production system. The gains were most pronounced at tight cutoffs, reflecting CASE’s ability to precisely synchronize recommendations with real repurchase cycles.

Ablation Study

The ablation on Instacart confirmed that multi-scale CNN-based cadence modeling is the dominant driver of performance. Removing the temporal CNN incurred the largest accuracy drop, supporting the hypothesis that explicit calendar-time encoding provides the critical discriminative signal. Set-based attention yielded consistent secondary gains by capturing co-purchase context.

Surprisingly, exclusion of item embeddings resulted in only marginal performance loss, indicating that semantic product features are largely subsumed by cadence and interaction cues—this also has positive scalability implications, as it reduces the reliance on maintaining very large embedding tables in real-world deployment. Figure 2

Figure 2: PCA visualization of item-level embeddings—left panel shows cadence separation induced by the multi-scale CNN; right panel demonstrates refined partitioning of positive/negative classes post ISAB cross-item attention.

Scalability and Production Implications

CASE maintains a computational complexity of ci\mathbf{c}_i3 per user, decoupling inference cost from the total number of users—a marked contrast to KNN approaches that scale with ci\mathbf{c}_i4, where ci\mathbf{c}_i5 is the user population. This efficiency enables industrial rollout over tens of millions of active users without prohibitive infrastructure demands.

The reliance on shared convolutional weights for temporal encoding, rather than per-user or per-item parameters, further facilitates real-time model refresh and catalog expansion without retraining or embedding table growth.

Theoretical Implications and Future Directions

This work demonstrates that converting chronological purchase logs into fixed-window calendar-time signals, and leveraging shared multi-scale convolutional representations, can capture complex periodicities and temporal drift unattainable with basket-index or index-based RNNs/transformers. Induced set attention provides an information-complexity tradeoff suitable for operational scale.

Potential research extensions include incorporating explicit forecasting of next repurchase times, modeling cadence drift for highly dynamic users, or integrating exogenous temporal signals (e.g., seasonality, promotions). Further, the framework is amenable to adaptation in other event-recurrent domains such as medical prescription refills, maintenance scheduling, or sensor event prediction.

Conclusion

CASE introduces a production-oriented architecture for NBRR that combines explicit, calendar-time modeling of item-level cadences with efficient set-based cross-item aggregation. It achieves superior empirical performance and satisfies strict scalability constraints required for deployment in large-scale industrial settings. The central insight—calendar-time encoding of repurchase rhythms—constitutes a robust template for next-generation temporal recommendation systems, supporting further exploration of set-based modeling under operational constraints.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.