Manuscript Offprint

arXiv:2610.37147

MAPLE-Sec: Mobility-Aware Partitioned Language-Model Engine for Roaming IoT Security

Yuhang Qiu, Ziwei Li, Jinfeng Xu, Jialiang Xie, Fangmin Ren, Shirong Guo, Jing Yang, Sunil Prajapat, Por Lip Yee

Yuhang Qiu, Member, IEEE, Ziwei Li, Jinfeng Xu, Jialiang Xie, Fangmin Ren, Shirong Guo, Jing Yang, Sunil Prajapat, and Por Lip Yee, Senior Member, IEEE

Abstract—Mobile Internet-of-Things (IoT) endpoints such as connected vehicles, wearables, and drones continuously cross heterogeneous network domains, creating handover-driven attack surfaces that static, cloud-anchored detectors cannot follow. However, three obstacles block real-time detection on such roaming endpoints: detection state is lost at every inter-domain handover; transmitting raw telemetry to a fixed detector exhausts the uplink and the device battery; and full-depth language model inference cannot meet millisecond latency budgets on constrained hardware. To tackle these challenges, we propose MAPLE-Sec, a mobility-aware partitioning framework that splits a compact, security-tuned language model across a roaming device and its nearest edge node. First, a trajectory-conditioned partition scheduler recomputes the split point from predicted handover timing, residual battery, and uplink quality. Second, a token-budgeted early-exit mechanism emits a verdict at the shallowest layer that meets a confidence threshold. Finally, a learned activation-compression codec migrates the intermediate inference state across edge nodes during handover without retransmitting raw telemetry. We formalize the partition-and-migration decision as an on-device constrained optimization solved in sub-millisecond time. Extensive experiments across the CIC-IoT and Edge-IIoTset corpora under both IID and non-IID roaming conditions demonstrate that MAPLE-Sec sustains detection across mobility events, improving the converged F1-score by up to 9.3% relative to Cloud-only and by 2.9 percentage points over the strongest edge-collaborative baseline (EdgeShard), while reducing end-to-end latency by up to 2.5×2.5\times. Ablation confirms that the activation-compression codec reduces migration energy by 2.4×2.4\times versus the raw-activation migration variant.

Index Terms—Mobile IoT security, intrusion detection, large language models, model partitioning, early exit, mobile edge computing, handover.

I. INTRODUCTION

Mobile IoT platforms increasingly combine vehicular and non-terrestrial systems with edge intelligence and distributed model execution [1], [2], [3], [4], [5], [6], [7], [8], [9]. These systems exchange safety-critical and latency-sensitive data while moving across heterogeneous network domains, creating a threat surface that differs from that of stationary networks. Recent threat-detection studies address smart-city and web environments [10], [11], but do not consider continuity of stateful detection across edge handovers.

Recent advances in language-model-based intrusion detection have demonstrated substantial improvements over classical signature and shallow machine-learning detectors [12], [13], [14], [15]. Complementary heterogeneous split and federated learning frameworks address resource variation during distributed model training [16], [17], [18]. Security-tuned encoders can capture semantic behavioral patterns in network flows, generalizing across attack families that would require separate classifiers in traditional systems. Edge-collaborative inference frameworks [19], [20] have further made it practical to run such models at inference latencies compatible with mobile workloads, by distributing computation between the device and a nearby edge node. Mobility-aware offloading [21], [22], [23] and resource scheduling under handover [24], [25], [26] have matured into a well-studied sub-field of mobile edge computing.

Despite these advances, a critical gap remains unaddressed: none of the existing paradigms accounts for the loss of inference state at inter-domain handover. When a roaming endpoint moves from one edge domain to another, any stateful language-model detector bound to the departing edge node loses the accumulated behavioral context for that device. The detection system must either restart from a cold state, producing a blind spot of several hundred milliseconds to several seconds, or fall back to a distant cloud anchor at the cost of prohibitive uplink latency and energy. This handover-induced detection gap is not a corner case: in the mobility profile evaluated in this study, handovers occur every 6–12 seconds, so repeated restarts can occupy a non-negligible fraction of the mission. Existing intrusion-detection surveys for IoT and vehicular networks [27], [28], [29] discuss mobility-related security challenges but do not provide a mechanism for migrating intermediate inference state between edge nodes.

Yuhang Qiu, Jialiang Xie, Fangmin Ren and Shirong Guo are with the School of Science, Jimei University, Xiamen, China. Shirong Guo is also with the Faculty of Engineering, Monash University, Wellington Road, Clayton, Victoria 3800, Australia. (e-mail: yuhang.qiu@jmu.edu.cn; xiejialiang@jmu.edu.cn; fangmren@126.com; shirong.guo@monash.edu)

Ziwei Li is with the School of Computer Science and Technology, University of Science and Technology of China, Hefei, China (e-mail: gslgsl00@126.com)

Jinfeng Xu is with the Department of Electrical and Computer Engineering, The University of Hong Kong, Hong Kong, China (e-mail: jinfeng@connect.hku.hk).

Sunil Prajapat is with the IMT, Department of Humanities and Technology, Roskilde University, Roskilde, Denmark. (e-mail: sunilprajapat645@gmail.com).

Jing Yang and Por Lip Yee are with the Center of Research for Cyber Security and Network (CSNET), Faculty of Computer Science and Information Technology, Universiti Malaya, 50603 Kuala Lumpur, Malaysia (e-mail: s2147529@siswa.um.edu.my; porlip@um.edu.my).

Three specific obstacles prevent existing methods from solving this problem. First, intermediate inference state is bound to a fixed compute location, making mobility and detection continuity structurally incompatible without explicit migration support. Second, even if state were migrated, doing so by transmitting raw activations or raw telemetry would consume scarce uplink bandwidth and device battery, both of which are already degraded at cell edges. Third, running a full-depth language model on every flow violates the millisecond latency budgets imposed by mobile IoT applications, particularly on constrained endpoint hardware.

To close this gap, this paper presents MAPLE-Sec, a Mobility-Aware Partitioned Language-model Engine for Security in roaming IoT networks. MAPLE-Sec partitions a compact, security-tuned language model between the roaming device and the nearest edge node, and migrates compressed intermediate inference state across edge domains during handover. The framework couples three co-designed mechanisms: a trajectory-conditioned partition scheduler (TPS), a token-budgeted early-exit mechanism (TBEE), and a learned activation-compression codec (ACC). Their design is directly motivated by the three obstacles above, and their experimental gains close the loop back to the original three-challenge framing. Fig. 1 shows the overall system scenario; Fig. 6 details how each component differs from its naïve counterpart.

The main contributions of this paper are as follows.

  1. Novel state-migration mechanism for roaming IoT security (ACC): MAPLE-Sec introduces, to the best of our knowledge, the first confidence-gated, rate-constrained activation-compression codec that migrates language-model inference state across edge nodes during handover. Unlike generic Follow-Me Cloud service migration [30], [31], which moves service containers without preserving neural inference context, ACC compresses the split activation to 16% of its original size using a task-informed rate-distortion loss, guaranteeing that behavioral context survives the handover interval.

  2. Mobility-adaptive partition scheduling (TPS): A trajectory-conditioned partition scheduler recomputes the device/edge split point at every inference step from three runtime signals: predicted time-to-handover h^\hat{h}, residual battery b, and uplink quality q. This dynamic adaptation, absent from all prior static-partition frameworks [19], [2], [20], reduces migrated payload and device energy by matching the partition to the current mobility state rather than fixing it at deployment time.

  3. Budget-constrained early exit (TBEE): A token-budgeted early-exit mechanism terminates inference at the shallowest layer meeting a calibrated confidence threshold, with a hard budget that bounds worst-case latency even for adversarially difficult flows. This extends prior early-exit work [32], [33], [34] with an explicit budget parameter, providing latency guarantees that prior confidence-only exit rules cannot deliver.

  4. Joint constrained optimization: The three mechanisms are coupled through a mixed-integer program over latency, energy, and detection confidence, solved in O(L2)O(L^{2}) time via enumeration over the small discrete domain. A bounded-suboptimality proposition (Proposition 1) quantifies the cost gap as a function of classifier calibration error, providing the first formal optimality guarantee for this class of mobility-aware inference control problems.

  5. Comprehensive empirical validation: Experiments on CIC-IoT2023 and Edge-IIoTset, replayed under a SUMO/LuST urban mobility trace on a physical Jetson Orin Nano, show that MAPLE-Sec achieves a 9.3% relative F1 improvement over the stationary Cloud-only detector and a 2.9 percentage-point gain over EdgeShard [2], while reducing end-to-end latency by 2.5×2.5\times. Ablation confirms that each module is individually necessary.

The remainder of this paper is organized as follows. Section II presents background and motivating measurements. Section III surveys related work and identifies the research gap. Section IV describes the MAPLE-Sec architecture and its three modules. Section V formulates and solves the joint optimization. Section VI details the experimental setup. Section VII reports and interprets performance results. Section VIII concludes with directions for future work.

References (54)

  • Hierarchical Split Federated Learning: Convergence Analysis and System Optimization
  • EdgeShard: Efficient LLM Inference via Collaborative Edge Computing
  • Edge Intelligence for Internet of Vehicles: A Survey
  • Automated Federated Pipeline for Parameter-Efficient Fine-Tuning of Large Language Models
  • LEO-Split: A Semi-Supervised Split Learning Framework over LEO Satellite Networks
  • Adaptsfll: Adaptive Split Federated Learning in Resource-Constrained Edge Networks
  • Graph Learning for Multi-Satellite Based Spectrum Sensing
  • SUMS: Sniffing Unknown Multiband Signals under Low Sampling Rates
  • Satellite Intelligence: Distributed Training, Collaborative Inference,and LLM Adaptation in LEO Constellation
  • Intelligent Spatiotemporal Cyber Threat Detection in Smart Cities Using Trust Region Policy Optimization and Online Data Augmentation
  • LLM-AE-MP: Web Attack Detection Using a Large Language Model with Autoencoder and Multilayer Perceptron
  • Transformers and Large Language Models for Efficient Intrusion Detection Systems: A Comprehensive Survey
  • IoV-BERT-IDS: Hybrid Network Intrusion Detection System in IoV Using Large Language Models
  • Revolutionizing Cyber Threat Detection with Large Language Models: A Privacy-Preserving BERT-Based Lightweight Model for IoT/IoT Devices
  • Large Language Models Powered Malicious Traffic Detection: Architecture, Opportunities, and Case Study
  • HSplitLoRA: A Heterogeneous Split Parameter-Efficient Fine-Tuning Framework for Large Language Models
  • HASFL: Heterogeneity-Aware Split Federated Learning over Edge Computing Systems
  • AdaptSFL: Adaptive Split Federated Learning in Resource-Constrained Edge Networks
  • EdgeLLM: Fast On-Device LLM Inference with Speculative Decoding
  • Resource-Efficient Collaborative Edge Transformer Inference with Hybrid Model Parallelism
  • MESON: A Mobility-Aware Dependent Task Offloading Scheme for Urban Vehicular Edge Computing
  • Handover-Enabled Dynamic Computation Offloading for Vehicular Edge Computing Networks
  • Meta Reinforcement Learning for Multi-Task Offloading in Vehicular Edge Computing
  • Towards Efficient Task Offloading with Dependency Guarantees in Vehicular Edge Networks through Distributed Deep Reinforcement Learning
  • Computation Offloading in Resource-Constrained Multi-Access Edge Computing
  • A Task Offloading Method Based on User Satisfaction in C-RAN with Mobile Edge Computing
  • LLM-Based Edge Intelligence: A Comprehensive Survey on Architectures, Applications, Security and Trustworthiness
  • Edge Learning for 6G-Enabled Internet of Things: A Comprehensive Survey of Vulnerabilities, Datasets, and Defenses
  • Machine Learning to Secure Wheels: A Survey of Misbehavior Detection for the Next-Generation of Connected and Autonomous Vehicles
  • Live Service Migration in Mobile Edge Clouds
  • Dynamic Service Migration in Mobile Edge Computing Based on Markov Decision Process
  • ClassyNet: Class-Aware Early-Exit Neural Networks for Edge Devices
  • UCBEE: A Multi Armed Bandit Approach for Early-Exit in Neural Networks
  • Early-Exit Deep Neural Network: A Comprehensive Survey
  • Zero-X: A Blockchain-Enabled Open-Set Federated Learning Framework for Zero-Day Attack Detection in IoV
  • Improved Transformer-Based Privacy-Preserving Architecture for Intrusion Detection in Secure V2X Communications
  • Auto-Updating Intrusion Detection System for Vehicular Network: A Deep Learning Approach Based on Cloud-Edge-Vehicle Collaboration
  • Blockchain and Federated Learning for Collaborative Intrusion Detection in Vehicular Edge Computing
  • Federated Learning-Assisted Distributed Intrusion Detection Using Mesh Satellite Nets for Autonomous Vehicle Protection
  • Beyond the Cloud: Edge Inference for Generative Large Language Models in Wireless Networks
  • A Matching Game for LLM Layer Deployment in Heterogeneous Edge Networks
  • Joint Inference Offloading and Model Caching for Small and Large Language Model Collaboration
  • Large Language Models (LLMs) Inference Offloading and Resource Allocation in Cloud-Edge Computing: An Active Inference Approach
  • A Cloud-Edge Collaborative Architecture for Multimodal LLM-Based Advanced Driver Assistance Systems in IoT Networks
  • Realization of Early-Exit Dynamic Neural Networks on Reconfigurable Hardware
  • AI-Driven Analysis and Mitigation of Control-Plane Signaling Anomalies in Next-Generation Mobile Networks
  • An Adaptive Wi-Fi Intrusion Prevention System with Zero-Day Resilience and Context-Aware Mitigation
  • CICIoT2023: A Real-Time Dataset and Benchmark for Large-Scale Attacks in IoT Environment
  • Edge-IIoTset: A New Comprehensive Realistic Cyber Security Dataset of IoT and IIoT Applications for Centralized and Federated Learning
  • Sibyl: An Efficient Small-large Model Collaboration Framework for Long-horizon Tasks
  • Split Learning in 6G Edge Networks
  • Prism: Privacy-aware routing for adaptive cloud-edge llm inference via semantic sketch collaboration (opens arXiv in a new tab)
  • Optimal resource allocation for u-shaped parallel split learning
  • Nsc-sl: A bandwidth-aware neural subspace compression for communication-efficient split learning (opens arXiv in a new tab)