# Exploring Prior Knowledge from Human Mobility Patterns for POI Recommendation
## 3 Methodology
### POI Recommendation Algorithm Based on Human Mobility Patterns  
In a typical location-based social network (LBSNs), the POI recommendation system has a set of \(N\) users \(U=\{u_{1},u_{2},\dots,u_{N}\}\) and a set of \(M\) geographic locations \(L=\{l_{1},l_{2},\dots,l_{N}\}\), also known as the set of interest points. The set of interest points accessed by user \(u\) is represented by \(L_{u}\). Each location \(l_{i}\) is geocoded with \(<longitude,latitude>\). Generally, we convert the user's check-in information into the user-POI check-in frequency matrix \(\mathbf{C}\). Each entry \(c_{ui}\) of \(\mathbf{C}\) represents the check-in frequency of user \(u\) at place \(i\), and the check-in frequency reflects the user's preference for different points of interest. Typically, the user visits only a small number of locations, so the matrix \(\mathbf{C}\) is very sparse. We retain the weight of the human mobility pattern extractor model and separate it out separately. The result is used as the part of urban human mobility feature extraction of the recommendation algorithm [39]. The HMRec algorithm borrows from the Wide&Deep model [40], so they have similar time complexity, approximately \(O(d+Ln)\), where \(d\) represents the dimensionality of the input features, \(L\) is the number of layers in the model, and \(n\) is the number of neurons per layer. The specific structure of the model is shown in Figure 2.  
The HMRec model utilizes multiple cross layers for feature crossing [41]. If the output vector of the \(l\)-th Cross layer is \(\mathbf{x}_{l}\), then the output of the \(l+1\)-th layer is  
\[\mathbf{x}_{l+1}=\mathbf{x}_{0}\mathbf{x}_{l}^{T}\mathbf{W}_{l}+\mathbf{b}_{l}+\mathbf{x}_{l} \tag{8}\]  
The second-order operation of the cross layer is similar to the outer product operation in the PNN model, on top of which we add the weights \(\mathbf{w}_{l}\) of the outer product operation, as well as the input \(\mathbf{x}_{l}\) and bias \(\mathbf{b}_{l}\). It can be seen that the cumulative effect of the superposition of the Cross layers on the parameter quantity is relatively slow, and each layer only adds an  
Figure 2: HMRec algorithm structure. The input of the deep model is a full amount of feature vectors, covering the geographic location features, time features, category features of POIs, and ID class features of users and POIs. The inputs to the Cross model are user ID, POI ID, and POI category.  
\(n\)-dimensional weight vector \(\mathbf{w}_{l}\), where \(n\) is the dimension of the input vector. In addition, the original input vector \(\mathbf{x}_{l}\) is preserved at each layer so that the variation between input and output is small. We retain the weight of the human mobility pattern extractor model and separate it out separately, and it is used as part of the urban human mobility feature extraction of the recommendation algorithm [42]. The overall algorithm flow is shown in Algorithm 1.  
```
0: Features of urban human mobility pattern \(f_{h}\), point of interest \(ID_{l}\), user \(ID_{j}\), dense features \(f_{d}^{1},f_{d}^{2},\ldots,f_{d}^{m}\), discrete features \(f_{s}^{1},f_{s}^{2},\ldots,f_{s}^{m}\)
0: The predicted score \(p\) of user \(j\) checking in at POI \(i\)  Part I: Cross Layer
1: transform the discrete features into the dense features: \(f_{d}^{m+k}=Embedding(f_{s}^{k})\)
2: splice dense features: \(f_{d}=Cat(f_{d}^{1},f_{d}^{2},\ldots,f_{d}^{m+n},f_{h})\)
3: using deep networks to fuse dense features: \(h_{0}=ReLU(W_{0}f_{d}+b_{0})\)
4: get dense features: \(h_{l+1}=ReLU(W_{l}h_{l}+b_{l})\)
5: Part II: Deep Layer
6: discrete feature multi-layer high-order intersection: \(x_{l+1}=x_{0}x_{l}^{T}W_{l}+b_{l}+x_{l}\)
7: connect the Deep network and cross network and output: \(x_{c}=Cat(h,x)\)
8:returnreturn predicted score \(p=sigmoid(Wx_{c}+b)\)
```  
**Algorithm 1** HMRec Algorithm