Abstract
The Harris Hawks Optimization (HHO) algorithm has recently garnered extensive attention in research and applications. However, it still faces critical challenges, including premature convergence, degradation of swarm diversity, entrapment in local optima for complex problems, difficulty balancing exploration and exploitation, and a performance heavily dependent on parameter tuning, which lacks universal guidelines. This paper proposes an improved Hawks swarm optimizer embedded with a new search strategy called BAHSO to address the challenges. The improved algorithm enhances its exploration capability while maintaining the strong exploitation characteristics by leveraging the directional perturbation mechanism inspired by the beetle antennae search (BAS) algorithm. Specifically, BAS introduces adaptive step-size adjustments and stochastic directional search to help individuals escape local optima. At the same time, a dynamic energy learning coefficient ensures balanced exploration-exploitation trade-offs throughout the hard-soft siege hunting process. Experimental results and comparisons demonstrate that BAHSO achieves superior convergence accuracy and speed, particularly in high-dimensional and multimodal landscapes, with significantly improved solution quality over the best-performing variants. Furthermore, diversity metrics confirm that BAHSO maintains higher swarm diversity in late-stage iterations than other methods, effectively mitigating stagnation issues.
Keywords
Introduction
Since optimization computing and evolutionary algorithms are still active research topics in this era of generative artificial intelligence, Metaheuristic algorithms have garnered significant attention for solving complex optimization problems due to their flexibility and robustness in handling nonlinear, nonconvex, and high-dimensional search spaces, even in large-scale multi-objective optimization.1,2 Among these, the Harris Hawks Optimization (HHO) algorithm, inspired by the cooperative hunting behavior of Harris’ hawks, has demonstrated competitive performance in various optimization tasks with extensive research dedicated to enhancing its performance and broadening its applications. 3 The versatility of HHO is evident in its wide-ranging applications across engineering, energy, and machine learning domains. In structural and mechanical optimization, HHO optimizes design parameters to reduce weight while maximizing strength and performance.4,5 It has also been applied to electronic circuit design, power system optimization, and control system tuning to enhance reliability and economic efficiency. 6 In machine learning, HHO excels in hyperparameter tuning, feature selection, and neural network training, significantly enhancing model accuracy, for example, in wind power forecasting using hybrid CNN-BiGRU-attention models. 7 Its utility extends to image and signal processing, where it improves segmentation and feature extraction, as well as financial forecasting and risk assessment, providing actionable insights for investment strategies. 8
Despite its numerous successes, the HHO algorithm, like other swarm-based optimizers, suffers from premature convergence and stagnation in local optima, particularly when dealing with multimodal and deceptive landscapes. One of the primary challenges is the algorithm's tendency to fall into local optima, particularly when solving complex and high-dimensional optimization problems.9,10 To address inherent limitations such as premature convergence and the trapping of local optima, researchers have developed hybrid strategies by integrating HHO with other optimization techniques, including genetic algorithms and particle swarm optimization.11,12 Theoretical advancements have focused on analyzing HHO's convergence properties and stability, particularly examining the impact of key parameters like initial swarm size, escape energy factor, and transition mechanisms. 13 These studies have led to adaptive and self-tuning HHO variants that dynamically adjust parameters during optimization, significantly improving robustness and efficiency.
Additionally, mutation strategies such as Cauchy and Gaussian mutations have been introduced to enhance swarm diversity and escape stagnation.14,15 At the same time, opposition-based learning mechanisms have been incorporated to refine solution quality and accelerate convergence.16,17 Further innovations include fractional differentiation methods and information exchange mechanisms to improve global search capabilities by leveraging historical iteration data and collaborative foraging behaviors. While some improvements have been proposed to address this issue, such as hybridizing HHO with other algorithms or introducing mutation strategies, further research is needed to develop robust mechanisms for escaping local optima.18,19 Another challenge lies in balancing the exploration and exploitation phases of HHO, as achieving an appropriate balance between these two phases is crucial for the algorithm's performance. 20 However, finding the optimal balance can be difficult, as it often depends on the specific characteristics of the optimization problem being solved. Moreover, the parameter settings of the algorithm can significantly impact its performance, since determining the optimal parameter values for different issues remains an open challenge.
The limitations primarily stem from an inadequate exploration-exploitation balance and the lack of adequate mechanisms for maintaining swarm diversity in later iterations. To overcome these challenges, we propose the BAHSO algorithm, an enhanced Harris Hawks optimizer incorporating a novel search strategy, which improves global search capability and solution accuracy through two key contributions: achieving exploration-exploitation balance via directional perturbation in the hard-soft siege hunting process and employing a dynamic energy learning coefficient to enhance diversity and avoid local optima. The proposed BAHSO algorithm demonstrates technical novelty by strategically combining the strengths of three distinct optimization approaches, which are the dynamic global exploration of HHO inspired by cooperative hunting behaviors, efficient local exploitation of Beetle Antennae Search (BAS) through simulated antennae sensing, and adaptive parameter control from Dynamic Energy Learning (DEL) during the search process. This hybrid architecture creates a synergistic effect where BA's precise local search capability complements HHO's flexible exploration strategy, while DEL intelligently balances these components through energy-based adaptive mechanisms. These findings provide a reference for designing hybrid metaheuristics and present a promising approach for improving the performance of swarm optimization algorithms.
The rest of this paper is organized as follows. Section 2 reviews related works on HHO research and applications, Section 3 describes the original HHO, Section 4 details the proposed methodology, Section 5 presents experimental results and discussions, and Section 6 concludes the study with future works.
Related works
Improvements to the HHO algorithm
The Harris Hawks Optimization (HHO) algorithm is a nature-inspired metaheuristic algorithm that is inspired by the cooperative hunting behavior of Harris hawks, where the search process begins with random exploration of the solution space, guided by energy parameter E to transition into exploitation phases involving soft or hard besiege tactics based on prey escape energy, dynamically updating solutions through fitness evaluation and energy adjustment to optimize convergence toward global optima while maintaining computational efficiency. HHO has gained significant attention due to its efficiency and effectiveness in solving various optimization problems. Numerous studies have focused on improving the HHO algorithm to enhance its performance.
One direction of improvement involves integrating complementary strategies through process transformation. This includes employing chaotic maps to generate more ergodic and unpredictable sequences for parameter initialization or iteration updates, 21 combining with the fish aggregating devices (FAD) inspired by the Marine predator algorithm (MPA), 22 dynamic opposite-based learning (DOL), 23 and utilizing external archive guidance to enhance dominance relations in multi-objective optimization. 24 The approaches collectively improve the optimization process's convergence speed and solution diversity.
Another area of improvement focuses on modifying the core mechanisms of the HHO algorithm. An enhanced variant for non-convex function optimization incorporated a Brownian motion-based mutation strategy, demonstrating superior capability in escaping local optima. 25 Convergence and diversity adaptive adjustment have always been the focus of optimization computing and evolutionary algorithm research. 26 Concurrently, another advancement introduced a nonlinear adaptive-convergence factor, substantially improving convergence performance and algorithmic robustness.1,27
Some researchers have also explored parallel and distributed variants of HHO to handle large-scale optimization problems. An island parallel HHO method was developed for continuous multi-dimensional problem optimization, where parallel computation created a multi-swarm environment that improved performance and scalability. 28 A discrete HHO variant was also formulated for solving graph-connected resolvability problems, demonstrating the algorithm's adaptability to discrete domains. 29
Moreover, several studies have aimed to balance the exploration and exploitation phases of HHO. A dynamic adjustment algorithm for environmental factors was developed to regulate the energy of Harris Hawks, effectively enhancing the algorithm's local search capability. 30 A multi-strategy enhanced HHO incorporated map-compass operator, Cauchy mutation strategy, and spiral motion strategy, demonstrating significant improvements in population diversity and convergence speed.15,31
Hybrid methods combining HHO with other algorithms
Hybridizing HHO with other metaheuristic algorithms to leverage their strengths has become a popular approach to enhance its performance and address specific optimization challenges. This hybridization often combines one algorithm's exploration capabilities with another's exploitation strength. One notable example is the combination of HHO with evolutionary algorithms.32,33 Where an improved greedy HHO variant achieved superior optimization performance and classification accuracy in feature selection problems, 34 another practical hybrid approach integrated Harris Hawks Optimization with the Fireworks Algorithm, yielding enhanced performance in numerical optimization compared to its components. 35
Another common hybridization approach has emerged by combining HHO with swarm intelligence algorithms.18,36–38 A discrete variant of the Harris Hawks optimization algorithm was developed for breast cancer diagnosis, where its integration with support vector machines significantly enhanced classification accuracy. 36 Similarly, combining HHO with the Multi-verse optimizer demonstrated superior exploration and exploitation capabilities, resulting in notable improvements in optimization performance. 37 Further developments have explored the integration of HHO with deep learning techniques.38,39 A data-driven HHO constrained optimization algorithm was formulated for computationally expensive problems, utilizing Kriging sampling and prediction to minimize the number of expensive function evaluations. 40 An enhanced HHO incorporating genetic operators proved effective for learning Bayesian network structures, showcasing the algorithm's adaptability in this domain. 41
Applications of the HHO algorithm
The HHO algorithm has found extensive applicability across various domains, including engineering, medicine, finance, and other specialized fields.5,23,42–44 Engineering applications have successfully addressed complex design optimization challenges such as pressure vessel design, tension/compression spring optimization, and three-bar truss system configuration. 42 The algorithm has also proven effective for energy management and system optimization in power networks.45,46
Medical applications have leveraged HHO for critical tasks, including medical image segmentation, disease diagnosis, and the development of treatment strategies. An enhanced epilepsy diagnosis framework incorporating HHO with hierarchical mechanisms achieved superior accuracy on standardized datasets. 47 Similarly, the diagnosis of hepatocellular carcinoma benefited from HHO-based feature selection and ensemble classification approaches, highlighting the algorithm's diagnostic potential. 48
Financial and economic implementations have significantly improved predictive modeling and fraud detection. Economic forecasting models optimized through HHO outperformed conventional prediction methods, 49 while credit card fraud detection systems incorporating HHO demonstrated enhanced accuracy and operational efficiency. 50 Additional specialized applications include network resource allocation, where HHO effectively optimized wireless network configurations,45,51 and robotic path planning, with successful implementations for differential wheeled mobile robots in static and dynamic environments.22,52
Harris hawks optimization algorithm
The HHO algorithm is inspired by hawks’ predation behavior and rabbits’ escape behavior (i.e., prey). It constructs a mathematical model of hawks hunting rabbits based on different strategies so that they gradually approach their prey during the habitat and hunting process, as shown in Figure 1,4,44 which is the optimal solution. The algorithm primarily consists of the following three phases. Exploration phase

Four siege strategies in HHO. 4
In this phase, the HHO algorithm simulates the roosting behaviors of hawks. From a search perspective, this phase primarily conducts global exploration, which involves two distinct strategies: the strategy of inhabiting based on the position of a specific hawk within the flock of hawks and the strategy of inhabiting based on a random position within the search range. The specific updating equations of the two methods are as follows:
Transition from exploration to exploitation
In the HHO algorithm, each individual in each iteration is selected to enter the exploration or exploitation phase based on the escape energy E of the prey. The equation for E is as follows:
Where Exploitation phase
In this phase, the HHO algorithm simulates the siege behavior of the hawk swarm, modeled as four different search strategies: soft siege, hard siege, soft siege with progressive dive, and hard siege with progressive dive. Each individual in the swarm is selected to perform the corresponding predation strategy to renew the swarm's positions based on the E of the prey, and r is a uniform random number in (0, 1). The mathematical expression of the search strategy above is as follows. Soft-siege strategy
When Hard-siege strategy
When Soft-siege strategy with progressive swooping
When Hard siege strategy with progressive swooping
When
This section details the methodological framework of the proposed BAHSO algorithm, which embeds the components of Beetle Antennae Search (BAS) and Dynamic Energy Learning (DEL). Inspired by beetle foraging behavior, BAS represents an efficient metaheuristic approach that implements directional search through antennae sensing mechanisms, achieving compelling exploration without requiring large population sizes. The DEL strategy complements this approach by enhancing swarm diversity throughout the hard-soft siege hunting process.
Beetle antenna search strategy
In the mimic process of the foraging behavior of the beetle in the BAS algorithm,
53
the direction of the antennae
Where rands denotes a random function and dim is the dimension of the optimization problem. The spatial positions of the left and right antennae xlt and xrt at the t-th iteration respectively, can be calculated as Eq. (14).
The analysis of the basic HHO reveals that the global exploration and local exploitation phase transition of the HHO primarily depends on the parameter E, and the value of this parameter also influences the local search ability of the exploitation phase. Therefore, the escape energy coefficient E plays a vital role in the searchability of the HHO algorithm. A larger escape energy coefficient E can provide a stronger global exploration capability, enabling the algorithm to avoid getting trapped in a local optimum. Conversely, a smaller escape energy coefficient E gives the algorithm a stronger local exploitation capability, which can speed up its convergence. Therefore, BAHSO adopts the nonlinearity factor as the new escape energy coefficient. The formula is as follows:
This non-linear coefficient varies with iteration as shown in Figure 2, which shows a slower decline in the first half of the curve and a faster decline in the second half, reducing the possibility of the algorithm quickly falling into a local optimum. In contrast, the lower E in the second half can speed up the algorithm's convergence, without significantly changing the global exploration and local exploitation of the transformation.

Dynamical energy learning coefficient. (a) Evolution of energy E1 (b) Energy E varying and disturbance range.
From above HHO algorithm process, the algorithm operates through four key phases: (1) Exploration phase where hawks randomly search for prey based on random positions or leader-guided strategies, (2) Transition phase that shifts between exploration and exploitation based on the prey's escaping energy (E), (3) Exploitation phase consisting of four distinct siege strategies (soft, hard, progressive soft, and progressive hard) selected according to the prey's escape probability (r), and (4) Position updating where hawks adjust their locations based on the selected hunting strategy. The energy parameter E decreases nonlinearly from 2 to 0 during iterations, controlling the exploration-exploitation balance, while the random parameter r (0-1) determines the siege strategy. This bio-inspired approach effectively balances global exploration and local exploitation capabilities.
In the proposed BAHSO algorithm, when the global optimum is continuously invariant or changes count, s, less than a given threshold S, e.g.,10 iterations, or more than a given number, e.g., Max iteration/2, the BA strategy is employed to update the individual Hawk of the swarm. We express it in the algorithm flow chart as Eqs for simplicity. (13)-(16) are only applied when s > 10 and iteration > max iteration/2 as shown in Figure 3. At the same time, the dynamic energy learning (DEL) coefficient is utilized before each iteration. Based on HHO, BAHSO integrates two key innovations to enhance performance: embedding the Beetle Antennae Search (BAS) strategy for maintaining optimal exploration-exploitation balance, and implementing a dynamic energy learning (DEL) coefficient for improved global exploration. Firstly, embedding the BAS strategy involves introducing adaptive step-size adjustments and stochastic directional search. This mechanism helps individuals in the swarm escape local optima by providing a directional perturbation that guides them toward more promising regions of the search space. This enhances the algorithm's exploration capability, ensuring it does not prematurely converge to suboptimal solutions. Secondly, the DEL coefficient is crucial in the hard-soft siege-hunting process. The DEL coefficient ensures a balanced trade-off between exploration and exploitation by dynamically adjusting its value throughout the optimization process. This adaptability prevents the swarm from stagnating in local optima and maintains diversity in later iterations. The DEL mechanism's dynamic energy learning is crucial for global exploration, as it continually enables the algorithm to refine its search strategy and enhance solution accuracy. The procedure of the proposed BAHSO algorithm can thus be summarized as shown in Figure 3, and the detailed pseudocode is shown in Algorithm 1.

Flowchart of the proposed BAHSO algorithm.
From Algorithm 1 and its flowchart as shown in Figure 3, the BAHSO algorithm maintains the O(TND) time complexity similar to swarm-based evolutionary algorithms, including the original HHO, where T (iterations), N (swarm size), and D (problem dimensions) dominate computations. The BAS and DEL components introduce only O(1) or O(ND) operations per iteration, as DEL activates conditionally (e.g., when stagnation is detected via s > S, a given threshold). Space complexity remains O(ND) for storing the swarm and fitness values, with negligible overhead from DEL's energy coefficients (O(N)). Therefore, theoretical and empirical analyses (Algorithm 1and Figure 3) confirm that BAHSO's enhancements improve convergence without asymptotically increasing complexity, aligning with metaheuristic efficiency goals.
Experimental setup and numerical functions
To comprehensively evaluate the performance of the proposed BAHSO algorithm, we selected 10 benchmark test functions taken from the literature,22,23,30,33,54 categorized into three distinct swarms based on their mathematical properties. As detailed in Table 1 the selected benchmark functions include: (1) unimodal functions (F1-F3) featuring a single global optimum to assess exploitation capability; (2) multimodal functions (F4-F7) containing multiple local optima to test exploration and local optima avoidance; and (3) fixed-dimensional multimodal functions (F8-F10) with numerous optima in low-dimensional spaces to evaluate algorithmic stability. The unimodal functions primarily measure convergence precision, while the multimodal variants challenge the algorithm's ability to escape local solutions. Despite their simpler search spaces, the fixed-dimensional functions provide crucial insights into solution consistency.
Benchmark functions.
Benchmark functions.
The experimental framework standardized key parameters across all tests: maximum iterations (T = 500) and swarm size (N = 30). Each algorithm was executed 30 times independently for each benchmark function to ensure statistical reliability, with performance metrics recorded for comparative analysis. This rigorous testing protocol systematically evaluates BAHSO's optimization capabilities across diverse problem types, from unimodal landscapes to complex multimodal environments.
To comprehensively assess the performance of the BAHSO algorithm, we conducted comparative analyses against three enhanced variants, MHHO, 19 HHSC, 43 and QOHHO.23,33 The computational results, presented in Table 2, include four key metrics: mean, standard deviation (Std), Best, and Worst values obtained from 30 independent runs. The mean value reflects solution accuracy, where lower values indicate superior performance, while smaller standard deviation (Std) values demonstrate greater algorithm stability. The Best and Worst metrics represent the extreme performance boundaries observed during testing. For unimodal functions (F1-F3) with dimension D = 30, BAHSO demonstrated remarkable superiority, particularly in function F1, where it achieved the theoretical optimum while other algorithms failed. As shown in Figures 4(1)-(10), BAHSO exhibited the fastest convergence rate among all tested algorithms on unimodal functions. The significant reduction in mean values for F1 and F2 compared to MHHO (decreases of 42.7% and 38.3% respectively) highlights the effectiveness of BAHSO's dynamic opposition learning mechanism in enhancing exploitation capability. All opposition-based variants showed improved accuracy over MHHO, confirming the value of opposition-based strategies in refining solution quality.

Convergence of comparisons BAHSO with three HHO variants on F1-F10.
Experimental results of comparisons BAHSO with three HHO variants on F1-F10.
The evaluation extended to multimodal functions (F4-F7), which contain multiple local optima and serve as effective measures of exploration capability. BAHSO consistently outperformed other algorithms in mean solution quality across these functions, except for F5, where all algorithms reached theoretical optima. The convergence curves in Figure 5 reveal that BAHSO maintained superior convergence speed compared to MHHO, particularly demonstrating a 27.4% faster convergence on F4. For fixed-dimensional multimodal functions (F8-F10), which test both stability and exploration capacity, BAHSO achieved solutions closest to theoretical values in most cases. Notably, while MHHO failed to find F10's theoretical optimum, BAHSO successfully located it with 100% reliability. The algorithm's mean values surpassed both HHSC and QOHHO by an average margin of 15.6%, demonstrating its enhanced stability. These results substantiate that the decreasing trend in Figures 4–5 validates our BAHSO's exploitation capability. BAHSO's incorporation of BAS exploration strategy significantly improves the variants’ performance, particularly in maintaining solution stability across diverse function types. The comprehensive testing confirms BAHSO's balanced capability in both exploitation (unimodal) and exploration (multimodal) scenarios, making it a robust optimization tool for complex problems.

Convergence of comparisons BAHSO with five swarm optimization algorithms on F1-F10.
Comparative performance analysis
To rigorously evaluate BAHSO's superiority, we conducted comprehensive comparisons with five established swarm-based optimization algorithms, KGPSO, 55 NCSSA, 9 SOA-EACR, 56 QNWOA, 57 and AGWO. 58 All algorithms were tested under identical conditions, with a maximum of 500 iterations (T = 500) and a swarm size of 30 (N = 30). At the same time, other specific parameters are detailed in Table 3, whose empirical values were taken from the references accordingly. The experimental results from 30 independent runs, presented in Table 4, demonstrate BAHSO's consistent dominance across both 30-dimensional unimodal and multimodal functions. Notably, BAHSO achieved the theoretical optimum (0) for function F1, while maintaining perfect stability (standard deviation = 0) for functions F2 and F5. For more challenging functions (F3, F6, F7), BAHSO significantly outperformed other algorithms in search accuracy. In fixed-dimensional problems, BAHSO uniquely reached optimal solutions for F8 and F10, while all algorithms successfully solved the simpler F9 function.
Algorithms parameter settings.
Algorithms parameter settings.
Experimental results of comparisons BAHSO with five swarm optimization algorithms on F1-F10.
The convergence behavior, illustrated in Figures 5(1)-(10), reveals BAHSO's superior performance across all function categories. For unimodal functions (F1-F3), BAHSO's consistently lower convergence curves demonstrate enhanced solution accuracy and faster convergence speed compared to benchmark algorithms, confirming its exceptional exploitation capability. In multimodal scenarios (F4-F7), BAHSO maintains a steadily decreasing trend without premature stagnation, indicating robust exploration ability and effective local optima avoidance. The algorithm's performance on fixed-dimensional functions further validates its versatility, achieving superior F8 and F10 results while matching the optimal solution (though with slightly slower convergence) on F9 compared to KGPSO and NCSSA. These results collectively establish BAHSO's advantages in both exploitation (demonstrated through unimodal functions) and exploration (evident in multimodal performance), making it a comprehensive solution for diverse optimization challenges. The consistent outperformance across multiple metrics and function types highlights the effectiveness of BAHSO's hybrid approach compared to conventional swarm intelligence methods.
Conclusion and future works
This study presents the Beetle Antenna-enhanced Harris Hawks Optimizer (BAHSO), a novel hybrid algorithm that effectively addresses the premature convergence and diversity degradation issues in the original HHO through two key innovations of embedding BAS's directional perturbation mechanism for maintaining optimal exploration-exploitation balance, and implementation of dynamic energy learning (DEL) for global exploration improvement in the hard-soft siege hunting process.
The comparative experimental results on ten benchmarks validate that BAHSO's remarkable advantages in both convergence speed and solution accuracy exceed not only various HHO variants but also outperform other swarm intelligence algorithms on most benchmark functions, as evidenced by its consistent top-ranking performance across unimodal, multimodal, and fixed-dimensional test functions. This enhanced performance benefits from the higher swarm diversity preservation in late iterations by embedding it into the BAS strategy and DEL coefficient. During optimization, the DEL mechanism's dynamic energy learning proves crucial for preventing local optima entrapment, while BAS's stochastic directional search contributes to the algorithm's exceptional precision in fixed-dimensional multimodal optimization. These advancements position BAHSO as a robust solution for complex optimization problems requiring both global search reliability and local refinement capability.
Future research should focus on three directions of theoretical analysis of BAHSO's convergence properties to establish mathematical foundations comparable to classical metaheuristics, application to real-world engineering problems to validate practical effectiveness, and development of self-adaptive parameter control mechanisms for different problem classes, which will facilitate the extension of the proposed methodology.
Footnotes
Acknowledgment
The work is supported by the National Natural Science Foundation of China under grant nos.62406301 and 62476056.
Authorship contribution
All authors contributed to the conception and design of the study. All authors participated in the data analysis process. All authors contributed to the manuscript. All authors read and approved the final manuscript.
Funding
The authors received no financial support for the research, authorship, and/or publication of this article.
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Data availability statement
All data generated by test algorithms and analyzed during this study are within the article and its supplementary materials, or upon request from the corresponding author.
