Design paper
Behavioural cohorts for customer lifetime value prediction: a design
Abstract
Customer lifetime value (LTV) predictions decide how much a store spends to acquire, keep and win back each customer. Established models predict future purchases from the number and timing of past transactions; behavioural event streams carry signals those summaries leave out. We describe a design that groups customers into behavioural cohorts learned from event sequences and predicts LTV with three model families: probabilistic purchase models as the baseline, a neural model with a loss built for the many zero-value customers, and survival models for retention. We argue each part from published work on customer-base analysis, survival analysis, density-based clustering, sequence models and privacy. We give a map from each component to the problem it addresses and the evidence behind it, a worked model of how retention drives LTV, and the evaluation protocol a deployment would need before any accuracy claim could be made. We report no accuracy figures of our own. This is a design proposal, not a measured result.
Method. Design paper: the architecture is argued from the cited literature; we report no measurements of our own. Table 2 is a worked model with its inputs shown.
1Context and motivation
A store that knows roughly what each customer will be worth over the next months can decide how much to spend on acquiring, keeping and winning back that customer. Customer lifetime value (LTV) models exist for that purpose, and the marketing literature reviews a range of them that are used for segmentation and for allocating spend between acquisition, retention and cross-selling1.
The established models work from the transaction record. The Pareto/NBD model uses the number and timing of a customer's past purchases to compute the probability that the customer is still active and to predict future purchases2. The BG/NBD model changes the story of how customers drop out slightly and is much easier to estimate, while giving very similar results across a wide range of purchasing settings3. Combined with a gamma-gamma submodel for spend per transaction, this family links the familiar recency, frequency and monetary value (RFM) summaries to a formal LTV prediction4.
An online store records far more than transactions: page views, searches, cart changes, checkout steps and returns. Some of that behaviour may say something about future value that recency and frequency do not. In the system Chamberlain and colleagues describe at an online fashion retailer, customer embeddings learned from browsing data improved LTV prediction over an extensive set of handcrafted features5. That is one retailer's result, not a general law, but it motivates the question this paper takes up: how to add behavioural event sequences to LTV prediction without losing the calibration, interpretability and privacy properties of the transaction models.
We describe the architecture we propose. We do not report its accuracy, because we have not measured it.
2Design principles
- The transaction models are the baseline, not a straw man. Every new model must beat BG/NBD with a gamma-gamma spend model on the same holdout before it is used3, 4.
- Cohorts are learned, then checked. Behavioural cohorts come from clustering learned sequence representations, and a cohort is only used if it is stable across refits.
- Predict a distribution, not a point. Many customers buy once and never return, and a few spend very large amounts. The model should represent both facts directly6.
- Retention is modelled as time to an event. Customers who have not yet churned are censored observations, not zeros.
- Privacy constrains the features. Cohort outputs are released only above a minimum size, and published aggregates carry calibrated noise.
- Every prediction is traceable to the model version, cohort assignment and feature snapshot that produced it.
3Architecture
The design has five layers: telemetry, sequence representation, cohort generation, value models, and calibration and serving.
3.1Telemetry
The input is a per-customer sequence of events: sessions, product views, searches, cart additions and removals, checkout steps, payment attempts, orders and returns, each with a timestamp, device class and region. Identifiers are pseudonymous and demographic attributes are excluded. Fine-grained interaction signals such as scroll speed or time spent hesitating at a step are candidates, not assumptions: whether they add predictive value beyond transactions is one of the questions the evaluation has to answer, and each such signal must earn its place on the holdout.
3.2Sequence representation
A Transformer encoder maps each customer's recent event sequence to a fixed-length vector. Self-attention lets the encoder relate events that are far apart in the sequence without recurrence7. The encoder is trained on a self-supervised objective over event sequences and then frozen, so that cohort assignments do not change every time a value model is retrained.
3.3Cohort generation
Customers are clustered in the representation space with HDBSCAN. The method builds a hierarchy of density-based clusters and selects significant clusters from it with a cluster stability measure, so the number of cohorts does not have to be fixed in advance8. Customers who fall in low-density regions are not forced into a cohort; they are scored by the transaction baseline alone.
Clusters are named only after inspection, and names describe behaviour, never presumed motive. A cohort is used downstream only if it reappears when the clustering is refitted on a later window. We record the overlap between successive refits as a cohort stability index and treat a falling index as a drift alert.
Cohorts relate to an older idea. Iso-value curves group customers with different purchase histories but similar predicted future value4. Behavioural cohorts group customers by how they behave, which is a different axis. The design keeps both: the cohort is a feature, and the predicted value remains the quantity that drives decisions.
3.4Value models
Three model families run side by side.
- Probabilistic baseline. BG/NBD for the purchase count and the probability of being active, with a gamma-gamma model for spend per transaction3, 4. It needs only recency, frequency, customer age and average spend, so it covers every customer, including those with sparse behavioural data. A stochastic RFM ranking of customers by expected contribution is a further simple reference9.
- Neural value model. A network takes the transaction summary, the sequence representation and the cohort as inputs, and is trained with a zero-inflated lognormal loss: a point mass at zero for customers who do not return, plus a lognormal distribution for the spend of those who do. This loss captures churn probability and the heavy tail of spend at the same time, and gives an uncertainty estimate for each prediction6. A gradient-boosted tree model on the same inputs gives an interpretable reference10.
- Retention model. Time to churn is modelled with censored survival methods. The Cox proportional hazards model relates the hazard of an event to explanatory variables while leaving the baseline hazard over time unspecified11. DeepSurv replaces the linear risk function with a neural network, which lets it model interactions between covariates without hand-built terms12. DeepSurv was developed and evaluated on medical survival data, so its behaviour on customer data is an open question for the evaluation.
The value used for decisions combines the retention curve with predicted margin per period, discounted to the present, which is the standard structure of LTV models1.
3.5Calibration and serving
Predictions are calibrated per region on recent holdout data, so that a predicted value means the same thing in each market. Scores refresh in batch daily; a streaming path updates the cohort feature when a customer's recent behaviour moves them across a cohort boundary. Every score is logged with the model version, cohort version and feature snapshot.
Table 1 summarises the components, the problem each addresses and the published work each rests on.
| Component | Problem it addresses | Evidence |
|---|---|---|
| BG/NBD with gamma-gamma spend baseline | Need for a calibrated, low-data reference prediction | 3, 4 |
| Probability of being active | Distinguishing quiet customers from customers who have left | 2 |
| Learned sequence representations | Handcrafted features miss structure in browsing behaviour | 5, 7 |
| Density-based cohort clustering | Fixed segment counts and forced assignment of outliers | 8 |
| Zero-inflated lognormal loss | Many zero-value customers and a heavy tail of high spenders | 6 |
| Censored survival models | Customers still active at the cut-off are not zeros | 11, 12 |
| Gradient-boosted tree reference | Need for an interpretable non-linear comparison | 10 |
| Minimum cohort size for released outputs | Small groups allow re-identification | 13 |
| Noise calibrated to query sensitivity | Published aggregates leak information about individuals | 14 |
| Controlled experiments for spend allocation | Prediction accuracy does not show that acting on it pays | 15 |
Source: our design, with the works cited in the table.
4A worked model: why retention dominates
The value models are judged on accuracy, but what drives value is mostly retention. Table 2 shows this with the simplest LTV form, constant margin per period m, constant retention probability r and discount rate i, summed over an infinite horizon. The sum of m r^t / (1 + i)^t for t from 1 upwards equals m r / (1 + i - r). All inputs are illustrative, not measurements.
| Case | Margin per period (m, input) | Retention per period (r, input) | Discount rate (i, input) | LTV = m r / (1 + i - r) |
|---|---|---|---|---|
| A | 20 | 0.6 | 0.1 | 24.0 |
| B | 20 | 0.8 | 0.1 | 53.3 |
| C | 30 | 0.6 | 0.1 | 36.0 |
Source: Worked model; inputs in the table.
Raising retention from 0.6 to 0.8 (case A to case B) more than doubles the value, while raising margin by half (case A to case C) raises value by half. The arithmetic is why the design gives retention its own survival model rather than folding it into a single regression, and why errors in the retention estimate matter more than equal-sized errors in the spend estimate. Real retention is neither constant nor the same for every customer, which is the reason for the cohort and survival layers.
5Evaluation protocol
Before any accuracy or business claim about this design could be made, a deployment would need to pass the following protocol.
- Temporal holdout. Models are fitted on a calibration window and evaluated on the following window, never on a random split, so that the test resembles forecasting the future.
- Baselines first. Every model is compared with BG/NBD plus gamma-gamma and with the stochastic RFM ranking on the same customers4, 9.
- Discrimination and calibration. Following Wang and colleagues, discrimination is measured with the normalised Gini coefficient and calibration with decile charts of predicted against actual value6. Mean absolute error on total holdout value is reported alongside, by region and by cohort.
- Retention fit. Predicted survival curves are compared with observed retention per cohort, with censoring handled as in the Cox model11.
- Ablation. Each behavioural signal group is removed in turn to show whether it adds value over the transaction summary.
- Cohort stability. The overlap between cohort assignments across successive refits is reported, with a threshold set from observed baselines.
- Decision value. Accuracy alone does not show that acting on predictions pays. Any claim that LTV-based allocation improves return on spend needs a randomised experiment with pre-registered metrics and guardrails15.
We do not propose target values for any of these metrics. They should be set from measured baselines, which we do not have.
6Regional variation
Customers in different markets may differ in purchase frequency, response to promotions, payment methods and device mix. The design does not assume any particular pattern per region. It calibrates predictions per region, reports every evaluation metric per region, and treats a large gap in accuracy between regions as a fault to investigate. Whether a single model with region features does better than separate regional models is an empirical question for the protocol above.
7Privacy and fairness
The design excludes demographic attributes and works from pseudonymous identifiers. Two published techniques set the release rules. A cohort statistic is released only if the cohort contains at least k customers, so that no released record maps to fewer than k individuals13. Aggregates published outside the modelling team, for example cohort-level LTV in a merchant dashboard, carry noise whose scale is calibrated to how much any one customer can change the statistic14. The accuracy cost of that noise is a quantity to measure, not one we can state.
Excluding demographics does not remove the risk of unequal treatment, because behavioural signals can correlate with protected characteristics. The evaluation therefore compares calibration across the groups for which a store can lawfully check it, and a model that is systematically less calibrated for one group is not deployed.
8Illustrative scenarios
The scenarios below are hypothetical. They show how the layers would interact; they are not results.
A quiet repeat buyer. A customer who bought four times in a year and then went quiet for two months would get a falling probability of being active from the baseline2. If the same customer kept browsing and adding items to a cart, the sequence representation could place them in a cohort whose members usually return, and the neural model could keep their value higher than the baseline would. Whether that adjustment is right is what the ablation would show.
A first-time buyer. A customer with one purchase has almost no transaction history. The baseline gives a population-level prediction; the zero-inflated model gives a probability of never returning and a spend distribution if they do6. A retention offer would be tested against no offer in a randomised experiment before it became policy.
9Limitations
- No measurements. We have not measured the accuracy of any part of this design on real data. Every benefit implied here is a hypothesis to be tested with the protocol above.
- Unproven signals. Whether fine-grained interaction signals add predictive value over transactions is unknown for our setting. The evidence we cite comes from one retailer5.
- Cohort drift. Learned cohorts can shift under market shocks or catalogue changes, and refitting the encoder changes them. The stability index detects drift; it does not prevent it.
- Sparse data. Customers and categories with few events give weak behavioural signals; for them the design falls back to the transaction baseline.
- Model transfer. DeepSurv was developed for medical data12, and the zero-inflated lognormal loss was demonstrated on two public datasets6. Neither is shown to transfer to our data.
- Privacy cost. Minimum cohort sizes and calibrated noise reduce accuracy for small cohorts by an amount we have not measured.
- Decisions. A more accurate LTV prediction does not by itself improve spending decisions; only experiments can show that.
10Conclusion
We have described a design that adds behavioural cohorts, learned from event sequences, to customer lifetime value prediction while keeping the established probabilistic purchase models as the baseline. The design predicts a distribution of value rather than a point, models retention as censored time to churn, and releases cohort outputs under k-anonymity and calibrated noise. Each part rests on published methods, summarised in Table 1. What the design lacks is evidence of its own accuracy. The next step is to run the evaluation protocol on one region's holdout data and report what is measured.
References
- 1
Gupta, S., Hanssens, D., Hardie, B., Kahn, W., Kumar, V., Lin, N., Ravishanker, N., & Sriram, S. (2006). Modeling customer lifetime value. Journal of Service Research, 9(2). doi.org/10.1177/1094670506293810
- 2
Schmittlein, D. C., Morrison, D. G., & Colombo, R. (1987). Counting your customers: Who are they and what will they do next?. Management Science, 33(1). doi.org/10.1287/mnsc.33.1.1
- 3
Fader, P. S., Hardie, B. G. S., & Lee, K. L. (2005). "Counting your customers" the easy way: An alternative to the Pareto/NBD model. Marketing Science, 24(2). doi.org/10.1287/mksc.1040.0098
- 4
Fader, P. S., Hardie, B. G. S., & Lee, K. L. (2005). RFM and CLV: Using iso-value curves for customer base analysis. Journal of Marketing Research, 42(4). doi.org/10.1509/jmkr.2005.42.4.415
- 5
Chamberlain, B. P., Cardoso, Â., Liu, C. H. B., Pagliari, R., & Deisenroth, M. P. (2017). Customer lifetime value prediction using embeddings. Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. doi.org/10.1145/3097983.3098123
- 6
Wang, X., Liu, T., & Miao, J. (2019). A deep probabilistic model for customer lifetime value prediction. arXiv:1912.07753. arxiv.org/abs/1912.07753
- 7
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017). Attention is all you need. Advances in Neural Information Processing Systems 30 (arXiv:1706.03762). arxiv.org/abs/1706.03762
- 8
Campello, R. J. G. B., Moulavi, D., & Sander, J. (2013). Density-based clustering based on hierarchical density estimates. Advances in Knowledge Discovery and Data Mining: PAKDD 2013, Lecture Notes in Computer Science, Springer. doi.org/10.1007/978-3-642-37456-2_14
- 9
Colombo, R., & Jiang, W. (1999). A stochastic RFM model. Journal of Interactive Marketing, 13(3). doi.org/10.1002/(SICI)1520-6653(199922)13:3<2::AID-DIR1>3.0.CO;2-H
- 10
Chen, T., & Guestrin, C. (2016). XGBoost: A scalable tree boosting system. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. doi.org/10.1145/2939672.2939785
- 11
Cox, D. R. (1972). Regression models and life-tables. Journal of the Royal Statistical Society: Series B (Methodological), 34(2). doi.org/10.1111/j.2517-6161.1972.tb00899.x
- 12
Katzman, J. L., Shaham, U., Cloninger, A., Bates, J., Jiang, T., & Kluger, Y. (2018). DeepSurv: Personalized treatment recommender system using a Cox proportional hazards deep neural network. BMC Medical Research Methodology, 18. doi.org/10.1186/s12874-018-0482-1
- 13
Sweeney, L. (2002). k-anonymity: A model for protecting privacy. International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems, 10(5). doi.org/10.1142/S0218488502001648
- 14
Dwork, C., McSherry, F., Nissim, K., & Smith, A. (2006). Calibrating noise to sensitivity in private data analysis. Theory of Cryptography: TCC 2006, Lecture Notes in Computer Science, Springer. doi.org/10.1007/11681878_14
- 15
Kohavi, R., Tang, D., & Xu, Y. (2020). Trustworthy online controlled experiments: A practical guide to A/B testing. Cambridge University Press. doi.org/10.1017/9781108653985
Cite this paper
Tanqory Research (2025). Behavioural cohorts for customer lifetime value prediction: a design. Tanqory. https://tanqory.com/research/20251015-behavioral-cohort-ltv-modeling