NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Fast Approximations for Job Shop Scheduling: A Lagrangian Dual Deep Learning Method

James Kotary, Ferdinando Fioretto, Pascal Van Hentenryck

TL;DR

This paper introduces JSP-DNN, a deep learning framework that generates high-quality approximations for the NP-hard Job Shop Scheduling Problem (JSP) in milliseconds. By combining a custom neural architecture that mirrors problem constraints with Lagrangian duality during training, the authors achieve near-optimal schedules that significantly outperform traditional heuristics and rival commercial solvers in time-constrained scenarios.

What Problem Does This Paper Address?

The Job Shop Scheduling Problem (JSP) is a cornerstone of industrial optimization. Imagine a factory where multiple "jobs" (like building a car) must pass through a sequence of "tasks" (welding, painting, assembly). Each task requires a specific machine for a set amount of time. The rules are strict: tasks in a job must happen in a specific order, and a machine can only handle one task at a time.

Finding the shortest possible time to finish everything (the "makespan") is NP-hard. While modern solvers like IBM’s CP-Optimizer are powerful, they are often too slow for real-time needs. If a machine breaks down or a shipment is delayed, a factory needs a new schedule now, not in 30 minutes. System operators often settle for fast but sub-optimal heuristics, which can lead to massive economic losses. The authors aim to bridge this gap: providing the speed of a heuristic with the accuracy of a sophisticated solver.

Methods

The authors propose a three-pronged approach to make deep learning work for JSP:

  1. JM-structured Network Architecture: Instead of using a generic "black box" neural network, they designed a Jobs-Machines (JM) architecture. It features dedicated "Job layers" to handle task sequences and "Machine layers" to handle resource exclusivity. This builds the physical structure of the problem directly into the model's "brain," helping it converge faster on sensible solutions.
  2. Lagrangian Dual Training: Standard neural networks minimize a simple error (like Mean Squared Error). However, a schedule that is "mostly right" but has two tasks overlapping on the same machine is useless. The authors integrated Lagrangian relaxation into the loss function. During training, the model is penalized for violating constraints (precedence and overlaps). They use a subgradient method to update Lagrangian multipliers, effectively "teaching" the network to respect the rules of physics and logic.
  3. Feasibility Recovery: Even a well-trained network might output a schedule with tiny overlaps (e.g., a task starting 0.001 seconds too early). The authors use a fast Greedy Recovery Algorithm (or a simple Linear Program) to "snap" the network's raw predictions into a 100% valid, feasible schedule.

Datasets

The researchers evaluated their method using the JSPLIB benchmark library, a standard in the scheduling community.

  • Root Instances: They selected hard instances like yn02, ta25-50, and swv03-13.
  • Data Generation: To simulate real-world variability, they created 5,000 variations of each instance by randomly increasing task durations (simulating "slowdowns") by up to 50%.
  • Ground Truth: Each of these 5,000 instances was solved using the IBM CP-Optimizer (with an 1,800-second limit) to provide the "optimal" labels for supervised learning.

Key Insights and Ideas

  • Inductive Bias is King: The custom JM architecture significantly outperformed standard fully connected networks. By mirroring the problem's bipartite structure (jobs vs. machines), the model learns the "language" of scheduling much more effectively.
  • The "Squeeze" Problem: The authors found that without Lagrangian penalties, baseline models try to minimize makespan by "squeezing" tasks together, leading to massive constraint violations. The Lagrangian approach is essential for generating "near-feasible" results that post-processing can easily fix.
  • Better than "Optimal": In several cases (yn02, ta25, ta30), the JSP-DNN solutions actually had a lower makespan than what the commercial CP-Optimizer could find within its 30-minute time limit. This suggests the model is excellent at finding high-quality regions of the search space that exact solvers might struggle to reach quickly.

Key Results

  • Speed: Inference and recovery take less than 30 milliseconds. In contrast, a commercial solver might take minutes or even hours to reach the same solution quality.
  • Accuracy: The "Optimality Gap" (how much worse the solution is compared to the best known) was remarkably low. For many instances, the gap was near 0% or even negative (meaning it beat the baseline solver).
  • Comparison: JSP-DNN consistently outperformed standard scheduling heuristics (like Shortest Processing Time) by an order of magnitude in terms of accuracy.

Limitations and Future Work

  • Fixed Assignments: The current model assumes that the assignment of tasks to machines is fixed; only the durations change. Future work could explore learning the combinatorial machine assignments as well.
  • Distribution Shift: Like most supervised learning, the model is trained on a specific distribution of problems. If the factory conditions change drastically beyond what was in the training set, performance might degrade.
  • Hot-starting Solvers: The authors suggest that JSP-DNN could be used to "seed" or "hot-start" traditional solvers, giving them a high-quality starting point to find the true global optimum much faster.

For more details, see the full paper: "Fast Approximations for Job Shop Scheduling: A Lagrangian Dual Deep Learning Method" (arXiv:2110.06365).

Summary updated

BibTeX
@inproceedings{kotary2022fast,
  author = {James Kotary and Ferdinando Fioretto and Pascal Van Hentenryck},
  title = {{Fast Approximations for Job Shop Scheduling: A Lagrangian Dual Deep Learning Method}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i7.20685},
}
Figure