FlexServe: A Fast and Secure LLM Serving System for Mobile Devices with Flexible Resource Isolation

📄 arXiv: 2606.23370 📥 PDF

作者: Yinpeng Wu, Yitong Chen, Lixiang Wang, Jinyu Gu, Zhichao Hua, Yubin Xia

分类: cs.CR, cs.LG, cs.OS

发布日期: 2026-07-05


💡 一句话要点

提出FlexServe以解决移动设备LLM推理的安全与效率问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 移动设备 安全推理 资源隔离 ARM TrustZone 高效管理 FlexServe

📋 核心要点

  1. 现有的TrustZone技术在保护LLM推理时存在资源隔离不灵活和安全资源管理效率低的问题。
  2. FlexServe通过引入可回收资源隔离机制,构建可回收安全内存和安全NPU,实现了安全资源的高效管理。
  3. 实验表明,FlexServe在推理速度上比两个TrustZone基础设计分别提升了10.05倍和2.44倍。

📝 摘要(中文)

随着设备端大型语言模型(LLMs)的快速发展,其隐私保护和可用性优于云端模型。然而,在LLM推理过程中,模型权重和用户数据的安全性面临威胁,攻击者可能通过破坏操作系统内核来窃取这些信息。ARM TrustZone作为移动设备的硬件隔离技术,虽然可以保护敏感应用,但在LLM推理中却带来了显著的性能开销。为了解决这一问题,本文提出了FlexServe,一个快速且安全的LLM推理系统,通过解耦安全资源的访问权限和管理权限,提升了资源管理的灵活性和效率。实验结果表明,FlexServe在推理速度上显著优于现有设计。

🔬 方法详解

问题定义:本文旨在解决移动设备上LLM推理的安全性与效率问题。现有的TrustZone技术在资源隔离和管理上存在显著的性能开销,影响了正常应用的运行效率。

核心思路:FlexServe的核心思路是将安全资源的访问权限与管理权限解耦,使得正常世界的操作系统无法访问安全资源,但仍能对其进行管理,从而提高资源的灵活性和效率。

技术框架:FlexServe的整体架构包括可回收安全内存(Flex-Mem)和可回收安全NPU(Flex-NPU),这两个模块只能被安全世界访问,但可以由正常世界的操作系统高效分配和回收。FlexServe框架与正常世界操作系统协同工作,实现安全内存的管理。

关键创新:FlexServe的主要创新在于引入了可回收资源隔离机制,解决了传统TrustZone在资源管理上的不足,使得安全推理的性能大幅提升。

关键设计:FlexServe在设计上注重资源的高效分配与回收,确保安全内存和NPU的使用效率,同时保持系统的安全性。具体的参数设置和资源管理策略在实现中进行了优化。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,FlexServe在推理速度上相较于两个TrustZone基础设计分别实现了10.05倍和2.44倍的提升,证明了其在安全与效率上的显著优势。这一成果为移动设备上的LLM推理提供了新的解决方案。

🎯 应用场景

FlexServe的研究成果具有广泛的应用潜力,尤其适用于需要高隐私保护和实时响应的移动设备场景,如智能手机、平板电脑等。随着LLM技术的普及,FlexServe能够为用户提供更安全的推理体验,推动移动智能应用的发展。

📄 摘要(原文)

Device-side Large Language Models (LLMs) have grown explosively, offering stronger privacy and higher availability than their cloud-side counterparts. During LLM inference, both the model weights and the user data are valuable, and attackers may compromise the OS kernel to steal them. ARM TrustZone is the de facto hardware-based isolation technology on mobile devices, used to protect sensitive applications from a compromised OS. However, protecting LLM inference with TrustZone incurs significant overhead to both the secure inference and the normal aplications, due to two challenges: the inflexible resource isolation and the inefficient secure resource management.To address these challenges, this paper presents FlexServe, a fast and secure LLM inference system for mobile devices. The key idea is to decouple the access permission from the management permission of secure resources, so that the normal-world OS cannot access them but can still manage them as usual. First, FlexServe introduces a Recallable Resource Isolation mechanism to construct Recallable Secure Memory (Flex-Mem) and a Recallable Secure NPU (Flex-NPU). They can only be accessed by the secure world, but can be efficiently allocated and reclaimed by the normal-world OS. Based on them, FlexServe further introduces a FlexServe Framework to run secure LLM inference in the secure world. It works together with the normal-world OS to perform cooperative secure memory management. We implement a prototype of FlexServe and compare it with two TrustZone-based strawman designs. The results show that FlexServe achieves average TTFT speedups of 10.05X over the strawman and 2.44X over an optimized strawman.