## 2 Methodology
### Seasonal Detection Module  
In the previous section, this paper provided a comprehensive introduction to the VMD process. In the following section, we will elaborate on the seasonal detection model tailored for choosing the appropriate IMFs in subway passenger flow prediction.  
Therefore, the model proposed in this article will first input the decomposed sequence data into the \"seasonal detection\" module to determine if they have strong seasonal characteristics (the specific algorithm in the seasonal detection module is described in detail in the Supplementary Materials).  
As illustrated in Figure 4 the seasonality detection module introduced in this study initially receives sequences of Intrinsic Mode Functions (IMFs) as input. It then calculates the autocorrelation function (ACF) to assess the correlation between the time series.  
The autocorrelation function (ACF) measures the correlation between observations of a time series that are separated by a specific time lag. The ACF also helps to identify the direct impact of a specific lag on the current observation, independent of the influence of intermediate lags. It provides insights into how past values influence future values.  
Series X and its lagged versions are described by the following equation:  
\[ACF(k)=\frac{\sum_{t=1}^{n-k}\left(X_{t}-\overline{X}\right)\left(X_{t+k}- \overline{X}\right)}{\sum_{t=1}^{n}\left(X_{t}-\overline{X}\right)^{2}} \tag{10}\]  
Equation (10) quantifies the autocorrelation between the time series \(X\) and its lagged version. Specifically, it calculates the relationship between the series value \(X_{t}\) and the lagged series \(X_{t+k}\) for a given lag \(k\). This equation helps determine whether significant seasonality exists, providing a basis for seasonal analysis in time series.  
The ACF values obtained are compared with a predetermined threshold, set at 0.9 for this study. This threshold was selected as a balance between detecting significant corre  
Figure 4: Our seasonal detection model.  
lations and minimizing false positives. A higher threshold, such as 0.95, might be overly restrictive and risk missing relevant seasonal patterns, while a lower threshold could introduce noise, falsely identifying non-seasonal fluctuations as significant. By choosing 0.9, we ensure that only meaningful seasonal trends are detected, allowing for reliable analysis. However, we recognize that the choice of threshold may influence the detection of seasonality, and further exploration of optimal threshold values will be an important focus in future research. If the ACF values exceed this threshold, the module proceeds with further analysis by calculating the partial autocorrelation function (PACF) of the series to confirm the presence of seasonality. The partial autocorrelation function (PACF) measures the correlation between an observation and its lagged value while controlling for the correlations at all shorter lags. This helps to identify the direct impact of a specific lag on the current observation, independent of the influence of intermediate lags.  
Specifically, the calculation of PACF values can be expressed as follows:  
\[PACF(k)=Cov(X_{t},X_{t+k}|X_{t+1},\cdots,X_{t+k+1}) \tag{11}\]  
Here, \(Cov\) denotes the covariance given the intermediate variables. The PACF is computed using statistical software to measure the correlation between the series and its lagged versions, excluding the effects of intermediate lags. If the PACF value surpasses the 90% confidence interval, it is interpreted as an indication of significant seasonality. Should the series not exhibit significant seasonality in either the ACF or PACF assessments, the module will conclude the absence of seasonality in the series.  
The framework of the seasonal detection model is illustrated in Figure 4.  
Then, adaptively, the appropriate IMFs (Intrinsic Mode Functions) are inputted into the corresponding improved TimesNet and SARIMA (Seasonal Autoregressive Integrated Moving Average) modules.