Batching-Aware Joint Model Onloading and Offloading for Hierarchical Multi-Task Inference

Seohyeon Cha, Kevin Chan, Gustavo de Veciana, Haris VikaloarXiv 2025 · DOI

Introduction

Modern edge computing environments, such as those supporting autonomous driving or augmented reality, increasingly require the simultaneous execution of multiple complex vision tasks (e.g., object detection, lane segmentation, and depth estimation). These applications operate across a three-tier hierarchy consisting of resource-constrained clients, intermediate edge servers, and the high-capacity cloud. Managing these tasks effectively requires balancing the deployment of specialized models ("onloading") with the routing of queries ("offloading") to meet strict memory, compute, and latency constraints.

Traditional approaches often treat model selection and query routing as independent problems or focus on single-task scenarios. This paper introduces J3O and BAJ3O, algorithms designed to jointly optimize these decisions while specifically accounting for the performance gains and latency trade-offs of GPU batching at the edge.

The J3O Framework

The authors formulate the resource management problem as a Mixed-Integer Nonlinear Program (MINLP). Because MINLP is NP-hard, the Joint Optimization of Onloading and Offloading (J3O) algorithm employs an alternating optimization strategy to ensure tractability:

  1. Model Onloading Subproblem: This phase determines which specialized or multi-task models to store at each tier. The authors demonstrate that the objective function for this subproblem is monotone and submodular. This property allows for the use of an efficient greedy algorithm with Lagrangian relaxation, guaranteeing a solution within $(1 - 1/e)$ of the global optimum.
  2. Offloading Subproblem: Once models are fixed, the problem of routing queries becomes a standard Constrained Linear Programming problem, which can be solved rapidly to optimize data flow across the hierarchy.

Batching-Aware Optimization (BAJ3O)

To further enhance efficiency, the framework is extended into BAJ3O (Batching-Aware J3O). Batching multiple queries at the edge improves GPU throughput but introduces non-convexity into the optimization due to the "batching window"—the time spent waiting for a batch to form.

Edge batch size adjustments for Task A and Task B as the proportion of Task A traffic increases, illustrating the system's adaptive batching logic.

BAJ3O addresses this by utilizing a linear surrogate to approximate batching constraints. This allows the system to dynamically adjust batch sizes based on real-time traffic proportions, as shown in the figure above, where the system shifts resources between tasks as the workload skew changes.

Experimental Results

The framework was evaluated using benchmarks including Taskonomy-5, DomainNet-6, and Cityscape3D-3. The results demonstrate that BAJ3O provides a near-optimal balance between computational cost and inference accuracy.

Comparison of average system accuracy between the optimal MINLP solver and the proposed BAJ3O algorithm across varying task traffic proportions.

Key findings include:

  • Near-Optimal Accuracy: BAJ3O consistently achieves over 97% of the accuracy of an exhaustive MINLP solver.
  • Computational Efficiency: The algorithm runs in less than 15% of the time required by optimal solvers, making it suitable for dynamic environments where resource allocation must be updated frequently.
  • Adaptability: The system automatically learns to deploy specialized models during high-skew traffic and general multi-task models when the workload is balanced.

Conclusion

J3O and BAJ3O represent a significant step forward in hierarchical multi-task inference. By proving the submodularity of the onloading problem and incorporating batching-aware constraints, the authors provide a robust, scalable solution for edge-cloud systems. Future work will explore more dynamic memory modeling for intermediate activations and real-time adaptation to rapidly fluctuating network conditions.

Summary updated

BibTeX
@misc{cha2025batching,
  author = {Seohyeon Cha and Kevin Chan and Gustavo de Veciana and Haris Vikalo},
  title = {{Batching-Aware Joint Model Onloading and Offloading for Hierarchical Multi-Task Inference}},
  year = {2025},
  eprint = {2508.13380},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.13380},
}
Figure