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

Combinatorial Reinforcement Learning Based Scheduling for DNN Execution on Edge

Qiwei Yuan, Jiaqi Yin, Cunxi YuOpenReview 2021

TL;DR

This paper introduces a novel reinforcement learning (RL) framework that learns to schedule Deep Neural Network (DNN) execution on resource-constrained edge devices. By imitating optimal scheduling algorithms, their approach achieves significant runtime speedups (up to 2.5x) over commercial compilers on physical hardware, while drastically reducing scheduling computation time.

What Problem Does This Paper Address?

Deploying increasingly large and complex Deep Neural Networks (DNNs) on edge devices is challenging due to their substantial computational and memory demands. Efficiently mapping these DNNs onto hardware requires scheduling their computational graphs, a task known to be NP-hard. Existing methods either rely on hand-crafted heuristics that trade off performance for speed, or exact optimization methods that are too slow for practical use. This paper tackles the problem of finding near-optimal DNN schedules efficiently, especially for pipelined multi-core edge systems where memory communication costs are significant.

Methods

The core of this work is a reinforcement learning (RL) framework that learns to schedule DNN computational graphs. Instead of developing new heuristics, the RL agent is trained to imitate the behavior of existing optimal scheduling algorithms. This imitation is achieved by training a pointer network (PtrNet) architecture, which is well-suited for combinatorial optimization problems on graphs.

Key aspects of their method include:

  • Graph Embedding: DNN computational graphs are represented as directed acyclic graphs (DAGs). To feed these into the RL agent, they are embedded into a vector space, capturing attributes like node connectivity, topological order, and memory consumption.
  • PtrNet Architecture: An encoder-decoder PtrNet, configurable with either LSTMs or Transformers, is used. The encoder processes the graph structure, and the decoder generates the scheduling sequence.
  • Imitation Learning: The RL agent is trained to mimic a "ground truth" scheduling sequence generated by a deterministic algorithm (specifically, ASAP - As Soon As Possible scheduling). The reward function is designed to maximize the cosine similarity between the RL agent's generated schedule and the ground truth.
  • Synthetic Data Training: To overcome the scarcity of real-world DNN scheduling data, the framework is trained on synthetically generated graphs. This allows for controlled exploration of graph complexity and properties.
  • Post-Inference Processing: A crucial step for real-world deployment, this procedure corrects minor dependency violations and optimizes node placement for hardware constraints after the RL agent has produced a schedule.

Datasets

The paper primarily uses synthetically generated DNN computational graphs for training the RL framework. The characteristics of these synthetic graphs are controlled to mimic real-world DNNs, with parameters like the number of nodes, graph degrees, and memory constraints being adjustable.

For evaluation, the authors use ten popular ImageNet models. These models are compiled using TF-Lite and then executed on physical Google Edge TPUs.

Key Insights and Ideas

  • Imitation is Powerful: Training an RL agent to imitate an existing optimal (but slow) scheduling algorithm is a viable strategy to achieve near-optimal performance at inference speed. This bypasses the need to discover entirely new optimization strategies.
  • Synthetic Data Generalizes: Training on carefully constructed synthetic datasets can lead to an RL scheduler that generalizes well to real-world, much larger, and more complex DNN graphs. This is a significant advantage given the difficulty of obtaining large-scale real-world training data for this problem.
  • LSTM Decoder is Key: Empirical results suggest that using an LSTM as the decoder in the PtrNet architecture is crucial for effective pipelining optimization on edge devices.
  • Domain Knowledge Integration: While trained on synthetic data, the framework's effectiveness is enhanced by incorporating domain knowledge about the target hardware (Edge TPUs) during training and through post-inference processing.

Key Results

The proposed RL-based scheduling framework demonstrates significant improvements:

  • Runtime Speedup: Achieved up to ~2.5x runtime speedups over the commercial Edge TPU compiler on physical Google Edge TPUs.
  • Scheduling Efficiency: The RL scheduling process itself is orders of magnitude faster than exact optimization methods.
  • Generalizability: The framework successfully schedules large computational graphs (up to 26x larger than training samples) and performs consistently across different pipeline stages (4, 5, and 6-stage) on Edge TPUs. For instance, ResNet152 showed a 56.3% improvement in a 6-stage pipeline.

Limitations and Future Work

  • Synthetic Training Dependency: While effective, the reliance on synthetic data means that the quality of the generated schedules is inherently tied to the representativeness of the synthetic dataset.
  • Specific Hardware Focus: The current evaluation is primarily on Google Edge TPUs. While the approach is generalizable, further validation on diverse edge hardware would be beneficial.
  • Future Work: The authors suggest exploring more sophisticated RL training techniques and potentially integrating more explicit domain knowledge into the RL agent's architecture or reward function. They also hint at the potential for this approach to be applied to other combinatorial optimization problems beyond DNN scheduling.

Summary updated

BibTeX
@misc{yuan2021combinatorial,
  author = {Qiwei Yuan and Jiaqi Yin and CUNXI YU},
  title = {{Combinatorial Reinforcement Learning Based Scheduling for DNN Execution on Edge}},
  year = {2021},
  url = {https://openreview.net/forum?id=iJ_nnX5Qvyt},
  howpublished = {OpenReview},
}
Figure