Next Article in Journal
Generation of a Virtual Cohort of Patients for in Silico Trials of Acute Ischemic Stroke Treatments
Previous Article in Journal
Cybersecurity and Medical Imaging: A Simulation-Based Approach to DICOM Communication
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Improved Learning-Automata-Based Clustering Method for Controlled Placement Problem in SDN

1
Department of Computer Engineering, Central Tehran Branch, Islamic Azad University, Tehran 1477893855, Iran
2
Department of Computer Engineering and IT, Amirkabir University of Technology, Tehran 1591634311, Iran
*
Author to whom correspondence should be addressed.
Appl. Sci. 2023, 13(18), 10073; https://doi.org/10.3390/app131810073
Submission received: 1 April 2023 / Revised: 7 June 2023 / Accepted: 18 June 2023 / Published: 7 September 2023
(This article belongs to the Section Electrical, Electronics and Communications Engineering)

Abstract

:
Clustering, an unsupervised machine learning technique, plays a crucial role in partitioning unlabeled data into meaningful groups. K-means, known for its simplicity, has gained popularity as a clustering method. However, both K-means and the LAC algorithm, which utilize learning automata, are sensitive to the selection of initial points. To overcome this limitation, we propose an enhanced LAC algorithm based on the K-Harmonic means approach. We evaluate its performance on seven datasets and demonstrate its superiority over other representative algorithms. Moreover, we tailor this algorithm to address the controller placement problem in software-defined networks, a critical field in this context. To optimize relevant parameters such as switch–controller delay, intercontroller delay, and load balancing, we leverage learning automata. In our comparative analysis conducted in Python, we benchmark our algorithm against spectral, K-means, and LAC algorithms on four different network topologies. The results unequivocally show that our proposed algorithm outperforms the others, achieving a significant improvement ranging from 3 to 11 percent. This research contributes to the advancement of clustering techniques and their practical application in software-defined networks.

1. Introduction

Clustering is a technique used for analyzing statistical data [1]. The process involves partitioning the data into clusters, so that data within the same cluster have the highest similarity, while data in different clusters have less similarity. Various clustering approaches, such as hierarchical, distance-based, density-based, and graph-based, have been proposed so far. Figure 1 depicts a diagram illustrating different clustering approaches.
The clustering technique has various applications in medical science [2], architecture [3], drug discovery [4], image processing [5], computer networks [6], and communication [7], among others. It is also an important tool for solving controller placement problems (CPPs) [8] in software-defined networks (SDNs) [9]. In CPPs, the goal is to determine the optimal number and location of controllers in a network, with the key objectives being the delay between controllers and switches, the delay between controllers, and load balancing [10].
A learning automaton (LA) is one type of machine learning algorithm with a finite number of actions and different probabilities assigned to each action [11]. In each round, the LA takes an action and evaluates the reinforcement signal from its surrounding environment. Then, the LA updates its action probability vector according to the reinforcement signal until a satisfactory solution is achieved. The LA has been used in various computer network applications to enhance existing solutions. The LA has also been applied to improve the k-means clustering method in [12]. In the proposed clustering algorithm, LAC, each LA is assigned to a data point, and the LAs determine the clusters to which their associated data points belong. LAC has been shown to outperform other clustering algorithms such as k-clusters, k-means, k-medians, k-means++, and k-medoids in UCI datasets. However, LAC, like k-means, is sensitive to the selection of initial points.
To address this issue, we propose an optimization method of LAC using k-Harmonic means (KHM) in this paper. Our approach, LAC-KHM, yields better results than LAC on various datasets. In addition to considering the distance between data points and their corresponding cluster centers, we also take into account the distance between individual cluster centers and load balancing for solving CPPs.
The rest of this paper is organized as follows: In Section 2, we present related works. Section 3 provides a thorough explanation of the preliminaries. In Section 4 and Section 5, we present the proposed algorithms, LACKHM and CLAC-KHM, respectively. Section 6 evaluates the performance of the algorithms, starting with LACKHM in the presence of seven datasets from the California Irvine (UCI) clustering benchmarks and then discussing CLAC-KHM performance on four topologies. Finally, Section 7 concludes the paper.

2. Related Works

In this section, we will first discuss different types of clustering methods and then describe their application in solving CPPs.

2.1. Types of Clustering Methods

Data clustering is an important issue in data mining [13] that can be divided into two groups: soft and hard [14]. Soft clustering means overlapping clustering, such as fuzzy clustering, where any data point may belong to more than one cluster with different membership grades. The other clustering, hard clustering, is exclusive clustering in which each data point exists in just one cluster [15].
From a different point of view, hierarchical and partitioning methods are the two main categories of clustering methods that were introduced in [16]. A hierarchical clustering method works by grouping data into a tree of clusters. In hierarchical clustering, the aim is to produce a hierarchical series of nested clusters. A diagram represents this hierarchy, which is an inverted tree that describes the order in which factors are merged (bottom-up view) or clusters are broken up (top-down view). On the other hand, the partitioning method was described in [13], which starts from an initial clustering and then moves data points from one cluster to another with a relocation method iteratively. There are two types of algorithms in this approach: error minimization algorithms and graph-theoretic clustering. The basic idea in error minimization algorithms is to determine clusters by minimizing a specified error criterion. The most famous algorithm in this area is k-means, which employs the sum of squared error (SSE) as an error criterion. The SSE measures the total squared Euclidean distance of instances to their representative values. However, k-means has some problems such as limiting to numeric attributes or being sensitive to initial centers of clusters. Therefore, some algorithms based on k-means such as k-prototype [17] or KHM [18] were proposed to overcome these problems. In addition, the k-medoids method was proposed, which is more robust than the k-means algorithm [19]. Graph-theoretic methods produce clusters via graphs. The famous algorithm in this method is based on the minimal spanning tree (MST) [20]. Another algorithm was proposed based on limited neighborhood sets [21].
From another perspective, clustering methods are divided into three main categories [13]: grid-based methods, density-based methods, and model-based clustering. The grid-based clustering methods use a multiresolution grid data structure to quantize object areas into a finite number of cells that form a grid structure, on which all the operations for clustering are implemented. Grid-based clustering uses dense grid cells to form clusters. [22]. Density-based clustering: The data points in the region separated by two clusters of low point density are considered as noise. DBSCAN is one of the most famous methods in this approach. The environment with a radius ϵ of a given object is known as the ϵ neighborhood of the object. If the ϵ neighborhood of the object includes at least a minimum number, MinPts, of objects, then it is called a core object [23].Model-based clustering (or distribution models): This method assumes a data model and applies an EM algorithm to find the most likely model components and the number of clusters [24].

2.2. Clustering APPLICATION in CPPs

Among the available clustering methods, k-means, spectral, and DBSCAN have been investigated more than others for solving CPPs. Therefore, we consider the proposed algorithms based on these methods.
Several solutions have been proposed based on the DBSCAN clustering method to appropriately locate the SDN controllers, as described in [25,26,27,28,29]. Since the method suggests the proper number of clusters, all of the proposed algorithms recommend a number of clusters, such as in [25], where the appropriate number of controllers is determined using silhouette analysis and gap statistics. However, one of the main disadvantages of the algorithm is that the value of the minimum number of objects should be defined in advance, which limits its ability to cluster datasets with high-density differences. Additionally, the neighborhood radius may not be suitable for all clusters, and this algorithm suffers from a high computational overhead.
In [26], the density-based controller placement (DBCP) method partitioned the given network using a density-based clustering method. This research considered CPPs with and without the capacity of controllers.
Clustering by fast search and find of density peaks (CFSFDP) proposed in [30] has been used in [27,28] to deal with the CPP. CFSFDP is a density-based clustering algorithm that requires fewer initial parameters and has more execution speed. However, it suffers from the need to experimentally preset the number of clusters.
The authors in [27] used a comprehensive consideration value according to [30], γ, which was calculated as the product of local density ( ρ ) and minimum distance (δ). However, two problems are identified with this definition. Firstly, the values of ρ and δ may have different orders of magnitude, so they were normalized to ensure equal treatment. Secondly, nodes at different densities may have the same δ value, making it challenging to select the initial clustering center. To address this, the weight of δ was increased in low-density areas. The modified calculation equation for γ was presented as γ i = ρ i . δ i ^ ( 3 4 ) .
A higher γ value indicates a higher likelihood of being a clustering center. The authors proposed a method to automatically determine the inflection point of γ, which corresponds to the transition from nonclustering centers to clustering centers. By analyzing the curve of γ values and finding the vertex of a folded line, the inflection point was identified. The optimal number of controllers was determined by counting the number of points with values greater than the inflection point γ value, and the locations of these points represented the deployment of clustering centers. The algorithm provided a step-by-step process for the selection of clustering centers.
The researchers in [28] utilized the idea of information entropy and a firefly algorithm for determining the local density and considered a point with the high density of switches as the cluster center. In the algorithm, the number and location of the controllers are discovered based on the jumping point in the decision graph.
The authors in [29] presented an improved density-based controller placement algorithm (DCPA) that enhances the efficiency of controller placement in a network. This algorithm achieves the required number of controllers by exploring candidate values of the radius and dividing the entire network into multiple subnetworks. Within each subnetwork, the controllers are deployed with the dual objective of minimizing the average propagation latency and the worst-case propagation latency between controllers and switches.
The spectral clustering method was used in [31,32,33,34,35] for CPP clustering. It is worth mentioning that the load-balancing parameter was considered in [31,32,35], and only [32,35] introduced algorithms for estimating the proper number of controllers. The authors in [32] utilized the structure of eigenvectors for the objective. In [33], first, the controllers were mapped into the row vector classification using spectral clustering, and then, using K-medoids algorithm, which is based on simulated annealing, the vectors were classified to achieve a flexible distribution of the controllers. The results in [34] demonstrated that the spectral algorithm outperforms K-median and K-center in terms of intercontroller latency. The problem was formulated for minimizing the controller cost, main costs, delays of switch–controller and intercontrollers, and main power cost in [35].
K-means was applied in [36,37,38] for solving a CPP in a SDN by paying attention to the delay between switches and controllers and load balancing. Only [38] among them considered intercontroller delay. It should be noted that the researchers in [37] also employed hierarchical clustering.
The authors in [39] mathematically formulated the placement of controllers as an optimization problem. The objectives of this problem were considered to minimize the controller response time, which refers to the delay between the SDN controller and assigned switches, as well as the control load (CL), intracluster delay (ICD), and intracluster throughput (ICT). To address this, they introduced a computationally efficient heuristic called deep-Q-network-based dynamic clustering and placement (DDCP). This heuristic utilized reinforcement and deep learning techniques to solve the optimization problem.

3. Basic Concepts

In this section, the basic concepts that will be used in this research are further explained.

3.1. K-Means Clustering

K-means clustering is a fast and commonly used technique due to its low iteration rates and ease of implementation. The k-means algorithm works by attempting to find the cluster centers (C1, C2, …, CK) in a way that minimizes the total squared sum of distances between each data point “Xi” and its closest cluster center (Cj). However, the performance of k-means heavily depends on the initialization of the centers, which is a key issue with this algorithm. The algorithm establishes strong connections between data points and their closest cluster centers, resulting in cluster centers that do not leave the local range of data density. As the LAC algorithm is implemented via k-means, it still suffers from the issue of the random initialization of the centers. Thus, in this research, we optimized the algorithm by using KHM.

3.2. K-Harmonic Means

K-Harmonic means (KHM) was proposed by the authors in [18] as a new clustering method based on k-means. In this algorithm, the harmonic means are used instead of the Euclidean distance to solve the initialization problem of the KM algorithm.
The objective function of the KHM algorithm is named KHM, and it calculates the harmonic mean of the distance from each point to all centers. KHM investigates two functions, soft membership and weight. The weight function assigns a higher weight to data points that are far away from every center, defining the impact of each data point on computing new components of the cluster center. Parameter “ρ” is a user-defined input parameter in KHM, typically equal to or greater than 2. It influences the fuzziness of cluster assignments. A higher value of “ρ” results in smoother membership distributions and allows data points to have more evenly distributed memberships across multiple clusters. Conversely, a lower value of “ρ” leads to sharper cluster boundaries and more distinct memberships.
The algorithm continues until a predefined number of iterations is reached, or until the output of the KHM objective function does not change significantly.

3.3. Learning Automata

Learning automata [11] are probabilistic decision-making tools that iteratively adapt to the environment and learn the optimal action. A widespread type of learning automata is variable structure learning automata, which are defined by a quadruple [α, β, P, T], where:
  • α = α1, α2, …, αr is the set of actions where r is the number of actions.
  • β is the reinforcement signals where, in a P-model environment, β ∈ [0, 1}.
  • P = {p1, p2, …, pr}} is the set of actions’ probability, P ∈{ 0, 1}.
  • T is the learning algorithm where, in the nth step, p(n + 1) = T[p(n), α(n), β(n)] is linear, if p(n + 1) is a linear function of p(n), or nonlinear if p(n + 1) is a nonlinear function of p(n).
In the nth step of a linear learning algorithm, if the ith selected action αi(n) receives the reward reinforcement signal β(n) = 0, the corresponding probability vector of learning automaton, p(n + 1), is updated using 1. If it receives the penalty reinforcement signal β(n) = 1, the corresponding probability vector of learning automaton p(n + 1) is updated using 2 [40]:
p j ( n 1 ) = p j n + a 1 p j n j = i p j n 1 a j |   j i
p j ( n 1 ) = p j n 1 b j = i b ( r 1 ) + 1 b p j n j |   j i
where in Equations (1) and (2), a and b are learning parameters (reward and penalty parameters), and different values for a and b create different learning algorithms:
  • If a = b, the learning algorithm will be of the linear reward penalty (LRP) type.
  • If b = 0, the learning algorithm will be of the linear reward inaction (LRI) type.
  • If a >> b (a is much larger than b), the learning algorithm will be of the reward epsilon penalty (LREP) type.

3.4. Learning-Automata-Based Clustering

In this form of clustering, each data point is equipped with the third type of learning automaton (LREP), and then, the learning automaton (LA) defines the membership status of the data point. The membership status of a data point in relation to a cluster is determined via “K-Means.” Therefore, this learning approach is based on the Euclidean distance between the data point and other data points within the cluster. The number of selectable actions for each learning automaton is equal to the number of clusters. After each selection, if the data point is assigned to the correct cluster, the selection is rewarded, and if not, it is penalized.
There are two reasons why the process of learning each data point was conducted using learning automata in this work:
  • The input size: The input size is a function of the number of members and their attributes. It is necessary to mention that in the learning process of LA, the entirety of the given data are considered. It depends on the datasets.
  • The cluster count: LA assign each datum to each cluster in during the learning process. The actions of the automata show the selection of a cluster for that particular member.

3.5. Software-Defined Networks and CPPs

Software-defined networks (SDNs) are a new network technology that is controlled centrally and intelligently. In this type of network, the management and tracing of packets are entirely the responsibility of the controlling part of it. The main issue of the network’s controlling plane occurs when the network size is large, as in this case, just one controller will not be able to cover the entire network. Therefore, the main challenge in this scenario is finding the right amount and location for the controllers. Clustering is one of the most reasonable viewpoints that can succeed in the complicated management process of large networks and can guarantee load balancing. Using the concept of clustering, a large network is divided into multiple subnetworks in a manner that there will be a controller for each subnetwork. Some matters such as the delay between controllers, load balancing, and reliability are also important considerations in addition to decreasing the delay between the switch and the controller.

4. LAC-KHM: The Proposed Algorithm

LAC-KHM is based on the LAC algorithm, in which each data point is equipped with a learning automaton (LA). The number of actions of each LA equals the number of clusters, and during the learning process, the LA specifies to which cluster its associated data point belongs. The action of each LA is chosen based on the action probability vector (APV). The LA’s decision is compared with the output of the k-means algorithm as a reinforcement signal. However, like k-means, LAC is sensitive to the proper selection of initial points. Therefore, in this research, LAC is improved through KHM, and the distance between data points and cluster centers is calculated with regard to the harmonic distance. The proposed algorithm, LAC-KHM, is formed based on three functions: select cluster, update probability, and calculate accuracy. The LAC-KHM algorithm is shown in Algorithm 1. It is noted that the cluster centers themselves are also updated based on the harmonic distance.
Algorithm 1: LAC-KHM algorithm
This algorithm has three functions with input and output parameters, and operations that follow:

Select Cluster: in fact, during rounds this function specifies to which cluster the data point belongs. It is noted that initially all actions in APV have the same probability.
Input parameters: Membership_cluster, probability, num_cluster, num_data
Output parameter: Membership_cluster
Membership_cluster = Function Select_cluster (membership_cluster, probability, num_cluster, num_data)

Update probability: This function updates the APV using learning rule LRP based on the received reinforcement signal. In fact, with each execution, the probability of the selected action is either decreased or increased based on the harmonic distance between data points and cluster centers.
Input parameters: membership_cluster, probability, num_cluster, position _of_data, signal, alpha, beta
Output parameter: Probability
Probability = Function Update_probability (membership_cluster, probability, num_cluster, position _of_data, signal, alpha, beta)
Calculate accuracy: This function evaluates the accuracy of the algorithm, demonstrating how closely it matches the expected results.
Input parameters: obtained_result, expected_result, num_cluster
Output parameter: Accuracy
Accuracy = Function Calculate accuracy (obtained_result, expected_result, num_cluster)
After initializing parameters, the algorithm keeps on running until output of KHM objective function changes significantly.

Initialize parameters (x, y, until, n, k, d, numaction, probability, a, mask, signal, random centers)
Membership_cluster = Function Select_cluster (membership_cluster, probability, num_cluster, num_data)
   while (KHM changes significantly), do
      for all data points, do
            Call select-action Function (action= actionselection((action, probability, numactions, n))
         end for
         for all data points do
           Calculate Membership of data (m function in KHM)
   Calculate Weights of data (w function in KHM)
   Calculate new_centers according to their Membership and Weights
         end for
         Calculate KHM
     # Compute reinforcement signal
         for all data points do
   if actioni==clusteri :
      signali=0
   else
      signali=1
         for all data points do
            Membership_cluster = Function Select_cluster (membership_cluster, probability, num_cluster, num_data)
            Compute result (feedback of environment)
         end for
          # Update probability vector
        for all data points do
             Call Probability (probability = probabilityupdate(action, probability, numactions, n, signal, alpha, beta))
         end for
end while

5. CLAC-KHM: Customized LAC-KHM for CCP

Clustering algorithms have been applied in various scenarios, including solving the CPP. To solve the CPP, switches are mapped to data points and controllers to cluster centers. In most studies, the similarity criterion in clustering is the delay between the controller and the switch, which is essentially the distance between data points and centers in each cluster. It is also worth mentioning that the most practical algorithm is the one that considers other parameters, such as load balancing and intercontroller delay. Therefore, to solve the CPP, the LAC-KHM algorithm is customized to also consider load balancing and intercontroller distance, in addition to the distance between data points and centers. This means that the LA resident on each data point is rewarded not only when it reduces the distance between the data and cluster center, but also when it improves intercentral cluster and load balancing. As mentioned before, switches and controllers are placed in data points and cluster centers, respectively, and the network is partitioned based on this foundation.

Problem Formulation

SDN is a typical network comprising of controllers, switches, and links, which can be modeled as an undirected graph G = (V, E), where V represents a set of switches and E represents a set of links between the switches. In addition, n denotes the number of nodes in a given graph of switches, k denotes the number of controllers in the SDN, and C = {c1,c2,..,ck} is a set of controllers. This algorithm divides the network into several subnetworks, with each cluster having a controller. Clustering the network is defined using SDNi(Vi, Ei) as follows:
i = 1 k v i = V ; i = 1 k E i = E
S D N i S D N j = , i j , i , j k
S ( S D N i )   = T R U E     i K
S ( S D N i S D N j ) = FALSE , i j , i , j ϵ k
S D N i   i s   a   c o n n e c t e d   r e g i o n   i k
Formula (3) implies that the network is covered with all formed subnetworks. Formula (4) demonstrates that there is no overlapping between subnetworks, and as mentioned, k denotes the number of controllers in the SDN. Formula (5) indicates that the highest similarity can be found between the members of the same cluster. Therefore, all of the switches can be assigned to one controller, and the lowest similarity is between the members of two different and separate clusters, which is demonstrated in Formula (6). Formula (7) indicates that all members of a subnetwork are connected with links. In this research, the similarities are intercontroller delay, controller/switch, and load balancing.
In this research, the objective function (OF) is defined as the following:
Objective   Function = α l b β d S C γ d C C
where l b is denoted the load-balancing parameter. To calculate this parameter, we need to compute N_C, where the ideal range for the number of members in each cluster is defined as follows:
N _ C = n k ± n 2 k
where n and k are the total number of switches and clusters, respectively. Consequently, if the number of members in a cluster is in the range of N_C, they are determined as True and if not, they are considered False.
Finally, l_b is the sum of clusters with the “True” tag, divided by k. The average delay between each switch and its related controller [41] and its normalized formula is demonstrated in (10) and (11).
π a v g ( s c ) = 1 n v V m i n   d ( v , c )
d s c ( n o r m a l i z e d ) = π a v g ( s c ) min ( π a v g s c ) max ( π a v g s c ) min ( π a v g s c )
π a v g ( c c ) = 1 k c i , c j C min d ( C i , C j )
d c c ( n o r m a l i z e d ) = π a v g ( C C ) min ( π a v g C C ) max ( π a v g C C ) min ( π a v g C C )
Similarly, the intercontroller delay, which is calculated using “Dijkstra”, and its normalized format are illustrated in (12) and (13), respectively:
The coefficients α, β, and 𝛾 are still assumed to be in the range of [0, 1]. The values of l_b, dS-C, and dC-C depend on the specific context and units of measurement. These coefficients can be adjusted at any given time. The CLAC-KHM algorithm is demonstrated in Algorithm 2.
Algorithm 2: CLAC-KHM algorithm
Initialize parameters (x, y, n, k, d, k, numaction, probability, a, mask, signal, random centers)
while (KHM changes significantly) do
for all switches do
      Call select-action Function
end for
for all switches do
       Calculate Membership of data (m function in KHM)
        Calculate Weights of data (w function in KHM)
        Calculate new_centers according to their Membership and Weights
        Calculate distance between controllers
        for all clusters: do
       Calculate objective function
     end for
     end for
     Calculate KHM
     for all of switches do
       Compute result (feedback of environment)
     end for
     for all of LAs do
     Call Probability
     end for
end while

6. Experimental Results

In this section, we evaluate LAC-KHM initially with seven datasets and then, the CLAC-KHM is compared with the three aforementioned algorithms on four topologies.

6.1. Performance Evaluation of LAC-KHM

In what follows, LAC-KHM’s efficiency is evaluated via comparisons with k-medians, k-medoids, k-means++, k-means, and standard LAC on seven different datasets, the features of which are displayed in Table 1. In addition, the input parameters of the functions in the LAC-KHM algorithm are also explained. Details of the dataset features and their initial values can be seen in this table as well. Additionally, the parameters of the LA are set according to those of [12].
Similarly, the results of checking the accuracy of the given algorithm compared to the rest are shown in Table 2. As can be seen in this table, LAC-KHM achieves the best results.

6.2. Performance Evaluation of CLAC-KHM

In this section, CLAC-KHM is first compared to k-means, spectral, and LAC, and afterwards, they are all analyzed in a similar condition on four real internet zoo topologies on different scales. The initial values of the objective function in this study are shown in Equation (16):
α = 1 , β = 1 2 , γ = 1 2
Due to the fact that KHM is based on reducing the distance between the center and the points, and load balancing is another factor that relatively guarantees fault tolerance, α is set to 2. Table 3 shows the details of the topologies used in this research. In [42], it is noted that some nodes have no complete information about latitudes and longitudes. Hence, we ignore these nodes throughout our simulations. Table 3 demonstrates the symbols of the paper.
In this research, we calculated the harmonic distance by replacing the Euclidean distance with the haversine distance, which is more appropriate for real-life topologies. The haversine distance is the distance between two data points on a sphere using their latitude and longitude. Therefore, we consider the minimum-delay path between all data points using the haversine distance [43]. The haversine formula uses the central angle Ɵ between every two data points on a sphere as shown in Equation (17), where d and r are the distance and the sphere radius, respectively.
θ = d r
The haversine distance is calculated via the haversine function which equals hav(Ɵ) = sin2(Ɵ), in which we are given a direct calculation of the longitude and latitude of the two points, as elaborated below:
ℎ𝑎v(Ɵ) = ℎ𝑎𝑣(ɸ2 − ɸ1) + 𝑐𝑜𝑠(ɸ1)𝑐𝑜𝑠(ɸ2)ℎ𝑎𝑣(𝜆2 − 𝜆1)
To solve for the distance d, we apply the archaversine (inverse haversine) to h = hav(θ) or use the arcsine (inverse sine) function:
d = r a r c h a v h = 2 r a r e s i n h =
2 r a r c s i n h a v 2 1 + cos 2 cos 1 h a v ( λ 2 λ 1 ) =
2 r arcsin ( s i n 2 ( ϕ 2 ϕ 1 2 ) + cos ϕ 1 c o s ( ϕ 2 ) s i n 2 ( λ 2 λ 1 2 ) )
The ɸ1 and ɸ2 are the latitudes and λ1 and λ2 are the longitudes of data_point1 and data_point2 in our function, respectively.
Since LAC is based on k-means, the CLAC-KHM algorithm is evaluated with standard k-means in addition to LAC. Spectral clustering is a method with roots in graph theory, whereas k-means, k-medoids, and k-median are methods based on the distance between the centers and data points. Therefore, they are different from spectral. That is why we also compared CLAC-KHM with the spectral algorithm on four topologies (Dialtecom, Intellifiber, Iris, and Aarnet) with four different sizes. Table 4 shows the topologies’ details studied throughout our evaluations [42].
Table 5 presents the results. As mentioned previously, the Aarnet topology comprises 19 nodes, and for accommodating this topology, the number of controllers was examined within the range of 3 to 10. Consequently, in the table, you will observe a shaded area representing the number of controllers exceeding 10 for this particular topology.
The given values demonstrate that the delay between switches and controllers in k-means is less compared to that of spectral. However, the values of OF are not higher than spectral in all topologies with any number of controllers. These results determine that the CLAC-KHM achieves better results than the other algorithms as well. For the sake of a better explanation, the OF values are depicted for all algorithms in Figure 1, Figure 2 and Figure 3 for the four topologies.
In this study, it was observed that Dial_telecom is the largest topology, and the spectral algorithm achieved better results compared to k-means. However, as shown in Figure 2, LAC performed as well as the spectral algorithm. Nevertheless, it is noteworthy that CLAC-KHM achieved the best performance in this topology.
Figure 3 indicates the fact that the CLAC-KHM is the most efficient rather than the other representative algorithms. Meanwhile, it depicts that when there are a small number of controllers, the spectral clustering outperforms k-means in terms of OF, and contrarily, with increasing controller numbers, k-means has better results. It is worth bringing up the fact that they have no predictable behaviors in Intellifber.
As we can recognize in Figure 4A,B, the behavior of CLAC-KHM is similar to LAC and k-means while enjoying better performance on the Iris topology and Aarnet topology. In contrast, spectral clustering does not have a rather normal behavior.
From the attained results, it is concluded that the CLAC-KHM leads to better efficiency thanks to utilizing learning automata and KHM.

7. Conclusions and Future Works

In summary, the paper proposed two algorithms, LAC-KHM and CLAC-KHM, for solving the CPP in an SDN. LAC-KHM improved the LAC algorithm by incorporating the KHM method to avoid the sensitivity to the initialization of the algorithm. CLAC-KHM customized LAC-KHM for solving the CPP by considering the three main metrics, which were the distance between the controllers, the distance between controllers and switches, and load balancing. The proposed algorithms were evaluated on four different topologies, and the results showed that they outperformed k-means, spectral, and LAC algorithms. However, the proposed algorithms suffered from high computational complexity. This limitation arose due to the CLAC algorithm relying on the KHM algorithm, which entailed calculating the harmonic mean of distances between each data point and all centers for membership and weight functions. Consequently, this approach incurred a substantial computational burden. On the other hand, the CLA algorithm leveraged the k-means algorithm, which assigns data points to clusters based solely on their proximity to the assigned cluster, significantly reducing the computational complexity by avoiding calculations involving all clusters, which needs to be investigated in future works.

Author Contributions

Conceptualization, A.A., M.J. and M.R.M.; software, A.A.; validation, A.A. and M.J.; formal analysis, A.A.; investigation, A.A.; resources, A.A.; data curation, A.A.; writing—original draft preparation, A.A.; writing—review and editing, A.A. and M.J.; visualization, A.A.; supervision, M.J.; project administration, M.J. and M.R.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data used in this study is available upon request. Researchers interested in accessing the data can contact Azam Amin ([email protected]). We are committed to promoting transparency and facilitating the reproducibility of our research findings.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
SDNSoftware-defined network
CPPController placement problem
LALearning automata
KHMK-Harmonics mean
DBCPDensity-based controller placement

References

  1. Anil, K.; Jain, A.K.; Dubes, R.C. Algorithms for Clustering Data; Prentice-Hall: Upper Saddle River, NJ, USA, 1988. [Google Scholar]
  2. Liu, Q.; Kang, B.; Hua, Q.; Wen, Z.; Li, H. Visual Attention and Motion Estimation-Based Video Retargeting for Medical Data Security. Secur. Commun. Netw. 2022, 2022, 1343766. [Google Scholar] [CrossRef]
  3. Arora, N.; Singh, A.; Al-Dabagh, M.Z.N.; Maitra, S.K. A Novel Architecture for Diabetes Patients’ Prediction Using K-Means Clustering and SVM. Math. Probl. Eng. 2022, 2022, 4815521. [Google Scholar] [CrossRef]
  4. Granda Morales, L.F.; Valdiviezo-Diaz, P.; Reátegui, R.; Barba-Guaman, L. Drug Recommendation System for Diabetes Using a Collaborative Filtering and Clustering Approach: Development and Performance Evaluation. J. Med. Internet Res. 2022, 24, e37233. [Google Scholar] [CrossRef] [PubMed]
  5. Septiarini, A.; Hamdani, H.; Sari, S.U.; Hatta, H.R.; Puspitasari, N.; Hadikurniawati, W. Image Processing Techniques for Tomato Segmentation Applying K-Means Clustering and Edge Detection Approach. In Proceedings of the 2021 International Seminar on Machine Learning, Optimization, and Data Science (ISMODE), Jakarta, Indonesia, 29–30 January 2022; IEEE: Piscataway, NJ, USA, 2022; pp. 92–96. [Google Scholar]
  6. Avilov, M.; Shichkina, Y.; Kupriyanov, M. Using Clustering Methods of Anomalies and Neural Networks to Conduct Additional Diagnostics of a Computer Network. In Intelligent Distributed Computing XIV; Springer International Publishing: Cham, Switzerland, 2022; pp. 193–202. [Google Scholar]
  7. Yuan, L.; Chen, H.; Gong, J. Interactive Communication with Clustering Collaboration for Wireless Powered Communication Networks. Int. J. Distrib. Sens. Netw. 2022, 18, 15501477211069910. [Google Scholar] [CrossRef]
  8. Kumari, A.; Sairam, A.S. Controller Placement Problem in Software-Defined Networking: A Survey. Networks 2021, 78, 195–223. [Google Scholar] [CrossRef]
  9. Heller, B.; Sherwood, R.; McKeown, N. The Controller Placement Problem. ACM SIGCOMM Comput. Commun. Rev. 2012, 42, 473–478. [Google Scholar] [CrossRef]
  10. Ul Huque, M.T.I.; Si, W.; Jourjon, G.; Gramoli, V. Large-Scale Dynamic Controller Placement. IEEE Trans. Netw. Serv. Manag. 2017, 14, 63–76. [Google Scholar] [CrossRef]
  11. Narendra, K.S.; Thathachar, M.A. Learning Automata—A Survey. IEEE Trans. Syst. Man Cybern. 1974, 4, 323–334. [Google Scholar] [CrossRef]
  12. Hasanzadeh-Mofrad, M.; Rezvanian, A. Learning Automata Clustering. J. Comput. Sci. 2018, 24, 379–388. [Google Scholar] [CrossRef]
  13. Rokach, L.; Maimon, O. Clustering Methods. In Encyclopedia of Data Warehousing and Mining, 2nd ed.; Wang, J., Ed.; IGI Global: Hershey, PA, USA, 2009; pp. 254–258. [Google Scholar]
  14. Grover, N. A Study of Various Fuzzy Clustering Algorithms. Int. J. Eng. Res. 2014, 2, 177–181. [Google Scholar] [CrossRef]
  15. Bora, D.J.; Gupta, D.; Kumar, A. A Comparative Study between Fuzzy Clustering Algorithm and Hard Clustering Algorithm. arXiv 2014, arXiv:1404.6059. [Google Scholar]
  16. Reynolds, A.P.; Richards, G.; de la Iglesia, B.; Rayward-Smith, V.J. Clustering Rules: A Comparison of Partitioning and Hierarchical Clustering Algorithms. J. Math. Model. Algorithms 2006, 5, 475–504. [Google Scholar] [CrossRef]
  17. Huang, Z. Extensions to the k-Means Algorithm for Clustering Large Data Sets with Categorical Values. Data Min. Knowl. Discov. 1998, 2, 283–304. [Google Scholar] [CrossRef]
  18. Zhang, B.; Hsu, M.; Dayal, U. K-Harmonic Means-A Data Clustering Algorithm. Hewlett-Packard Labs Technical Report HPL-99-124. 1999. Available online: http://shiftleft.com/mirrors/www.hpl.hp.com/techreports/1999/HPL-1999-124.pdf (accessed on 20 June 2022).
  19. Kaufman, L.; Rousseeuw, P.J. Clustering by Means of Medoids. In Statistical Data Analysis Based on the L1-Norm and Related Methods; Dodge, Y., Ed.; North-Holland: Amsterdam, The Netherlands, 1987; pp. 405–416. [Google Scholar]
  20. Dussert, C.; Rasigni, G.; Rasigni, M.; Palmari, J.; Llebaria, A. Minimal Spanning Tree: A New Approach for Studying Order and Disorder. Phys. Rev. B 1986, 33, 3528–3531. [Google Scholar] [CrossRef] [PubMed]
  21. Urquhart, R. Graph Theoretical Clustering Based on Limited Neighbourhood Sets. Pattern Recognit. 1982, 15, 173–187. [Google Scholar] [CrossRef]
  22. Cheng, W.; Wang, W.; Batista, S. Grid-Based Clustering. Data 2018, 3, 25. [Google Scholar]
  23. Kriegel, H.P.; Kröger, P.; Sander, J.; Zimek, A. Density-Based Clustering. Wiley Interdiscip. Rev. Data Min. Knowl. Discov. 2011, 1, 231–240. [Google Scholar] [CrossRef]
  24. McNicholas, P.D. Model-Based Clustering. J. Classif. 2016, 33, 331–373. [Google Scholar] [CrossRef]
  25. Honarpazhooh, S. Controller Placement in Software-Defined Networking Using Silhouette Analysis and Gap Statistic. Turk. J. Comput. Math. Educ. 2021, 13, 4848–4863. [Google Scholar]
  26. Liao, J.; Sun, H.; Wang, J.; Qi, Q.; Li, K.; Li, T. Density Cluster Based Approach for Controller Placement Problem in Large-Scale Software Defined Networkings. Comput. Netw. 2017, 112, 24–35. [Google Scholar] [CrossRef]
  27. Xiaolan, H.; Muqing, W.; Weiyao, X. A Controller Placement Algorithm Based on Density Clustering in SDN. In Proceedings of the 2018 IEEE/CIC International Conference on Communications in China (ICCC), Beijing, China, 16–18 August 2018; pp. 184–189. [Google Scholar]
  28. Yujie, R.; Muqing, W.; Yiming, C. An Effective Controller Placement Algorithm Based on Clustering in SDN. In Proceedings of the 2020 IEEE 6th International Conference on Computer and Communications (ICCC), Chengdu, China, 11 December 2020; pp. 2294–2299. [Google Scholar]
  29. Chen, J.; Xiong, Y.; He, D. A Density-based Controller Placement Algorithm for Software Defined Networks. In Proceedings of the 2022 IEEE International Conferences on Internet of Things (iThings) and IEEE Green Computing & Communications (GreenCom) and IEEE Cyber, Physical & Social Computing (CPSCom) and IEEE Smart Data (SmartData) and IEEE Congress on Cybermatics (Cybermatics), Espoo, Finland, 22–25 August 2022; pp. 287–291. [Google Scholar]
  30. Rodriguez, A.; Laio, A. Clustering by Fast Search and Find of Density Peaks. Science 2014, 344, 1492–1496. [Google Scholar] [CrossRef]
  31. Xiao, P.; Qu, W.; Qi, H.; Li, Z.; Xu, Y. The SDN Controller Placement Problem for WAN. In Proceedings of the 2014 IEEE/CIC International Conference on Communications in China (ICCC), Shanghai, China, 13–15 October 2014; pp. 220–224. [Google Scholar]
  32. Xiao, P.; Li, Z.Y.; Guo, S.; Qi, H.; Qu, W.Y.; Yu, H.S. AK Self-Adaptive SDN Controller Placement for Wide Area Networks. Front. Inf. Technol. Electron. Eng. 2016, 17, 620–633. [Google Scholar] [CrossRef]
  33. Lu, J.; Zhen, Z.; Hu, T. Spectral Clustering Based Approach for Controller Placement Problem in Software Defined Networking. J. Phys. Conf. Ser. 2018, 1087, 042073. [Google Scholar] [CrossRef]
  34. Sahoo, K.S.; Sahoo, B.; Dash, R.; Tiwary, M. Solving Multi-Controller Placement Problem in Software Defined Network. In Proceedings of the 2016 International Conference on Information Technology (ICIT), Bhubaneswar, India, 21–24 December 2016; pp. 188–192. [Google Scholar]
  35. Zhao, Z.; Wu, B. Scalable SDN Architecture with Distributed Placement of Controllers for WAN. Concurr. Comput. Pract. Exp. 2017, 29, e4030. [Google Scholar] [CrossRef]
  36. Wang, G.; Zhao, Y.; Huang, J.; Duan, Q.; Li, J. A K-means-based network partition algorithm for controller placement in software defined network. In Proceedings of the 2016 IEEE International Conference on Communications (ICC), Kuala Lumpur, Malaysia, 22–27 May 2016; pp. 1–6. [Google Scholar]
  37. Kuang, H.; Qiu, Y.; Li, R.; Liu, X. A Hierarchical K-Means Algorithm for Controller Placement in SDN-Based WAN Architecture. Proceedings 2018, 2, 78. [Google Scholar]
  38. Zhu, L.; Chai, R.; Chen, Q. Control Plane Delay Minimization Based SDN Controller Placement Scheme. Proceedings 2017, 1, 536. [Google Scholar]
  39. Bouzidi, E.H.; Outtagarts, A.; Langar, R.; Boutaba, R. Dynamic clustering of software defined network switches and controller placement using deep reinforcement learning. Comput. Netw. 2022, 207, 108852. [Google Scholar] [CrossRef]
  40. Narendra, K.S.; Thathachar, M.A. Learning Automata: An Introduction. Entropy 2012, 14, 1415–1463. [Google Scholar]
  41. Torkamani-Azar, S.; Jahanshahi, M. A New GSO Based Method for SDN Controller Placement. Comput. Commun. 2020, 163, 91–108. [Google Scholar] [CrossRef]
  42. The Internet Topology Zoo. Available online: http://www.topology-zoo.org/ (accessed on 1 April 2023).
  43. Sminesh, C.N.; Kanaga, E.G.M.; Sreejish, A.G. A Multi-Controller Placement Strategy in Software Defined Networks Using Affinity Propagation. Int. J. Internet Technol. Secur. Trans. 2020, 10, 229–253. [Google Scholar] [CrossRef]
Figure 1. Diagram illustrating different clustering techniques.
Figure 1. Diagram illustrating different clustering techniques.
Applsci 13 10073 g001
Figure 2. Objective functions for all algorithms on Dial_Telecom.
Figure 2. Objective functions for all algorithms on Dial_Telecom.
Applsci 13 10073 g002
Figure 3. Objective functions for all algorithms on Intellifber.
Figure 3. Objective functions for all algorithms on Intellifber.
Applsci 13 10073 g003
Figure 4. Objective functions for all algorithms on Iris and Aarnet topologies.
Figure 4. Objective functions for all algorithms on Iris and Aarnet topologies.
Applsci 13 10073 g004
Table 1. The details of the datasets used in this research.
Table 1. The details of the datasets used in this research.
DatasetInstancesDimensionsClustersMembership_ClusterLA Initial Prob
BCW68310221/2
Sonar20860221/2
CMC14739331/3
Hayes-Roth1325331/3
Ionosphere53134221/2
Sonar20860221/2
Pima7688221/2
Table 2. Accuracies of the algorithms.
Table 2. Accuracies of the algorithms.
DatasetK-MeansK-Means++K-MedoidLACLAC-KHM
BCW0.50 ± 0.000.54 ± 0.000.50 ± 0.000.45 ± 0.000.50 ± 0.01
Sonar0.49 ± 0.060.49 ± 0.060.49 ± 0.060.51 ± 0.040.54 ± 0.01
CMC0.33 ± 0.040.32± 0.000.32 ± 0.000.34 ± 0.020.35 ± 0.01
Hayes-Roth0.36 ± 0.030.41 ± 0.020.41 ± 0.020.42 ± 0.020.42 ± 0.02
Ionosphere0.46 ± 0.030.48 ± 0.000.48 ± 0.000.48 ± 0.000.48 ± 0.01
Sonar0.58 ± 0.210.78 ± 0.160.78 ± 0.160.90 ± 0.010.92 ± 0.11
Pima0.49 ± 0.000.51 ± 0.000.51 ± 0.000.50 ± 0.000.52 ± 0.01
Table 3. Symbols of the paper.
Table 3. Symbols of the paper.
Parameter_SymbolExplanation
α(LA)Actions
β(LA)Reinforcement signal
PAction’s probability
TThe learning algorithm
aReward parameter
bPenalty parameter
VSet of switches
ESet of links
L_BLoad-balancing coefficient
d ( v , c ) Delay between switches and controller
d ( c , c ) Delay between controllers
α(OF)Coefficient of load balancing
β(OF)Coefficient of delay between switches and their related controller
γ (OF)Coefficient of delay between controllers
nNumber of the switches
kNumber of the controllers
N _ C Number of members in each cluster
π a v g ( s c ) The average delay between each switch and its related controller
π a v g ( c c ) The average delay between controllers
d s c Normalization of π a v g ( s c )
d c c Normalization of π a v g ( c c )
Table 4. Features of the topologies.
Table 4. Features of the topologies.
Number of NodesNumber of SwitchesNumber of EdgesGeographical AreaGeographical Location
Dial telecom193151countryCzech Republic
Aarnet1924countryAustralia
Intellifiber7397countryUSA
Iris5164regionTennessee, USA
Table 5. Results of CLAC-KHM with 4 topologies.
Table 5. Results of CLAC-KHM with 4 topologies.
Dial TelecomIntellifiberIrisAarnet
NOCS-CC-COFS-CC-COFS-CC-COFS-CC-COF
K-means318.770.960.5121.943.370.527.221.67-0.0819.7713.08-0.2
66.380.530.717.591.860.422.210.840.3613.086.670.29
83.90.450.724.781.640.471.350.670.511.655.480.27
102.750.420.683.321.40.710.910.58620.644.220.63
151.480.320.651.651.180.450.410.440.65
200.920.280.660.980.930.540.240.350.53
Spectral320.571.090.2722.353.410.587.781.250.5923.579.470.42
66.310.540.758.441.690.712.320.80.697.886.790.02
83.950.460.755.281.410.71.40.610.733.763.59-0.21
102.870.41863.351.340.590.960.530.593.73.290.6
151.870.290.672.111.030.30.650.370.56
2010.250.71.410.90.370.540.270.01
LAC317.780.950.5820.143.010.536.721.370.2117.7712.080.1
66.030.430.796.121.440.521.080.750.659.145.430.38
83.540.40.84.781.640.580.640.570.711.655.460.34
102.210.310.862.761.220.770.770.520.740.613.220.66
151.230.260.611.431.020.60.380.380.78
200.920.280.670.870.750.680.210.220.65
LAC-KHM316.770.890.5918.652.340.656.451.140.4515.555.320.43
66.130.390.85.241.120.740.990.680.697.235.880.47
83.320.360.884.121.340.770.610.520.751.044.430.39
101.970.290.912.061.010.810.740.50.790.543.120.71
151.120.260.691.060.780.650.320.350.82
200.880.210.70.660.630.750.170.180.75
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Amin, A.; Jahanshahi, M.; Meybodi, M.R. Improved Learning-Automata-Based Clustering Method for Controlled Placement Problem in SDN. Appl. Sci. 2023, 13, 10073. https://doi.org/10.3390/app131810073

AMA Style

Amin A, Jahanshahi M, Meybodi MR. Improved Learning-Automata-Based Clustering Method for Controlled Placement Problem in SDN. Applied Sciences. 2023; 13(18):10073. https://doi.org/10.3390/app131810073

Chicago/Turabian Style

Amin, Azam, Mohsen Jahanshahi, and Mohammad Reza Meybodi. 2023. "Improved Learning-Automata-Based Clustering Method for Controlled Placement Problem in SDN" Applied Sciences 13, no. 18: 10073. https://doi.org/10.3390/app131810073

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop