# Hyperband-Optimized CNN-BiLSTM with Attention Mechanism for Corporate Financial Distress Prediction
## 4 Experiment  
### Overview of Experimental Process  
The CNN-BiLSTM-AT model constructed in this study mainly predicts financial risks for listed companies. The experimental process is shown in the figure below. It can be  
Figure 2: Hyperband -CNN-BiLSTM-AT Flowchart.  
divided into three stages: data preprocessing, model construction and training, and model prediction and evaluation. The overall workflow is illustrated in Figure 3.  
In the data preprocessing stage, we first import the dataset containing financial indicators and risk labels. To eliminate the dimensional differences between different financial indicators, we use the z-score normalization method to standardize the input data. Subsequently, the standardized data are converted into time series format using a sliding window method to capture the temporal characteristics of financial indicators. Assuming a sliding window size of w, for the input data \(Z=[z_{1},z_{2},\ldots,z_{n}]\), generate new data \(Z^{\prime}=\{[z_{i},z_{i+1},\ldots,z_{i+w-1}]\,|\,i=1,2,\ldots,n-w+1\}\). The new generated dataset is partitioned into training and test sets in a 80:20 ratio. To deal with the problem of risk category imbalance, SMOTE (a synthetic minority class oversampling technique) is used to generate  
Figure 3: Experimental process workflow.  
new minority class samples to make the dataset more balanced; for the minority class sample, \(z_{i}\), its nearest neighbor samples, \(k\), are selected to generate a new sample, \(z_{new}\)[22].  
In the model construction and training stage, a one-dimensional convolutional neural network (CNN) is used to extract local temporal features, and the dimension is reduced through the maximum pooling operation to obtain the key feature representation; then the CNN output is passed to the bidirectional long short-term memory (BiLSTM) network to capture the temporal relationship between the front and back in the sequence; then the attention mechanism (attention layer) is introduced to give different weights to the BiLSTM output to highlight the key information. The model's hyperparameters (including learning rate, batch size, convolution kernel size, number of LSTM units, dropout rate, number of hidden layer units, etc.) are automatically searched and optimized through the Hyperband algorithm, and the optimal configuration is finally determined to improve the model's performance. In the model comparison stage, multiple deep learning architectures combining CNN, BiLSTM, and attention mechanism are designed, such as 1 CNN-1 BiLSTM-AT, 1 CNN-2 BiLSTM-AT, 2 CNN-1 BiLSTM-AT, and 2 CNN-2 BiLSTM-AT, and the optimal structure is determined through hyperparameter optimization. At the same time, the performance of traditional deep learning models (CNN, BiLSTM), hybrid models (CNN-AT, BiLSTM-AT, CNN-BiLSTM, CNN-GRU), and Transformer models are evaluated, and the optimal model is found by comparing the performance of each model.  
In the model prediction and evaluation stage of the model, the preprocessed test data are input into the trained CNN-BiLSTM-AT model to obtain the prediction results. To ensure statistical reliability and generalizability of the results, the Friedman test and Bonferroni-Dunn follow-up test are used to assess whether the performance differences between the models are statistically significant. In the validation test phase, two types of validation are performed: one is future prediction validation using 2025 data to evaluate the temporal generalizability of the model; the other is validation of 100 repeated experiments of the company using data from two different companies to evaluate the adaptability of the model in a business environment.