Recommendations for the Physical World

One of Walmart’s personalized carousels

In recent years, personalizing online content has been a major area of research in the retail industry and academia. Recommendation and personalization algorithms are routinely employed by companies in many areas, such as e-Commerce (e.g., Walmart, Stitch Fix), Movies (e.g., Netflix, Hulu), Music (e.g., Spotify), Search (e.g., Google), and Ads (e.g., Google, Facebook). As a result, the content experienced by each consumer of these services can be completely different depending on their preferences.

How does online personalization work?

These are typically the main steps in user personalization online:

  1. A user visits a website
  2. The website has access to the user’s historical activity tied to their account (if the user is authenticated) or via browser cookies
  3. Using this historical data, as well as in-session details (device, country, time, language, etc.), the website delivers an experience that’s customized to the user
  4. Based on the items (e.g., products, movies, songs, search results) presented, the user can take an action (e.g., click, add to cart, buy, listen, watch)
  5. Leveraging this feedback, the recommendation algorithms can continuously improve the user experience
Online recommendation flow diagram

What’s different about recommending for the physical world?

While improving online user experience in the above manner is part of the way Walmart serves its customers, the primary channel for Walmart customers to shop is through our physical stores. A stark contrast in the physical shopping experience, relative to online, is that we don’t have historical data specific to customers entering our stores. We also can’t adjust physical inventory based on a customer’s preferences on any given day.

Additionally, for the planning decisions we make today, we might not get customer feedback for weeks or even months. We can, however, aim to satisfy customer demand in aggregate by carefully planning for the future. In this article, we’ll discuss how we plan and operationalize our store assortment in the context of these physical constraints and long feedback loops.

Defining problems and challenges

Walmart has a network of over 4,000 stores across the United States, and 90% of Americans live within 10 miles of a Walmart store. Given the large variations in population demographics (e.g., age, income), as well as external factors such as the weather, there is heterogeneity in customer preferences in the regions across the stores. Customer preferences may even change over time.

To satisfy consumer demand, we need to ensure the right product is available for them to buy at the right time, the right store, and at the right price. To achieve this, we need to have the appropriate assortment (set of items carried in the store), optimal inventory (minimize under-stocking and over-stocking) while respecting the physical constraints of available floor space, order lead times from suppliers and other supply chain limitations, and the correct labor for laying out items in the store. To make these challenges concrete, we can consider the specific case of planning for the Apparel vertical at Walmart.

Apparel as a case study

The Apparel vertical includes items from categories such as clothing, jewelry, shoes and accessories (handbags, sunglasses, and even masks in the post covid world). Planning for the apparel segment inside the stores includes — but is not limited to — answering the following questions:

  • Assortment: What is the right mix of products to carry in each store given the variation in customer demand? Conversely, what are the right stores to carry a particular item or brand?
  • Inventory: What should be initial inventory for these products at the start of the buying season?
  • Space planning: What floor space should we allocate to each category of items and, within those, the items themselves? We must also consider that apparel items may be displayed on racks, shelves, walls, or spinners.
Different layouts for different item types
  • Replenishment: Based on the velocity with which each item is being purchased in each store, what should be optimal schedule (quantity as a function of time) to replenish items?
  • Size and color: An apparel item may be available in different sizes and colors. However, not all sizes and colors have the same appeal or demand. What should be the right distribution of sizes and colors that we should carry for any given item?
Same T-shirt available in various sizes and colors
  • Packaging: Fulfilling heterogeneous demand for each of the products we carry requires shipping these items in different configurations (combinations of size and color) from suppliers to distribution centers — and from distribution centers to individual stores. What should be the optimal box configurations to minimize the number of configurations as well as the amount of understock and overstock at each store?
Example of different pack configurations
  • Online-offline correspondence: To provide a holistic, omni channel shopping experience, we need to ensure that our store and online systems are in sync. Additionally, eCommerce buying patterns can be important signals for our store planning algorithms. The online catalog is orders of magnitude larger than the store catalog since it’s not constrained by physical space. As a result, the planning process for the online assortment can be completely independent. How do we map items in our store catalog to online and vice versa?
  • Clearance and discounts: Apparel is a seasonal business. The clothing needs for winter can be very different from those for the summer. However, because we need to plan significantly in advance, we may not be able to accurately forecast demand for each item. What should be the optimal clearance schedule in the event the items are not sold out?
A clearance section in one of the Walmart stores

How was this done earlier?

Walmart was founded in 1962 in Rogers, AR. In the era prior to big data and machine learning (ML) becoming mainstream, the above questions were answered by merchants, buyers, and planners manually without the aid of algorithms and computing. This process involved hundreds of disparate spreadsheet-based tools which could be tedious and cumbersome. Associates relied on their experience in the field and the know-how of the domain to foster continuous growth for Walmart, which eventually led to becoming the Fortune #1 company we are today.

In recent years, we have been striving to use state-of-the-art algorithms in ML (Deep learning, Reinforcement Learning), Forecasting, and Optimization in order to consistently and significantly improve in solving the above problems while maintaining our promise of Everyday Low Price.

Algorithms in the planning process

While we don’t have the luxury of personalizing the store experience to every shopper, we want to ensure that every customer is able to find the item(s) they are looking for whenever they make a store trip. Even though we don’t have a customer’s browsing or shopping history, we do have a history of transactions that occurred in every store. Additionally, we can use features like store details (e.g., floor space, proximity to distribution centers) and external signals like location, weather, competitor stores nearby, population size, etc. By utilizing this vast amount of data, we have developed and are developing sophisticated models including:

  • Deep learning models for assortment, inventory, replenishment, size, and color distributions
  • Optimization models for space planning and packaging
  • Reinforcement learning models for clearance

In subsequent posts, we may discuss some of these models in more detail. By plugging in these models at appropriate points in the planning process, we can make recommendations to our merchants and buyers that aid and simplify this process, while still allowing for human overrides if necessary. This allows us to tailor the right combination of items at each store, department, and category level and ultimately enables us to help our customers save money and live better.

What possibilities lie ahead?

We’ve made substantial progress in powering the planning processes using ML and optimization models, but there’s still enormous potential for improvement. As literature on online recommendation systems grows, the physical space remains relatively unexplored and underrepresented. This presents an exciting opportunity for us to contribute to the research and make big strides in these areas.

Our team is growing, and we are constantly seeking talented data scientists, ML engineers, data engineers, software engineers, and analysts. If you love working with large scale data and building ML and optimization models that impact hundreds of millions of customers, please get in touch!

Recommendations for the Physical World was originally published in Walmart Global Tech Blog on Medium, where people are continuing the conversation by highlighting and responding to this story.

Article Link: Recommendations for the Physical World | by Ajinkya More | Walmart Global Tech Blog | Nov, 2021 | Medium