Machine Learning
Swiggy's Compact Multi-Task Model Predicts Customer Lifetime Value Before First Order
The Indian delivery company built a machine learning system using 350+ features and auxiliary prediction tasks to estimate long-term customer value upfront for ad targeting.
InfoQ
Swiggy has created an in-house predicted lifetime value (pLTV) system to forecast how much revenue individual customers will generate across its food delivery and Instamart quick commerce operations. The crucial innovation: the model makes this prediction before a customer places their first order, allowing the company to optimize advertising budgets based on expected long-term value rather than immediate conversion signals.
The Cold-Start Challenge#
Building such a predictor faces a fundamental obstacle. New users present sparse data — minimal behavioral signals exist before they transact for the first time. Adding to the complexity, the distribution of customer value is highly skewed; many users never order in their first 30 days, while a smaller cohort generates outsized lifetime value. The system must therefore spot meaningful patterns among users who initially appear nearly indistinguishable yet later exhibit vastly different ordering behaviors.
Feature-Rich but Lean Architecture#
Swiggy assembled more than 350 signals spanning acquisition channels, device information, fraud markers, geographic patterns, complaint records, category preferences, order history, payment behaviors, and socioeconomic proxies — all drawn from data available pre-purchase. Rather than opt for a complex neural architecture, the team chose a straightforward multilayer perceptron with three shared hidden layers that feed into task-specific prediction heads.
The breakthrough came from adding order count as an auxiliary task alongside lifetime value. This multi-task approach compressed the model by 63%, shrinking parameters from 363,000 to 135,000 while simultaneously boosting accuracy. According to Staff Data Scientist Soumyajyoti Banerjee, the constraint forced the shared layers to learn more efficient representations.
Ranking Over Regression#
Traditional evaluation metrics like mean absolute error proved inadequate given the prevalence of zero-value users and the long tail of high-spenders. Swiggy instead assessed whether the model could correctly rank customers by value. The evaluation method divided predicted and actual lifetime values into ten quantiles and measured how accurately users landed in matching tiers — a heatmap showing 70–80% diagonal coverage with a Spearman correlation above 0.75 for both business units.