June 6, 2022 in Algorithms Teams

Data Science, but Make it Fashion

Stitch Fix algorithms use operations research to personalize your style

SHARE: PRINT ARTICLE:print this page https://doi.org/10.1287/orms.2022.03.06

Stitch Fix is an online personal shopping and styling service for women, men and kids that delivers one-to-one personalization to help customers discover and buy what they love. Stitch Fix is changing the way people find clothes they love by combining technology with the personal touch of seasoned style experts. To do this, we leverage operations research (O.R.) and machine learning (ML) to provide styling services personalized through a combination of algorithms and expert stylists. Operations research provides a critical role in the client experience, enabling them to receive high-quality and timely service. Stitch Fix clients have two primary ways to shop: The first is through a Fix, which is a selection of five items curated by our expert stylists and sent directly to your door. The second is through Freestyle, your own personal shopping feed, where you can buy what you want when you want from a personalized feed that has items curated just for you. Our algorithms teams are foundational to Stitch Fix’s human-first approach because they blend cutting-edge machine learning technology with expert stylists to recommend outfits and items and even build a complete styling box. Our data scientists build end-to-end ML and O.R. technologies to improve the client experience – from recommended items your stylist puts in your Fix or personal Freestyle shop to what items our buyers purchase for our inventory and even the items that are included in emails sent to clients. New Stitch Fix clients fill out a complete style profile by answering a carefully curated series of questions that form the foundation for a wide array of ML models.

How the Algorithms Work for You

Once a new client creates a style profile, they can choose to either browse a selection of algorithm- and stylist-curated outfits and items in Freestyle or schedule a Fix consisting of five items (10 for kids). The data journey for a five-item Fix begins when the client requests a date for their Fix to arrive. The calendar of available dates is maintained by algorithms that ensure overall demand and shipping capacity are matched. An optimization algorithm selects a warehouse to fulfill the order to minimize transportation costs while balancing warehouse capacity. Depending on a variety of factors, the right combination of algorithms and stylists curate a set of 10 items for the client to review and select up to five items to ship in their Fix. Once the client preview is complete, if the client selected fewer than five items, the task of selecting the remaining items (to total five) is routed to a stylist via a client-stylist assignment optimization that balances client-stylist stylistic affinity and relationships with on-time delivery. Once the items are finalized, a batching and pick-pathing model will optimize the shipments at the warehouses to begin picking the order so that it will be complete when the time to ship arrives and the order can be efficiently picked. Once picked, a carrier is selected to ensure on-time delivery, and the box is shipped to the client. The client keeps desired items and returns the remaining items that are then made available to other clients. Each of these processes are supported by O.R. models that optimize a balance of client experience, quality of service, efficient operations and on-time delivery.

Many different teams of data scientists work together to build end-to-end systems to support this process. Unlike some technology companies, Stitch Fix does not hand off models to engineering teams; the data scientists own the models and systems serving their recommendations. Thanks to a breadth of platform technologies, the skills required to run production ML and O.R. models are quickly developed by newly onboarded scientists at Stitch Fix [1]. This data science strategy improves the pace of innovation at Stitch Fix, avoiding the wait time to get on another team’s road map, and ensures a more consistent vision from ideation through development and maintenance [2]. Instead, the data scientist works closely with business and engineering partners to inform Stitch Fix strategy and ensure the best client experience.

Case Study in Stylist-Client Assignment Optimization

Stitch Fix stylists spend their time working on a variety of tasks to fulfill a client’s Fix. Which client a stylist will work with next is recommended by our Stylist-Client Assignment Optimization model. This model has evolved through many iterations designed to improve both operational efficiency and the client’s experience. At its most basic level, the system ensures the client’s needs are surfaced to stylists’ in a timely manner so that shipments can be delivered on time. However, we layer even more algorithms and models into the process to improve the client experience: Data scientists leverage a client’s latent style, a set of numbers that encodes a client’s style preferences [3], in the assignment process. The algorithm matches the client’s request with a stylist who has a similar latent style. Once a client receives and decides what to keep from their Fix, the client may request to have their next Fix styled by the same stylist in the future. Our model respects these requests to maintain and build the relationship between a client and their preferred stylist. We also model good Fix outcomes and recommend a client-stylist relationship be made. These relationship matches allow the model to optimize beyond short-term outcomes to provide the best long-term experience for the client.

pile of clothesOriginally, there was only one kind of styling work: the five-item Fix. In the past year, an extra preview step was added during which clients have the opportunity to select up to five items from a 10-item set of personalized styles. As the kinds of work grew, ad hoc additions to the existing optimization became unwieldy, and the data scientists of the Styling Operations Algorithms team decided to rebuild the optimization from the ground up. At its core, the optimization resembles a simple assignment problem [4]. Accounting for the varying times required to complete different kinds of work and accommodating each stylist’s schedule quickly turns the optimization into a multiple-knapsack problem, which becomes prohibitively complex as the size of the problem grows (NP-hard, in the language of complexity theory) [5]. Therefore, optimally solving these assignments is very difficult. This is before we even take into consideration scheduling nuances, such as whether it is better to style a client’s request today or tomorrow.

The team resolved to tackle this problem pragmatically. Stylists work throughout the day, providing an opportunity to update the recommendations in real time to adapt to what is actually happening in styling operations. This naturally leads to an iterative optimization algorithm based on local search heuristics that allow us to update our assignments, taking into account previous assignments and new work arriving throughout the day. This sort of agile solution is well supported by Stitch Fix’s ownership model. The data science team owns not only the optimization model but also the data pipelines and service layer leveraged by engineering partners for integrating these recommendations into the stylist workflows. This ownership allows the data scientists to make holistic trade-offs in designing the end-to-end system to ensure the right data is available for these models and the model runs frequently enough to ensure recommendations are responsive to real-time operations. The system was rolled out in April 2022, and by re-architecting the service layer, we’ve seen reliability improve from 99% to 99.99% availability and a nearly 50% improvement in latency. Improvements to client outcomes will take longer to discover, and a full road map is in place of improvements leveraging the new model architecture.

Ensuring an Excellent Client Experience in the Face of Scarce Inventory

Because of our business model, Stitch Fix has some unique operational challenges. A significant portion of our inventory is being trialed by clients as part of their Fix shipments of 5- or 10-item previews. Even for a happy client, not all items may suit their needs, and many items will be returned and soon sent out to a new client. During this period when inventory is out with a client, it may appear out of stock for future clients. Therefore, it is especially important that we ensure the most suitable items are shared with our clients, and must account for the relative scarcity of some items. This raises the issue of how to go beyond the typical recommendation engine that suggests which item is a good pick for clients and build a system that is sensitive to both inventory availability and an active client base.

Stitch Fix uncovered this issue when some new items significantly underperformed against expectations. One of our data scientists dug deep into the issue and observed that these new items were sent to a client and returned multiple times, and the hypothesis was made that items that were expected to suit a specific type of client were being sent to other types of clients. This happened in part because the recommendation engines and stylists were not aware of how scarce an item was when offering it to a client. Through a collaborative effort, we took a holistic view of our inventory and client base, which enabled the data scientist to build a new model on top of the recommendation engine.

To better understand the problem, let’s take an example of two styles and two clients, Sarah and Mary. The first style, a red dress, may be best suited for both clients, but significantly better for Mary than for Sarah. Ideally, both Sarah and Mary can receive a red dress, but if there’s only a single red dress in inventory, then a greedy algorithmic approach may accidentally give the red dress to Sarah when it is better holistically to give it to Mary. Ensuring Mary receives the red dress when inventory is scarce can be accomplished by reserving it for her and offering alternative styles of similar quality to Sarah. This process in general means that we aim to reserve the scarce styles for the clients who most need them, rather than sending them to clients with other, equally good options. To reach this solution, the scientist looked to solve the hypothetical problem of how best to match our on-hand inventory with our entire client base. The resulting model solves a large linear program and extracts shadow prices from the optimal dual solution to infer which items are scarce and best suited for a particular client. This ensures that items uniquely valuable to a subset of clients end up with those clients, whereas other clients receive acceptable substitutes.

Wealth of Opportunities and More to Come

The two efforts discussed so far, client-stylist assignment and inventory-aware recommendations, are examples of the innovative ways that Stitch Fix leverages operations research to improve the client experience. These innovations have several follow-on benefits. For example, the shadow prices from the inventory-aware recommendations have enabled Stitch Fix to learn and explore what types of inventory would best serve our existing clients, leading to innovation in the buying optimization models. Similarly, we can identify what kinds of clients would be best served by our current inventory if we could find more clients like them.

The unique data science culture at Stitch Fix is a key driver of its innovation. What sets our teams apart is that each data scientist is empowered and encouraged to leverage their expertise and dive deep into problems and opportunities. Because they play a central role in the organization and have a seat at the table with their cross-functional partners, data scientists make key decisions around what needs to be built and how it should be done. This ensures that our business cultivates a unique blend of O.R., ML and human expertise as Stitch Fix continues to grow and expand its offerings.

Stitch Fix has built a uniquely personalized shopping experience with both its Freestyle and Fix offerings. In our operations today, we leverage both client and stylist latent styles to better personalize stylists’ work to improve the client experience. We’ve also blended classic inventory allocation models with recommendation models to provide an inventory-aware recommendation policy. This central focus on personalization is essential to the way Stitch Fix delights its customers. In operations, the aim goes beyond cost minimization and service levels to a personalized approach delivering to the client’s needs – from assigning shipments to warehouses to the way emails are personalized based on style preferences. These are operations research questions with a long history to which Stitch Fix intends to add a different perspective in the near future.

References

  1. Elijah Ben Izzy, 2021, “Aggressively helpful platform teams,” Feb. 9, https://multithreaded.stitchfix.com/blog/2021/02/09/aggressively-helpful-platform-teams/.
  2. Eric Colson, 2019, “Beware the data science pin factory: The power of the full-stack data science generalist and the perils of division of labor through function,” https://multithreaded.stitchfix.com/blog/2019/03/11/FullStackDS-Generalists/.
  3. Stitch Fix, 2022, “Behind the seams: How we understand your personal style,” April 27, https://newsroom.stitchfix.com/blog/how-we-understand-your-personal-style/.
  4. Jeff Schecter, 2018, “Add constrained optimization to your toolbelt,” June 21, https://multithreaded.stitchfix.com/blog/2018/06/21/constrained-optimization/.
  5. Solving a Multiple Knapsacks Problem,” Google OR-Tools, https://developers.google.com/optimization/bin/multiple_knapsack.
  6. Jeff Magnusson, 2016, “Engineers shouldn’t write ETL: A guide to building a high functioning data science department,” March 16, https://multithreaded.stitchfix.com/blog/2016/03/16/engineers-shouldnt-write-etl/.

Carl Morris

SHARE:

INFORMS site uses cookies to store information on your computer. Some are essential to make our site work; Others help us improve the user experience. By using this site, you consent to the placement of these cookies. Please read our Privacy Statement to learn more.