# A Multiview Representation Learning Framework for Large-Scale Urban Road Networks
## 3 Methodology
### Multiview Random Walk  
To effectively realize more comprehensive and credible representations of urban road networks, this paper uses Markov and topological matrices to model the vehicle transfer pattern (mobility awareness) and structure function of the road network (topology awareness). Based on this approach, a multiview random walk method is proposed. Regarding the vehicle transfer pattern, we use the vehicle trajectory to model the mobility edge \(E^{(M)}\) in multigraph \(G\) and assign the weight \(W^{(M)}\) of edge \(E^{(M)}\) through the Markov transition matrix. Therefore, the driving path of the vehicle between the road segments is first modeled as a Markov chain:  
\[M[(v_{1}\to v_{2}\rightarrow\ldots\to v_{i-1})\to v_{i}]=M[v_{i-1} \to v_{i}], \tag{3}\]  
Notably, the road segment that is reached by the vehicle in the next step is only determined by the road segment that is passed in the previous step. Therefore, there is a transition probability between these two road segments to potentially control the driving pattern of the vehicle within the road network. The combination of this probability is a \(N\) by \(N\) matrix and becomes the Markov transition matrix \(M=\left[m_{ij}\right]\in\mathbb{R}^{N\times N}\). To calculate the Markov transition matrix \(M\) from massive vehicle trajectories, \(\gamma_{ij}\) is defined as the number of vehicles traveling from segments \(v_{i}\) to \(v_{j}\) in the vehicle trajectory data, and the \(N\) by \(N\) matrix \(\Gamma=\left[\gamma_{ij}\right]\in\mathbb{R}^{N\times N}\) can be obtained. Based on the above, the Markov transition matrix \(M\) can be calculated with Equation (6) via the maximum likelihood:  
\[M=diag(\Gamma\mathbf{1})^{-1}\Gamma, \tag{4}\]  
Then, we can assign \(M\) to the weight matrix of the mobility edge \(E^{(M)}\), i.e., \(W^{(M)}=M\). Graph \(G^{(M)}=\left\{V,E^{(M)},W^{(M)}\right\}\) describes the interaction among the road segments in multigraph \(G\) from the perspective of human mobility. Regarding the topology structure of the road network, we can construct the adjacency matrix \(\Theta=\left[\theta_{ij}\right]\in\mathbb{R}^{N\times N}\) via the physical connections in the road network. Specifically, for \(e_{ij}\in E^{(P)},\theta_{ij}=\)1; otherwise, \(\theta_{ij}=\)0. Based on this equation, the topological transition matrix can be calculated as:  
\[P=diag(\Theta\mathbf{1})^{-1}\Theta, \tag{5}\]  
Then, we can assign \(P\) to the weight matrix of the mobility edge \(E^{(P)}\), i.e., \(W^{(P)}=P\). Graph \(G^{(P)}=\left\{V,E^{(P)},W^{(P)}\right\}\) describes the interaction among the road segments in the multigraph \(G\) from the perspective of the topology. Furthermore, to learn representations from two views of road network information, we can define an adjustment matrix \(W^{(\Pi)}\in\mathbb{R}^{N\times N}\) to control the participation of two matrices (\(W^{(M)}\) and \(W^{(P)}\)) in the random walk process:  
\[\Pi=W^{(P)}\odot W^{(\Pi)}\times\eta+W^{(M)}\odot(1-W^{(\Pi)})\times(1-\eta), \tag{6}\]  
where \(\odot\) denotes the Hadamard product operation and \(\eta\in[0,1]\) is the hyperparameter. Based on Equation (6), the process of a multiview random walk on multigraph \(G\) can be expressed as follows: giving a start road segment \(v_{t1}\), for all road segments and corresponding probabilities in \(\Pi\), the alias sampling algorithm [24] is used to randomly sample the road segment \(v_{t2}\) of the next walk. It can be found that the adjustment matrices \(W^{(\Pi)}\) and \(\eta\) control the coupling mode and participation ratio of human mobility and topology information in the random walk process. Specifically, choosing \((v_{t1},v_{t2})\) as the current sequence that is generated by a random walk after step \(t2\) as an example, element \(w_{t2,j}\) of \(W^{(\Pi)}\) can be calculated through the three hyperparameters of \(p\), \(q\), and \(r\):\[w_{12,j}=