TL;DR
Standard reinforcement learning methods for scheduling data workflows (DAGs) suffer from a hidden structural flaw: their underlying "list scheduling" mechanics completely block them from ever reaching an optimal schedule. This paper introduces WeCAN, a single-pass reinforcement learning framework that eliminates this "optimality gap" by introducing a mathematically grounded, analytically decreasing "skip" action that allows controlled waiting. WeCAN achieves state-of-the-art scheduling efficiency while maintaining the lightning-fast inference speeds of simple heuristics.
What Problem Does This Paper Address?
In modern data clusters, cloud platforms, and machine learning compilers, computational workloads are naturally represented as Directed Acyclic Graphs (DAGs), where nodes are tasks and edges represent data dependencies. Schedulers must decide when to run each task and where (on which heterogeneous resource pool) to place it to minimize the total execution time (makespan).
While deep reinforcement learning (RL) has shown great promise in solving these complex combinatorial problems, existing neural schedulers face a strict trade-off:
- Auto-regressive models make decisions step-by-step, re-running the neural network for every single task. This yields high-quality schedules but is far too slow for real-time production systems.
- Single-pass models run the network just once to predict priorities for all tasks, making them incredibly fast. However, they rely on a classic rollout method called list scheduling to turn those priorities into a concrete timeline.
The authors reveal a fundamental flaw in single-pass models: list scheduling suffers from a generation-induced optimality gap. Because list scheduling greedily dispatches tasks as soon as any resource becomes free, it is structurally incapable of choosing to wait—even if waiting a fraction of a second for a more compatible resource would drastically reduce the overall makespan.
Methods
The authors propose WeCAN (Weighted Cross-Attention Network), an end-to-end single-pass RL framework designed to handle environment heterogeneity and eliminate the list-scheduling optimality gap.
1. Two-Stage Single-Pass Design
- Stage I (Network Processing): The neural network executes exactly once per DAG instance, outputting task-pool priority scores and global parameters.
- Stage II (Score-Driven Rollout): A fast, non-neural simulator consumes these scores to construct the final schedule without any repeated network calls.
2. The WeCAN Encoder Architecture
To handle fluctuating numbers of tasks and resource pools without changing the network shape, WeCAN uses:
- Weighted Cross-Attention (WeCA): A size-agnostic attention mechanism that injects fine-grained task-pool compatibility coefficients as a multiplicative gating factor outside the softmax layer. This preserves the absolute compatibility profile of tasks across varying environments.
- Longest Directed Distance GNN (LDDGNN): An attention-based GNN that biases attention using the longest path distance between nodes, capturing critical-path delay propagation across the DAG.
3. Gap-Free Generation via Decreasing Skips
To eliminate the list-scheduling gap, the authors expand the rollout action space to include an active skip action, which intentionally leaves a resource idle until the next task finishes.
To keep the model single-pass, they compute a step-dependent decreasing skip score analytically during the rollout: $$q_{\text{skip}}(k) = \alpha \exp(-\gamma k / (2n)) + \beta$$ This mathematical formulation ensures that the model can actively wait during crucial early scheduling bottlenecks, but naturally phases out skipping as the rollout progresses ($k \to 2n$). The authors prove mathematically that this design restores full reachability to the optimal schedule space without slowing down training convergence.
Datasets
The framework was evaluated across three distinct types of workloads:
- TPC-H Dataset: Real-world database query DAGs (ranging from 30 to 100 DAGs per instance, averaging up to 918 tasks), augmented with multi-dimensional resource demands (CPU, memory) and task-pool compatibility profiles.
- Computation Graph Dataset: Synthetic workloads modeling ML compilers (Layer graphs, Erdős-Rényi, and Stochastic Block Models), featuring 500 tasks per problem.
- Resource-Intensive Workload (RI-W) Dataset: A modified version of the TPC-H dataset where a small fraction (~1.6%) of tasks are transformed into "heavy tasks" with massive resource demands and long processing times, specifically designed to induce severe resource contention.
Key Insights and Ideas
- The Fiber Geometry of Scheduling: Schedulers can be viewed as mapping priority lists to a "schedule order space." List scheduling non-injectively folds multiple distinct order "fibers" onto the same output, completely blinding the model to fibers that require strategic idling.
- The Danger of Unrestricted Waiting: While adding a skip action fixes the optimality gap, unrestricted waiting introduces massive irregularities into the optimization landscape, causing RL training to stall or converge to terrible solutions. An analytically decreasing skip score acts as a vital regularizer—keeping poor, high-delay schedules far away while keeping the optimal boundary reachable.
- Gating Outside the Softmax: Traditional transformers inject biases inside the softmax. WeCAN applies compatibility gating outside the softmax, ensuring that a task's absolute environmental constraints aren't washed out by relative normalization.
Key Results
- Superior Makespan: WeCAN consistently outperformed all traditional heuristics (like HEFT and IPPTS) and state-of-the-art neural baselines. It achieved up to an 11.7% makespan reduction on real-world TPC-H queries and up to 13.5% on ML compiler graphs.
- Heuristic-Level Speed: In greedy mode, WeCAN-Greedy generated schedules in fractions of a second (e.g., 0.15 seconds for TPC-H-30), matching the speed of simple heuristics and running 10x to 100x faster than multi-round auto-regressive neural schedulers.
- Heavy-Workload Resilience: On the resource-intensive RI-W dataset—where standard list scheduling performs poorly due to heavy task blocking—WeCAN's controlled skip mechanism yielded a 6.2% improvement over the best baseline.
Limitations and Future Work
The authors note that their current order-space analysis and skip-extended generation maps are tailored to the offline scheduling setting, where the entire DAG structure is known upfront.
Promising directions for future work include extending these single-pass realization principles to:
- Online/Dynamic settings where workloads arrive unpredictably over time.
- Communication-aware scheduling where data-movement overhead between heterogeneous nodes must be explicitly minimized.
- Stochastic environments where task processing times are probabilistic rather than deterministic.
Summary updated