1. Introduction
Nowadays, various industries generate a large amount of data, and finding valuable insights from multi-source data is a daunting challenge for data processing [
1]. Model performance often requires clean, non-redundant input data. However, the collected raw data often has redundant, irrelevant, and noisy features [
2]. High-dimensional data can lead to a curse of dimensionality, severely reducing the model’s generalization ability.
To address these issues, researchers widely use feature selection (FS) methods to identify key attributes in the data. The goal of feature selection is to find the optimal subset of features to eliminate irrelevant or redundant features, thereby improving model accuracy and reducing computational complexity [
3]. Essentially, FS is a combinatorial optimization problem, where given a dataset with
features, the objective is to select the optimal feature subset from
candidate feature combinations [
4]. Due to its NP hard nature and inherent multi-objective nature, this task has attracted in-depth research in recent years [
5]. At present, the FS method has been applied in classification and regression tasks [
6,
7], engineering optimization [
8,
9], text classification [
10,
11], and many other fields. Especially in complex engineering applications, such as railway transportation emergency response scenarios, due to the involvement of multi-disciplinary collaboration, the emergency response process generates massive amounts of multi feature data. Researchers need to identify key influencing factors from these redundant and noisy raw features. FS, as a key preprocessing task, can effectively eliminate irrelevant variables in railway emergency data, thereby improving emergency decision-making capabilities in the event of sudden accidents.
FS approaches fall into three categories: filter, wrapper, and embedded methods [
12,
13,
14,
15,
16]. Filter methods are computationally lightweight and classifier-independent, which explains their widespread popularity. However, they often produce suboptimal feature subsets and are prone to overfitting [
17]. Wrapper methods, by contrast, evaluate subsets directly through a specific classifier; although they are more accurate and less susceptible to overfitting than filters, they can still select biased features when used in isolation and are computationally more demanding. Embedded methods integrate feature selection into the training process of the classifier itself and have therefore drawn considerable interest; numerous hybrid strategies have been proposed to further enhance their effectiveness [
18,
19]. Regardless of category, these techniques are typically paired with well-known classifiers such as decision trees [
20,
21], support vector machines [
22], Bayesian networks [
23,
24], k-nearest neighbors [
25], and artificial neural networks [
26,
27].
In recent years, metaheuristic optimization algorithms have become the main method for solving FS problems due to their powerful global search and local optimization capabilities [
28,
29,
30,
31,
32,
33]. The landscape optimized by metaheuristics can be divided into two main schools of thought. The first genre includes mature classic algorithms that have been rigorously tested for decades, such as genetic algorithms (GA), differential evolution (DE), and simulated annealing (SA). The second school represents recent biologically inspired swarm intelligence methods that utilize collective behavior in nature to solve complex engineering problems. For example, Particle Swarm Optimization (PSO), Gray Wolf Optimizer (GWO), Whale Optimization Algorithm (WOA), etc. These optimization algorithms can generate a set of candidate solutions. Their search process consists of two basic stages, the exploration stage and the exploitation stage [
34]. However, the imbalance between the two stages is the main reason why these algorithms fall into local optima when processing high-dimensional data.
To overcome these limitations, researchers are increasingly turning to hybrid algorithms that combine complementary advantages. For example, chaotic cosine firefly (CSCF) algorithm [
35], PSO-GWO hybrid algorithm [
36], GSA-GA fusion algorithm [
37], quantum enhanced bat algorithm (CCQBA) [
38], and opponent based social spider optimizer (OBSSO) [
39]. These hybrid algorithms demonstrate excellent solving capabilities in feature selection problems.
Among the popular swarm intelligence algorithms, the HHO algorithm has received widespread attention due to its simple mathematical structure and effectiveness in solving various engineering problems [
40]. However, HHO performs poorly in dealing with high-dimensional and complex multimodal problems. This is because HHO has limitations of premature convergence and low solution accuracy. Therefore, it is urgent to propose improvement strategies to optimize HHO in order to enhance the algorithm’s fast gaming performance. At present, several enhancement methods have been proposed to alleviate these weaknesses: neighborhood perturbation [
41], sine escape energy adjustment [
42], logarithmic spiral exploration [
43], and tent graph plus crossover mutation strategy [
44]. Based on these insights, the present work introduces a novel algorithm called Hybrid Strategy Harris Hawks Optimization (HSHHO). As an improved feature selection wrapper method, HSHHO aims to obtain the optimal feature subset while improving classification accuracy.
The core contribution lies in three targeted improvement measures aimed at strengthening the exploration, transition, and mining stages of HHO:
- (1)
SPM chaotic mapping and variable logarithmic spiral strategy were proposed to enhance burst diversity and global search.
- (2)
A nonlinear escape energy function has been proposed, achieving a smoother and more adaptive balance between exploration and exploitation.
- (3)
The Cauchy–Gaussian elite perturbation mechanism has been proposed, which can promote local refinement and help algorithms overcome local optima.
The rest of this article is organized as follows.
Section 2 reviewed the standard HHO algorithm and proposed three improvement strategies for constructing HSHHO.
Section 3 reports a comprehensive experiment on 30 benchmark functions and 18 real-world feature selection datasets, comparing HSHHO with eight well-known methods. Finally,
Section 4 summarizes the research findings and outlines future research directions.
3. Results
To assess the efficacy and optimization potential of HSHHO, we conduct a series of simulation experiments. Initially, the algorithm is tested on 23 standard benchmark functions to evaluate the impact of its three enhancement strategies relative to the baseline HHO. Subsequently, HSHHO is benchmarked against eight established metaheuristic algorithms using IEEE CEC 2017 problems, with statistical analyses to highlight its advantages. Finally, HSHHO is deployed on 18 feature selection datasets to demonstrate its practical utility. All simulations are executed on a Windows 10 system equipped with an Intel Core i7-7700, CPU @ 3.60 GHz and 32 G of RAM, using MATLAB R2022b for implementation.
The common parameters for all algorithms are set such that the population size is 30 and the maximum iteration is 500. In this study, to ensure fairness in computational workload between algorithms, the total number of function evaluations is set to . In addition, we define one iteration of the algorithm as a complete loop. In this loop, the positions of all individuals in the group are updated, followed by a round of fitness assessment.
3.1. Comparison of the Effects of Different Improvement Strategies
To bolster HHO’s optimization capabilities, we introduce three targeted enhancements: a hybrid SPM chaotic map with variable logarithmic spiral (SPM-VLS), a nonlinear escape energy mechanism for smoother phase transitions, and a Cauchy–Gaussian elite perturbation approach. These are integrated to form the comprehensive HSHHO algorithm. This section aims to empirically verify the independent contribution of each strategy to HHO and demonstrate the excellent performance achieved through its fusion effect.
To conduct this analysis, we decomposed HSHHO into three variants, including HSHHO1, HSHHO2, and HSHHO3. Each variant contains only one improvement strategy. HSHHO1 only enhances HHO through SPM-VLS and ignores other functions. HSHHO2 only applies nonlinear escape energy updates. HSHHO3 is only available for the police Cauchy Gauss Elite. These variants, as well as the proposed HSHHO and HHO, are evaluated and compared on 23 standard benchmark functions, as shown in
Table 1.
Table 2 shows the experimental results of HHO, HSHHO, and these function variants, with the optimal values displayed in bold.
Figure 5 shows the convergence curves of these algorithms. Overall, the ARV in
Table 2 indicates that in most tests, HSHHO and its variants perform better than HHO. This confirms the effectiveness of SPM-VLS, nonlinear escape energy, and Cauchy–Gaussian perturbation strategies in improving the quality of HHO solutions.
The Wilcoxon rank sum test in
Table 3 shows significant differences between HSHHO1 and HHO in most functions. HSHHO2 performs well on eight functions, but performs poorly on F5–F8, F12–F14, and F23. This indicates that nonlinear escape energy faces difficulties in maintaining phase balance in unimodal and multimodal scenarios. However, the
p-values in
Table 3 indicate that all optimization strategies except F14 can improve the performance of HHO. Meanwhile, HSHHO3 ensures an optimal solution for all problems except F5, emphasizing the promoting effect of the perturbation strategy on local refinement. The
p-value indicates that all functions except F6 and F12 show significance.
3.2. Comparison Between HSHHO and Other Optimization Algorithms
This section evaluates the performance comparison between HSHHO and eight popular optimization algorithms based on 30 benchmark functions of CEC 2017.
Table 4 shows the description of the CEC 2017. Especially, the F2 of the CEC 2017 test function has been officially proven to have issues. However, in order to maintain the integrity and continuity of the testing, F2 is retained but not used in the experiment in this study.
Eight popular optimization algorithms include WOA, SSA, MFO, GOA, SCA, PSO, and GWO.
Table 5 reports the AVG and STD metrics, with the best performers highlighted in bold. To emphasize performance differences, we applied the non-parametric Wilcoxon rank sum test, with
p-values detailed in
Table 6.
The unimodal benchmark has a single global optimum, making it an ideal choice for convergence speed and accuracy. According to
Table 4, F1–F3 belong to this category. As shown in
Table 5, HSHHO ensures the lowest AVG and STD. The
p-values in
Table 6 show significant differences compared to competitors on all unimodal functions. These results highlight HSHHO’s enhanced handling of unimodal challenges, thanks to the robust global exploration of the SPM-VLS strategy during the search phase.
In contrast, multimodal benchmarks contain multiple local optima, which test the algorithm’s ability to avoid getting stuck and optimize locally. The CEC 2017 test ensured comprehensive validation, improving the reliability and breadth of the experiment.
Table 5 shows that HSHHO dominates all multimodal functions except for F4 and F7. However, for most functions, HSHHO exhibits significant advantages. This highlights its powerful utilization ability, which is driven by Cauchy–Gaussian elite perturbations and helps escape local minima and broader global pursuits.
To increase rigor, we studied the mixed (F11–F20) and combined (F21–F30) functions of CEC 2017, which are more complex than single or multi peak types.
Table 5 confirms the highest AVG and STD of HSHHO on all functions except F17 and F27. On F17 and F27, HSHHO ranks second in value. The
p-values in
Table 6 confirm that they are significantly better than other algorithms on each mixing and combining function. These results stem from the nonlinear escape energy mechanism, which promotes optimal phase balance in HSHHO and produces excellent performance on complex problems.
In summary, according to the results in
Table 5, HSHHO exhibits excellent performance in 26 out of 30 benchmark functions. However, according to the “no free lunch” theorem, it can be observed that HSHHO is not the optimal executor in all cases. For example, it ranks second on functions F4, F7, F17, and F27 or is comparable to GWO and SSA. This indicates that although HSHHO has strong robustness to mixing and combining problems, specific landscape features in certain multimodal functions may still be more effectively navigated through other metaheuristic methods.
The convergence graph in
Figure 6,
Figure 7 and
Figure 8 visually compares HSHHO with different optimization algorithms.
Figure 6 depicts the rapid decline and sustained accuracy advantage of HSHHO.
Figure 7 shows that HSHHO quickly reaches its optimal value, surpassing other algorithms.
Figure 8 highlights the leading speed of HSHHO on all functions except F22, ultimately achieving unparalleled accuracy.
In addition, we compare the average time. According to
Table 7, PSO and WOA achieved good results on the benchmark test function. Compared with HHO, the average time of HSHHO increased due to the influence of three improvement strategies. However, achieving better computational results at a smaller time cost is often acceptable.
3.3. HSHHO for Feature Selection
To demonstrate the practical value of HSHHO, we apply it to feature selection tasks spanning datasets with feature counts ranging from a few to several hundred. Its performance is benchmarked against several established metaheuristic algorithms.
3.3.1. Datasets and Parameter Settings
We selected 18 widely used UCI datasets, detailed in
Table 8, that have been extensively validated in prior feature selection research, ensuring both reliability and relevance.
Using the wrapper approach, the optimizer is combined with the classifier to identify the optimal feature subset. In order to evaluate the accuracy of the selected feature subset, a classifier must be used for classification after feature selection. The KNN classifier is a popular classification method in the field of feature selection. The selection of K value and distance measurement in KNN affect the effectiveness of KNN. In this study, the selection of K value refers to the existing literature, with a value of 5 [
49]. For each dataset, the samples are divided into 80% training set and 20% testing set, and reliability is improved through 10-fold cross validation. All experiments were repeated 10 times to eliminate the influence of random fluctuations.
For comparative analysis, HSHHO is tested alongside HHO, PSO, GWO, WOA, SSA, and GOA. Common parameters are fixed as follows: population size = 10, maximum iterations = 100, and search dimension equal to the number of features in each dataset. The parameters of each algorithm are summarized in
Table 9. All implementations are developed and executed in MATLAB R2022b.
3.3.2. Performance Indicators
To evaluate the performance of the HSHHO, three statistical indicators are introduced, including average fitness, average accuracy, and average feature selection size.
Average fitness (AvgFit): Average value of the fitness obtained.
where
denotes the best fitness obtained in the
-
th iteration.
Average accuracy (AvgAcc): Accuracy of the classifier in selecting the best feature subset.
where
is the accuracy achieved by the optimal subset in the
-
th iteration.
Average number of feature selections (AvgSel): Average value of the ratio of the number of features selected.
where
the number of features selected in the
-
th iteration, and
is the total number of original features.
Average run-time (AvgRt): Average value of the algorithm’s run time.
where
denotes the run time in the
-
th iteration.
3.3.3. Comparison Results on the 18 Feature Datasets
For average fitness, the results are reported in
Table 10. According to
Table 10, it can be observed that HSHHO obtains the best value on the 16-feature datasets. Compared to HHO, PSO, GWO and WOA, HSHHO achieves the best results on all datasets. SSA achieves the optimal fitness value on the WaveformEW dataset, while GOA achieves better results on the Vote dataset.
For average accuracy, the results are reported in
Table 11. It is evident that HSHHO demonstrates superior performance. Compared to SSA, HSHHO also achieves the best results on other datasets except the HeartEW, IonosphereEW, and WaveformEW datasets. For PSO, GWO, and GOA, HSHHO achieves the best results on all datasets. Additionally, SSA ranks second for accuracy.
In terms of the number of selected features, based on the average number of selected features by HSHHO and other optimization algorithms reported in
Table 12, it can be observed that, compared to the standard HHO, HSHHO obtains the minimum number of selected features on all 18-feature datasets. Compared to GWO, HSHHO obtains the best feature subset on all datasets except the KrvskpEW dataset. SSA obtains the least number of features on the SonarEW and PenglungEW datasets. The GOA finds the optimal number of selected features on the WaveformEW dataset. In total, HSHHO finds the best feature subsets on 14 datasets (Exactly, Exactly2, Breastcancer, Lymphography, Vote, Zoo, BreastEW, CongressEW, HeartEW, IonosphereEW, WineEW, SpectEW, Tic-tac-toe and PenglungEW), and the number of features obtained on the remaining four datasets ranked second.
For average accuracy, the results are reported in
Table 13. It is evident that HSHHO demonstrates superior performance. Compared to SSA, HSHHO also achieves the best results on other datasets except the HeartEW, IonosphereEW, and WaveformEW datasets. For PSO, GWO, and GOA, HSHHO achieves the best results on all datasets. Additionally, SSA ranks second for accuracy.
In addition,
Table 13 provides detailed information on the average time. The analysis of experimental results shows that, compared with other algorithms, the proposed method requires the longest time. This is due to the introduction of three improvement strategies, which extend the time required to mine the optimal solution. When used for FS, the number of features is a dimension, and the higher the dimension, the longer the required time. Although PSO and WOA require the shortest time in the dataset, their classification accuracy is not the highest and they cannot minimize the number of features. Therefore, considering other metrics, HSHHO still outperforms other algorithms in terms of FS.
3.3.4. Comprehensive Correlation Analysis
To evaluate whether the improvement of fitness is essentially based on classification performance, a three indicators correlation analysis was conducted on
Table 8,
Table 9 and
Table 10. Firstly, the comparison between fitness and accuracy indicates that the optimization of HSHHO is performance-oriented. In 16 out of 18 datasets, a decrease in fitness values was accompanied by a significant increase in accuracy. It is worth noting that on high-dimensional datasets such as KrvskpEW and PenglingEW, HSHHO achieved excellent accuracy while significantly reducing fitness scores. This confirms that the fitness function effectively captures the algorithm’s ability to enhance discriminative power. Secondly, the relationship between accuracy and feature subset size indicates the efficiency of HSHHO in noise filtering. According to
Table 10, HSHHO achieved a smaller feature subset than HHO in all 18 datasets. In most cases, a decrease in the feature count leads to a reverse improvement in accuracy, indicating that the eliminated features are mainly redundant or noisy.
In addition to solving quality, the practical usability of the proposed HSHHO framework should also be evaluated based on computational costs. Since HSHHO incorporates three improvement strategies, its processing naturally requires more time than the original HHO. Therefore, the runtime results should be interpreted in conjunction with accuracy results rather than in isolation.
According to
Table 7 and
Table 13, we can observe that on the feature selection dataset, the average computation time increased from 597.67 s for HHO to 630.35 s for HSHHO; on the benchmark functions, it rose from 16.54 s for HHO to 22.24 s. Although this indicates an increase in computational cost, HSHHO demonstrates superior algorithmic performance.
These results indicate that the additional runtime of HSHO is associated with improved search quality and stronger convergence behavior, rather than an unnecessary computational burden. In other words, HSHO achieves higher optimization accuracy, enhanced robustness, and more reliable final solutions at the cost of a moderate additional runtime. This trade-off is advantageous in applications where solution quality and stability are more critical than minimal execution time. In summary, the improved HSHHO fitness is a collaborative result of achieving higher classification accuracy with a more concise feature set.
4. Conclusions
In this paper, we introduce an enhanced Harris Hawks Optimization algorithm, named HSHHO, which incorporates the SPM with variable logarithmic spiral, nonlinear escape energy mechanism, and Cauchy–Gaussian elite perturbation. By integrating these enhancements, HSHHO improves initial population diversity, global search efficiency, and local refinement accuracy. To evaluate its effectiveness, we first examined the impact of the three strategies on HHO that use 23 classical benchmark functions, revealing that each contributes meaningfully to overall improvement. Next, IEEE CEC 2017 is used to compare HSHHO with eight well-known algorithms. The results indicate that HSHHO dominates a significant competitive advantage at most benchmark functions. Finally, when applied to 18 feature selection tasks, HSHHO delivered outstanding results, notably reducing feature counts by 70.92% while elevating average classification accuracy to 94.47%.
Although HSHHO has demonstrated strong optimization capabilities, the inherent limitations in hybrid strategies need to be addressed. The integration of SPM chaotic mapping and Cauchy–Gaussian mutation significantly improves the search performance of the algorithm, but also enhances its sensitivity by increasing the initial parameter configuration. Meanwhile, experimental results indicate that HSHHO dominates in most benchmark tests, but its performance in specific functions still needs improvement. In addition, the transition between exploration and mining may still experience local stagnation, indicating that a single nonlinear energy model may not be universally applicable to all complex multimodal problems.
From these insights, several avenues for future exploration have emerged. Firstly, the development phase can be improved by integrating search operators from alternative optimizers. Secondly, its application may be extended to real engineering problems, such as railway emergency scenario prediction, medical big data analysis, intelligent risk assessment, etc. Thirdly, future research will compare HSHHO with the latest feature selection algorithms and continuously optimize algorithm performance. In addition, a notable prospect lies in developing a unified framework to interactively orchestrate multiple metaheuristics and machine learning models, leveraging their collective strengths to tackle daunting real-world challenges and generate higher-quality solutions. On the basis of this project, we will improve the HSHHO algorithm and apply it to key point recognition in typical emergency response scenarios of railways. By identifying the core feature subset in the collaborative emergency process of multiple disciplines, a scientific method is provided for railway emergency response operation standards, and an important role is played in risk warning and emergency plan optimization.