Offline reinforcement learning for learning to dispatch for job shop scheduling

Jesse van Remmerden, Zaharah Bukhsh, Yingqian Zhang

Introduction

The Job Shop Scheduling Problem (JSSP) represents a fundamental challenge in combinatorial optimization, characterized by its NP-hard complexity. Efficiently scheduling a set of jobs across multiple machines to minimize the total completion time, or makespan, is critical for industrial productivity. While exact methods like Constraint Programming (CP) provide optimal solutions, their computational cost often makes them unsuitable for real-time decision-making in large-scale environments. Conversely, traditional heuristics and online Reinforcement Learning (RL) methods offer speed but suffer from significant drawbacks, such as the need for high-fidelity "digital twins" and extreme sample inefficiency.

This paper, published in Machine Learning (2025), introduces Offline Learned Dispatching (Offline-LD). This framework marks the first end-to-end offline RL approach for JSSP, enabling agents to learn optimal dispatching policies directly from historical data or pre-computed expert solutions. By decoupling training from simulation, Offline-LD addresses the practical barriers to deploying RL in real-world manufacturing settings.

The Challenge of Offline Learning in JSSP

The primary hurdle in offline RL is "distributional shift." When an agent encounters a state-action pair not present in its training dataset, it may erroneously assign a high value to a sub-optimal action, leading to catastrophic performance during deployment. In the context of JSSP, this is further complicated by "maskable" action spaces—at any given step, only a subset of jobs is available for scheduling.

To overcome these issues, the authors utilize Conservative Q-Learning (CQL). CQL introduces a pessimistic bias, penalizing the values of actions that are absent from the training data. This ensures that the agent remains within the "distribution" of known good behaviors, preventing the overestimation of unseen actions.

Methodology: The Offline-LD Framework

The Offline-LD framework incorporates several technical innovations to adapt offline RL for scheduling:

  • Maskable Algorithm Variants: The authors developed maskable versions of two prominent algorithms: mQRDQN (Maskable Quantile Regression DQN) and d-mSAC (discrete Maskable Soft Actor-Critic). These variants explicitly handle the constraints of JSSP by filtering out illegal actions during both training and inference.
  • Distributional RL: By using mQRDQN, the framework learns the full distribution of potential returns rather than just the expected mean. This approach proved particularly effective for generalization across different problem scales.
  • Reward Normalization: A critical component for training stability, the authors implemented a normalization scheme that scales rewards based on the best-known makespan for a specific instance. This allows the agent to learn effectively across varying problem sizes without gradients exploding or vanishing.
  • Entropy Adjustment: For the actor-critic approach (d-mSAC), a novel entropy bonus was introduced that scales based on the number of currently valid actions, maintaining an appropriate level of exploration during the offline training phase.

Data Efficiency and the Role of Noise

One of the most striking findings of the study is the extreme data efficiency of Offline-LD. While state-of-the-art online RL methods often require millions of simulated interactions to converge, Offline-LD achieved superior performance using a dataset of only 100 expert solutions generated by a CP solver.

Furthermore, the research highlights the counter-intuitive benefit of "noisy" data. By injecting random valid actions into expert datasets (creating "noisy" datasets), the authors provided the agent with counterfactual examples. This noise helps the agent identify "critical states"—moments where a specific decision is mandatory to avoid a significant increase in makespan. Consequently, models trained on noisy data often exhibited better robustness and generalization than those trained on pure expert data.

Performance and Generalization

The Offline-LD framework was evaluated against established benchmarks, including the Taillard and Demirkol sets, and compared to leading online RL baselines like L2D and Behavioral Cloning (BC).

  • Superiority over Online RL: Offline-LD consistently outperformed L2D across most test instances, demonstrating that offline training on high-quality data is more effective than extensive online exploration in a simulator.
  • Zero-Shot Generalization: The models demonstrated remarkable scalability. A policy trained on small 6x6 instances could be applied "zero-shot" to solve massive 100x20 instances, maintaining competitive performance without further fine-tuning.
  • Stability: The inclusion of reward normalization was identified as a "make or break" factor; without it, the reinforcement learning process failed to produce stable, high-performing policies.

Conclusion

Offline-LD represents a significant step toward making reinforcement learning a practical tool for industrial scheduling. By eliminating the requirement for a perfect simulator and drastically reducing the amount of data needed for training, it paves the way for deployment in environments where historical logs are the only available resource. Future work aims to explore training on lower-quality heuristic data and applying the framework to dynamic scenarios involving machine breakdowns and variable job arrivals.

Summary updated

BibTeX
@article{remmerden2025offline,
  author = {Jesse van Remmerden and Zaharah Bukhsh and Yingqian Zhang},
  title = {{Offline reinforcement learning for learning to dispatch for job shop scheduling}},
  journal = {Machine Learning},
  year = {2025},
  doi = {10.1007/s10994-025-06826-w},
}
Figure