Manuscript Offprint
arXiv:2608.28393Timing-Aware Repurchase Prediction for Web-Scale E-Commerce: Survival Models for Multi-Surface Grocery Recommendation
Akshay Kekuda
Walmart Global Tech
Bellevue, WA, USA
Shreeranjani
Srirangamsridharan
Walmart Global Tech
Sunnyvale, CA, USA
shreeranjani.srirangamsridharan@walmart.com
Yanan Cao
Walmart Global Tech
Sunnyvale, CA, USA
Ishan Bhatt
Walmart Global Tech
Sunnyvale, CA, USA
Sinduja Subramaniam
Walmart Global Tech
Sunnyvale, CA, USA
sinduja.subramaniam@walmart.com
Evren Korpeoglu
Walmart Global Tech
Sunnyvale, CA, USA
Kaushiki Nag
Walmart Global Tech
Sunnyvale, CA, USA
Abstract
Repurchase recommenders in e-commerce are commonly framed as a binary question asking will this customer buy this item within W days, a formulation that in our production setting requires a separately trained model for every horizon of interest. We replace this stack with survival models that predict time-to-repurchase directly, and evaluate them on millions of customers from a major grocery e-commerce platform across more than thirty ablation configurations. Our study makes three contributions. First, an empirical hazard analysis reveals a slightly decreasing marginal hazard ( ). This differs from the common intuition that grocery items become more likely to be repurchased the longer it has been since the last purchase (an increasing hazard with ). Log-Normal achieves the best marginal fit ( ) and the best ranking, despite Weibull providing the best fit to conditional residuals, revealing an apparent discrepancy that we analyze in detail. Second, a single Accelerated Failure Time (AFT) model replaces three per-horizon binary classifiers, matching or exceeding each at its own horizon while using roughly fewer total trees. Feature importance reshuffles under the survival objective: channel-cadence and recency signals rise sharply while aggregate frequency counts fall. Third, a 4-parameter parametric calibration maps raw survival cumulative distribution functions (CDFs) to per-horizon probabilities with zero cross-horizon monotonicity violations. Calibration quality varies by an order of magnitude across the AFT family even though ranking does not: Exponential AFT (Weibull ) achieves expected calibration error (ECE) , roughly lower than Log-Normal, while ranking metrics agree within 0.3% relative. We therefore adopt Exponential AFT for probability-consuming surfaces and Log-Normal for pure ranking, exposing a principled calibration-ranking trade-off within a single AFT family.
Keywords
repurchase prediction, survival analysis, accelerated failure time, discrete-time hazard, multi-horizon ranking
Kannan Achan
Walmart Global Tech
Sunnyvale, CA, USA
The standard production approach ignores those clocks. An XG-Boost [6] binary: logistic classifier asks “will this customer buy this item within W days?”, which means an item due in two days and one due in three weeks can receive the same score. When the platform needs to populate three surfaces at different horizons, the pragmatic but wasteful solution is to train three models, one per horizon, tripling training and serving cost while discarding all timing structure in the process.
Survival analysis [7, 14] offers a natural alternative: instead of a binary yes/no, we predict time-to-repurchase. We study two complementary formulations. Accelerated Failure Time (AFT) models [27] predict a scalar time-to-repurchase per (customer, item) pair, yielding an imminence-ordered ranking that serves every horizon from a single model. Discrete-Time (DT) hazard models [1, 24] expand each pair into interval-specific rows, producing calibrated per-horizon CDFs and, in principle, a different ranked list per horizon from a single model.
Our contributions:
(1) Data-driven distribution selection. An empirical hazard analysis on tens of millions of (customer, item) pairs yields a maximum-likelihood estimate (MLE) of the shape parameter , a slightly decreasing hazard, which contrasts with the common intuition that repurchase hazards should be increasing. We compare Weibull, Log-Normal, and Logistic AFT distributions across marginal fit (via Kaplan–Meier
Kekuda et al.
quantile–quantile regression), conditional residual fit, and end-to-end ranking. Log-Normal achieves the best marginal fit ( ) and the best ranking metrics, despite Weibull providing the best fit to conditional residuals, revealing an apparent discrepancy that we analyze in detail ( , ).
(2) One model replaces three. A single AFT model matches or exceeds the best per-horizon binary classifier at every horizon while using roughly fewer total trees across horizons. The survival objective reshuffles feature importance: channel-cadence and recency features rise sharply while aggregate frequency counts drop ( , ).
(3) Calibration separates the AFT family. A 4-parameter parametric calibration (shape a plus per-horizon intercepts ) maps raw survival CDFs to per-horizon probabilities with zero cross-horizon monotonicity violations. Although ranking is nearly invariant across AFT distributions, calibration quality varies by an order of magnitude: Exponential AFT (Weibull ) reaches ECE with near-perfect sanity ratios (1.00–1.01), while Log-Normal, despite winning marginal fit and ranking, trails by on ECE due to its bell-shaped hazard mismatching the empirical monotone-decreasing hazard. We recommend Exponential for probability-consuming surfaces and Log-Normal for pure ranking ( ).
2 Problem Setting
Task. Given a customer’s purchase history on a web-scale grocery e-commerce platform, rank previously-purchased items by likelihood and timing of future repurchase. The output populates “buy again” surfaces across multiple web and mobile applications, each with a different time horizon.
Data. Our dataset consists of tens of millions of (customer, item) pairs drawn from a large, proprietary grocery e-commerce platform. Each pair is labeled with the observed time-to-repurchase in days if a repurchase occurred within a 30-day window, and is right-censored otherwise. Training uses a single snapshot date; evaluation uses the same date with a held-out customer partition.
Evaluation protocol. Our primary metric is precision-at-variable-k (P@h): for each customer, we retrieve k items where k equals the number of items actually purchased within the h-day window. This makes precision and recall numerically identical, evaluating ranking quality at each customer's natural basket size. We evaluate at three horizons: days. Secondary metrics include normalized discounted cumulative gain (NDCG), consumable-item precision, perishable-item precision, and fixed-k precision at .
Baseline. Our production system trains an XGBoost classifier with binary: logistic (800 trees, depth 6, learning rate (LR) 0.3, 84 features) on 14-day repurchase labels. For 7-day or 30-day recommendations, separate models are trained with horizon-matched labels using the same architecture and features. This yields three independent models , , . Each is evaluated on all horizons; the matched-horizon result (e.g., at 14 days) represents each model's ceiling.
Features. All models share 84 features: order frequency by fulfillment channel and payment method, recency signals (days since last purchase, days-since-last-N-order), inter-purchase interval (IPI) statistics at item and product-type level (personal median, population median, percentiles), item availability flags, customer tenure features, basket composition signals, and previous-order presence flags. The best AFT model uses the same production feature set; the DT model adds interval-relative features ( ).
3 Related Work
Next-basket and repurchase ranking. Predicting what a customer will buy next is most often studied as next-basket recommendation (NBR). The literature spans Markov-chain factorization [21], recurrent basket encoders [28], attention- and set-based encoders [12, 17, 25, 29], and frequency-based nearest-neighbor methods such as TIFU-KNN [13]. A parallel line of work isolates the repeat portion of the basket, which is precisely what buy-again surfaces consume: RepeatNet [20] disentangles repeat from explore intent, ReCANet [2] models per-item repeat consumption for grocery next-basket recommendation, Wan and McAuley [26] model basket-level loyalty and complementarity, and Bhagat et al. [3] formulate repeat purchase as binary classification. Closest to our own setting, CASE [4] encodes each item's purchase history as a calendar-time signal and models cross-candidate dependencies with induced set attention. Reproducibility studies in this area repeatedly find that simple, well-tuned baselines remain competitive with substantially more elaborate neural models on grocery data [18].
Survival analysis in recommendation. What all of the models above share is that they answer what will be rebought and, at best, how likely; none predicts when, which is the quantity a multi-horizon repurchase stack actually needs. Survival analysis targets timing directly. Survival models have been applied to user engagement in online experiments [5] and to user return-time modeling [16], but their use for item-level repurchase ranking at web scale is underexplored. Our work shows that XGBoost AFT is a drop-in replacement for binary logistic without architecture changes.
Time-aware and multi-horizon recommendation. Session-based models (GRU4Rec [11], Time-LSTM [30]) model temporal dynamics but require sequence architectures and do not output calibrated per-horizon probabilities. Multi-horizon prediction is typically approached either by training one model per horizon or via multi-task learning [19]. Person-period expansion (§4.2) provides an alternative: calibrated per-horizon probabilities via data augmentation rather than architectural modification.
Discrete-time survival. The person-period expansion [8, 24] is well established in biostatistics but rarely applied to web-scale recommendation. We show that it pairs naturally with gradient-boosted trees on expanded datasets containing hundreds of millions of interval rows.
Positioning: our baseline is the deployed model. The repurchase ranker in production on our platform is a tabular feature set scored by gradient-boosted trees ( ), not a neural NBR architecture. This is a deliberate engineering choice rather than an oversight. In internal benchmarking on our own traffic, tuned tabular GBDT rankers were
Timing-Aware Repurchase Prediction for Web-Scale E-Commerce: Survival Models for Multi-Surface Grocery Recommendation
RecSys '26, October 2026, Minneapolis, USA
competitive with neural NBR models while training and serving at a small fraction of the cost. They also remained directly explainable through feature attributions, which is critical for a surface that merchandising and category teams must be able to interrogate. This is consistent with a broader body of evidence that carefully tuned baselines are difficult to beat in recommendation [9, 22] and that tree ensembles remain strong on heterogeneous tabular data [10, 23]. Accordingly, this paper does not attempt a head-to-head comparison against neural NBR systems, and we make no claim of state-of-the-art accuracy against them. We compare instead against the model that is actually deployed, under its own feature set, training budget, and evaluation protocol, and our claim is scoped to match: changing the objective from per-horizon binary classification to time-to-event, while holding the tabular representation and the tree ensemble fixed, improves multi-horizon ranking and collapses three production models into one.
4 Survival Models
4.1 Accelerated Failure Time (AFT)
We train XGBoost with the survival:aft objective. For a (customer, item) pair with feature vector , the model predicts an expected time-to-repurchase . All three AFT distributions share the same ranking rule: items are ordered by predicted time ; only the training loss gradient differs. We compare Weibull, Log-Normal, and Logistic in §5.1.2.
Survival, CDF, and hazard. Let denote the predicted time-to-repurchase.
Weibull (shape , scale ):
For the hazard increases (items become “overdue”); for it decreases; is memoryless exponential. Our empirical analysis (5.1.1) finds .
Log-Normal (location , scale ):
where is the standard normal CDF. The hazard is non-monotone (rises then falls).
Logistic (location , scale ):
where is the sigmoid function. The hazard is also non-monotone.
Peak repurchase day. Each distribution yields a closed-form density mode (most likely repurchase day):
Log-Normal always has a finite mode, making it directly interpretable as a “peak repurchase day” even when the Weibull mode collapses to (as it does for our empirical ). Ranking by remains valid regardless of distribution.
Ranking score. Items are ranked by : smaller scale (sooner expected repurchase) ranks first. This is a drop-in replacement for the binary classifier, using same inference pipeline with the same latency.
Censoring. Items without a repurchase within 30 days are right-censored with lower bound equal to elapsed days since last purchase and upper bound . Preserving all censored observations is critical: three experiments that dropped censored items with high lapsed-days () collapsed to concordance vs. , even with heavy regularization (5.1).
Ranking invariance. For any single-output AFT model (Weibull, Log-Normal, or Logistic), item rankings are identical across horizons. is monotone decreasing in for fixed and distribution parameters, so:
A single model serves all horizons. Per-horizon probabilities are obtained via calibration (7), but the ranking is horizon-agnostic.
4.2 Discrete-Time Hazard (DT)
The discrete-time hazard model [1] frames repurchase as a sequence of interval-specific binary events. We define three intervals: [0, 7), [7, 14), [14, 30) days. Each (customer, item) pair is expanded into one row per interval (person-period expansion), yielding expansion. For uncensored pairs, the row corresponding to the event interval receives label 1; preceding rows receive label 0. Censored pairs receive label 0 for all rows. We retain 30% of censored items via negative sampling.
A standard binary: logistic XGBoost model is trained on the expanded dataset with the interval index as a categorical feature.
Interval-relative features. Six interval-relative features simulate the customer’s state at each interval boundary, using the elapsed time since last purchase (lapsed) and the interval endpoint offset ():
| Feature | Definition |
|---|---|
| Lapsed-at-end | |
| IPI gap at end | |
| Fraction of IPI elapsed | |
| Population IPI gap | |
| Lower-bound gap | |
| Upper-bound gap |
Inference. Interval hazards yield survival CDFs:
Ranking at horizon uses , producing a different ranked list per horizon from a single model.
Kekuda et al.

Figure 1: Empirical hazard analysis on a large customer-item sample. Left: discrete hazard rate with decreasing linear trend (slope = -0.035/day) and weekly periodicity. Center: cumulative hazard . Right: Weibull profile log-likelihood yields ; is nearest to the optimum.
5 Experiments
5.1 AFT Ablations
We trained more than thirty AFT configurations varying distribution, shape, depth, regularization, and features. Two findings stand out: the distributional assumption can be estimated from data rather than treated as a free choice, and the marginal distribution with the best fit, Log-Normal, also produces the best ranking.
5.1.1 Empirical Hazard Analysis. We estimate the true hazard shape from a large sample of (customer, item) pairs observed over a 30-day window. The discrete hazard rate shows a clearly decreasing trend (slope = -0.035/day): items are more likely to be repurchased early in the window than late (Figure 1).
Distribution fitting. We fit Weibull, Log-Normal, and Logistic distributions to the Kaplan–Meier (KM) [15] survival function via quantile–quantile (QQ) regression (Figure 2). Log-Normal achieves the best fit (), followed by Logistic () and Weibull (). The Weibull QQ slope yields , confirming (a slightly decreasing hazard). The finding is consistent across customer segments: light shoppers (), medium (), and heavy buyers () all exhibit .
A Weibull profile log-likelihood analysis (Figure 1, right), maximizing over for each , yields , which is consistent with the QQ estimate. Marginal scale estimation via profile likelihood is tractable for Weibull thanks to its power-law form (closed-form concentration of ); for Log-Normal and Logistic, the fact that roughly of pairs are censored at a single time point renders the marginal likelihood uninformative about the scale parameter, so we determine optimal by grid search (Table 1).
5.1.2 Shape and Feature Ablation. Table 1 presents a joint ablation of the Weibull shape parameter and the input feature set. All runs use depth 6, , LR 0.25, and share the same train/test partition to isolate the effect of shape and features from sampling noise. Here are the main observations:
- Shape matters more than hand-engineered features. Within the production feature set, moving the shape prior from to lifts P@14d by roughly . Adding six engineered timing features (IPI-overdue indicators, Weibull-derived CDF scores) does not improve on the production feature set; the best overall configuration uses the production features alone.

Figure 2: Marginal distribution comparison via KM-based QQ regression. Weibull (, ), Log-Normal (, ), and Logistic (, ). Log-Normal achieves the highest , consistent with its superior ranking metrics (Table 1).
Table 1: Joint shape, feature, and distribution ablation. All runs use depth 6, , and the same partition. The first two blocks vary Weibull's shape parameter and the feature set; the third block fixes (production features) and swaps the AFT distribution family.
| Config | k | Feats | P@7d | P@14d | P@28d |
|---|---|---|---|---|---|
| Shape ablation (Weibull, production features) | |||||
| k=0.5 (decreasing) | 0.5 | 84 | .3454 | .3785 | .4070 |
| k=1.0 (exponential) | 1.0 | 84 | .3451 | .3783 | .4066 |
| k=2.0 (increasing) | 2.0 | 84 | .3448 | .3777 | .4062 |
| Feature ablation (Weibull, +6 engineered timing features) | |||||
| k=0.5 | 0.5 | 90 | .3451 | .3784 | .4066 |
| k=1.0 | 1.0 | 90 | .3452 | .3783 | .4065 |
| k=2.0 (increasing) | 2.0 | 90 | .3448 | .3777 | .4057 |
| Distribution ablation (production features, σ=2) | |||||
| Weibull (k=0.5) | 0.5 | 84 | .3454 | .3785 | .4070 |
| Log-Normal | - | 84 | .3461 | .3788 | .4069 |
| Logistic | - | 84 | .3455 | .3787 | .4071 |
This suggests the survival objective already extracts the timing signal from the raw recency and frequency features, making explicit timing engineering largely redundant.
-
Distribution choice: Log-Normal edges Weibull. Replacing the Weibull loss with Log-Normal produces the best overall numbers (P@7d = 0.3461, P@14d = 0.3788), marginally exceeding Weibull with . Logistic ties Weibull at 14 days and wins at 28 days. Crucially, all three distributions outperform every per-horizon baseline, suggesting that the improvement is driven primarily by the AFT objective rather than by any particular distributional assumption.
-
Conditional-fit paradox. To understand why Log-Normal outperforms Weibull despite the data's Weibull-like marginal hazard, we perform a censoring-aware conditional fit on each model's residuals . Figure 3 (left) shows that the Gumbel distribution fits residuals best for all three training distributions, not just the Weibull-trained model, yet Log-Normal wins on ranking metrics (right panel). The gap between Gumbel and Normal fits is smallest for the Log-Normal model () and largest for the Logistic model (), suggesting that Log-Normal's gradient landscape encourages better tree splits while keeping residual structure close to Gumbel. The loss function thus acts as both a fitting criterion and an inductive bias: the bias that
Timing-Aware Repurchase Prediction for Web-Scale E-Commerce: Survival Models for Multi-Surface Grocery Recommendation
RecSys '26, October 2026, Minneapolis, USA

Figure 3: Conditional residual fit vs. ranking metrics. Left: LL heatmap. Gumbel fits residuals best across all training distributions; the gap is smallest for Log-Normal (908) vs. Logistic (6,771). Right: Ranking metrics favor Log-Normal despite Weibull's superior conditional fit.
maximizes ranking performance need not coincide with the one that best fits the conditional distribution.
-
Shape prior explains ranking differences. Among the Weibull models, beats at every horizon (+0.19% at P@14d, +0.22% at P@28d), and ranking improves monotonically as decreases from 2.0 to 0.5. We lack intermediate grid points to say whether the true optimum lies exactly at the empirical or somewhat below it.
-
A counterintuitive implication. The intuition that repurchase hazard should increase as items become more overdue, is not supported by the population-level analysis. The decreasing hazard reflects heterogeneity: items that remain non-repurchased after twenty days are disproportionately long-cadence items (monthly detergent rather than weekly milk), shifting the remaining at-risk population toward lower hazard. XGBoost's feature-based model already captures per-item cadence, so a slightly decreasing hazard prior avoids fighting the features.
5.1.3 Failure Modes.
Never drop censored items. Three experiments filtered out right-censored items with large lapsed-day values (>180 or >240 days). All three collapsed catastrophically, with train–test gaps exceeding 0.50, and even aggressive regularization (, subsample 0.8, LR 0.1, 800 rounds) could not recover them. Censored items anchor the survival tail; removing them destroys the model's ability to generalize to long-cadence buyers.
5.2 DT Ablations
We evaluate five DT configurations that vary the number of intervals, the feature set, and the training data volume (Table 2). For these DT ablations we report fixed- recall (R@4, R@8 at 7 days); the cross-model comparison in Table 4 uses P@.
Three intervals are enough. Splitting the first week into [0, 3) and [3, 7) introduces a fourth interval and inflates the training data by 31%. The model does notice the change, with interval_id becoming rank 7 by gain, yet Recall@4 at 7 days drops from 0.689 to 0.685. The 4-interval configuration is nevertheless informative in its own right: the learned interval hazard rates are monotonically increasing (Table 3). This conditional hazard, defined within each customer's at-risk set, rises because items not yet repurchased
Table 2: DT ablation summary. All configs: depth 6, LR 0.3, early stopping 20 rounds, negative sample fraction 0.3.
| Config | Trees (actual) | Feats | R@4 (7d) | R@8 (7d) |
|---|---|---|---|---|
| 3 intv, full data | 300 | 84 | 0.673 | 0.829 |
| 3 intv + time-aware feats | 300 | 90 | 0.688 | 0.831 |
| 3 intv, 800 max, half data | 225 | 84 | 0.686 | 0.832 |
| 3 intv + engagement feats, full | 273 | 84 | 0.689 | 0.833 |
| 4 intv + engagement feats, half data | 192 | 84 | 0.685 | 0.831 |
Table 3: Learned hazard rates by interval (4-interval DT config). Monotonically increasing within each customer's at-risk set, consistent with the AFT finding of at the population level (decreasing marginal hazard due to heterogeneity).
| Interval | Mean | Median |
|---|---|---|
| [0, 3) days | 0.121 | 0.042 |
| [3, 7) days | 0.195 | 0.080 |
| [7, 14) days | 0.253 | 0.127 |
| [14, 30) days | 0.340 | 0.232 |
become progressively more overdue. Crucially, it is fully compatible with the marginal hazard being decreasing (, §5.1.1): at the population level, late survivors are disproportionately long-cadence items, shifting the remaining at-risk set toward lower hazard.
Interval-relative features help where it matters. The six *_at_end features (Section 4.2) simulate the customer's state at each interval boundary and improve 7- and 14-day recall by 1–2%. The strongest new signal is the population-level IPI gap at interval end (rank 24 by gain), echoing the AFT finding that derived timing-gap features outperform raw IPI values.
More data beats more trees. The full-data configuration (273 trees, early-stopped from 300) outperforms the half-data configuration with an 800-tree cap (225 trees actually used). At this scale, additional data coverage buys more accuracy than additional model capacity.
5.3 Main Results
Table 4 presents the head-to-head comparison against production baselines. All models are trained on the same customer partition and evaluated with an identical label pipeline, so differences reflect model choice rather than data or preprocessing artifacts.
The headline finding is simple: a single survival model beats three independently-trained per-horizon baselines at every horizon we evaluate.
-
AFT wins overall. The best AFT configuration (Log-Normal, 84 features) reaches P@14d = 0.3788, an improvement of +0.82% over the strongest per-horizon baseline (, 0.3757). Within the Weibull family, ranking improves monotonically as decreases from 2.0 to 0.5, confirming that the empirical hazard analysis (§5.1.1) translates directly into ranking gains.
-
Survival models are more efficient. The production baseline trains three 800-tree models (2,400 trees in aggregate).
Kekuda et al.
Table 4: Main results: cross-horizon evaluation on a held-out customer partition. P@h = precision-at-variable-k at horizon h; topkN = fixed-k precision at k=N with 14-day labels. † = production baseline. ‡ = shape-aligned with the empirical . Bold entries mark the best in each column.
| Model | P@7d | P@14d | P@28d | topk4 | topk8 | topk16 |
|---|---|---|---|---|---|---|
| Per-horizon binary classifiers (3 separate models, 84 feats) | ||||||
| .3417 | .3717 | .3970 | .5215 | .4486 | .3644 | |
| .3438 | .3757 | .4022 | .5288 | .4540 | .3680 | |
| .3421 | .3758 | .4045 | .5290 | .4539 | .3680 | |
| DT-Hazard (single model, 84 feats, per-horizon ranking via ) | ||||||
| .3406 | .3692 | .3944 | .5151 | .4428 | .3603 | |
| .3443 | .3748 | .4006 | .5263 | .4515 | .3665 | |
| .3445 | .3767 | .4041 | .5305 | .4547 | .3686 | |
| AFT Weibull (single model, 84 feats, horizon-invariant ranking) | ||||||
| (increasing) | .3448 | .3777 | .4062 | .5326 | .4566 | .3697 |
| (exponential) | .3451 | .3783 | .4066 | .5328 | .4568 | .3700 |
| (decreasing) | .3454 | .3785 | .4070 | .5330 | .4569 | .3701 |
| AFT alternate distributions (single model, 84 feats) | ||||||
| Log-Normal () | .3461 | .3788 | .4069 | .5329 | .4570 | .3704 |
| Logistic (s=2) | .3455 | .3787 | .4071 | .5326 | .4569 | .3702 |
The best AFT model uses a single ensemble of 330–765 trees, and the DT model uses 273 trees. Overall, a single survival model replaces roughly 2,400 trees with ~700. This is a 3× reduction in training and serving compute with no loss in ranking quality.
-
DT ties AFT at 7 days. The DT model ties AFT for 7-day precision (0.3445), but its best score is achieved by the full CDF , which behaves effectively as a horizon-invariant ranking. This observation reinforces AFT's inductive bias, suggesting horizon-invariant ordering does most of the work.
-
Independent classifiers transfer poorly. The 7d-trained model performs worst at 28 days (0.3970 vs. 0.4045 for the horizon-matched model), and, more surprisingly, outperforms even at 7 days (0.3438 vs. 0.3417), indicating that the 14-day label may provide a more informative training signal.
-
DT's full CDF dominates its horizon-specific scores. outperforms and at all horizons, including 7 days. Because aggregates information from every interval while uses only the first, the richer signal yields better rankings even at short horizons. For ranking, then, the practical takeaway is to always use the full CDF; individual interval hazards are best reserved for probability estimation.
6 Feature Importance Under Survival Objectives
Switching from binary logistic to a survival objective visibly reshuffles feature importance, even when the feature set is held fixed. Both the production classifier and our best AFT models (Weibull and Log-Normal ) use the same 84 production features, and all importance values below are XGBoost's average gain per split, computed on the trees actually used at inference.
The top three features total grocery orders, item unavailability, and base propensity score, are stable across all three objectives, and rank correlation with the production model is high overall (Spearman across the shared features). Yet almost a quarter of the features shift by ten ranks or more, and the pattern of those shifts is highly informative.
Features that rise under the survival objective. Channel-mix features, both at the customer level and at the product-type level, become sharply more important. The single largest riser is a product-type-level online-channel order count, which jumps roughly forty ranks under Weibull and nearly fifty ranks under Log-Normal, moving from well outside the production top 30 into the top 20 of both AFT models. A customer-level online-channel share climbs from rank 34 to rank 10 (Weibull) and rank 7 (Log-Normal), and total online-channel orders rises from rank 18 into the top 6 of both models. These features encode shopping cadence: online delivery and in-store pickup run on different weekly rhythms, and the timing objective picks up on this structure. Item unavailability rises from rank 3 to rank 2 in both AFT models: knowing that an item was recently out-of-stock directly constrains when a customer will retry. Related coarse indicators, including partial-fulfillment and lapse-bucket flags, also rise substantially under Log-Normal, each climbing roughly thirty ranks into the top 30.
Features that fall. Aggregate rolling-window frequency counts uniformly drop. The starkest example is the 3-month order total, which collapses from rank 12 to rank 54 (Weibull) / 46 (Log-Normal). This is the largest single fall in either survival model. Weekly and monthly rolling-average order counts fall 15–20 places, and a product-type-level in-store order count drops from rank 7 to rank 24
Both AFT models triggered early stopping; importance is computed on the “best-iteration” slice of each booster.
Timing-Aware Repurchase Prediction for Web-Scale E-Commerce: Survival Models for Multi-Surface Grocery Recommendation RecSys '26, October 2026, Minneapolis, USA
/ 26. The survival objective demotes “how much?” features in favour of “how recently?” and “through which channel?” features.
Timing features: Log-Normal demotes deep history. Log-Normal retains only the recent recency signals, including days since the last purchase (rank 8), the second-last (rank 18), and the third-last (rank 19), while demoting deep history: days since the fifth-last purchase drops from rank 11 to rank 20 (-9) and the fourth-last from rank 16 to rank 25 (-9). Weibull is more conservative here, keeping the fifth-last recency signal at rank 11 in line with production, and this is one of several places where the two AFT distributions carve up the timing signal differently.
Where the two AFT distributions disagree. The clearest example is an IPI-lapse residual, defined as the customer's typical inter-purchase interval minus their current elapsed time, which is rank 18 in the Weibull model but only rank 44 in the Log-Normal model. The residual encodes "how far past the typical inter-purchase gap this customer is". This quantity aligns with Weibull's monotonically increasing conditional hazard (the further overdue, the more urgent) but is far less useful under Log-Normal's non-monotone, bell-shaped hazard. Conversely, Log-Normal leans more heavily on product-type-level channel features and coarse lapse indicators. The two distributions thus embody slightly different notions of "timing": Weibull as an "overdue score" and Log-Normal as a channel- and cadence-mixture signal.
Personal vs. population IPI.. A personal item IPI (the customer's own median inter-purchase interval for the item) sits at rank 15 under Log-Normal and rank 20 under Weibull, while its population-level counterpart sits just outside the top 30, functioning as a low-gain cold-start routing feature.
7 Calibration
Raw AFT outputs are not directly calibrated as repurchase probabilities which are required by downstream applications. For example, a typical predicted median days, yields a raw , which is orders of magnitude below the empirical 14-day repurchase rate of . Calibration is therefore necessary regardless of the choice of distribution family.
7.1 Distribution-Matched Parametric Calibration
Each AFT distribution admits a natural calibration link that preserves its parametric form. We fit a shape parameter shared across horizons together with per-horizon intercepts for : Weibull (cloglog):
Log-Normal (probit):
Both links share the same structure: a linear function of with slope and per-horizon intercept . The shared- formulation guarantees cross-horizon monotonicity by construction, in contrast to isotonic calibration, which would require per-row clipping. Only four parameters are needed to cover three horizons.
Fitting. are fit by minimizing joint per-horizon binary cross-entropy on a held-out validation set via Nelder–Mead optimization ( 300 function evaluations, well under a second).
7.2 Results
We calibrate three AFT variants on the full test set (hundreds-of-millions of customer-item pairs): Exponential (Weibull ), Weibull , and Log-Normal . The fitted parameters:
Exponential (Weibull ) + cloglog: , , , .
Weibull .
Log-Normal .
In all three cases, the fitted is close to , the inverse of the training scale parameter. The expected values are 1 for Exponential, for Weibull and Log-Normal . This agreement suggests that the calibration recovers the expected scale adjustment. Cross-horizon monotonicity holds with zero violations across every row of the hundreds-of-millions holdout for all three calibrations, guaranteed by the shared- formulation.
Calibration quality varies by an order of magnitude. Table 5 reports ECE, sanity ratio , and top-tier operating points on the 14-day horizon. Exponential AFT is decisively the best-calibrated model: its ECE at 14 days is lower than Weibull and lower than Log-Normal , with sanity ratios within 0.4% of unity at every horizon. The reliability diagrams (Figure 4) confirm that Exponential tracks the diagonal tightest across all three horizons.
Why Log-Normal calibrates worse despite winning ranking. Log-Normal's ECE gap is not a fitting failure. The shared-a fit converges to the joint negative log-likelihood (NLL) minimum on the val set for all three distributions. The gap traces to a hazard-shape mismatch. Log-Normal has a non-monotone bell-shaped hazard: it rises then falls, peaking near the mode of the underlying normal. The empirical hazard ( ) is monotonically decreasing ( ), so Log-Normal's rising left tail concentrates probability mass in regions where the true hazard is already at its peak. A single shared a cannot correct this per-instance shape mismatch, especially at the shortest horizon (7 days), where the mismatch is largest. Weibull's cloglog link, by contrast, is the exact CDF form of the distribution the model was trained under; calibration only needs to make small corrections. Exponential (k=1) is the sweet spot: the flat hazard is locally close to the empirical near-flat hazard, and the cloglog link inherits Weibull's structural advantage.
Operating-point interpretation. The three variants also expose a coverage–precision structure at the top confidence tier ( ). Exponential surfaces roughly the top-tier volume of Weibull and that of Log-Normal, at 81.6% precision. Weibull reaches 87.4% and Log-Normal 90.5% precision but on a much smaller candidate set. This is a direct consequence of calibration quality: Exponential's scores land at empirical rate (mildly under-confident; close to 1 in the tier), whereas Log-Normal's scores over-shoot substantially, which artificially
Kekuda et al.
Table 5: Calibration comparison on the full test set (14-day horizon; hundreds-of-millions of customer-item pairs). “ratio” is ; ideal = 1.000. “coverage” is fraction of the full test set with . ECE computed over 10 equal-count deciles.
| Calibration | ECE | ratio | P≥0.70 cov | P≥0.70 prec |
|---|---|---|---|---|
| Exponential (Weibull k=1) | 0.00013 | 1.004 | 0.132% | 81.6% |
| Weibull k=0.5 | 0.00036 | 1.009 | 0.068% | 87.4% |
| Log-Normal (σ=2) | 0.00075 | 1.009 | 0.036% | 90.5% |

Figure 4: Reliability diagrams on the full test set (hundreds-of-millions of customer-item pairs, 10 equal-count deciles per horizon, log-log axes to reveal the six decades of predicted probability the score distribution actually spans). Exponential (Weibull , green) tracks the diagonal tightest across all three horizons; Weibull (red) is close behind; Log-Normal (blue) deviates most at the shortest horizon (7 days), where the bell-shaped hazard mismatches the empirical monotone-decreasing hazard the worst.
inflates tier precision at the cost of much lower coverage. For most surfaces the Exponential trade-off dominates: honest probabilities enable threshold-agnostic downstream use (bidding, badge rendering, propensity fusion), while the raw ranking remains within 0.3% relative of the ranking-best Log-Normal (§5.3).
8 Discussion and Conclusion
The core message of this paper is straightforward: asking “when?” instead of “will they?” yields a better recommender essentially for free. A single AFT model replaces three per-horizon binary classifiers, uses roughly fewer total trees, wins at every horizon, and serves multiple web surfaces from a single ranked list. The DT model offers per-horizon discrimination in principle, yet its own best score is achieved by the full CDF, which behaves as a horizon-invariant ranking, further validating AFT’s inductive bias.
Along the way we observed several effects worth highlighting. Distributional choice has a small but measurable impact: Log-Normal edges Weibull and Logistic at shorter horizons, though all three comfortably beat the per-horizon baselines. Paradoxically, Weibull provides the tightest fit to conditional residuals across all trained models, yet Log-Normal wins on ranking; the loss function's role as an inductive bias matters more than its role as a distributional fit. The scale parameter does not change the ranking formula but does affect learned predictions through the training-loss gradient, and the Weibull shape prior matters under proper regularization. One decision, however, is catastrophic: dropping censored items destroys generalization to long-cadence buyers, no amount of regularization recovers it. Finally, the survival objective reshuffles feature importance in predictable ways: channel-cadence and recent-recency signals rise sharply while aggregate frequency counts fall, with direct implications for feature engineering in any timing-sensitive recommender.
On top of ranking, a 4-parameter parametric calibration turns the raw survival CDF into deployable per-horizon probabilities. Calibration quality separates the AFT family in a way ranking does not: Exponential (Weibull ) reaches ECE with sanity ratios within of unity, while Log-Normal, despite winning marginal fit and ranking, trails by an order of magnitude on ECE because its bell-shaped hazard mismatches the empirical monotone-decreasing hazard. For probability-consuming surfaces (bidding, badge rendering, propensity fusion) we adopt Exponential; for pure ranking, Log-Normal remains the strongest.
Deployment efficiency. Beyond ranking quality, the survival formulation simplifies operations: a single AFT model replaces three independently-trained per-horizon classifiers, eliminating two-thirds of training pipelines, serving endpoints, and A/B test configurations. Feature engineering is shared across horizons, and the model's ranking is reusable across web surfaces without re-inference. Only the thin calibration layer changes per horizon.
Practical considerations. AFT ranking is horizon-invariant by construction; applications that genuinely require different orderings per horizon should use the DT formulation, at the cost of a data expansion and negative sampling. All results reported here are offline; online A/B testing on live traffic is the natural next step.
Limitations. Our experiments are offline and drawn from a single, proprietary grocery retailer's dataset; we have not yet validated the findings on public repurchase benchmarks (e.g., Dunnhumby, Instacart, Tafeng) or on non-grocery verticals such as health-and-beauty or general merchandise, where inter-purchase cadences and censoring patterns may differ substantially. Both the distribution family and its scale parameter are estimated globally; per-category parameters (e.g., weekly milk vs. monthly detergent) may yield further gains. The AFT model does not model basket-level dependencies between items bought together, and the 30-day censoring window truncates long-cadence items whose true repurchase times extend beyond it.
Future work. Several avenues follow naturally. Reproducing the empirical hazard analysis and the AFT-vs-DT comparison on public repurchase benchmarks would test whether the finding and the calibration–ranking trade-off hold beyond a single retailer. Per-item distribution parameters could better capture multi-modal repurchase cycles; CDF-based urgency reranking could power time-sensitive surfaces; joint training with basket size and order timing could unify the timing stack; and survival scores could serve as informative priors in generative retrieval pipelines.
Timing-Aware Repurchase Prediction for Web-Scale E-Commerce: Survival Models for Multi-Surface Grocery Recommendation RecSys '26, October 2026, Minneapolis, USA
References
[1] Paul D. Allison. 1982. Discrete-Time Methods for the Analysis of Event Histories. Sociological Methodology 13 (1982), 61–98.
[2] Mozhdeh Ariannezhad, Sébastien Jullien, Ming Li, Min Fang, Sebastian Schelter, and Maarten de Rijke. 2022. ReCANet: A Repeat Consumption-Aware Neural Network for Next Basket Recommendation in Grocery Shopping. In Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval. ACM, New York, NY, USA, 1240–1250.
[3] Rahul Bhagat, Srevatsan Muralidharan, Alex Lobzhanidze, and Shankar Vishwanath. 2018. Buy It Again: Modeling Repeat Purchase Recommendations. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, New York, NY, USA, 62–70.
[4] Yanan Cao, Ashish Ranjan, Sinduja Subramaniam, Evren Korpeoglu, Kaushiki Nag, and Kannan Achan. 2026. CASE: Cadence-Aware Set Encoding for Large-Scale Next Basket Repurchase Recommendation. In Proceedings of the 49th International ACM SIGIR Conference on Research and Development in Information Retrieval (Industry Track). ACM. doi:10.48550/arXiv.2604.06718
[5] Praveen Chandar, Brian St. Thomas, Lucas Maystre, Vijay Pappu, Roberto Sanchis-Ojeda, Tiffany Wu, Ben Carterette, Mounia Lalmas, and Tony Jebara. 2022. Using Survival Models to Estimate User Engagement in Online Experiments. In Proceedings of the ACM Web Conference 2022 (WWW). ACM, New York, NY, USA, 3186–3195.
[6] Tianqi Chen and Carlos Guestrin. 2016. XGBoost: A Scalable Tree Boosting System. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, New York, NY, USA, 785–794.
[7] D. R. Cox. 1972. Regression Models and Life-Tables. Journal of the Royal Statistical Society: Series B (Methodological) 34, 2 (1972), 187–202.
[8] Bradley Efron. 1988. Logistic Regression, Survival Analysis, and the Kaplan-Meier Curve. J. Amer. Statist. Assoc. 83, 402 (1988), 414–425.
[9] Maurizio Ferrari Dacrema, Paolo Cremonesi, and Dietmar Jannach. 2019. Are We Really Making Much Progress? A Worrying Analysis of Recent Neural Recommendation Approaches. In Proceedings of the 13th ACM Conference on Recommender Systems. ACM, New York, NY, USA, 101–109.
[10] Léo Grinsztajn, Edouard Oyallon, and Gaël Varoquaux. 2022. Why Do Tree-Based Models Still Outperform Deep Learning on Typical Tabular Data?. In Advances in Neural Information Processing Systems 35: Datasets and Benchmarks Track.
[11] Balázs Hidasi, Alexandros Karatzoglou, Linas Baltrunas, and Domonkos Tikk. 2016. Session-Based Recommendations with Recurrent Neural Networks. In International Conference on Learning Representations (ICLR). OpenReview.net, San Juan, Puerto Rico.
[12] Haoji Hu and Xiangnan He. 2019. Sets2Sets: Learning from Sequential Sets with Neural Networks. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, New York, NY, USA, 1491–1499.
[13] Haoji Hu, Xiangnan He, Jinyang Gao, and Zhi-Li Zhang. 2020. Modeling Personalized Item Frequency Information for Next-Basket Recommendation. In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval. ACM, New York, NY, USA, 1071–1080.
[14] John D. Kalbfleisch and Ross L. Prentice. 2002. The Statistical Analysis of Failure Time Data (2nd ed.). John Wiley & Sons, Hoboken, NJ, USA.
[15] E. L. Kaplan and Paul Meier. 1958. Nonparametric Estimation from Incomplete Observations. J. Amer. Statist. Assoc. 53, 282 (1958), 457–481.
[16] Komal Kapoor, Karthik Subbian, Jaideep Srivastava, and Paul Schrater. 2015. Just in Time Recommendations: Modeling the Dynamics of Boredom in Activity Streams. In Proceedings of the Eighth ACM International Conference on Web Search and Data Mining. ACM, New York, NY, USA, 233–242.
[17] Duc-Trong Le, Hady W. Lauw, and Yuan Fang. 2019. Correlation-Sensitive Next-Basket Recommendation. In Proceedings of the 28th International Joint Conference on Artificial Intelligence (IJCAI). IJCAI, Macao, China, 2808–2814.
[18] Ming Li, Sami Jullien, Mozhdeh Ariannezhad, and Maarten de Rijke. 2023. A Next Basket Recommendation Reality Check. ACM Transactions on Information Systems 41, 4 (2023), 116:1–116:29.
[19] Jiaqi Ma, Zhe Zhao, Xinyang Yi, Jilin Chen, Lichan Hong, and Ed H. Chi. 2018. Modeling Task Relationships in Multi-Task Learning with Multi-Gate Mixture-of-Experts. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, New York, NY, USA, 1930–1939.
[20] Pengjie Ren, Zhumin Chen, Jing Li, Zhaochun Ren, Jun Ma, and Maarten de Rijke. 2019. RepeatNet: A Repeat Aware Neural Recommendation Machine for Session-Based Recommendation. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 33. AAAI Press, Palo Alto, CA, USA, 4806–4813.
[21] Steffen Rendle, Christoph Freudenthaler, and Lars Schmidt-Thieme. 2010. Factorizing Personalized Markov Chains for Next-Basket Recommendation. In Proceedings of the 19th International Conference on World Wide Web. ACM, New York, NY, USA, 811–820.
[22] Steffen Rendle, Walid Krichene, Li Zhang, and John Anderson. 2020. Neural Collaborative Filtering vs. Matrix Factorization Revisited. In Proceedings of the
14th ACM Conference on Recommender Systems. ACM, New York, NY, USA, 240–248.
[23] Ravid Shwartz-Ziv and Amitai Armon. 2022. Tabular Data: Deep Learning is Not All You Need. Information Fusion 81 (2022), 84–90.
[24] Judith D. Singer and John B. Willett. 2003. Applied Longitudinal Data Analysis: Modeling Change and Event Occurrence. Oxford University Press, New York, NY, USA.
[25] Fei Sun, Jun Liu, Jian Wu, Changhua Pei, Xiao Lin, Wenwu Ou, and Peng Jiang. 2019. BERT4Rec: Sequential Recommendation with Bidirectional Encoder Representations from Transformer. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management. ACM, New York, NY, USA, 1441–1450.
[26] Mengting Wan, Di Wang, Jie Liu, Paul Bennett, and Julian McAuley. 2018. Representing and Recommending Shopping Baskets with Complementarity, Compatibility and Loyalty. In Proceedings of the 27th ACM International Conference on Information and Knowledge Management. ACM, New York, NY, USA, 1133–1142.
[27] L. J. Wei. 1992. The Accelerated Failure Time Model: A Useful Alternative to the Cox Regression Model in Survival Analysis. Statistics in Medicine 11, 14–15 (1992), 1871–1879.
[28] Feng Yu, Qiang Liu, Shu Wu, Liang Wang, and Tieniu Tan. 2016. A Dynamic Recurrent Model for Next Basket Recommendation. In Proceedings of the 39th International ACM SIGIR Conference on Research and Development in Information Retrieval. ACM, New York, NY, USA, 729–732.
[29] Le Yu, Leilei Sun, Bowen Du, Chuanren Liu, Hui Xiong, and Weifeng Lv. 2020. Predicting Temporal Sets with Deep Neural Networks. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, New York, NY, USA, 1083–1091.
[30] Yu Zhu, Hao Li, Yikang Liao, Beidou Wang, Ziyu Guan, Haifeng Liu, and Deng Cai. 2017. What to Do Next: Modeling User Behaviors by Time-LSTM. In Proceedings of the 26th International Joint Conference on Artificial Intelligence (IJCAI). AAAI Press, Melbourne, Australia, 3602–3608.