Source-linked AI summary
Large Language Models for Next Point-of-Interest Recommendation
Peibo Li, Maarten de Rijke, Hao Xue, Shuang Ao, Yang Song, Flora D. Salim
TL;DR
Next POI recommendation must use contextual information in LBSN data, which prior numerical methods can lose. LLM4POI uses pretrained LLMs and trajectory prompts; it outperforms baselines on three real-world datasets and its analysis supports effectiveness for context, cold start, and short trajectories.
Problem
Prior next POI methods transform heterogeneous LBSN data into numbers and do not fully use its contextual information.
Source: §1 · p. 1Method
Results
The model outperforms all baseline models by a large margin on three real-world datasets.
Source: §6 · p. 9Takeaways & Limitations
The authors’ analysis supports the method’s effectiveness in using contextual information and handling cold-start and varied-length trajectories.
Source: §6 · p. 9Training and inference time, prompt context length, and pretrained-corpus limits constrain the approach; the prompt design may deprecate geo-coordinates.
Source: §6 · p. 9
Abstract
from arXiv · showhide
The next Point of Interest (POI) recommendation task is to predict users' immediate next POI visit given their historical data. Location-Based Social Network (LBSN) data, which is often used for the next POI recommendation task, comes with challenges. One frequently disregarded challenge is how to effectively use the abundant contextual information present in LBSN data. Previous methods are limited by their numerical nature and fail to address this challenge. In this paper, we propose a framework that uses pretrained Large Language Models (LLMs) to tackle this challenge. Our framework allows us to preserve heterogeneous LBSN data in its original format, hence avoiding the loss of contextual information. Furthermore, our framework is capable of comprehending the inherent meaning of contextual information due to the inclusion of commonsense knowledge. In experiments, we test our framework on three real-world LBSN datasets. Our results show that the proposed framework outperforms the state-of-the-art models in all three datasets. Our analysis demonstrates the effectiveness of the proposed framework in using contextual information as well as alleviating the commonly encountered cold-start and short trajectory problems.
1 INTRODUCTION
Next POI methods often encode heterogeneous LBSN data numerically, losing contextual meaning and relying on statistics or human designs to interpret it. LLM4POI uses pretrained LLMs to preserve and interpret context, and the authors report better results than state-of-the-art models on three datasets.
1 INTRODUCTION
- Existing methods transform heterogeneous LBSN data into numbers, potentially losing contextual meaning, and rely on statistics and human designs to interpret context.The paper identifies time, POI category, and geo-coordinates as contextual information.Source: §1 · p. 1
- LLM4POI fine-tunes pretrained LLMs using prompts that retain heterogeneous LBSN data in its original format.The prompts convert the task into question answering and represent data as blocks of sentences.Source: §1 · p. 2
- Pretrained LLMs bring commonsense knowledge for interpreting contextual information by meaning rather than treating it only as a code.The paper describes commonsense knowledge as understanding contextual semantics and connecting joint patterns with real-world behaviors.Source: §1 · pp. 1–2
- Prompt-based trajectory similarity combines information from historical and other users’ trajectories to address cold-start cases and improve predictions across trajectory lengths.The authors identify this as a contribution alongside their evaluation on three real-world LBSN datasets.Source: §1 · p. 2
- LLM4POI substantially outperforms state-of-the-art next POI recommendation models on all three real-world LBSN datasets.The experiments evaluate the proposed model across three datasets.Source: §1 · pp. 2–3
2 RELATED WORK
Prior next POI work uses sequence and graph models, while LLM work covers time-series and recommender tasks. The paper positions its contribution as combining trajectory prompting with LLM commonsense knowledge and task-specific trajectory similarity.
2.1 Next POI Recommendation
- Sequence models can be limited by local views and sparse histories, while graph models address cold start but do not combine contextual information with commonsense knowledge.The paper contrasts these gaps with trajectory prompting and LLMs that use commonsense to interpret context.Source: §2.1 · p. 3
2.2 LLMs for Time-series Data
- Prior LLM time-series work informs trajectory prompting, which this paper designs to cast next POI recommendation as question answering.The cited examples include SHIFT, AuxMobLCast, and LLM4TS.Source: §2.2 · p. 3
2.3 LLMs for Recommender Systems
- Unlike prior LLM recommender approaches described here, this method fine-tunes LLMs for next POI recommendation and adds task-specific trajectory similarity.The related work includes prompt-based news recommendation, LLM sequential recommendation, and in-context next POI recommendation.Source: §2.3 · p. 3
3 PROBLEM DEFINITION
The problem is to predict the POI a user will visit at the immediate next timestamp, given the user’s check-in history and a new trajectory. Check-ins include user, POI, category, time, and location information, and trajectories are formed using a time interval.
3 PROBLEM DEFINITION
- Each check-in record is represented as a tuple containing a user, POI, category, timestamp, and geometric coordinate.The dataset consists of user check-in records.Source: §3 · p. 3
- A user’s trajectories are formed by splitting check-in records based on a time interval Δt, with check-ins ordered by timestamp and trajectory duration bounded by Δt.The check-in timestamps satisfy t_1 < t_2 < ··· < t_k = t and t_k − t_1 ≤ Δt.Source: §3 · pp. 3–4
- Given a user’s historical trajectories, the objective is to predict the POI for a new trajectory at the immediate subsequent timestamp.The target is the POI p_(k+1) at timestamp t_(k+1).Source: §3 · p. 4
4 METHODOLOGY
The framework combines trajectory prompting, key-query similarity, and supervised fine-tuning to turn check-in data into prompts for an LLM. It uses sentence blocks to preserve heterogeneous data and selects similar earlier trajectories for historical context.
4 METHODOLOGY
- The framework constructs prompts and computes key-query similarity from raw data, then fine-tunes an LLM with those prompts.Its three components are trajectory prompting, key-query similarity, and supervised fine-tuning.Source: §4 · p. 4
4.1 Trajectory Prompting
- Prompts organize check-ins into current-trajectory, historical-trajectory, instruction, and target blocks, with check-ins rendered as sentences and coordinates omitted.The target supplies the ground truth for training and evaluation, but is excluded during prediction.Source: §4.1 · p. 4, Table 2 · p. 4
4.2 Key-Query Pair Similarity
- For each key trajectory, the method compares its prompt with prompts for earlier trajectories and selects the top-k most similar queries for historical context.Keys omit the trajectory’s last entry, while queries contain the full trajectory; the prompts are encoded by an LLM and compared using cosine similarity.Source: §4.2 · pp. 4–5
4.3 Supervised Fine-tuning
- Fine-tuning uses PEFT: LoRA updates attention-layer weights while MLP layers remain frozen, quantization reduces GPU memory use, and FlashAttention-2 supports longer contexts.The training prompt’s question is fed to the LLM and its answer guides fine-tuning.Source: §4.3 · pp. 5–6, Figure 5 · p. 5
5.1 Experimental Setup
The experiments use three public LBSN datasets, compare established sequential and graph-based baselines, and evaluate LLM4POI as a top-1 recommender. The setup also specifies model variants, data splits, and fine-tuning conditions.
5.1 Experimental Setup
- Experiments use Foursquare-NYC, Foursquare-TKY, and Gowala-CA, with chronological 80/10/10 train/validation/test splits and users and POIs in validation and test restricted to those appearing in training.POIs and users with fewer than 10 historical visits are filtered out; trajectories use 24-hour intervals and single-check-in trajectories are excluded.Source: §5.1.1 · p. 6
5.1.2 Baselines.
- Baselines span Markov, recurrent, attention, transformer, and graph approaches, including FPMC, LSTM, STAN, GETNext, and STHGCN.The listed methods include eight baselines: FPMC, LSTM, PRME, STGCN, PLSPL, STAN, GETNext, and STHGCN.Source: §5.1.2 · p. 6
- LLM4POI* uses only the current trajectory, LLM4POI** adds the current user's history without key-query similarity, and LLM4POI adds similar trajectories from other users.Unless otherwise stated, “our model” refers to LLM4POI.Source: §5.1.3 · p. 6
5.1.3 Our Models.
- The evaluation targets top-1 recommendations for an extreme-position-bias scenario where users can review only a small amount of information in one interaction.The paper frames a single, contextually suitable recommendation as a natural fit for its question-answering approach.Source: §5.1.4 · p. 6
5.1.4 Evaluation Metrics.
- Accuracy@1 measures the proportion of test items retrieved in the top-1 recommendation, with larger values indicating better performance.The metric uses the rank of the correct prediction in the recommendation list.Source: §5.1.4 · p. 6
- Each dataset is fine-tuned for three epochs using a 32,768-token sequence length, batch size 1 per GPU, and approximately 300 historical check-in records in the prompt.The setup also specifies a constant learning-rate schedule, 20 warm-up steps, and Nvidia A100 GPUs.Source: §5.1.5 · p. 6
5.2 Main Results
LLM4POI outperforms the listed baselines on all three datasets, with the largest reported top-1 accuracy gains over STHGCN in NYC and CA.
5.2 Main Results
- 23.3%, 2.8%, and 19.3% higher top-1 accuracy than STHGCN on NYC, TKY, and CA, respectively, with LLM4POI substantially outperforming all baselines.Table 3 compares Acc@1 across the three datasets and indicates whether each model uses historical data or data from other users.Source: §5.2 · pp. 6–7, Table 3 · p. 7
5.3 Analysis
The analyses examine performance across user activity and trajectory lengths, historical-data quantities, unseen datasets, contextual information, and model components. Results report gains in cold-start and short-trajectory settings, cross-dataset performance, and dataset-dependent effects of context and model components.
5.3.1 User Cold-start Analysis.
- LLM4POI more than doubles STHGCN's performance for inactive NYC users and improves it by over half in TKY and CA, while outperforming its own very-active-user results.The authors suggest that similar trajectories can supply information for users with limited histories, while context-length constraints may limit collaborative information in datasets with more users.Source: §5.3.1 · p. 7, Table 4 · p. 7
5.3.2 Trajectory Length Analysis.
- 24.4% higher top-1 accuracy for short trajectories and 31.6% for middle trajectories versus STHGCN in NYC; performance varies little across trajectory lengths overall.The short-trajectory advantage occurs in NYC, while the comparison is reversed in TKY and CA.Source: §5.3.2 · p. 7, Table 5 · p. 7
5.3.3 Number of Historical Data Variants.
- More historical check-ins do not consistently improve results: NYC performs best with 100 records, TKY with 300, and CA remains similar across quantities.The authors report that fewer records can retain competitive performance while reducing prompt size and speeding training and inference.Source: §5.3.3 · pp. 7–8, Table 6 · p. 8
5.3.4 Generalization to Unseen Data Analysis.
- Models fine-tuned on one dataset achieve competitive results on unseen datasets, though NYC-trained and CA-trained models trail STHGCN on TKY.The NYC-trained model beats state-of-the-art models on CA, the TKY-trained model performs even better on NYC and beats state-of-the-art models on CA, and the CA-trained model beats state-of-the-art models on NYC.Source: Table 7 · p. 8, §5.3.4 · p. 8
- Answer POI IDs appear in 75.8%, 73.5%, and 55.6% of NYC, TKY, and CA test prompts, respectively, and those proportions correlate positively with dataset-level performance.Among correct predictions, the proportions are nearly identical across models trained on different datasets; the authors suggest prompt information supports generalization.Source: §5.3.4 · p. 8, Figure 7 · p. 8
5.3.5 Contextual Information Analysis.
- Removing POI category context reduces performance slightly in NYC and by 6.4% in TKY and 6.2% in CA; effects across user-activity groups differ by dataset.The authors associate these differences with distinct POI-category distributions, including a high share of travel and transportation POIs in TKY.Source: §5.3.5 · pp. 8–9, Table 8 · p. 9, Figure 8 · p. 9
5.3.6 Effect of Different Components.
- Each component contributes to full-model performance: removing the historical block drops top-1 accuracy by as much as 50% in TKY and CA, while similarity and context add further benefits.Without key-query similarity, the historical block lacks collaborative information from other users; the authors connect that absence to cold-start handling.Source: §5.3.6 · p. 9, Table 10 · p. 9
6 CONCLUSION AND FUTURE WORK
LLM4POI uses trajectory prompting and key-query similarity for next-POI recommendation. Experiments on three real-world datasets outperform all baseline models by a large margin, while analysis supports effectiveness across contextual information, cold-start cases, and varied trajectory lengths.
6 CONCLUSION AND FUTURE WORK
- LLM4POI applies pretrained LLMs to next-POI recommendation, using trajectory prompting to recast the task as question-answering and key-query similarity to alleviate cold start.Source: §6 · p. 9
- On three real-world datasets, LLM4POI outperforms all baseline models by a large margin.The authors also report that their experiments support the potential of foundation models for next-POI recommendation, given LLMs’ ability to generalize to unseen data.Source: §6 · p. 9
- Analysis supports the method’s effectiveness in using contextual information and handling cold-start cases and trajectories of various lengths.Source: §6 · p. 9
- The authors report efficiency limitations in model training and inference time, and prompt-design limits from model context length and pretrained corpus, including geo-coordinate deprecation.Source: §6 · p. 9
- Future work includes investigating chain-of-thought reasoning for performance and explanations, and recommendation scenarios beyond a single best item and question-answering.Source: §6 · p. 9