• Tidak ada hasil yang ditemukan

AI-Enabled Framework for Mobile Network Experimentation Leveraging ChatGPT: Case Study of Channel Capacity Calculation for η-µ Fading and Co-Channel Interference

N/A
N/A
Protected

Academic year: 2024

Membagikan "AI-Enabled Framework for Mobile Network Experimentation Leveraging ChatGPT: Case Study of Channel Capacity Calculation for η-µ Fading and Co-Channel Interference"

Copied!
19
0
0

Teks penuh

(1)

Citation:Krstic, D.; Petrovic, N.;

Suljovic, S.; Al-Azzoni, I. AI-Enabled Framework for Mobile Network Experimentation Leveraging ChatGPT: Case Study of Channel Capacity Calculation forη-µFading and Co-Channel Interference.

Electronics2023,12, 4088. https://

doi.org/10.3390/electronics12194088 Academic Editors: Erich Leitgeb and Dimitris Kanellopoulos

Received: 4 August 2023 Revised: 18 September 2023 Accepted: 25 September 2023 Published: 29 September 2023

Copyright: © 2023 by the authors.

Licensee MDPI, Basel, Switzerland.

This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://

creativecommons.org/licenses/by/

4.0/).

electronics

Article

AI-Enabled Framework for Mobile Network Experimentation Leveraging ChatGPT: Case Study of Channel Capacity

Calculation for η - µ Fading and Co-Channel Interference

Dragana Krstic1,* , Nenad Petrovic1,* , Suad Suljovic2and Issam Al-Azzoni3

1 Faculty of Electronic Engineering, University of Nis, 18000 Nis, Serbia

2 The Academy of Applied Technical Studies Belgrade, 11070 Beograd, Serbia; [email protected]

3 College of Engineering, Al Ain University, Al Ain 64141, United Arab Emirates; [email protected]

* Correspondence: [email protected] (D.K.); [email protected] (N.P.)

Abstract:Artificial intelligence has been identified as one of the main driving forces of innovation in state-of-the-art mobile and wireless networks. It has enabled many novel usage scenarios, relying on predictive models for increasing network management efficiency. However, its adoption requires ad- ditional efforts, such as mastering the terminology, tools, and newly required steps of data importing and preparation, all of which increase the time required for experimentation. Therefore, we aimed to automate the manual steps as much as possible while reducing the overall cognitive load. In this paper, we explore the potential use of a novel Chat Generative Pre-trained Transformer (ChatGPT) conversational agent together with a model-driven approach relying on the Neo4j graph database in order to aid experimentation and analytics in the case of wireless network planning. As a case study, we present a derivation of the expression for the channel capacity (CC) metric in the case ofη-µ multipath fading andη-µco-channel interference. Moreover, the derived expression is leveraged for quality of service (QoS) estimation within the software simulation environment. ChatGPT, in synergy with a model-driven approach, is used to automate several steps: data importing, generation of graph construction, and machine learning-related Neo4j queries. According to the achieved outcomes, the proposed QoS estimation method, based on the derived CC expression (with precision up to the fifth significant digit), demonstrates satisfactory accuracy (up to 98%) and faster training than the deep neural network-based solution. On the other hand, compared to the manual approach based on our previous work, ChatGPT-based code generation reduces the time required for experimentation by more than 4 times.

Keywords:Chat Generative Pre-trained Transformer (ChatGPT); machine learning; Neo4j; channel capacity (CC); selection combining (SC);η-µfading; co-channel interference (CCI)

1. Introduction

Propagation in mobile radio environments is characterized by waves that interact with the surfaces of the objects they encounter. These waves react through phenomena such as diffraction, reflection, refraction, scattering, and absorption, causing the signal to fade rapidly. This is referred to as short-term fading [1].

The amplitudes and phases of the propagation waves vary in accordance with the physical properties of the surfaces they encounter. Various distributions can describe these variations. Among them is theη-µdistribution [2] and the so-calledη-µfading, which influences mobile networks. Theη-µfading model observes a signal consisting of clusters of multipath waves that propagate in an inhomogeneous environment. Within any cluster, the phases of the scattered waves are random and have similar delay times, but there is a relatively large spread in the delay times of different clusters [2]. Theη-µdistribution is a general fading distribution used to faithfully represent the small-scale variation of the fading signal, provided there is no line-of-sight [3].

Electronics2023,12, 4088. https://doi.org/10.3390/electronics12194088 https://www.mdpi.com/journal/electronics

(2)

Because of its generality, the impact of this fading on wireless systems has been extensively discussed in the literature. Various aspects of wireless systems’ performance under the influence of fading effects have been evaluated for different purposes. In [4–8], the first-order system performance in the presence ofη-µfading was derived. In [4], the moment generating function (MGF) of the generalizedη-µdistribution was derived and used to evaluate the average bit error rate (ABER) inη-µfading channels in terms of elementary functions. An exact closed-form expression for the outage probability (OP) in η-µfading channels was derived in [5]. Reference [6] investigated the ABER and OP of binary coherent, and non-coherent modulation schemes were obtained for anL-branch maximal ratio combining (MRC) diversity receiver over exponentially correlatedη-µfading channels. In [7], expressions for the rate and OP were developed for the MRC receiver in scenarios involvingη-µfading and interferers with unequal power. Reference [8] provided exact closed-form expressions for the OP of MRC inη-µfading channels with antenna correlation and Rayleigh co-channel interference (CCI) with arbitrary powers.

The second-order performance of wireless systems in the presence ofη-µfading was considered in [9,10]. The formula for the level crossing rate (LCR) was derived in [9] for the selection combining (SC) receiver in mobile systems under the influence ofη-µfading andη-µCCI. The LCR, the average fade duration (AFD), and the phase crossing rate (PCR) were derived in [10] forη-µfading channels.

The channel capacity (CC) is one of the most important performance metrics of the first order. Increasing the CC of mobile networks is one of the main demands in today’s wireless services. Analyses of the channel capacity can be found in the existing literature [11–13].

This is why we have chosen to investigate this performance metric in our paper.

In addition to small-scale fading, CCI is also present in wireless systems. It can be a consequence of different influences, including the weather conditions, administrative factors, or design issues. References [8–10] took into account the impact of CCI, in addition to theη-µfading. CCI can also be modeled with different distributions.

The standard approach to mitigating the impact of fading and CCI is through diversity combining [1]. Some of the most common diversity-combining techniques are maximal ratio combining (MRC) [6–8], equal gain combining (EGC) [14], and selection combining (SC) [9,13,15]. While all of these techniques improve system performance, MRC is consid- ered the most effective. On the other hand, SC combining has a lower cost and still good enough features for mitigating fading and CCI. Therefore, in this paper, we analyze a multi- branch SC receiver used to enhance wireless systems in the presence ofη-µfading and CCI.

Since this scenario has an important vehicular application, we derive its CC expression.

On another front, artificial intelligence (AI) has opened new horizons for wireless net- work planning, especially in proactive performance-related infrastructure reconfiguration and tuning [16]. Realistic environments also encompass negative effects on propagated waves, which must be considered in these predictions. However, the rise of AI-based tools and rapid advancements in this area have made simulation workflows increasingly complex, demanding a higher cognitive load to master the related concepts and techniques.

As a downside, because adopting novel techniques requires additional effort, the time required for insightful network planning has increased, consequently slowing down proto- typing and research. Hence, in this paper, we focus on providing an automated network simulation workflow that integrates AI tools to reduce the time needed for simulation.

The presented case study considers environments influenced byη-µ multipath fading andη-µco-channel interference. To the best of our knowledge, there is no other publicly available scientific work that adopts Chat Generative Pre-trained Transformer (ChatGPT) in combination with a model-driven approach for the purpose of graph database-related code generation in the field of telecommunications.

The main contributions of this paper are as follows:

(1) We derive the expression for CC for the L-branch SC receiver in the case ofη-µ multipath fading andη-µCCI;

(3)

Electronics2023,12, 4088 3 of 19

(2) We present a QoS estimation model based on classifications within the Neo4j graph database, leveraging the previously derived CC as one of the inputs;

(3) We propose a ChatGPT-based approach to automated Neo4j query generation, cover- ing data import and classification using a meta-model.

This paper is organized into four main sections and includes two appendices. Follow- ing Section1, we derive the CC expression, and analyze the influence of the parameters based on the results in plotted graphs. Afterwards, we propose a classification-based method for quality of service (QoS) prediction, utilizing the previously derived CC ex- pression within the network planning environment to calculate one of the input variables.

In this section, we also provide an overview of the underlying framework for machine learning capabilities—the Neo4j graph database and its graph data science (GDS) library.

Additionally, we give background information about large language models (LLMs) and model-driven engineering, as they represent the underlying concepts behind ChatGPT and Ecore. The synergy of these two is leveraged with the aim of automatizing a machine learning-aided simulation workflow for mobile network planning. While Ecore-based models were used for prompt construction, we relied on ChatGPT for Neo4j query genera- tion based on these prompts. At the end of the third section, we evaluate the benefits of the proposed approach and provide a comparison to the manual procedure. Finally, the achieved QoS estimation performance is compared to other similar work. The fourth section summarizes the results and discusses possible future research directions. The appendices offer additional details on the derivation of the CC expression and the intermediate steps.

2. Channel Capacity in the Presence ofη-µFading and CCI

2.1. Derivation of the PDF of the Receiver’s Output Signal-to-Co-Channel Interference Ratio In this section, we derive the probability density function (PDF) of the output signal-to- co-channel interference-ratio (SIR) for a multi-branch SC receiver within a wireless system disturbed byη-µfading andη-µdistributed CCI. The use of appropriate fading and CCI models is valuable for addressing challenges related to channel capacity maximization within wireless systems.

From the very name of the distribution, we can deduce that theη-µdistribution is characterized by two parameters. The parameterηrepresents the ratio of the powers of the in-phase and in-quadrature scattered waves in each multipath cluster, whileµdenotes the number of clusters [2]. This distribution is derived from field measurements and is thus fully characterized in terms of measurable physical parameters [3].

Theη-µfading may appear in two different formats corresponding to two physical models. However, mathematically, one format can be obtained from the other using the following relation:

ηFormat2= 1−ηFormat1

1+ηFormat1 orηFormat1= 1−ηFormat2 1+ηFormat2 ,

where 0 <ηFormat1 < ∞is theη parameter in Format 1, and −1 <ηFormat2 < 1 is theη parameter in Format 2 [3].

To simplify the notation,ηis used in both cases, keeping in mind that they represent different physical phenomena, and that their domains are different. Further simplification is achieved by defining two new parameters, denotedhandHand both functions ofη.

These parameters hold distinct meanings and values for the two different formats. The convenience of usinghandHis that they have a unique representation for both formats [3].

In Format 1, we haveh= (2 +η−1+η)/4 andH =(η−1−η). When 0 <η≤1, then H≥0, while for 0 <η−1≤1, we haveH≤0. It is important to note that due to the property Iν(−z) = (−1)vIν(z), the distribution yields identical values within these two intervals, i.e., it is symmetrical aroundη= 1. Therefore, it is sufficient to considerηwithin one of these ranges. Also, in Format 1, we observe thatH/h= (1−η)/ (1 +η) [3].

The Hoyt (Nakagami-q), one-sided Gaussian, Nakagami-m, and Rayleigh distributions are all special cases of theη-µ distribution. The Hoyt (or Nakagami-q) distribution is

(4)

obtained by settingµ= 0.5, the one-sided Gaussian distribution emerges asηapproaches 0 or∞, whereas the Rayleigh distribution corresponds exactly toµ= 0.5 andη= 1.

IfLdenotes the number of input branches in the multi-branch SC receiver, under the η-µdistribution, the signal envelopes at the receiver inputsxi,i =1, 2, . . ., L,are ([9]; (3)):

pxi(xi) = 4

πh1µ1

Γ(µ1)e

2µ1h1 i xi2

+ i1

=0

H12i1xi4i1+4µ1−1(µ1/Ωi)2i1+2µ1

i1!Γ(i1+µ1+1/2) . (1)i represents the mean values of the input signals: Ωi=x2i andΓ(·) is the Gamma function ([17]; Sec. (8.31)).

Since theη-µdistribution is of Format 1 [3], its parameters are defined as:

h1= 21−11

4 , H1= η1

−1−η1

4 . (2)

Applying Expression (2) to Expression (1), we obtained the PDF of the input signal to the SC combiner in the following form:

pxi(xi) = 4

π1+1)2µ1 Γ(µ1)e

µ1(η1+1)2 1i xi2

+∞

i1=0

1−η122i1

xi4i1+4µ1−1(µ1/Ωi)2i1+2µ1

24i1+2µ1η12i1+µ1Γ(i1+µ1+1/2)i1! . (3) In the observed environment, the input CCI envelopes, marked withyi, i= 1, 2, ...,L, also follow theη-µdistribution:

pyi(yi) = 4

π2+1)2µ2 Γ(µ2)e

µ2(η2+1)2 2si yi2

+∞

i2=0

1−η222i2

yi4i2+4µ2−1(µ2/si)2i2+2µ2

24i2+2µ2η22i2+µ2Γ(i2+µ2+1/2)i2! . (4) The mean square values of the CCI envelopes are denoted bysi,si= y2i,i= 1, 2, ...,L.

The ratio of the desired signal envelope and the CCI envelope at theith input branch of the SC receiver is denoted byzi,zi= xi/yi, and has the following PDF [18]:

pzi(zi) = Z 0

yipxi(ziyi)pyi(yi)dyi. (5)

After introducing Equations (3) and (4) into (5), we have the PDF of the SIRzi: pzi(zi) =8π1+1)Γ(µ2µ1 2+1)2µ2

1)Γ(µ2)

+ i1=0

+ i2=0

(1−η12)2i1(1−η22)2i2µ12i1+2µ1µ22i2+2µ2

22i1+2i2i1!i2!Γ(i1+µ1+1/2) ×

η12i2+µ1+2µ2η22i1+2µ1+µ2Γ(2i1+2i2+2µ1+2µ2)i2i2+2µ2si2i1+2µ1zi4i1+4µ11

Γ(i2+µ2+1/2)(η1µ2i2+1)22µ1si1+1)2zi2)2i1+2i2+2µ1+2µ2

(6)

The cumulative distribution function (CDF) of SIRsziis derived in AppendixAand is given by Formula (A5):

Fzi(zi) = Γ(µ4πη1µ1

1)Γ(µ2) +∞

i1=0 +∞

i2=0 +∞

i3=0

(2i1+2µ1)i

3(1−2i2−2µ2)i

31+1)2i3+2µ1(1−η12)2i1(1−η22)2i2

22i1+2i2(2i1+2µ1+1)i

32+1)4i2+2µ2i1!i2!i3! ×

Γ(2i1+2i2+2µ1+2µ222i1+i3+2µ1+µ2

Γ(i1+µ1+1/2)Γ(i2+µ2+1/2)(2i1+2µ1)

µ1sizi2

η1µ2i2+1)22µ1si1+1)2zi2

2i1+i3+2µ1

.

(7)

Now, Equation (7) gives the CDF for the SIR from each input branch.

After passing the signal through the SC receiver, it chooses the branch with the highest SIR from all input antennas based on the SC combiner, with theLbranches operation

(5)

Electronics2023,12, 4088 5 of 19

algorithm. The signal from that selected input branch is then fed to the user. The output SIR is denoted aszand defined byz= max(z1, z2,. . ., zL), wherei= 1, 2, . . .,L.The PDF of the SIRzat the output of the multi-branch SC receiver will be calculated based on the expression ([15], (4)):

pz(z) =Lpzi(zi)(Fzi(zi))L−1. (8) By substituting Equations (6) and (7) into Equation (8), the PDF of the output SIRzis:

pz(z) = 2L

2+1)2Lµ24µ2

4π1+1)2µ1 Γ(µ1)Γ(µ2)

L+ i1=0

+ i2=0

(1−η12)2i1(1−η22)2i2η12i2+Lµ1+2µ2

22i1+2i2Γ(i1+µ1+1/2) ×

η22i1+2Lµ1+Lµ2Γ(2i1+2i2+2µ1+2µ2)(µ1si)2i1+2Lµ1(µ2i)2i2+2µ2zi4i1+4Lµ11

Γ(i2+µ2+1/2)(η1µ2i2+1)22µ1si1+1)2zi2)2i1+2i2+2Lµ1+2µ2i1!i2! ×

+ i3=0

+ i4=0

+ i5=0

(2i3+2µ1)i

5(1−2i4−2µ2)i

5(µ1siη2zi2)2i3+i51+1)2i5(1−η12)2i3

22i3+2i4(2i3+2µ1+1)i

5Γ(i3+µ1+1/2)(η2+1)4i4Γ(i4+µ2+1/2) × (1−η22)2i4Γ(2i3+2i4+2µ1+2µ2)

i3!i4!i5!(2i3+2µ1)(η1µ2i2+1)22µ1si1+1)2zi2)2i3+i5

!L−1

.

(9)

2.2. Channel Capacity Derivation

In this subsection, we derive the channel capacity for the multi-branch SC receiver in a wireless system disturbed byη-µfading andη-µdistributed CCI. The channel capacity is a performance measure of utmost importance in wireless communication system design because it provides information about the upper bound of the maximal transmission rate.

The average CC normalized by the bandwidthB, given in Hz, is obtained in ([1], (17.4)) CC

B = 1

ln(2) Z 0

ln(1+z)pz(z)dz (10)

whereCCrepresents the Shannon capacity in bits/s.

Using mathematical manipulations done in AppendixB, we obtained the normalized CC in its final form in (A9):

CC

B = ln(2)L Γ(µ4π

1)Γ(µ2)

L +∞

i1=0 +∞

i2=0 +∞

i3=0

(−1)i1 (1−η12)2i2(1−η22)2i3

22i2+2i3i2!i3!(i1+1)!η2(i12Lµ2+1)/2×

η1(i1+2Lµ1+1)/2Γ(2i2+2i3+2µ1+2µ2)(µ2i/µ1si)(i1+1)/2

Γ(i2+µ1+1/2)Γ(i3+µ2+1/2)(η1+1)i1+4i2+2Lµ1+12+1)4i3+2Lµ2i11×

+ i4=0

+ i5=0

+ i6=0

(2i4+2µ1)i

6(1−2i5−2µ2)i

6

22i4+2i5(2i4+2µ1+1)i

6i4!i5!i6!Γ(i4+µ1+1/2)×

1−η12 1+1)2

2i4

1−η22 2+1)2

2i5

Γ(2i4+2i5+2µ1+2µ2) Γ(i5+µ2+1/2)(2i4+2µ1)

!L−1

×

Bi

1+4i2+(4i4+2i6)(L−1)+4Lµ1+1

2 ,4i3+4µ22−i1−1 .

(11)

The normalized CC depends on the parameters ofη-µfading and CCI as a triple sum whose rapid convergence is shown in Tables1and2. In the next subsection, based on the calculation from Equation (11), we present the graphical analysis of the normalized CC of the wireless system in the presence ofη-µfading and CCI with the multi-branch SC receiver, along with the analysis of the parameters’ influence.

(6)

Table 1. The number of additions in the summation of Expression (11) to achieve precision at the fifth significant digit for variable parametersµ1andµ2.

Variables w=10 dB w= 0 dB w= 10 dB

µ1= 1,µ2= 1 15 17 17

µ1= 1.5,µ2= 1 16 17 18

µ1= 2,µ2= 1 18 19 20

µ1= 2.5,µ2= 1 19 19 20

µ1= 3,µ2= 1 19 21 22

µ1= 4,µ2= 1 22 22 24

µ1= 1,µ2= 1.5 15 17 18

µ1= 1,µ2= 2 17 18 19

µ1= 1,µ2= 2.5 18 19 20

µ1= 1,µ2= 3 19 20 21

µ1= 1,µ2= 4 21 22 22

Table 2. The number of additions in the summation of Expression (11) to achieve precision at the fifth significant digit for different values of parametersη1andη2, and number of branchesL.

Variables w=10 dB w= 0 dB w= 10 dB

η1= 0.2,η2= 0.2,L= 2 15 17 17

η1= 0.4,η2= 0.2,L= 2 14 14 15

η1= 0.6,η2= 0.2,L= 2 13 15 16

η1= 0.8,η2= 0.2,L= 2 14 14 15

η1= 0.2,η2= 0.4,L= 2 15 16 16

η1= 0.2,η2= 0.6,L= 2 15 15 16

η1= 0.2,η2= 0.8,L= 2 15 16 15

η1= 0.2,η2= 0.2,L= 3 15 16 18

η1= 0.2,η2= 0.2,L= 4 17 17 17

η1= 0.2,η2= 0.2,L= 5 16 18 18

2.3. Analysis of Parameters’ Influence on the Channel Capacity

In order to analyze the impact of fading and CCI parameters on the channel capacity, we plotted two figures of normalized CC versus the output ratio of the signal’s and CCI’s powers, denoted asw=Ω/s. We assumed that the correlation between the input branches in the SC receiver can be neglected. For graphical presentation, we used the programs Mathematica and Origin.

In Figure1, the normalized CC is presented for different values of fading and CCI param- etersµ1andµ2. In this case, we supposed equal values of parametersη1andη212= 0.2, and that there were two input branches going into the SC receiver. In this figure, it is possible to notice that changing µ1 parameter had an insignificant impact on the CC, while an increase in the µ2 parameter led to a decrease in the CC, indicating worse system performance.

(7)

Electronics2023,12, 4088 7 of 19

Electronics 2023, 12, x FOR PEER REVIEW 7 of 20

η1 =0.2, η2 =0.2, L = 5 16 18 18

2.3. Analysis of Parameters’ Influence on the Channel Capacity

In order to analyze the impact of fading and CCI parameters on the channel capacity, we plotted two figures of normalized CC versus the output ratio of the signal’s and CCI’s powers, denoted as w = Ω/s. We assumed that the correlation between the input branches in the SC receiver can be neglected. For graphical presentation, we used the programs Mathematica and Origin.

In Figure 1, the normalized CC is presented for different values of fading and CCI parameters µ1 and µ2. In this case, we supposed equal values of parameters η1 and η2: η1

= η2 = 0.2, and that there were two input branches going into the SC receiver. In this figure, it is possible to notice that changing µ1 parameter had an insignificant impact on the CC, while an increase in the µ2 parameter led to a decrease in the CC, indicating worse system performance.

On the other hand, in Figure 2, the normalized CC is shown for some values of the fading and CCI parameters η1 and η2, while keeping the parameters µ1 and µ2 constant: µ1

= µ2 = 1. In Figure 2, it is visible that changes in the values of the parameters η1 and η2 had no major influence on the CC. In contrast, with an increase in the number of input branches (denoted by L), the CC increased, indicating an improvement of the system’s performance.

Figure 1. Normalized channel capacity versus the output SIR for different values of fading and CCI parameters µ1 and µ2.

Additionally, we provide two tables to illustrate the number of additions required to achieve the desired precision in the summation of Formula (11) for channel capacity, spe- cifically, with accuracy up to the fifth decimal place.

Figure 1.Normalized channel capacity versus the output SIR for different values of fading and CCI parametersµ1andµ2.

On the other hand, in Figure2, the normalized CC is shown for some values of the fading and CCI parametersη1andη2, while keeping the parametersµ1andµ2constant:

µ1 = µ2 = 1. In Figure2, it is visible that changes in the values of the parameters η1 andη2had no major influence on the CC. In contrast, with an increase in the number of input branches (denoted byL), the CC increased, indicating an improvement of the system’s performance.

Electronics 2023, 12, x FOR PEER REVIEW 8 of 20

Table 1 demonstrates how this number of additions changed when varying the pa- rameters µ1 and µ2. As µ1 and µ2 increased, the number of elements to be added also in- creased, indicating that the series converged more slowly for all values of the SIR w.

Figure 2. Normalized channel capacity for different values of fading and CCI parameters η1 and η2 and number of branches L.

Table 2 illustrates the variations in the number of additions required when the pa- rameters η1 and η2, as well as the number of input branches L, were altered. When the parameter η1 increased, there was a decrease in the number of elements that needed to be added, indicating a faster convergence of the series. When the parameter η2 increased, the number of elements to be added exhibited different behaviors for different values of SIR w. For w = −10 dB it was 15, for w = 0 dB it was between 14 and 16, and for w = 10 dB it further increased, and the series converged more slowly. Additionally, when L increased, the number of summing elements reached a maximum of 16 for w = −10 dB, and 18 for w

= 0 dB and w = 10 dB. In this scenario, the convergence was the slowest.

3. Model-Driven Approach to QoS Estimation Using Neo4j Graph Database Aided by ChatGPT

In this section, the proposed simulation workflow aiding network planning based on machine learning techniques, considering the CC value from the previous part as input, is described. Here, we give an overview of the three main concepts behind the approach, together with corresponding technologies: classification within a graph database using Neo4j and GDS, generative LLMs adoption for code generation relying on ChatGPT, and model-driven engineering with an eclipse modeling framework (EMF) and Ecore. After that, we describe the crucial components for the implementation of the proposed work- flow: a classification-based predictive model using GDS, an Ecore meta-model for prompt parameter specification, and a code generation method based on model-to-prompt trans- formation leveraging ChatGPT. Finally, the last subsection gives a comparison of the

Figure 2.Normalized channel capacity for different values of fading and CCI parametersη1andη2 and number of branchesL.

(8)

Additionally, we provide two tables to illustrate the number of additions required to achieve the desired precision in the summation of Formula (11) for channel capacity, specifically, with accuracy up to the fifth decimal place.

Table1demonstrates how this number of additions changed when varying the param- etersµ1andµ2. Asµ1andµ2increased, the number of elements to be added also increased, indicating that the series converged more slowly for all values of the SIRw.

Table2illustrates the variations in the number of additions required when the pa- rametersη1andη2, as well as the number of input branchesL,were altered. When the parameterη1increased, there was a decrease in the number of elements that needed to be added, indicating a faster convergence of the series. When the parameterη2increased, the number of elements to be added exhibited different behaviors for different values of SIR w.Forw=−10 dB it was 15, forw= 0 dB it was between 14 and 16, and forw= 10 dB it further increased, and the series converged more slowly. Additionally, whenLincreased, the number of summing elements reached a maximum of 16 forw=−10 dB, and 18 for w= 0 dB andw= 10 dB. In this scenario, the convergence was the slowest.

3. Model-Driven Approach to QoS Estimation Using Neo4j Graph Database Aided by ChatGPT

In this section, the proposed simulation workflow aiding network planning based on machine learning techniques, considering the CC value from the previous part as input, is described. Here, we give an overview of the three main concepts behind the approach, together with corresponding technologies: classification within a graph database using Neo4j and GDS, generative LLMs adoption for code generation relying on Chat- GPT, and model-driven engineering with an eclipse modeling framework (EMF) and Ecore. After that, we describe the crucial components for the implementation of the pro- posed workflow: a classification-based predictive model using GDS, an Ecore meta-model for prompt parameter specification, and a code generation method based on model-to- prompt transformation leveraging ChatGPT. Finally, the last subsection gives a comparison of the achieved results (both prediction performance and code generation time) with similar solutions.

3.1. Neo4j and Graph Data Science Library

Neo4j [19] is a database management system based on a graph data model. The un- derlying data representation model consists of the following main concepts: (1) node—an entity that corresponds to an object or event within some domain of interest considered, (2)link—a relationship that connects two node elements, and (3) property—a pair in the form of (key, value) describing the characteristics of interest of a node or link. Additionally, in order to perform data management or retrieval based on such representation in Neo4j, Cypher query language [20] is used for this purpose. Additionally, an add-on called the Graph Data Science Library [21] was also introduced as an optional plug-in in Neo4j, inte- grating a low-code interface to a set of machine learning-oriented functionalities against the data graph. The main focus of the available algorithms forming GDS is on two tasks:

classification and relationship discovery.

Despite the limited set of machine learning techniques that are supported by Neo4j, their implementation has been shown to be faster in training and more effective (higher prediction accuracy) compared to deep learning and other more complex neural network- based approaches in the case of simpler numeric data-based predictions, without involving audiovisual signals [22]. Considering that many cases rely on numeric data only, while the execution speed is crucial for real-time scenarios, Neo4j’s GDS library represents a reasonable choice when it comes to the adoption of AI in the area of wireless networks.

In order to train a classification model in GDS, we make use of the gds.alpha.ml.node- Classification.train [23] procedure for this purpose.

Table3provides an overview of the queries used within the steps of the classification model creation. In this study, these queries were generated automatically using ChatGPT,

(9)

Electronics2023,12, 4088 9 of 19

starting from the model-based representation of a problem. The examples of queries are given in the case of a dataset for our QoS prediction case study.

Table 3.Steps for classification-based QoS estimation using GDS in Neo4j.

Step Neo4j Query Input Output

Import data

LOAD CSV WITH HEADERS FROM

‘file:///qos_predict.csv’ AS row

WITH row WHERE row.QoS IS NOT NULL

MERGE (q:QosPredict {CC: row.CC,...QoS : row.QoS});

CSV tabular data Internal tabular data representation

Graph construct

CALL gds.graph.create.cypher(

‘QosPredictGraph’,

‘MATCH (q:QosPredict) WHERE q.QoS is NOT NULL RETURN id(s) as id,

q.CC as CC, ...

q.QoS as QoS’,

‘MATCH (s:QosPredict)-[link]->(e:QosPredict)

RETURN ID(link) as link, ID(s) as source, ID(e) as target’

)

Internal tabular data

representation Neo4j data graph

Classifier training

CALL gds.alpha.ml.nodeClassification.train(

‘QoSPredictGraph’, {

modelName: ‘qos_prediction’, featureProperties:

[‘CC’, ‘BsId’, . . .’Season’], targetProperty: ‘QoS’, randomSeed: 5, holdoutFraction: 0.20, validationFolds: 10, metrics: [ ‘ACCURACY’], params: [

{ penalty: 0.01, maxEpochs: 10, batchSize: 5}, . . .

{ penalty: 0.001}

]

}) YIELD modelInfo RETURN

{penalty: modelInfo.bestParameters.penalty} AS winningModel,

modelInfo.metrics.ACCURACY.outerTrain AS trainGraphScore,

modelInfo.metrics.ACCURACY.test AS testGraphScore

Neo4j data graph Predictive

classification model

3.2. ChatGPT and Large Language Models

ChatGPT [24] is a conversational agent service based on a large language model (LLM) for text generation, providing the ability to handle conversation in the form of dialogue.

During the process of conversation, the user provides input in the form of a question, together with optional context containing additional facts that can be taken into account by ChatGPT in order to generate a more specific answer. It was publicly released by the OpenAI organization towards the end of 2022. Shortly after that, it started to draw large audience and public attention because of its comprehensiveness, thanks to the enormous amount of data used for the training of the underlying GPT model, which captured the state of the World Wide Web in textual form until late 2021. From poetry and essay writing, data analysis, code generation, and debugging to playing board games [24], ChatGPT has impressed its users around the world with its comprehensive and quite accurate answers.

When it comes to the process of training, a customized transfer learning-alike approach was used, utilizing both supervised and reinforcement learning technique elements.

(10)

While ChatGPT can be accessed and used for free via an interactive web graphical user interface (GUI), it can be also accessed programmatically using a library that is available in all commonly used programming languages nowadays (such as Python or JavaScript). However, access to the application programming interface (API) requires an access OpenAPI token, while the programmatic requests themselves are charged based on a per-token pricing model (up to $0.02 per 1000 request tokens, which corresponds to roughly 750 words in length for the prompt and request). The latest version is currently GPT-4.

However, there is still a limitation for the length of user-provided input/question, which is currently 3000 words. Regarding the programming paradigm for leveraging ChatGPT and similar LLMs, an approach known as prompt engineering or in-context learning is utilized [25]. During this process, model parameters are not modified, but rather, a mesa- optimization alike method is used, providing the capability to learn “small” models, which leverage the data provided as context for making more accurate predictions. Therefore, a user or a client of the ChatGPT service usually provides a prompt that consists of two parts: (1) a question—the task that we ask ChatGPT to solve, and (2) a context—a “hint”

that helps ChatGPT to generate a more precise answer.

Once the prompt is constructed (which was carried out by processing the Ecore model, in our case), it is sent via an API as a request to the ChatGPT online service.

For this purpose, we made use of a Python script, as shown in Figure3, built upon our previous work in the area of blockchain smart contract generation [26]. Once generated, it is forwarded as the input of a Python script, whose excerpt is given in Figure3. Apart from the question and the context, we can also provide two additional parameters as input:

(1) the model—a version of the underlying LLM, and (2) the temperature—a generated response randomness factor that we kept as low as possible, taking into account that deterministic answers were desired for our case study.

Electronics 2023, 12, x FOR PEER REVIEW 11 of 20

For this purpose, we made use of a Python script, as shown in Figure 3, built upon our previous work in the area of blockchain smart contract generation [26]. Once gener- ated, it is forwarded as the input of a Python script, whose excerpt is given in Figure 3.

Apart from the question and the context, we can also provide two additional parameters as input: (1) the model—a version of the underlying LLM, and (2) the temperature—a generated response randomness factor that we kept as low as possible, taking into account that deterministic answers were desired for our case study.

Figure 3. Excerpt of Python code for programmatic access to ChatGPT service.

3.3. Model-Driven Engineering and Ecore

Model-driven engineering (MDE) is an approach for system development that con- siders models as first-class citizens throughout the development process [27]. A model is a reduced representation of a system that helps analyze certain properties of the system while ignoring details that are irrelevant for the particular kind of analysis at hand.

In MDE-based approaches, models need to conform to meta-models [28]. A meta- model defines the structure for its models and the constraints applicable to such models.

In essence, a meta-mode can be considered a model of models. There exist several meta- modeling languages that can be used to define meta-models. In particular, a common meta-modeling language that is used in this paper for defining the meta-models is Ecore [29]. Ecore is part of the EMF [30] set of languages and tools. By defining the meta-models in Ecore, one can benefit from the large number of tools in the EMF that are already com- patible with Ecore.

Models in MDE-based approaches can be automatically transferred into other repre- sentations. In model-to-model (M2M) transformations, a model is transformed into an- other model, which conforms to another meta-model that can be at a different level of abstraction or in a different formalism altogether. On the other hand, model-to-text (M2T) transformations transform models into textual representations, such as code. In this study, we used PyEcore [31] for handling EMF models that conformed to Ecore meta-models and generating code for the subsequent analysis of such models.

In this study, we made use of model-driven engineering in order to provide a con- venient way for automated prompt construction. Users need to provide parameters with respect to pre-defined meta-models. Furthermore, the created model was parsed, so the corresponding parameters were extracted and inserted into the templates of prompts, which were finally used for automated code generation by ChatGPT.

Figure 3.Excerpt of Python code for programmatic access to ChatGPT service.

3.3. Model-Driven Engineering and Ecore

Model-driven engineering (MDE) is an approach for system development that con- siders models as first-class citizens throughout the development process [27]. A model is a reduced representation of a system that helps analyze certain properties of the system while ignoring details that are irrelevant for the particular kind of analysis at hand.

In MDE-based approaches, models need to conform to meta-models [28]. A metamodel defines the structure for its models and the constraints applicable to such models. In essence, a meta-mode can be considered a model of models. There exist several meta-modeling languages that can be used to define meta-models. In particular, a common meta-modeling language that is used in this paper for defining the meta-models is Ecore [29]. Ecore is part

(11)

Electronics2023,12, 4088 11 of 19

of the EMF [30] set of languages and tools. By defining the meta-models in Ecore, one can benefit from the large number of tools in the EMF that are already compatible with Ecore.

Models in MDE-based approaches can be automatically transferred into other rep- resentations. In model-to-model (M2M) transformations, a model is transformed into another model, which conforms to another meta-model that can be at a different level of abstraction or in a different formalism altogether. On the other hand, model-to-text (M2T) transformations transform models into textual representations, such as code. In this study, we used PyEcore [31] for handling EMF models that conformed to Ecore meta-models and generating code for the subsequent analysis of such models.

In this study, we made use of model-driven engineering in order to provide a con- venient way for automated prompt construction. Users need to provide parameters with respect to pre-defined meta-models. Furthermore, the created model was parsed, so the corresponding parameters were extracted and inserted into the templates of prompts, which were finally used for automated code generation by ChatGPT.

3.4. Approach Overview

Figure4depicts the summarized workflow behind the proposed approach for model- driven QoS estimation, leveraging Neo4j and aided by ChatGPT.

Electronics 2023, 12, x FOR PEER REVIEW 12 of 20

3.4. Approach Overview

Figure 4 depicts the summarized workflow behind the proposed approach for model-driven QoS estimation, leveraging Neo4j and aided by ChatGPT.

Neo4j graph database

GDS classification CSV dataset

QoS estimation Eclipse Modelling

Environment

User Python ChatGPT

script

1 4 5 6 8 9

7 3

CC calculation

Figure 4. ChatGPT-aided classification workflow for QoS estimation using Neo4j and ChatGPT: (1) modeling; (2) network model; (3) CC value; (4) prediction problem model; (5) ChatGPT prompt; (6) cypher queries; (7) data import and graph construction; (8) GDS classification query; (9) predictions.

A GUI-enabled modeling tool was automatically generated within the Eclipse inte- grated development environment (IDE) based on our EMF meta-models: (1) the predic- tion problem representation [22] (illustrated in a customized, higher-level form in Figure 5), and (2) the network plan model [16]. Apart from the network infrastructure and envi- ronment details described in [16], the user also has to provide the following information required for data import and ChatGPT-aided Neo4j query generation: (1) the path of the comma-separated value (CSV) dataset file, (2) selection of the columns from the CSV files to be considered, and (3) identification of the input and output (target) variables for the selected columns. After that, Python script, relying on the PyEcore [31] library for enabling Ecore model support in the Python programming language, was used in order to extract the required parameter values from the user-created model. Furthermore, in order to con- struct the dataset, the CC was calculated using the previously derived expression relying on graphics hardware, as it significantly reduces the execution time thanks to loop paral- lelization compared to the CPU-only approach [32].

Predictive Model

Relationship Discovery Classification

Dataset

fileName: String

<<analyzes>>

Variable

name: String type: String

Input Target

<<has>>

Figure 5. Prediction problem meta-model customization for Neo4j.

The parameters were further leveraged in order to parametrize the prompts that were sent to the ChatGPT service using the script in Figure 3. The outputs of this Python script were the following: (1) a cypher query for CSV data import into Neo4j (structured as in Row 1 in Table 3); (2) a Neo4j procedure call for the generation of a corresponding graph database based on the provided CSV (structured as in Row 2 in Table 3); (3) a Neo4j call to the GDS library for the training of the desired QoS estimation model (Row 3 in Table 3). The patterns for each of the prompts that were used for code generation are given as follows:

Import data prompt: Generate Neo4j command for importing csv file entitled

{model.fileName} with following fields: {model.input_variable1, … model.input_variableN, model.target}.

Figure 4. ChatGPT-aided classification workflow for QoS estimation using Neo4j and ChatGPT:

(1) modeling; (2) network model; (3) CC value; (4) prediction problem model; (5) ChatGPT prompt;

(6) cypher queries; (7) data import and graph construction; (8) GDS classification query; (9) predictions.

A GUI-enabled modeling tool was automatically generated within the Eclipse inte- grated development environment (IDE) based on our EMF meta-models: (1) the prediction problem representation [22] (illustrated in a customized, higher-level form in Figure5), and (2) the network plan model [16]. Apart from the network infrastructure and envi- ronment details described in [16], the user also has to provide the following information required for data import and ChatGPT-aided Neo4j query generation: (1) the path of the comma-separated value (CSV) dataset file, (2) selection of the columns from the CSV files to be considered, and (3) identification of the input and output (target) variables for the selected columns. After that, Python script, relying on the PyEcore [31] library for en- abling Ecore model support in the Python programming language, was used in order to extract the required parameter values from the user-created model. Furthermore, in order to construct the dataset, the CC was calculated using the previously derived expression relying on graphics hardware, as it significantly reduces the execution time thanks to loop parallelization compared to the CPU-only approach [32].

The parameters were further leveraged in order to parametrize the prompts that were sent to the ChatGPT service using the script in Figure3. The outputs of this Python script were the following: (1) a cypher query for CSV data import into Neo4j (structured as in Row 1 in Table3); (2) a Neo4j procedure call for the generation of a corresponding graph database based on the provided CSV (structured as in Row 2 in Table3); (3) a Neo4j call to the GDS library for the training of the desired QoS estimation model (Row 3 in Table3). The patterns for each of the prompts that were used for code generation are given as follows:

Referensi

Dokumen terkait