Source-linked AI summary
Generative Next POI Recommendation with Semantic ID
Dongsheng Wang, Yuxi Huang, Shen Gao, Yifan Wang, Chengrui Huang, Shuo Shang
TL;DR
Existing generative POI recommenders use random numeric IDs that limit semantic modeling of similar locations. GNPR-SID constructs semantic IDs from POI and collaborative information, then fine-tunes an LLM to predict the next POI. Across three benchmark datasets, it outperforms state-of-the-art methods with accuracy improvements of up to 16%.
Problem
Existing LLM-based POI recommendation methods rely on random IDs that do not capture POI semantics and exhibit poor generalization beyond the dataset.
Method
GNPR-SID combines semantic ID construction with LLM fine-tuning, using residual quantization and diversity loss to produce structured semantic POI IDs.
Results
Accuracy improvements of up to 16% are reported across three benchmark datasets, with GNPR-SID outperforming state-of-the-art methods.
Takeaways & Limitations
Semantic IDs improve POI semantic representation while reducing token usage by 54.78% and improving test time by 51.98% relative to the RID-based LLM4POI method.
Abstract
from arXiv · showhide
Point-of-interest (POI) recommendation systems aim to predict the next destinations of user based on their preferences and historical check-ins. Existing generative POI recommendation methods usually employ random numeric IDs for POIs, limiting the ability to model semantic relationships between similar locations. In this paper, we propose Generative Next POI Recommendation with Semantic ID (GNPR-SID), an LLM-based POI recommendation model with a novel semantic POI ID (SID) representation method that enhances the semantic understanding of POI modeling. There are two key components in our GNPR-SID: (1) a Semantic ID Construction module that generates semantically rich POI IDs based on semantic and collaborative features, and (2) a Generative POI Recommendation module that fine-tunes LLMs to predict the next POI using these semantic IDs. By incorporating user interaction patterns and POI semantic features into the semantic ID generation, our method improves the recommendation accuracy and generalization of the model. To construct semantically related SIDs, we propose a POI quantization method based on residual quantized variational autoencoder, which maps POIs into a discrete semantic space. We also propose a diversity loss to ensure that SIDs are uniformly distributed across the semantic space. Extensive experiments on three benchmark datasets demonstrate that GNPR-SID substantially outperforms state-of-the-art methods, achieving up to 16% improvement in recommendation accuracy.
1 Introduction
Next POI recommendation predicts a user’s next destination from historical check-in trajectories and context. GNPR-SID replaces semantically empty random IDs with semantic IDs designed to improve POI understanding and recommendation.
- Next POI recommendation predicts the next visit using historical check-in trajectories, sequential transitions, and spatial-temporal context.
- Existing LLM-based methods use random numeric POI IDs that do not capture semantic information and generalize poorly beyond the dataset.
- A useful POI ID should encode POI semantics, assign similar IDs to similar locations, and represent many POIs compactly without conflicts.
- GNPR-SID combines semantic ID construction from POI features with an LLM fine-tuned to predict the next POI from those IDs.
- Residual quantized variational autoencoder quantization maps POI embeddings into discrete codeword sequences so semantically similar POIs share similar SIDs.
- GNPR-SID is evaluated on three real-world benchmark datasets, with experiments reported as demonstrating its effectiveness.
2 Related Work
Next POI recommendation research has progressed from feature-engineered sequential models to neural sequence, attention, graph, and LLM-based approaches. These methods model different combinations of user histories, spatial-temporal patterns, and collaborative interactions.
- Early methods used personalized Markov chains but faced limited scalability and dependence on domain expertise.
- RNN-based models captured personalized sequential patterns, including users’ long- and short-term preferences.
- Transformer-based methods use attention mechanisms to model spatial-temporal relevance within POI trajectories.
- Graph neural networks model user-POI interactions and learn from user histories and collaborative trajectories.
- Recent LLM-based methods incorporate historical and contextual trajectories or spatial coordinates for next POI recommendation.
3 Problem Definition
The problem formulation represents users and POIs as sets and describes each POI through category, geographic coordinates, check-in users, and visit timestamps. A user’s recent visited POIs form a historical sequence for recommendation.
- The formulation defines U as a set of M users and P as a set of N POIs.
- Each POI is represented by a tuple containing category, longitude, latitude, check-in users, and visit timestamps.
- For each user, the recent visited POIs are collected as a historical set or sequence for subsequent modeling.
4 Methodology
GNPR-SID constructs semantic POI IDs from rich semantic and collaborative features, then uses hierarchical quantization and an LLM to generate the next POI SID.
- Framework Overview: GNPR-SID has a semantic ID construction module and a generative recommendation module that predicts the next POI from historical SID sequences.The first maps POIs through codebook quantization; the second fine-tunes an LLM to generate the next POI SID.
- POI Semantic Representation: POI representations combine category, region, operating-time, and collaborative user signals into a unified semantic vector.Region-based codes capture spatial proximity, while temporal slots and shared visitor histories add behavioral context.
- Semantic ID Construction: Similar POIs are assigned SIDs sharing prefix codes, while distinct POIs retain unique identifiers to support semantic similarity and avoid conflicts.For example, <a_15><b_2><c_1> is closer to <a_15><b_2><c_9> than to <a_15><b_12><c_2>.
- POI Quantization: RQVAE maps POI embeddings into hierarchical, fine-grained SIDs using an encoder, residual quantization, and decoder.Each layer selects codewords from a distinct codebook, recursively quantizing residuals from coarse to fine granularity.
- Model Optimization: A diversity loss encourages codeword utilization and intra-codeword compactness to reduce semantic collisions and improve use of the discrete quantization space.Without this constraint, reconstruction loss alone could map many POIs into a small subset of semantic spaces.
5 Experimental Setting
The experiments evaluate GNPR-SID on three benchmark datasets using chronological train/validation/test splits, top-1 accuracy, and comparisons with traditional, Transformer-based, and LLM-based methods.
- Datasets: The evaluation uses Foursquare-NYC, Foursquare-TKY, and Gowalla-CA, with POIs and users below ten interactions or check-ins removed.Each dataset is split chronologically into 80% training, 10% validation, and 10% testing, while test users and POIs must appear in training.
- Implementation: The quantization module uses three codebook layers with 32 or 64 codeword vectors of dimensionality 64, depending on the dataset.NYC uses 32 codewords per layer, while TKY and CA use 64.
- Implementation: The generative recommendation module fine-tunes LLaMA3-8B with LoRA using rank 16, dropout 0.1, learning rate 1e-5, and a 20-step warm-up.Training uses a constant learning-rate schedule and four Nvidia L40 GPUs.
- Evaluation Metric: Top-1 recommendation accuracy measures whether the predicted POI matches the ground-truth POI at the specified time.Acc@1 averages an indicator over test samples, assigning one when the prediction is correct and zero otherwise.
- Comparison Methods: GNPR-SID is compared with traditional, Transformer-based, graph-based, and LLM-based next POI recommendation baselines.The comparison includes methods such as PRME, LSTM, PLSPL, STAN, and GETNext, alongside the state-of-the-art LLM-based method.
- Comparison Methods: Table 2 organizes model comparisons across NYC, TKY, and CA by POI representation and whether visit timestamps are used.The table supports examining how semantic ID inputs and temporal information differ across models.
6 Experimental Result
GNPR-SID consistently outperforms baselines, while ablations, diversity-loss analysis, semantic visualizations, out-of-domain tests, and efficiency comparisons support its design choices.
- 6.1 Main Result: 16%, 24%, and 10% relative top-1 accuracy gains over ROTAN were achieved on NYC, TKY, and CA, respectively.GNPR-SID also improved over LLM4POI by 7%, 1%, and 16% on those datasets.
- 6.2 Ablation Study: All ablation variants performed worse than GNPR-SID, and removing reconstruction loss caused training to fail to converge.The ablations removed SID, visit time, diversity loss, quantization loss, or reconstruction loss.
- 6.3 Analysis of Diversity Loss: Increasing diversity-loss weight reduced SID collisions, but excessive weighting separated similar POIs into different semantic clusters and harmed recommendation performance.The loss is intended to prevent semantic collapse by distributing POIs more uniformly across the semantic space.
- 6.4 Semantic Relevance Analysis of SID: SID visualizations separated different POI categories while placing same-category POIs closely, indicating semantically organized and adjacent SID spaces.Examples include transportation venues beginning with <a_15> and entertainment venues beginning with <a_25>.
- 6.5 Performance on Out-of-domain Data: GNPR-SID degraded less than LLM4POI on out-of-domain datasets, demonstrating stronger reported generalization across all evaluated datasets.The semantic ID construction module is independent of LLMs and converts POI information into SIDs.
- 6.6 Analysis of Model Efficiency: 54.78% lower token usage and 51.98% better test time were reported for GNPR-SID than LLM4POI on NYC.The paper attributes these efficiency gains to compressing POI semantic information into SIDs, especially for long historical sequences.
7 Conclusion
GNPR-SID integrates semantic POI IDs into an LLM-based next POI recommendation framework and reports improved accuracy and generalizability across three benchmark datasets.
- GNPR-SID uses semantic POI IDs to integrate more spatial-temporal information into next POI recommendation.
- Its semantic ID construction captures POI semantics, while the generative recommendation module fine-tunes LLMs.
- Hierarchical POI quantization assigns similar POIs similar IDs, and diversity loss enhances codeword distinctiveness.
- GNPR-SID outperforms state-of-the-art methods on three benchmark datasets, achieving accuracy improvements of up to 16%.
- Semantic similarity analysis confirms that the generated SIDs capture POI semantic relationships.
A.1.1 Multiple cropping.
The cropped dataset is prepared by segmenting or randomly cropping sequences according to their length, with some samples converted into fill-in-the-blank tasks.
- Multiple cropping: Sequences longer than several times the given length are divided into multiple non-overlapping segments.
- Multiple cropping: Sequences longer than the given length but shorter than twice that length are randomly cropped into two overlapping segments.
- Multiple cropping: Sequences shorter than the given length are not cropped.
- Multiple cropping: One in five cropped samples replaces next POI recommendation with a fill-in-the-blank task targeting a POI at a randomly chosen historical timestamp.
A.2 Baseline
The paper describes baseline methods used in its experiments and notes that ablation inputs are separately specified for removing semantic IDs or time information.
- Baseline methods: The experiments include PRME, LSTM, PLSPL, STAN, ROTAN, and LLM4POI as baseline methods.
- Baseline methods: PRME jointly models sequential transition, user preference, and geographical influence through metric embeddings.
- Baseline methods: LSTM, PLSPL, and STAN represent recurrent or transformer-based approaches for modeling sequence dependencies and user preferences.
- Baseline methods: ROTAN incorporates target time information using a rotation-based time-aware attention mechanism.
- Baseline methods: LLM4POI is identified as the first LLM-based next POI recommendation method.
- Ablation inputs: Ablation experiments use separate input formats for removing SID and time information.