# Hyperband-Optimized CNN-BiLSTM with Attention Mechanism for Corporate Financial Distress Prediction
## 5 Results  
### Analysis of the Prediction Effect of Hyperband-CNN-BiLSTM-AT Model  
#### 5.1.1 Hyperband Algorithm Application  
The number of neurons in the hidden layer of a neural network significantly impacts the model's performance. Proper selection of the number of neurons in the hidden layer can help the model to fit the data better, while improper selection may lead to overfitting or underfitting. In order to verify the effectiveness of the Hyperband hyperparameter optimization method used, this study also selected two other common optimization strategies for comparison, namely random search and Bayesian optimization. All three methods perform a hyperparameter search under the same neural network structure, training epochs  
\begin{table}
\begin{tabular}{l c c c c} \hline \multirow{2}{*}{**Time Step**} & \multicolumn{2}{c}{**Original Training Data**} & \multicolumn{2}{c}{**Oversampled Training Data**} \\ \cline{2-5}  & **ST** & **Non-ST** & **ST** & **Non-ST** \\ \hline \(w=4\) & 972 & 5346 & 5346 & 5346 \\ \(w=5\) & 864 & 4832 & 4832 & 4832 \\ \(w=6\) & 756 & 4228 & 4228 & 4228 \\ \(w=7\) & 648 & 3624 & 3624 & 3624 \\ \(w=8\) & 540 & 3020 & 3020 & 3020 \\ \(w=9\) & 432 & 2416 & 2416 & 2416 \\ \(w=10\) & 325 & 1811 & 1811 & 1811 \\ \(w=11\) & 220 & 1204 & 1204 & 1204 \\ \(w=12\) & 109 & 603 & 603 & 603 \\ \hline \end{tabular}
\end{table}
Table 4: Distribution of sliding window samples with oversampling.  
\begin{table}
\begin{tabular}{l c c c c c c} \hline \multirow{2}{*}{**Time Step**} & \multicolumn{2}{c}{**Training Data**} & \multicolumn{2}{c}{**Testing Data**} \\ \cline{2-7}  & **Non-ST** & **ST** & **Total** & **Non-ST** & **ST** & **Total** \\ \hline \(w=4\) & 5346 & 972 & 6318 & 1359 & 243 & 1602 \\ \(w=5\) & 4832 & 864 & 5696 & 1208 & 216 & 1424 \\ \(w=6\) & 4228 & 756 & 4984 & 1057 & 189 &  
(epochs = 30), training and validation set partitioning strategy (validation_split = 0.2), and early stopping mechanism (EarlyStop) to ensure fairness in comparison. We recorded each method's tuning time and final accuracy on the test set. The search space for the three-parameter tuning methods covers key parameters such as convolutional layer channels, LSTM layer units, dropout rate, and the number of fully connected layer neurons.  
The optimal model for each method was evaluated on the test set, and their accuracy and time consumption are shown in Table 5. The results show that, although Hyperband took the longest time, it achieves the highest model accuracy (0.9876). This indicates that its efficiency advantage in resource allocation can be explored more fully in a high-performance model configuration. Random search and Bayesian optimization have shorter testing times. However, their testing accuracy is slightly lower, indicating that Hyperband is more effective in discovering superior hyperparameter combinations under the constraint of a given number of experiments.  
In this study, we mainly used the Hyperband algorithm to help select the appropriate number of neurons and other hyperparameter configurations. We first conducted preliminary experiments on Hyperband, random search, and Bayesian optimization within a small hyperparameter search space to determine appropriate parameter boundary intervals. On this basis, we further expanded the search scope and used the Hyperband method for a more comprehensive search to explore potential high-performance configurations fully. The range of hyperparameter search spaces and optimal configurations set are shown in Table 6, where the Hyperband algorithm is set with the number of training rounds = 50, bandwidth factor = 3, and sub-stage i = 2, and the optimization objective is the accuracy of the test set. The search was run on the training set using 20% of the data for validation, with early stopping based on validation loss to prevent overfitting.