# Multi-Scale Residual Depthwise Separable Convolution for Metro Passenger Flow Prediction
## 2 Methodology
### Residual Depthwise Separable Convolution Module  
As we all know, traditional CNN may suffer from performance degradation and overfitting as the network depth increases, especially for limited training data. Therefore, the residual network (ResNet) has emerged as a solution to improve performance and optimize deeper models [29]. In this study, we employ an improved residual module RDSC that leverages the synergy between depthwise separable convolution and attention mechanism. As depicted in Figure 3, the input passenger flow passes through a series of processes to obtain the output features, DSConv represents a depthwise separable convolution, BN indicates a batch normalization layer, ReLu denotes an activation function, and channel-attention mechanism includes squeeze and excitation operations. The main effect of the attention mechanism is to make the model adaptively learn the importance of each channel, thus reducing the focus on non-essential feature channels. Through these connections, information can flow directly from one layer to another, thus alleviating the vanishing gradient problem and facilitating the training of deep networks. Figure 1 illustrates two RDSC modules being used to extract inflow or outflow features. Subsequently, the extracted features are flattened and fed into the fully connected layer.  
In this module, the structure of traditional residual networks is improved to simultaneously optimize the network model parameters and increase the prediction accuracy. Specifically, we introduce a depthwise separable convolution to divide the convolution process into two distinct stages, depthwise convolution and pointwise convolution, as depicted in Figure 4. The numbers of input channels and output channels are \(C_{in}\) and \(C_{out}\), the sizes of input space width and height are \(H_{in}\) and \(W_{in}\), the size of output space width and height are \(H_{out}\) and \(W_{out}\), and the size of convolutional kernel is \(K\times K\) and spatial dimension is \(D_{k}\). First of all, depthwise convolution only operates one convolution kernel for each input data channel and obtains feature maps with number \(C_{in}\) in size \(H_{out}\times W_{out}\times 1\)  
Figure 3: Residual depthwise separable convolution.  
Subsequently, pointwise convolution takes the output feature maps obtained from depthwise convolution as input and uses convolution kernels of size \(1\times 1\times C_{in}\) with number \(C_{out}\) to perform the convolution operation for each channel, thus obtaining a new feature map of size \(H_{out}\times W_{out}\times C_{out}\). This improvement significantly reduces the number of parameters and computational complexity, as well as retaining capacity of the model for intricate feature representation.  
We also introduce the concept of dilation rates within the framework of depthwise separable convolution. The dilation rate permits convolution kernels to traverse across selective pixels or feature points while performing convolution, thus extending the receptive field. Standard convolution is a special case, with dilation rate being equal to 1, as shown in Figure 5a, which demonstrates the standard convolutional receptive field for a filter size of \(3\times 3\). When the filter sizes are the same, both being \(3\times 3\), the particular receptive fields with different dilation rates for convolution can be observed in Figure 5b,c. The sensory field that extends beyond the range of the standard convolution contributes to a comprehensive understanding of the data distribution and improves the ability to discern complex spatiotemporal relationships.