Abstract
We proposed a novel approach to evolve LSTM networks utilizing intelligent optimization algorithms and address time-series classification problems in EdgeIoT. Meanwhile, a new optimizer called cultural society and civilization (CSC) algorithm is proposed to reduce the probability of stagnated in the local optima and increase the convergence speed. The suggested method could relieve the problem that the traditional data mining and pattern extraction methods cannot guarantee high accuracy and are hard to deploy on terminal devices. The proposed CSC algorithm and CSC-optimized LSTM model is examined on benchmark problems and demonstrates remarkable superiority over traditional methods and can be applied to support EdgeIoT for learning and processing.
1. Introduction
Time-series classification is a key technology widely used in various target recognition, object classification, and semantic analysis tasks. Over the last several decades, a lot of classification algorithms have been proposed with the improvement of the availability of time-series data and the prevalent demand of data mining and pattern extraction [1]. However, it remains a challenging problem because the data obtained from the actual problems have the characteristics of high dimensionality and large size.
The basic statistical classification methods require prior information and complex manual data analysis. With the growth of artificial intelligence technology, deep learning has drawn wide attention in the field of signal recognition and classification and has gradually become the most popular method [2]. Since traditional time-series classification methods such as SVM and decision trees are not sufficient enough to obtain reliable classification results, the method of using recurrent neural network to classify the data has been paid more and more attention. The trained RNN proved to achieve good classification performance in many research studies, the speed and effectiveness of the training, as well as the generalization ability, are significantly improved [3].
The recurrent neural network in deep learning technology can analyze time-series sequence, while the long-short-term memory (LSTM) network has the capability of analyzing and learning the long-term temporal dependence [4]. By retrieving and storing information from input data stream, when there are long time lags between important time points, LSTM networks can complete complicated tasks such as processing, classifying, and predicting time series [5].
LSTM networks are increasingly applied to the classification and recognition of time-series data due to the above characteristics. In [6], researchers propose a demonstration on how to classify text using LSTM network, and an improved LSTM-RNN model for time-series classification is proposed in [7].
Although LSTM networks have achieved a great success on some classification problems, they often suffer from the vulnerability to parameter settings. It is difficult to select LSTM neural network hyperparameters by experience; improper parameter settings may cause overfitting or slow convergence of the network and could even severely reduce the classification accuracy. Moreover, the network training process requires a lot of computational loads. Combining the network-based classifier with the IoT, transferring the training process to the cloud, and then transferring it to the terminal device can effectively alleviate this problem [8].
Different from the traditional IoT structure, EdgeIoT does not need to upload all data to the cloud, but completes part of the processing work on the end nodes. Such a distributed structure has advantages in some latency-sensitive situations [9]. As an emerging and prominent concept, EdgeIoT has attracted a lot of attention. In [10], unmanned aerial vehicle (UAV) is associated with mobile edge computing, where a UAV equipped with an MEC server is deployed to serve multiple IoT devices in a finite period. In [11], a real-world testbed consisting of edge computing devices and cellular base stations are developed, and a CNN-LSTM model is used to predict SoE, in order to save electricity on the grid, thereby reducing the carbon footprint.
As a result, many researchers try everything possible to improve or optimize LSTM networks and transplant them in different fields. An evolving LSTM is proposed in [12]; rather than learning over the fixed structures, it can learn the interpretable graph structures in a gradual manner from data during the optimization. During the evolving process, the data dependencies can spread more clearly by filtering out redundant information. In [13], the network matches the input layer to the output layer into a one-to-one structure, so the number of parameters can be significantly reduced to enhance the generalization capability of the model. However, designing optimal LSTM network architecture or tuning parameters are still challenging works and require consistent supervision. Moreover, this process may lead to oversized models, which may diminish their generalization capacity and be difficult to deploy on low-power devices. Using optimization technology such as intelligence computation to evolve deep learning is a rapidly developing technology, which can make the system adjust hyperparameters according to the characteristics of actual problems adaptively, and achieve an intelligent compromise between recognition accuracy and computational overhead [14] so that the system can obtain better performance, recognition accuracy, and anti-jamming ability, we expand its application range and solve a large amount of engineering application problems. In order to get the optimal architecture of CNN-LSTM automatically, three algorithms are applied in [15]: particle swarm optimization (PSO) and its differential evolution variants. The model uses LSTM to capture long-term time dependencies and uses a convolutional network to obtain the features. For the problem of intelligent marine target recognition in the UIoT systems, an evolutionary LSTM framework, using exploration and exploitation control method, is proposed in [16]. A novel method called evolving deep convolutional variational autoencoder is proposed for image classification in [17], a gene-coding mechanism with variable length is proposed to find the optimal network depth. A metaheuristic optimization algorithm called hybrid statistically driven coral reef algorithm is leveraged in [18] to optimize the fully connected and dropout layers of CNN models. It leads to lighter models with better performance.
Different optimization algorithms have different characteristics and show their own advantages for optimization problems [19]. According to the category, behavior, or pattern of the simulation object, heuristic algorithms can be classified in various ways [20]. For example, evolutionary algorithms are based on physical laws, mathematical formulas, animals and plants, and group behavior [21].
Social and civilization algorithm is an efficient optimizer which is based on the simulation of social behavior [22]. Unlike some bionic algorithms, such as the artificial bee colony algorithm [23], the cultural mechanism does not take a single target as the guiding direction and has more advantages in dealing with complex multimodal problems [24]. In the proposed society and the civilization model, at any point in time, a society corresponds to a cluster of points in the parametric space, while a civilization is the collection of all these societies. From a specific point of view, several optimization algorithms with the model of the society can be thought of as the variants of society and civilization algorithm. A new imperialist competitive algorithm is proposed in [25] that combines evolutionary algorithm and socio-political process; this approach tries to get people who live in different type of communities involved in development of the whole space. Social evolution algorithm is inspired by the human interactions which are selective and can explore randomly based on the individual characteristics [26]. The individuals interact with others in a variety of ways and adopt the tactics to emerge or evolve.
The key idea of cultural algorithms is to extract and acquire knowledge from the evolving process and in return reflect that knowledge to guide the direction of evolution [27]. This mechanism guides the search in a flexible and efficient way by pruning the unfeasible areas and promoting the promising areas. It can be subtly integrated with other evolutionary algorithms or swarm intelligence algorithms. In [28], a cultural cooperative particle swarm optimization (CCPSO) is proposed which uses the method of dividing multiple swarms for collaborative evolution, and the global search capacity is enhanced by utilizing the cultural mechanism. A knowledge-based evolutionary algorithm is proposed in [29] to solve the optimization problem by using a multipopulation cultural algorithm, where the knowledge is updated based on the current states of the network and the search direction is guided by the knowledge.
In our article, a novel optimization algorithm named cultural society and civilization (CSC) algorithm is proposed, which is based on society and civilization algorithm and merging cultural mechanism, and the CSC-based evolving LSTM networks are designed for time-series classification in EdgeIoT.
The rest of the article is organized as follows. Section 2 proposes a cultural society and civilization algorithm. Section 3 presents the details of the proposed EdgeIoT model of evolving LSTM networks using society and civilization algorithm. Section 4 gives the simulation results and analysis. Finally, conclusions are drawn and future works are presented in Section 5.
2. The Cultural Society and Civilization Algorithm
The proposed CSC is an intelligent optimization algorithm, and the model of the CSC is based on the imitation of the mechanism which promotes the development of civilization through cooperation and communication among everyone in the human society. Specifically, in the process of the development of civilization, each individual develops itself under the interaction of the society and the leaders of entire civilization and thus makes the society and the whole civilization to develop in a better direction. The CSC is designed to optimize the maximum optimization problem within a given range as follows:
In CSC, the civilization is defined as a collection of multiple societies, each of which is composed of basic individuals, and each society has an independent belief space. Individuals, societies, and civilizations are inclusive relationships and interact and develop through certain mechanisms so that the algorithm can take the exploration and exploitation into account. We define as the individual, composed of optimizing variables from xp1 to xpn. Each of the individual in the civilization represents a potential solution of the problem, and the individual with a large objective function value is a good individual.
All individuals within civilization are randomly grouped into disjoint clusters , , which are defined as social spaces, s.t., , and . Disjoint social spaces maintain the diversity of civilizations as a whole. The individual in the th social space is represented as represents the current number of iteration.
Based on the principle of cultural algorithm, the cultural mechanism is introduced on the basis of society and civilization algorithm; i.e., leaders and belief spaces are introduced to lead the development of individuals [30]. According to a certain probability, each individual is influenced by the belief space of the society or develop itself under the guidance of the leader in civilization so that the algorithm has the global search ability that can jump out of the local optimum. For each society, the belief space is defined to specify the way of communication and interaction within the society. This mechanism enables the algorithm to strengthen the search around the local optima. Specifically, how to balance exploration and exploitation is a common problem faced by artificial intelligence algorithms, which is reflected in dynamic planning, reinforcement learning, and transfer learning. In order to solve the problem of evolutionary LSTM networks, the purpose of introducing culture mechanism in this article is to make the algorithm have stronger cognitive ability. First, we establish an independent belief space in each social space, which is composed of normative knowledge. The belief space of the th society is denoted as , where and , where normative knowledge is the interval of the th individuals in the society and is used to define the boundaries of the th society, where is the lower bound of the variable; during the evolution process, it can be initialized as 0; is the upper bound of the variable; its initial value is 0; and stand for the objective function values of and ; they represent the range of social knowledge, and their initial value are negative infinity; the belief space is the information repository where the individuals store their experiences and inspire other individuals to learn from them [31]. Leaders in the algorithm can make the algorithm utilize the existing knowledge to achieve exploitation, while the existence of belief space and normative knowledge ensures that the algorithm can explore new strategies and find the optimal solution.
The acceptance function is designed to update the belief space and transform the experiences gained by the superior individuals in the evolution process into the belief space so that the belief space of each society is constantly updated with the iteration of the algorithm. In each society, the individuals with the largest objective function value are selected to update the upper or lower bounds of normative knowledge and their corresponding objective function values with equal probability. The specific steps are as follows: if the condition or is met, then the lower bound of normative knowledge and its objective function value are updated as follows:where ; if the condition or is met, the upper bound of normative knowledge and its fitness function value of each society are updated as follows:where .
After repeating the above operations for each social space in the civilization, the updated belief spaces are , where and . The acceptance function makes the belief space shrink or expand dynamically and adaptively adjusts the degree of individual aggregation in society.
In order to maintain the diversity of the population while making the algorithm converge faster, each individual has the opportunity to transfer into the more developed society, i.e., migrate to the leader of the entire civilization and obtain useful information from it, thereby expanding the boundaries of the belief space and movement, and the individual with the largest objective function value in the civilization space is determined as the leader .
All individuals in each society will update according to the norm knowledge provided by the belief space or follow the leader to complete the evolution in accordance with the given probability, thus to realize the update of each dimension of themselves. The probabilities of implementing the two evolution methods are and , respectively. For each individual, a probabilistic judgment is implemented before updating; if the individual was determined to be updated according to the normative knowledge of the belief space, then the th dimension of the th individual in the th society can be updated as follows:where , is a random number of normal distribution with a mean value of 0 and a variance of 1, and and are control constants; if the individual was determined to follow the leader, the distance between the individual and the leader will be calculated, and the distance is defined as follows:where , . Then, the th dimension of the th individual in the th society can be updated as follows:where ; during the iterative process, the leader of the civilization may migrate from one society to another with better performance. Leader and each belief space are used to lead the evolution of the individuals. This mechanism can help individuals to improve themselves through an information exchange within or cross societies.
3. Evolving LSTM Networks Using Culture Society and Civilization Algorithm in EdgeIoT
The performance of the LSTM network largely depends on the hyperparameter settings. However, due to the complexity of the network and the heavy computational cost of the learning process, finding the best network configuration is extremely challenging. Therefore, characterized with superb global search capabilities, we leverage cultural society and civilization algorithm to evolve LSTM networks.
As the classifier in the system, LSTM network can capture long dependencies and correlations between time steps of time-series data. The received data are first entered into a bidirectional layer which consists of nodes and the last element of the sequence will be extracted, where the hyperbolic tangent function is used as active function, and the automatic learning of internal dependencies of data will be realized through forget, input, and output gates. This instructs the LSTM layer to map the input time series into features and then the output is prepared through the fully connected layer. Finally, the classification is completed by a Softmax layer and a classification layer.
The hyperparameters in LSTM have an important impact on the classification performance. Due to the complexity of the interaction between the parameters, selecting these parameters manually is very complex; it requires a lot of prior knowledge of specific problems, and the traditional trial and error tuning process [32] can often only find suboptimal solutions. In order to make LSTM networks perform better when dealing with variable classification problems, we introduced CSC algorithm for evolving LSTM, which can make LSTM learn temporal dependencies better. First of all, all individuals in the civilization are initialized to a uniform random number in the range of [0, 1], and each individual corresponds to a possible parameter selection method. We use the training set data to train the neural network and perform it on the validation set. By verifying the accuracy of the classification, the objective function is obtained accordingly to comprehensively evaluate the performance of the current network. The objective function is denoted as follows:where is the number of the hidden nodes in bidirectional LSTM layer, is the batch size which directs the amount of training signals that the LSTM network looks at a time, and stands for the percentage accuracy of the classification on the validation set after training the LSTM neural network on the training set with the hyperparameters represented by the current individual, where , , and are constants. During the optimization process, the number of nodes and batch size are limited by the upper and lower bounds of the optimization algorithm and are embodied in the objective function in the form of Lagrange multiplier method. will be encoded in the CSC algorithm using positive numbers to form individuals. Subsequently, these parameters will be optimized adaptively during offline training stage and evolve the network to achieve a higher recognition rate with less computation in an iterative way. In the EdgeIoT-based scheme proposed in this article, the training process is implemented on the cloud with high-performance computing equipment, and the network will be built on the node device according to the parameter setting method from the cloud.
Based on what we have discussed, the process of EdgeIoT-based evolving LSTM scheme is shown below: Step 1: We perform preprocessing on data such as feature extraction, shuffle, and normalization and prepare training, validation, and test sets. Step 2: We generate the initial population randomly with individuals, which represent specific parameter setting methods of LSTM network. Step 3: We decode the individual and train the corresponding LSTM network with the training set and then evaluate the network on the validation set to obtain the objection function value of each individual. Both training and validating are performed through cloud computing. Step 4: We divide the whole civilization into incompatible social spaces, identify the leader by competing for excellence, and establish independent belief spaces in each society. Step 5: Each individual in civilization evolve itself according to equations (4) and (6), and acceptance function is used to update belief spaces in each society. Step 6: If it reaches the predefined value of the maximum generation, we stop the process and output the most optimal solution; if not, we Wego to Step 3. Step 7: We map the optimization results to get the parameter setting scheme, transmit it to the terminal device, and train the LSTM network using all the available data. Finally, we use the test set to evaluate the network and input the measured data to obtain classification results.
4. Results and Discussion
This section describes the experimentations to evaluate the proposed CSC algorithm and the CSC-based evolving LSTM model in EdgeIoT.
4.1. Performance Evaluation of CSC on Benchmark Test Functions
To evaluate the property of the proposed CSC algorithm, the widely used CEC benchmark set is adopted and four standard benchmark functions are used for evaluation the searching capability; they are Rastrigin’s function, Ackley’s function, Schaffer’s function, and Levi’s function, respectively [33]. All of them are maximum optimization problems. The civilization and society algorithm (CSA), the particle swarm optimization (PSO), and the genetic algorithm are deployed as competitors. For CSA, the parameter settings can refer to [22]. For PSO, the parameter settings can refer to [34]. For GA, the parameter settings can refer to [35]. For CSC, , , , , , and . For fair competition, the population size is set at 60 and the maximum generation is 60 for all the algorithms. All experiments were run on the same computer with 8 Gb RAM; the CPU model was i7-10110U. All tests were independently run 1000 times. The best score obtained so far on the vertical axis is defined as the difference between the global optima value and the objective function value of the best individual at current iteration. The average convergence curves are shown in Figures 1–4.




From the result, we observed that CSC surpasses all other algorithms and especially get good results when dealing with complex problems such as Rastrigin’s function and Ackley’s function, and the other algorithms may miss the global optimum point. This property is due to the culture updating mechanism, which motivate every individual learn from the knowledge in the belief space and help them explore the search space sufficiently to locate the peak and then gradually approach it. In Figure 3, the PSO converges faster at first, but CSC achieves highest accuracy of all the competitors after the termination criterion is met.
For full comparison, the algorithm will be tested in higher dimensional optimization problems. For 30-dimensional and 50-dimensional optimization problems, two novel algorithms related to cultural mechanisms, called social group entropy optimization (SGEO) algorithm and cultural cognitive evolution optimization algorithm (CCEO), are added as comparison algorithms. For CCEO, the parameter settings can refer to [36]. For SGEO, the parameter settings can refer to [37]. The benchmark function 1 is , and the function 2 is , where reflects to the dimension of the search space. And the average convergence curves are shown in Figures 5–8.




The results of multidimensional optimization experiments show that the suggested CSC algorithm achieves the optimal performance.
Two of the most critical parameters and are selected for sensitivity analysis, and the proportion of the number of experiments that reaches a specific convergence accuracy after 50 iterations is calculated. The results are shown in Table 1. It can be seen that the parameter selection used in this article is reasonable.
By analyzing the above results, one may conclude that the proposed CSC algorithm yield a balanced performance between the global and the local versions; it has good search ability and converges fast.
4.2. CSC for Evolving LSTM in EdgeIoT
The optimization of the neural network work is a complexed multidimensional optimization problem with many local optima. Therefore, some multimodal benchmark functions can be used to evaluate the ability of the algorithms. Meanwhile, the algorithms which have good performance on the benchmark function can be expected to perform well on the evolutionary LSTM network model. In order to quantify the performance of the proposed CSC-based evolving LSTM, a series of experiments are designed and performed on the chosen time-series data classification benchmark datasets.
First of all, the Japanese vowels dataset from the UCI machine learning repository is employed to evaluate the proposed CSC-based evolving LSTM model. This experiment trains the evolving LSTM network model to distinguish the speakers. The given training data contain time-series data for nine male speakers. Each sequence has 12 features with different lengths. The dataset contains 270 training observations, and we employed 180 observations for validation and another 180 observations for test [38].
We compared the performance of the proposed CSC algorithm against other classical methods. The classifying methods used in the experiment are as follows: classical LSTM networks with default settings; cultural society and civilization (CSC) algorithm-based evolving LSTM network; particle swarm optimization (PSO)-based evolving LSTM network; the genetic algorithm (GA)-based evolving LSTM network.
To ensure a fairness, the same settings are employed for each experiment as follows: the population size , the maximum number of iterations , a total of 20 epochs is used in the training stage, and the adaptive moment estimation (ADAM) solver is applied [39]. The LSTM network with the default parameter setting is also employed as one of the comparisons; i.e., the batch size is set to 128, the number of hidden nodes is set to 50, and the initial learn rate is set to 0.01. The search range of each optimized parameters in presented below, the number of hidden nodes is chosen in the range of [1, 100], the batch size is chosen in the range of [1, 1000], and the learning rate is chosen in the range of .
The experimental results over 10 independent runs are shown in Table 2, which show the classification accuracy received from the proposed evolving LSTM method and peer competitors. It is clearly shown in Table 2 that, by comparing the accuracy, the proposed CSC-based evolving LSTM outperforms other competitors especially based on the comparison of mean classification error, and all the evolving LSTMs perform better than the LSTM networks with default setting, which indicates that more appropriate hyperparameters’ setting methods are obtained through optimization and the cultural mechanism enhances the searching capability of the SCA efficiently. Furthermore, it can be observed from the variance that the proposed CSC algorithm is more reliable.
The mean parameters of the identified optimal network over 10 independent runs are presented in Table 3. As shown in Table 3, while ensuring high classification accuracy, the proposed CSC-based evolving LSTM networks use fewer hidden nodes than default setting in the bidirectional LSTM layers and select the more appropriate batch size and learning rate as a balance to enable LSTM networks to perform better and avoid becoming bloated, while other methods are more likely to be trapped in local optimal leading to inferior results.
In this section, the proposed CSC-based evolving LSTM will be evaluated on the ECG data set. This data came from a study of the ECG correlation between genetic predisposition and alcoholism. It contains measurements from 64 electrodes, which are deployed on the subject’s scalp and sampled for 1 second at 256 Hz. The test results on the ECG dataset are shown in Tables 4 and 5 [40].
According to Table 4, the proposed CSC-based evolving LSTM model is the best among all the different methods. Specifically, it achieves the highest accuracy and the smallest variance.
The experimental results show that the suggested method in this article can adaptively adjust the parameters of the classification system. Not only the CSC algorithm outperforms the contrast optimization algorithms but also the CSC evolved network performed better than the default LSTM or other combinatorial optimized models. Since the computational burden of the devices in EdgeIoT system is reduced while the recognition accuracy is improved, we can draw the conclusion that the proposed method can obtain more suitable hyperparameters through optimization and enable LSTM network to examine the complex interactions among time-series data without suffering from underfitting or overfitting problems. And the EdgeIoT technology used in this article keeps the computation load and resource consumption of the devices on the edge within an acceptable level and makes the overall delay smaller.
In summary, the proposed CSC-based evolving LSTM networks achieve best accuracy and reliability and realize the tradeoff between the accuracy of classification and the computation cost. Moreover, in different practical problems, the proposed CSC-based evolving LSTM model shows a strong generalization ability.
5. Conclusions and Future Research
This article designs an intelligent time-series classification model that can be deployed in EdgeIoT. In order to globally evolve the super parameters in LSTM classifier, a cultural society and civilization algorithm is proposed, which can quickly converge to the best without falling into the local optimum. The proposed model can be deployed in a variety of Internet of Things, such as the sea ocean Internet of Things or the air space sea integration network. In these scenarios, the computing power of edge devices is limited, and power consumption and classification accuracy need to be weighed. The experimental results show that the CSC evolutionary network can adaptively adjust the parameters of the classification system to achieve high classification accuracy. The performance of this method is better than that of the default LSTM or other comparison methods, which can reduce the computing burden of devices in the EdgeIoT system and improve the recognition accuracy. The EdgeIoT technology used in this article keeps the computing load and resource consumption of edge devices within an acceptable level and makes the overall latency smaller. For future research, in addition to cultural mechanisms, we will explore and design more efficient communication mechanisms to study algorithms with high search efficiency and convergence speed for evolving LSTM networks. These algorithms are powerful tools for solving time-series analysis problems, such as time-series prediction, language modeling, sequence regression, pattern recognition, and video classification [41]. In addition, more efficient EdgeIoT architecture will be designed by combining fog computing and artificially driven edge computing technology.
Data Availability
Previously reported ECG dataset and Japanese vowels dataset were used to support this study. These datasets are cited at relevant places within the text as [38] and [40]. They can also be found and downloaded at UCI Machine Learning Repository. And all the results of this study are provided in full in the results section of this paper. As can be seen, the datasets used in this study have been cited in the references named “Multidimensional curve classification using passing-through regions.”
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
This work was supported by Basic Scientific Research Project (JCKY2019207A019).