In this section, we will introduce the design ideas, component structure and operation process of the CNN–BiLSTM–Attention hybrid model in detail and provide a detailed explanation of the pavement technical condition index.
4.1. Model Theory
Notably, the proposed CNN–BiLSTM–Attention framework is specifically tailored for four-year, short-time-series pavement performance data (utilizing four annual inputs to predict fifth-year outcomes), diverging from the generic application of deep architectures originally optimized for high-frequency long-term sequences. Conventional regression and classical stochastic models, such as ARIMA, are insufficient for characterizing complex nonlinear and bidirectional temporal dependencies—the defining features of pavement performance in arid and semi-arid regions. In these environments, the Pavement Condition Index (PCI) and Riding Quality Index (RQI) exhibit a dynamic “deterioration–rehabilitation” cycle; each data point possesses a forward dependency on historical states and a backward correlation with subsequent maintenance interventions and performance recuperation. Furthermore, pavement data in resource-constrained regions often present limited sample sizes and local anomalies, predisposing simpler models to overfitting or rigid fitting that fails to reflect actual structural trends. To mitigate these issues, a parsimonious hybrid architecture was developed: a Convolutional Neural Network (CNN) extracts localized spatial features, a Bidirectional Long Short-Term Memory (BiLSTM) network models temporal dependencies in both directions, and an Attention mechanism prioritizes high-impact features. Each component is specifically optimized for the four-year scale to ensure robust adaptability while eliminating computational redundancy.
The CNN–BiLSTM–Attention model combines the ability to extract local features of Convolutional Neural Networks, the ability to capture sequence dependencies of Bidirectional Long Short-Term Memory networks, and the ability to weight key information of Attention mechanisms. The model is created to solve the problems of single-modality models and enhance the performance on the target task.
The CNN–BiLSTM–Attention model has a three-stage cascaded structure. Data flows sequentially from the input layer to the CNN feature extraction layer, BiLSTM sequence modeling layer, attention weighting layer, and then to the output layer. Core logic is as follows: first, local discriminative feat from raw data, then model temporal/spatial dependencies of the local feat, and lastly highlight important feat components to focus the model on the most important info. The overall architecture of the entire system is shown in
Figure 3.
4.2. Detailed Design of Each Part
Convolutional Neural Networks are among the most frequently used algorithms in deep learning. Due to their good feature extraction ability, they have been used in pavement performance studies. The main components of CNNs are convolutional layers and pooling layers. The convolutional layer obtains the effective nonlinear local features of the input data with convolution kernels, and the pooling layer further compresses the output features of the convolutional layer to acquire more key feature information to enhance the generalization ability [
37]. This addresses the problem of low efficiency of BiLSTM in extracting local patterns from long sequences. The core architecture design and implementation principles are as follows:
Multi-scale convolutional feature extraction: This study employs 1D convolutional layers to construct a multi-scale feature-perception module. By setting convolution kernels with different window sizes, the network can systematically acquire cross-scale local feature patterns in the input sequence data. Each convolution kernel does a sliding convolution operation along the sequence-length dimension. The number of output channels is defined as a tunable hyperparameter to adjust the richness of the feature extraction and model complexity.
Convolutional Layer 1: Uses 32 convolutional filters with a kernel size of [1, 1], a default stride of [1, 1], and valid padding (no zero-padding). The output feature map dimension is adjusted to 32 channels.
Activation function: After the convolution operation, the ReLU (rectified linear unit) function is used to introduce nonlinearity, which helps the model learn more complex feature mappings. The ReLU function is defined as
Convolutional Layer 2: Follows the ReLU layer with 64 convolutional filters of size [1, 1] (stride = [1, 1], valid padding), expanding the feature dimension to 64 channels.
Max pooling: After convolution, max pooling is performed on each output channel (for example, 1D max pooling, and the pool size is equal to the length of the convolution output) to retain the most discriminative local features (i.e., the maximum value in each feature map) and reduce the dimensionality of the feature tensor in order to prevent overfitting and speed up the subsequent BiLSTM computation.
where F is the feature-map vector. By keeping the local maximum activation responses, this mechanism reduces the feature dimensionality and retains the most discriminative feature patterns. This design not only effectively avoids the problem of overfitting, but also greatly improves the computational efficiency by lowering the input dimensionality of the following BiLSTM module.
BiLSTM layer sequence-dependency modeling: LSTM only depends on past sequence information for prediction at the next time step. A problem is raised: the present time step’s output is associated not only with previous information, but also with future information [
38]. BiLSTM was therefore connected by adding two LSTMs to the architecture to combine the past and future information for the current time step to effectively improve the prediction accuracy. The calculation process for the forward propagation and backward propagation states of a BiLSTM network is as follows:
Forward LSTM
Input sequence: x1, x2, …, xt; output hidden-state sequence: h1f, h2f, …, htf.
Backward LSTM
Input reversed sequence: xt, xt−1, …, x1; output hidden-state sequence: htb, ht−1b, …, h1b.
Bidirectional output merging:
where W, U, and b: trainable parameters (weight matrices and biases);
σ: Sigmoid activation function;
tanh: hyperbolic tangent activation function;
⊙: element-wise multiplication;
concat: vector concatenation.
In the implementation, the BiLSTM module is used to capture temporal dependencies in the calibrated features. First, the folded sequence is restored through the Sequence Unfolding Layer, where the mini-batch size information from the sequence folding layer is used to ensure dimensional consistency. Then, the Flatten Layer converts the 3-dimensional feature map into a 1-dimensional vector to match the input format of the BiLSTM layer. The BiLSTM layer is configured with one bidirectional LSTM layer that contains 6 neurons in each direction (12 hidden units in total). The output mode is set to “last”, meaning only the hidden state of the last time step is retained for subsequent regression tasks. Moreover, the sequence length of the BiLSTM layer is equal to the input feature dimension, as the feature vector of each sample is treated as a sequence with a length consistent with the input feature dimension. Moreover, the sequence length of the BiLSTM layer is equal to the input feature dimension f_, as the feature vector of each sample is treated as a sequence of length f_.
Attention-layer key-feature weighting: Drawing on the selective attention mechanism of human visual cognition, this component enables targeted acquisition of pivotal information and elimination of redundant, non-critical data. Through the allocation of probabilistic weights, it guides the neural network to focus on specific feature categories, which in turn contributes to the improvement of prediction outcomes [
39]. Also, it reduces the information loss caused by sequences that are too long in the BiLSTM layer. So, introducing an attention mechanism into a neural network may also improve the prediction accuracy of the neural network [
40].
A Squeeze-and-Excitation (SE) Attention mechanism was adopted to adaptively recalibrate the channel-wise feature weights, enhancing the model’s focus on critical features:
Squeeze Operation: The global average pooling output (64-dimensional vector) is fed into a fully connected layer with 16 neurons, reducing the feature dimension to 16 to capture channel-wise dependencies.
Excitation Operation: A ReLU activation function is applied to the compressed vector, followed by another fully connected layer that maps the 16-dimensional vector back to 64 dimensions. A Sigmoid activation function is then used to generate attention weights (ranging from 0 to 1) for each of the 64 channels.
Feature Calibration: The attention weights are multiplied element-wise with the original 64-channel feature map from the CNN module (via multiplication layer), emphasizing important channels and suppressing irrelevant ones.
Note: The SE Attention mechanism focuses on channel-wise feature refinement. Its core dimensions are defined as the compression dimension (16) and the recovery dimension (64), which correspond to the number of neurons in the two fully connected layers.
4.3. Model Training Strategy
The model was trained using MATLABR 2023b’s Deep Learning Toolbox, using the following key hyperparameters and training settings:
Optimizer: Adam optimizer, which adaptively adjusts the learning rate for each parameter using first-order and second-order moment estimates, improving training stability and convergence speed.
Initial Learning Rate: Set to 0.01. A piecewise learning rate schedule was adopted, with a drop factor of 0.1 and a drop period of 500 epochs (i.e., the learning rate is reduced to 0.001 after 500 training epochs). All other models adopt this hyperparameter configuration.
Training Epochs: The maximum number of training epochs (MaxEpochs) was set to 500 to ensure sufficient model training without overfitting.
Batch Size: The batch size was set to the default value of MATLAB’s trainNetwork function (typically 128 for small- to medium-sized datasets), balancing training efficiency and memory usage.
Loss Function: The mean squared error (MSE) was used as the loss function, which is suitable for regression tasks to minimize the squared difference between predicted and true values.
Regularization: No L1/L2 regularization or dropout was applied in this study as the model’s generalization ability was ensured through data shuffling and the train–test split.
Data Shuffling: The training set was shuffled every epoch (Shuffle = ‘every-epoch’) to prevent the model from memorizing the training sequence.
Training Visualization: The ‘Plots’ = ‘training-progress’ option was enabled to display real-time training curves (loss vs. epochs) to monitor convergence.