An ML-Assisted Multi-Objective Butterfly Optimization Framework for Adaptive Energy-Efficient Clustering in Wireless Sensor Networks
A
NupurParashar1Emailnupur.parashar25@gmail.com
Dr.
SandeepKumarJain1Emailsandeepzen3112@gmail.com1Dr. BhimRao Ambedkar UniversityAgraIndia
Nupur Parashar1, Dr. Sandeep Kumar Jain2
1Dr. BhimRao Ambedkar University, Agra, India
Email: nupur.parashar25@gmail.com
2Dr. BhimRao Ambedkar University, Agra, India
Email: sandeepzen3112@gmail.com
Abstract
This paper presents a machine-learning based multi-objective butterfly optimization algorithm for dynamic cluster head selection in a wireless sensor network. This method integrates machine learning to predict Pareto-optimal solutions, thus reducing the computational time by reusing previously generated Pareto-optimal front. The multi-objective optimization integration allows to find out the best trade-off solutions of CHs. Simulation results demonstrate that the proposed framework significantly enhanced energy consumption, network lifetime, and throughput and reduced delay as compared to baseline algorithms LEACH and butterfly optimization algorithm. The proposed method achieves 40–50% higher throughput and prolonged residual energy retention. The lifetime is increased up to 5× as compared to baseline butterfly optimization algorithm and 6× compared to LEACH.
Keywords:
Butterfly Optimization Algorithm
Machine Learning
Multi Objective Optimization
Optimization Techniques
Wireless Sensor Networks
The optimization of cluster head selection in Wireless sensor networks (WSNs) involves a number of parameters to be considered. CH selection directly affects the performance of the network (Biradar, 2022). But efficient CH selection involves several conflicting objectives. Nodes in WSNs have limited battery power, hence designing an efficient clustering mechanism while balancing multiple parameters is crucial (Ghadi, 2024). Many optimization techniques consider residual energy, distance, delay, throughput, number of cluster heads, cluster density etc., while developing techniques for efficient cluster head (CH) selection (Mehta, 2020).
A
However, these parameters does not exhibit harmony with each other. Improving one deteriorates another. These different parameters exhibits a trade-off amongst themselves which needs to be taken care of as per the objective of the technique proposed (Kaviarasan,
2023). For example, increasing the number of CHs may reduce intra-cluster distance and delay but raises the total energy expenditure due to extra inter-cluster transmissions. Similarly, minimizing communication distance may give rise to faster energy depletion (Alshammri,
2025). Selecting the most appropriate trade-off is difficult task because no single solution can simultaneously satisfy all performance goals (Mehta,
2020).
Traditional single-objective techniques fail to capture complex trade-offs in selecting optimal CHs (Rami Reddy, 2023). Hence, multi-objective optimization (MOO) provides a better alternative that takes care of multiple objectives by creating the best suited trade-off between them (Singh, 2021). Many MOO techniques have been developed by the researchers which creates trade-off among different parameters and provide a Pareto optimal front which has solutions representing different feasible trade-off among competing objectives such as energy efficiency, delay, and network stability (Kumar, 2024) (Bali, 2022). Many multi-objective variants like NSGA-II, MOPSO and based on bio-inspired metaheuristics such as Butterfly Optimization Algorithm (BOA) have shown well-distributed Pareto fronts that enhance WSN performance due to their adaptability and global search capability (Houssein, 2024) (Tawfeek, 2025).
Despite this advantage, these metaheuristic based algorithms are high in computational cost and have limited adaptability. Rerunning these algorithms significantly increases energy consumption and time complexity. These algorithm also lacks adaptability to changing network configurations (Houssein, 2024). In real-time deployments such as internet of Things (IoT) applications such as smart cities and environmental monitoring systems, frequent re-clustering in response to dynamics of the network might lead more high energy depletion and latency. This demands techniques which are more intelligent and adaptive so as to learn the clustering patterns and predict optimal configurations without exhaustive re-computation (Ding, 2021).
To address these limitations, this paper introduces an ML driven multi-objective butterfly optimization (ML-MOBOA) for adaptive and efficient CH selection. The proposed framework leverages the exploration and exploitation of BOA using ML based learning to predict the Pareto-based CH set. It integrates machine learning with multi-objective optimization to dynamically predict optimal CH configurations by learning Pareto front characteristics. This helps in reducing re-clustering frequency and computational overhead, leading to extended network lifetime and improve throughput and delay. Moreover, the proposed scheme uses Time-to-Live (TTL) and Pareto reuse policies to enhance the stability of the network till farther rounds.
A
2. Background and related works
2.1. Related works
In the recent years, many researchers have tried to optimize CH selection using swarm based techniques (Houssein, 2024). These techniques have been integrated with either machine learning or multi-objective optimization to further enhance the performance and output.
A hybrid approach, (Rakesh Kumar Godi, 2025), proposed multi-objective CH selection with objective of security and stability. They combined Zebra and Bitterling Fish Optimization Algorithm with the objective to minimizing latency and preventing data packet loss. The method reported high throughput. Multi-objective optimization has been explored a lot in the recent years. (Sabaresan, et al., 2024) proposed an Efficient Wireless Sensor Network with Multi-Objective Clustering, or EEMOC. Fuzzy logic is used for clustering to control hotspots and optimizing energy distribution. Multi-objective optimization integrated with swarm based approaches provided much better results. In (Pichamuthu, et al., 2025), a Multi-Objective Salp Swarm Algorithm-MSSA is proposed to enhance the network lifetime and energy efficiency by optimizing CH selection. This algorithm outperformed the benchmark algorithms in terms of energy consumption, lifetime elongation, and data transmission efficiency. Similarly, (Songhao Jia, 2025) proposed an energy-efficient clustering algorithm which combines K-means + + initialization with the multi-objective Chaotic mapping Walrus Optimization Algorithm (CM-WaOA). The objective is to balance residual energy of node, cluster head to base station distance, inter cluster head distance, and intra cluster node count. It achieved highest average residual energy, least dead nodes and shortest network delay under different node densities.
Butterfly optimization algorithm has been extensively used for CH selection in many papers. (M. Devika, 2024) proposed a Deep Reinforcement Learning Based Butterfly Optimization Algorithm (DRL-BOA) to enhance the exploration and exploitation capabilities of BOA. The adaptive capability of DRL is used to select CHs and optimal route. (Prachi Maheshwari, 2021) used butterfly optimization algorithm in combination with Ant colony optimization for CH selection and routing respectively. They have used weighted fitness function for CH selection. (Saghi & Aghdasi, 2024) performed clustering using butterfly optimization algorithm. A fitness function with parameters intra-cluster distances, cluster members, node distance, residual energy was defined. The results were better compared to base-method.
From the literature review it can be seen that the machine learning integration is limited. None of the butterfly optimization papers explicitly implements Pareto-based multi-objective optimization and machine learning. None of the review papers use machine learning to predict fitness values or Pareto-optimal solutions in advance. Also, minimizing the frequency of re-clustering while maintain network stability is a challenge. The proposed method in this paper uses Pareto-based multi-objective optimization and ML prediction to dynamically guide CH selection and improve overall network efficiency.
2.2. Motivation
Traditional metaheuristic-based clustering methods such as BOA often require heavy computation of fitness values for each CH candidate in each butterfly for each re-clustering phase. Which is quite high. Integrating machine learning to this can enable faster CH selection and reduce complexity of exploration and exploitation in BOA itself. ML can help in predicting suitable cluster head configurations without re-running the entire optimization procedure.
Apart from this computational overhead, the weighted fitness function might not always choose the best trade-off among different parameters (residual energy, distance, node degree, node centrality). To achieve the best trade-off, multi-objective optimization is needed. By training on Pareto-optimal data obtained from multi-objective optimization, the ML model can learn the inherent trade-offs. This would allow the system to dynamically balance these objectives during the BOA clustering phase, thus improving the final CH set.
Consequently, ML-guided BOA exploration of global and local optimization combined with Pareto-based multi-objective CH selection can lead to longer network lifetime, enhanced energy efficiency, and improved clustering stability.
3. Proposed framework
3.1. Overview
Maheshwari et al. (2021) proposed a hybrid energy-efficient clustering and routing protocol for wireless sensor networks using Butterfly Optimization Algorithm (BOA) and Ant Colony Optimization (ACO). In that, the BOA for CH selection uses a multi-parameter fitness function using residual energy, distance, node degree and node centrality all aggregated using a weighted-sum formulation. The problem with this is that the fitness evaluation is expensive as so much of calculation is required and if the population is large, then it increases multi fold. Another problem with this BOA implementation is that the single weighted fitness function may not use the most optimal trade-offs among the different parameters.
Inspired from that, we present a ML-guided Multi-Objective BOA (ML-MOBOA) framework, which replaces the fitness function with a Pareto-based multi-objective CH selection and instead of one weighted sum, a set of non-dominated solutions are considered to select the best tradeoff.
The machine learning integration helps predict the objective values for each candidate solution and the probability of Pareto-optimality. The BOA then uses these predicted values instead of re-computing the real objectives every time.
3.2. Problem Formulation
We consider a wireless sensor network consisting of N nodes randomly deployed in a 2D area with one base station (BS). Our aim is to select an optimal set of CHs which maintains the best tradeoff among different parameters like residual energy, distance, node densities etc. and provide high network lifetime, better energy management, and lowest possible delay.
The CH configuration of each butterfly in the butterfly optimization algorithm is represented as below.
……………………………
Where
represents i
th node as a cluster head.
The Pareto front is generated based on following five conflicting objectives (derived from Maheswari et al., 2021):
1.f1: Minimize reciprocal of residual energy of CHs
2.f2: Minimize average distance between nodes and their nearest CH
3.f3: Minimize CH-to-BS distance
4.f4: Minimize cluster size imbalance (node degree variation)
5.f5: Minimize intra-cluster centrality measure
These objectives helps in selecting balanced CH sets.
3.3. Multi-objective Butterfly Optimization Algorithm (MOBOA)
In the proposed multi-objective version, instead of minimizing a weighted scalar objective, a fast non-dominated sorting approach is used to find out diverse trade-offs among objectives. Butterflies with higher Pareto ranks participate in global exploration and dominated solutions focus on local search.
The re-clustering happens when any of the below conditions hold true:
The energy is significantly reduced by a certain percentage (≥ 30%).
Node death rate (≥ 15%) is observed.
Cluster lifetime threshold is reached.
This mechanism avoids unnecessary re-clustering and reduces computational overhead.
3.4. ML surrogate (classifier + regressor)
We have introduced Ml-based classifier and regressor to predict Pareto probability of a CH set and approximate objective function values, respectively. This adds to MOBOA ability to perform optimal CH selection. A lightweight Random Forest Regressor and Logistic Regression Classifier are used. The training happens after each re-clustering on the dataset mentioned below:
Input: normalized position vectors of candidate CH sets.
Target output: five-objectives vectors [f1, f2, f3, f4, f5]
Labels: binary (1 for Pareto-optimal, 0 otherwise)
With the help of this regressor and classifier models, the recalculation of all five objective functions for each butterfly is replaced by the approximation of these values and Pareto probability for new candidates. The ML model guides the selection of butterflies for global or local search using the predicted values for “fragrance”. This helps in reducing computational time require for evaluations and maintains the exploration quality.
3.5. Energy and communication model
The energy model for energy deduction of nodes and the CHs are first-order radio model.
According to which, the transmission energy and the reception energy in data transfer is calculated using the following equations:
…………………………
……………………………….
Where
.
The non-CH members collect data and transfer to the CHs as per TDMA scheduling, the CHs in turn forwards the data to the BS in a multi-hop way.
3.6. Simulation Workflow
Below we present the complete work flow of the proposed ML-MOBOA for CH selection.
1.Network initialization: Randomly initialize N nodes within a defined area (e.g., 200×200 m2). Also calculate distance between nodes and node-to-BS distances.
2.Initialize Butterfly population: Initialize butterfly population. Each corresponds to a cluster configuration.
3.Multi-Objective evaluation of each butterfly: Each butterfly is evaluated on five objective functions: energy efficiency (f1), Intra-cluster distance (f2), CH-BS distance (f3), node degree (f4), and compactness (f5). All these functions collectively form the multi-objective fitness of the butterfly.
4.Pareto front extraction: Pareto dominance sorting is used to find the Pareto optimal front. The Pareto front contains many CH configurations that trade off different objectives.
5.ML surrogate model training: The ML training helps to reduce computations in future iterations.
6.BOA search and ML-guided update: In this step the butterfly fragrance is calculated and based on that the global search and local search is done. In this, before accepting a new position, the ML classifier predicts its Pareto likelihood. ML regressor estimates the fitness value to predict the fragrance. If the new butterflies are better they replace the existing butterflies.
7.Pareto front refinement and ML retraining: The Pareto front is recalculated on the basis of all explored solutions. The ML model is retrained using the enlarged dataset to improve prediction accuracy.
8.Selecting CH sets for WSN operation: Each round either chooses the best scalarized CH set or use round-robin selection to distribute load.
9.WSN communication simulation: In each round, each non-CH node sends its data to the assigned CH, compute transmission and reception energy consumption, and delay. The CHs aggregate members’ data and forwards to the BS using multi-hop transmission.
10.Adaptive re-clustering policy: The re-clustering happens as discussed in section 3.3.
11.Results and visualization: Plot graphs based on the performance metrics- residual energy, throughput, delay, network lifetime.
4. Experimental setup and Results
To evaluate the proposed algorithm, we have simulated the algorithm with parameters as given in Table 1. To validate the results, we compare the proposed algorithm against LEACH protocol and baseline BOA algorithms.
Table 1
Parameter Name | Parameter Value |
|---|
Number of nodes | 100 |
Network Size | 200X200m2 |
BS's location | (100,100) |
Initial Energy | 0.5J |
Size of data packet | 4000 bits |
Eelec | 50nJ/bit |
Efs | 10pJ/bit/m2 |
Emp | 0.0013pJ/bit/m4 |
EDA | 5nJ/bit/m4 |
The residual energy, alive nodes, throughput and average delay plots are as given in the Fig. 1. The residual energy represents the energy left of all the nodes in the network. The alive nodes counts the number of nodes which have some energy left with them. It shows for how long the network was functional. The throughput is calculated as the number of data packets successfully delivered to the Base Station (BS) per round. It tell the productivity of the network amid energy depletion, routing, and node deaths.
Throughput = number of data packets successfully delivered to the Base Station (BS) per round.
The average delay is calculated as the time taken for the packets to reach the BS form the source node to destination, i.e. node to CH and CH to BS.
The residual energy and alive nodes graphs show gradual decrement over time for ML-MOBOA, whereas LEACH and BOA show rapid depletion within 2000 rounds.
The lifetime graphs shows that ML-MOBOA significantly extends both the stability and network lifetime of the network.
The throughput stays much higher for the proposed algorithm and declines slowly. Whereas the delay is least among all the three algorithms and then slightly increases as the network ages.
Table 2. presents simulation summary for the three algorithms for some more performance metrics like first node dead, last node dead, stability and re-clustering overhead. It can be seen clearly that ML-MOBOA achieves a significantly higher FND which is nearly 2.5× higher than LEACH and BOA individually. The stability period is calculated as: Stability Period = LND − FND. It represents how long the network remains partially alive between first and last node death. Longer stability period means balanced energy consumption and load distribution, whereas shorter stability signifies rapid energy depletion after first node death. The LND is also much higher for ML-MOBOA.
The average re-clustering overhead is defined as the average computational time taken to re- cluster the network. It is negligible for LEACH because the in LEACH the re-clustering is probabilistic and instantaneous. It happens using simple random threshold and not any iterative computation. The overhead for the proposed method is much higher than LEACH and BOA because of ML and multi-objective optimization integration. However
Table 2
Simulation summary of algorithms
Performance Metric | LEACH | BOA | ML-MOBOA (proposed) |
|---|
First Node Dead (FND) | 80 | 85 | 250 |
Last Node Dead (LND) | 1586 | 1953 | > 10000 |
Stability Period | 1506 | 1868 | ~ 1900+ |
Average Re-clustering Overhead (s) | 0.00 | 1.91 | 461.86 |
Figure 2. shows the re-clustering interval of LEACH, BOA and the proposed ML-MOBOA. The box plot shows the distribution of intervals, in rounds, between re-clustering events for each algorithm. The median interval for LEACH, BOA and ML_MOBOA are 40–60, 60–80, 400–600 rounds respectively. The largest interval for ML-MOBOA is attributed to ML based Pareto-front learning. For fairness in comparison, same Time-to-Live (TTL) parameter and conditions are used for all three algorithms as re-clustering trigger.
The re-clustering frequency data obtained through simulations is summarized in Table 3 below.
Table 3
Re-clustering frequency for the algorithms
LEACH | 25–30 re-clustering events till 1586 rounds |
|---|
BOA | 18–20 re-clustering events till 1953 rounds |
ML-MOBOA | ~ 22 major re-clustering over 10000 rounds |
5. Discussion
The simulation results provides a comprehensive comparison of LEACH, BOA and ML-MOBOA in terms of energy efficiency, network stability, re-clustering overhead, throughput and delay.
The comparative analysis shows that the proposed algorithm ML-MOBOA exhibits clear improvement in all four metrics- residual energy, alive nodes, throughput and delay. As shown in Fig. 1, the total residual energy of ML-MOBOA decreases gradually over time, whereas LEACH and BOA experience rapid depletion within the first 2000 rounds. This demonstrates the effectiveness of multi-objective optimization and ML-based CH selection in balancing energy consumption across the network.
From the alive nodes plot we can clearly see that the network stability is high for ML-MOBOA. The network is alive up to 10000 rounds as against 2000 for the other two algorithms. This is due to the dynamic re-clustering strategy following the Pareto-front model learning. The FND and LND for ML-MOBOA is much higher than LEACH and BOA. This shows lasting network lifetime by ML-MOBOA. This is due to the ML-based learning.
The higher throughput reflects better data delivery and sustained network connectivity. The increased delay in later rounds is the result of longer multi-hop transmission as network ages.
The re-clustering logs analysis shows that LEACH performs re-clustering every 50–60 rounds on average, while BOA performs every 90–100 rounds. In contrast, ML-MOBOA exhibits the longest re-clustering intervals of around 400–600 rounds. This is reflected in its adaptive capability to re-cluster only when some major even happens like TTL expiry or energy drop up to a threshold.
From the experimental finding we can validate that the integration of machine learning prediction with multi-objective BOA reduces the computational overhead by reusing Pareto solutions between re-clustering events. The proposed framework provides a stable and adaptable network performance.
6. Conclusion and future work
This paper presented an ML-MOBOA framework which integrates machine learning with multi-objective optimization for adaptive CH selection in WSNs. The proposed framework leverages the learning capability of ML to select the optimal butterfly and enhance the global and local exploration using the prediction capability of ML. Thus dynamically reusing the previously optimized Pareto fronts to minimize redundant re-clustering. The simulation results confirms that ML-MOBOA outperforms the baseline LEACH and BOA algorithms in reducing energy consumption, enhancing network lifetime, increasing the throughput and reducing delay.
Although, re-clustering overhead is higher due to ML training and Pareto sorting, its reduced frequency balances that.
These results shows the effectiveness of ML-MOBOA for CH selection. The algorithm can be further enhanced by integrating with more adaptive clustering and routing algorithm. Additionally, to reduce computational costs lightweight incremental learning models could be explored. Another improvement could be through online learning and mobility-aware extensions.
A
Author Contribution
The corresponding author, Nupur Parashar , designed the whole methodology and idea, wrote the main manuscript text, did the simulation experiments, generated plots and analysed the data from those plots. Dr. Sandeep Jain reviewed the manuscript and provided corrections and improvements.
A
Data Availability
The research data obtained through simulation are provided in the manuscript.
References
Alshammri, G. (2025). Enhancing wireless sensor network lifespan and efficiency through improved cluster head selection using improved squirrel search algorithm. Artificial Intelligence Review, 58(3), 79.
A
Bali, H. G. A. C. A. A. D. A. F. A. S. a. M. J., 2022. Multi-objective energy efficient adaptive whale optimization based routing for wireless sensor network.
Energies, 15(14), p. 5237.
Biradar, D. D. D. C. K. (2022). Efficient clustering using modified bacterial foraging algorithm for wireless sensor networks. Wireless Personal Communications, 126(4), 3103–3117.
Ding, Q. Z. R. L. H., & a., M. M. (2021). An overview of machine learning-based energy-efficient routing algorithms in wireless sensor networks. Electronics, 10(13), 1539.
A
Ghadi, Y. M. T. A., & S. T. S. T. S. U. A. A. a. H. H., 2024. Machine learning solutions for the security of wireless sensor networks: A review.
IEEE Access, 12, pp. 12699–12719.
Houssein, E. S. M. D. (2024). Y. H. G. A. A. a. S. H., Metaheuristic algorithms and their applications in wireless sensor networks: review, open issues, and challenges. Cluster Computing, 27(10), pp. 13643–13673.
Kaviarasan, S. S. R. (2023). A Novel Spider Monkey Optimized Fuzzy C-Means Algorithm (SMOFCM) for Energy-Based Cluster-Head Selection in WSNs. International Journal of Electrical and Electronics Research, 11(1), 169–175.
Kumar, N. S. K., & a., L. J. (2024). WAOA: A hybrid whale-ant optimization algorithm for energy-efficient routing in wireless sensor networks. Computer Networks Issue, 254, 110845.
Devika, M. (2024). S. M. S., Optimizing Wireless Sensor Networks: A Deep Reinforcement Learning-Assisted Butterfly Optimization Algorithm in MOD-LEACH Routing for Enhanced Energy Efficiency. International Journal of Computational and Experimental Science and ENgineering.
Mehta, D. S. S. (2020). MCH-EOR: Multi-objective cluster head based energy-aware optimized routing algorithm in wireless sensor networks. Sustainable Computing: Informatics and Systems, 28, 100406.
A
Pichamuthu, R., et al. (2025).
Enhancing Network Lifetime in IoT-Based Wireless Sensor Networks Through MSSA-Driven Cluster Head Optimization. s.l. IEEE.
Prachi Maheshwari, A. K. S. K. V. (2021). Energy efficient cluster based routing protocol for WSN using butterfly optimization algorithm and ant colony optimization. Ad Hoc Networks, p. Elsevier.
Godi, R. K. (2025). S. R. P. S. N. B. V. B. &. A. D., A highly secure and stable energy aware multi-objective constraints-based hybrid optimization algorithms for effective optimal cluster head selection and routing in wireless sensor networks. Peer-to-Peer Networking and Applications.
Rami Reddy, M. R. C. M. V. P. D. R. (2023). Energy-efficient cluster head selection in wireless sensor networks using an improved grey wolf optimization algorithm. Computers, 12(2), 35.
Sabaresan, V., M, T. S., & S, R. (2024). Energy-Efficient Clustering in Wireless Sensor Networks: A Multi-Objective Approach Using PSO and Fuzzy Logic. s.l. IEEE.
Saghi, F., & Aghdasi, H. S. (2024). An Energy-Efficient Clustering Method Based on Butterfly Optimization Algorithm by Considering the Criterion of Intra-cluster Distances in WSNs. s.l. IEEE.
Singh, O. R. V. C. R., & a., Y. M. (2021). Multi-objective optimization in WSN: Opportunities and challenges. Wireless Personal Communications, 121(1), 127–152.
Songhao Jia, Y. Y. (2025). S., An Energy-Saving Clustering Algorithm for Wireless Sensor Networks Based on Multi-Objective Walrus Optimization. electronics.
A
Tawfeek, M., A. I. A., M., & a., T. F. (2025). A Fuzzy Multi-Objective Framework for Energy Optimization and Reliable Routing in Wireless Sensor Networks via Particle Swarm Optimization.
Computers Materials & Continua, 83(2).