extfieldsofstudy:
Physics
Computer Science

text:
Research on the Importance of Data Enhancement Technology in Power Document Understanding

With the rise and development of the Internet and the artificial intelligence boom, natural language processing has been greatly developed in various fields and industries, including power industry. Intelligent document understanding, as a sub field of natural language understanding, uses artificial intelligence technology to enable machines to have natural language understanding ability. It has always been the focus of researchers and industry, and it is also the core problem of intelligent semantic interaction. As a common method to expand the sample set, data enhancement technology is an important text and image processing technology. Its core purpose is to use limited data and produce value equivalent to that from much more data. This technology has been widely used in various fields of deep learning. This paper reviews the development of data enhancement technology, lists and discusses five kinds of text enhancement technology paths and their corresponding representative technologies, including back translation, random word replacement, non core word replacement, text enhancement based on context information, and text enhancement technology based on generative language model. It also analyzes the effectiveness of text enhancement technology in the aspects of regularization, transfer learning, improving model robustness, manifold and so on, to achieve the goal of improving the accuracy and effectiveness of document understanding in power industry.

Introduction
A great deal of data resources have been accumulated in the power field, including relevant standards and specifications, product and technical documents, management documents, fault resolution records, etc. How to search these documents quickly and intelligently is of great value to the operation, maintenance and fault recovery of power equipment. As far as language modeling tasks are concerned, common data enhancement methods include methods based on external data and random sampling methods based on Recur-Rent Neural Network LM [1][2]. Literature [3] points out that the foundation of realizing multi-objective optimization control of smart grid is the establishment of basic measurement and dynamic monitoring system, so smooth power system monitoring data is the key technology of establishing wide-area information sharing and wide-area measurement protection [4][5], and it is also the fundamental guarantee of realizing smart grid strategy.
The information retrieval system based on keywords has mature architecture design, sufficient theoretical basis, easy understanding in retrieval logic and mode and intuitive acceptance by users. In this paper, the discrete sequence generation problem is expressed as a reinforcement learning problem [6], and the generation model is regarded as a random parameterization strategy, and the output of the 2 discriminant model is used as a reward to optimize it, thus avoiding the problem that it is difficult to return the error gradient between the discriminant model and the generation model. By analyzing the importance of data enhancement technology in power document understanding, this paper studies and summarizes its influence rules, with a view to providing effective guidance for improving power system acquisition process and data processing methods.

A data enhancement algorithm based on RNN LM
Data enhancement technology is mainly used to improve the visual effect of images and improve the clarity of images. Or transform the image into a form more suitable for human or machine analysis and processing, so as to extract useful information from the image. The tourism domain knowledge base is constructed based on ontology technology, and the implicit and ambiguous information between concepts can be discovered through logical reasoning, and the implicit semantic association within domain resources can be discovered to realize intelligent search [7]. In this process, semantic matching is not carried out, and whether the query keywords submitted by users are semantically related to the results is not considered. On the basis of current reports and statistical analysis, it provides deeper semantic analysis and intelligent analysis query, explores the relationship between data, and establishes the semantic ontology model of data, which can better assist users' daily work and support power grid dispatching operation business.
The goal of RNN LM is to predict the conditional probability of each word in a given word sequence.
Given a training sentence RNN LM encodes the input word sequence as the hidden layer state sequence according to the following formula: is the trainable parameter,  represents the nonlinear activation function, and then a series of conditional probability distributions are obtained by using the hidden layer state sequence of the current word 1  t w under the given historical sequence t w w w , , , 2 1  , and e represents the soft-max activation function. MLE algorithm is usually used to estimate RNNLM parameters, that is, to maximize the logarithmic probability of a given training sequence The storage of knowledge retrieval follows such an implementation process that the system classifies the input resources in terms of knowledge (concepts) instead of keywords, and then analyzes them in semantic level through natural language processing technology, so as to obtain the related concepts and knowledge categories of the resources, and finally stores them in the knowledge base for retrieval. Calculating the instability of signal is to strengthen the edge of ultrasonic signal from a statistical point of view. Its most prominent advantage is its low sensitivity to noise and high accuracy of edge detection.

Back translation
The common practice of back translation practice is to translate a foreign language into the translator's native language first, and then translate it backwards. Feedback information can regulate and control the behavior of actors. Without feedback information, learning will be terminated and the original connection will be degraded. Facts have proved that the effect of timely feedback is better than that of delayed feedback. Such as self-study ability, understanding ability, abstract thinking ability, practical ability, observation ability, ability to analyze problems and solve problems. In the field of power dispatching, it is more necessary to retrieve structured data, especially around the power grid equipment, and search the model data of the power grid equipment, such as equipment operation data, management data and so on. If a keyword appears many times in a document, that is, it appears frequently, it can also be considered that the document has a high degree of correlation with keywords. In recent years, scholars at home and abroad have designed a series of new methods to calculate the correlation degree, which can improve the retrieval accuracy in the retrieval system.

Random word substitution
In the process of text classification, the dimension of text feature vector is too large, which leads to large storage space and slow processing speed, which will bring great overhead to training and classification time Secondly, in fact, a large part of these words have nothing to do with categories and have little effect on classification.
represent the feature vector value of the keyword. Random word replacement technology can include some keyword information into the training text feature space, and effectively use the keyword information in the text classification process to improve the performance of the classification system [8]. If the proper partial order relation is defined on the set of part-of-speech markers, then the part-of-speech marker string (hereinafter referred to as marker string) is a sequence with order characteristics. We can use random word replacement technology to reduce the dimension of text feature space, and map the text to a set of conditional probability vectors of keywords.
The new text feature space can well cover the information of text keywords.

Non-core word substitution
In view of the acquisition of polysemous words with high frequency, there is a view that paying attention to non-core word replacement is an effective strategy in the cognitive process of polysemous words, which can enable learners to guess the diffraction meaning of polysemous words more accurately and quickly according to the context, and can also strengthen learners' long-term memory of the diffraction meaning, thus improving the effect of incidental vocabulary acquisition. Emphasis does not require a component to be graded when enhancing its meaning (but not its degree). However, when the emphasized components can be graded, adverbials play the role of reinforcement. Incidental learning and explicit learning are complementary to each other. Especially for the acquisition of non-core word replacement of high-frequency words, the combination of the two learning methods is more conducive to promoting the development of vocabulary knowledge of high-frequency words. These words are mainly used to reinforce adjectives and verbs. For the convenience of the following description, the reinforced adjectives are divided into two categories: A adjectives with absolute meaning (including extreme words and words with negative meaning); B is a large number of other graded adjectives.

Text enhancement based on context information
In Web information retrieval, there are usually two different retrieval tasks: known web page location and unknown information query, while the task of "unknown information query" is that users want to find information about a certain topic, but they are not sure whether this information exists or not. Users are concerned about whether the content of the web page is related to the information they want to query. Since such a context is not a natural context, we call it a special context. For example, through Google Academic, DBLP, Pub Med, etc., it can match any information in the abstract, but IR can't solve the problems of identifying information types, replacing synonyms of keywords, and defining hierarchical relationships among keywords.
There is no doubt that text enhancement based on context information can be regarded as a special problem of text classification, which can distinguish whether the views expressed in natural language of text are positive positive appreciation or negative negative criticism. Usually, the link text of a webpage can express the theme of the webpage centrally and accurately, and even many link texts are the URL address of the webpage, which is consistent with the requirements of the webpage positioning task.
It is assumed that the short text is described by the attribute value   m c is against. The classification decision for the short text to be classified is [9]: Among them, the calculation of   c w P i adopts the Multinomial model. By correctly estimating   c P and   c w P i values, the emotional polarity of short texts to be classified is discriminated IE text mining benefits from the structured representation of information, which can provide semantic extraction syntax and transform unstructured information into structured information with the help of templates or preprocessing operations. However, the extraction relies on file scanning, and its efficiency is low. Theoretical analysis shows that under certain conditions, the text enhancement method based on context information based on domain attribution division can reduce both sampling error and approximation error [10].

Text enhancement technology based on generative language model
Machine learning generally refers to the process of transforming one language into another by using computers. Machine learning has been studied for more than half a century. Soon after the invention of computer, many scientists and inventors successively put forward the theoretical and practical plans or ideas of machine learning. The formation process of language concept is usually from fuzzy, global semantics to precise, local semantics, thus determining the complete semantics. The basic idea of statistical machine learning method based on source-channel model is to regard machine learning as a process of information transmission, and the information passing through the channel means that the information has been translated. Because the optimization is carried out at the semantic level, the conditional body mainly judges the same or different semantic information of predicates, parameters and modifiers of two adjacent predicate expressions, such as semantic classification code and semantic roles.
The results show that the increase of language model training corpus can steadily improve the effect of machine translation. However, the position and role of these semantic components in sentences and the corresponding vocabulary and other linguistic information in the generated texts in different languages are still undecided. The basic characteristic of this process is that it is a function of time, but the value observed at any moment is uncertain and a random variable. Grammar resource mapping is to determine the position of semantic components that identify sentence content in sentences according to the characteristics of grammar resources in different languages. However, the construction of semantic language model is much more complicated, and it does not show better performance than N meta-language model in many natural language processing tasks, so N meta-language model is the most widely used statistical language model at present.

Syntactic rules based on complex feature sets
The position of each word in different sentence patterns may be different. According to the fitting degree between the application system and the model, the advantages and disadvantages of the language model are evaluated. Firstly, the short text to be tested is classified into suitable fields; Secondly, the corresponding intra-domain emotion discriminator is used to classify and judge, and the judgment result is output. The embedded patterns such as PAT array and prefix-suffix index structure store the text content and position information together, and BWT algorithm is used to compress the index to reduce the storage space. This kind of method has poor dynamics and is not ideal for dealing with long text indexes.
An important task of the query analysis module is to expand the search keywords submitted by users based on ontology. The method used in this paper is to expand the semantics through ontology knowledge base, and the core algorithm is the semantic similarity calculation model. In order to fully describe the implementation process of semantic expansion of search conditions in ontology-based smart grid knowledge retrieval system, the related processing flow of semantic expansion involved in this paper is described as follows. Figure 1 shows the main flow of this semantic extension. Figure 1 Ontology-based semantic extension process The user response module accepts the input of the user's search request and sends the user's search request to the query analysis module. The query analysis module needs to establish an ontology-based semantic similarity calculation model in advance and set a reasonable semantic similarity threshold, so as to ensure that the extended keyword set is screened by semantic similarity.
The complex feature set used in the system is the set of the following Values stics, Characteri pairs: In which A is a complex feature set and The module of obtaining sentences refers to how to segment a sentence. Sentences can be divided into three levels, in which words constitute the smallest unit of sentences, words constitute phrases, and the next level of phrases is the smallest translation unit. For example, scheduling management class, power grid operation class, equipment model class, etc., then the classified index files are merged, and Lucene can improve the index efficiency in the process of creating index by using the hardware resources of the machine. At the same time, the influence of prefix subsequence in the generated sequence on the generation of subsequent entries is also considered, and the unstructured information of the extracted objects is segmented to identify named entities. Using the knowledge model and the context relationship of entities, the types of entities are identified. Entities are extracted and then stored in the entity library.

Performance enhancement method based on domain attribution division
The text emotion polarity classification method based on domain attribution division is modeled as a two-stage processing process: the first stage (inter-domain attribution classification process): determining the domain to which the short text to be processed belongs; The second stage (intra-domain emotion discrimination process): emotion discrimination is performed on the short text to be processed by the classifier in the corresponding domain. Word features and position information are stored separately in the separation mode. For example, the posting file with inverted index records the position information in the text where the word is located separately, which takes up about 3.0 ~ 4.0 times of dictionary information. The traditional method of filtering and querying through each functional module is not only inefficient in querying, but also requires a lot of labor time. Therefore, the intelligent retrieval technology of power grid dispatching knowledge base can improve the retrieval efficiency and accuracy of power grid dispatching management system.
In the test, semantic search will be converted into SPARQL language of RDF for query, and keyword search will be converted into SQL statements containing Like keywords for query. Full-text index search of Like keywords can be performed by using a database supporting full-text search (see Figure 2 and Figure 3).   Figure 3 Recall rate On the whole, semantic search can meet the search needs of more users, and achieve higher precision. It can combine fields to customize and analyze complex query conditions.
In the course of confrontation training, the selection of superparameters is very important to the performance of the finally generated model. In this process, due to clock jitter, phase-locked error and signal transmission delay, the random disturbance of synchronous sampling signal is caused, which makes the sampled data contain noise caused by phase jitter, and the phase noise is different from white noise. Because all personnel information can be semantically analyzed in advance and semantic tags can be added, this type of semantic search can be supported. This type of keyword search has no return results, so the search rate is 100%.

Summary
The safe operation of power grid system needs the important guarantee of power facilities. If the power equipment is damaged, it will bring trouble to people's lives, and even affect the economic development and social stability and harmony. Different from the traditional generation task, in the language model enhancement task, it is necessary to ensure the diversity of generated text data, even if the generated model maintains a certain generalization performance. Data enhancement technology can not only effectively improve the generalization ability of neural machine translation for languages with poor resources, but also improve the translation quality for languages with rich corpus. Power document understanding is a complex project, and there are still many technical challenges in each link. This paper only gives some preliminary ideas and methods. If we want to achieve efficient and accurate automatic knowledge extraction, we need to combine natural language understanding, deep learning and other related technologies.


Uzbek Cyrillic-Latin-Cyrillic Machine Transliteration

In this paper, we introduce a data-driven approach to transliterating Uzbek dictionary words from the Cyrillic script into the Latin script, and vice versa. We heuristically align characters of words in the source script with sub-strings of the corresponding words in the target script and train a decision tree classifier that learns these alignments. On the test set, our Cyrillic to Latin model achieves a character level micro-averaged F1 score of 0.9992, and our Latin to Cyrillic model achieves the score of 0.9959. Our contribution is a novel method of producing machine transliterated texts for the low-resource Uzbek language.

Introduction
The Uzbek language is a low-resource language, with two currently active writing systems -Cyrillic and Latin. Publicly available data for Natural Language Processing (NLP) is either in the Cyrillic script or in the Latin script, but rarely in both, if ever. The progress of NLP in the language is partly hindered by this very fact. For example, in order to build a language model, we can only utilize a subset of the available data because of the writing system of our choice. One way to solve the data scarcity issue is to transliterate available data from one writing system to the other. Arbabi et al. 1994 describe transliteration as the process of formulating a representation of words in one language using the alphabet of another language. Alam and ul Hussain 2017 think of transliteration as converting texts written in one alphabet of a language into another alphabet of the same language. In this paper, we adopt the latter definition and tackle the issue of converting Uzbek words written in Cyrillic into words written in Latin, and vice versa. To the best of our knowledge, no such publicly available work has been done before.

Goals of the Paper
The goal of the paper is to present a data-driven approach to transliterating Uzbek words written in the Cyrillic script into the same words written in the Latin script and do the conversion in the opposite direction. For example, we want to build a model that can transliterate цирк (circus) in Cyrillic into sirk in Latin; and another model that is able to transliterate sirt (surface) in Latin into сирт in Cyrillic. As is evident from these examples, the task is not trivial because s in Latin can be transliterated as either ц or с in Cyrillic, without any apparent conversion rules. We show that, using a parallel orthography dictionary, we can correctly transliterate many words. We also discuss various ways of further improving our proposed approach.

Previous Work
Machine transliteration has been studied in the literature extensively. Arbabi et al. 1994 tackle the issue of transliterating Arabic names into English using a combination of neural networks and rulebased expert systems. Knight and Graehl 1997 use weighted finite-state acceptors and transducers to transliterate English words written in Japanese (katakana) back into English. Both papers employ phonetic representation of words to achieve their goals. In transliterating names from Arabic into English, Al-Onaizan and Knight 2002 present a spelling-based model using finite-state machines and achieve better results than the earlier state-of-the-art phonetic-based models. Deselaers et al. 2009 introduce deep belief networks to transliterate Arabic names into English. Although their results were interesting, their model was not as competitive as the state-of-the-art models. Alam and ul Hussain 2017 create a sequence-to-sequence model with three layers of long short-term memory (LSTM) based encoder and decoder to transliterate Roman-Urdu words to Urdu and achieve Bilingual Evaluation Understudy (BLEU) score of 48.6 on the test set. Le and Sadat 2018 use recurrent neural networks (RNNs) to transliterate words between French and Vietnamese using their phonetic representation.
Najafi et al. 2018 do a comparative study of different transliteration methods on NEWS Shared Task on Machine Transliteration and find that "… on average, the neural models perform better than other systems, and that a combination of neural and non-neural models further improves the results".
Most works in the literature deal with a somewhat difficult task of transliterating words from one language into another. In this paper, our task is relatively simple as we only deal with a single language -Uzbek. Our solution is also simple and unique (as far as we know) with promising results.
Although conversion rules from Cyrillic into Latin exist, information is irrecoverably lost during conversion. For example, октябрь (October) in Cyrillic is transliterated as oktabr in Latin. Notice how the Cyrillic letter ь has no equivalent in Latin -it just does not exist in the converted text. If we follow an imaginary letter-by-letter Latin to Cyrillic conversion rule, we will end up with an incorrect transliteration of oktabr in Latin into октабр in Cyrillic, which has one wrong and one missing character from the correct transliteration: октябрь.
The orthography rules based on the Cyrillic script were approved on April 4, 1956, while the rules based on the Latin script were approved on August 24, 1995 [Togʻayev et al. 1999]. A new effort to improve the existing Latin alphabet started in 2018 1 . Here are some of the differences between the two orthography rules: • In Cyrillic many loanwords are written according to their spelling in the foreign language, but in Latin they are written according to their pronunciation: октябрь → oktabr (October), ноябрь → noyabr (November), бюджет → budjet (budget). • When the Cyrillic letter ц appears as the first or last letter of a word, it is written as s in Latin: цемент → sement (cement) and шприц → shpris (syringe). Inside a word, when ц appears after a vowel, it's written as ts, but when it appears after a consonant, it's written as s : доцент → dotsent (Associate Professor), лекция → leksiya (lecture). • When the suffix га is added to words ending in the sound ғ, in Cyrillic both г and ғ change to қ, while this change does not happen in Latin: боғ+га=боққа → bogʻ+ga=bogʻga (to the garden). • Particles appearing as a conjunction between words are written with a hyphen in Latin: фикру ёд → fikr-u yod (thought and memory). • In Latin, a hyphen is written after numbers indicating dates: 2020 йил, 20 ноябрь → 2020-yil, 20-noyabr (November 20, 2020).
In the next section, we describe our approach to learning these rules from data. When talking about Cyrillic to Latin transliteration, we refer to Cyrillic words as source words, and to Latin words as target words. Similarly, when talking about Latin to Cyrillic transliteration, we refer to Latin words as source words, and to Cyrillic words as target words.

Approach
We solve the problem of transliteration by splitting the source word into individual characters and aligning these characters with zero or more characters of the target word. For a given source character, we create a vector that consists of its surrounding characters. Then we train a decision tree classifier using these vectors as features and the source characters' corresponding target characters as classes. We choose the best model and its hyperparameters based on the micro-averaged F 1 score on the validation set. Let us discuss our approach in detail below.
Transliterating a source word can be viewed as transliterating individual letters of the word so that the resulting characters put together forms the target word. We hypothesize that a letter along with its surrounding letters in a word carries enough information to be transliterated correctly. In order to test our hypothesis, first, we align each letter of the source word with zero or more letters of the target word. For example, Table 1 shows one such alignment where the source word is қўзичоқ (lambkin) in Cyrillic. Notice how the source word is split into individual characters that align with both single (indices 0, 2, 3, 5, and 6) and double characters (indices 1 and 4) of the target word.
Index 0 1 2 3 4 5 6 Cyrillic source word қ ў з и ч о қ Latin target word q oʻ z i ch o q  Table 2 shows a similar alignment, but in this case the word in Cyrillic is the target word. Here again, the source word is split into individual characters, while the target word is split into zero (indices 2 and 5) or more (indices 0, 1, 3, 4, 6, 7, and 8) characters.
Index 0 1 2 3 4 5 6 7 8 Latin source word q o ʻ z i c h o q Cyrillic target word қ ў з и ч о қ A natural question arises: why do we have to split the source word into individual letters? After all, the Cyrillic letter ч is written as ch in Latin and not as h. One of the reasons is that some Latin letters consist of a single character (e.g., A), while others consist of two characters (e.g., YA). Splitting the source word at the individual character level makes training a model and using it to transliterate words easier.
Consider the word rayon (district) in Latin. Its alignment is shown in Table 3. Each Latin letter has a corresponding Cyrillic variant. Now consider a multi-character alignment of the word quyosh (the Sun) in Latin shown in Table 4. In this case the Latin characters y and o combine to make the Cyrillic letter ё. Rather than trying to identify whether two Latin characters align with one or two Cyrillic characters, we let our algorithm learn these mappings from data. The only thing we must do is to construct Cyrillic to Latin and Latin to Cyrillic mappings of characters.
Index 0 1 2 3 4 Latin source word r a y o n Cyrillic target word р а й о н Table 3: An alignment of rayon (district) in Latin with its Cyrillic equivalent.
Index 0 1 2 3 Latin source word q u yo sh Cyrillic target word қ у ё ш Table 4: An alignment of quyosh (the Sun) in Latin with its Cyrillic equivalent. Table 5 shows Cyrillic to Latin mappings and Table 6 shows Latin to Cyrillic mappings. We learn these mappings heuristically. From previous experience working with both scripts, we know that the Cyrillic letter Б always maps to the Latin letter B. In fact, we know that each of the 25 (out of 36) characters in Table 5 map to only one letter. We identify the remaining mappings by going over the words in the dictionary and trying to look up a mapping for each character from Table 5. If no such mapping exists, we manually examine the word in question and add the corresponding mapping to the table. That way we fill Table 5 with the remaining mappings. To fill Table 6, we repeat the above process with words in Latin as source words and words in Cyrillic as target words.
Once we have filled both tables, we loop over our data and create alignments like the ones seen in Table  1 and Table 2. In essence, our problem is now reduced to a multi-class classification problem: we have a finite number of source characters that map to a finite number of target strings and we need to figure out which source characters map to which target strings. Many algorithms such as a Naive Bayes or a decision tree classifier can be used to tackle this problem.
To train a classifier we start with an alignment and consider the source characters as features and their corresponding target mappings as classes. We gather all such features and classes and feed them - into our classifier. For example, we create seven data points (one for each letter) using the Cyrillic characters of the word қўзичоқ (lambkin).
Since not all characters map one-to-one to classes (as seen in Table 5 and Table 6), we also consider features consisting of the original character and its surrounding characters. For a given character in the source word, we create a vector of features consisting of X number of characters before it and Y number of characters after it. X and Y are the hyperparameters of our model. If a word is shorter than the desired number of preceding or subsequent characters, we pad the word with the ∅ (empty set) character. To give you an example, let the number of preceding characters be two, and the number of subsequent characters be one. The feature vectors and classes of the letters of қўзичоқ (lambkin) are shown in Table 7.
Feature 1 Feature 2 Feature 3 Feature 4 Class Table 7: Feature vectors and classes of the letters of қўзичоқ (lambkin) with two preceding and one subsequent character.

Data
The words in Cyrillic and their Latin variants used in our experiments are taken from an Uzbek Cyrillic to Latin spelling dictionary [Togʻayev et al. 1999]. The dictionary, first and foremost, includes widely used words in the contemporary Uzbek literary language. Its authors tried not to include words that are straightforward to spell or words whose derivational affixes are simple. However, words that are prone to spelling errors are included in the dictionary.
The dictionary consists of 13,855 entries, and it does not include abbreviations, acronyms, proper nouns, or words with morphological inflection (except for a few cases). After removing multi-word phrases and entries with punctuation marks, we are left with 12,418 words. These words are shuffled randomly and split into three sets: 9,499 words for training, 1,677 words for validation, and 1,242 words for testing.

Experiments
We experimented with a Naive Bayes and a decision tree classifier. Our model based on the decision tree classifier had the highest scores. We think that the naivety assumption of the Naive Bayes classifier prevented the model from learning important letter sequences. On the other hand, the decision tree classifier is learning these sequences of letters due to our features being sequential too. We are not worried about overfitting because changes in language happen over time and the number of words and affixes are limited in the short term.
We used scikit-learn's 2 implementation of the decision tree classifier with the default parameters 3 to carry out our experiments. In order to find the best hyperparameters, we created feature vectors consisting of a combination of zero to ten preceding and subsequent characters. For each combination of hyperparameters we converted the train, validation, and test datasets into feature vectors and classes. We also removed duplicate data points (within datasets) from all datasets. We then trained and picked our best models based on the character level micro-averaged F 1 scores on the validation set.

Results
The hyperparameters of our best models are shown in table 8. To briefly explain our Cyrillic to Latin model, it works best when, in addition to the letter that is being transliterated, it has access to two previous and three subsequent characters of the word. For example, in order to transliterate the Cyrillic я in октябрь (October) into the Latin a (and not ya), the model makes the best decision when it knows the two preceding letters кт and the three subsequent letters брь.
# of preceding characters # of subsequent characters Cyrillic to Latin model Latin to Cyrillic model 2 4 3 3  Table 9: Character level scores of our best models on the test set.
Tables 10 and 11 show the words that our classifiers made a mistake on. Both models are making these errors because of the lack of similar data in training. For example, there is only one word that contains the letters фью in our dictionary, and that word only appears in the test dataset. That is why our model was not able to correctly transliterate the word фьючерс (futures).

Discussion
In this paper, we shared our attempt at building a transliterator of Uzbek dictionary words from Cyrillic to Latin, and vice versa. Our models achieve remarkably high character level micro-averaged F 1 scores on the test set. However, our training data consists of only lowercase words, and it does not include running texts, abbreviations, acronyms, proper nouns, words with morphological inflection (except for a few cases), words consisting of all capitals (as in headlines), other types of words not mentioned here, or punctuation marks. It would be interesting to see how our approach handles these additional types of data.
To build a production quality transliterator, we also need to take user input inconsistencies into account. For example, the Latin letter oʻ is often written in one of the following forms o', o`, ó, oʻ, and o', only one of which is correct. Cleaning and fixing user input before feeding it into the transliterator may be necessary. Even then, our transliterator will not produce perfect results. In such cases analyzing and correcting the output of the transliterator using a high-quality language model may help.

Acknowledgements
We would like to thank N. Mansurov for manually verifying and fixing our training, validation, and test datasets.


5G D2D Transmission Mode Selection Performance&Cluster Limits Evaluation of Distributed Artificial Intelligence and Machine Learning Techniques

5G D2D Communication promises improvements in energy and spectral efficiency, overall system capacity, and higher data rates. However, to achieve optimum results it is important to select wisely the Transmission mode of the D2D Device to form clusters in the most fruitful positions in terms of Sum Rate and Power Consumption. Towards this end, this paper investigates the use of Distributed Artificial Intelligence (DAI) and innovative to D2D, Machine Learning (ML) approaches to achieve satisfactory results in terms of Spectral Efficiency (SE), Power Consumption (PC) and execution time, with the creation of clusters and backhauling D2D network under existing Base Station/Small Cell. Additionally, one of the major factors that affect the creation of high-quality clusters under a D2D network is the number of the Devices. Therefore, this paper focuses on a small (<=200) number of Devices, with the purpose to identify the limits of each approach in terms of number of devices. Specifically, to identify where it is beneficial to form a cluster, investigate the critical point that gains increases rapidly and at the end examine the applicability of 5G requirements. Additionally, prior work presented a Distributed Artificial Intelligence (DAI) Solution/Framework in D2D and a DAIS Transmission Mode Selection (TMS) plan was proposed. In this paper DAIS is further examined, improved in terms of thresholds evaluation, evaluated, and compared with other approaches (AI/ML). The results obtained demonstrate the exceptional performance of DAIS, compared to all other related approaches in terms of SE, PC, execution time and cluster formation efficiency. Also, results show that the investigated AI/ML approaches are also beneficial for Transmission Mode Selection (TMS) in 5G D2D communication, even with a smaller (>=5) number of devices as a lower limit.

I. INTRODUCTION
Device-to-Device (D2D) Communication is expected to be a contributing factor in achieving the demanding requirements of 5G Mobile Communication Networks [1], [2]. The main reasons are that D2D communication is not constrained by the licensed frequency bands and that it is transparent to the This research is part of a project that has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement Nº739578 and the government of the Republic of Cyprus through the Directorate General for European Programmes, Coordination and Development. cellular network. Also, it permits adjacent User Equipment (UE) to bypass the Base Station (BS) and establish direct links between them, either by sharing their connection bandwidth and operate as relay stations, or by directly communicating and exchanging information. For the aforesaid reasons, D2D can improve spectral efficiency, data rates, throughput, energy efficiency, delay, interference and fairness [2]- [5].
However, in order to achieve optimum results, it is important, among others, to select wisely the Transmission Mode of the D2D Device in order to form clusters in the most fruitful positions in terms of Sum Rate and Power Consumption. The main reason is that the Transmission Mode selection for a device can affect the creation of the clusters, the way data will be communicated between the D2D Devices, and it can also optimize backhauling links between disconnected/disjointed clusters by forming better paths.
Additionally, for higher Sum Rate (Total Spectral Efficiency) and reduced total Power Consumption there are factors that affect the quality of Cluster forming in D2D. The major contributing factors in the successful realization of a D2D cluster under a network are the following: i) number of devices; ii) backhauling Data Rate achieved by a link; iii) position of Cluster Head (CH); iv) Data Rate of CH; and v) QoS & QoE. In this paper the factor of number of devices is examined in terms of limits evaluation, in the direction of the small number of devices network. Also all factors are examined for the investigation approaches.
Towards this end, our previous work [2] proposed: i) a BDIx (BDI extended) agents based Distributed Artificial Intelligence (DAI) Framework that can achieve D2D communication in an efficient and flexible manner by focusing on the local environment rather the global environment. A BDIx agent is an agent that has Believes (i.e., knowledge about the environment), Desires (i.e., it has some objectives to achieve) and Intentions (i.e., objectives that are currently executed through selected plans). Note that the Desires of a BDIx agent, and thus its intentions, can change with the raising of an event (i.e., a new D2D Device entering the Mobile Network). More specifically, an event may update believes, trigger plans or modify goals (believes) and intentions. With the examined approach the BDI agents concept is extended, by utilizing AI techniques (e.g., Fuzzy Logic, Deep Learning Neural Networks etc) to form the agent Believes; ii) an autonomous and intelligent Transmission Mode selection approach, called "DAIS", to be executed as a plan of DAI Framework towards the Intention (realized from Desire) of selecting the transmission mode of the D2D Device (in the event of "entering the Mobile Network"), in a distributed, flexible and efficient manner.
In this paper, the efficiency of DAIS is further examined, evaluated, and compared with other related approaches, like Distributed Random, Sum Rate Approach, Centralized non-D2D-UE (shown in [2]) and other, currently introduced to D2D and Transmission Mode Selection Artificial Intelligence/Machine Learning (AI/ML) techniques (i.e., FuzzyART [6], [7], DBSCAN [8], [9] and MEC [10], [11]) in a 5G D2D communication network with a reduced number of devices (<= 200 UEs/D2D candidates). Note that FuzzyART, DBSCAN and MEC are centralized unsupervised learning clustering techniques that, for the purposes of this research, we utilized for D2D communication. These approaches do not require a learning process in order to be used in the D2D communications and they provide good clustering results. The underlying reasons for selecting unsupervised learning clustering techniques are the following: i) the Transmission Mode Selection is directly associated with the selection of best Cluster Head, therefore the clustering techniques must be used; and ii) due to the dynamic nature of mobile communication network the training part of supervised learning can not conclude to the best results because of the devices movement and due to the fact that in D2D communication the best data are the current data.
For assessing the efficiency of the DAIS approach, threshold values affecting spectral efficiency and power usage of the network, like the Weighted Data Rate (WDR) and the Battery Power Level (see Section III) of the D2D Device, have been employed. In addition, those achieving strong performance have been determined. The effect of the Transmission Power (TP) variation of each Device on the investigated approaches, in terms of total Spectral Efficiency (SE), Power Consumption (PC) and Execution Time (ET) was also examined. This investigation focuses on D2D communication network with a small number of devices for the following reasons: i) applicability of 5G requirements; ii) investigate the critical point that gains increases rapidly; iii) coverage expansion; and iv) find the limits of the approaches.
The results obtained demonstrate that with the right tuning of the thresholds, DAIS could provide significant improvement in the network. Furthermore, from the results obtained from the comparison of the investigated approaches it was observed that DAIS outperforms all other approaches, except Sum Rate Approach, in terms of total SE and total PC. The reason that Sum Rate Approach achieved better results than DAIS is because Sum Rate Approach has a global knowledge of the network and thus can select the best transmission mode. Even so, DAIS approaches the performance of the Sum Rate Approach, acting on only local information. In addition, it was observed that Transmission Power (TP) alteration of the D2D Devices with a small number of UEs (<=200) can affect SE and PC for all investigated approaches.
The rest of the paper is structured as follows. Section II provides some background information and related work associated with transmission mode selection approaches. Section III presents the problem that this paper tackles and provides some specifics about the investigated approaches. Specifically, the implementations, assumptions, constraints, thresholds and metrics utilized are provided. The efficiency of the investigated approaches, is examined, evaluated and compared in Section IV. Finally, Section V contains our Conclusions and Future Work.

A. Background Knowledge
This section provides background knowledge regarding the main characteristics of D2D communications. More specifically, the types of control that can be exploited for the establishment of D2D communication links, as well as the types of transmission modes that a D2D Device can operate, are outlined in this section.
1) Types of Control in D2D Communication: The types of control that can be used for the establishment of D2D Communication links can be categorized as follows: i) Centralized: The Base Station (BS) completely oversees the UE nodes even when they are communicating directly; ii) Distributed: The procedure of D2D node management does not oblige to a central entity, but it is performed autonomously by the UEs themselves; iii) Distributed Artificial Intelligence (DAI): All control processes run in parallel and begin at the same time through collaboration in an intelligent manner; and iv) Semi distributed/hybrid: A mix of centralized and distributed schemes.
2) Types of Transmission Modes in D2D Communication: The different transmission modes in D2D Communication are the following: i) D2D Direct: Two UEs connect to each other by utilizing licensed or unlicensed spectrum; ii) D2D Singlehop Relaying: Contribution of bandwidth between a UE and other UEs [12]. One of the D2D UEs is connected to a BS or Access Point and provides access to an additional D2D UE; iii) D2D Multihop Relay: The single-hop mode is extended by empowering the connection of more D2D UEs in chain. This chain can be one to one relationship or one to more [13]; iv) D2D Cluster [14]: D2D Cluster is a group of UEs (D2D Devices acting as clients) connected to a D2D relay node performing as a Cluster Head (CH) [15]; and v) D2D Client: D2D Client is the selection of UE to participate in a D2D Cluster and act as client.

B. Related Work
This section provides a brief description of the DAI Solution/Framework along with its Desire Plan DAIS together with Sum Rate and Distributed Random algorithms that perform Transmission Mode Selection as shown in [2]. Additionally, this section provides information regarding FuzzyART, DB-SCAN, and MEC unsupervised learning Machine Learning (ML) clustering techniques, and other related approaches from open literature on Transmission Mode selection in D2D Communication. It is important to highlight here that the aforesaid AI/ML techniques were not designed for application in D2D communication but they are utilized and applied to D2D communication by us, for the purposes of this research, due to their scalability, metric used, parameters and way of calculation of labels of clusters.
1) Distributed Artificial Intelligent Solution/Framework: In this section, the paper explains in brief the DAI Framework that as concept it was introduced in the [2]. The main objective of the DAI framework is to implement 5G D2D communication with the purpose to achieve the D2D challenges (as shown in [2]). By enabling D2D UEs through BDIx agents that instantiate through BDIx framework, the investigation aims for the devices to act independently, autonomously and as a self-organizing network. More precisely, in order to achieve the aforementioned characteristics, the framework it utilizes software agents and especially BDI (Belief-Desire-Intention) agents with extended Artificial Intelligence/Machine Learning capabilities (ex. Neural networks, Fuzzy logic) named as BDIx Agent. The framework acts as a glue in the employment of more than one of successful, optimized intelligent technologies (e.g. Neural Networks, Fuzzy Logic). Therefore, the BDIx framework will be modular and the believes and desires can be substituted, added by any proposed approach that will have as target to achieve the D2D communication in 5G, as long the stability of the agent is achieved. Additionally, such agents in the framework can be implemented at the UEs as a software and there is no need to change how BSs operate or to change the hardware at BSs or UEs.
In this paragraph we will show the inner workings of DAI Framework, how it achieves D2D communication in 5G. More specifically, the DAI Framework utilizes the networks events (i.e. Device entering in a D2D network) and thresholds (Data Rate is acceptable by the user) that are derived from the Desires and an agent must monitor in order to achieve the tasks of implementing 5G D2D communication. More precisely, the events and thresholds can trigger the Desires to become Intentions with the use of priority values (from 0% to 100%). For the aforementioned task the Fuzzy Logic (FL) is used as the Plan library in order to assign priority values to Desires (the framework can let 10 concurrent intentions to run at the same time). Additionally, the DAI Framework flowchart of execution of the BDIx agents, supports queue of running Intentions that are realised from Desires with priority value of 100% (as shown in the Figure 1). Also, at the Intentions there are assigned Plans that act as algorithms for the purpose to achieve the selected Desires.
The Believes represent the understanding of the agent or the environment around. The events are actively affecting the Believes and then Desires are converted to Intentions and satisfied based on the affected Believes. The events can be prespecified with the declaration of thresholds. These thresholds, if exceeded, can raise events at the event system Plan Library (FL). The set of Believes in terms of D2D communication that a BDIx agent can use, that are derived from the D2D  Thus, the DAI Framework can achieve D2D communication by focusing on the local environment rather than the global environment with the use of LTE Proximity Services (LTE ProSe). The plan that this research investigates is DAIS as shown in the [2] and is executed in the network event of "D2D Device entering in D2D communication network".
2) DAIS, Sum Rate Approach and Distributed Random [2]: DAIS is a distributed, autonomous and intelligent Transmis-sion Mode Selection approach, implemented in a BDIx agent based DAI Framework, that selects the transmission mode of a D2D Device in a distributed artificial intelligence manner. More specifically, the DAIS approach exploits software agents and especially Believe-Desire-Intention (BDI) agents with extended Artificial Intelligence/Machine Learning (AI/ML) capabilities (BDIx), to select the transmission mode that will be used by a a new D2D Device. For the Transmission mode selection, the WDR (Weighted Data Rate), a new metric that we introduced in [2], is considered. Sum Rate Approach, is a distributed intelligent approach which uses the sum rate of the network as a metric for the UE Device to select the best Transmission mode. Note that in the Sum Rate Approach the D2D Device selects the most appropriate Transmission Mode by having all the knowledge of the network (i.e., D2D Relays, D2D Multi Hop Relays, D2D Clients, connection links). On the other hand, the Distributed Random approach is a distributed approach which performs Transmission mode selection in a random manner (e.g. the algorithm for Transmission Selection selects randomly a mode of the entering device).
3) FuzzyART [6], [7]: FuzzyART is an unsupervised learning algorithm that uses structure calculus based on fuzzy logic and Adaptive Resonance Theory (ART), for the purpose of pattern recognition and to enhance generalization. The FuzzyART consists of a comparison field and a recognition field composed of neurons, a vigilance parameter (threshold of recognition), and a reset module. The comparison field takes an input and transfers it to its best match to a single neuron whose set of weights most closely matches the input vector in the recognition field. Each recognition field neuron outputs a negative signal to each of the other recognition field neurons. Additionally, in FuzzyART the computation of choice function value consists of fuzzy "AND" operator. The aforementioned procedure allows each neuron in it to represent a category to which input vectors are classified. After classification, the reset module compares the strength of the recognition match to the vigilance parameter, if it has greater strength it adjusts weights, elsewhere the search procedure is carried out. The vigilance parameter has considerable influence on the system (e.g., more categories). So, FuzzyART provides a unified architecture for binary and continuous value inputs. The consequential number of clusters depends on the distances between the investigated elements that we want to cluster (this also depends on the metric chosen for the approach, i.e., Gaussian distance) amid all input patterns, introduced in the direction of the network for the period of training cycles. For FuzzyART the algorithmic complexity is of order O(N 2 )+O(MN), N being the number of categories, and M the input dimension. Because it can have maximum N x N recursive iterations and form clusters based on the period of training cycles (MN). 4) DBSCAN [8], [9]: The DBSCAN algorithm depends on a density-based concept of clusters, which is outlined to determine clusters of unacquainted shape. In DBSCAN, for each point of a cluster, the neighborhood of a prearranged radius has to enclose at least a minimum number of points (MinPts in DBSCAN). DBSCAN starts with an arbitrary starting point that has not been visited. Afterwards, the surrounding points, called neighborhood, are retrieved. If the examined point contains a sufficient number of points around it then a cluster is initialized and the identified neighborhood points are added in the cluster. Otherwise, the investigated point is labeled as noise, note that this point might be a part of another future examined cluster. This process continues until the cluster is completely found or unvisited points are retrieved and processed. The algorithmic complexity is mostly governed by the number of area Query requests. DBSCAN executes one area query for each point, in the case of utilization of indexing structure executing a neighborhood query, the resulting algorithmic complexity achieved to be O(N), where N is the maximum number of points that can be involved in the neighboring query. However, by taking under consideration all the cases an overall algorithmic complexity of O(N 2 ) is achieved.
5) Minimum Entropy Clustering (MEC) [10], [11]: The MEC algorithm proficiently minimizes the conditional entropy of clusters. By analyzing given samples consequently, at the end it concludes with the clusters. In MEC, the clustering criterion is based on the conditional entropy H(C|x), where C is the cluster label and x is an observation. MEC with Fano's inequality, C can be estimated with a low probability of error only if the conditional entropy H(C|x) is small. This algorithm utilizes mathematical facts, such as Havrda-Charvat's structural. The replacement of Shannon's entropy with Havrda-Charvat's structural α-entropy is selected for the purpose of achievement of the generalization of the clustering criterion, α-entropy indicates if the probability error is equal to the nearest neighbor method when α=2. Additionally, Fano's inequality and Bayes probability of error is utilized with the Parzen density estimation, a non-parametric approach. The method performs very well even when the correct number of clusters is unknown, with the utilization of maximum distance as input. It can also accurately reveal the structure of data and efficiently identify outliers simultaneously. However, this approach is an iterative algorithm initialized with a partition set by any other clustering approaches (e.g., K-Means) and random initialization should not be used. The resulting algorithmic complexity achieved is O(N 2 ), where N is the number of all points that can be involved in the neighboring query, in the formula the calculation of the entropy is included. However, by taking under consideration all the cases an overall algorithmic complexity of O(N 3 ) is achieved.

C. Related work on Transmission Mode Selection in D2D Communication
Approaches related to the Transmission mode selection investigated in this paper, are provided in a plethora of articles [2], [16]- [21]. The metrics considered for selecting the transmission mode to be adopted are: power, interference, resource blocks (RB), SINR, distance, power, frequencies and WDR. In the literature one can find approaches with a focus on: i) D2D Device Selection [16], [17], [22]; ii) Relay selection only [18], [19], [23]; and iii) D2D multi-hop relay forming by selecting as modes the D2D or D2D Multihop [20], [21]. In our work we are examining all of the possible transmission modes that can be assign to a UE, by itself (e.g. BDIx Agent) or by other entities (e.g. BS).
A classification on the related approaches based on the type of control (see Section II-A1) is: i) Centralized [16]- [18], [20], [21], where the decision is taken by the BS; ii) Semi-distributed approaches [22], where the decision is taken by both the BS and the D2D Devices in collaboration; iii) Distributed [19], where the decision is taken by the D2D Devices; however in this case the D2D Devices need some information from the BS; and iv) Distributed Artificial Intelligent (DAI) [2], where the decision is taken by each D2D Device independently; however, in this case they may share information with other D2D Devices.
It is evident from the above preliminary survey that most works use the Centralized approach and only a few use Semi or Fully Distributed algorithms. Additionally, we could not identify any other approach in the open literature that tackles the problem of having a D2D Device utilizing all transmission modes (D2D Relay, D2D Multi-Hop Relay and D2D Cluster) in a distributed AI manner. Furthermore, to the best of our knowledge, there is not any other D2D transmission mode selection approach in the literature that is utilizing unsupervised learning AI/ML clustering techniques. Therefore, the usage of unsupervised learning AI/ML approaches for the Transmission mode selection in D2D communication, is also a contribution of this paper.

III. PROBLEM FORMULATION
In this paper we aim to use DAI and ML in order for a D2D Device to select a Transmission Mode and create a D2D communication network with for the purpose to reduce the distance to the Access Point, reduced the latency, increase SE and reduced PC in a small (<=200) number of Devices D2D Network. The number of UEs examined is small, due to one of the major contribution of the paper, because we aim to calculate the investigated approaches lower limits in an environment of small number of devices in order to to show where is fruitfully to achieve cluster with drones, other relay devices and an operator should consider not change the topology of the network.Additionally, please note that similar problems,even with the same number of devices, are resolved with the use of small cells [24], [25]. Therefore, the problem that this paper tries to tackle is threefold: • It tries to maximize the total SE (i.e, sum rate) and reduce the total PC of the DAIS algorithm as well as the other investigated unsupervised learning AI/ML clustering techniques, in the case of a small number N of devices (<=200 UEs) under a BS. Therefore, this paper have the following constrains about the physical link: -The D2D network consists of N devices under the Base Station (BS) -Our approach focuses on the mobile and wireless networks with a single-antenna and point-to-point scenario -Our approach uses the Free Space Model and Free Space Path Loss -Our approach uses the Additive White Gaussian Noise (AWGN) as the basic noise model -The Transmission Power (TP) is known -The Spectral Efficiency is calculated per link More specifically, the following paragraph will show the equations used in order to do the problem formulation, the parameters description is shown in the Table I. Starting from Shannon-Hartley theorem, the spectral efficiency is shown in Equation 1, measured in (bits/s/Hz).
Therefore, with the use of the aforementioned model the spectral efficiency calculated from channel capacity is used with the power-limited and bandwidthlimited scheme and is indicated below in Equation 2 (SE/SE Link ), measured in (bits/s/Hz).
Also, the average received power (in W) is calculated asP , Transmission Power (TP) is known to the channel (TP), Power Consumption is shown in Equation 3, SNR is the received signal-to-noise ratio (SNR) and lastly the noise is N 0 (W/Hz).
Therefore, the problem is based on the Equations 4 and 5 which is the maximization of Total SE with as result the reduction of the Total PC. This is a NP-hard problem to solve (e.g. see [24]- [26]), this is the reason that a heuristic algorithm is implemented for the utilized ML algorithms.  With the implementation of DAIS and the use of BDIx agents, there are some assumptions, constraints, thresholds, and a new metric that are introduced. However, in order to show how the BDIx Agents framework can be optimized in terms of threshold investigation, only the "Weighted Data Rate" (WDR) 1 metric has been analyzed and utilized. Basically, the aim of the DAIS approach is to maximize the WDR (i.e., WDR = max(min(Link Rate))) for each path. In this paper an investigation of the DAIS thresholds is executed with the purpose to increase the Total SE and Total PC.
Additionally, a heuristic algorithm (see section IV) has been developed that utilizes the clustering results extracted by FuzzyART, DBSCAN and MEC approaches to select the best D2D Device in the identified cluster to be set as a D2D Relay node. Note that the metric used to perform the selection is the Data Rate (as described in Algorithm 1). Likewise, the feature set used for all the unsupervised learning clustering approaches is the same and it is the set composed with latitude and longitude (coordinate). Additionally, note that the aforementioned approaches does not form backhauling more than one hop and the selection of D2D Multi Hop Relay is not provided as selection option of Transmission Mode in the approaches.
It is worth mentioning that in order to apply the Fuzz-yART, DBSCAN and MEC approaches to the needs of D2D Communication, we utilized these approaches and set the constraints/settings set out below: • For all approaches, we set the maximum radius distance to form a cluster to 200 meters (WiFi Direct). • For FuzzyART we do not limit the maximum number of clusters allowed (maxClusterCount=-1). • For DBSCAN we set the minimum points (minPts) of the cluster to 2. • For MEC we set the number of clusters (k) to 100 (note that the final number of clusters may be less).
Note that except from the aforesaid constraints/settings set, all other default settings and constraints provided by the "SMILE" framework are the same [27].

A. Methodology
First, the performance of DAIS for a scenario with a small number of D2D Devices (<= 200), as compared to the number of D2D Devices in [2] which rose up to 1000, is investigated, while varying the device Battery Power Level and the WDR thresholds. For this, a "brute force" investigation of the aforesaid thresholds was executed with values from 0% to 100% using a step of 5%. Device in its proximity, and act as a D2D Relay. In addition, the effect the Transmission Power (TP) has on the investigated approaches, in terms of overall total PC and total SE achieved, is also investigated and demonstrated. For the communication power a "brute force" investigation was executed with values from 160 mW to 60 mW using a decreasing step of 10 mW.
The FuzzyART, DBSCAN and MEC AI/ML unsupervised learning clustering techniques are compared with the DAIS algorithm, the Random clustering approach and the Sum Rate Approach (shown in [2]) in a D2D communication network. The case where D2D communication is not used is also compared (we refer to this as non-D2D-UE approach). The FuzzyART, DBSCAN and MEC AI/ML are unsupervised learning clustering techniques that separates UEs into clusters (hence implement ultra-dense networks) under the BS, by utilizing distances, like the Euclidean Distance, as a metric. Then, the heuristic algorithm, that we developed (and presented in Algorithm 1), utilizes the clustering results extracted by these approaches, and selects the D2D Device in the identified clusters with the best Data Rate to be set as D2D Relay node and made D2D Relay Cluster Head (CH). Once the D2D Relay CH is selected, the algorithm assigns the UEs within a radius of 200m (WIFI Direct) from the D2D Relay CH, to become D2D Clients of the cluster and connect to it. Also, UEs not within the radius will stay connected to the BS (non-D2D-UEs).
The Sum Rate Approach is utilizing distributed control. With this approach, each node adds the data rate of the connections (that is the Sum Rate) that each D2D Device has in the D2D communication network. Then it decides the best transmission mode, best link and best path to the BS or other Gateway, in order to achieve the maximum Sum Rate of the whole network. The Random approach is a simple approach that selects the Transmission mode of each node in a random manner. The non D2D UE approach describes the current approach used in Mobile Networks. This approach keeps all the UEs connected directly to the BS and a constant predefined transmission power, that is specified for the UEs that are directly connected to the BS, is used.

B. Simulation Environment
In order to investigate how to achieve the best results in a network with a low number of D2D devices, a range of 1 to 200 D2D Devices were used. The devices are placed in a cell range of 1000 meter radius from the BS using a Poisson Point Process distribution model. In our simulation environment we keep the same comparison measurements of performance and these are the Total SE (Sum rate), Total PC and Execution Time as in [2]. Also, the Channel State Information (CSI) used in the investigation is the Statistical CSI. In addition we keep the same formulas for D2D UEs battery power level estimation and WDR and the same simulation constraints and simulation parameters. However, we introduce new constraints and parameters as in section III. The simulation environment is implemented in Java (i.e. Java 11.0 with Apache Netbeans 11.6 IDE) using the JADE Framework [28], LTE/5G Toolbox libraries from Matlab (2020a) and also the SMILE library that is used for AI/ML implementation. The hardware used for the simulation is the following: i) an Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz; ii) 24 GB DDR4; iii) 1TB SSD hard disk; and iv) NVIDIA GeForce GTX 1050 Ti graphics card with 4GB DDRS5 memory.

1) Evaluation of DAIS Approach:
The results related to the performance of DAIS are illustrated in Fig. 2 and Fig. 3. Note that for the results provided, a "brute force" investigation was executed, by varying the Device Battery Power Level (in %) and the Weighted Data Rate (WDR) Thresholds with values from 0% to 100% using a step of 5%. During this investigation the optimum thresholds were also selected. As observed from the results (see Fig. 2), varying the Device Battery power level threshold does not cause noticeable changes on the total PC nor the sum rate (i.e., total SE).
On the other hand, by varying the WDR Threshold, we observe that the results are considerably affected, in terms of SE and PC. More specifically, as shown in Fig. 3, with a different number of D2D Devices and different values for the WDR threshold there are major changes in the resulting total PC and total SE. However, in order to achieve these results at least a number of 75 D2D Devices must exist under the BS. Furthermore, as depicted in Fig. 3, the WDR threshold value achieving optimized results is 20% (see section IV-A for an explanation on the use of this threshold). More specifically, by altering (decreasing) the transmission power, the following observations are made: i) for the scenarios with low number of UEs (i.e., up to 100 UEs), there is noticeable improvement on the total network PC (i.e., up to 64.10% for DAIS; Fig. 5), with a small decrease on the SE (i.e., a maximum of 20% decrease for DBSCAN shown in Fig.  4); ii) for the scenarios with more than 100 UEs, significant gains are also observed on the total PC (i.e., up to 66.10 % decrease for MEC; Fig. 5) but with minor decrease on the SE (i.e., a maximum of 13% decrease of Random; Fig. 4).
In addition, as shown in Fig. 5, for all approaches compared (except the non-D2D-UE), the values of total PC change rapidly from 0 UEs to 200 UEs, but they do not have a large scale of difference in each approach. On the other hand, for the non-D2D-UE approach the total PC used compared to all other approaches is significant. The reason is that with this approach, all the UEs have direct connections with the BS, which are power consuming.
3) Performance Comparison of the Investigated Approaches: In this section, the performance of the approaches is compared in terms of total SE (Sum Rate) and total PC achieved. For this comparison a predefined transmission power of 160 mW is used for all approaches as shown in Fig. 6. As depicted in Fig. 6, in terms of total power needed (i.e., power consumption), the best results are provided by the Sum Rate Approach, while the worst performance is observed for the non-D2D-UE approach. In addition, all approaches are relatively close, in terms of total SE from a range of UEs of 0 to 50. Beyond 50 UEs, the DAIS and Sum Rate Approach, approaches start to show increased SE and they conclude to have better SE than other centralized AI approaches as shown in Fig. 6.  In terms of SE, DAIS seems to under-perform compared to the other approaches for a network with a small number of devices (i.e., 10 UEs as shown in Fig. 4 at 160 mW). However, from 50 UEs and above, DAIS is better than the DBSCAN, Random and non-D2D-UE approaches as shown in Fig. 4 and in Fig. 6. Finally, at 200 UEs (maximum number of UEs examined) DAIS really shows its benefits by reaching the results provided by the Sum Rate Approach shown in Figure 6. Continuing our examination on total PC, DAIS outperforms the non-D2D-UE approach for all number of devices examined. Furthermore, at 200 devices the DAIS is better than DBSCAN, MEC, non-D2D-UE approach and Random, but it has the same total PC with FuzzyART; Fig. 6.
The non-D2D-UE approach has the worst performance in terms of total PC, compared to all other related approaches (the change percentage in total PC for non-D2D-UE approach is 12.50% for 5 devices and 4% from 5 devices to 200 devices), as shown in Fig. 6. In terms of SE, it provides better performance than other approaches only when the number of UEs in the Network is 10 or less (as shown in Fig. 4). However, for more UEs it provides the worst results in terms of SE. Additionally, below 50 UEs, the non-D2D-UE approach has better SE than DAIS. However, in the examined range of numbers of UEs (0 until 200) DAIS has better total power usage for communications rather than non-D2D-UE approach; this is shown in figure 6.
Random approach is always the worst than all other approaches in terms of SE (as shown in Fig. 6). However, Random provides better performance in terms of total PC compared to the non-D2D-UE approach (as shown in Fig. 6).
Additionally, in our examination we investigated some extra characteristics of each algorithm and compared the performance of the different approaches in terms of number of messages 2 exchanged, number of resulting non-D2D UEs, number of clusters formed and total number of devices under cluster. The results are provided in Table II. Regarding the number of messages that each approach needs to exchange in order to conclude on the Transmission mode selection for all runs 3 , from the worst to best performance is provided by Sum Rate Approach, FuzzyART, MEC, DB-SCAN, DAIS, non-D2D UE and Random.
Additionally, for all runs, with the only approaches that all UEs finally conclude to become D2D Devices are DAIS, Sum Rate Approach and Random approach. For the rest of the approaches, FuzzyART has the least number of resulting non-D2D UEs followed by MEC and DBSCAN.
In terms of the created clusters, the total number of users that are served by cluster (D2D Relay/D2D Multi Hop Relay that are directly connected to BS are not included) and number of clusters created per approach are investigated. The benefits of having a large number of D2D Devices under a cluster are significant for the SE and PC. More specifically, by having a large number of D2D Devices under a cluster the total SE is increased, total PC is reduced and the number of direct links to BS are decreased. On the other hand, in the case of a large number of Clusters the links to BS are reduced but SE may not be affected effectively. Moreover, balancing of both metrics can be achieved with maximum SE, minimum PC and reduced number of links to BS for large towards medium number of clusters with equal assigned D2D Client Devices. Therefore, by investigating the clusters density and number of clusters the following results are provided: i) for 50 UEs the maximum number of devices that can be included in a cluster is provided by DBSCAN (10) and then MEC (9) with those establishing 1 and 5 clusters respectively. The MEC is the second in order, but DBSCAN is in the last approaches in terms of Total SE/PC; ii) for 100 UEs the maximum number of devices that can be included in a cluster is provided by DAIS (97) with 19 clusters established and then by DBSCAN (25) with 1 cluster. The DAIS is the third in order, but DBSCAN is in the last approaches in terms of Total SE/PC; and iii) for 200 UEs the maximum number devices that can be included in a cluster is provided by DAIS (146) with 26 clusters and then DBSCAN (49) with 1 cluster. The DAIS is the second in order, but DBSCAN is in the last approaches in terms of Total SE/PC.
In our analysis, we examine the mean time of execution of each approach (centralized, distributed, semi distributed and DAI) in terms of the duration of the calculation of Transmission Mode Selection of a D2D Device. More precisely, we calculate for each approach the mean time when the algorithm started to compute the transmission mode until the conclusion of the algorithm in each run (for different numbers of UEs). For example with 50 Devices in centralized and semi-distributed mode, the procedure computes the sum of execution time from 1..50 UEs of each iteration when the approach examines 1,2,3,4..,50 Devices and then it divides the result with the number of devices (50). However, for the distributed mode the time is calculated in each D2D Device 3 Run is the execution of the algorithm with a different number of UEs in each instance of the scenario  FuzzyART DBSCAN GMEANS MEC  50  0  0  1  0  0  1  0  15  100  1  1  12  0  2  7  1  36  200  1  1  12  0  2  7  1  36 and at the end the sum of the calculated times divided with the number of devices is the resulting execution time. Note that in Sum Rate Approach there is a need to investigate for each D2D Device all transmission modes and links in order to achieve the best sum rate (this is the reason it is slow). On the other hand for centralized approaches the duration depends on the calculation of the transmission mode selection of the whole network. Overall, the faster approach is the DAIS (DAI) with 100 ms with any UE (from 1..200 UEs), the second faster is the DR with the non-D2D UEs, the most slowest approaches are MEC, DBSCAN (centralized) and Sum Rate Approach (distributed) as shown in the Table III.

4) Overall Remarks:
In the performance comparison provided above the different investigated approaches are evaluated in terms of SE and PC. The results illustrated that the worst performance is provided by the Random approach, while the best performance is provided by Sum Rate Approach, FuzzyART and DAIS. On the other hand, in terms of total PC, the worst performance is provided by non-D2D-UE approach, while best is provided again by the Sum Rate Approach, DAIS and FuzzyART.
Additionally, the paper shows that unsupervised learning approaches such as FuzzyART can be used for transmission mode selection in D2D Communication. In addition, by considering Table II, we observe that Sum Rate Approach needs to exchange a lot of messages before a decision is established, this is the reason that is taking a lot of time to conclude.
Also, another observation that is made in this investigation is that, compared to all other investigated approaches, DAIS creates the greatest amount of clusters with the greatest amount of D2D Clients in each cluster, however without always providing the best performance in terms of SE and PC (e.g., for 50 UEs, Sum Rate Approach provides the best performance with 6 D2D Clients and 12 clusters in contrast to DAIS with 6 D2D Clients and 13 Clusters). Also, it is observed that even if DBSCAN creates only one cluster 4 , it achieves better results than the non-D2D UE approach. In addition, it is shown in Table II and in Figure 6 that all investigated approaches except Random and non-D2D-UE approaches create clusters in the most accurate positions (increased SE/reduced total PC) with the use of WDR (i.e. DAIS) and sum rate (i.e. Random, FuzzyART, MEC, DBSCAN, Sum Rate Approach) measurements under the mobile network in the D2D network. Therefore, the approaches are good alternatives to be used for Transmission mode selection in the D2D communication.
In addition, the following findings extracted from Fig. 6 and Table II: i) Some of the 5G requirements are achievable through Transmission Mode Selection (i.e. High Data Rates, Low Power Consumption); ii) The critical point that SE, PC gains increases rapidly is 100 UEs for all approaches; iii) coverage expansion is achieved; and iv) the lower limit of all approaches is 5 UEs.

V. CONCLUSIONS AND FUTURE WORK
The research objective on this paper is threefold. Firstly, it examines the performance of the DAIS algorithm with the proposed changes in threshold (i.e., WDR Threshold), in terms of SE and PC, considering scenarios with a small number of Devices (i.e., <= 200). During this examination, the WDR and the BPL DAIS' thresholds, affecting the SE and PC of the network, have been examined and values achieving best performance have been determined. Secondly, it introduces the use of unsupervised learning AI/ML approaches in Transmission mode selection in D2D Communication and compares the performance of DAIS with FuzzyART, DBSCAN and MEC as well as other related approaches (i.e., Distributed Random, Distributed Sum Rate Approach, Centralized non-D2D-UE). Last, it examines the effect the transmission power has on the investigated approaches, in terms of PC and SE achieved. The results obtained demonstrated that DAIS, compared to all other related approaches, with the right tuning of WDR and BPL threshold values, can provide significant gains in terms of SE, PC, and cluster formation efficiency. Precisely, the results showed that DAIS and Sum Rate Approach outperformed all other approaches in terms of SE. FuzzyART, DAIS and Sum Rate Approach outperformed all other related approaches in terms of PC. Additionally, our findings showed that, by reducing the transmission power of communication, the SE and PC of the network is significantly affected (SE in a negative way and PC in a positive way) when the amount of UEs is less than 100. On the other hand, from 100 to 200 UEs the effect on SE becomes smoother while on PC the gains remain the same. Also, results showed that the investigated AI/ML approaches are also beneficial for Transmission mode selection in D2D communication, even with a small number of Devices. As future work we will investigate the performance of the same AI/ML approaches in scenarios with large number of UEs (i.e., up to 1000 UEs under the same BS) considering non ideal CSI in D2D communication network.