arXiv:2610.32241cs.AIOct 2026

Manuscript Offprint

arXiv:2610.32241

Spatial Heuristic Strategy based Diffusion Reinforcement Learning for Online 3D Bin Packing

Tong Li, Qingyang Xu

Tong Li, Qingyang Xu +^{+}

School of Airspace Science and Engineering, Shandong University, Weihai 264209, China, and also with the Shandong Key Laboratory of Intelligent Electronic Packaging Testing and Application, Shandong University, Weihai 264209.

+^{+} Corresponding author.

Email:202317537@mail.sdu.edu.cn and qingyangxu @sdu.edu.cn

Abstract: Traditional heuristic methods have accumulated mature experience in core objectives, such as space utilization and layout compactness of 3D bin packing, relying on artificially designed rule-based logic. However, they exhibit obvious limitations in generalization ability and adaptability to dynamic scenarios. Diffusion reinforcement learning, which integrates the spatial search capability of reinforcement learning and the data distribution modeling capability of diffusion learning, has achieved certain progress in action distribution modeling and decision compliance constraints. Nevertheless, there remain issues including insufficient perception of the spatial topological structure in 3D bin packing and limited layout optimization capability. To address these problems, we propose a diffusion reinforcement learning method integrated with spatial heuristic strategies, which combines classical bin packing heuristic rules with a diffusion reinforcement learning framework. Specifically, it compresses the action space through heuristic action pre-screening, introduces a graph neural network to model the spatial structure, and designs a composite reward function incorporating flatness to suppress spatial fragmentation, thereby realizing the organic integration of prior knowledge and adaptive optimization. Experimental results demonstrate that the proposed algorithm effectively enhances the performance and stability of online 3D bin packing.

Keywords: Online 3D Bin Packing; Diffusion model; Reinforcement learning; Heuristic method

1 Introduction

In practical scenarios such as logistics, warehousing, and manufacturing, how to efficiently load items within confined spaces stands as a core issue for improving resource utilization and system operational efficiency. As an important research direction in the field of spatial optimization, the Bin Packing Problem (BPP)[1] has long attracted extensive attention from the domains of operations research and artificial intelligence. Three-dimensional bin packing represents a typical NP-hard problem, and most mature current solution approaches are centered on heuristic strategies. Such methods rely on the prior knowledge of researchers, who manually construct guiding rules and decision criteria to achieve efficient exploration of feasible packing spaces. Consequently, approximate optimal solutions satisfying business constraints are commonly adopted in real engineering applications[2–5].

Heuristic methods exhibit certain intuitiveness and effectiveness in solving the three-dimensional bin packing problem. However, restricted by manually designed rules, such methods cannot theoretically guarantee global optimal solutions, and their performance is difficult to maintain consistently across different problem scenarios. In contrast, Deep Reinforcement Learning (DRL) has shown significant advantages in addressing such combinatorial optimization problems [6]. Zhang et al. [7] proposed a brain-inspired experience reinforcement model by imitating human empirical reasoning, enabling adaptation to complex and variable environments. Que et al.[8] developed a DRL model based on the Transformer architecture [9] to solve the offline three-dimensional bin packing problem with variable height, yet this method struggles to adjust strategies in real time to cope with unexpected situations.

Zhang et al. [10] presented Attend2Pack, a deep reinforcement learning-based method incorporating an attention mechanism, which overcomes the limitations of traditional algorithms in handling high dimensionality and complex constraints. Cheng et al. [11] proposed an end-to-end deep reinforcement learning approach fusing Transformer and CNN, alleviating the excessive action space issue in online multi-bin three-dimensional packing. It improves space utilization while maintaining uniform height distribution of bins. Zhao et al. [12] addressed the deficiencies in observation modeling and the challenge of sparse rewards in three-dimensional bin packing by proposing the DMRL-BPP dynamic multimodal deep reinforcement learning framework. It employs twin encoders to capture multimodal information, designs a novel reward function to optimize training feedback, and combines the SAC algorithm with heuristic placement strategies to reduce the action space. This framework outperforms heuristic algorithms and mainstream DRL methods in terms of gap ratio and learning stability across different bin sizes, significantly enhancing packing space utilization efficiency. Pan et al. [13] tackled the trade-off between average performance and worst-case performance in online three-dimensional bin packing by proposing an adjustable robust reinforcement learning framework. It generates worst-case scenarios through permutation-based attackers and balances the two types of performance via a weighted objective function, improving worst-case space utilization and stability without obvious degradation in normal performance. Nevertheless, online three-dimensional packing methods based on reinforcement learning still suffer from issues such as blind exploration of the action space, insufficient utilization of layout prior knowledge, poor training stability, and low sample efficiency.

Diffusion models possess powerful data generation capabilities. By progressively removing noise to generate reasonable packing action distributions, diffusion models can not only capture the complex multimodal distributions in the action space, but also dynamically adjust the action generation strategy according to the current environmental state. Introducing diffusion models into the actor-critic framework to construct a diffusion-model-based AC reinforcement learning method enables modeling of high-dimensional packing action distributions, thereby enhancing the representation and exploration capabilities of complex layouts [14]. Although diffusion models have achieved certain progress in action distribution modeling and decision-making compliance constraints, they still suffer from insufficient perception of the spatial topological structure in 3D bin packing and limited layout optimization ability under complex scenarios. Despite the obvious limitations of heuristic methods in generalization and dynamic scene adaptability, they have accumulated mature optimization experience on core objectives such as space utilization and layout compactness through manually designed rules and logic. Yang et al. [15] systematically discussed how to embed three categories of heuristic methods—physical heuristics, packing heuristics, and unpacking heuristics—into the DRL framework, constructing a heuristic-guided deep reinforcement learning model that significantly improves the practicality and generalization of policies for online 3D-BPP. Xiong et al. [16] introduced a candidate graph generated based on heuristics to achieve efficient search in the large discrete action space. Aiming at the problems of poor performance, difficult training, and insufficient adaptability in existing methods for online 3D bin packing, Zhang et al. [16] proposed a heuristic-guided enhanced data deep reinforcement learning method, which improves packing space utilization in both discrete and continuous scenarios with more stable performance and higher training efficiency. Although diffusion reinforcement learning has great potential for adaptive decision-making, it is difficult to directly inherit the prior knowledge of heuristic rules, resulting in insufficient efficiency in exploring efficient layouts during the training process. Heuristic methods can utilize rich prior knowledge but suffer from insufficient generalization. Therefore, this paper proposes a diffusion reinforcement learning method integrated with spatial heuristic strategies, which combines classical bin packing heuristic rules with a data-driven reinforcement learning framework. It extracts four types of heuristic rules, such as maximum subspace division and minimum remaining space, to generate candidate action solutions. Meanwhile, it introduces a graph neural network to mine the topological associations between goods and space, and designs a composite reward function incorporating flatness penalty to optimize the regularity of packing layouts, thereby realizing the organic integration of prior knowledge and adaptive optimization.

References (41)