2026-09-03
每日一文 · 长文精读

Swiggy Uses 350+ Features and Multi-Task MLP to Predict Customer Lifetime Value

Swiggy使用350多个特征和多任务MLP预测客户终身价值

作者:Leela Kumili · InfoQ 原文

摘要:Swiggy开发了内部预测终身价值(pLTV)模型,利用350多个特征和多任务多层感知机(MLP),在客户首次下单前预测其长期价值,用于广告竞价优化。模型通过增加订单计数作为辅助任务,将参数从36.3万减少至13.5万(减少63%),同时提高准确性。评估采用分位数排名和Spearman相关系数(>0.75),而非传统回归指标。生产中使用该信号与Google tROAS竞价,A/B实验显示内部模型在留存和订单价值上优于第三方平台。下一步将转向概率性预测。

Swiggy has developed an in-house predicted lifetime value (pLTV) model to estimate the long-term value of new customers across its food delivery and Instamart quick commerce businesses.
Swiggy开发了一个内部预测终身价值(pLTV)模型,用于估算其外卖和Instamart快商务业务中新客户的长期价值。
The model is designed to generate a useful signal before a customer's first order, allowing Swiggy to use predicted value in advertising bid optimization rather than relying on short-term conversion metrics.
该模型旨在客户首次下单前生成有用信号,使Swiggy能够在广告竞价优化中使用预测价值,而非依赖短期转化指标。
The prediction problem is complicated by sparse early signals and a highly skewed target distribution.
预测问题因早期信号稀疏和目标分布高度偏斜而变得复杂。
Swiggy notes that a large share of new users place no orders during their first 30 days, while a relatively small group generates substantially higher lifetime value.
Swiggy指出,大量新用户在最初30天内未下任何订单,而相对较小的一部分用户则产生了显著更高的终身价值。
The model therefore needs to distinguish between users who initially appear similar but develop different ordering patterns over time.
因此,模型需要区分那些最初看起来相似但随时间发展出不同下单模式的用户。
Swiggy's approach uses more than 350 features grouped across areas including acquisition channel, device and fraud signals, geographic behavior, complaint history, Instamart category affinity, order behavior, payment patterns and socioeconomic indicators.
Swiggy的方法使用了350多个特征,涵盖获取渠道、设备和欺诈信号、地理行为、投诉历史、Instamart品类偏好、订单行为、支付模式和社会经济指标等领域。
The features are generated from information available before a customer's first order, addressing the cold start requirement for advertising systems.
这些特征来自客户首次下单前可获取的信息,满足了广告系统的冷启动需求。
Soumyajyoti Banerjee, Staff Data Scientist at Swiggy, highlighted the trade-off in a LinkedIn post,
Swiggy员工数据科学家Soumyajyoti Banerjee在LinkedIn帖子中强调了这一权衡,
The twist: adding a second prediction task shrank the model by 63% — and made it more accurate.
转折点:增加第二个预测任务使模型缩小了63%——并且使其更准确。
The model uses a relatively simple multilayer perceptron rather than a more complex architecture.
该模型使用了相对简单的多层感知机,而非更复杂的架构。
Three shared hidden layers learn representations across the prediction tasks, followed by task-specific heads for Food and Instamart.
三个共享隐藏层学习跨预测任务的表示,随后是用于Food和Instamart的任务特定头部。
Swiggy also introduced order count as an auxiliary prediction task alongside lifetime value.
Swiggy还引入了订单计数作为终身价值之外的辅助预测任务。
The resulting four-head model produced marginally better results while reducing the parameter count from 363,000 to 135,000, a 63% reduction.
由此产生的四头模型产生了略微更好的结果,同时将参数数量从363,000减少到135,000,减少了63%。
According to Jayshmi A, an engineer at Swiggy, conventional regression metrics such as mean absolute error and mean absolute percentage error were not sufficient to evaluate the model because of the large number of zero-value users and the long tail of customer value.
据Swiggy工程师Jayshmi A称,由于存在大量零价值用户和客户价值的长尾分布,传统的回归指标(如平均绝对误差和平均绝对百分比误差)不足以评估该模型。
Instead, Swiggy evaluated whether the model could correctly rank customers by value.
相反,Swiggy评估了模型是否能按价值正确对客户进行排序。
The evaluation divides predicted and actual values into ten quantiles and measures how often users fall into the corresponding predicted and actual groups.
评估将预测值和实际值分为十个分位数,并衡量用户落入相应预测组和实际组的频率。
The problem wasnt producing a score; it was producing a score that could survive sparse early signals.
问题不在于生成一个分数;而在于生成一个能在稀疏早期信号中存活的分数。
The model achieved a Spearman correlation above 0.75 for both Food and Instamart, with 70% to 80% diagonal coverage across the value deciles.
该模型在Food和Instamart上的Spearman相关系数均超过0.75,价值十分位上的对角线覆盖率为70%到80%。
In production, Swiggy uses the pLTV signal with Google's target return on ad spend (tROAS) bidding.
在生产环境中,Swiggy将pLTV信号与Google的目标广告支出回报率(tROAS)竞价结合使用。
The intended workflow is to rank customers by predicted value and allow the advertising system to differentiate bids based on that ranking.
预期的工作流程是按预测价值对客户进行排序,并允许广告系统根据该排名区分出价。
Swiggy also compared the in-house model with a third-party pLTV platform in production A/B experiments.
Swiggy还在生产A/B实验中将内部模型与第三方pLTV平台进行了比较。
The company's model delivered higher retention and gross order value per acquired user without additional platform costs, while the external platform acquired more users per dollar spent.
该公司的模型在无需额外平台成本的情况下,实现了更高的留存率和每位获取用户的订单总价值,而外部平台每花费一美元获取的用户更多。
Swiggy said the next stage of the work will move from point estimates to probabilistic pLTV predictions, aiming to represent uncertainty in customer value and incorporate it into bidding decisions.
Swiggy表示,下一阶段的工作将从点估计转向概率性pLTV预测,旨在表示客户价值的不确定性,并将其纳入竞价决策。

阅读理解

1. What is the main challenge that Swiggy's pLTV model faces according to the article?

2. How did adding an auxiliary prediction task affect the model?

3. What evaluation metric did Swiggy use to assess the model's performance?

温故复习 →每日一句 →