Search arXiv⌕ Search

arXiv subjects

Hanzhang Ma

Publications and source records attributed to Hanzhang Ma.

3 recordsLinked to original sources

Optimizing LLM Inference on Heterogeneous Edge SoCs with Operator-Level Controls

On-device large language model (LLM) inference on heterogeneous edge systems-on-chip (SoCs) can improve privacy, latency, and energy efficiency. However, efficiently exploiting CPU-NPU heterogeneity is challenging because matrix multiplication (MM) performance varies substantially across tensor geometries and accelerator configurations, while NPU execution may also face limited accelerator-addressable memory. We present a two-stage framework for shape-aware MM placement in edge LLM inference. Stage 1 profiles each unique MM geometry across CPU and NPU configurations, while Stage 2 selects MM instances for NPU execution under the memory budget, accounting for activation buffers shared by equal-geometry MMs. We realize this framework in a 3,000-LOC Rockchip NPU backend for llama.cpp supporting fine-grained placement, multi-core NPU execution, and efficient memory and layout management. Across 18 model-quantization pairs, shape-aware placement improves average prefill/decode throughput by 32.9%/20.2% over the shape-unaware first-come, first-served (FCFS) strategy and 253.8%/12.6% over the CPU-only strategy, outperforming both in every pair.

cs.AR↗

DIFFNAS: Predictor-Free Neural Architecture Search via Diffusion Model and Zero-Cost Evaluation

Neural Architecture Search (NAS) has advanced the automated design of deep networks, but remains computationally expensive due to reliance on model training or performance predictors. We introduce DIFFNAS, a predictor-free NAS framework that leverages a discrete graph diffusion model guided by zero-cost performance proxies. Unlike prior diffusion-based NAS methods that require learned performance predictors, DIFFNAS conditions the generative process on training-free metrics such as MeCo and SWAP, enabling efficient architecture search with minimal computational overhead. Experiments on NAS-Bench-201 show that DIFFNAS finds the optimal architectures for CIFAR-10 and CIFAR-100 (94.37% and 73.51%) without a pretrained predictor, while reducing search cost by up to 17.5x compared to DiffusionNAG. On the MobileNetV3 search space, its accuracy is lower than that of DiffusionNAG. These results highlight the promise of diffusion models combined with zero-cost proxies for scalable and effective architecture search.

cs.LG↗

MetaPermit: Scalable and Auditable Access Control for AI Agents via LLM-Inferred Meta-Attributes

The rise of autonomous AI agents equipped with tools has introduced significant security risks, ranging from unintended tool misuse to adversarial manipulation through Indirect Prompt Injection (IPI) attacks. In practice, deployed agent systems such as OpenAI Codex and Claude Code protect tool invocations through a combination of coarse-grained permission rules and LLM-based judgments about individual proposed actions. Both components, however, have important limitations: static policies must anticipate possible user intents and therefore do not scale to open-ended tasks, while LLM-driven authorization supports dynamic decisions but produces inconsistent outcomes and remains vulnerable to targeted IPI attacks. To provide scalable and more consistent authorization, we propose MetaPermit, a policy-based tool access-control framework that decouples semantic inference from security enforcement. By analyzing agent-user interactions, we derive a compact, task-independent set of meta-attributes that capture the relationships among the user's intent, the execution context, and the proposed tool call. These meta-attributes allow MetaPermit to authorize tool use without enumerating user intents. At runtime, an LLM infers the meta-attribute values for each proposed tool call, while a fixed policy evaluates these values to allow or deny the call, making each decision auditable through the inferred values and the applied policy rule. We evaluate MetaPermit on the AgentDojo and AgentDyn benchmarks, across seven task suites and five attack methods, using two widely deployed open-weight LLMs. The results show that MetaPermit produces 31% more consistent authorization decisions than LLM-driven authorization and outperforms the state-of-the-art defenses CaMeL and IPIGuard in both task completion, with improvements of up to 109%, and robustness to IPI attacks, with no malicious tool calls executed.

cs.CR↗