HeRo: Adaptive Orchestration of Agentic RAG on Heterogeneous Mobile SoC

Maoliang Li, Jiayu Chen, Zihao Zheng, Ziqian Li, Xinhao Sun, Guojie Luo, Chenchen Liu, Xiang ChenarXiv 2026

TL;DR

Deploying complex, multi-agent Retrieval-Augmented Generation (RAG) workflows locally on mobile devices is highly desirable for privacy, but it suffers from severe bottlenecks due to hardware heterogeneity and shared memory contention. This paper introduces HeRo, an adaptive online scheduling framework that dynamically partitions and maps agentic RAG tasks across mobile CPUs, GPUs, and NPUs. By co-optimizing workload shapes and hardware affinity while strictly managing memory bandwidth, HeRo achieves up to a 10.94× reduction in end-to-end latency.

What Problem Does This Paper Address?

On-device LLM execution is crucial for user privacy, especially when dealing with personal data via Retrieval-Augmented Generation (RAG). While traditional RAG follows a simple "retrieve-then-generate" pipeline, modern agentic RAG employs specialized AI agents (e.g., query rewriters, document rerankers, search planners) to handle complex queries. This creates a multi-model, multi-stage workflow with dynamic, runtime-dependent execution paths.

Optimizing this on a mobile System-on-Chip (SoC) is incredibly challenging due to three hardware realities:

  1. Accelerator Affinity: Different sub-stages run vastly better on specific processing units (PUs)—for instance, reranking favors NPUs, while generation favors GPUs.
  2. Shape Sensitivity: Execution time varies non-linearly with workload "shapes" (like batch sizes or sequence lengths) due to hardware tiling and kernel fusion.
  3. Bandwidth Contention: Mobile CPUs, GPUs, and NPUs all share a unified DRAM memory bus. Running tasks concurrently can saturate this bus, causing severe slowdowns that negate the benefits of parallelism.

Prior mobile LLM frameworks focus on optimizing single models or static operator placement. They fail to address the cross-layer design space stretching from a dynamic RAG task graph down to heterogeneous hardware accelerators.

Figure 1: RAG Application Optimization Stack. Our work is a hardware and graph co-scheduling framework.

Methods

HeRo bridges the gap between agentic RAG software and mobile hardware using a two-part approach: profiling-based performance modeling and an adaptive online scheduler.

1. Heterogeneous Performance Modeling

HeRo profiles model-PU combinations offline to capture base latencies and memory bandwidth demands. Crucially, it models contention-induced slowdown as a dynamic factor rather than a hard limit, allowing the system to predict exactly how much an active task will degrade if another task is scheduled alongside it.

2. Adaptive Heterogeneous Scheduling

At runtime, HeRo's online scheduler orchestrates execution using three techniques:

  • Shape-Aware Sub-Stage Partitioning: It breaks down streaming workloads (like autoregressive decoding) into token groups and selects optimal batch sizes for batchable tasks to maximize hardware efficiency.
  • Critical-Stage Prioritized Accelerator Mapping: Because the full agentic RAG graph is partially observable and evolves at runtime, HeRo calculates a "criticality score." This score combines the known remaining path with a statistical estimate of future paths, ensuring that tasks on the critical path get assigned to the fastest available accelerator.
  • Bandwidth-Aware Concurrency Control: Instead of blindly maximizing PU utilization, the scheduler throttles parallel execution if the estimated memory bandwidth contention would slow down the critical path.
Orchestration Techniques

Datasets

The authors evaluated HeRo using four widely accepted RAG benchmarks that reflect diverse workload characteristics:

  • FinqaBench and TruthfulQA: Characterized by shorter inputs (queries $\le$ 70 tokens, contexts $\sim$200 tokens).
  • HotpotQA and 2WikiMultihopQA: Characterized by longer, more complex multi-hop reasoning contexts (up to 1k tokens).

Key Insights and Ideas

  • The Concurrency Paradox: On mobile SoCs, more parallelism can equal less performance. Running tasks on the GPU and NPU simultaneously can trigger memory bandwidth contention that slows down execution times by over 30%. Protecting the critical path from contention is more important than keeping all accelerators busy.
  • Non-Linear Shape Sensitivity: Bigger batches aren't always better. Due to cache sizes and memory layouts on mobile chips, throughput scales step-wise and non-linearly with batch size, making runtime shape selection vital.
  • Scheduling the Unknown: Schedulers cannot treat agentic RAG as a static Directed Acyclic Graph (DAG). Schedulers must treat it as an evolving horizon, using historical probabilities to guess which branches (like an optional web search) the agent will take next.

Key Results

HeRo was tested on commercial devices representing two generations of mobile silicon: the Snapdragon 8 Gen 3 (Redmi K80) and the Snapdragon 8 Elite/Gen 4 (OnePlus 13), running Qwen3 and LLaMA3 model families.

  • End-to-End Speedups: HeRo achieved up to a 10.94× latency reduction compared to a GPU-only baseline (llama.cpp) and up to a 1.5× speedup over static multi-accelerator mapping strategies (Ayo-like scheduling).
  • Workflow Complexity Gains: The performance leaps were most pronounced in complex workflows (e.g., Workflow 3, "Deep Researcher"), where HeRo successfully parallelized independent agent steps without triggering memory bottlenecks.

Limitations and Future Work

  • Single-User Focus: The current design assumes a single-user request model typical of personal smartphones. It does not address multi-tenant or concurrent user requests.
  • Hyperparameter Tuning: The framework relies on two key hyperparameters ($\alpha$ for contention penalty and $\eta$ for future criticality weight) that must currently be tuned offline via grid search for each specific device deployment.
  • Profiling Overhead: The accuracy of the scheduler depends on extensive offline profiling of the models on the target SoC; adapting to entirely new hardware architectures requires re-profiling.

Summary updated

BibTeX
@misc{li2026hero,
  author = {Maoliang Li and Jiayu Chen and Zihao Zheng and Ziqian Li and Xinhao Sun and Guojie Luo and Chenchen Liu and Xiang Chen},
  title = {{HeRo: Adaptive Orchestration of Agentic RAG on Heterogeneous Mobile SoC}},
  year = {2026},
  eprint = {2603.01661},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.01661},
}
Figure