Conceptio › Archive › arXiv CS
arXiv CSopen access

Chain-of-Thought Reasoning Enhances In-Context Learning for LLM-Based Mobile Traffic Prediction

2026 · arxiv_cs
arXiv CS · Papers · License: Open Access · 2026
Open Source ↗Direct PDF ↓
distributed-systemsinternetnetworkingprotocols
networking, internet, protocols, distributed systems

1

Chain-of-Thought Reasoning Enhances In-Context Learning for LLM-Based Mobile Traffic Prediction

arXiv:2605.09260v1 [cs.NI] 10 May 2026

MohammadMahdi Ghadaksaz, Mohammad Farzanullah, Graduate Student Member, IEEE, Akram Bin Sediq, Ali Afana, Melike Erol-Kantarci, Fellow, IEEE

Abstract—Accurate short-term mobile traffic prediction is important for proactive resource allocation and low-latency network management in fifth generation (5G) and sixth generation (6G). While large language models (LLMs) can perform incontext learning (ICL) without task-specific retraining, naive ICL prompting may suffer from numerical instability and limited temporal reasoning when traffic dynamics fluctuate rapidly. In this paper, we propose a chain-of-thought (CoT)-enabled LLM-based mobile traffic prediction framework that operates in two phases: (i) an offline phase that constructs structured CoT demonstrations by generating rationales via a plan-based CoT (PCoT) pipeline (lecture, plan, and rationale), and (ii) an online phase that performs close to real-time prediction by retrieving the most relevant demonstrations using a similarity policy that considers both the historical throughput pattern and its short-term changes. We evaluate the proposed framework using a real-world 5G measurement dataset that includes both driving and static scenarios across diverse applications. Our numerical results reveal that the proposed 2-shot CoT-LLM can improve mean absolute error (MAE), root mean square error (RMSE) and R2 -score by up to 14.88%, 15.03%, and 22.41%, respectively, compared to the 2-shot ICL-LLM and classical baselines. Furthermore, by optimizing the number of in-context examples, we achieve additional improvements of 4.58%, 5.70%, and 4.85% in MAE, RMSE, and R2 -score, respectively. Index Terms—Large language models (LLMs), chain of thought, reasoning, mobile traffic prediction, 6G.

I. I NTRODUCTION

W

IRELESS mobile networks are experiencing unprecedented growth in traffic volume and variability due to the proliferation of data-intensive applications such as high-definition video streaming, cloud-based services, and interactive mobile platforms. Beyond fifth generation (5G), emerging sixth generation (6G) networks will introduce new demands from physical artificial intelligence (AI), agentic communications, extended reality, and machine-to-machine (M2M) interactions, creating more diverse and bursty traffic patterns that traditional prediction frameworks struggle to capture. Notably, AI-driven and M2M workloads are highly latency-sensitive, making accurate traffic prediction essential to proactively allocate resources and meet service-level agreements before demand surges occur [1]–[3]. Accurate traffic prediction allows network operators to transition from reactive to proactive network management. By MohammadMahdi Ghadaksaz, Mohammad Farzanullah, and Melike Erol-Kantarci are with the School of Electrical Engineering and Computer Science, University of Ottawa, Ottawa, ON K1N 6N5, Canada (e-mail: [email protected]; [email protected]; [email protected]). Akram Bin Sediq and Ali Afana are with Ericsson, Ottawa, K2K 2V6, Canada (e-mail: [email protected]; [email protected])

anticipating future traffic demands, base stations (BSs) and core network entities can perform intelligent resource allocation, congestion avoidance, and adaptive quality of service (QoS) provisioning. Moreover, predictive traffic awareness plays a central role in energy-efficient networking, mobility management, and edge intelligence, where timely decisions must be made under strict latency constraints [4], [5]. However, wireless traffic is inherently complex, as it is jointly affected by user mobility, radio channel variations, applicationlevel behavior, and network configurations. These factors make mobile traffic prediction a challenging task, especially in realistic, large-scale deployments. Traditional traffic prediction methods, including statistical models and classical time-series techniques, often rely on strong assumptions about stationarity and linearity, which limit their effectiveness in highly dynamic wireless environments. While machine learning (ML)-based approaches have improved prediction accuracy by capturing nonlinear dependencies, they typically require large labeled datasets, extensive offline training, and periodic retraining to remain effective when traffic characteristics shift [6]. Such requirements reduce their practicality in scenarios where traffic patterns change frequently or differ across locations and applications. Recently, large language models (LLMs) have emerged as a flexible alternative for data-driven inference and prediction tasks beyond their original focus on natural language processing. A key advantage of LLMs is their ability to perform in-context learning (ICL), where a model can adapt to a new task by observing a small number of examples provided directly in the prompt, without updating model parameters [7]. This capability makes LLMs particularly appealing for mobile traffic prediction, as it enables rapid adaptation across diverse scenarios and reduces the need for repeated retraining. Nevertheless, naive ICL prompting may struggle with numerical stability and temporal reasoning, especially when the prediction task involves complex traffic dynamics. In this context, reasoning has emerged as a key capability in advanced AI systems. By decomposing complex problems into intermediate logical steps, reasoning-enabled models improve generalization and interpretability. For LLMs, this capacity is tied to the quality of intermediate steps generated before the final answer. Chain-of-thought (CoT) prompting has been introduced as an effective mechanism to improve the reasoning behavior of LLMs by explicitly guiding the model through intermediate inference steps [8]. By structuring the prediction process and exposing latent reasoning paths, CoT prompting enables LLMs to better exploit historical trends and contextual signals embedded in mobile traffic data. This motivates the

2

exploration of CoT-enabled LLMs for wireless traffic prediction and necessitates an evaluation of their performance, robustness, and practical deployment in real-world scenarios. A. Related Works 1) Mobile Traffic Prediction: Mobile traffic prediction has been an active research topic over the past few years [9]–[13]. In particular, the authors in [9] propose a weighted moving average (WMA)-based approach for mobile traffic prediction. Similarly, [10] develops an auto regressive integrated moving average (ARIMA)-based statistical model for traffic prediction, showing that ARIMA can outperform several benchmark methods. In [11], the authors propose an long shortterm memory (LSTM)-based framework to model and predict traffic patterns, where multivariate time-series prediction is performed for both one-step and longer-term predictions to evaluate how far ahead accurate predictions can be achieved. The work in [12] introduces an adaptive graph convolutional recurrent network (AGCRN) to capture fine-grained spatial and temporal correlations in traffic data, demonstrating the effectiveness of graph-based modeling. Furthermore, [13] investigates an spatiotemporal dynamic graph network (SDGNet) framework based on dynamic graph convolution (DGC) and gated linear units (GLUs) to predict traffic consumption over short-, medium-, and long-term horizons, where the results show lower prediction error compared to conventional models. With the advancement of transformer architectures [14] and their strong ability to capture long-term dependencies, these models have also been applied to mobile traffic prediction [15]–[18]. In [15], the authors introduce a temporal fusion transformer (TFT)-based framework for wireless traffic prediction to support efficient network management and improve quality of experience (QoE). In [16], a spatial-temporal downsampling transformer neural network (STDT-Net) approach is proposed to jointly exploit temporal, local spatial, and global spatial dependencies for traffic prediction. Similarly, the studies in [17], [18] investigate spatio-temporal transformer architectures for cellular traffic prediction, further highlighting the potential of transformerbased models in this domain. 2) LLMs in Wireless Communications: Thanks to their strong capabilities and proven success in both academia and industry [19], LLMs have recently gained increasing attention in the wireless communications community for a wide range of prediction and detection tasks [20]–[23]. One key advantage of LLM-based approaches is that, unlike conventional transformer- or ML-based methods, they do not require taskspecific retraining. While initial pre-training of LLMs depends on massive corpora available in the language domain, wireless datasets—containing signals, channel measurements, or traffic traces—remain limited in public availability and costly to collect. Consequently, parameter-free adaptation through ICL is particularly attractive for wireless tasks, where re-training on every scenario is impractical. In [20], the authors propose an LLM-based intrusion detection framework using ICL, and their results demonstrate

acceptable detection accuracy. Similarly, the authors in [21] introduce an LLM-based mobile traffic prediction framework with a two-stage ICL example selection strategy, achieving low prediction error. In [22], a self-refined LLM is designed to iteratively correct inaccurate predictions through a threestep process, where hourly traffic is predicted using random ICL example selection. Moreover, the authors in [23] apply lightweight LLMs to intent-processing tasks, demonstrating improved network throughput and efficiency. Several recent studies also investigate LLM fine-tuning or training from scratch for time-series prediction tasks [24], [25]. In [24], the authors employ an interpretable, prompt-tuningbased generative transformer to learn time-series representations. Furthermore, [25] proposes two fine-tuning strategies to better adapt LLMs to the characteristics of time-series data, showing that fine-tuning can outperform ICL-based methods and other prompt-engineering approaches in certain scenarios. Although CoT prompting is still in its early stages of adoption in wireless communications, it has already been explored in several recent studies [26], [27]. In [26], the authors apply CoT to reason about the causes of performance degradation in 6G networks. Similarly, [27] investigates multiple CoT strategies, where Auto-CoT is employed for unmanned aerial vehicle (UAV) location and power allocation optimization. The results demonstrate that CoT-based methods outperform their non-CoT counterparts. B. Motivations & Contributions Most existing research on wireless traffic prediction has largely overlooked the potential of LLMs. This observation is evident in several prior works [9]–[13], [15]–[18]. In particular, studies such as [9], [10] rely on simple statistical methods, which often struggle to capture complex traffic dynamics. Other works (i.e., [11]–[13], [15]–[18]) adopt data-driven approaches that depend heavily on large training datasets, which are not always available, and whose training processes can be computationally expensive and time-consuming. On the other hand, although the authors in [21], [22] have considered LLMs for traffic prediction, they have been limited to ICL, whereas the potential of CoT prompting has been unexplored. Furthermore, several studies, such as [24], [25], employ finetuned LLMs for time-series prediction. However, mobile traffic patterns evolve rapidly due to changes in user behavior, mobility, and application usage, which would require frequent fine-tuning and introduce additional computational overhead, complicating practical deployment in dynamic network environments. Moreover, fine-tuning still relies on the availability of task- and scenario-specific data, which may not always be readily available for all traffic conditions or deployment scenarios. In contrast, prompt-based approaches, such as ICL and CoT, do not require any model tuning, making them more flexible and easier to deploy in dynamic traffic environments. Lastly, although the works in [26], [27] employ CoT-based solutions, they do not apply this approach to mobile traffic prediction. To the best of our knowledge, this is the first time CoT-enabled LLM-based mobile traffic prediction using a structured example selection has been explored to enhance performance using a real-world 5G dataset.

3

The main contributions of this work can be highlighted as follows: 1) We propose a novel CoT-enabled LLM-based mobile traffic prediction framework that consists of an offline prompt construction phase and an online traffic prediction phase. During the offline phase, rationales (i.e., step-by-step guidance toward accurate traffic prediction) are generated from historical traffic data using a threestep rationale generation process, which serves as longterm memory to enhance prediction performance. Subsequently, during the online phase, the most similar examples are selected according to a specific selection policy, further improving the accuracy of traffic prediction. 2) We evaluate the impact of the number of examples on the performance of the CoT-LLM for the traffic prediction task and analyze how the example selection policy affects the results. In addition, we compare the performance of CoT with standard ICL prompting and examine the stability of both approaches under varying numbers of examples and traffic conditions. 3) We conduct an extensive evaluation across multiple open-weight LLMs. In particular, since many state-ofthe-art LLMs are not publicly released, we show that the proposed CoT-LLM-based mobile traffic prediction framework can be implemented using open-weight models while achieving performance comparable to, or even exceeding, that of closed-weight models. By leveraging open-weight models, LLMs can be deployed locally without relying on external application programming interface (API) services, thereby significantly reducing inference latency and enabling close to real-time traffic prediction. We demonstrate the effectiveness of the proposed solutions using a real-world 5G dataset that includes diverse practical scenarios. Our numerical results validate the effectiveness of the proposed framework. In particular, the 2-shot CoTLLM achieves improvements of up to 14.88%, 15.03%, and 22.41% in mean absolute error (MAE), root mean square error (RMSE), and R2 -score, respectively, compared to the 2-shot ICL-LLM and classical baseline methods. Furthermore, we show that optimizing the number of in-context examples yields additional gains of 4.58%, 5.70%, and 4.85% in MAE, RMSE, and R2 -score, respectively, highlighting the importance of example selection. Finally, evaluations across multiple openweight LLMs demonstrate that locally deployable models can achieve performance comparable to, or exceeding, closedweight alternatives, enabling practical low-latency traffic prediction without reliance on external APIs.

C. Organization The remainder of this paper is organized as follows: Section II presents the discussed problem followed by the methodology in Section III. Section IV provides the numerical results and analysis, and finally Section V concludes the paper with conclusions and future works.

II. PROBLEM DESCRIPTION In this section, we formulate the CoT-enabled LLM-based downlink mobile traffic prediction problem for a generic traffic measurement dataset that contains downlink throughput observations along with a set of network-related contextual features. Let us denote the downlink throughput and the k th contextual feature at time step t of measurement by γ (t) and (t) ck , respectively. A raw dataset D̃ with H seconds of traffic measurement is then represented as: oH n , (1) D̃ = γ (t) , c(t) t=1 h i (t) (t) where c(t) = c1 , · · · cK ∈ X K (X denotes the mixed type data) collects the K contextual features at time step t. Due to prompt-size limitations, we use a historical window of length W seconds as the input to the prediction model. Subsequently, we define the historical throughput vector Γ(t) at time step t as: h i Γ(t) = γ (t) , γ (t−1) · · · , γ (t−W +1) ∈ RW . (2) Likewise, the historical contextual information matrix C(t) , including K contextual features, at time step t can be written as follows:   (t) (t) (t) c c · · · c 1 2 K      (t−1) (t−1) (t−1)  c c · · · c   1 2 K  ∈ X W ×K . C(t) =    . . . . .. .. .. ..       (t−W +1) (t−W +1) (t−W +1) c1 c2 · · · cK (3) In this case, we focus on one time step traffic prediction task, expressed as: y (t) = γ (t+1) , (4) where using a pre-trained LLM with fixed parameters, the model is asked to output the subsequent downlink throughput and a rationale for its respond, formulated as: h i   ŷ (t) , r(t) = f C(t) , Γ(t) |Θ , (5) where ŷ (t) denotes the predicted downlink throughput, r(t) is the rationale, f (·) represents the LLM, and Θ is the model’s parameters. Equation (5) is commonly referred to as zero-shot CoTLLM prediction [28]. To improve the performance of zero-shot prediction, we include several known examples, each paired with a rationale, in the prompt. This forms an extension of zero-shot CoT, which is known as few-shot CoT [8]. The incorporation of the known examples enables the LLMs to solve new tasks without being fine-tuned or re-trained [29]. The CoT prompting differs from ICL prompting in that, in ICL, the LLM is only provided with examples, whereas in CoT approaches, the examples are accompanied by an explicit rationale that guides the model through the intermediate reasoning steps before producing the final prediction. Moreover, the model is explicitly instructed to think step-by-step before

4

Methodology

Methodology

෩ train Ɗ Contextual Information (𝑪𝑡𝑟𝑎𝑖𝑛 )

Throughputs (𝛾𝑡𝑟𝑎𝑖𝑛 )

Creating Windows

(1)

𝑪𝑡𝑟𝑎𝑖𝑛

1

𝜞𝑡𝑟𝑎𝑖𝑛

1

𝑦𝑡𝑟𝑎𝑖𝑛

2

𝜞𝑡𝑟𝑎𝑖𝑛

2

𝑦𝑡𝑟𝑎𝑖𝑛

𝑪𝑡𝑟𝑎𝑖𝑛

⋮

⋮

⋮

𝑁

𝜞𝑡𝑟𝑎𝑖𝑛

𝑁

𝑦𝑡𝑟𝑎𝑖𝑛

𝑪𝑡𝑟𝑎𝑖𝑛

Test Sample (𝑡)

𝑪𝑡𝑒𝑠𝑡

𝑟𝑡𝑒𝑠𝑡

𝑡

𝜞𝑡𝑒𝑠𝑡

(𝑁)

Policy 𝜋

Ɗtrain

Ɗtrain 1

𝜞𝑡𝑟𝑎𝑖𝑛

1

𝑦𝑡𝑟𝑎𝑖𝑛

(1)

𝑟𝑡𝑟𝑎𝑖𝑛

(1)

𝑪𝑡𝑟𝑎𝑖𝑛

1

𝜞𝑡𝑟𝑎𝑖𝑛

1

𝑦𝑡𝑟𝑎𝑖𝑛

(1)

𝑟𝑡𝑟𝑎𝑖𝑛

2 𝑪𝑡𝑟𝑎𝑖𝑛

2 𝜞𝑡𝑟𝑎𝑖𝑛

(2) 𝑦𝑡𝑟𝑎𝑖𝑛

(2) 𝑟𝑡𝑟𝑎𝑖𝑛

2 𝑪𝑡𝑟𝑎𝑖𝑛

2 𝜞𝑡𝑟𝑎𝑖𝑛

(2) 𝑦𝑡𝑟𝑎𝑖𝑛

𝑟𝑡𝑟𝑎𝑖𝑛

Plan-Based CoT

(𝑡)

(2)

⋮

⋮

⋮

⋮

⋮

⋮

⋮

⋮

𝑁

𝜞𝑡𝑟𝑎𝑖𝑛

𝑁

𝑦𝑡𝑟𝑎𝑖𝑛

(𝑁)

𝑟𝑡𝑟𝑎𝑖𝑛

(𝑁)

𝑪𝑡𝑟𝑎𝑖𝑛

𝑁

𝜞𝑡𝑟𝑎𝑖𝑛

𝑁

𝑦𝑡𝑟𝑎𝑖𝑛

(𝑁)

𝑟𝑡𝑟𝑎𝑖𝑛

(a)

Large Language Model

(1)

𝑪𝑡𝑟𝑎𝑖𝑛

𝑪𝑡𝑟𝑎𝑖𝑛

(𝑡)

(2)

𝑦𝑡𝑒𝑠𝑡

(𝑁)

(b)

Fig. 3 (a) Offline training phase

Fig. 3 (b) Online traffic prediction

Fig. 1. Block diagram of the proposed few-shot CoT-LLM mobile traffic prediction framework. (a) offline prompt construction phase: traffic measurements18 17 are segmented into windows and fed through the PCoT pipeline to generate structured training examples with rationales. (b) Online traffic prediction phase: The selection policy π retrieves the M most relevant training examples, injects them into the LLM prompt, and produces the predicted throughput.

generating the output, which encourages the LLM to produce intermediate reasoning steps rather than jumping directly to a final answer — a technique shown to improve complex reasoning performance compared to standard ICL prompting [8], [28]. Nonetheless, in both approaches, the selection and number of examples are important and can significantly impact the overall performance. To clearly separate the data used to construct the CoT examples from the data used for evaluation, we assume that the training examples are drawn from a processed training dataset Dtrain , whereas the test samples are taken out from a separate processed test dataset Dtest , with no overlap between the two datasets. Each example in the processed training set consists of a historical downlink throughput sequence and the (n) (n) associated contextual information, denoted by Γtrain and Ctrain , (n) respectively, along with a corresponding rationale rtrain , and (n) the ground-truth traffic at the next time step ytrain . This training example can be written as: hh i i (n) (n) (n) (n) (n) Etrain = Ctrain , Γtrain , rtrain , ytrain , (6) (n)

where Etrain denotes the nth example in the processed n oN (n) , where n ∈ {1, . . . , N } training set Dtrain = Etrain n=1 indexes the N training examples. The specific methodology (n) for generating the rationales rtrain will be discussed in Section III. Subsequently, for i M -shot CoT prediction on a test sample h (t) (t) (t) Ttest = Γtest , Ctest at time step t, the M examples’ indices are selected using a selection policy π as:       (t) (t) (t) I Ttest = π Ttest , Dtrain , I Ttest = M. (7) Subsequently, the selected examples’ set for the test sample (t) Ttest can be defined as:   n  o (t) (m) (t) DCoT Ttest = Etrain ; m ∈ I Ttest . (8) Consequently, the predicted traffic and the rationale using the LLM under M -shot CoT prompting can be written as: h i     (t) (t) (t) (t) ŷtest , rtest = f Ttest , DCoT Ttest |Θ , (9)

(t)

(t)

where ŷtest and rtest denote the predicted traffic and corresponding rationale. The traffic prediction task aims to minimize the discrepancy between the predicted downlink throughput and the corresponding ground-truth throughput. For a fixed prompting configuration (policy π and M examples) we estimate the expected prediction error on the test set using the empirical average as: E [L (ŷtest , ytest )] =

T  1 X  (t) (t) L ŷtest , ytest , T t=1

(10)

where T is the length of the test set and L is the error function. In this work, we employ CoT-enabled LLMs to optimize the loss function, aiming to accurately predict traffic at the subsequent time step. Specifically, the CoT mechanism enables the model to decompose complex temporal dependencies into intermediate reasoning steps, thereby capturing subtle variations in traffic patterns. The following section explains the proposed CoT-LLM traffic prediction algorithm. III. C OT-E NABLED LLM-BASED M OBILE T RAFFIC P REDICTION In this section, we will explain the proposed CoT-LLM mobile traffic prediction algorithm. As illustrated in Fig. 1, the proposed algorithm consists of two distinct phases: (a) an offline prompt construction phase, in which a novel framework is developed to generate the rationales required for CoT-LLMbased traffic prediction, and (b) an online traffic prediction phase, in which the most relevant examples are selected using the policy π and injected into the prompt. Each of these phases will be described in detail in the following subsections. A. Phase 1: Offline Prompt Construction Phase This phase focuses on transforming the raw training dataset (n) D̃train into the structured examples Etrain , forming the processed training dataset Dtrain . As described earlier in Section II, the historical downlink throughput Γ and associated contextual feature sequences C are formed using (2) and (3), respectively. For a raw training dataset D̃train containing H seconds of traffic

5

measurements, the number of training examples N obtained with a window size W and stride S can be expressed as:   H −W N= + 1. (11) S After forming the historical windows, we generate the rationales for the training data. These rationales can have a substantial impact on the performance of CoT-LLM mobile traffic prediction, as we will observe. In particular, rather than only providing the final answers in the examples, we include intermediate steps and the reasoning behind each response. In this way, the model can better capture the underlying patterns and decision process required for accurate prediction. In this context, a straightforward approach for generating the rationales is to rely on human expertise and manually craft several reasoning steps for each example. However, this solution can become impractical due to the large size of the training data, which makes the process time-consuming. Moreover, human knowledge may be insufficient to capture all aspects of the problem, potentially resulting in low-quality rationales, and, consequently, performance degradation. Thus, we rely on LLMs themselves for rationale generation. In this case, we adopt a PCoT strategy [26], [30], whereas the examination of other strategies is left as our future work. The PCoT approach consists of three steps for rationale generation, shown in Fig. 2, as: 1) Lecture Generation: In this step, the model is prompted, using the instruction il , to generate a general (n) lecture l based on the past traffic throughput Γtrain , (n) the associated contextual information Ctrain , and the (n) corresponding ground-truth next-step traffic ytrain for the th n training example. This can be expressed as follows: h i  (n) (n) (n) l = f Γtrain , Ctrain , ytrain , il |Θ . (12) 2) Plan Generation: After acquiring the lecture, the model is prompted to output a general plan p, using the following:  h i  (n) (n) (n) p = f l, Γtrain , Ctrain , ytrain , ip |Θ , (13) where ip denotes the instruction for generating the plan. 3) Rationale Generation: Finally, using l and p, the model is prompted to generate a rationale as: i   h (n) (n) (n) (n) (14) rtrain = f l, p, Γtrain , Ctrain , ytrain , ir |Θ . (n)

Here, rtrain represents the rationale associated with the nth example, and ir is the instruction included in the (n) prompt to generate this rationale. Using rtrain , we then (n) th construct the complete n training example Etrain according to (6). Notably, the instructions il , ip , and ir are provided in Fig. 2. By repeating this process for all samples, we construct the processed training dataset Dtrain as: N

Dtrain = {Etrain }n=1 .

(15)

The summary of the offline prompt construction phase can be found in Algorithm 1.

Algorithm 1: Offline Prompt Construction Phase Input: D̂train , H, W , S, f (.|Θ) il , ip , and ir . Output: Dtrain . 1 2

Initialize Dtemp ← ∅; n ← 0;

for t = W ; t ≤ H − 1; t ← t + S do n ← n + 1; 5 Construct Γ(t) and C(t) using (2) and (3); 6 Γntrain ← Γ(t) ; 7 Cntrain ← C(t) ; n 8 ytrain ← γ (t+1) ; n 9 Dtemp ← Dtemp ∪ {(Cntrain , Γntrain , ytrain )}; 10 end 3

4

11 12

N ← n; Initialize Dtrain ← ∅;

for n = 1; n ≤ N ; n ← n + 1 do n ) from Dtemp ; Retrieve (Cntrain , Γntrain , ytrain 15 Generate l using (12); 16 Generate p using (13); n 17 Generate rtrain using (14); 18 Construct Entrain using (6); 19 Dtrain ← Dtrain ∪ {Entrain }; 20 end 13

14

21

return Dtrain ;

B. Phase 2: Online Traffic Prediction This phase involves online traffic prediction, where using the policy π, we select the best-M examples for M -shot CoTLLM prediction. In the first step, we explain the policy π, which follows a rule to retrieve examples that are most relevant to the current test In particular, given the test input pair  (t)window. (t) (t)  Ttest = Γtest , Ctest at time step t, we score each candidate  (n) (n)  training example Γtrain , Ctrain , n ∈ {1, . . . , N }, using a two-part distance that jointly captures the similarity of (i) the raw historical downlink throughput shape and (ii) its short-term dynamics (first-order increments). This design is motivated by the observation that, under an ICL-as-kernelregression view, demonstrations that are more similar to the test input tend to yield smaller prediction errors. We first define the incremental (first-difference) throughput vector associated with a W -second historical window as: h ∆Γ(t) = γ (t) − γ (t−1) , γ (t−1) − γ (t−2) , . . . i (16) . . . , γ (t−W +2) − γ (t−W +1) ∈ RW −1 . Then, for each training candidate n, we compute two Euclidean distances as follows: (t)

(n)

e1 (t, n) = Γtest − Γtrain e2 (t, n) =

,

2 (t) (n) ∆Γtest − ∆Γtrain

(17) , 2

(18)

6

Lecture Generation 𝒏

𝒏

Plan Generation

𝒏

𝚪𝐭𝐫𝐚𝐢𝐧 , 𝐂𝐭𝐫𝐚𝐢𝐧 , 𝐲𝐭𝐫𝐚𝐢𝐧 ⋯ [Instruction].

Lecture = [L]. 𝒏

𝒏

𝒏

𝚪𝐭𝐫𝐚𝐢𝐧 , 𝐂𝐭𝐫𝐚𝐢𝐧 , 𝐲𝐭𝐫𝐚𝐢𝐧 ⋯ [Instruction].

Rationale Generation Lecture = [L]. Plan = [P]. 𝒏

of past downlink throughput and contextual features (RSRP, speed, handover, uplink throughput, neighboring cell RSRP) plus the TRUE next-second throughput, produce a short, general lecture about how to reason about such problems.

[output]: When predicting next-second throughput, start by analyzing short-term trends and abrupt changes in the recent downlink series. Incorporate contextual variables such as serving and neighbor RSRP, handover events, mobility speed, and uplink rates to capture underlying radio conditions. Design features that reflect sudden drops or recoveries and choose models (e.g. timeseries or tree-based) that handle nonlinear interactions. Always validate on hold-out segments and track error metrics to ensure the model adapts to diverse scenarios.

𝒏

𝒏

𝚪𝐭𝐫𝐚𝐢𝐧 , 𝐂𝐭𝐫𝐚𝐢𝐧 , 𝐲𝐭𝐫𝐚𝐢𝐧 ⋯ [Instruction].

[Instruction]: Given a specific example [Instruction]: Given a general lecture and one labeled example, produce a brief, numbered step-by-step plan that a student can follow to solve similar prediction problems.

[Instruction]: Given a lecture, a plan, and

[output]:

[Output]:

1. Collect recent downlink and uplink throughput time series to form the base dataset. 2. Check throughput trend and detect any abrupt drops or recoveries in the latest window. 3. Analyze RSRP changes for both serving and neighboring cells to capture signal variations. 4. Incorporate mobility speed and handover event flags as contextual features. 5. Engineer features that quantify short-term dynamics like sudden shifts or momentum.

the labeled ,you must explain, step by step, why this true value is reasonable according to the plan and lecture.

1. The recent downlink window [30, 30, 2, 0, 9] shows a sharp drop to 0 with only a small rebound, so the model flags persistent low throughput. 2. Serving RSRP barely improves from –100 dBm to –99 dBm while neighbor RSRP stays at –106 dBm, indicating weak radio conditions per contextual features. 3. Mobility speed remains 0 m/s and no new handover occurs, so no momentum from movement or cell change is expected. 4. Although uplink throughput jumps from 0 to 12 bit/s, the model’s nonlinear features showed only weak coupling to downlink recovery. 5. Momentum features over the last two points are near zero, leading the time-series to continue the zero‐throughput state.

(2)

Large Language Model 16

Fig. 2. The block diagram of PCoT for rationale generation.

and combine them into a single score [21]: E(t, n) = e1 (t, n) + e2 (t, n).

Algorithm 2: Online Prediction Phase (t)

Input: Dhtrain , Ttest , iM , π, and f (.|Θ). (t) (t) Output: ŷtest , rtest .

(19)

Finally, the policy π selects the indices of the M most effective examples (smallest E(t, n)):     X (t) (t) I Ttest = π Ttest , Dtrain = arg min E(t, n).

1

(t)

Construct ∆Γtest using (16);

for n = 1; n ≤ N ; n ← n + 1 do (n) Retrieve Γtrain from Dtemp ; (20) (n) Construct ∆Γtrain using (16); The resulting M examples are then assembled (together 4 set e1 (t, n) using (17); with their labels/rationales produced in Phase 1) to form 5   (t) 6 set e2 (t, n) using (18); DCoT Ttest using (8). Consequently, these components are 7 Form E(t, n) using (19); injected into the prompt using (9) for the CoT-LLM inference. 8 end The summary of the online phase is provided in Algorithm 2.   (t) 9 Select indices I Ttest using (20);   (t) 10 Form DCoT Ttest using (8); IV. NUMERICAL RESULTS h i (t) (t) In this section, we present the numerical results obtained 11 Generate ŷtest , rtest using (9); h i from our simulations. We investigate downlink mobile traffic (t) (t) prediction for real-world 5G user services using the measure- 12 return ŷtest , rtest ; ment dataset in [31], which includes both static and driving scenarios across diverse applications, such as file downloading and video streaming (e.g., Amazon Prime), captured from operational networks. The dataset is publicly available and task, in addition to the historical downlink throughput, we provides downlink throughput measurements together with focus on K = 5 contextual features: uplink throughput, various network-related contextual features, including channel the reference signal received power (RSRP) of the serving metrics and neighboring-cell metrics. Specifically, it contains cell, the RSRP of a neighboring cell, the network mode, four categories of contextual information—throughput mea- and handover occurrence. This feature selection follows the surements, channel-related metrics, neighboring-cell metrics, feature-ranking analysis reported in [32], where importance and additional context indicators—resulting in a total of scores were computed using the same dataset, and the five 25 contextual features. For the downlink traffic prediction most impactful features were identified. I⊆{1,...,N } n∈I |I|=M

2

3

7

2-shot CoT-LLM Traffic Prediction 160 120

Ground-Truth Traffic 2-shot ICL-LLM Prediction Throughput [kbit/s]

Throughput [kbit/s]

2-shot ICL-LLM Traffic Prediction

Ground-Truth Traffic 2-shot CoT-LLM Prediction

80 40 0 0

40

80

Time [s]

120

160

200

0

40

80

Time [s]

120

160

200

(a) Download, driving. 2-shot CoT-LLM Traffic Prediction

12.5

Ground-Truth Traffic 2-shot ICL-LLM Prediction Throughput [kbit/s]

10.0 Throughput [kbit/s]

2-shot ICL-LLM Traffic Prediction

Ground-Truth Traffic 2-shot CoT-LLM Prediction

7.5 5.0 2.5 0.0 0

40

80

Time [s]

120

160

200

0

40

80

Time [s]

120

160

200

(b) Watching Amazon Prime, driving. 2-shot CoT-LLM Traffic Prediction

250

Ground-Truth Traffic 2-shot ICL-LLM Prediction Throughput [kbit/s]

200 Throughput [kbit/s]

2-shot ICL-LLM Traffic Prediction

Ground-Truth Traffic 2-shot CoT-LLM Prediction

150 100 50 0 0

40

80

Time [s]

120

160

200

0

40

80

Time [s]

120

160

200

(c) Download, static. Fig. 3. Predicted traffic versus ground-truth traffic for 2-shot CoT-LLM and 2-shot ICL-LLM.

For these experiments, we use the o4-mini model [33] as the main LLM and the same model is employed in both the offline and online phases. To improve the reliability of the results, all simulations are conducted over 5 independent runs, and the reported performance metrics are averaged across these runs. We split the raw dataset equally into training and testing subsets with no overlap between them, where the first T = 200 seconds of each test trace are used for testing, and the remaining samples are reserved for training. The evaluation is conducted across multiple traffic scenarios, including downloading while driving, watching Amazon Prime while driving, and downloading in a static setting. Under this setup, the training data consist of H = 664 seconds for the downloading-while-driving scenario, H = 1569 seconds for the downloading-in-static scenario, and H = 588 seconds for the Amazon Prime–while-driving scenario. Moreover, for data processing, we use a window size of W = 5 and a stride of S = 1 for all results reported in this section. A. Evaluation Metrics To evaluate the performance of various traffic prediction algorithms, we consider three main metrics as:

•

MAE: This metric quantifies the average absolute deviation between the predicted and ground-truth values. It is computed as: T

MAE =

•

1 X (t) ŷ − y (t) , T t=1

where higher MAE indicates lower prediction precision. RMSE: This metric calculates the standard deviation of the predicted value, where similar to MAE, higher values show weaker predictions. This metric can be expressed as: v u T u1 X 2 RMSE = t ŷ (t) − y (t) . T t=1

•

(21)

(22)

R2 -score: This metric measures the proportion of the variance in the ground-truth values that is explained by the predictions, indicating how well the model fits the

8

TABLE I S UMMARY OF PERFORMANCE ON TEST DATA ACROSS SCENARIOS ( MEAN ± STD OVER 5 RUNS ). Download (Driving)

Method

Amazon Prime (Driving)

MAE ↓

RMSE ↓

R2 ↑

2-shot CoT-LLM (ours)

8.039 ± 0.257

18.552 ± 0.377

2-shot ICL-LLM [21]

9.235 ± 0.216

21.341 ± 0.17

Zero-shot CoT-LLM

8.891 ± 0.380

Zero-shot ICL-LLM [21]

Download (Static)

MAE ↓

RMSE ↓

R2 ↑

MAE ↓

RMSE ↓

R2 ↑

0.639 ± 0.015

0.230 ± 0.008

0.447 ± 0.025

0.936 ± 0.007

9.799 ± 0.303

21.237 ± 0.898

0.458 ± 0.046

0.522 ± 0.053

0.222 ± 0.014

0.489 ± 0.029

0.924 ± 0.009

11.171 ± 0.334

22.324 ± 1.458

0.399 ± 0.078

22.058 ± 2.940

0.483 ± 0.140

0.254 ± 0.014

0.481 ± 0.038

0.926 ± 0.012

12.770 ± 0.454

23.760 ± 1.194

0.321 ± 0.067

9.424 ± 0.533

23.214 ± 4.193

0.421 ± 0.220

0.269 ± 0.022

0.528 ± 0.064

0.910 ± 0.021

13.779 ± 0.543

25.275 ± 1.303

0.232 ± 0.077

simple moving average (SMA)

12.385 ± 0.000

24.745 ± 0.000

0.359 ± 0.000

0.419 ± 0.000

1.098 ± 0.000

0.615 ± 0.000

16.412 ± 0.000

25.168 ± 0.000

0.240 ± 0.000

WMA [9]

10.584 ± 0.000

22.041 ± 0.000

0.491 ± 0.000

0.365 ± 0.000

0.915 ± 0.000

0.732 ± 0.000

14.051 ± 0.000

22.927 ± 0.000

0.369 ± 0.000

ARIMA [10]

10.757 ± 0.000

22.385 ± 0.580

0.466 ± 0.000

0.288 ± 0.000

0.665 ± 0.000

0.859 ± 0.000

14.854 ± 0.000

25.034 ± 0.000

0.248 ± 0.000

Kalman Filter

10.400 ± 0.000

21.488 ± 0.000

0.516 ± 0.000

0.355 ± 0.000

0.896 ± 0.000

0.744 ± 0.000

13.775 ± 0.000

22.259 ± 0.000

0.405 ± 0.000

data. It can be calculated as: T P

R2 −score = 1 − t=1T P

y (t) − ŷ (t)

2

T

, y (t) − ȳ

2

ȳ =

1 X (t) y . T t=1

t=1

(23) The R2 -score ranges between −∞ to 1, where higher values are an indication of a better prediction. Notably, an R2 -score of 0 indicates that the model performs no better than simply predicting the mean of the groundtruth values. B. CoT-LLM Mobile Traffic Prediction In the first step, we evaluate the performance of the proposed CoT-LLM mobile traffic prediction approach against existing benchmarks across multiple scenarios. Fig. 3 illustrates the predicted traffic alongside the ground-truth traffic for three cases—namely, downloading while driving, watching Amazon Prime while driving, and downloading in a static setting—where a 2-shot CoT-LLM is compared with the 2shot ICL-LLM baseline in [21], where the authors consider plain ICL using a similar example selection policy for traffic prediction. At this stage, we consider a 2-shot setup (two inprompt examples) since it achieved an acceptable performance in [21]. We discuss the impact of number of examples M in the later subsections. It can be seen that the proposed 2-shot CoT-LLM achieve a better prediction compared to the 2-shot ICL-LLM, where the higher error parts are highlighted for ICL-LLM in Fig. 3. To further assess performance, we report the MAE, RMSE, and R2 -score of the 2-shot CoT-LLM and 2-shot ICL-LLM [21] in Table I. Furthermore, in this table, we consider more benchmarks: 1) zero-shot CoT-LLM: The CoT prompting without injecting examples, where the model is explicitly asked to think step-by-step before outputting the traffic. 2) zero-shot ICL-LLM: The plain ICL without the incontext examples discussed in [21]. 3) SMA: The average of W = 5 seconds of previous traffic throughput. 4) WMA [9]: The weighted average with incremental weights of the W = 5 seconds of past traffic.

5) ARIMA: The auto regressive-based traffic prediction approach discussed in [10]. 6) Kalman Filter: The Kalman filter using a local level model with recursive state updates. Overall, the proposed 2-shot CoT-LLM achieves the best performance across considered scenarios. For instance, over downloading while driving setting, the proposed 2-shot CoTLLM algorithm attains an average MAE of 8.039, RMSE of 18.552, and R2 -score of 0.639, whereas the next-best algorithm, 2-shot ICL-LLM, achieves an average 9.235 MAE, 21.341 RMSE, and 0.522 R2 -score. This means that using CoT-LLM can boost the MAE, RMSE, and R2 -score by 14.88%, 15.03%, and 22.41%, respectively. While a similar trend can be observed in the other settings, it is worth noting that only in watching Amazon Prime while driving the 2-shot ICL-LLM [21] achieves a slightly lower MAE (by 3.60%); however, the proposed 2-shot CoT-LLM still improves the RMSE and R2 -score by 9.4% and 1.3%, respectively. This can be attributed to the fact that this scenario, illustrated in Fig. 3b, is easier to predict; consequently, the performance of ICL-LLM and CoT-LLM is closer to to each other. This table also also highlights the benefit of few-shot learning compared to zero-shot learning. Particularly, for instance in downloading while driving scenario, the 2-shot CoTLLM improves upon the zero-shot CoT-LLM by 10.60%, 18.90%, and 32.30% in terms of MAE, RMSE, and R2 -score, respectively. A similar improvement trend is also observed when comparing 2-shot ICL-LLM and zero-shot ICL-LLM. Compared to classical benchmarks, the performance gap becomes even more evident. For example, in downloading while static setup, the 2-shot CoT-LLM improves the MAE, RMSE, and R2 -score by 38.26%, 5.82%, and 17.89%, respectively, compared to WMA [9]. Similarly, for the same setup, the 2shot CoT-LLM enhances the Kalman filter performance by 35.34%, 15.58%, and 7.41% on MAE, RMSE, and R2 -score, respectively. It is important to note that the achieved ranges of MAE, RMSE, and R2 -score vary across different scenarios. This is mainly due to differences in the downlink throughput range and the level of traffic fluctuation in each setting, which directly affect the difficulty of the prediction task. For instance, in the Amazon Prime while driving scenario, all benchmarks attain relatively high R2 -scores and low RMSE and MAE,

120 100 80 60 40 20 0

CoT-LLM CoT-LLM (W/O r)

0

25

50

Absolute Error [Kbps]

Absolute Error [Kbps]

9

75 100 125 150 175 200 Time Step [s]

120 100 80 60 40 20 0

CoT-LLM e1 CoT-LLM e2 CoT-LLM

0

25

50

(a)

75 100 125 150 175 200 Time Step [s] (b)

Fig. 4. The absolute error for (a) 2-shot CoT-LLM without rationales and (b) various selection policies.

indicating a more predictable traffic pattern. In contrast, for downloading in a static scenario, the R2 -score drops to nearly half for all methods, which suggests a highly fluctuating traffic trend and a more challenging prediction environment. C. Ablation Study In this subsection, we conduct an ablation study to systematically evaluate the contribution of each component in the proposed 2-shot CoT-LLM framework for mobile traffic prediction. Without loss of generality, the downloading-whiledriving scenario is used as a representative example, as similar performance trends are observed across other scenarios. Specifically, we examine the impact of the following elements within the selection policy π and the use of rationales: 1) The selection criterion e1 in (17). 2) The selection criterion e2 in (18). 3) The inclusion of rationales in the prompt. Figure 4 illustrates the absolute prediction error for all considered variants. In particular, Fig. 4a compares the proposed 2-shot CoT-LLM against a baseline in which the rationales are omitted from the prompt, i.e.,  i  h (t) (t) (t) (24) ŷtest , rtest = f Ttest , [Γ, C, y] |Θ . Similarly, Fig. 4b reports the absolute error when rationales are retained, but either e1 or e2 is removed from the selection policy π. To quantitatively assess the contribution of each component, the corresponding MAE, RMSE, and R2 -score for all ablation variants are summarized in Table II. The results indicate that all components positively contribute to the overall prediction performance. For example, excluding the rationales from the prompt leads to performance degradations of −7.04%, −17.34%, and −29.09% in terms of MAE, RMSE, and R2 -score, respectively, compared to the full 2-shot CoT-LLM configuration. Likewise, removing criterion e1 from the selection policy π results in performance drops of −0.30% in MAE, −3.35% in RMSE, and −3.09% in R2 score. Notably, the inclusion of rationales yields the most significant performance gains. While modifications to the selection policy π introduce measurable degradation, their impact is substantially smaller than that caused by removing the rationales.

TABLE II A N ABLATION STUDY ON THE IMPACT OF EACH COMPONENT COMPARED TO THE PROPOSED 2- SHOT C OT-LLM. Obtained

Method

Average Change

MAE ↓

RMSE ↓

R2 ↑

MAE

RMSE

CoT-LLM

8.039 ± 0.257

18.552 ± 0.377

0.639 ± 0.015

−

−

R2 −

CoT-LLM (W/O r)

8.605 ± 0.605

21.769 ± 3.220

0.495 ± 0.149

−7.04%

−17.34%

−29.09%

e1 CoT-LLM

8.063 ± 0.189

19.174 ± 0.245

0.615 ± 0.010

−0.30%

−3.35%

−3.09%

e2 CoT-LLM

8.327 ± 0.202

19.865 ± 0.340

0.601 ± 0.017

−3.58%

−7.08%

−6.32%

This observation underscores the critical role of structured reasoning information in enhancing the effectiveness of CoTLLM based prompting for mobile traffic prediction. D. Number of Examples This subsection investigates the impact of the number of incontext examples on the performance of CoT-LLM and ICLLLM–based traffic prediction. The corresponding simulation results are presented in Fig. 5 and Table III. The results demonstrate that increasing the number of examples does not necessarily lead to consistent performance improvements for either approach. In fact, an excessive number of examples can degrade prediction accuracy. For the downloading-while-driving scenario, performance improves as the number of examples increases up to M = 5, beyond which further increases lead to noticeable degradation. By optimally selecting the number of examples, the prediction performance reaches MAE = 7.687, RMSE = 17.755, and an R2 -score of 0.670. This corresponds to improvements of 4.58%, 5.70%, and 4.85% in MAE, RMSE, and R2 -score, respectively, compared to the 2-shot CoT -LLM baseline. In contrast, for the watching Amazon Prime while driving scenario, reducing the number of examples to M = 1 yields superior overall performance. While this reduction leads to a 3.47% degradation in MAE, it improves the RMSE and R2 score by 2.05% and 0.20%, respectively, as compared to 2-shot CoT-LLM. When compared to the ICL-LLM baseline, the proposed 5-shot CoT-LLM achieves a substantial performance gain in the downloading-while-driving scenario, outperforming ICLLLM by 20.27% in terms of the R2 -score. However, after optimizing the number of examples for both approaches, ICL-

10

TABLE III S UMMARY OF PERFORMANCE ON TEST DATA WITH DIFFERENT NUMBER OF EXAMPLES ( MEAN ± STD OVER 5 RUNS ). Download (Driving) Method

M -shot CoT-LLM

M -shot ICL-LLM [21]

Metric

M =0

M =1

M =2

M =3

M =4

M =5

M =6

M =7

MAE ↓

8.891 ± 0.380

8.310 ± 0.161

8.039 ± 0.257

7.786 ± 0.089

7.853 ± 0.315

7.687 ± 0.136

7.816 ± 0.274

7.748 ± 0.092

RMSE ↓

22.058 ± 2.940

19.697 ± 0.728

18.551 ± 0.377

18.027 ± 0.324

17.957 ± 0.578

17.755 ± 0.579

18.392 ± 0.633

18.465 ± 0.437

R2 ↑

0.483 ± 0.140

0.593 ± 0.030

0.639 ± 0.015

0.660 ± 0.012

0.662 ± 0.022

0.670 ± 0.022

0.645 ± 0.024

0.643 ± 0.017

MAE ↓

9.424 ± 0.533

9.326 ± 0.707

9.235 ± 0.216

9.243 ± 0.251

9.168 ± 0.477

9.156 ± 0.818

9.228 ± 0.575

9.049 ± 0.848

RMSE ↓

23.214 ± 4.193

21.782 ± 2.854

21.341 ± 1.169

21.027 ± 0.638

20.750 ± 1.614

20.461 ± 2.214

20.819 ± 2.133

21.232 ± 2.879

R2 ↑

0.421 ± 0.220

0.496 ± 0.129

0.522 ± 0.053

0.537 ± 0.028

0.547 ± 0.070

0.557 ± 0.098

0.542 ± 0.088

0.521 ± 0.128

Metric

M =0

M =1

M =2

M =3

M =4

M =5

M =6

M =7

MAE ↓

0.254 ± 0.014

0.238 ± 0.010

0.230 ± 0.008

0.230 ± 0.007

0.240 ± 0.013

0.250 ± 0.014

0.246 ± 0.009

0.255 ± 0.004

RMSE ↓

0.481 ± 0.038

0.438 ± 0.033

0.447 ± 0.025

0.444 ± 0.016

0.469 ± 0.039

0.517 ± 0.042

0.501 ± 0.018

0.528 ± 0.033

R2 ↑

0.926 ± 0.012

0.938 ± 0.009

0.936 ± 0.007

0.937 ± 0.004

0.929 ± 0.012

0.914 ± 0.014

0.920 ± 0.006

0.911 ± 0.011

MAE ↓

0.269 ± 0.022

0.198 ± 0.013

0.222 ± 0.006

0.207 ± 0.014

0.226 ± 0.016

0.242 ± 0.009

0.252 ± 0.036

0.235 ± 0.012

RMSE ↓

0.527 ± 0.063

0.390 ± 0.043

0.489 ± 0.029

0.437 ± 0.060

0.462 ± 0.038

0.550 ± 0.045

0.599 ± 0.181

0.524 ± 0.054

R2 ↑

0.910 ± 0.021

0.951 ± 0.010

0.923 ± 0.009

0.938 ± 0.016

0.931 ± 0.011

0.903 ± 0.016

0.877 ± 0.078

0.912 ± 0.019

Amazon Prime (Driving)

M -shot CoT-LLM

M -shot ICL-LLM [21]

LLM exhibits a marginal 1.39% improvement over CoTLLM in watching Amazon Prime and driving setting. In particular, when comparing the permutation entropy (PE) (which measures the irregularity of a time series) [34] of these two settings, we observe that the downloading while driving traffic exhibits a higher normalized PE than the watching norm Amazon Prime while driving traffic, with HPE = 0.780 and 1 norm HPE = 0.701, respectively . This indicates a larger diversity of local ordinal patterns and, consequently, higher short-term irregularity in the downloading while driving setting. Such increased temporal complexity suggests that this scenario is intrinsically more challenging to predict, which is consistent with the larger performance gain achieved by the proposed CoT-LLM in this case. Conversely, the lower PE of watching Amazon Prime while driving implies a relatively more regular structure, for which standard ICL-LLM prompting remains competitive and can yield a slight advantage after per-scenario tuning. Notably, the overall performance of the two methods becomes very close for the later setting, with differences remaining within the confidence intervals of both algorithms. Finally, an important advantage of the CoT-LLM approach is its significantly improved prediction stability. In particular, the variance of the R2 -score is reduced by 65.36% and 58.33% for the downloading-while-driving and watching-AmazonPrime-while-driving scenarios, respectively. This substantial reduction in variance highlights the robustness and reliability of the proposed CoT-LLM framework for mobile traffic prediction. E. Model Comparisons In this section, we present the performance of the proposed CoT-LLM mobile traffic prediction framework across additional LLMs. In particular, while the o4-mini model achieves 1 The normalized PE value lies in [0, 1], where larger values indicate a higher diversity of local ordinal patterns and, therefore, a less locally predictable (more irregular) time series.

0.9 0.8 0.7 R2-score

Method

0.6 0.5 0.4

CoT-Amazon Prime ICL-Amazon Prime CoT-Download ICL-Donwload

0.3 0.2 0

1

2

3 4 # Examples

5

6

7

Fig. 5. R2 -score versus number of examples M .

acceptable performance, its weights are not publicly accessible, which limits its deployment to the OpenAI API. This reliance can be both costly and time-consuming, since realtime traffic prediction may be affected by the communication and processing delays between the BS/network provider and the OpenAI service. Thus, we evaluate the proposed approach using several open-weight models that can be deployed directly at the network provider. In particular, we consider the following models: 1) Ministral 3 3B [35]. 2) Qwen 3 8B [36]. 3) Phi 4 reasoning 14B [37]. These models are selected to reflect different model sizes and providers, which facilitates a more structured comparison across both dimensions. In particular, establishing performance baselines for one provider helps benchmark and interpret results when comparing models of varying sizes across different

11

Minimstral 3 Qwen 3 Phi 4 reasoning o4-mini

R2-score

R2-score

Minimstral 3 Qwen 3 Phi 4 reasoning o4-mini

0.657 0.639 0.641

0.946 0.938 0.936

0.56 18.5

RMSE 18.06 [Kbps] 18.55

20.5

8.91 14.0B

0.899

8.04 7.82

7.66

MAE [Kbps]

8.2B

N/A

3.0B

RMSE 0.41 0.44 0.45 [Kbps]

0.54 14.0B

0.25

0.23

0.22 0.2

MAE [Kbps]

8.2B N/A

3.0B

Model Complexity [B]

Model Complexity [B]

(a)

(b)

Fig. 6. Performance analysis of various LLMs for2-shot CoT-LLM in (a) downloading while driving and (b) watching Amazon Prime while driving.

providers2 . In this paper, we use M = 2 examples for all models to ensure a fair comparison, while the model-specific optimization of example selection is left for future work. Moreover, since the o4-mini LLM is not open-weight, its exact number of parameters is not publicly disclosed; therefore, to avoid inaccurate approximations, we leave the Model Complexity entry for o4-mini blank. Finally, each model relies on its own generated rationales, i.e., the offline phase is performed separately for each model. For ease of comparison, all four axes in Fig. 6 are plotted so that a larger enclosed area corresponds to better overall performance. Specifically, R2 -score is plotted directly, where outward direction indicates higher values and better performance. On the other hand, MAE, RMSE, and Model Complexity are inverted on their respective axes, where outward direction indicates lower error or fewer parameters, representing better performance. Overall, for each parameter, the axes are set up such that values closer to the outer circle represent better performance. For each metric, the figure highlights the average value over five independent runs. It can be observed that Qwen 3 8B achieves the best overall performance across the considered settings, outperforming the o4-mini model. For instance, the Qwen 3 8B attains MAE of 7.66, RMSE of 18.05, and R2 -score of 0.657, whereas o4-mini model achieves an MAE of 8.04, RMSE of 18.55, and R2 -score of 0.639. Notably, the smallest model, Ministral 3 3B, achieves performance close to Qwen 3 8B, reaching 97.95%, 97.62%, and 97.56%, of Qwen 3 8B in terms of MAE, RMSE, and R2 score, respectively, while using only 36.59% of the parameters. This indicates that strong performance can be obtained even with compact models. However, these results also show that increasing model size does not necessarily improve performance and may even lead 2 Note that at the time this research is conducted these are the state of the art models

to degradation. In the same setting, the Phi 4 reasoning with 14B parameters achieves only 85.97%, 88.05%, and 85.23% of Qwen 3 8B in terms of MAE, RMSE, and R2 -score, respectively. Overall, the results suggest that medium-sized models can offer the best trade-off between accuracy and complexity, while smaller models can be deployed with only minor performance loss for a more cost-efficient approach. In contrast, deploying larger models such as Phi 4 reasoning 14B may incur higher computational cost without providing additional performance gains. F. Complexity Analysis & Deployment Considerations This subsection presents the computational complexity of the proposed M -shot CoT-LLM mobile traffic prediction framework. During the offline phase, for a raw dataset with H seconds of traffic measurements, the overall complexity of constructing the historical windows (i.e., forming [Γ, C]) with K contextual features is O(H · N · K), where N is defined in (11). Next, to generate the rationales for each training example, we invoke the LLM three times per sample, resulting in a total of 3N LLM calls. In contrast, during the online phase, after establishing the processed training set and using the policy π, the exampleselection step requires O(N · M ) operations for M -shot CoTLLM. This is followed by a single LLM call with ≈ 854 input and ≈ 152 output tokens (output rationale + answer for 2-shot) per test sample to produce the prediction, which is suitable for close to real-time, online operation. In practice, the traffic prediction and LLM inference can be executed at the BSs or on cloud servers, where such platforms are typically equipped with graphics processing units and artificial intelligence acceleration hardware to efficiently support the computational demands of LLMs. Moreover, leveraging openweight models, as demonstrated in the previous subsection,

12

enables network providers to deploy LLMs locally, thereby reducing both latency and the cost associated with external APIs. Under these infrastructure settings, an LLM with fewer than 15 billion parameters is expected to achieve an inference time of roughly 100 ms [38], while the corresponding communication latency can be around 50 ms [39], depending on the hardware configuration and network conditions. These delays remain within acceptable limits for per-second traffic prediction. In summary, the proposed M -shot CoT-LLM approach is feasible for real-world deployment in 5G and 6G networks, offering acceptable latency and manageable hardware requirements. V. CONCLUSION In this paper, we developed CoT-enabled LLM based mobile traffic prediction using real-world 5G measurements across different applications and mobility conditions. To address the limitations of standard ICL prompting for numerical timeseries prediction, we proposed a two-phase framework with an offline phase and an online phase. In the offline phase, we create structured CoT demonstrations by generating rationales through a PCoT pipeline. In the online phase, we use a lightweight example-selection policy to retrieve the most relevant demonstrations by comparing both the historical throughput trajectory and its short-term changes. This design allows effective few-shot inference while keeping the prompt length limited. Our results show that the proposed CoT-LLM approach can improve prediction accuracy and produce more stable outputs compared to ICL-LLM prompting and common baseline methods. In particular, the 2-shot CoT-LLM achieves improvements of up to 14.88%, 15.03%, and 22.41% in MAE, RMSE, and R2 -score, respectively. We further show that optimizing the number of in-context examples yields additional gains across MAE, RMSE, and R2 -score. In addition, tests with multiple open-weight LLMs indicate that locally deployable models can provide competitive performance, which reduces reliance on external API services and supports close to realtime prediction. For future work, more advanced reasoning prompting strategies can be explored. ACKNOWLEDGMENT This work has been supported by MITACS, Ericsson Canada, and Canada Research Chairs program. R EFERENCES [1] E. Lykakis, I. O. Vardiambasis, and E. Kokkinos, “Data traffic prediction for 5G and beyond: Emerging trends, challenges, and future directions: A scoping review,” Electronics, vol. 14, no. 23, p. 4611, 2025. [2] W. Saad, M. Bennis, and M. Chen, “A vision of 6G wireless systems: Applications, trends, technologies, and open research problems,” IEEE Commun. Mag., vol. 58, no. 9, pp. 74–80, 2020. [3] F. Jiang, C. Pan, K. Wang, P. Michiardi, O. A. Dobre, and M. Debbah, “From large AI models to agentic AI: A tutorial on future intelligent communications,” IEEE J. Sel. Areas Commun., vol. 44, pp. 3507–3540, 2026. [4] D. A. Tedjopurnomo, Z. Bao, B. Zheng, F. M. Choudhury, and A. K. Qin, “A survey on modern deep neural network for traffic prediction: Trends, methods and challenges,” IEEE Trans. Knowl. Data Eng., vol. 34, no. 4, pp. 1544–1561, 2022.

[5] X. Yin, G. Wu, J. Wei, Y. Shen, H. Qi, and B. Yin, “Deep learning on traffic prediction: Methods, analysis, and future directions,” IEEE Trans. Intell. Transp. Syst., vol. 23, no. 6, pp. 4927–4943, 2022. [6] P. E. Iturria-Rivera, M. Chenier, B. Herscovici, B. Kantarci, and M. ErolKantarci, “Rl meets multi-link operation in ieee 802.11be: Multi-headed recurrent soft-actor critic-based traffic allocation,” in Proc. IEEE Int. Conf. Commun. (ICC) 2023, 2023, pp. 4001–4006. [7] T. B. Brown, B. Mann, N. Ryder, M. Subbiah, J. Kaplan et al., “Language models are few-shot learners,” Adv. Neural Inf. Process. Syst. (NeuroIPS), vol. 33, pp. 1877–1901, 2020. [8] J. Wei, X. Wang, D. Schuurmans, M. Bosma, b. ichter, F. Xia, E. Chi, Q. V. Le, and D. Zhou, “Chain-of-thought prompting elicits reasoning in large language models,” in Adv. Neural Inf. Process. Syst. (NeuroIPS), vol. 35, 2022, pp. 24 824–24 837. [9] B. L. Dalmazo, J. a. P. Vilela, and M. Curado, “Performance analysis of network traffic predictors in the cloud,” J. Netw. Syst. Manage., vol. 25, no. 2, p. 290–320, Apr. 2017. [10] Z. Tian and F. Li, “Network traffic prediction method based on autoregressive integrated moving average and adaptive volterra filter,” Int. J. Commun. Sys., vol. 34, no. 12, 2021. [Online]. Available: https://doi.org/10.1002/dac.4891 [11] H. D. Trinh, L. Giupponi, and P. Dini, “Mobile traffic prediction from raw data using LSTM networks,” in Proc. IEEE Int. Symp. Personal, Indoor and Mobile Radio Commun. (PIMRC). Bologna, Italy: IEEE, 2018, pp. 1–6. [12] L. Bai, L. Yao, C. Li, X. Wang, and C. Wang, “Adaptive graph convolutional recurrent network for traffic forecasting,” in Proc. Annual Conf. Neural Inf. Process. Syst. (NeurIPS), 2020. [13] Y. Fang, S. Ergüt, and P. Patras, “SDGNet: A handover-aware spatiotemporal graph neural network for mobile traffic forecasting,” IEEE Commun. Lett., vol. 26, no. 3, pp. 582–586, 2022. [14] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin, “Attention is all you need,” in Adv. Neural Inf. Process. Syst. (NeuroIPS), 2017, pp. 5998–6008. [15] G. Kougioumtzidis, V. K. Poulkov, P. I. Lazaridis, and Z. D. Zaharis, “Mobile network traffic prediction using temporal fusion transformer,” IEEE Trans. Artif. Intell., vol. 6, no. 10, pp. 2685–2699, 2025. [16] Y. Hu, Y. Zhou, J. Song, L. Xu, and X. Zhou, “Citywide mobile traffic forecasting using spatial-temporal downsampling transformer neural networks,” IEEE Trans. Netw. Serv. Manage., vol. 20, no. 1, pp. 152– 165, 2023. [17] J. Gong, Y. Liu, T. Li, J. Ding, Z. Wang, and D. Jin, “STTF: A spatiotemporal transformer framework for multi-task mobile network prediction,” IEEE Trans. Mobile Comput., vol. 24, no. 5, pp. 4072–4085, 2025. [18] B. Gu, J. Zhan, S. Gong, W. Liu, Z. Su, and M. Guizani, “A spatialtemporal transformer network for city-level cellular traffic analysis and prediction,” IEEE Trans. Wireless Commun., vol. 22, no. 12, pp. 9412– 9423, 2023. [19] H. Zhou, C. Hu, Y. Yuan, Y. Cui, Y. Jin, C. Chen, H. Wu, D. Yuan, L. Jiang, D. Wu, X. Liu, C. Zhang, X. Wang, and J. Liu, “Large language model (LLM) for telecommunications: A comprehensive survey on principles, key techniques, and opportunities,” IEEE Commun. Surveys Tuts., vol. 27, no. 3, pp. 1955–2005, 2024. [20] H. Zhang, A. B. Sediq, A. Afana, and M. Erol-Kantarci, “Large language models in wireless application design: In-context learning-enhanced automatic network intrusion detection,” in Proc. IEEE Global Commun. Conf. (GLOBECOM), 2024, pp. 2479–2484. [21] H. Zhang, A. Bin Sediq, A. Afana, and M. Erol-Kantarci, “Mobile traffic prediction using LLMs with efficient in-context demonstration selection,” IEEE Transactions on Communications, vol. 73, no. 11, pp. 11 170–11 185, 2025. [22] C. Hu, H. Zhou, D. Wu, X. Chen, J. Yan, and X. Liu, “Self-refined generative foundation models for wireless traffic prediction,” IEEE Trans. Veh. Technol., 2025. [23] M. A. Habib, P. E. Iturria Rivera, Y. Ozcan, M. H. M. Elsayed, M. Bavand, R. Gaigalas, and M. Erol-Kantarci, “LLM-based intent processing and network optimization using attention-based hierarchical reinforcement learning,” in Proc. 2025 IEEE Wireless Commun. Netw. Conf. (WCNC), 2025, pp. 1–6. [24] D. Cao, F. Jia, S. O. Arik, T. Pfister, Y. Zheng, W. Ye, and Y. Liu, “Tempo: Prompt-based generative pre-trained transformer for time series forecasting,” in Proc. Int. Conf. Learn. Represent. (ICLR), 2024. [25] C. Chang, W.-Y. Wang, W.-C. Peng, and T.-F. Chen, “LLM4TS: Aligning pre-trained LLMs as data-efficient time-series forecasters,” ACM Trans. Intell. Syst. Technol., vol. 16, no. 3, pp. 1–20, 2025.

13

[26] L. Huang, Y. Wu, and D. Simeonidou, “Reasoning AI performance degradation in 6G networks with large language models,” in Proc. 2025 IEEE Wireless Commun. Netw. Conf. (WCNC), 2025, pp. 1–6. [27] X. Wang, J. Zhu, R. Zhang, L. Feng, D. Niyato, J. Wang, H. Du, S. Mao, and Z. Han, “Chain-of-thought for large language model-empowered wireless communications,” arXiv preprint arXiv:2505.22320, 2025. [28] T. Kojima, S. Gu, M. Reid, Y. Matsuo, and Y. Iwasawa, “Large language models are zero-shot reasoners,” in Adv. Neural Inf. Process. Syst. (NeuroIPS), vol. 35, 2022, pp. 22 199–22 213. [29] Q. Dong, L. Li, D. Dai, C. Zheng, J. Ma, R. Li, H. Xia, J. Xu, Z. Wu, B. Chang et al., “A survey on in-context learning,” in Proc. 2024 Conf. Empir. Methods Nat. Lang. Process., 2024, pp. 1107–1128. [30] L. Wang, W. Xu, Y. Lan, Z. Hu, Y. Lan, R. K.-W. Lee, and E.-P. Lim, “Plan-and-solve prompting: Improving zero-shot chain-of-thought reasoning by large language models,” in Proc. 61st Annu. Meeting Assoc. Comput. Linguistics, Toronto, Canada, 2023, pp. 2609–2634. [31] D. Raca, D. Leahy, C. J. Sreenan, and J. J. Quinlan, “Beyond throughput, the next generation: A 5G dataset with channel and context metrics,” in Proc. 11th ACM Multimedia Syst. Conf. (MMSys ’20). ACM, 2020, pp. 303–308. [32] L. Mei, J. Gou, Y. Cai, H. Cao, and Y. Liu, “Realtime mobile bandwidth and handoff predictions in 4G/5G networks,” Comput. Netw., vol. 204, p. 108736, Feb. 2022. [33] OpenAI, “Openai o3 and o4-mini system card,” 2025. [34] C. Bandt and B. Pompe, “Permutation entropy: A natural complexity measure for time series,” Physical Review Letters, vol. 88, no. 17, p. 174102, 2002. [35] Mistral AI, “Ministral 3 3b,” Mistral Docs (Open v25.12), Dec. 2025, accessed 2025-12-28. [36] A. Yang et al., “Qwen3 technical report,” arXiv preprint arXiv:2505.09388, 2025. [37] M. Abdin et al., “Phi-4-reasoning technical report,” arXiv preprint arXiv:2504.21318, 2025. [38] K. Chitty-Venkata et al., “LLM-inference-bench: Inference benchmarking of large language models on AI accelerators,” in Proc. SC24-W: Workshops Int. Conf. High Perform. Comput., Netw., Storage Anal., Atlanta, GA, USA, 2024, pp. 1362–1379. [39] W. Fan, F. Xiao, Y. Pan, X. Chen, L. Han, and S. Yu, “Latency-aware joint task offloading and energy control for cooperative mobile edge computing,” IEEE Trans. Serv. Comput., vol. 18, no. 3, pp. 1515–1528, 2025.

Record · ID 175177 · SHA-256 86f2406f5df39344
Retrieved via Conceptio — every document is proof-bundled with source, license, and retrieval metadata.