On‑Device LLM for Context‑Aware Wi‑Fi Roaming

Ju-Hyung Lee, Yanqing Lu, Klaus Doppler · 2025

Read On‑Device LLM for Context‑Aware Wi‑Fi Roaming by Ju-Hyung Lee, Yanqing Lu, Klaus Doppler (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-04174.txt.

Introduction

Ju-Hyung Lee, Yanqing Lu, and Klaus Doppler put a small on device language model in charge of Wi-Fi roaming picks, in a 2025 paper. Roaming must keep links smooth as users move, but fixed rules stick too long or hop too much. Their model reads place and time cues to pick the best point.

The model also tunes when to roam, not just where to land. Speed tricks keep the model light enough for edge gear. Tests in and out of doors beat fixed rules and learned past tools. The pair of tasks shows how high level thought can steer low level radio work.

Catalog record

CREATORJu-Hyung Lee, Yanqing Lu, Klaus Doppler
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE36 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2505-04174

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

On‑Device LLM for Context‑Aware Wi‑Fi Roaming Ju-Hyung Lee, Yanqing Lu, Klaus Doppler Abstract Roaming in Wireless LAN (Wi-Fi) is a critical yet challenging task for maintaining seamless connectivity in dynamic mobile environments. Conventional threshold‑based or heuristic schemes often fail, leading to either sticky or excessive handovers. We introduce the first cross‑layer use of an on‑device large language model (LLM): high‑level reasoning in the application layer that issues real‑time actions executed in the PHY/MAC stack. The LLM addresses two tasks: ( i ) context‑aware AP selection , where structured prompts fuse environmental cues (e.g., location, time) to choose the best BSSID; and ( ii ) dynamic threshold adjustment , where the model adaptively decides when to roam. To satisfy the tight latency and resource budgets of edge hardware, we apply a suite of optimizations—chain‑of‑thought prompting, parameter‑efficient fine‑tuning, and quantization. Experiments on indoor and outdoor datasets show that our approach surpasses legacy heuristics and DRL baselines, achieving a strong balance between roaming stability and signal quality. These findings underscore the promise of application‑layer LLM reasoning for lower‑layer wireless control in future edge systems. 1 Introduction Wi-Fi roaming is a critical operation for maintaining seamless wireless connectivity as users move through physical environments. Traditionally, roaming logic has assumed relatively stable topologies—stationary access points (APs) and predictable client mobility. However, emerging scenarios are rapidly redefining this assumption. Automotive Wi‑Fi and device‑to‑device (D2D) “mobile‑AP” scenarios all feature mobility on both the client and AP sides, creating highly dynamic topologies that demand instantaneous, context‑aware decisions at the wireless edge. Despite decades of refinement, current roaming mechanisms still rely heavily on threshold-based triggers—such as scanning when RSSI drops below -70 dBm—and static handover logic that fails to adapt to varying conditions. Such strategies often result in either sticky handovers (where devices cling to weak links) or excessive handovers (leading to instability and overhead). These issues are exacerbated in modern use cases, where wireless conditions change rapidly across space and time. Figure 1 : Cross-layer control via on-device LLM: Rule‑based handover (legacy) vs. on‑device LLM context‑aware handover. Making intelligent roaming decisions under these constraints is inherently difficult. The system must reason over noisy, high-dimensional signals such as RSSI patterns, user location, time of day, and device state—all under tight latency budgets (typically within 10–100 ms). Prior approaches based on supervised learning or deep reinforcement learning (DRL) have shown promise but suffer from limited generalization, requiring task-specific retraining and extensive engineering to adapt to new environments. In this work, we propose a new paradigm: using large language model (LLM) as adaptive roaming agents deployed directly at the wireless edge. While LLMs have recently been explored for cloud‑level network management ( Wu et al. 2024 ) , this work is the first to deploy an LLM on-device for real-time control at the lower layers of a wireless system, specifically at the PHY/MAC level . By leveraging the LLM’s in-context reasoning capabilities, we enable it to interpret structured prompts that encode real-time situational context—such as RSSI, location, and time—and make intelligent roaming decisions locally, without external coordination or retraining. Problem scope. We study two concrete tasks: T1 ) Context‑aware AP selection (§ 3 ): choose the optimal BSSID given current context; T2 ) Dynamic threshold adjustment (§ 4 ): adaptively decide when to trigger roaming. Contributions. • Cross‑layer Wireless Control via On-Device LLM. We demonstrate the first on‑device LLM that reasons in the application layer while issuing real‑time actions in the PHY/MAC stack. • Edge‑efficient LLM pipeline. Through prompt design, post-training, and quantization, we trim memory and compute cost, pushing inference toward real‑time with only marginal accuracy loss. • Comprehensive evaluation. Indoor and outdoor experiments show our approach outperforms legacy and DRL baselines, striking a strong trade‑off between roaming stability and link quality • Practical insights & Real-world demo. We distill practical guidelines for deploying LLMs as edge‑level wireless controllers (§ 5 ) and validate our approach through practical demonstrations (§ A ) 1 1 1 A full demonstration video and inference code are available at github.com/abman23/on-device-llm-wifi-roaming . . We begin in Section 2 by reviewing the fundamentals of Wi-Fi roaming and describing how LLMs can act as real-time, context-aware decision-making agents in wireless systems. 2 Background 2.1 Wi-Fi Roaming and Mobility Management In Wi-Fi networks, roaming refers to the process by which a client device ( e.g., a smartphone or laptop) switches its connection from one AP to another as the user moves. These APs typically belong to the same extended service set (ESS), providing overlapping coverage areas. For instance, as a user walks through a building, the device must determine when it should disconnect from the current AP and connect to another AP to maintain a strong wireless connection and avoid dropped connections or degraded signal quality. Roaming is a Layer 2 operation governed by the IEEE 802.11 standard, playing a crucial role in ensuring seamless connectivity across dynamic environments such as office buildings, university campuses, and public transit stations. Most client devices continuously monitor the received signal strength indicator (RSSI) of their currently associated AP. When the RSSI falls below a predefined threshold, known as scanRSSI (typically set around -70 dBm), the device initiates a roaming procedure. After crossing this threshold, the device actively scans for candidate APs, evaluating them based on factors such as RSSI, channel congestion, and PHY-layer capabilities. It then selects a new AP if this AP offers significantly better link quality, commonly defined by a relative RSSI improvement threshold ( e.g., at least +8 dB during active data transmission or +12 dB during idle periods). (a) Sticky handover. (b) Excessive handover. Figure 2 : Common failure modes of rule-based Wi-Fi roaming. Aspect Conventional ML / DRL LLMs as Agents Input Format Fixed feature vectors Flexible, multimodal prompts Adaptability Retraining required for new settings Zero-/few-shot generalization Reasoning Style Implicit via model weights Explicit, interpretable ( e.g., CoT) Context Integration Hand-crafted, limited scope Natural support for rich context Deployment Efficient but narrow Powerful, yet compute-heavy Table 1 : Comparison: Conventional AI vs. LLM as Decision-Making Agents Despite their simplicity, fixed RSSI thresholds and rule-based roaming logic frequently lead to suboptimal outcomes. As shown in Fig. 2 , poorly tuned thresholds and static decision rules often produce two problematic scenarios: • Sticky handovers: The device remains connected to a weakening AP, causing deteriorating throughput, increased latency, and poor user experience. • Excessive handovers: The device frequently initiates scanning and switches between APs, causing disruptions in the connection, increased signaling overhead, lowered throughput, and degraded user experience. Effectively managing roaming thus requires balancing two conflicting objectives: maintaining high signal quality while minimizing handover frequency. To quantitatively evaluate roaming strategies, we consider two key metrics: • AvgRSSI : The average RSSI experienced by the client (Station, STA) throughout the test period, reflecting the overall connection quality (higher is better). • #HO : The total number of handovers triggered during the evaluation period, indicating roaming stability or the overhead associated with frequent AP switching (lower is better). A well-designed roaming policy must intelligently and dynamically balance these two metrics based on real-time environmental context and user requirements. 2.2 LLMs as Decision-Making Agents LLMs have shown impressive generalization across diverse tasks in language, vision, reasoning, and planning. More recently, they have

Read the complete text