## 3 Methodology
### Generative Adversarial Network  
The generative adversarial network is the crucial module of our proposed POI recommender system, where the goal of GAN is to relieve the sparsity of check-in data and improve the performance of POI recommendations. To relieving the sparsity of check-in data, the generator is capable of capturing the actual distribution of individual sequential check-in records and synthesizing plausible samples, which can supplement training data. For improving the performance of POI recommendations, compared to the single model, the adversarial learning between a generator and a discriminator can further promote the generalization ability of each model and improve the overall performance. In the following paragraphs, we will introduce the generator, the discriminator, and the adversarial learning in detail. **Generator**: Figure 2 illustrates the structure of proposed generator in the framework where the generator comprises an embedding layer, an attention layer, and an output layer. The input of the generator consists of User ID, temporal check-ins, and geographical locations. The User ID is used to obtain the embedding of a specific user. The temporal check-ins are a list of visited POI IDs for the corresponding user using a three-size sliding window. The geographical locations are the latitudes and longitudes of the corresponding POIs in the temporal check-ins. In detail, the embedding layer is utilized to describe the set of users \(U=\{u_{1},u_{2},\ldots,u_{m}\}\), and represent the set of POIs \(V=\{v_{1},v_{2},\ldots,v_{n}\}\) using the corresponding vectors where the embeddings describe the preferences of users and the characteristics of POIs. Furthermore, an LSTM is leveraged to fold the sequential check-ins \(V_{u_{i}}\) of user \(u_{i}\) while another LSTM is used to fit the corresponding sequential geographical locations \(L_{u_{i}}\). Therefore, the output of the embedding layer is the embedding of a user (i.e., \(u_{i}\)), the latent feature of corresponding temporal check-ins \(h_{v}\), and the latent feature of corresponding geographical location \(h_{l}\). The attention layer is leveraged to dynamically adjust the representation of user embeddings based on the latest temporal check-ins and geographical locations. In general, the user embedding \(u_{i}\) is capable of describing the preference of \(i\)-th user based on her historical check-ins. However, in POI recommender systems, the final choice of a user is not only dependent on the preference but also relevant to the previously visited POI and the current geographical location. In addition, the preference is more specific to a user than the sequential check-ins and geographical locations. Therefore, instead of concatenating the user embedding and the latent features of temporal check-ins and geographical influence (i.e., contextual information), we utilize the latent features of contextual information to calculate the parameter of attention vector to finely tuning the user embedding that is capable of describing the actual preference based on the contexts. The output of the attention layer is based on the following equation:  
\[o_{a}=softmax([h_{v},h_{l}]\times w_{a}+b_{a})\times u_{i}. \tag{1}\]  
The output layer (i.e., a fully connected layer) is leveraged to transform the latent features of the previous layer into meaningful outputs. In the proposed generator, the multi-task strategy is used to improve the performance of fitting actual distribution of observed check-in data. Besides the predicted check-in vector, which is calculated based on a two-fully-connected layer, the next POI location is predicted based on a two-fully-connected layer and the latent feature of geographical location \(h_{l}\).