WorksComputer Science
Dual Representation Enhanced Diffusion Policy for Flexible Job Shop Scheduling
Abstract
The Flexible Job-Shop Scheduling Problem (FJSP) is a fundamental and challenging optimization problem in smart manufacturing. Although recent deep reinforcement learning (DRL) approaches can learn effective scheduling policies through interaction with the environment, their performance often degrades as problem scale and processing-time uncertainty increase. In this paper, we propose DredRL, a dual representation enhanced diffusion-policy reinforcement learning scheduler. DredRL first constructs enhanced dual representations of operations and machines through self- and cross-attention mechanisms to capture both intra-entity and inter-entity dependencies. A diffusion model is further employed as the policy network, generating scheduling decisions through iterative denoising conditioned on the encoded state to enhance policy expressiveness and robustness. Extensive experiments on synthetic, public, large-scale, and stochastic FJSP benchmarks demonstrate that DredRL outperforms state-of-the-art learning-based schedulers across most configurations. Compared with SOTA learning-based methods, DredRL reduces makespan by up to 5.44% on synthetic instances. It also achieves the best learning-based performance on three of four public benchmarks and outperforms the stochasticity-aware algorithms on stochastic benchmarks. These results demonstrate that combining enhanced dual representations with diffusion-based policies provides an effective and robust approach for large scale scalable FJSP scheduling in complicated environment.
Introduction
Manuscript received September 22, 2026; revised XXX, 2026; accepted XXX, 2026. This research was supported in part by MTC Individual Research Grants (IRG) (Award M23M6c0113), A*STAR under its MTC Programmatic (Award M23L9b0052), and the National Research Foundation Singapore and DSO National Laboratories under the AI Singapore Programme (AISG Award No: AISG2-GC-2023-006). (Corresponding author: Wei Zhang)
Yunyi Zhao is with both the Information and Communications Technology Cluster, Singapore Institute of Technology, Singapore 138683, and the Department of Electrical and Computer Engineering, National University of Singapore, Singapore 119077 (e-mail: [email protected], [email protected]).
Wei Zhang is with the Information and Communications Technology Cluster, Singapore Institute of Technology, Singapore 138683 (e-mail: [email protected]).
Cheng Xiang is with the School of Information and Communication Engineering, Dalian University of Technology, Dalian, Liaoning Province, China, 116024 (e-mail: [email protected]).
Vadakkepat Prahlad is with the Department of Electrical and Computer Engineering, National University of Singapore, Singapore 119077 (e-mail: [email protected]).
Zuming Liu is with the College of Smart Energy, Shanghai Jiao Tong University, Shanghai, China, 200240 (e-mail: [email protected]).
Smart manufacturing is becoming increasingly critical to the sustainable and resilient development of a nation. Singapore’s manufacturing 2030 aims to grow the sector’s value-add by 50% by leveraging AI, robotics, and IIoT to build a sustainable, high-tech, and less labor-intensive ecosystem [1]. In smart manufacturing, Flexible Job-Shop Scheduling Problem (FJSP) is a fundamental combinatorial optimization problem, where each operation can be processed by one of multiple eligible machines with different processing times. This flexibility substantially enlarges the decision space compared with classical job-shop scheduling, making NP-hard FJSP even more complicated and practically challenging in large-scale, dynamic production environments. In real-world workshops, schedulers must repeatedly decide which operation–machine pair to dispatch under complex constraints such as precedence relations, machine availability, and heterogeneous processing capabilities, while pursuing objectives such as minimizing makespan and improving throughput. Consequently, developing fast and high-quality scheduling approaches that generalize across instance sizes and remain effective under uncertainty is critical for modern intelligent manufacturing systems.
FJSP scheduling has been extensively studied, and existing methods can be broadly divided into two stages. The first stage is dominated by traditional approaches, including exact optimization and heuristic algorithms. Exact methods such as mixed-integer linear programming (MILP) [2] can produce optimal solutions for sufficiently small FJSP instances, while rule-based dispatching strategies such as FIFO [3] and its variants incorporate human expertise into decision making. OR-Tools [4] is also a strong benchmark in this stage, using combinatorial optimization to generate high-quality, near-optimal schedules. However, these methods become increasingly impractical in real-world settings, as computational cost grows exponentially with problem scale and online decision making requirements. Heuristic algorithms, such as genetic algorithms [5], are relatively flexible, but they rely heavily on manual design, parameter tuning, and domain knowledge, and their performance can also degrade as problem size increases. As a result, traditional methods face clear limitations on dynamic large-scale problems.
To overcome these issues, the second stage has shifted toward machine learning, particularly deep reinforcement learning (DRL). DRL is well suited to FJSP, since the problem can be formulated as a Markov decision process (MDP) in which selecting a feasible operation–machine pair corresponds to an action, while minimizing makespan can be directly incorporated into reward optimization. By learning scheduling policies through interaction with the environment, DRL enables fast inference after training and offers stronger adaptability to dynamic conditions and unseen instances [6]. Recent studies further combine DRL with graph neural networks (GNNs) and attention-based architectures to improve state representation. For example, HGNN [7] employs heterogeneous graph embeddings to capture structural relations among operations and machines, while DANIEL [8] achieves state-of-the-art (SOTA) performance through attention-based state representation and PPO-Clip optimization [9]. More recently, SPM-DAN extends learning-based FJSP scheduling to stochastic processing times by introducing a scenario processing module that explicitly encodes multiple processing-time scenarios and their associated uncertainty into the scheduling policy [10]. Such graph- and attention-based representations are particularly effective for FJSP because they capture structural dependencies and operation–machine interactions, thereby improving the state representation and decision quality of DRL agents. Related work has also explored multi-agent reinforcement learning (MARL) to enhance cooperation among agents [11].
While DRL models enable fast scheduling in FJSP, existing schedulers remain limited as states are often overly simplified and the scheduling complexity is not well captured. First, representing the intricate job shop structure remains difficult. The effectiveness of learning-based methods relies heavily on the quality and comprehensiveness of state representations [12]. Operations and machines form a heterogeneous, bipartite dependency system in which both intra-entity dynamics and inter-entity couplings jointly decide the performance. Second, most DRL policies are parameterized by standard discriminative networks that output pointwise action distributions. Such policies cannot be sufficiently expressive for the multimodal decision landscape of FJSP, particularly on larger instances. Third, existing DRL schedulers often struggle with model generalization and transferability. Many DRL methods are trained on a fixed distribution of instances and implicitly assume consistent state/action dimensions and similar feature statistics, which leads to overfitting to the training scale and layout. Even though several works have proposed complex state encoding schemes [7, 8, 13], the resulting representations can still be ambiguous in capturing complex scheduling semantics, and the learned policies often degrade when transferred to unseen tasks or instance distributions. Therefore, additional mechanisms are needed to better couple features across heterogeneous entities and to improve the model’s generalization capability.
In this paper, we propose DredRL, a novel dual representation enhanced diffusion policy reinforcement learning scheduler for FJSP. DredRL combines a dual-representation encoder with a diffusion-based policy to improve scalability, expressiveness, and robustness. The encoder models operations and machines as two coupled streams, using enhanced self-attention to capture intra-entity dependencies and cross-attention to model operation–machine interactions. Based on the encoded state, the diffusion actor generates scheduling decisions through iterative denoising within an actor–critic DRL framework, enabling more expressive modeling of complex decision distributions. Extensive experiments on synthetic, public, large-scale, and stochastic benchmarks show that DredRL outperforms SOTA learning-based schedulers across most configurations. Compared with DANIEL, it reduces makespan by up to 5.44% on small-scale and 3.53% on larger-scale instances without size-specific retraining. It also achieves the best learning-based performance on most public benchmarks and SD3 stochastic settings, demonstrating strong cross-size, cross-distribution, and stochastic generalization.
The main contributions of this work are summarized as follows:
We propose DredRL, a dual-representation-enhanced diffusion-policy DRL framework for FJSP that improves solution quality, scalability, and robustness across deterministic and stochastic scheduling environments.
We design an enhanced dual representation encoder that jointly models operation and machine features, enabling richer inter-entity and intra-entity feature coupling for more effective operation–machine decision making.
We develop a distinct diffusion-based actor formulation that employs a diffusion model as the policy network and generates scheduling decisions through iterative denoising conditioned on the encoded state, improving policy expressiveness and robustness under varying problem scales and processing-time uncertainty.
We conduct extensive experiments covering synthetic, public, large-scale, and stochastic FJSP benchmarks. The results demonstrate consistent improvements over SOTA learning-based baselines, strong cross-size and cross-distribution generalization, and competitive performance under stochastic processing times, including improvements over the stochasticity-aware algorithms and reduced gaps to time-limited OR-Tools references.
Proposed Method
FJSP is a classical optimization problem that is known to be NP-hard. The FJSP can be formulated into a decision-making process by adopting an MDP. DredRL combines a dual-representation encoder with a diffusion-based policy as shown in Figure 1. In this section, we will introduce preliminaries of FJSP, our proposed method and system configurations including MDP formulation and a novel dual representation enhanced diffusion policy for FJSP.
Figure 1. Overall system architecture of the proposed DredRL scheduler for FJSP. Raw operation, machine, and operation–machine pairing features are encoded by a dual-representation module to form the state embedding . A diffusion-policy RL agent then samples an action distribution and selects compatible pairs for task assignment. The FJSP environment executes the assignment, computes reward , updates status, and feeds back new raw features for the next decision step.
Flexible Job-shop Scheduling Problem
The FJSP usually considers a set of jobs and machines, which are represented by and respectively. Each job consists of a sequence of operations noted by . With an assumption that all jobs have arrived at starting time , each operation can be processed by a subset of feasible machines . The processing time of operation on machine can be described as . The optimization of FJSP aims at operation-machine assignments while obeying the precedence constraints of operations and machine availability. The preliminary target of FJSP optimization is to minimize the completion time of all jobs (makespan).
A well-known method to represent FJSP is the disjunctive graph. It is considered a clearer way of formulating FJSP with both operation precedence and machine availability constraints. A disjunctive graph is described by a tuple . The node set represents all operation nodes and starting, terminating nodes. The conjunction set consists of directed edges between operation nodes of each job , following the precedence constraints of operations. The disjunction set comprises groups, reflecting that each machine can possibly process a subset of operations. A solution to an FJSP is described by a directed acyclic graph in which each operation has been scheduled to a specific machine with remaining disjunctions lined to deleted.
Dual Representation Network
In complex environments like FJSP, multiple types of relationship exist among different operations and machines. Adopting self-attention models like Graph Attention Networks (GATs) [14] in many existing solutions have been proved to conduce to feature extraction. However, relying entirely on one type of attention mechanism may create blind spots for the DRL agent, neglecting the inner connection between different features. To overcome this issue, we propose a novel dual representation model for DredRL, involving both intra- and inter-entity (dual) representations of complicated features in FJSP environment, as shown in Figure 2. Details will be introduced below. GATs are one of the effective and commonly used GNN architectures with self-attention. A multi-head attention mechanism is applied to both attention blocks to enhance their learning ability [15] and the multi-head attention parameter is denoted as .

Figure 2. Dual-representation encoder with self- and cross-attention blocks. Raw operation (Op) and machine (M) features are linearly projected and processed via masked dot-product attention, followed by mean pooling and ELU to derive embeddings.
Self-attention Block.: Self-attention models excel in relating input elements inside the same entity. This step helps the DredRL to learn the intra-entity representation. In some existing FJSP solutions, GATs are applied as self-attention module to update node features by attending over neighbors. In this intra-entity representation learning step, operation features and machine features are processed separately with local self-attention block. The
operation feature block helps find out the significance of queuing operations, while the machine feature block leads to the competition between multiple machines based on their compatibility of operations. By stacking graph attention layers, the GAT yields final node embeddings for downstream steps.
Operation Nodes
Let and denote the operation and machine sets at step . For both blocks, given input node features , the GAT finally output a feature embedding . For operation , a neighbor set includes neighbor nodes of operation (including itself). The attention coefficients between the neighbor nodes represent the relationships between operation itself, its predecessor and successor if they exist. Each GAL computes attention coefficients for operation node as,
where are input graph feature vectors after grouping, is a linear transformation matrix shared by all operation nodes, the operation concatenates two vectors to a unified vector, and is the weight vector of a single-layer network with a LeakyReLU activation. A dynamic mask on operation node attention coefficients is introduced to block invalid operations at each step. Given an operation-machine compatibility , we apply masking on logits via,
The attention coefficients are normalized via a softmax function as,
The weighted sum of transformed neighboring features is computed by,
where is a nonlinear activation, typically ELU function. We combine multi-heads by concatenation:
Machine Nodes
In machine self-attention block, the calculation is focused to extract machine feature relationship between machine nodes. For machine node , a neighbor set of denotes neighbor nodes, where represents an operation set competed by machine and . In this way, self-attention mechanism in machine entity allows multiple machines competing over their commonly compatible operations.
The attention coefficients between nodes and are given by,
where is a linear transformation matrix between machine nodes, and is the weight vector of a single-layer network for machine self-attention block. Similar softmax activation, combination steps are then introduced to derive output embeddings as,
Cross-attention Block
Cross-attention models are beneficial for correlating features from different entities, which conduce to the learning of inter-entity representation. We focus on capturing the operation-machine relationship by using cross-attention block. Although there are operation-machine pairing features to address the connection, each operation and its compatible machines, the inter-entity relationship between operation and machine features should be further represented in a more expressive way. Therefore, we developed cross-attention block to capture the in-depth connections between operations and machines. Specifically we use the following process for cross-attention calculation.
Operation-Machine Block
We denote node input features of operation as and machine as . We denote as the compatibility edge set, and the compatible machines for operation . The multi-head attention parameter is with output dimension . For each compatible pair ,
where and denotes concatenation. After applying mask as Eq. (2), we normalize over the neighborhood as,
The cross-attended representation of each compatible pair for each head is,
Multi-heads are concatenated as Eq. (5).
Machine-Operation Block
Similarly as attention block, for machine node , a neighbor set of denotes neighbor nodes, where represents an operation set competed by machine and . And the compatible operations for selected machine . With reference to [8] we introduce to measure the competition intensity between and . A filter is applied to extract from input operation features. For each compatible pair with neighbors , the cross-attention coefficients are calculated as,
where stands for an additional weight matrix for . After softmax, another machine-operation cross-attended representation of each compatible pair is,
Combination of Dual Representation
We denote that after GAT layers, the features are processed from to . We first apply average pooling to operation and machine embeddings as
where stands for combined operation embeddings at layer , means combined machine embeddings at layer , and represents concatenated global FJSP features at layer .
Deep Reinforcement Learning
As our target is to dynamically schedule operations to compatible and available machines and update the disjunctive graph step by step, an MDP is formulated to enable recursive interaction between scheduling agent and the FJSP environment. At each time step , the scheduling agent receives a state from the FJSP environment and chooses an action to assign the operation to a compatible machine for processing. The FJSP environment processes the action and returns a reward accordingly. By repeating this process, the disjunctive graph will be updated step by step and eventually becomes the solution map. The MDP is defined as follows.
State
At step , we only keep relevant operations and machines for decision-making: completed operations and machines that cannot process any remaining operation are ignored. Let and denote the relevant operation and machine sets, and denotes the compatible operation-machine pairs. The state is a set of feature vectors , , and . As scheduling progresses, the state set shrinks accordingly. We align with existing solutions to derive operation, machine, and operation-machine pair features. We follow the state construction of [8].
b) Action: The action space is , comprised of all compatible operation-machine pairs defined at step . All operations in are selected from the candidate set .
c) State transition: Executing starts processing an operation on a machine, updates the environment, and yields the next state by updating , , and computing features.
d) Reward: We choose the negative value of the estimated makespan as a reward at each step . Let be a completion time lower bound at step , with
Then we represent the step-wise reward as the difference of
With , maximizing the return is equivalent to minimizing the makespan .
e) Policy: We apply an actor-critic framework, specifically with a diffusion model-based policy over . The details will be introduced in the following section.
Basics of Diffusion Models
The actor network of DredRL is based on a novel design and built upon a diffusion model that generates actions by iteratively denoising Gaussian noise conditioned on the processed state embeddings, enabling expressive action distributions under uncertainty [16]. Below we summarize the forward noising and reverse denoising processes in denoising diffusion probabilistic model (DDPM).
Forward Process: The forward diffusion process gradually adds Gaussian noise to , producing :
where is scheduled for . Following [17], we use the variational posterior scheduler,
with hyper-parameters and . The reverse conditional posterior (given ) is,
where and , and,
Basics of Diffusion Models
Reverse Process
The reverse process starts from pure noise and iteratively denoises to obtain . Since is intractable, we approximate it by,
where is the state embeddings, including operation, machine and operation-machine pairing features after dual representation. With the scheduler, we set . We parameterize denoising via a noise-prediction network and reconstruct,
which yields the corresponding mean estimate,
Overall, the generation distribution is,
with .
Decision Making Process
We hereby design the decision making process based on a actor-critic framework, where two Multi-Layer Perceptrons (MLPs) parameterized by and are used as actor and critic respectively. Specifically, is designed for DDPM. We denote a state embeddings after GAT layers as ,
where is the operation-machine pairing features. The denoising process is repeatedly calculated through Eq. (25) and we may derive a scalar,
After applying a softmax function, a policy is further derived as,
The critic network is an estimator which takes the global features as input to produce a scalar as an approximation of the state value.
Training
We use an encoder , a diffusion actor and a critic model , initialized by parameters . The training target is to minimize the loss function regarding the parameters . After computing advantages , returns by GAE, and is thereby calculated using the diffusion actor with mask . And the probability ratio between old and updated policies will be denoted as,
A loss function in PPO-clip format is applied to train the proposed DredRL, with following components,
where is a PPO-clip parameter. And the combined loss function will be described as ,
where are value coefficient and entropy coefficient. Overall, the algorithm of DredRL can be described as Algorithm 1. The complexity analysis of it is included in the Appendix.
Algorithm 1: Training DredRL with PPO-Clip
Input: Environment ; dual-representation encoder with cross-attention; per-candidate diffusion actor with reverse steps and prior scale ; critic ; episodes , horizon , clip , PPO epochs , GAE .
Output:
Initialize ; ;
for to do
if then draw a fresh batch of training instances;
Reset ; observe raw features ;
for to do
Form candidate set and mask from ;
;
Build per-candidate states by (24);
for (in parallel) do
;
by (21);
end
;
Sample ; store ;
Step to obtain ;
end
Compute by GAE;
for to do
for minibatch do
;
Update by ascending in (29);
end
end
;
if then validate on ;
end
return
Results
Experimental Setup
We present the experimental setup in the following aspects. Our experiments were conducted by a machine with an NVIDIA GeForce RTX 4090 GPU with 24GB memory and an Intel Core Ultra 7 265KF 20-Core CPU and 64GB of DDR5 RAM. The operating system is Ubuntu 24.04.2 LTS with CUDA V12.2 toolkit. Besides, our experiments are organized with the following details.
Datasets: For each FJSP configuration with jobs and machines, we generate 100 random instances for evaluation. Following existing works, we consider three types of synthetic datasets. The first dataset, denoted as SD1, follows [7], where each job contains a varying number of sequential operations. For each operation in an instance, the number of compatible machines and the corresponding processing time on machine are sampled from and , respectively. SD2 follows the same generation procedure but increases the processing-time range to . To further evaluate robustness under processing-time uncertainty, we additionally adopt SD3 following SPM-DAN [10]. SD3 retains the instance structure of SD2 while introducing correlated processing times across compatible machines. Specifically, a base processing time is first generated for each operation, after which the machine-specific processing time is sampled as . To construct stochastic instances, each deterministic processing time is treated as the median, and a coefficient of variation is sampled for each operation–machine pair, with . Following [10], log-normal processing-time distributions are used to represent stochastic realizations. For comprehensive evaluation, the deterministic SD1 and SD2 datasets are divided into two groups. The general-size group contains , , , and instances, while the large-size group contains , , , and instances. Models are trained and tested on the general-size datasets, whereas the large-size instances are used only for testing to evaluate cross-size generalization without size-specific retraining. For stochastic evaluation on SD3, we consider , , , and instances and compare DredRL with deterministic and stochastic scheduling baselines under the same uncertainty setting.
Hyperparameters: The actor and critic networks are optimized using learning rates . We set the discount factor to to optimize the undiscounted episodic objective to ensure the optimization of total makespan. The graph-attention encoder employs graph attention layers (GALs) with attention heads per layer. For the diffusion-based policy network, the DDPM denoiser runs for denoising steps. Training is conducted for at most episodes, and the policy is validated every episodes. The PPO-style loss uses coefficients for the policy term and for the value term, and an entropy regularization coefficient is applied to
encourage exploration. Generalized advantage estimation (GAE) parameters for SD1 and SD2 are applied to stabilize the training process. Finally, the hidden layers in actor and critic MLPs are parameterized as and respectively, representing two hidden layers with the specified numbers of neurons in each MLP. The PPO update epoch per batch is and minibatch size is . For the stochastic SD3 experiments, additional parameters are introduced to characterize processing-time uncertainty. The base processing time is sampled from , and the processing time on each compatible machine is generated by applying a multiplicative perturbation to the corresponding base processing time. The coefficient of variation for each operation–machine pair is sampled as to represent heterogeneous processing-time uncertainty. For stochastic decision evaluation, the Value-at-Risk confidence level is set to . Unless otherwise stated, the remaining network architecture and DRL training settings are kept consistent with those used for SD1 and SD2. Details are further included in Appendix.
3) Comparison Baselines: We evaluate DredRL against representative SOTA baselines and an optimization-based reference solver, OR-Tools, which can produce optimal or near-optimal schedules via combinatorial optimization. However, since FJSP is NP-hard, OR-Tools may require prohibitive runtime to certify optimality, particularly for large-scale instances. Following common practice, we therefore treat OR-Tools solutions as strong references rather than true optima, and impose a 30-minute time limit. We further compare with three recent learning-based SOTA methods, HGNN [7], DANIEL [8] and SPM-DAN [10]. HGNN formulates FJSP as a heterogeneous graph and leverages GNN message passing to capture relationships among scheduling entities, while DANIEL employs attention-based GAT for decision making. SPM-DAN further extends DANIEL to stochastic FJSP by introducing an attention-based scenario processing module that explicitly encodes sampled processing-time scenarios, enabling the policy to account for uncertainty during scheduling. For fairness, we report results from the original papers whenever available under their recommended settings; otherwise, we re-implement the methods to obtain missing results. Each result has been averaged from 10 independent runs due to the stochastic nature of algorithms.
Deterministic Results
1) Small and Large Size Instances: We first evaluate DredRL on small FJSP instances from SD1 and SD2 under both greedy and sampling decoding, as reported in Table I. Overall, DredRL consistently outperforms HGNN and remains competitive with or improves upon the SOTA learning-based baseline DANIEL. Considering the better decoding result of each method, DredRL achieves a lower makespan than DANIEL in 5 out of the 8 small-scale configurations, with an average makespan reduction of 1.46% across these settings. The improvement is more
| Size | HGNN [7] | DANIEL [8] | DredRL (Ours) | OR-Tools | |||||
| Greedy | Sampling | Greedy | Sampling | Greedy | Sampling | ||||
| SD1 | 10 × 5 | Makespan | 111.67 | 105.59 | 106.71 | 101.67 | 106.24 | 99.79 | 96.32 |
| Gap | 15.94% | 9.62% | 10.79% | 5.55% | 10.30% | 3.60% | |||
| 20 × 5 | Makespan | 201.42 | 207.53 | 197.56 | 192.78 | 197.86 | 193.45 | 188.15 | |
| Gap | 12.26% | 10.3% | 5.01% | 2.46% | 5.16% | 2.82% | |||
| 15 × 10 | Makespan | 166.92 | 161.28 | 160.86 | 153.22 | 160.54 | 152.86 | 143.53 | |
| Gap | 16.30% | 12.37% | 12.07% | 6.75% | 11.85% | 6.50% | |||
| 20 × 10 | Makespan | 215.78 | 214.81 | 198.50 | 193.91 | 199.82 | 195.30 | 195.95 | |
| Gap | 10.10% | 9.61% | 1.29% | -1.06% | 1.97% | -0.35% | |||
| 30 × 10 | Makespan | 314.71 | 308.55 | 288.61 | 286.77 | 292.07 | 285.07 | 274.67 | |
| Gap | 14.58% | 12.33% | 5.08% | 4.41% | 6.33% | 3.79% | |||
| 40 × 10 | Makespan | 417.87 | 410.76 | 379.28 | 379.71 | 384.20 | 378.14 | 365.96 | |
| Gap | 14.18% | 12.24% | 3.64% | 3.76% | 4.98% | 3.33% | |||
| 100 × 10 | Makespan | 1035.0 | 1023.6 | 946.0 | 985.3 | 930.5 | 918.1 | 944.2 | |
| Gap | 9.62% | 8.41% | 0.19% | 4.35% | -1.45% | -2.76% | |||
| 200 × 5 | Makespan | 2055.1 | 2042.0 | 1901.1 | 2018.2 | 1903.05 | 1833.9 | 1884.7 | |
| Gap | 9.04% | 8.35% | 0.87% | 7.08% | 0.97% | -2.69% | |||
| SD2 | 10 × 5 | Makespan | 553.61 | 483.39 | 408.4 | 366.74 | 411.11 | 361.26 | 326.24 |
| Gap | 69.69% | 48.33% | 25.18% | 12.41% | 26.01% | 10.73% | |||
| 20 × 5 | Makespan | 1059.04 | 962.90 | 671.03 | 629.94 | 666.82 | 630.88 | 602.04 | |
| Gap | 75.91% | 59.94% | 11.46% | 4.63% | 10.76% | 4.79% | |||
| 15 × 10 | Makespan | 944.09 | 756.07 | 591.21 | 521.83 | 580.55 | 493.42 | 377.17 | |
| Gap | 114.09% | 100.46% | 56.75% | 38.35% | 53.92% | 30.82% | |||
| 20 × 10 | Makespan | 1452.82 | 990.37 | 610.16 | 535.64 | 602.43 | 531.39 | 464.16 | |
| Gap | 126.12% | 113.37% | 31.45% | 19.06% | 29.79% | 14.48% | |||
| 30 × 10 | Makespan | 1564.57 | 1486.56 | 794.62 | 757.48 | 785.19 | 749.53 | 692.26 | |
| Gap | 126.01% | 114.74% | 14.79% | 9.42% | 13.42% | 8.27% | |||
| 40 × 10 | Makespan | 2048.96 | 1976.25 | 983.37 | 951.21 | 973.98 | 943.43 | 998.39 | |
| Gap | 105.23% | 97.94% | -1.50% | -4.73% | -2.44% | -5.50% | |||
| 100 × 10 | Makespan | 5046.9 | 4844.7 | 2233.4 | 2253.2 | 2223.9 | 2236.5 | 2114.5 | |
| Gap | 138.68% | 129.12% | 5.62% | 6.56% | 5.17% | 5.77% | |||
| 200 × 5 | Makespan | 9985.4 | 9674.7 | 5923.8 | 7093.4 | 5915.1 | 6069.1 | 5876.3 | |
| Gap | 69.93% | 64.64% | 0.81% | 20.71% | 0.66% | 3.28% |
Table I. Performance comparison of different algorithms on synthetic datasets SD1 and SD2 with different instance sizes. Results are included with makespan and corresponding relative gap (%) to OR-Tools.
pronounced on SD2, where DredRL achieves an average reduction of 2.66% over DANIEL, compared with 0.25% on SD1. This trend indicates a stronger advantage under the higher processing-time variability of SD2, where scheduling decisions become more challenging. In particular, on SD2 15×10, DredRL reduces the best DANIEL makespan from 521.83 to 493.42, corresponding to a 5.44% reduction, while decreasing the relative gap to OR-Tools from 38.35% to 30.82%. A similar improvement is observed on SD2 20×10, where the makespan decreases from 552.64 to 531.39 and the corresponding gap is reduced from 19.06% to 14.48%. Although DANIEL remains slightly better on SD1 20×5, SD1 20×10, and SD2 20×5, the differences are small, whereas DredRL provides more substantial gains on the more difficult SD2 cases. In addition, sampling generally improves the quality of the learned schedules: sampling produces a lower makespan than greedy decoding for DredRL in 14 of the 16 configurations in Table I. Several cases also yield negative gaps relative to OR-Tools, indicating that the learned policies can occasionally discover schedules with smaller makespan than those returned by the time-limited solver. Since OR-Tools is executed under a fixed computational budget of up to 1800 seconds and may terminate before reaching proven optimality, these negative gaps indicate that the learned policies can discover higher-quality schedules within only a few seconds of inference. This further indicates their computational efficiency for time-sensitive scheduling applications.
We further investigate the scalability and cross-size generalization of DredRL on the larger 30×10, 40×10, 100×10, and 200×5 instances. The model trained on small instances is directly transferred to these larger configurations without size-specific retraining. Notably, DredRL achieves the best learning-based makespan in all 8 large-scale settings when compared with the better of greedy and sampling decoding for DANIEL and HGNN. Relative to the best DANIEL result for each configuration, DredRL obtains an average makespan reduction of 1.23%, with improvements observed consistently across both SD1 and SD2. The gains are particularly evident on the largest SD1 instances. On SD1 100×10, DredRL reduces the makespan from 946.0 to 918.1, corresponding to a 2.95% improvement over DANIEL, while changing the OR-Tools-relative gap from 0.19% to −2.76%. An even larger improvement is obtained on SD1 200×5, where DredRL reduces the best DANIEL makespan from 1901.1 to 1833.9, a 3.53% reduction, and achieves a gap of −2.69% relative to OR-Tools. On SD2, DredRL also maintains consistent advantages as the problem scale increases. For example, on SD2 30×10, it reduces the makespan from 757.48 to 749.53 and the corresponding gap from 9.42% to 8.27%. On SD2 40×10, DredRL further improves the best DANIEL makespan from 951.21 to 943.43, yielding the lowest gap of −5.50% among all compared methods. Even on the largest SD2 cases, the advantage is preserved: DredRL reduces the makespan from 2233.4 to 2223.9 on 100×10 and from 5923.8 to 5915.1 on 200×5. Interestingly, greedy decoding becomes preferable to sampling for DredRL on these two largest SD2 instances, suggesting that the relative benefit of stochastic decoding may depend on the problem scale. Overall, across all 16 configurations in Table I, DredRL outperforms the best DANIEL decoding in 13 cases and achieves an average makespan reduction of 1.34%. More importantly, its consistent advantage across all evaluated larger-scale instances demonstrates stronger cross-size generalization and scalability, suggesting that the learned operation–machine representations remain effective as the scheduling problem expands substantially beyond the training scale.
Public Benchmarks
To verify the performance in solving real-world problems, we also evaluate DredRL based on a few commonly used public datasets mk and la, while la includes rdata, edata, vdata. All of the models are trained on the synthetic dataset which includes small 10×5 instances and tested on four public data benchmarks. Table II reports results on four public benchmarks and shows that DredRL achieves consistently strong performance against HGNN and DANIEL under both greedy and sampling decoding. As reported in Table II, on mk, DredRL reduces the makespan from 180.8 with DANIEL to 178.1, decreasing the relative gap to OR-Tools from 3.79% to 2.24%. A similar advantage is observed on edata, where DredRL achieves a makespan of 1106.7, compared with 1122.6 for DANIEL, reducing the corresponding gap from 9.10% to 7.56%. On vdata, DredRL further obtains the lowest learning-based makespan of 924.41 and a gap of only 0.52%, slightly improving upon DANIEL at 925.4 and 0.63%, respectively. The only exception is rdata, where DANIEL sampling achieves a marginally lower makespan of 978.28 than DredRL’s 979.9, corresponding to gaps of 4.54% and 4.71%, respectively. Overall, DredRL achieves an average gap of 3.76% to the time-limited OR-Tools reference across the four public benchmarks, compared with 4.52% for DANIEL and 6.11% for HGNN under their respective sampling modes. This corresponds to a 0.76 percentage-point reduction in the average gap over DANIEL. These results demonstrate that DredRL learns transferable scheduling representations that generalize effectively beyond the training distribution.
| Public Benchmarks | HGNN [7] | DANIEL [8] | DredRL (Ours) | OR-Tools | |||||
| Greedy | Sampling | Greedy | Sampling | Greedy | Sampling | ||||
| mk | Makespan | 201.4 | 190.3 | 185.7 | 180.8 | 182.8 | 178.1 | 174.2 | |
| Gap | 15.61% | 9.41% | 6.60% | 3.79% | 4.94% | 2.24% | |||
| la | rdata | Makespan | 1030.83 | 985.3 | 1031.63 | 978.28 | 1026.6 | 979.9 | 935.8 |
| Gap | 10.15% | 5.29% | 10.24% | 4.54% | 9.70% | 4.71% | |||
| edata | Makespan | 1187.48 | 1116.68 | 1194.98 | 1122.6 | 1164.8 | 1106.7 | 1028.9 | |
| Gap | 15.41% | 8.53% | 16.14% | 9.10% | 13.21% | 7.56% | |||
| vdata | Makespan | 955.9 | 930.80 | 944.85 | 925.4 | 941.7 | 924.41 | 919.6 | |
| Gap | 3.95% | 1.22% | 2.75% | 0.63% | 2.40% | 0.52% |
Table II. Performance comparison of different algorithms on public benchmarks.
Stochastic Research
To further evaluate DredRL under stochastic processing times, we conduct experiments on the SD3 dataset following the generation protocol in [10]. SD3 preserves the instance structure of SD2 but introduces stronger correlation among the processing times of an operation across-compatible machines. Specifically, a base processing time is first sampled from for each operation , and its machine-dependent processing time is then generated as . To construct stochastic instances, the deterministic processing time is treated as the median, while the coefficient of variation is sampled from to determine the uncertainty level of each operation–machine pair. Following the evaluation setting in [10], we consider four instance sizes, 10×5, 20×5, 15×10, and 20×10, and compare DredRL with DANIEL, SPM-DAN, and the OR-Tools’ CP-SAT solver and CP-Stoch algorithm [10] baselines. Both greedy and sampling inference are reported for the learning-based methods to provide a consistent comparison under stochastic scheduling conditions.
As shown in Table III, DredRL demonstrates strong performance on SD3, particularly under sampling inference. Compared with DANIEL, DredRL achieves a lower sampling makespan on all four instance sizes, with reductions of 1.74%, 2.81%, 2.53%, and 3.06% for 10×5, 20×5, 15×10, and 20×10, respectively. More importantly, DredRL achieves the best learning-based results on three of the four configurations, outperforming the stochasticity-aware SPM-DAN on 10×5, 20×5, and 15×10. Its gaps to the deterministic OR-Tools reference are consistently negative under sampling, ranging from −1.39% to −4.11%, indicating that DredRL obtains better schedules than the time-limited OR-Tools reference on all settings. It also outperforms CP-Stoch on three of the four problem sizes, with only a marginal difference on . Although SPM-DAN achieves the best result on , the consistently competitive performance of DredRL across different problem sizes demonstrates its ability to capture processing-time uncertainty without relying on a dedicated scenario-processing architecture. This highlights the robustness and adaptability of the representation and diffusion mechanism.
| Size | DANIEL [8] | SPM-DAN [10] | DredRL (Ours) | OR-Tools | |||||
| Greedy | Sampling | Greedy | Sampling | Greedy | Sampling | CP-SAT | CP-Stoch [10] | ||
| 10 × 5 | Makespan | 722.77 | 688.74 | 710.63 | 677.24 | 712.30 | 676.74 | 688.10 | 676.19 |
| Gap | 5.04% | 0.09% | 3.27% | -1.58% | 3.52% | -1.65% | - | -1.73% | |
| 20 × 5 | Makespan | 1307.48 | 1272.08 | 1279.70 | 1243.75 | 1276.49 | 1236.30 | 1253.67 | 1271.71 |
| Gap | 4.29% | 1.47% | 2.08% | -0.79% | 1.82% | -1.39% | - | 1.44% | |
| 15 × 10 | Makespan | 1111.55 | 1066.60 | 1090.92 | 1039.73 | 1091.03 | 1039.59 | 1074.88 | 1105.90 |
| Gap | 3.41% | -0.77% | 1.49% | -3.27% | 1.50% | -3.28% | - | 2.89% | |
| 20 × 10 | Makespan | 1376.18 | 1336.97 | 1289.77 | 1261.80 | 1302.80 | 1296.06 | 1351.58 | 1406.68 |
| Gap | 1.82% | -1.08% | -4.57% | -6.64% | -3.61% | -4.11% | - | 4.08% |
Table III. Performance comparison of different algorithms on synthetic datasets SD3 with different instance sizes.
Ablation Study on Representation and Diffusion
To investigate whether the performance gain comes from the proposed DredRL representation, the diffusion-based decision model, or their combination, we organize a controlled comparison with four configurations: DANIEL, DredRL-MLP, proposed DredRL (we note as DredRL-Diffusion below), and DANIEL-Diffusion, all using greedy method. This design allows us to separately examine the effect of replacing the original representation with DredRL, introducing diffusion into different model architectures, and the interaction between the two components.
We evaluate all configurations on six SD2 problem sizes. For each setting, we report the mean and standard deviation of makespan over five training seeds to assess both solution quality and training stability. We then compare the relative gap to the OR-Tools reference across test instances, where proven optimal solutions are used when available and the time-limited OR-Tools solutions are used as references otherwise.
The results in Figure 3 demonstrate the advantage of incorporating diffusion into DredRL. Among the four methods, DredRL-Diffusion achieves the best mean makespan on four of the six problem sizes (, , , and ), while DredRL-MLP performs best on the remaining two. In terms of solution quality relative to OR-Tools, DredRL-Diffusion also obtains the lowest average gap of 23.36% across all problem sizes, compared with 23.56% for DredRL-MLP and 24.00% for DANIEL. Notably, it achieves increasingly competitive results on larger instances, including gaps of 13.48% and −0.44% on and , respectively. In addition to solution quality, DredRL-Diffusion exhibits competitive stability and robustness across the five random seeds, with an average makespan standard deviation of 4.04, compared with 4.08 for DredRL-MLP and 4.73 for DANIEL. In contrast, directly combining diffusion with DANIEL results in substantially higher training variance, with an average standard deviation of 14.74. Even on the larger and instances, where the variance of DredRL-Diffusion increases to 7.31 and 7.34, it remains substantially below the 20.24 and 22.81 observed for DANIEL-Diffusion. These results suggest that DredRL-Diffusion provides the strongest overall trade-off between solution quality, scalability, and training stability, and is therefore adopted as the final configuration.
Figure 3. Comparison of relative makespan gaps to the OR-Tools reference on SD2 across different problem sizes.
Conclusion
This paper presented DredRL, a dual-representation-enhanced diffusion-policy reinforcement learning framework for FJSP. By coupling operation and machine representations through enhanced self-attention and cross-attention, DredRL captures both intra-entity dependencies and inter-entity compatibility more effectively than prior DRL schedulers. In addition, a diffusion model is employed as the policy network to improve the expressiveness and robustness of scheduling decisions. Extensive experiments on synthetic, public, large-scale, and stochastic FJSP benchmarks demonstrate that DredRL consistently outperforms SOTA learning-based methods across most configurations. Compared with DANIEL, it reduces makespan by up to 5.44% on small-scale instances and 3.53% on larger-scale instances without size-specific retraining. It also achieves the best learning-based performance on most public benchmarks and outperforms the stochasticity-aware SPM-DAN on three of four SD3 configurations. These results demonstrate strong cross-size and cross-distribution generalization, and robustness to processing-time uncertainty, showing the effectiveness of combining enhanced dual representations with diffusion-based policies for scalable FJSP scheduling.
Future work will extend DredRL to multi-objective optimization and complex dynamic environments, including machine breakdowns and new job arrivals. We will also investigate more efficient diffusion-policy inference, such as reducing denoising steps and policy distillation, to further improve computational efficiency and facilitate industrial deployment.
References
- [1]National Research Foundation Singapore, “Research, innovation and enterprise 2030 (rie2030) factsheet,” https://file.go.gov.sg/rie2030factsheet.pdf, 2025, accessed: 2026-03-13.
- [2]C. Özgüven, L. Özbakır, and Y. Yavuz, “Mathematical models for job-shop scheduling problems without routing and process plan flexibility,” Applied mathematical modelling, vol. 34, no. 6, pp. 1539–1548, 2010.
- [3]N. B. Ho and J. C. Tay, “Evolving dispatching rules for solving the flexible job-shop problem,” in 2005 IEEE congress on evolutionary computation, vol. 3. IEEE, 2005, pp. 2848–2855.DOI
- [4]L. Perron and V. Furnon, “OR-Tools,” https://developers.google.com/optimization/, google. Accessed: 2026-03-14.
- [5]D. Rooyani and F. M. Defersha, “An efficient two-stage genetic algorithm for flexible job-shop scheduling,” Ifac-PapersOnline, vol. 52, no. 13, pp. 2519–2524, 2019.DOI
- [6]F. Ni, J. Hao, J. Lu, X. Tong, M. Yuan, J. Duan, Y. Ma, and K. He, “A multi-graph attributed reinforcement learning based optimization algorithm for large-scale hybrid flow shop scheduling problem,” in Proceedings of the 27th ACM SIGKDD conference on knowledge discovery & data mining, 2021, pp. 3441–3451.DOI
- [7]W. Song, X. Chen, Q. Li, and Z. Cao, “Flexible job-shop scheduling via graph neural network and deep reinforcement learning,” IEEE Transactions on Industrial Informatics, vol. 19, no. 2, pp. 1600–1610, 2022.DOI
- [8]R. Wang, G. Wang, J. Sun, F. Deng, and J. Chen, “Flexible job shop scheduling via dual attention network-based reinforcement learning,” IEEE Transactions on Neural Networks and Learning Systems, vol. 35, no. 3, pp. 3091–3102, 2023.arxiv.org/abs/2305.05119
- [9]N.-C. Huang, P.-C. Hsieh, K.-H. Ho, and I.-C. Wu, “Ppo-clip attains global optimality: Towards deeper understandings of clipping,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 38, no. 11, 2024, pp. 12600–12607.arxiv.org/abs/2312.12065
- [10]I. G. Smit, Y. Wu, P. Troubil, Y. Zhang, and W. P. Nuijten, “Neural combinatorial optimization for stochastic flexible job shop scheduling problems,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 39, no. 25, 2025, pp. 26 678–26 687.arxiv.org/abs/2412.14052
- [11]J.-D. Zhang, Z. He, W.-H. Chan, and C.-Y. Chow, “Deepmag: Deep reinforcement learning with multi-agent graphs for flexible job shop scheduling,” Knowledge-Based Systems, vol. 259, p. 110083, 2023.DOI
- [12]Y. Xiao, D. Wang, R. Cao, X. Wu, B. Li, and Y. Zhou, “Geld: A unified neural model for efficiently solving traveling salesman problems across different scales,” Pattern Recognition, p. 112865, 2025.arxiv.org/abs/2506.06634
- [13]K. Lei, P. Guo, W. Zhao, Y. Wang, L. Qian, X. Meng, and L. Tang, “A multi-action deep reinforcement learning framework for flexible job-shop scheduling problem,” Expert Systems with Applications, vol. 205, p. 117796, 2022.DOI
- [14]P. Veličković, G. Cucurull, A. Casanova, A. Romero, P. Liò, and Y. Bengio, “Graph attention networks,” 2018. [Online]. Available: https://arxiv.org/abs/1710.10903
- [15]A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin, “Attention is all you need,” 2023. [Online]. Available: https://arxiv.org/abs/1706.03762
- [16]Y. Zhao, W. Zhang, C. Xiang, H. Du, D. Niyato, and S. Gao, “Diffusion-modeled representation learning for carbon and risk-aware microgrid optimization,” in International Conference on Pattern Recognition. Springer, 2026, pp. 1–16.arxiv.org/abs/2507.16867
- [17]J. Ho, A. Jain, and P. Abbeel, “Denoising diffusion probabilistic models,” Advances in neural information processing systems, vol. 33, pp. 6840–6851, 2020.arxiv.org/abs/2006.11239

