Problem
Lyft wants one forecast of its whole business that stays valid when decisions change, for example how much conversion falls when prices rise. Practice adds four needs. Many teams must build models in parallel and still combine them. Models must be easy to declare and iterate on. Rides cannot be modeled bottom-up, so metrics have to be aggregates. The system must also recommend decisions and show how good they were.
Example from the article: choosing how much to spend on each driver incentive type in every region-hour, to maximize rides while keeping ETA and PrimeTime low and staying within profitability guardrails.
Solution in brief
Every business variable is a PyTorch tensor with labeled dimensions (an IndexTensor). Every model is a PyTorch module whose loss includes a term for agreement with experiments. Models that form a valid DAG are themselves a model (a ModelCollection). Autograd through the collection gives gradients for optimizing decisions, and "regret" against ex-post decisions scores each change.
Questions this case answers
- How to combine separately developed causal models of one system into a single differentiable forecast that agrees with experiments
- How to choose a high-dimensional set of spend decisions by gradient-based optimization of a model under business constraints
- How to judge a forecasting model by the quality of the decisions it produces when the true future is unknown at decision time
- How to let many data scientists build causally valid models of one business in parallel and combine them into a single forecast?
Tools and methods
- IndexTensor — a PyTorch tensor with pandas indices per dimension; aligned, differentiable arithmetic and a shared data store.
- Model and ModelCollection — modular models with a weighted loss; a loop-free collection acts as one model.
- PyTorch autograd and projected gradient descent — decision optimization under constraints.
- Backtesting with MASE — out-of-sample accuracy across variables.
- Regret versus ex-post decisions — one number for decision quality.
Google or a one-time email code. No password.