## 2 The Proposed Approach  
In this section we first propose our framework for the representation of traffic congestion data of a road network. Our proposed representation framework consists of two steps. The first step segments original traffic congestion matrices into equally sized grids. The second step reduces all values in each grid using a pooling operation into a single value which will replace all values in that grid, and thus, the size of original traffic congestion matrices is reduced in a way similar to image down-sampling [31]. These two steps are described in Sections 2.1 and 2.2. Then, we construct a deep learning model based on CNNs and LSTMs to evaluate the effectiveness of the proposed representation framework.  
We use raw snapshots, as shown in Figure 1a, of traffic congestion maps captured from online map service providers as a raw data source for traffic congestion data. As can be seen in Figure 1a, roads are marked with different colors for different congestion levels which provide useful traffic congestion data,yet there are also background and other nonroad elements which are not needed and thus need to be removed. In order to keep only roads marked with congestion information, an image mask is derived from a special kind of raw snapshots of traffic congestion maps for the same area. Such special raw snapshots are special in that all roads in them are marked with the color for being smooth, which is green, as used by almost all online map service providers. They are widely available late at night when there are few vehicles running on roads. As an example, Figure 2a shows such a special raw snapshot captured at 02:54, 30 March 2019. With help of image processing algorithms, green pixels for smooth roads are converted to 1 while all other pixels were converted to 0. Thus, an image mask was obtained as shown in Figure 2b. After background removal using image masks for road networks, these raw snapshots are transformed into images like Figure 1b, which only keep a road network whose road segments are marked with congestion levels using different colors, for example green, yellow, red, and dark red. Then, each of these network-only images is converted into a matrix, with each pixel inside turned into a normalized value in \([0.0,1.0]\) according to color of that pixel's congestion level. Although the derived properties of traffic flow, such as the congestion intensity [32] and congestion index [33], in the existing literature are defined on wider ranges of values, such value ranges are inappropriate as direct inputs to deep learning models for the prediction of traffic congestion, because without being normalized they cause a problem known as internal covariate shift [34]. Such matrices form a set of original traffic congestion matrices. As discussed in Section 1, these original traffic congestion matrices need to be reduced because of the often limited availability of computing resources and to prevent overfitting.  
Figure 1: Congestion maps of an urban area traffic network in Guiyang, Guizhou, China. (**a**) A raw snapshot of the traffic network’s congestion map. (**b**) Only the road network marked with congestion levels is retrained after removing the background and other elements. (**c**) An original congestion matrix visualized as a network-only image is partitioned into grids. (**d**) A down-sampled traffic congestion matrix rendered as a map.