Think Out of the Package: Recommending Package Types for E-Commerce Shipments

Karthik S. Gurumoorthy, Subhajit Sanyal, Vineet Chaoji

Abstract

Multiple product attributes like dimensions, weight, fragility, liquid content etc. determine the package type used by e-commerce companies to ship products. Sub-optimal package types lead to damaged shipments, incurring huge damage related costs and adversely impacting the company's reputation for safe delivery. Items can be shipped in more protective packages to reduce damage costs, however this increases the shipment costs due to expensive packaging and higher transportation costs. In this work, we propose a multi-stage approach that trades-off between shipment and damage costs for each product, and accurately assigns the optimal package type using a scalable, computationally efficient linear time algorithm. A simple binary search algorithm is presented to find the hyper-parameter that balances between the shipment and damage costs. Our approach when applied to choosing package type for Amazon shipments, leads to significant cost savings of tens of millions of dollars in emerging marketplaces, by decreasing both the overall shipment cost and the number of in-transit damages. Our algorithm is live and deployed in the production system where, package types for more than 130,000 products have been modified based on the model's recommendation, realizing a reduction in damage rate of 24%.

Introduction

Every online shopper has experienced the "Goldilocks" challenge of e-commerce packaging: receiving a tiny item in a massive box or a fragile item in a flimsy bag. Finding the right balance is critical for operational efficiency. Over-packaging leads to wasted materials and higher shipping costs due to increased volume, while under-packaging results in damaged goods, costly returns, and diminished customer trust.

Historically, companies relied on Keyword-Based Approaches (KBA), using product titles to assign packaging (e.g., "glass" goes in a box). However, this manual, reactive method fails to scale to millions of unique products. This paper presents a scalable machine learning framework developed at Amazon to optimize this trade-off between shipment costs and damage costs.

The trade-off between shipment cost and damage cost across various packaging types, ranging from no additional packaging to sturdy carton boxes.

Methodology

The researchers developed a two-stage optimization framework designed to be both accurate and computationally efficient.

Stage 1: Damage Probability Estimation

The first stage involves predicting the probability of damage for any given product-package pair. A Logistic Regression model was trained on massive real-world datasets. To handle the lack of exhaustive historical data (not every product has been shipped in every package type), the team utilized data augmentation to enforce an "ordinal relationship." This assumes that if a product is safe in a bag, it is safe in a box, and if it is damaged in a box, it would certainly be damaged in a bag.

Stage 2: Scalable Optimization

The goal is to minimize total shipping costs while maintaining damage costs below a specific threshold. While this constrained optimization is typically NP-complete in discrete settings, the authors proved it is equivalent to an unconstrained formulation that can be solved in linear time ($O(mn)$).

A key component is the trade-off parameter ($\lambda$), which balances shipment and damage costs. The optimal $\lambda$ is found using a binary search algorithm, allowing the system to adapt to different business requirements or marketplace conditions.

Variation of shipment cost, damage cost, and the total objective value as a function of the trade-off parameter λ.

Experimental Setup and Results

The model was trained on over 100 million augmented shipments and tested on 8 million shipments covering 600,000 unique products. Features included dimensions, weight, fragility, and "percent air" in the package.

The system was deployed into Amazon's production environment, impacting over 130,000 products. Key results include:

  • Damage Reduction: A 24% reduction in the damage rate for modified products.
  • Cost Savings: A 5% decrease in transportation costs per shipment, translating to tens of millions of dollars in savings.
  • Predictive Accuracy: The damage model achieved an AUC of 0.902.
  • Customer Experience: A 3.5% improvement in "salability" by preventing items from becoming undeliverable due to damage.

Conclusion

This framework demonstrates that treating packaging as a spectrum of robustness allows for sophisticated, scalable optimization. Future work aims to incorporate environmental factors like shipping distance and weather, as well as causal modeling to better understand the long-term impact of damaged shipments on customer behavior.

Summary updated

BibTeX
@inproceedings{gurumoorthy2020think,
  author = {Karthik S. Gurumoorthy and Subhajit Sanyal and Vineet Chaoji},
  title = {{Think Out of the Package: Recommending Package Types for E-Commerce Shipments}},
  booktitle = {ECML/PKDD},
  year = {2020},
  url = {https://openreview.net/forum?id=oNhtl5izlek},
}
Figure