Task Placement and Resource Allocation for Edge Machine Learning: A GNN-based Multi-Agent Reinforcement Learning Paradigm

Yihong Li, Xiaoxi Zhang, Tianyu Zeng, Jingpu Duan, Chuan Wu, Di Wu, Xu Chen · DOI

Introduction

In the evolving landscape of edge computing, the "edge" has transitioned from a simple data collection point to a primary hub for machine learning (ML) execution. From real-time traffic forecasting to video analytics, ML workloads are increasingly saturating edge clusters. However, scheduling these tasks presents a unique set of challenges. Unlike traditional workloads, ML tasks are "elastic," meaning their performance scales non-linearly and unpredictably based on the specific combination of CPU and GPU resources allocated to them.

This paper introduces TapFinger, a distributed scheduling paradigm designed to navigate the complexities of edge ML. By leveraging Multi-Agent Reinforcement Learning (MARL) and Graph Neural Networks (GNNs), TapFinger optimizes both task placement and fine-grained resource allocation in decentralized edge environments.

The Problem: Scheduling at the Edge

Traditional cluster schedulers, such as Kubernetes or YARN, typically rely on static, rule-based heuristics. These systems often fail in edge ML contexts for three primary reasons:

  1. Elasticity and Uncertainty: The relationship between resource allocation and execution speed is often non-linear. An extra GPU might double performance for one model while providing negligible gains for another if the CPU becomes a bottleneck. Most schedulers lack the nuance to understand these dependencies.
  2. High-Dimensional Decision Space: Simultaneously deciding which cluster should host a task and exactly how many CPU/GPU units to allocate creates a massive search space that traditional algorithms struggle to navigate efficiently.
  3. Centralization Bottlenecks: Relying on a single central scheduler for geographically distributed edge nodes introduces latency and creates a single point of failure. A decentralized approach is required to ensure system resilience.

The TapFinger Architecture

TapFinger treats each edge cluster as an autonomous agent within a MARL framework. To coordinate these agents without a central controller, the authors implemented several innovative components:

Heterogeneous Graph Attention Network (HAN)

Rather than processing system data as a flat list, TapFinger represents the network as a graph where nodes represent clusters, pending tasks, and active workloads. The HAN allows agents to perceive the global state and inter-cluster dependencies through message passing, facilitating collaborative decision-making.

Action Decomposition

To manage the complex decision space, the "actor" network is split into two distinct phases:

  • Task Selection: A Pointer Network is utilized to select a task from a variable-length queue, allowing the model to handle fluctuating workloads.
  • Resource Allocation: A Multi-Layer Perceptron (MLP) determines the optimal CPU/GPU mix for the selected task based on its specific resource sensitivity.

Bayesian Conflict Resolution

In a decentralized system, multiple clusters might attempt to claim the same task simultaneously. TapFinger employs a coordination mechanism based on Bayes’ theorem to resolve these conflicts, ensuring the task is assigned to the cluster with the most suitable available resources.

Multi-Task Logical Timesteps

To improve resource utilization, the authors extended the RL model to allow for "packing" multiple tasks into a single real-world interval. By using logical RL timesteps, the system can perform multiple serial inferences to schedule a batch of tasks almost instantaneously, avoiding the idle time common in simpler RL-based schedulers.

Experimental Evaluation

The researchers evaluated TapFinger using a combination of synthetic and real-world datasets:

  • ML Workloads: Real performance data was collected from training and inference tasks, including Image Classification (CIFAR-10), Language Modeling (Transformers), and Speech Recognition (Wav2Vec2).
  • Network Traces: The evaluation used bandwidth and latency measurements from Alibaba Cloud edge clusters to simulate realistic network conditions.
  • Synthetic Modeling: Tasks were also modeled using Amdahl’s Law to test the system's ability to distinguish between resource-sensitive and resource-insensitive workloads.

Key Results and Insights

TapFinger demonstrated significant performance gains over state-of-the-art schedulers like Optimus and Tiresias:

  • Completion Time: The system achieved a 25.1% to 28.6% reduction in average task completion time in standard settings, with improvements reaching up to 54.9% in highly heterogeneous environments.
  • Scalability: Unlike centralized models, TapFinger maintained superior performance as the number of edge clusters and task arrival rates increased, proving its viability for large-scale deployments.
  • Resource Intelligence: The system successfully identified resource bottlenecks, avoiding the common pitfall of over-allocating expensive GPU resources when the CPU was the primary limiting factor.

Conclusion and Future Work

TapFinger represents a significant step forward in decentralized edge management by combining the relational awareness of GNNs with the decision-making power of MARL. While the current model assumes non-preemptive scheduling to minimize overhead, future research directions include exploring "elastic" training—where resource allocations can change dynamically during execution—and improving the model's ability to adapt to entirely unseen ML architectures in real-time.

Summary updated

BibTeX
@article{li2023task,
  author = {Yihong Li and Xiaoxi Zhang and Tianyu Zeng and Jingpu Duan and Chuan Wu and Di Wu and Xu Chen},
  title = {{Task Placement and Resource Allocation for Edge Machine Learning: A GNN-based Multi-Agent Reinforcement Learning Paradigm}},
  journal = {IEEE Trans. Parallel Distributed Syst.},
  year = {2023},
  doi = {10.1109/tpds.2023.3313779},
}
Figure