## 3 Methodology
### GRU Model  
The GRU, a member of the recurrent neural network family, excels at handling sequential regression tasks [14; 41]. Its ability to preserve and recall vital data from previous steps in a sequence stands out, mirroring the operational strengths of long short-term memory (LSTM) models [42]. A standout feature of GRU is its swift training pace combined with a diminished risk of overfitting. Such traits become especially beneficial in scenarios with extensive datasets or limited computational resources, as commonly seen in airfare prediction tasks [18]. Additionally, the GRU model excels at detecting long-term dependencies and complex interrelations in timeseries data [18; 43]. This capability facilitates capturing influential factors such as seasonal variation, holiday, and economic oscillation, which may affect the prices over time. Due to the proficiency on highlighting the intricate relationships, GRU contributes to the good performance of airfare prediction. Furthermore, GRU exhibits lower sensitivity to the vanishing gradient problem, which is a common pitfall basic recurrent neural networks (RNNs) often encounter when deciphering long-term dependencies [44]. This resilience makes GRU more robust and suitable for the tasks involving extended sequences, which is a characteristic essential for airfare prediction. Moreover, GRU can be integrated seamlessly with other neural networks or feature engineering methods to improve the prediction precision. Such versatility makes the GRU model appropriate for managing complex prediction tasks. In this paper, the ABSA is incorporated into the GRU-based airfare prediction model since the sentiment scores quantifying customer opinions on various aspects might be correlated to the airfare and could enhance the predictive capability of the model. Next, the basics of GRU are briefly summarized. Figure 5 shows the internal architecture of a GRU, as formulated below. \[z_{t}=\sigma(W_{z}x_{t}+U_{z}h_{t-1}+b_{z}) \tag{4}\]  
\[r_{t}=\sigma(W_{r}x_{t}+U_{r}h_{t-1}+b_{r}) \tag{5}\]  
\[u_{t}=tanh(W_{h}x_{t}+U_{h}(r_{t}\odot h_{t-1})+b_{h}) \tag{6}\]  
\[h_{t}=z_{t}\odot h_{t-1}+(1-z_{t})\odot u_{t} \tag{7}\]  
where \(\sigma\) is the sigmoid function, normalizing outputs to between 0 and 1, and \(tanh\) is the hyperbolic tangent function, scaling activations to between \(-1\) and 1. \(W_{z}\), \(W_{r}\), \(W_{h}\), \(U_{z}\), \(U_{r}\), and \(U_{h}\) are weight matrices associated with the update gate, reset gate, and candidate hidden state, respectively, while \(b_{z}\), \(b_{r}\), and \(b_{h}\) are the corresponding bias vectors. These matrices and vectors are crucial for the gates' operations and are learned during training. \(x_{t}\) is input vector at time t, while \(h_{t-1}\) and \(h_{t}\) are previous and current hidden states, respectively. \(z_{t}\), \(r_{t}\), and \(h_{t}\) represent the update, reset, and candidate hidden state vectors, and \(\odot\) denotes element-wise multiplication. Figure 5: Internal structure of a GRU unit. First, the current input \(x_{t}\) and the previous hidden state \(h_{t-1}\) are used to compute the update gate and the reset gate, as depicted in Equations (4) and (5), respectively. The outputs of the two gates are normalized so as to fall into the range between 0 and 1 by the sigmoid function, \(\sigma\). The current update state, \(u_{t}\), is then calculated with Equation (6), in which the messages from the former hidden state \(h_{t-1}\) and the current input \(x_{t}\) are blended, and the result is further normalized with the hyperbolic tangent function, _tanh_. The reset gate, \(r_{t}\), determines the fraction of the previous hidden state \(h_{t-1}\) to be reserved when computing \(u_{t}\). Equation (7) finally takes the weighting sum of the previous hidden state \(h_{t-1}\) and the current update state \(u_{t}\). The update gate \(z_{t}\) is the weight for deciding the proportion of the previous hidden state \(h_{t-1}\) to be kept and the portion of the update state \(u_{t}\) to be supplanted.