Fine-grained Spatial-temporal MLP Architecture for Metro Origin-Destination Prediction
Yang Liu Binglin Chen Yongsen Zheng Guanbin Li Liang Lin































  Sun Yat-sen University
  
  Guangzhou
  China





  Sun Yat-sen University
  
  Guangzhou
  China



  Sun Yat-sen University
  
  Guangzhou
  China
  


  Sun Yat-sen University
  
  Guangzhou
  China
  
 

  Sun Yat-sen University
  
  Guangzhou
  China   





















Accurate prediction of metro traffic is crucial for optimizing metro scheduling and enhancing overall transport efficiency. Analyzing fine-grained and comprehensive relations among stations effectively is imperative for metro Origin-Destination (OD) prediction. However, existing metro OD models either mix information from multiple OD pairs from the station's perspective or exclusively focus on a subset of OD pairs. These approaches may overlook fine-grained relations among OD pairs, leading to difficulties in predicting potential anomalous conditions. To address these challenges, we analyze traffic variations from the perspective of all OD pairs and propose a fine-grained spatial-temporal MLP architecture for metro OD prediction, namely ODMixer. Specifically, our ODMixer has double-branch structure and involves the Channel Mixer, the Multi-view Mixer, and the Bidirectional Trend Learner. The Channel Mixer aims to capture short-term temporal relations among OD pairs, the Multi-view Mixer concentrates on capturing relations from both origin and destination perspectives. To model long-term temporal relations, we introduce the Bidirectional Trend Learner. Extensive experiments on two large-scale metro OD prediction datasets HZMOD and SHMO demonstrate the advantages of our ODMixer. The code will be available.







<ccs2012>
   <concept>
       <concept_id>10010405.10010481.10010485</concept_id>
       <concept_desc>Applied computing Transportation</concept_desc>
       <concept_significance>500</concept_significance>
       </concept>
   <concept>
       <concept_id>10010405.10010481.10010487</concept_id>
       <concept_desc>Applied computing Forecasting</concept_desc>
       <concept_significance>500</concept_significance>
       </concept>
   <concept>
       <concept_id>10002951.10003227.10003236</concept_id>
       <concept_desc>Information systems Spatial-temporal systems</concept_desc>
       <concept_significance>300</concept_significance>
       </concept>
   <concept>
       <concept_id>10002951.10003227.10003241</concept_id>
       <concept_desc>Information systems Decision support systems</concept_desc>
       <concept_significance>300</concept_significance>
       </concept>
 </ccs2012>


[500]Applied computing Transportation
[500]Applied computing Forecasting
[300]Information systems Spatial-temporal systems
[300]Information systems Decision support systems
























Fine-grained Spatial-temporal MLP Architecture for Metro Origin-Destination Prediction
    Liang Lin
    April 29, 2024
======================================================================================







§ INTRODUCTION











 With the rapid development of urbanization, city populations are surging, accompanied by a gradual increase in the number of vehicles <cit.>. To enhance daily commuting convenience, people are increasingly considering the metro as their preferred mode of transportation <cit.>. Simultaneously, cities are proactively expanding their metro networks, aiming to augment the city's transport capacity and alleviate traffic pressures, thereby enhancing the quality of life for urban residents. However, to ensure the operational efficiency of the metro system and the seamless movement of passengers, real-time monitoring of metro passenger flow and predicting future trends have become imperative to address various emergencies. Consequently, metro OD forecasting, directed at estimating the flow among all stations in the forthcoming period, emerges as a critical task in metro scheduling and flow management.

Over time, various models utilizing deep learning have been employed to address the metro OD prediction problem <cit.>. However, as illustrated in Fig. <ref>(a), these models predominantly adopt a station view, encoding all data from each station at every time moment in a coarse-grained manner. This approach results in the mixing of data from various OD pairs, causing the encoded features to encompass information from different OD pairs. Consequently, these models face challenges in discerning the flow changes of OD pairs. In reality, given that the purpose of most people's trips is clear, and the origin and destination of the majority of trips are predetermined, it is more suitable to encode the OD matrix from the perspective of OD pairs. The OD pair view encodes each OD pair independently to distinguish different OD pairs, which is more fine-grained than the station view that mixes multiple OD pairs.


Actually, there are exist some models that predict the metro OD matrix from the OD pair view <cit.>, but they only focus a subset of OD pairs in the metro. This constrained approach neglects the richness of information among all OD pairs, resulting in the model's inability to learn fine-grained relations across the entirety of OD pairs. Consequently, it hampers the model's capability to address potential emergencies, comprehend the dynamics of traffic changes, making it difficult to provide effective support for the management of the metro. To achieve more comprehensive metro OD prediction, it is imperative to consider information from all OD pairs. However, considering the number of OD pairs as N^2, the time complexity needed to calcaulate the relations among N^2 OD pairs using Transformer or to construct a virtual graph among OD pairs and subsequently employ Graph Convolution Network (GCN) for information aggregation is O(N^4), as shown in Fig. <ref>(b).
Consequently, keeping the balance between model's parameters and computation time while considering all OD pairs remains challenging.


To tackle the aforementioned challenges, we propose a simple yet efficient fine-grained spatial-temporal MLP model named ODMixer. Initially, we individually encode the time series of OD pairs base on OD pair view. Subsequently, to capture the intricate relations among OD pairs, we introduce two modules, Channel Mixer and Multi-view Mixer. The Channel Mixer module facilitates the modeling of temporal correlation by calculating relations among features of OD pairs in the temporal dimension. Considering the substantial time required for direct computation of relations among all OD pairs, as with methods like Transformer, and the potential confusion and difficulty in distinguishing important associations, the Multi-view Mixer calculates relations among different OD pairs from two perspectives—Origin and Destination. This enhances the comprehensive understanding of OD pair relations, thereby improving the efficiency of modeling fine-grained relations among OD pairs. Additionally, to exploit the time-periodicity of metro traffic, we introduce the Bidirectional Trend Learner that effectively perceives the long-term temporal relations between traffic flow and enhance the temporal attributes of features. 

Our contributions can be summarized as follows:

    
  * We propose a fine-grained spatial-temporal MLP architecture named ODMixer from the perspective of the OD pairs, to comprehensively capture OD relations and achieve accurate and efficient metro OD prediction.
    
  * To effectively learn the spatial and temporal dependencies between metro flows, we propose two specific modules, the Channel Mixer and the Multi-view Mixer.
    
  * To empower the model with the capability to perceive long-term flow changes, the Bidirectional Trend Learner (BTL) is introduced in the ODMixer.
    
  * Extensive experiments on two large-scale metro OD datasets demonstrate our promising OD prediction accuracy. Our ODMixer outperforms the state-of-the-art models in wMAPE for HZMOD and SHMOD datasets by a considerable margin of 5% and 7%, respectively.




§ RELATED WORK



 §.§ Origin-Destination Prediction


OD prediction <cit.> involves the accurate estimation of traffic flow between two regions over a given period of time, presenting a formidable challenge due to its intricate and dynamic nature. As a pivotal aspect of urban traffic management, OD prediction has garnered extensive research attention.



As a special type of OD prediction, the metro OD prediction <cit.> presents unique challenges compared to the general OD prediction, primarily because the precise destinations of passengers are not accurately known until they reach their destinations. This leads to incomplete data at the current moment, making it challenging to effectively depict the real-time traffic distribution. To address this issue and obtain more comprehensive data on traffic distribution, several studies focused on predicting unfinished orders to supplement the incomplete OD matrix. For instance, in <cit.>, long and short historical distributions were utilized to estimate the distribution of unfinished orders at the current time. This study integrated the completed and unfinished distributions in the feature space. In <cit.>, an indication matrix was created, with values assigned based on the assumption that the travel time of each OD pair at each timestamp follows a normal distribution. However, this approach overlooked the unfinished OD pair data.

Different from previous approaches that neglect the
richness of information among all OD pairs, we consider all OD pairs from the OD pair view and propose a novel model base on the spatial-temporal MLP architecture to achieve more fine-grained and comprehensive relation modeling.





 §.§ MLP-based Model

With the popularity of the Transformer, its exceptional performance has led to its widespread adoption across various fields <cit.>. However, several MLP-based models have attracted attention for addressing diverse problems recently. In computer vision, <cit.> addressed vision challenges through an entirely MLP-based implementation. Another notable model gMLP <cit.> outperformed some Transformer-based models by leveraging channel projection, spatial projection, and gating mechanisms. <cit.> introduced a residual structure atop MLP, incorporating training methods like self-supervision for efficient training. <cit.> focused on reducing computational costs while maintaining performance. For sequential recommendation problems, <cit.> employed a tri-directional mixing MLP model, while <cit.> introduced SpatialMixer and TemporalMixer to address spatio-temporal dependencies and temporal variations in traffic prediction. For time series forecasting task, <cit.> and <cit.> proposed MLP-based models dedicated to efficient time series forecasting.



Unlike existing MLP-Mixer models that neglect fine-grained spatial-temporal relations, we focus on metro OD prediction task that requires fine-grained and comprehensive OD relations. In this paper, we propose a fine-grained spatial-temporal MLP model ODMixer, which excels in capturing spatial relations of metro flows, along with short-term and long-term temporal dependencies.




§ PRELIMINARIES

In this section, a concise introduction is provided for the notation and problem definitions. Table <ref> presents a comprehensive list of commonly used symbols for reference.



Definition 1. The variable IOD_t^d(i, j) is defined as the quantity of traffic entering from station i and exiting from station j at the t^th time interval of the d^th day.


Definition 2. The notation UOD_t^d(i, j) signifies the flow entering station i at the t^th time interval and exiting from station j after the t^th time interval of the d^th day.

Definition 3. The notation OD_t^d(i, j) denotes the flow at time t entering station i and subsequently exiting from station j at and after the t^th time interval of the d^th day. OD_t^d = IOD_t^d + UOD_t^d.

Definition 4. The notation unf_t^d(i) represents the flow at the t^th time interval entering station i but not exiting from any station at the t^th time interval of the d^th day. unf_t^d(i) = ∑_j=1^NUOD_t^d(i, j).

Problem 1. Considering the historical complete OD matrix (OD), alongside the incomplete OD matrix (IOD) and the unfinished orders (unf) from the most recent time period, we determine a function f to predict the complete OD flow at the subsequent time step.

    OD_t+1^d = f({OD^d-1, IOD^d, unf^d}_t-T+i)

where i=1, 2, ⋯ T, OD_t+1^d represents the OD matrix at the (t+1)^th time interval of the d^th day.



§ METHODOLOGY


This section gives a detailed description of our ODMixer.






 §.§ Architecture Overview

Our proposed ODMixer comprises two branches that operate similarly and share parameters. Initially, in the Embedding Layer, we embed the input based on the OD pair view. Subsequently, we employ ODIM to learn the relations between features. Specifically, we utilize Channel Mixer to learn the short-term temporal relations of features, followed by employing Multi-view Mixer to comprehensively learn the relations among OD pairs from both Origin and Destination perspectives. Subsequently, we use BTL to interact the features of the two branches, enhancing the long-term temporal attributes of the features. This augmentation ensures that the features contain more information, ultimately contributing to increase prediction accuracy. Finally, the Output Layer is employed to output the features.




 §.§ OD Matrix Processing

In this subsection, we introduce the approach for estimating the current UOD distribution by leveraging the historical UOD distribution and the fine-grained encoding of the OD matrix from the OD pair perspective, supported by the Embedding Layer.



  §.§.§ Unfinished Orders Processing

As the destination information is only available until passengers have exited the station, the OD matrix for the current time period is incomplete. To address this issue and enhance the completeness of the input OD matrix for the model, preprocessing steps are implemented before integrating the matrix into the model.

Acknowledging the temporal similarity characteristic of metro traffic, where the current OD traffic distribution closely resembles that of the previous time, we estimate the current UOD distribution by referencing historical UOD distributions. Our approach specifically incorporates two temporal scales: long-term and short-term UOD distributions. The calculations are outlined as follows:


    UOD = unf∗ (UOD_S + UOD_L)/2


Here, UOD∈ℝ^T × N × N represents an estimation of unfinished orders over T time intervals, unf∈ℝ^T × N is the number of unfinished orders of all stations, the symbol ∗ denotes the multiplication of the corresponding elements. UOD_S∈ℝ^T × N × N represents the short-term UOD distribution, corresponding to the UOD distribution at the same time yesterday, and UOD_L∈ℝ^T × N × N represents the long-term UOD distribution, aligned with the UOD distribution observed at the corresponding time on the same day of the previous week. This computation aims to generate a more comprehensive and accurate estimate of the UOD distribution at the current time by combining both short-term and long-term UOD distributions.

Subsequently, we derive the OD matrix for the current time, which serves as input to the Embedding Layer:

    OD = IOD + UOD

where OD∈ℝ^T × N × N is the complete OD matrix at the current time, IOD∈ℝ^T × N × N represents the matrix of actual completed orders, and UOD denotes the matrix of unfinished orders computed from the historical short-term and long-term UOD distributions. This operation ensures that the model receives more comprehensive and accurate input information, improving passenger destination prediction by combining information from both completed and unfinished orders.



  §.§.§ Embedding Layer

Unlike the previous models for handling OD matrix, we consider it from the OD pair view. We encode each OD pair sequence using the Embedding Layer, which ultimately yields fine-grained features of the OD matrix:

    H_i = W^EOD_i

where i = 1, ⋯, N^2, W^E∈ℝ^d × T is learnable weights of Embedding layer, H∈ℝ^N × N × d represents the obtained feature representation after the Embedding Layer, OD denotes the data containing all OD pairs, and Embedding Layer is one-layer MLP. This approach differs from the previous methods that treat the OD matrix as a whole. Instead, we emphasize modeling each OD pair independently, to effectively capture the characteristics and dynamics of each OD pair.

By modeling OD sequences, we can distinguish the difference among OD pairs at a fine-grained manner, which enhances the sensitivity and accuracy of the model in predicting OD matrix. Moreover, this approach is more realistic, considering significant differences among various OD pairs. Modeling these OD pairs individually better reflects the inherent variability within the data.



 §.§ Origin-Destination Interact Module (ODIM)

ODIM conducts spatio-temporal interaction of features encoded by the Embedding Layer. It comprises two modules: Channel Mixer, which considers the short-term temporal relations of features within OD pairs, and Multi-view Mixer, which models the relations among OD pairs.



  §.§.§ Channel Mixer

In the domain of metro traffic, temporal attributes play a pivotal role, and there exist discernible correlations between traffic patterns at different time. Consequently, the model must adeptly capture the temporal characteristics of flow to ensure accurate OD predictions. Leveraging the Embedding Layer, we encode each OD sequence as features. To effectively capturing the time-varying relations within the flow, it is imperative to compute the inter-dependencies among these features. Thus, we introduce the Channel Mixer structure, facilitating the fusion of attributes across different time to discern and learn the temporal patterns inherent in the flow. This yields a feature representation enriched with temporal attributes.

The Channel Mixer structure can be expressed as follows:

    H^C_i = LayerNorm(H_i + W^C_2σ(W^C_1H_i))

where, i = 1, ⋯, N^2, σ is the activation function, W^C_1∈ℝ^d_C× d is learnable weights of the first fully connected layer in the Channel Mixer, W^C_2∈ℝ^d × d_C is learnable weights of the second fully connected layer, H^C∈ℝ^N × N × d represents the feature after temporal attributes have enhanced by the Channel Mixer. We employ layer normlization (LayerNorm) <cit.> and residual connection <cit.> in the Channel Mixer. The Channel Mixer structure is specifically designed to merge attributes from diverse time intervals within the feature representation, enhancing the model's ability to capture temporal traffic patterns. Most importantly, the Channel Mixer parameters are shared across all OD pairs, implicitly fostering temporal interactions between distinct OD pairs without necessitating an increase in parameter count. This shared parameter design contributes to the model's efficiency in learning global temporal patterns, thereby enhancing its capacity to comprehend and predict variations in traffic over time.



  §.§.§ Multi-view Mixer

The diverse relations among different OD pairs, such as the similarity in traffic variations among OD pairs connecting similar types of stations, hold the potential to enhance the accuracy of OD predictions. However, calculating the relations among N^2 OD pairs using attention models, such as Transformer, demands a considerable amount of time. Moreover, the direct calculation of relations among N^2 OD pairs may pose challenges in discerning the relations crucial for actual prediction. Therefore, efficiently computing the relations among OD pairs is a crucial and challenging problem.

To address this issue, we introduce the Multi-view Mixer module by analyzing relations among OD pairs from multiple perspectives. Recognizing that each OD pair represents the flow between two stations, which is notably correlated with the origin and destination, we propose the Multi-view Mixer module, consisting of two distinct parts: Origin Mixer and Des Mixer.

Origin Mixer Module: From the perspective of the origin within an OD pair, this module evaluates all OD pairs sharing the same origin. Concretely, we apply a dimensional transformation to the input feature H^C to obtain the transformed feature H^C_O∈ℝ^(N × d) × N, where the first N is the number of origins, the second N is the number of destinations. Then we calculate the relations among OD pairs as indicated by:

    H^O_i   = W^O_2σ(W^O_1H^C_O_i)

where i = 1, ⋯, N × d, W^O_1∈ℝ^d_O × d and W^O_2∈ℝ^d × d_O are the learnable weights of the Origin Mixer, H_O∈ℝ^N × N × d denotes the output of the module.

Des Mixer Module: Analogous to the Origin Mixer, this module concentrates on relations among OD pairs from the destination perspective. To be more specific, we initially interchange the two dimensions of origin and destination, and subsequently transform the dimensions in the same way as the Origin Mixer to derive H^C_D∈ℝ^(N × d) × N, where the first N is the number of destinations and the second N is the number of origins. The calculation is:

    H^D_i   = W^D_2σ(W^D_1H^C_D_i)

Where, i = 1, ⋯, N × d, W^D_1∈ℝ^d_D × d and W^D_2∈ℝ^d × d_D are the learnable weights of the Des Mixer, H^D∈ℝ^N × N × d is the output of the Des Mixer.

Then, to obtain features after comprehensive interaction with the remaining OD pairs, a fusion approach is employed to maintain simplicity while reducing computation time:

    H^F = LayerNorm(H^O + H^D + H^C)

where H^F∈ℝ^N × N × d.

This design enables more efficient modeling of relations among complex OD pairs, thereby enhancing the model's accuracy in OD prediction. Simultaneously, by considering relations from different perspectives, the model comprehensively captures the intricate dynamics among stations.




 §.§ Bidirectional Trend Learner (BTL)


Due to the regularity observed in people's daily routines, metro traffic exhibits temporal similarities. To effectively leverage this temporal consistency and provide a reference for the trend in OD traffic changes at the current time, we introduce a BTL. This learner discerns the temporal similarities and change trends in the flow in two directions: from the past to the present and from the present to the past, respectively.

The bidirectional trend learner comprises two symmetric components, one of which is delineated below. Initially, we aggregate two temporal features and subsequently interact these features using 1D convolution to obtain the feature H_f, representing the perceptual flow features over time:

    H_f = Conv1d([H_prev; H_cur])

[;] denotes the concatenation of features, H_prev, H_cur∈ℝ^N × N × d represent the features of two branches, respectively, H_f∈ℝ^N × N × d is the feature after the interaction.

Subsequently, the impact of the perceived change on H_prev, denoted as H_g∈ℝ^N × N × d, is obtained through the Sigmoid activation function:

    H_g = δ(W^gH_f)

where W^g∈ℝ^d × d is the learnable weights, δ denotes the Sigmoid activation function.

Finally, we apply this effect to H_prev to obtain H̃_prev∈ℝ^N × N × d, capturing the trend of the flow from the present to the past:

    H̃_prev = H_g∗ (W^pH_prev) + H_prev

where W^p∈ℝ^d × d, ∗ is the Hadamard product.

With the bidirectional trend learner, we derive features that perceive the traffic trend in both directions over time:

    H̃_prev, H̃_cur = BTL(H_prev, H_cur)


This design empowers the model to comprehensively grasp temporal similarities and trends in both the past-to-present and present-to-past directions, thereby enhancing the accuracy of OD flow predictions at the current time.



 §.§ Optimization

In this subsection, we first introduce double-branch architecture of the model and then proceed to detail the model's loss function. Subsequently, we perform time complexity analysis for each component and the model.


  §.§.§ Loss Function

To fully exploit the temporal relations within OD traffic, we establish two branches to model the past and present variations in OD traffic. Here, `prev` represents the OD traffic at the same time yesterday, and `cur` represents the OD traffic at the current time. Notably, the layer parameters of these two branches are shared. We formulated two loss functions to simultaneously optimize both branches, thereby further enriching the temporal attributes embedded in the learned features.

Ultimately, the loss function of the ODMixer is defined as:

    Loss   = L_d-1 + L_d
    
    L_{d-1, d}   = ∑_i=1^N∑_j=1^N|OD_t+1^{d-1, d} - OD_t+1^{d-1, d}|/N^2

where OD_t+1^{d-1, d} and OD_t+1^{d-1, d} represent the predicted and true values of the OD matrix at the (t+1)^th time interval of (d-1)^th or d^th day, respectively.

This loss function is designed to prompt the model to learn trends in both yesterday's and today's OD traffic, facilitating a more robust capture of temporal relations. Moreover, this approach aims to enhance the accuracy of OD forecasts by better understanding and predicting the evolving patterns of OD traffic over time.



  §.§.§ Model Complexity

The ODMixer model, comprising two fundamental components, namely ODIM and BTL, is analyzed for its computational complexities.

ODIM consists of two components: Channel Mixer and Multi-view Mixer. For Channel Mixer, the computational cost primarily arises from matrix multiplication in the linear layer, with intermediate dimensions being 2d. This results in approximately 4N^2d^2 operations. Because the d is chosen independent of N, the time complexity of the Channel Mixer is O(N^2). 

The Multi-view Mixer module comprises two components: the Origin Mixer and the Des Mixer, with both components sharing a similar structure. Taking Origin Mixer as an example, the number of operations in the module is around 4N^2d^2, resulting in a time complexity of O(N^2). 

For the BTL module, it contains two symmetric parts. Focusing on the top half, it comprises a 1D convolution layer followed by two linear layers. The computation required for the 1D convolution is 2N^2d operations, and each linear layer requires N^2d^2 operations. Consequently, the time complexity of the BTL module is O(N^2).
 
Combining these analyses, the ODMixer model demonstrates a time complexity of O(N^2). The training and inference time of both the baseline and ODMixer models are evaluated through experiments, as showed in Table <ref> and <ref>.



§ EXPERIMENT

In this section, we validate the effectiveness of our model across two extensive datasets. First, we describe the experimental configuration, including construction of the datasets, implementation details and evaluation metrics. Subsequently, we compare our proposed ODMixer with both basic and state-of-the-art models. We then conduct ablation studies to verify the influence of each component on the model's performance. Finally, we also analyse the hyper-parameter settings and the efficiency of the model.



 §.§ Experimental Configuration



  §.§.§ Dataset Description

We conduct experiments on two real-world datasets <cit.>, as shown in Table <ref>. HZMOD records transaction data for 80 stations from January 1, 2019, to January 25, 2019. SHMOD records transaction data for 288 stations from July 1, 2016, to September 30, 2016. These transaction data are segmented into 15-minute interval, and the complete dataset is partitioned into training, validation, and test set following a specific ratio. 







  §.§.§ Implementation Details

We implement our model in PyTorch and conduct both training and testing using 8 RTX 2080Ti GPUs. The initial learning rate for the model is set at 0.001. To optimize the model loss, we employ the Adam optimizer. The batch size is set to 32 for both datasets. The input sequence T is set to 4. The input data and the ground-truth of output are normalized with Z-score normalization before fed into the model. The feature dimension d is 16 and ODMixer layer L is 5. And we set d_C = d_O = d_D = 2 × d.



  §.§.§ Quantitative Evaluation Metrics

In our study, we have selected three widely employed performance metrics within the domain of traffic flow prediction to serve as the benchmarks for evaluating the model's effectiveness. These metrics include Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and Weighted Mean Absolute Percentage Error (wMAPE).


    MAE   = 1/N^2∑_i=1^N∑_j=1^N|OD(i, j) - OD(i, j)| 
    RMSE   = √(1/N^2∑_i=1^N∑_j=1^N(OD(i, j) - OD(i, j))^2)
    wMAPE   = ∑_i=1^N∑_j=1^N|OD(i, j) - OD(i, j)|/∑_i=1^N∑_j=1^NOD(i, j)





 §.§ Comparison with State-of-the-Art Methods

We conduct a comparative analysis between our proposed model and a selection of classical as well as contemporary models, following as: Historical Average (HA), LSTM <cit.>, GRU <cit.>, Graph WaveNet <cit.>, DCRNN <cit.>, STG2Seq <cit.>, PVCGN <cit.>, DGSL <cit.>, Informer <cit.>, HIAM <cit.>. STCNN <cit.> and
ST-VGCN<cit.> that consider OD pairs are included because they have no publicly accessible codes and have not been evaluated on identical datasets.














 





We have conducted experiments on two datasets, and the experimental results for all methods are presented in Table <ref> and <ref>. Firstly, the simplest method, HA, can partially reflect the flow range of the training set by directly averaging it. However, lacking generalization ability, it fails to capture temporal variations in traffic. Consequently, its performance tends to be inferior to that of ODMixer, with the performance gap widening as the dataset size increases. After analysis, it is evident that the performance of LSTM, GRU, Graph WaveNet, and STG2Seq models is inferior to that of HA, potentially due to their oversimplified design that neglects the spatial-temporal dependencies among metro stations. The incorporation of spatial-temporal relations in models like DCRNN and Informer has resulted in better performance. DGSL outperforms other baselines on the SHMOD dataset because it learns the graph structure rather than using the provided stricture, which allows for a more effective capture of relations on complex dataset. PVCGN, which considers three types of graphs and comprehensively accounts for the interstation relations, exhibits good performance across both datasets. HIAM, which integrates OD and DO information and considers the incompleteness of OD matrices, achieves commendable results but performs less effectively than DGSL on the SHMOD dataset, possibly because the large scale of SHMOD requires a more fine-grained approach than can be provided by neighborhood graph aggregation alone to capture the complex interactions among numerous stations.



In contrast, ODMixer models the OD matrix with fine granularity from the perspective of OD pairs. Subsequently, it leverages the spatio-temporal relations among OD pairs through the ODIM module and integrates long-term temporal dynamics with the BTL module, thereby achieving superior performance.




 §.§ Ablation Study
















In this subsection, we aim to validate the effectiveness of essential modules within ODMixer. By systematically removing each module, we derive variants of ODMixer. The subsequent comparison of performance differences among these variants and the original ODMixer allows us to understand the specific contributions of each module to the overall model. The following variants will be evaluated on two datasets:

    
  * ODMixer-w/o CM: Remove Channel Mixer, eliminating short-term temporal relations modeling.
    
  * ODMixer-w/o OM: Remove Origin Mixer, eliminating the Origin perspective in OD pair relations modeling.
    
  * ODMixer-w/o DM: Remove Des Mixer, eliminating the Destination perspective in OD pair relations modeling.
    
  * ODMixer-w/o MM: Remove Multi-view Mixer, eliminating relations modeling among OD pairs.
    
  * ODMixer-w/o BTL: Remove BTL, eliminating the perception of long-term traffic changes.
    
  * ODMixer-w/o PB: Remove Prev Branch and BTL, eliminating the usage of historical information.

The results are presented in the Table <ref> and <ref>. ODMixer-w/o CM exhibits inferior performance compared to ODMixer, signifying the effectiveness of Channel Mixer in modeling short-term temporal relations of OD pairs. ODMixer-w/o MM performs less effectively than both ODMixer-w/o OM and ODMixer-w/o DM, highlighting the necessity of both Origin and Destination perspectives. The results indicate that these two perspectives complement each other in considering the relations among OD pairs. ODMixer-w/o BTL and ODMixer-w/o PB show some performance losses, suggesting that accounting for the temporal similarity of metro flows can enhance the model's performance. Due to the difficulty of accurately modeling long-term dependencies for large-scale metro data, ODMixer performs slightly worse than ODMixer-w/o BTL in RMSE metrics. These experimental findings affirm that all modules contribute to the ODMixer.





 §.§ Hyper-parameters Analysis

We conduct experiments to optimize the hyperparameters of ODMixer, with the results depicted in Figure <ref>. The hyperparameters for ODMixer include the number of layer L and the number of channel d. Notably, when L is small, the model exhibits weak feature extraction capabilities, resulting in comparatively inferior performance. Conversely, a large L introduces fluctuations in performance. After comprehensive experimentation, we establish the optimal setting as L=5. Regarding the dimension of the hidden layer, experimental findings indicate that d=16 is a better choice for achieving desirable model performance.



 §.§ Efficiency Analysis





In this subsection, we quantify the number of parameters for the various models. To ensure a fair comparison, all models are evaluated on a single NVIDIA GeForce RTX 2080 Ti GPU with a consistent batch size. The batch size is 8 for SHMOD and 32 for HZMOD. 


Table <ref> and <ref> present a comparative analysis of all methods. The LSTM, GRU, Graph WaveNet, and STG2Seq models exhibit poorer performance than HA, despite their shorter training and inference times. Despite Informer's short training and inference times on the HZMOD dataset, it has a substantial number of parameters. Regarding the SHMOD dataset, Informer cannot be trained , even when the batch size is 1. Furthermore, the PVCGN model is unable to be trained on a single GPU with a batch size of 32 for HZMOD, necessitating a reduction to 16 for testing. Despite its good performance, the PVCGN model requires significantly longer training and inference times. In contrast, the HIAM model, which serves as the best-performance baseline, has a higher number of parameters, as well as longer training and inference times compared to ODMixer. Our proposed ODMixer not only achieves superior performance but also maintains reasonable training and inference times.




§ CONCULSION

In this paper, we introduce ODMixer, a fine-grained spatial-temporal MLP architecture to address the metro OD prediction problem. Our ODMixer learns the short-term temproal relations of OD pairs by incorporating the Channel Mixer. The Multi-view Mixer efficiently captures OD pair relations from both origin and destination perspectives. With the integration of BTL, our ODMixer can perceive long-term traffic changes. Experimental results represent ODMixer's outstanding performance on two large-scale datasets. 

Future directions for ODMixer involve incorporating additional city information, such as urban population distribution, regional composition, and Point of Interest (POI), to further enrich feature representation. Moreover, enhancing the model’s ability to learn the general pattern of traffic flow can improve its migration capability and scalability. Deploying ODMixer in actual metro systems can facilitate the management and optimization of metro operations, thereby enhancing transportation efficiency.














ACM-Reference-Format



