See You in Helsinki! Revionics Scientists will Present on Modeling Retail Holiday Effects at StanCon 2018

See You in Helsinki! Revionics Scientists will Present on Modeling Retail Holiday Effects at StanCon 2018

See You in Helsinki! Revionics Scientists will Present on Modeling Retail Holiday Effects at StanCon 2018
July 16, 2018 Alex Braylan - Senior Optimization Scientist

Proponents of the cutting-edge probabilistic AI language “Stan” will convene at StanCon 2018 this August in Helsinki, Finland, to present and discuss new research and applications. Two Revionics scientists have been invited to introduce their newly developed technique for modeling holiday effects. This conference will foster an exchange of ideas leading to continued sophistication of AI systems, such as those used for both demand modeling and price optimization.

Solutions at Revionics have been constantly evolving with the state of technology. The unique challenges of data science in the retail industry require solutions that meet specific criteria outside the comfort zone of common AI techniques: Ideal solutions need to be suitable for small and low-signal data, their predictions need to be interpretable, and they should ideally quantify uncertainty around their inferences.

Probabilistic programming languages such as Stan satisfy these needs while wielding the representational and computational power of state-of-the-art AI technology. Being both a statistical language interpretable by humans and a programming language interpretable by a back-end optimization AI, its users can flexibly express candidate models and then allow the machine to infer their parameters. This paradigm (as opposed to writing bespoke inference software) drastically reduces the amount of required code and facilitates fast development and testing of proposed models.

Of the various existing probabilistic programming languages, Stan is one of the few that are mature, extensively documented, and production-ready. Stan’s initial release was in 2012 and it has been widely adopted across various industries. Helsinki will be the third site for StanCon since the first conference in 2017, with over 150 attendees and around a dozen presentations at each of the previous two gatherings. Submissions are peer-reviewed by the organizers, a mixture of both Statistics professors and Stan developers. The conferences are sponsored by companies and institutions at the forefront of AI research such as Facebook, Amazon, Columbia University, and many others.

Revionics’ contribution is a formulation of holiday effects that, by harnessing the power of probabilistic programming, solves a problem that until now has restricted the modeling of seasonal retail demand. Before this innovation, models of holiday lift were often either overly constrained by assumptions, or overly sensitive to noise in the data. For example, a constrained model might assume that demand starts to climb two weeks before the holiday, peaks on the exact official date, then suddenly drops off. While that model can learn the magnitude of the holiday’s effect on demand, it can be highly inaccurate when sales patterns form irregular shapes around the holidays or when peak sales occur weeks before the official holiday. On the other hand, an unconstrained model is too eager to fit the data: With only a few years of historical data to learn from, the model might decide to interpret coincidental jumps in sales as holidays, leading to poor forecast accuracy. To date, the standard approach has been to decide on a global default balance between these degrees of constraint, and manually customize for specific product categories whenever the need arises.

The new approach that Revionics scientists will present at StanCon offers a simple yet flexible alternative that is completely self-tuning. The model infers a temporal function determined by only five parameters: magnitude, location, scale, shape, and skew. Magnitude is the multiplicative impact on sales caused by the holiday; location is when the demand actually peaks relative to the official holiday date; and the remaining three describe the timing of the acceleration and deceleration of demand around the holiday. This formulation permits fitting a wide variety of seasonal sales data, including some very unusual and challenging sales patterns. Simultaneously, it is constrained enough to ignore random patterns that are unlikely to repeat.

Stan has been pivotal to Revionics’ development of the new holiday effects model. The model is written in the Stan language, then easily embedded into mainstream programming languages such as Python or R. The Stan back-end fits data by using automatic differentiation to compute parameter gradients, eliminating the need for manual gradient calculations, which is tedious and error-prone. This approach is similar to those used by other popular AI paradigms (e.g., modern deep learning libraries like Tensorflow). However, Stan distinguishes itself by computing full Bayesian posteriors from parameter samples probabilistically drawn after optimization converges. Consequently, any uncertainty due to data scarcity or model misspecification can be quantified and propagated to downstream tasks such as pricing decisions. This ability has the most exciting implications, as theoretically optimal decision-making must consider a full spectrum of probable outcomes, not just the single most likely one.

Revionics is highly regarded in the industry for our 10+ years applying leading-edge data science in pricing, promotion and markdown optimization challenges for retailers worldwide. The data science team is excited to join fellow innovators at StanCon later this year and share our newest AI breakthroughs.