Abstract
In package-handling facilities, boxes of varying sizes are used to ship products. Improperly sized boxes with box dimensions much larger than the product dimensions create wastage and unduly increase the shipping costs. Since it is infeasible to make unique, tailor-made boxes for each of the $N$ products, the fundamental question that confronts e-commerce companies is: How many $K << N$ cuboidal boxes need to manufactured and what should be their dimensions? In this paper, we propose a solution for the single-count shipment containing one product per box in two steps: (i) reduce it to a clustering problem in the $3$ dimensional space of length, width and height where each cluster corresponds to the group of products that will be shipped in a particular size variant, and (ii) present an efficient forward-backward decision tree based clustering method with low computational complexity on $N$ and $K$ to obtain these $K$ clusters and corresponding box dimensions. Our algorithm has multiple constituent parts, each specifically designed to achieve a high-quality clustering solution. As our method generates clusters in an incremental fashion without discarding the present solution, adding or deleting a size variant is as simple as stopping the backward pass early or executing it for one more iteration. We tested the efficacy of our approach by simulating actual single-count shipments that were transported during a month by Amazon using the proposed box dimensions. Even by just modifying the existing box dimensions and not adding a new size variant, we achieved a reduction of $4.4\%$ in the shipment volume, contributing to the decrease in non-utilized, air volume space by $2.2\%$. The reduction in shipment volume and air volume improved significantly to $10.3\%$ and $6.1\%$ when we introduced $4$ additional boxes.
Introduction
Shipping "air" represents a significant hidden cost in e-commerce logistics. When a box is disproportionately larger than the product it contains, it necessitates excessive packaging material (dunnage), inflates shipping fees, and reduces the volumetric efficiency of delivery vehicles. While custom-fit packaging for every item is the theoretical ideal, operational constraints necessitate a limited set of $K$ standard box sizes. The core challenge lies in determining the optimal dimensions for these $K$ boxes to minimize total shipping volume across a massive and diverse product catalog. This problem can be framed as a 3D clustering task (length, width, height), which is computationally NP-complete.
Methodology: Forward-Backward Decision Tree
The researchers developed a scalable 3D clustering framework using a forward-backward decision tree approach. Designed for industrial-scale operations with $O(KN \log N)$ complexity, the algorithm avoids the pitfalls of slow Genetic Algorithms or oversimplified 1D models.
The framework operates through four primary stages:
- Forward Pass (Cluster Splitting): Starting from a single universal box, the algorithm greedily splits clusters along the dimension providing the maximum volume reduction until reaching $\tilde{K}$ clusters (where $\tilde{K} > K$).
- Backward Pass (Cluster Combination): It then merges the most compatible pairs of clusters back down to the target $K$. This "overshooting" strategy allows the algorithm to escape local minima that often trap simple greedy approaches.
- Product Reassignment: Once box sizes are established, every product is reassigned to the smallest available box that can accommodate its dimensions.
- Iterative Refinement: A final greedy search fine-tunes box boundaries by shifting borderline products between clusters to further minimize volume.
Experimental Setup
The framework was evaluated using real-world operational data from Amazon:
- Training Set: Approximately 2 million shipments from June 2019, representing 75,000 unique products.
- Validation Set: July 2019 data used to optimize the overshooting hyperparameter ($\tilde{K}$).
- Test Set: Approximately 2 million shipments from August 2019 for final performance assessment.
Results and Discussion
The proposed method demonstrated significant improvements over existing baselines and operational standards.
Key findings include:
- Volume Efficiency: Optimizing the dimensions of the existing 14 box sizes resulted in a 4.4% reduction in total shipment volume. Increasing the variety to 18 boxes improved this reduction to 10.3%, with a 6.1% decrease in non-utilized air space.
- Comparative Performance: The "Complete algorithm" consistently outperformed Genetic Algorithms and 1D volume-based clustering. Notably, the product reassignment step alone contributed over 1% reduction in the "air-in-box" metric.
- Scalability and Robustness: By utilizing max-heaps for dimension tracking, the algorithm handles millions of products efficiently. Furthermore, the optimal box sizes remained stable across different training months, indicating strong generalization.
Conclusion and Future Work
This research provides a robust framework for optimizing box sizes in single-item shipments, potentially saving tens of millions of dollars for large-scale marketplaces. Future work will focus on extending this logic to "multi-item" shipments, which involve more complex 3D bin-packing constraints such as item orientation and stacking.
Summary updated