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

📄 arXiv: 2606.23370v1 📥 PDF

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

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

发布日期: 2026-06-22


💡 一句话要点

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

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

关键词: 大型语言模型 移动设备 安全推理 资源隔离 ARM TrustZone 可回收资源管理 隐私保护

📋 核心要点

  1. 现有的LLM推理方法在安全性和效率上存在不足,尤其在资源隔离和管理方面面临挑战。
  2. FlexServe通过解耦访问权限与管理权限,采用可回收资源隔离机制,提升了安全推理的效率。
  3. 实验结果显示,FlexServe在TTFT速度上比现有设计平均提升10.05倍,优化设计提升2.44倍。

📝 摘要(中文)

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

🔬 方法详解

问题定义:本文旨在解决移动设备上LLM推理过程中的安全性和效率问题,现有方法在资源隔离和管理上存在显著的性能瓶颈。

核心思路:FlexServe的核心思路是将安全资源的访问权限与管理权限解耦,使得正常世界的操作系统无法直接访问安全资源,但仍能有效管理这些资源。

技术框架:FlexServe框架由可回收安全内存(Flex-Mem)和可回收安全NPU(Flex-NPU)组成,结合正常世界操作系统进行协同管理,实现安全LLM推理。

关键创新:FlexServe的关键创新在于引入了可回收资源隔离机制,使得安全推理的效率大幅提升,并且降低了对正常应用的影响。

关键设计:在设计中,Flex-Mem和Flex-NPU的分配与回收机制经过优化,确保了资源的高效利用,同时保持了安全性。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

FlexServe在实验中表现出色,平均TTFT速度比传统TrustZone设计提升了10.05倍,比优化后的设计提升了2.44倍,显示出其在安全和效率上的显著优势。

🎯 应用场景

FlexServe的研究成果在移动设备的安全推理领域具有广泛的应用潜力,尤其适用于需要保护用户隐私的场景,如个人助手、智能家居和移动金融等。随着对数据隐私和安全性的关注增加,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.