PLMTrajRec: A Scalable and Generalizable Trajectory Recovery Method with Pre-trained Language Models
Authors: Tonglong Wei
Yan Lin
Youfang Lin
Shengnan Guo
Jilin Hu
Haitao Yuan
Gao Cong
Huaiyu Wan
Venue: NeurIPS 2025 spotlight ()
Keywords: Spatio-temporal data mining
trajectory data mining
vehicle trajectory recovery
Primary area: machine_learning_for_sciences
TL;DR: We propose a trajectory recovery model based on PLM to address the challenge of the availability of dense trajectories is limited and to generalize across sparse trajectories with varying sampling intervals.

Abstract: Spatiotemporal trajectory data is crucial for various traffic-related applications. However, issues such as device malfunctions and network instability often result in sparse trajectories that lose detailed movement information compared to their dense counterparts. Recovering missing points in sparse trajectories is thus essential. Despite recent progress, three challenges remain. First, the lack of large-scale dense trajectory datasets hinders the training of a trajectory recovery model. Second, the varying spatiotemporal correlations in sparse trajectories make it hard to generalize across different sampling intervals. Third, extracting road conditions for missing points is non-trivial.

To address these challenges, we propose $\textit{PLMTrajRec}$, a novel trajectory recovery model. It leverages the scalability of a pre-trained language model (PLM) and can effectively recover trajectories by fine-tuning with small-scale dense trajectory datasets. To handle different sampling intervals in sparse trajectories, we first convert sampling intervals and movement features into prompts for the PLM to understand. We then introduce a trajectory encoder to unify trajectories of varying intervals into a single interval. To extract road conditions for missing points, we propose an area flow-guided implicit trajectory prompt that represents traffic conditions in each region, and a road condition passing mechanism that infers the road conditions of missing points using the observed ones. Experiments on four public trajectory datasets with three sampling intervals demonstrate the effectiveness, scalability, and generalization ability of PLMTrajRec. Code is available at https://github.com/wtl52656/PLMTrajRec.

PLMTrajRRec: A Scalable and Generalizable Trajectory Recovery Method with Pre-trained Language Models
Tonglong Wei'; Yan Lin"; Youfang Lin Shengnan Guo Jilin Hu Haitao Yuan", Gao Cong Huaiyu Wan
School of Computer Science and Technology, Beijing Jiaotong University, China Department of Computer Science, Aalborg University. Denmark Beijing Key Laboratory of Traffic Data Mining and Embodied Intelligence, China
Key Laboratory of Big Data & Artificial Intelligence Transportation, Ministry of Education, China
"School of Data Science and Engineering, East China Normal University. China 'College of Computing and Data Science, Nanyang Technological University (weitonglong, guoshn, yflin, hywan)&bjju. edu. cn, 1yan@cs aau, dk, j j1hu@dase. ecnu. edu. cn, (haitao yuan, gaocong) @ntu. edu. sg
Abstract
Spatiotemporal trajectory data is crucial for various traffic-related applications. However, issues such as device malfunctions and network instability often result sparse trajectories that lose detailed movement information compared to their dense counterparts. Recovering missing points in sparse trajectories thus essential. Despite recent progress, three challenges remain. First, the lack of large-scale dense trajectory datasets hinders the training of a trajectory recovery model. Second, the varying spatiotemporal correlations in sparse trajectories make it hard to generalize across different sampling intervals. Third, extracting road conditions for missing points is non-trivial.
To address these challenges, we propose PLMTrajRec, novel trajectory recovery model. It leverages the scalability of a pre-trained language model (PLM) and effectively recover trajectories by fine-tuning with small-scale dense trajectory datasets. To handle different sampling intervals sparse trajectories, we first convert sampling intervals and movement features into prompts for the PLM to understand. We then introduce trajectory encoder to unify trajectories of varying intervals into single interval. To extract road conditions for missing points, we propose an area flow-guided implicit trajectory prompt that represents traffic conditions in each region, and a road condition passing mechanism that infers the road conditions of missing points using the observed ones. Experiments on four public trajectory datasets with three sampling intervals demonstrate the effectiveness, scalability, and generalization ability of PL.TrrajRec. Code is available /tttts://giiii thtbb...tt.ttt..//gg com com6/
Introduction
Spatiotemporal trajectories are sequences (location, timestamp) pairs that record the movement of individuals and vehicles. They play a pivotal role in various applications, such as urban planning [36
43
19 37). traffic management [25 34 47 and personalized location services 46
5)
Botth authors contributed equally this research. Corresponding author.
39th Conference on Neural Information Processing Systems (NcurIPS 2025).

---

Poirt spuse sujectsr
Smvrr Congratin
Medemsic Corgsstion
Road Conditions Evolution
44
R₂
OS
03:00
R₂
08:03-0
R2
08:03:00
00:00
R1
08:02:00
08:00:00
R1
05
08:02:00
La
08:00:00
R1
f2
08:002:00
Ea
08:0100
08:01
05:010000
Road conditions
Read condition f2
Road condition f3
Figure I: Impact of road conditions on route selection and movement patterns.
However, factors such network instability, device malfunctions, or cost-saving settings often lead to sparse trajectories with large sampling intervals [26 45] Such sparse trajectories fail to accurately reflect movement behavior and route choices, limiting their usefulness. To address this issue, recovering the missing points in sparse trajectories is crucial for preserving trajectory completeness-a task usually referred as trajectory recovery.
Two branches of methods have been proposed to tackle trajectory recovery: free space trajectory recovery [9] 7 and map-matched trajectory recovery (38 g
Free space methods directly predict the coordinates of missing points but do not ensure alignment with the road network, typically requiring subsequent map-matchinn step. Map-mater Map-matched methods, by contrast, aim recover missing points on the road network, making them more accurately resemble real-world trajectories.
This work follows the map-matched trajectory recovery branch. Despite the progress, it still faces three challenges: First, limited dense trajectory datasets. Trajectory recovery models are data- driven and typically require large-scale pairs of sparse and dense trajectories. However, because of cost-saving settings and device malfunctions, most collected trajectories remain sparse. The limited availability of dense trajectory data makes existing models prone to overfitting and hampers their performance. Second, difficulty in generalizing across varying sampling intervals. Real-world sparse trajectory datasets often contain trajectories with a mixture of different sampling intervals [34. Sumppii Trajectories with different sampling intervals encompass different spatiotemporal correlations. Yet, existing works (38 g 26) treat different sampling intervals the same way, requiring retraining when facing trajectories with sampling intervals unseen during training, which introduces additional computational burden. Third, non-trivial extraction of dynamic road conditions for missing points. Road conditions of both observed and missing trajectory points are essential in facilitating more accurate trajectory recovery. For example, in Figure [b) and (c), knowing the conditions p2 and reveals that the user is gradually decelerating on Ri due to congestion. If we only consider conditions pl and p4. we might infer that the user takes R; instead of R2 (Figure [a)), but not the finer details of the movement. Yet, since the missing points in a sparse trajectory are unknown, it is non-trivial to extract the road conditions at their exact locations.
To tackle these challenges, we propose Pre-trained Language Model for Trajectory Recovery (PLMTrajRRee.. Drawing inspiration from [21 15) which demonstrate that PL.M possess broader general knowledge and mitigate the lack of domain-specific datasets, we integrate a PLM to enable high-performance trajectory recovery by fine-tuning
small-scale dense trajectory datasets (Chal- lenge 1). To handle sparse trajectories with varying sampling intervals (Challenge 2), we introduce an interval and feature-guided (IF-guided) explicit trajectory prompt. incorporates both sampling intervals and movement features into a prompt for the PLM, helping the model extract information from these features. We also introduce an interval-aware Irajectory embedder standardize different sampling intervals and learn their spatiotemporal correlations. To infer road conditions for missing points (Challenge 3), we design an area dow-guided (AF-guided) implicit trajectory prompt that gathers traffic flows in each region. We also present road condition passing mechanism that uses road conditions from nearby observed points estimate those of the missing points. We conduct extensive experiments on four real-world datasets, each with three sampling intervals, showing that PLMTrajRec achieves superior performance effectiveness, scalability, and generalizability.
2 Related Work
Trajectory recovery aims to reconstruct missing points from sparse trajectories. Based on whether the road network is considered, it can be divided into two types: free-space recovery and map-matched recovery. Free-space recovery directly restores missing GPS coordinates. Traditional methods often

---

use predefined rules 28 12 9 or assume Markov transitions between points 2 48 They are limited in capturing the global
dependencies essential for accurate trajectory recovery. Recent deep learning approaches improve recovery performance by modeling complex spatiotemporal methods [30] However, these methods typically require separate map-matching step to align the recovered trajec- tory with road networks before practical use, which introduces additional errors and computational overhead. In contrast, map-matched trajectory recovery integrates the road network into the model and directly recovers the trajectory on the road network. MTrajRee [26) represents each point by a road segment and moving rate, using multi-task seq2seq framework. RNTrajRRec [8] enhances this by modeling
patterns H 41], including sequence-base based models [32 39 27 and graph-
relations with a transformer mandsormer-basedd architecture. LightTR 20 introduces a lightweight recovery framework using federated learning. MM-STGED 38 further captures both
local and global semantic patterns via graph modeling. While these methods demonstrate promising results, their performance is limited by the scarcity of large-scale dense trajectory data and poor generalization across different sampling intervals, as discussed in Section
doos--ommin Application of PLM has received significant attention recently. In the field of time series analysis, Time-LLM [55 reprograms time series data with natural language prompts to harness the capabilities of PLM in handling time series effectively. TEMPO [3 leverages PLM for time series forecasting by employing interpretable prompt tuning to identify similar patterns in time series data. Similarly. TEST [29] introduces soft prompts to enhance PLM's understanding of time series embeddings. In the field of computer vision, VisionLLM [35] employs PLM as a versatile decoder and has demonstrated promising performance in diverse visual tasks. MyNet 23 integrates frozen PI.M and multi-view vision prompting to efficiently encode three-dimensional data. In recommendation systems, GenRec [14] utilizes specialized prompts and extensive knowledge within PLM to provide accurate recommendations to users. Although PLMs have demonstrated effectiveness across various domains, they cannot be directly applied trajectory learning. Trajectory data have unique spatiotemporal characteristics that require specialized modeling approaches.
3 Preliminaries
Trajectory. A trajectory is defined as series of timestamped locations, denoted T (PI,'.. -PIT) where P; = (lat,, Ing;, 14) represents the latitude and longitude coordinates of an is the length of the trajectory. The sampling interval of T
object at the time 4 E (1..... [7]]. [T] is defined as 4, 4-1, for 2.
Road Network. A road network is modeled as a directed graph G (V,E), where V is the set of nodes, and & is the set of edges. Each node v E V represents an intersection and is associated with geographic coordinates, including latitude and longitude. Each edge e E & corresponds to a road segment connecting two intersections, defined by its start node start E V and end node e.end E V.
Map-matched Trajectory. Using map-matching algorithm, trajectory T can be projected onto the road network to obtain a map-matched trajectory Tm- This ensures that each point in Tm aligns accurately with particular road. A map-matched trajectory is denoted as T. (q1, " where each point qj (ej.Tz.Ce tty represents the vehicle's position at time ty. Here, ej E is the matched road segment, and ry is the moving ratio, representing the proportion of distance traveled along road segment e, relative to its total length.
Map-matched Trajectory Recovery. Given a sparse trajectory T. = (pI,... PIT.1) with a sampling interval of μa, the goal of map-matched trajectory recovery is to reconstruct the dense map-matched trajectory Tm = (qi, , with a sampling interval of e. Note that the sampling interval μ >> e.
Methodology
In this paper, we present both scalable and generalizable trajectory recovery model, PLMTrajRec. by fine-tuning PLM that is pre-trained on a large-scale corpus with limited dense trajectory data. The overall framework of PLM'TraRRec as shown in Figure 2 comprises three main components: dual trajectory prompts, an interval-aware trajectory embedder, and a PLM-based trajectory encoder. The dual trajectory prompts provide essential prior information through two key components. First, the interval and nature--uiied (IF-guided) explicit trajectory prompt incorporates the sampling interval of sparse trajectories and their movement features into the PLM, helping the model capture
3

---

PL PL---bssed Trajectory Encuder
Traeektoyy Point
Foed Torsand
X
Frozen Layer
Outpat Layer e
Add & Norn
Z
Ouiput Emiseddings
Aneetion
Trainable Layer
Pre-trained Language Model
LoRAC's
Hod H
H
Explicit Presupt
Trajectory
Embreddngg
Embrddling
Tokemiizrr
Word Token Emibedding
Trajectory Feature Transformation A
Interval Prompt
Feature Prompli
Trajectory
Road Conditions
Trijeclory Feature Exaclor
Task
Time
Trajectory Interval Unification
Tarpct
Movement
IFgguided
Explicit Trajectory Prompt
AF-quided Implicit Trajectory Promupt
Sparse rnjossory Nerwods
Dual Trajectory Prompis
Interval-aware Trnjectory Emhedder
Figure 2: The framework of PLMTrajRec, consists of Dual Trajectory Prompts, Interval-aware Trajectory Embedder, and PLM-based Trajectory Encoder.
trajectory characteristics. Second, the area flow-guided (AF-guided) implicit trajectory prompt encodes road conditions, offering valuable context for recovering missing points. The interval-aware trajectory embedder normalizes trajectories with varying sampling intervals y into a unified interval efficiently handling diverse spatiotemporal correlations and enhancing model generalization. Each trajectory point, both observed and missing, is then embedded into format suitable for the PLM. The PLM-based trajectory encoder leverages pre-trained BERT model trained on a large-scale corpus capture bidirectional context. Most parameters are frozen retain general knowledge, while a multi-head attention layer remains trainable to learn rajectory-speciff patterns. Finally, the model predicts the road segment e and movement ratio for the recovered map-matched trajectory.
4.1 Dual Trajectory Prompts
To enable PLM recover trajectories with different intervals and effectively model road conditions for missing trajectory points, we introduce dual trajectory prompts, consisting of an Iu-guided explicit trajectory prompt and AF-guided implicit trajectory prompt.
4.1.1 Interval and Feature-guided (IF-guided) Explicit Trajectory Prompt
The IF-guided explicit trajectory prompt provides structured textual description of the sampling intervals and movement features of sparse trajectories, enabling PLMTrajRec to identify varying sampling intervals and capture essential trajectory characteristics.
As shown Figure 2 the prompts regarding sampling intervals consist of three components: the <Task Part informs the PLM about the overall task to be performed, the <Target Part> defines the required output format, and the <Content Part specifies the sampling intervals, guiding the PLM in effectively analyzing the trajectories. The prompts for movement features include two components: the <Time Part> provides the trajectory's specific start and end times, helping the PLM understand the duration and potential time patterns, such as morning or evening peaks. The <Move Part supports the PLM inferring the trajectory's ' movement patterns. We provide a detailed example of the IF- [F-ggided explicit trajectory prompt in Appendix D. After obtaining the prompt for each part, we use PLM's tokenizer and token embedding to convert text into embeddings and concatenate them to form the overall IF- IF-guided explicit trajectory prompt embedding H
4.1.2 Area Flow-guided (AF-guided) Implicit Trajectory Prompt
Road conditions reflect both the surrounding environment and object movement, providing valuable information for trajectory recovery. For example, vehicles typically slow down congested areas and accelerate in smoother traffic. However, due to the complexity and variability of real-world road conditions, describing them directly in natural language challenging. Therefore, we represent these conditions as implicit trajectory prompts.

---

We first calculate the average road conditions across all areas and time intervals, then extract the relevant information for each trajectory point. Specifically, we divide the target area into a spatial grid of I x J cells and split the day into 7 intervals. For each cell, we count the total number of passing vehicles, forming a regional flow matrix R.C E Ixx where each entry denotes the traffic volume at region (i.j) and time t. To capture spatiotemporal patterns, we apply 2D convolution over the spatial dimensions and ID convolution over the temporal dimension. This produces a feature representation of road conditions Hye E I xxxxXXXX where F is the number of output features.
For observed points, we can directly extract their road condition features using their coordinates and timestamps. For missing points, however, extracting their road conditions is challenging since location information unavailable. To address this, we design road condition passing mechanism inspired by message passing [10), which estimates the road condition of missing points using nearby known information. The detailed implementation is presented in Section 4.2.2
4.2
Interval-aware Trajectory Embedder
To enable our model to handle sparse trajectories with varying sampling intervals while effectively capturing spatiotemporal correlations, we propose interval- trajectory embedder.
4.2.1 Trajectory Interval Unification
Sparse trajectories often exhibit mobility patterns at varying granularities, with sampling intervals ranging from seconds to minutes, introducing different spatiotemporal correlations between trajectory points. To address this, we normalize all input trajectories to match the sampling interval of the target trajectory. Specifically, we insert a placeholder token '[m]' to indicate missing points, resulting in preprocessed sparse trajectory T of fixed interval c, where the length is given by Piz,1.t-p.. 1. Although the exact locations of '[m]' are unknown, their timestamps remain computable. We give an example about T in Appendix G
4.2.2 Trajectory Feature Extractor
Given the preprocessed sparse trajectory T there are two cases for extracting trajectory point features:
Case 1: The trajectory point T is observed, i.e., 3k E [Ta]] such that Pk.t = s.t. Case 2: The location of trajectory point s E T is missing, i.c., s = [m]. where its timestamp s.t is known.
For Case 1, we incorporate both the continuous GPS coordinates of trajectory point & and its local road network context to extract the spatial characteristics. First, we encode the latitude and longitude of s using Learnable Fourier Features (LFF) [8), which project continuous spatial inputs into a F-dimensional representation with feature mapping function (zx) W WVo[css[WW (.s....sssns((..))). where x E {s.lat, s.lon]. Using LFF to encode latitude and longitude features has two advantages: (I) The differences in coordinates between consecutive trajectory points are often minimal. Φ(-) effectively captures these subtle positional shifts by sine and cosine functions, enhancing spatial sensitivity. (2) The relative information multiplication operations, which is important for understanding movement, such as distance. We provide detailed insight and proof of LFF in Appendix [F]
y between points and y can be captured through
Second, considering that vehicles move within the road network, the relationship between a trajectory point and its surrounding road segments is critical. To measure the relationship between trajectory
d if de,t < Pdists based on otherwise,
point s and a road segment we define a function f(d,,))
their shortest distance, where d=,, is the shortest distance between and road 1, is a hyperparameter, and Paist is a distance threshold. Then we obtain the road network representation road by weighting the road segment embedding (a randomly initialized vector). Finally, the complete representation of e trajectory point s obtained as:
h = WW + (s.lom)) || [[ghdd]
+ bı
where Wi Px2F and bi E R are learnable parameters, and || is the concatenation operation.
For Case 2, where the location of point is unknown, we represent its features using road conditions, as described in Section 4.1.2 Since road conditions at specific point are influenced by surrounding
5

---

conditions that propagate along both temporal and spatial dimensions, we propose a road condition passing mechanism, inspired by the message passing mechanism [TO]. to infer the road conditions at the missing location.
Road Condition Passing Mechanism. First, for the missing point 8, we identify the nearest observed forward and backward trajectory points, sy and Sb, respectively. We give an example about s and 86 in Appendix G Then, we retrieve the road conditions of sf and Sb as follows:
1/f. (trc Ting (zng(5).ng)) [, (sy.1))
l1f. (Str( Fing (s). ग. (s)())))),
where Klat, king, and ni are index functions mapping latitude, longitude, and time to their corre- sponding indices. Next, we calculate the time intervals between point and points sy and Sú, denoted as Dly s.t sy.l and Als fh- s.l. The road condition of point is then computed as:
--tt/fo + -
h
Atg + E-b
In addition, we encode the time intervals Lty and Atg to quantify the relative position of s. The final representation is h, = W2[m || (F( (()) || h + b2, where m E II a learnable vector representing the missing location, and FC(.): R - R is the fully connected layer. Finally,
the overall trajectory representation is H I
4.2.3 Trajectory Feature Transformation
To enhance the model's s ability to comprehend trajectory features, we introduce K reference tokens E. E RxX,, inspired by [I], to bridge the connection between PLM and the trajectory. These reference tokens are designed to capture the global semantics of the trajectory.
Given the trajectory embedding H. we first apply a 1D CNN to aggregate neighboring information and capture local movement patterns, i.e. H = Conv Hd) Next, we compute cross cross-attention between the trajectory embedding H' and the reference tokens E,, to capture the global semantics H". where H' acts as the query, and E,,, serves as both the key and value. Then, we concatenate H" with the explicit trajectory prompt embedding H. form the final trajectory representation Z. Finally, we incorporate the Transformer positional embedding into each element of Z and feed this enhanced representation into the PLM encoder to encode the trajectory.
4.3 Pla-- Trajectory Encoder
We utilize pre-trained BERT as our foundational PLM. as its encoder-oni structure is well-suited for reconstruction tasks due to its effective use of bi-directional contextual information from trajecto- ries [29]. To optimize PLM for trajectory recovery, we implement the Low-Rank Adaptation (LoRA) algorithm [3 for fine-tuning. After obtaining the output embeddings from the PLM, we discard the IF-gudded explicit trajectory prompt portion and extract trajectory embeddings Z' E R |T'| For the j-th element of Z', we apply the softmax function to calculate the probability of each road segment and determine the predicted road segment e, via the argmax operation. Additionally, we employ a Multi-Layer Perceptron (MLP) with Sigmoid activation function to predict the moving ratio ry-.
4.4 Joint Training Strategy
To enable PLMTrajRec to effectively recover sparse trajectories across varying sampling intervals. we implement a comprehensive joint training strategy. Specifically, for each dense trajectory T. we generate M sparsified variants by resampling at different intervals, yielding M distinct sparse datasets TI....,
These datasets are merged into a unified training dataset Tall = U. T,, enabling the model to achieve balanced performance across different sampling rates. Subsequently, we fine-tune the model on each individual sparse trajectory dataset to further enhance trajectory recovery performance for specific sampling intervals.
We employ multi-task learning to simultaneously optimize road segment recovery and moving ratio recovery. For road segment recovery, we utilize the cross-entropy loss function, while for moving ratio recovery, we employ the mean squared error loss function. These two objectives are balanced using a weighting factor À to ensure optimal performance on both tasks.

---

Experiments
In this section, we present comprehensive experiments to evaluate the effectivvness, scalability, and generalization capabilities of PLMTrajRec.
Datasets. We evaluate our model on four public trajectory datasets from Chengdu D China, and Porte]] Portugal. For each city, we use road networks and trajectories at two different scales, named Chengdu-Small, Chengdu-Large, Porto-Small, and Porto-Large. All trajectories are standardized to 15-second sampling interval. We remove trajectories with travel times less than 5 minutes or exceeding hour, as well as outliers. The road network data sourced from OpenStreetMapp" We apply map-matching algorithm [22] to align trajectories with the road network and obtain ground truth road segments and movement ratios. Table/8jsummarizz the statistics of our datasets.
Baselines. To evaluate the effectiveness of our model, we compare PLMTrajRec with 12 baseline methods. These include five free space trajectory recovery models: HMM [2] + ShortestPath,
Linear [12] HMM (22), MPR [9] HMM [22]. DHTR [32] HMM [22]. and AttnMove [39 +
Rule, and seven map-mat map-matched trajectory recovery models: MTrajRec (26], T2vec [17] + Decoder,
T3s 42) + Decoder, TERI [7] + Decoder, TrajBERT [27 + Decoder, RNTrajRee [8] and
MM-STGED 38 The details of each baseline are provided in Appendix
38 we use five common metrics to evaluate the effectiveness of our model. For road segment recovery, we adopt Accuracy (Acc), Recall, and Precision (Prec). To assess the recovered GPS coordinates, we employ Mean Absolute Error (MAE) and Root Mean Square Error (RMSE). The details of each metric are provided in Appendix D.I
Evaluation Metrics. Following existing works [26
Settings. During training, we use sparse trajectories with three different sampling intervals to train PLMTrajRec, where μ 4 minutes, 2 minutes, and I minute, respectively, and recover dense trajectories with sampling interval = 15 seconds. After training, we evaluate the model's performance across these intervals test its generalization ability. To further improve accuracy, we fine-tune the model on each specific interval, enabling more precise trajectory recovery. We implement this fine-tuning using LoRA specifically for the attention components of the PLM. Detailed experimental settings are provided in Appendix D.2.
5.1 Experimental Results
The comparison of the results is shown in Table ! We observe that as the sampling interval increases, trajectory recovery becomes more challenging, resulting in decreased performance across all models. Compared to baselines, our model achieves superior performance across all metrics, with an average improvement of 16.51 % and 9.35% the Chengdu-Small and Porto-Small datasets. Notably, model demonstrates substantial gains in RMSE metrics, with an average reduction of 351.8 meters in Chengdu- -mall and 119.2 meters in Porto-Small. These results indicate PLMTrajRec generalizes effectively, enabling accurate trajectory recovery across varying sampling intervals. By fine-tuning at the specific sampling interval, PLM'TraRRee FT, the performance further improves 1.49%, 0.13%, 1. 1.16%, and 0.80% on the four datasets. These outstanding results can be attributed to the PLM's strong generalization capability in processing sparse trajectories with varying sampling intervals and the efficient extraction of spatiotemporal correlations by the interval-aware trajectory embedder.
5.2 Scalability Analysis
To evaluate the effectiveness of PLMTrajRec in trajectory recovery when dense trajectory data is limited, conduct scalability experiments. Specifically, we train the model using subsets of the training set at 20%, 40%, 60%, 80%, and 100%, and evaluate performance on the test set. The results presented in Table 2 As the size of the training set increases, the performance improves across all baseline models. Notably, with only 20% of the training data, PLMTrajRee already surpasses most baselines, trailing only MM-STGED. With 40% of the training data, PLMTrajRee outperforms all other models, demonstrating its strong scalability. This advantage underscores the practicality of PLMTrajRee in limited data scenarios.
http:://outreacch.dddcicccc dide
com htt.:/gg....ooommppttaaaaaaaaaaa taxii-taii--- wtw.itteriiieeeeeeeea swrrriccttraeetooyy--r.
http:://www.openstreee
7

---

Table I: Performance comparison on Chengdu- and Porto-Small datasets with sampling intervals at 4 minutes, minutes, and minute, respectively. Red denotes the best result, and blue denotes the second-best best result. 4 means lower is better. 1 means higher is better.
Datnser
Sampling Interval p
minutes 2 minutes minute
Methods
Acc(%) 1
Recall( 1
Prect?))
MAE
RMSE L
HMM Shottesatt
26.85
35
28.61
(7/89/ 67.92
29.55/ (8.3 50.16
9
1017.7/ 638 2
26.12/43.75
Chengdu Small
DITTR+IMM
MPR-IIMM
11.8874.17
4955
1///4717//5100 51,09
/62.25
38,621
$7.31
51.2
111688 63/10
62.67
50:48
11,53
50.1
73
/
10.53
50.14
6736/066.01
8219/474./
1118
/11.1/9900 /69.0
91L2/9122/ 7504
AilnMuve-Rule
61.13/71 79660
77
81
78.72 50.67
82
158.2/91-
1/ 191.
916.7 761 7526
MirniRee
315.1
Decoder
68.60/ 74.62 30.90
26
82.78
83.15
318.2 222 187.1
926.3 857 5/ 7715.
12vec Decoder
66.51
77 69 18.00
75 68
30/
81.90 90
78.21
81.8 83.88
301 /2316/ 185.6
915 78367 6
TER Decoder
66.42 15 15
$1
78.36
83-92
309 / 186.9
9038 821 7 710.4
TrajkEKK Decoder
310
KNTraiKes
67.66/
50/
82.00
79.97
/ 177.
886.07 757 702.5
MM-STGED
70.64/
78
14/ 84.26
76.04
50
84.15
81 83.
58
85.92
2/
19 154.0
879.7 696 0/6355
PLMeraijee
24.12/81 77.17.17
17
79.63
84
17.99
86.46/
58 38
/ 100-52
262
18
48 DJ 2. 2008
PLM.irajRee-FF
74.58 29.
88.15
50.09
84.59)
88.82
$6.63/ 88.72
91.04
253.2
/21.1111221 138.6
465.7 349.0/ 289.1
HMMM-SoottsiPPah
20
10/12/2700
27 30/ 34,75
26 10.05/ 48.46
46.00
48.67
936. 1617 527.2
SILS 7 659
MPR-IIMM
32.33/
221/4977 76
27
38.67 52 WT 65.66
15.07
96
74 S1
534.0
109.
402.6
700 6009//9900 168
Porto Small
DITTR+EMM
AilMMoe-Ruule
40.31
12.02 042744377 76 52.90 98
72.07
48 62 90 59
58 10 65 69 50
45.61
01
98
107
S7
50 41
156.7
3100
2200/213.30 156.
5555 44404
578 625 627
63
MTraiRee
Tise Decoder
52.24/61:55
06G11557710 /7.75
60.14 68 53
16
270
110.1
5919 46 2/ 528.0
12vec E2vece Decoder
62.136224477 21
60.27
05
71.10
63
S0.45
256.3
1739 114.2
S7L 458.0 3347
TER Decoder
53.39/62 74/7153
00.02 05 39
26
50
253.9
178.3
113.2
558.7 443.9 525.9
+eenner
KNTrajKes
54.59
72.31
66 59 66 15/ 72.27
71.88
20
80.57
110.3
549.1
433.9 525.7
MM GGFD
77.30/65.0//77
73.16
80.31
80
74
80.1
232.8
152.5 108.2
410.4/ 400 / 521.9
57.61 766.606 24.42
55
06 52 72.78
82.19
82.82
2009
14199/99 99956
376.9/ 294 21177 370.3/ /913/220.
PLMIirajRee-FT
2667766.7/75.
59.08
66.77
73887
$2.05
83.28
200.8
191.7/952
HlMM-Shurt
/448
45
46
386
8
1.36 0/ S46 638.6
36
MPR
31 1110/4770/
5%
41
57
52
0S
70
520 3 306
946.5 / 701 3/6553
Changdu Large
DHTR+FiMM
37.45/ 52.65
60 66
50:47
06
74
583
497 24N
9309/ 776.0 07 S72
Alle MMnMeeMMMMMM
67.37/ 73
79 14
71 16
60
60
8
197.
663
Decoder
20.62/ 19/999998838 11
85
94
84
293 127.3
499 5 299
Decouer
11.49 $0.11 82
76.7 11
96
78 38
76
85 57
301 2462 135.6
7928 4614 301.
TRE Decoder
1,20/8151 83.72
04
02
267.6
245
125.6
400 278.5
Deender
KNTrajRes
23.62/ 80.55 $4.21
76.05
86.34
78.907
261S
183.3 121.8
7618 389.5 253.0
MM-STGRD
75.51 /33.77 86.21
79.34
94
02/
89.17
NO.13/
85
89.22
24 162.9/ 102.0
7 357.7 203.9
PLMeeeeeeee
( 84
$2.72
58 72
92.38
56
89
93.11
223.8
14699 85.44
421
/7.6/2230/ 137.5
PLMiTraRRe--FT
2515/85.48//
90.28
83.03/
58.931
92.22
/
89
92.86
218.2/ 143.1
406.67 268.6/ 133,0
HMMM-Shurt
23.81
10/49 16
78
40/ 50
30
4104/717.77
387.7
961
MPR
17. 46 S4/ 58
30 D8
55
82
61.9
58
30
02 42
7497 3 355 649
830
S92 4455
Porto Large
MovesHMMM
DHTR+FiMM
57:35
30877 54, 7% 763
05 66
6000 66 76/ 64
50.38 60 76
64
66.5 53
77
1139/ 21 241.2
661 466.9 362
268.0
250.9
128
362
TRE Desie-eeoderr
Decoeer
63.52/677
64.21665 64 22.54
72.31 1341/67633
39/23///733 77.31
6192 70 56/ 73.67
63.85
61.11 09
69 701 74.00
73.59
23.56
70.0
L6 74.08
72.82
2111 161. 103.6
216.0
215.9 16 1154
172.2 137.0
358 308 3/ 208
375. 175.//3244 32499/255
311.7 /124
+Dconder
32
KNTraiiee
65.98/68858
72.72
61.35
74.31
74.91
25
73.95
192./ 1 82.4
311 286.6/ 185.8
MM-S STED
66.66 7005 74.05
66.59 74.44/
76.68
75.02
74.55
53
76.35
173.6/ 113.6/ 68.6
296.3 255.9 149.6
PLMTrajRee
67.57/73.4477 30
68. 74 136
107 79.36
/
76,
90.92
1612/1919/ 116.
PLMIrajRec=FT
67.8773368/72
09.18/66.00
79.93
75
77.02/ 81.05
12.7/96.0755 52.3
261.3 188.2 117.3
Table 2: Scalability analysis. The performance comparison on the Chengdu-Smal dataset when trained with different data ratios. The result of other dataset can be found in Table 7 S and Red denotes the best result, and blue denotes the second-best result.
Setting
Data Ratio Meine
201
40%
60%S
30%
100%
Acc(V))
RMSE
Agc(7o)
RMIST:
Auc(76)
RMSE:
Aoc(7))
RMSE:
Auc(Pe)
RMISEE
MTrajRoc
60.73
1048.0
63.58
968.5
64.73
929.
65.39
914.6
65.79
904.4
T3s r Dlecoder
60.49
1098.9
63.32
968.7
64.23
961.9
65.04
942..1
65.60
926.1
minutes
Tivec e Decoder
62.17
966.1
64.92
94.61
64.95
972.3
65.11
945.88
66.51
915.2
RNTrajooc
60.80
998.0
62.85
931.3
64.19
909.1
65.46
835.0
67.66
886.0
MM-STGED
035.0
67.76
881.N
68.53
95
N25.1
20..64
PLMTrajRec
71.57
515.6
72.74
512.5
73.56
74.12
MTrnjRoe
69.85
919.8
72.58
1017.4
73.97
902233
891.3
774.52
885.7
Dexnder
68.86
72.24
297.2
73.63
857.5
# == 2 minutes
T2vec Decoder
72.77
MM.S TMED
71.65
75.32
773.0
75.49
76.94
747.7
78.14
PLMTrajRee
76.29
452.8
79.37
411.5
$0.37
395.4
$1.1
377.4
81.76
366.2
MirajRoc
Tis Decoddr
76.49
917.1
79.08
824.9
80.65
767.8
80.82
716.5
80.90
713.0
p= minute
T2vec Decoder
75.89
845.4
79.09
746.8
79.41
752.3
81.21
742.2
$1.69
714,1
R RNTimjRee
75.65
846.2
79.48
7164.8
79.61
769.
81.74
742.5
81.88
702.5
TG-D
76.02
857.7
79.86
7:4.7
82.25
676.4
83.44
663.0
84.26
633.5
PLMTrajRec
81.62
397.5
84.59
352.0
85.75
328.7
86.73
305.4
87.17
290.8
5.3 Zero-shot Study on Sampling Interval
We further analyze the model's generalizability when tested on sampling intervals absent during training. Specifically, PLMTrajRRe is trained with sampling intervals of minute and 4 minutes, then evaluated on trajectories sampled at 2-minute intervals. Table 3 presents the results, where $
8

---

Table 3: Zero-shot study on Chengdu- Small and Porto-Small datasets with f 2 minutes. Red denotes the best result, and blue denotes the second-bess result.
Darasets Methods
Chengdu- -mall MAE
Porto-Small MAE
Acc(%)
RMSE
Aoo(%)
RMSE
MirijRee
CL
1398)
492.7
48 37%)
1046.2 34%)
37,51
14%)
322.0 CL 43%
566.8 1418
Decoder
10.81%)
353.0 (L 31,3915
980.6
45.88
87%)
247.2
26.669)
$27.1
12.511%
12ves Decoder
63.32 (1
376.6
58%5
( 15.57%)
10.78%)
507.2 (2 1
RNTrujjeee
64.93
10.87%)
339.6
912.8 (L 17.07%%
52.82
10.57%)
19.989)
478.6 9.34%)
MM-STGED
68.27 <- 9-90961
291.8
32.4258)
662.61L 19.31%%
55.21
9.98%)
182.4
16.40%)
450.9
11%1
PLMTaajRec
79.62 (1 2.14%)
195.3 4.05%)
379.6 3.53 %)
64.96 (1 1.44%)
147.1
() 3.52%)
343.8 (1 3.03%)
indicates the percentage decline compared to performance when trained with 2-minute sampling intervals. While all models exhibit decreased accuracy when the target sampling interval is excluded from training data, PLMTrajRRec demonstrates notably smaller performance degradation. This robustness can be attributed to its trajectory prompts and joint training strategy, which effectively identify the sampling interval patterns in target trajectories, enhancing generalizability. In contrast, baseline models rely exclusively on trajectory point information to capture correlations, limiting their ability to generalize across different temporal dynamics between training and testing datasets.
5.4 Model Analysis
Table 4: Ablation study with μ = 2 minutes. Red denotes the best result, and blue denotes the second-best result.
Datisets
Chengdo-Smi Small
Porto-Smull
Chengii--1 lmpe
Portel Large
Melhods
Ace
MAR
RMSE
And17()
MAP
RMSSE
Acc.75)
MAB
RMSE
Acs(70)
MAE
RMSE
PLMIrajRee- Randomly initialized BERT
74,11
258.4
531.9
62.05
179.3
413.9
79.28
251.5
462.0
58:29
169.2
282.3
P1 PLMTaaRRss- GPT-2
80:23
273.7
452.7
64.33
272.0
4501.
81.63
217.5
428.6
70.29
149.5
266.5
PLMTrujRee- Limaa
80,51
255.3
473.5
64.89
235,1
438.3
82.24
204.1
412.4
70.58
136.9
248.1
IF-guided explici trajectory prompt
81.04
205.8
364.2
66.
314.6
wio quided implicit irajectory prompt
81.43
191.4
371.1
66.11
298.1
84.23
304.2
72.10
w/o Dual injectory proppss
80.70
225.9
407.4
65.5 65.52
171.0
339.4
83.20
185.3
348.2
71.72
131.0
269.1
wio Reference tokens PL.MTrafRe
50.83
236.6
431.1
65. 89
165.4
$27.3
82.71
200.3
396.6
71.26
131.2
251.3
81.76
187.4
366.2
66.40
141.9
294.6
85.11
146.9
273.0
73.14
97.3
191.9
Ablation Study. As shown in Table removing dual trajectory prompts results in 12.80%
degradation in average performance across the four datasets, validating the importance of capturing both task-specific information and road conditions for missing trajectory points. Ablating reference tokens causes performance declines ranging from 8.27% to 20. 29%,,, as the PLM cannot effectively interpret raw trajectory data without these references. Experiments with randomly initialized BERT in PLMTrajRec yield substantially poorer results, demonstrating the effectiveness of pre-trained language models for trajectory recovery task. Similarly, decoder-only PL.M frameworks such as GPT-2 and Llama show decreased performance, indicating that the ability to capture bidirectional contextual information is essential for accurate trajectory recovery.
Table 5: Efficiency analysis on Chengdu-Sman and Porto-Small datasets with μ 2 minutes. The ratio after the trainable parameters denotes the percentage of trainable parameters to the total parameters.
Dataset
Chengdu-Small
Porto-Small
Methods
Parum.
Param. (ratio)
Trainablee
Train time (min/epach)
Inference time (min)
Param.
Trainsble Param, (ratio)
Train time (min/epoch)
Inference time (min)
DHTR
4.95M
4.95M (100%)
7.37
1.29
4.62M
4.62M (100%)
10.52
3,07
MirajRee
5.01M
5.03M (100%)
9.58
1.86
4.85M
4,85M (100%)
18.68
5.41
RNTraiRoe
11366M
1,36M (100%)
10.73
2.23
10,85M
10.85M (100%)
20.57
6.83
MM-STGED
9.24M
9.24M (100%)
12.35
5.77
8.88M
8.89M (100%)
28.27
16.39
PLMIrajRee
45.05M
16.28M (35.15%)
24.18
2.56
44.76M
16.00M (35.7458)
54.14
10.38
Efficiency Analysis. As shown in Table 5] incorporating a PLM increases the model's parameter count as well as training and inference time. However, by deploying LoRA, we significantly reduce the number of trainable parameters, with only 35.15% and 35.74% of the total parameters requiring training. Since the introduction of PLM substantially improves trajectory recovery performance, this approach achieves an effective trade-off between performance efficacy and computational efficiency.
5.5 Hyperparameter Study
To explore the impact of hyperparameters on model performance, we conduct hyperparameter analysis with the sparse trajectory sampling interval of 2 minutes.

---

Chagsh-Srall
Pert-Smal
Lage
AT
112
1024
276 163
Figure 3: Hyperparameter analysis of the number of reference tokens K of trajectory feature transformation.
The Number of Reference Tokens K We set the parameter K from the set {128, 256, 512, 1024] to explore its impact trajectory recovery. The experimental results are shown in Figure 3 As K increases, the effectiveness of trajectory recovery also improves. This suggests that having a larger token space aids in accurately representing trajectory features. When K is larger than 512, the performance improvement of PLMTrajRec becomes marginal, while the computational cost will increase. To balance the performance and efficiency of the model, we set K to 512.
ChngllSSall
App
13655
26
Figure 4: Hyperparameter analysis of the rank r of LoRA.
The Rank r of LoRA As shown in Figure we set the range of r E {4, 8, 16, 64) to explore its impact. observed that the model performs well when r 4. As increases, the accuracy will continue to increase, but not obvious. This suggests that PLM encapsulates substantial domain expertise through training on extensive corpora, rendering it adaptable to trajectory recovery tasks with minor adjustments. Yet as increases, the number of parameters also iccrasss, making the model training require more memory. Thus, we set to balance the performance and resources.
ChuplsStall
Chacpti Lans
Pazsoaage
1356
67
13465
200
Figure 5: Hyperparameter analysis of the weight À in the loss function.
The Loss Weight A As shown in Figure 5 as the loss function weight X increases, the model performance first improves and then decreases. This is because a smaller will make the model focus on road segment recovery, while a larger À will focus moving rate recovery. To balance these two tasks, we set the value of to 10.
Conclusion
In this paper, we investigate the problem of trajectory recovery with limited-scale training datasets and propose novel trajectory recovery model named PLMTrajjRec By leveraging pre-trained language models, PL.MraajRec can effectively recover trajectories even with limited dense trajectory datasets, thereby demonstrating strong scalability. The model incorporates both an interval and feature-guided explicit trajectory prompt and interval-aware trajectory embedder, enabling it to effectively generalize across sampling intervals. Additionally, we introduce an area Hlo-guiided implicit trajectory prompt to gather traffic flows in each region, and propose road condition passing mechanism to infer missing-pon datasets with three sampling intervals validate the effectiveness, scalability, and generalizability of the proposed model. We discuss the limitations and broader impacts PLMMrajRee in Appendix(A
conditions from nearby observations. Experimental results on four
Acknowledgment. This work was supported by the National Natural Science Foundation of China (No. 62372031), A RIE2025 Manufacturing, Trade and Connectivity (MTC) Programmatic Fund (M24N660043), and ECNU Multifunctional Platform for Innovation (001).
10

---

References
Pasquale Balschre, Weiming Huang, Gao Cong, and Yi Li. City foundation models for learning general purpose representations from openstreelmap. Edoardo Serra and Francesca Spezzano, editors, Pruceed- ings of the 33rd ACM International Conference on Information and Knowledge Management, pages 87-97. ACM, 2024.
[2] Prithu Banerjee, Sayan Ranu, and Sriram Raghavan. Inferring uncertain trajectories from partial observa- tions. In 2014 HEEE International Conference on Data Mining, pages 30-39. IEEE, 2014.
[3] Defu Cao, Furong Jia, Sercan O Arik, Tomas Pfister, Yixiang Zheng, Wen Ye, and Yan Liu. Tempo: Prompt- based generative pre-trained transformer for time series forecasting. arXiv preprint arXiv:2310.04945 2023.
[4] Dawei Chen, Cheng Soon Ong, and Lexing Xie. Learning points and routes to recommend trajectories. In Proceedings the 25th ACM international on conference information and knowledge management, pages 2227 2232, 2016.
[5] Wei Chen, Haoyu Huang. Zhiyu Zhang, Tianyi Wang. Youfang Lin, Liang Chang, and Huaiyu Wan. Next-poi recommendation via spatial-temporal knowledge graph contrastive learning and trajectory prompt. IEEE Transactions on Knowledge and Data Engineering, 2025.
[6] Wei Chen, Huaiyu Wan, Shengnan Guo, Haoyu Huang, Shaojie Zheng, Jiamu Li, Shuohao Lin, and Youfang Lin. Building and exploiting spatial--emporal knowledge graph for next poi recommendation. Knowledge-Basd Based Systems, 258: 109951, 2022.
[7] Yile Chen, Gao Cong, and Cuauhtemac Anda. Teri: An effective framework for trajectory recovery with irregular time intervals. Proceedings of the VLDB Endowment, 17(3):414-426, 2023.
[8] Yuqi Chen, Hanyuan Zhang, Weiwei Sun, and Baihua Zheng. Rntrajrec: Road network enhanced trajectory recovery with spatial-temporal transformer. In 2023 IEEE 39th International Conference Data Engineering (ICDE), pages 829 842. IEEE, 2023.
[9] Zaūben Chen, Heng Tao Shen, and Xiaofang Zhou. Discovering popular routes from trajectories. In 2011 IEEE 27th International Conference on Data Engineering, pages 900-911. IEEE, 2011.
[10] Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Ncural message passing for quantum chemistry. In International conference on machine learning, pages 1263-1272. PMLR, 2017.
[11] Shengnan Guo, Youfang Lin. Letian Gong, Chenyu Wang. Zeyu Zhou, Zekai Shen, Yiheng Huang, and Huaiyn Wan. Self-supervised spatial-temporal bottleneck attentive network for efficient long-term traffic forecasting. In 2023 IEEE 39th International Conference on Data Engineering (ICDE), pages 1585-1596. TEFF, 2023.
[12] Sahar Hoteit, Stefano Secci, Stanislav Sobolevsky, Carlo Ratti, and Guy Pujolle. Estimating human trajectories and hotspots through mobile phone data. Computer Networks, 64:296- 30066,3077000 2014.
[13] Edward Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang. Wang. and Weizhu Chen. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.099 09685. 2021.
[14] Jianchao Ji, Zelong Li, Shuyuan Xu, Wenyue Hua, Yinggiang Ge. Juntao Tan, and Yongfeng Zhang Genrec: Large language model for generative recommendation. In European Conference Information Retrieval, pages 494-502. Springer, 2024.
[15] Ming Jin, Shiyu Wang. Lintao Ma, Zhixuan Chu, James Zhang, Xiaoming Shi, Pin- Chen, Yuxuan Liang, Yuan-Fang Li, Shirui Pan, et al. Time-llm: Time series forecasting by reprogramming large language models. arXiv preprint arXiv:23
2023.
[16] Juho Lee, Yoonho Lee, Jungtack Kim, Adam Kosiorek, Scungjin Choi, and Yee whye Teh. Set transformer: A framework for attention- sreettoon-based based commutation-nvariian neural networks, In International conference on machine learning, pages 3744-3753. PMLR, 2019.
[17] Xiucheng Li, Kaiqi Zhao, Gao Cong, Christian S Jensen, and Wei Wei. Deep representation learning for trajectory similarity computation. In 2018 IEEE 34th international conference on data engineering (ICDE), pages 617-628. IEEE, 2018.

---

[18] Yang Li, Si Si, Gang Li, Cho-Jui Hsieh, and Sany Bengio. Learnable fourier features for multi-dimensional spatial positional encoding. Advances in Neural Information Processing Systems, 34:15816-15829, 2021.
[19] Yi Li and Gao Cong. Geobloom: Revisiting lightweight models for geographic information retrieval. Proc. VLDB Endow., 18(5):1348 1361, 2025.
[20] Ziqiao Liu, Hao Miao, Yan Zhao, Chenxi Liu, Kai Zheng, and Huan Li. Lighttr: A lightweight framework for federated trajectory recovery. arXiv preprint 24t::22000003009 2024.
[21] Wenxuan Ma, Shuang Li, JinMing Zhang, Chi Harold Liu, Jingxuan Kang, Yulin Wang, and Gao Huang. Borrowing knowledge from pre-trained language model: new data-efficient visual learning paradigm. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 18786-18797 2023.
[22] Paul Newson and John Krumm. Hidden markov map matching through noise and sparseness. In Pro- ceedings of the 17th ACM SIGSPATIAL international conference on advances in geographic information systems, pages 3336-33,222 2009.
[23] Haoyang Peng, Baopu Li, Bo Zhang, Xin Chen, Tao Chen, and Hongyuan Zhu. Milt vision fusion network: Can 2d pre pre-trained model boost point cloud data-scarce learning? IEEE Transactions on Circuits and Systems for Video Technology, 2023.
[24] Alce Radford, Karthik Narasimhan, Tim Salimans, llya Sutskever, al. Improving language understanding by generative pre-training. 2018.
[25] Zeenat Rchena and Marijn Janssen. Towards a framework for context-aware intelligent traffic management system smart cities. Companion Proceedings of the The Web Conference 2018, pages 193-898.7 2018.
[26] Huimin Ren, Sijie Ruan, Yanhua Li, Jie Bao, Chuishi Meng, Ruiyuan Li, and Yu Zheng. Mtrajree: Map-constrained trajectory recovery via seq2seq multi-task learning. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, pages 1410-1419, 2021.
[27] Junjum Si, Jin Yang, Yang Xiang, Hanqiu Wang, Li Li, Rongqing Zhang, Bo Tu, and Xiangqun Chen. Trajbert: Bert-based trajectory recovery with spatial-tempon refinement for implicit sparse trajectories. IEEE Transactions on Mobile Computing, 2023.
[28] Han Su, Kai Zheng, Haozhou Wang, Jiamin Huang, and Xiaofang Zhou. Calibrating trajectory data for similarity-bascl analysis. In Proceedings of the 2013 ACM SIGMOD international conference on management of data, pages 333-844,22 2013.
[29] Chenxi Sun, Yaliang Li, Hongyan Li, and Shenda Hong. Test: Text prototype aligned embedding to activate Ilm's ability for time series, arXiv preprint arXiv:2308.0824/ 08241, 2023.
[30] Hao Sun, Changjic Yang, Liwei Deng, Fan Zhou, Feiteng Huang, and Kai Zheng. Periodicmove: Shift- aware human mobility recovery with graph neural network. In Proceedings of the 30th ACM International Conference on Information & Knowledge Management, pages 1734 1743, 2021.
[31] Matthew Tancik, Pratul Srinivasan, Ben Mildenhall, Sara Fridovich-Keil, Nithin Raghavan, Utkarsh Singhal, Ravi Ramamoorthi, Jonathan Barron, and Ren Ng. Fourier features let networks learn high frequency functions in low dimensional domains. Advances in neural information processing systems, 33:7537-7547, 2020.
[32] Jingyuan Wang. Ning Wu, Xinxi Lu, Wayne Xin Zhao, and Kai Feng. Deep trajectory recovery with fine-grained calibration using kalman filter. IEEE Transactions on Knowledge and Data Engineering. 33(3):221995 2934,,9994,22 2019.
[33] Qinyong Wang. Hongzhi Yin, Tong Chen, Zi Huang, Hao Wang, Yanchang Zhao, and Nguyen Quoc Viet Hung. Next point-of ofint-of-interest of the Web conference 2020, pages 906-916, 2020.
interest recommendation on resource-constraing mobile devices. In Proceedings
[34] Sheng Wang, Zhifeng Bao, Shane Culpepper, and Gao Cong. A survey on trajectory data management, analytics, and learning. ACM Computing Surveys (CSUR), 54(2):1-36, 2021.
[35] Wenhai Wang, The Chen, Xiaokang Chen, Jiannan Wu, Xizhou Zhu, Gang Zeng, Ping Luo, Tong Lu, Jie Zhou, Yu Qiao, et al. Visionllm: Large language model is also an open-ended decoder for vision-centric tasks. Advances in Neural Information Processing Systems, 36, 2024.
[36] Yu Wang, Tongya Zheng, Yuxuan Liang, Shunyu Liu, and Mingli Song. Cola: Cross-city mobility transformer for human trajectory simulation. In Proceedings of the ACM on Web Conference 2024, pages 3520, 2024.
12

---

[37] Tonglong Wei. Youfang Lin, Shengnan Guo. Yan Lin, Yiheng Huang, Chenyang Xiang, Yuqing Bai, and Huaiyu Wan. Diff-ritraj: A structure-aware diffusion model for road network-constraaned trajectory generation. IEEE Transactions on Knowledge and Data Engineering, 2024.
[38] Tonglong Wei. Youfang Lin, Yan Lin. Shengnan Guo, Lan Zhang. and Huaiyu Wan. Micro- spatial- temporal graph- encoder-decoder for map-constrained trajectory recovery. IEEE Transactions on Knowledge and Data Engineering, 2024.
[39] Tong Xia, Yunhan Qi, Jie Feng. Fengli Xu, Funing Sun. Diansheng Guo, and Yong Li. Attnmove: History enhanced trajectory recovery via attentional network. In Proceedings of the AAAI conference on artificial intelligence, volume 35, pages 4494 4502, 2021.
[40] Fengli Xu, Zhen Tu, Yong Li, Pengyu Zhang, Xiaoming Fu, and Depeng Jin. Trajectory recovery from ash: User privacy is not preserved in aggregated mobility data. In Proceedings of the 26th international conference world wide web, pages 1241-1250, 2017.
[41] Shuai Xu, Donghai Guan, Zhuo Ma, and Qing Meng. A temporal conppll-oottttt-tee aware approach for individual human mobility inference based sparse trajectory data. In Asia-Pacific Web (APWeb) and Web-Age Information Management (WAIM) Joint International Conference Web and Big Data, pages 106-120. Springer, 2022.
[42] Peilun Yang. Hanchen Wang. Ying Zhang, Lu Qin, Wenjie Zhang, and Xuemin Lin. T3s: Effective representation learning for trajectory similarity computation. 2021 IEEE 37th International Conference on Data Engineering (ICDE), pages 2183-2188. IEEF, 2021.
[43] Haitao Yuan, Guoliang Li, Zhifeng Bao, and Ling Feng. An effective joint prediction model for travel demands and traffic flows. In ICDE, pages 348-359, 2021.
[44] Peiyuan Zhang, Guangtao Zeng, Tianduo Wang, Wei Lu. Tinyllama: An open-source small language model. arXiv preprint 24X1v:2401.023385 2024.
[45] Kai Zhao, Jie Feng, Zhao Xu, Tong Xia, Lin Chen, Funing Sun, Diansheng Guo, Depeng Jin, and Yong Li. Deepmm: Deep learning based map matching with data augmentation. In Proceedings of the 27th ACM SIGSPATIAL international conference on advances in geographic information systems, pages 452-455, 2019.
[46] Pengpeng Zhao, Anjing Luo, Yanchi Liu, Jiajie Xu, Zhixu Li, Fuzhen Zhuang, Victor S Sheng, and Xiaolang Zhou. Where go next: A spatio-temporal gated network for next poi recommendation. IEEE Transactions on Knowledge and Data Engineering, 34(5):2512-2524 2020.
[47] Zhengyang Zhao, Haitao Yuan, Nan Jiang, Minxiao Chen, Ning Liu, and Zengxiang Li. STMGF: an effective spatial-tempona multi- guaniagganularity framework for traffic forecasting. In DASFAA, volume 14850. pages 235-245, 2024.
[48] Kai Zheng, Yu Zheng, Xing Xie, and Xiaofang Zhou. Reducing uncertainty of low-sampling-rate tra- jectories. In 2012 IEEE 28th international conference on data engineering, pages 1144-1155. IEEE, 2012.
13

---

NeurIPS Paper Checklist
1. Claims
Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?
Answer: [Yes]
Justification: Please refer to Abstract and Section 1
Introduction.
Guidelines:
The answer NA means that the abstract and introduction do not include the claims made in the paper.
The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or
NA answer to this question will not perceived well by the reviewers.
The claims made should match theoretical and experimental results, and reflect how be expected to generalize other settings.
much the results
is fine to include aspirational goals as motivation as long is clear that these goals are not attained by the paper.
2. Limitations
Question: Does the paper discuss the limitations of the work performed by the authors?
Answer: [Yes]
Justification: Please refer to Appendix A Limitations and Broader Impacts.
Guidelines:
The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those not discussed in the paper.
The authors are encouraged to create separate "Limitations" section in their paper.
The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification. asymptotic approximations only holding locally). The authors should reflect how these assumptions might be violated in practice and what the implications would be.
The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on few datasets or with few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.
The authors should reflect the factors that influence the performance of the approach. For example, facial recognition algorithm may perform poorly when image resolution low images are taken in low lighting. Or speech-to-text system might be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.
The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.
If applicable, the authors should discuss possible limitations of their approach address problems of privacy and faimess.
While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't 't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an impor- tant role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.
3. Theory assumptions and proofs
Question: For each theoretical result, does the paper provide the full set of assumptions and complete (and correct) proof?
Answer: [NA]
14

---

Justification:
The paper does not include theoretical results.
Guidelines:
The answer NA means that the paper does not include theoretical results.
All the theorems, formulas, and proofs in the paper should be numbered and cross- referenced.
All assumptions should be clearly stated or referenced the statement of any theorems.
The proofs can either appear the main paper or the supplemental material, but they appear in the supplemental material, the authors are encouraged to provide short proof sketch to provide intuition.
Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix supplemental material.
Theorems and Lemmas that the proof relies upon should be properly referenced.
4. Experimental result reproducibility
Does the paper fully disclose all the information needed to reproduce the main ex- perimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?
Question:
Answer: [Yes]
Justification: Please refer to Section Experiments and Appendix experiment in Appendix 5.5 0 etc.
Guidelines:
The answer NA means that the paper does not include experiments.
If the paper includes experiments, No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.
If the contribution is dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.
Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g.. in the case of large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.
While NeurIPS does not require releasing code, the conference does require all submis- sions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example
(a) If the contribution is primarily a new algorithm, the paper should make it clear how reproduce that algorithm. (b) If the contribution is primarily
model architecture, the paper should describe the architecture clearly and fully.
(c) If the contribution is a new model (e.g., a large language model), then there should either be way to access this model for reproducing the results or way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).
(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome describe the particular way they provide for reproducibility, In the case of closed-source models, it may be that access to the model is limited in some way (e.g., registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.
5. Open access to data and code
Question: Does the paper provide open access to the data and code, with sufficient instruc- tions to faithfully reproduce the main experimental results, as described in supplemental material?
15

---

Answer: [Yes]
Justification:
Our code and data are available at https:///itthei ctcaluu..com///e wttp:b/ccmmmmt15.mmm
PLMTrajRec
Guidelines:
The answer NA means that paper does not include experiments requiring code.
Please see the NeurIPS code and data submission guidelines (https://nips.c ec/
for more details.
While encourage the release of code and data, understand that this might not be possible, so "No" is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for open-source benchmark).
The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurlPS code and data submission guidelines (https sonideSuumissiooPP..
//nips. //nips.cc/ppl wwcppbblc/guuiicuceccccccooooopp
for more details.
The authors should provide instructions data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.
The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. only subset of experiments are reproducible, they should state which ones are omitted from the script and why.
At submission time, preserve anonymity, the authors should release anonymized versions (if applicable).
Providing as much information as possible in supplemental material (appended to the paper) recommended, but including URLs to data and code permitted.
6. Experimental setting/details
Question: Does the paper specify all the training and test details (e.g., data splits, hyper- parameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?
Answer: [Yes]
Justification: Please refer Section Appendix D
5.5
Guidelines:
The answer NA means that the paper does not include experiments.
The experimental setting should be presented in the core of the paper level of detail that is necessary to appreciate the results and make sense of them.
The full details can be provided either with the code, in appendix, as supplemental material.
7. Experiment statistical significance
Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
Question:
Answer: [Yes]
Justification: Please refer to Appendix 5.5
Guidelines:
The answer NA means that the paper does not include experiments.
The authors should answer "Yes" if the results are accompanied by error bars, confi- dence intervals, statistical significance tests, least for the experiments that support the main claims of the paper.
The factors of variability that the enror bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall with given experimental conditions).
The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)
The assumptions made should be given (e.g., Normally distributed errors).
16

---

It should be clear whether the error bar is the standard deviation or the standard error of the mean.
is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have 96% CI, if the hypothesis of Normality of errors is not verified.
For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out range (e.g. negative enror rates).
If error bars reported in tables plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.
8. Experiments compute resources
For each experiment, does the paper provide sufficient information on the com- puter resources (type of compute workers, memory, time of execution) needed reproduce the experiments?
Question:
Answer: [Yes]
Justification:
We conduct efficiency analysis in Section 5.4
Guidelines:
The answer NA means that the paper does not include experiments.
The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.
The paper should provide the amount compute required for each of the individual experimental runs well estimate the total compute.
The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary failed experiments that didn't make into the paper).
9. Code ethics
Question: Does the research conducted the paper conform, in every respect, with the NeurlPS Code of Ethics http://pww....ee...ooo/o///////a
Answer: [Yes]
Justification: respects.
We ensured that the study complied with the NeurlPS Code of Ethics in all
Guidelines:
The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.
If the authors answer No, they should explain the special circumstances that require deviation from the Code of Ethics.
The authors should make sure to preserve anonymity (e.g., there a special consid- eration due to laws or regulations in their jurisdiction).
10. Broader impacts
Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?
Answer: [Yes]
Justification: Please refer to Appendix A.2 Broader Impacts.
Guidelines:
The answer NA means that there no societal impact of the work performed.
If the authors answer NA or No, they should explain why their work has no societal impact why the paper does not address societal impact.
Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.
17

---

The conference expects that many papers will be foundational research and not tied particular applications, let alone deployments. However, if there is direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.
The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology being used intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.
If there negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms monitor how system learns from feedback over time, improving the efficiency and accessibility of MI..
11. Safeguards
Does the paper describe safeguards that have been put in place for responsible release of data models that have high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?
Question:
Answer: [NA]
Justification:
The paper does not suffer from this risk.
Guidelines:
The answer NA means that the paper poses such risks.
Released models that have high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere usage guidelines or restrictions to access the model or implementing safety filters.
Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.
We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make best faith effort.
12. Lieenses for existing assets
Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper. properly credited and are the license and terms of use explicitly mentioned and properly respected?
Answer: [NA]
Justification: The paper does not use existing assets.
Guidelines:
The answer NA means that the paper does not existing assets.
The authors should cite the original paper that produced the code package or dataset.
The authors should state which version of the asset is used and, if possible, include URL.
The name of the license (c.g., CC-BY 4.0) should be included for each asset.
For scraped data from a particular source (c.g., website), the copyright and terms of service of that source should be provided.
If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswi thcode. com com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of dataset.
For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.
18

---

If this information is not available online, the authors are encouraged to reach out to the asset's creators.
13. New assets
Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?
Answer: [NA]
Justification: The paper does not release new assets.
Guidelines:
The answer NA means that the paper does not release new assets.
Researchers should communicate the details of the dataset/code/mmoel as part of their submissions via structured templates. This includes details about training, license, limitations, etc.
The paper should discuss whether and how consent obtained from people whose asset is used.
At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.
14. Crowdsoureing and research with human subjects
Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well details about compensation (if any)?
Answer: [NA]
Justification: The paper does not involve crowdsourcing nor research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Including this information in the supplemental material is fine, but if the main contribu- tion of the paper involves human subjects, then as much detail as possible should be included the main paper.
According the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.
15. Institutional review board (IRB) approvals or equivalent for research with human subjects
Question:
Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?
Answer: [NA]
Justification:
The paper does not involve crowdsourcing nor research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Depending the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.
We recognize that the procedures for this may vary significantly between institutions and locations, and expect authors to adhere to the NeurlPS Code of Ethics and the guidelines for their institution.
For initial submissions, do not include any information that would break anonymity (if applicable), such the institution conducting the review.
16. Declaration of LLM usage
19

---

Question: Does the paper describe the usage of LLMs if it is important, original, or non-standard component of the core methods this research? Note that if the LLM used only for writing, editing, or formatting purposes and does not impact the core methodology, scientific rigorousness, or originality the research, declaration is not required.
Answer: [Yes]
Justification: LLM is crucial component in the paper, which aims to achieve scalability and generalization, as demonstrated in Section
Guidelines:
The answer NA
that the method development in this research does involve LLMs as any important, original, or non-standard components.
Please refer to our LLM policy for what should or should be described.
20

---

A Limitations and Broader Impacts
A.1 Limitations
Due to the varying number of road segments across different datasets, some modules are technically not transferable across datasets, such as the road segment embeddings and the road segment prediction based on multi-classfficatinn Consequently, generalize to others. Future work will focus on developing a universal road segment embedding to enable cross-dataset adaptation and enhance model versatility.
model trained on one dataset struggles to
A.2 Broader Impacts
Our proposed model demonstrates the effectiveness of applying PLM to trajectory data. The inherent scalability and generalization capabilities of PLM can be effectively leveraged for trajectory modeling, enabling the model to achieve comparable performance using only 20% of the training data and to generalize well to unseen sampling intervals. Furthermore, for the trajectory recovery task, encoder- only PLM architectures outperform decoder-only, as they are better suited to capture bidirectional information within trajectories.
B Dataset
Following 38 for -Small datasets, focus the road network only on the commonly used roads. Specifically, for the Chengdu-Small dataset, we select four types of roads: Primary, Secondary, Trunk, select Primary, Secondary, Motorway, and Tertiary. We employ
and Tertiary. For the Porto-Small, map matching on the selected road network to obtain the ground-truth road segment ID and moving ratio of the trajectory, and trajectories that cannot be matched discarded. In addition, validate our approach on larger scale, we utilize all roads within the regions and perform map matching again, and construct larger dataset, termed Chengdu-Larp and Porto-Large. The statisties of these datasets are summarized in Table
Table 6: Statistics Description of Dataset.
Types
Chengdu-Small
Porto-Small
Chengdu-Large
Porto-Large
#Sampling Intervals
15s
15s
15s
15s
#Trajectories
118,354
322,079
1,563,292
836,391
#Road Segments
2504
2224
12564
15707
Latitude range
(30.655, 30.727)
141,142, 41.174)
(30.600, 30.730)
(41.100, 41.190)
Longitude range
(104.043, 104.129)
(-8.652, -8.778)
(104.011, 104.150)
(-8.675, -8,550)
C
Baseline Setting
We choose the following 12 methods baselines, including five free space trajectory recovery and seven map-matched trajectory recovery.
C.1 Free-space Trajectory Recovery
Free space trajectory recovery first recovers trajectory points and then projects the trajectory onto the road network.
HMM [22] + ShortestPath first projects the sparse trajectory on the road network based on hidden markov model (HMM), and then calculate the shortest path.
Linear 12 + HMM [22
linearly interpolates missing trajectory points and then implements HMM to perform the map matching process.
MPR + HMM 22 first divides the area of interest into grids identify frequently traveled
routes between sparse trajectory points. Then, it assumes that vehicle movement maintains
21

---

constant speed for trajectory recovery. Subsequently, it employs HMM to project the trajectory onto the road network.
sequence framework and Kalman filtering to recover trajectory points. Subsequently, it applies an HMM to yield trajectory that is constrained by the map.
DHTR HMM 22 incorporates sequence-tor srueecceto-sequuence
AttnMove 3 Rule attention predict the missing road segments and uses the central
location as the moving rate.
C.2 Map-matched Trajectory Recovery
Map-matched trajectory recovery directly recover the trajectory on the road network.
MTrajRec 266 utilizes a sequence- sequence-to-sqqueeee te-seuencc framework with Gated Recurrent Units (GRU) as the key component for trajectory recovery. It optimizes road segment and moving rate prediction through multi-task learning.
T2vec [17 is deep learning model for trajectory similarity learning. We use its encoder to embed the sparse trajectory.
T3s 42
uses LSTM and attention mechanisms encode sparse trajectory data effectively.
TERI assumes that the number of missing trajectory points is unknown and proposes two- stage trajectory recovery framework. In the first stage, a transformer- -baed model predicts the number of points to be recovered, and in the second stage, the same framework is used for recovery trajectory coordinates. Here, we utilize only the second stage of TERI.
TrajBERT [27] employs a transformer encoder and forward and backward neighbor selector to learn complex mobility patterns bi-directionally from sparse trajectories.
correlation of the sparse trajectories. also takes into account the relation between the trajectory and the road network.
RNTrajRec [ leverages the Transformer capture the
MM-STGED 38 models sparse trajectories from a graph perspective and recovers trajectories by capturing micro and macro semantic information.
Notably, despite T2vec, T3S, TERL, and TrajBERT employing different techniques to capture sparse trajectories' spatial-temporal dependencies, they cannot directly generate the desired format for missing points. Therefore, after these models obtain the trajectory embeddings, we append the Decoder part of MTrajRec output the road segment and moving ratio of the trajectory point. Denoted by T2v + Decoder, T3S + Decoder, TERI + Decoder, and TrajBERT + Decoder, respectively.
D Implement Details
D.1 Evaluation Metrics
We adopt five widely used metrics to evaluate the effectiveness of our model, following previous works [38, 26). For road segment recovery, we use Accuracy (Acc), Recall, and Precision (Prec) to assess the alignment between the true road segments E, {e1.... em and the predicted road segments & fêe,... ) J- A higher value in these metrics indicates a more accurate road segment recovery. The metrics are formally defined follows:
Acc
Σ
He. = 100%,
1=1
18, E
Recall
x 100%.
(4)
|Ep1
E2p Epp
Prec
100%,
E
where 1(-) is the indicator function, where e é,s Lfe; ê,} elsewise Lfe, ē.} 0.
22

---

To evaluate the recovered GPS coordinates, we employ the Mean Absolute Error (MAE) and Root Mean Square Error (RMSE) quantify the distance error between the true trajectory
Tm = 91 .. Tm. and the predicted trajectory Tm = Q1.-.. 9 f The formulas for MAE and RMSE are given as fol formulas of MAE and RMSE are as follows:
T
MAE
|
(5)
1
RMSE
RN RN_ dist(q:. 4)12
1Tml
Here, following 26
RN (q, 9) signifies the shortest distance along the road network between the trajectory points q and q. Both MAE and RMSE are denoted in meters. Lower values of these metrics indicate higher level of accuracy in the recovery results.
D.2 Setting
We split the trajectory dataset into training, validation, and testing sets in a 7:2:1 ratio. We employ the PyTorch framework to implement PLMTrajRee, with learning
of le-4 and batch size of 64. BERT-small is selected as the foundation model for PLM with 4 transformer layers, and the number of hidden states is 512. For road condition extraction, the area of interest is divided into 64 x 64 grid, and the time dimension is partitioned into hourly intervals. The hidden state dimension is 15 and Pdist 50 meters. The model is trained for 50 epochs with early stopping, using patience of 10 epochs. We train the baselines using the parameters reported in the original paper and set the number of training epochs to 50. All experiments are conducted on NVIDIA RTX A4000 GPUs.
to 512. In function f(da.) of Scction 4.2.2, we
E Example of the IF-guided Explicit Trajectory Prompt
Consider a sparse trajectory T (...... Pvv of N trajectory points with sampling interval of 4 minutes, starting at 8 o' cloock Saturday and ending at 9 o' clock Saturday. Our goal is to recover within a sampling interval seconds. Therefore, the trajectory prompts that are related to sampling intervals are:
Task Part: Sparse trajectory recovery.
Target Part: Output the road segment and moving ratio for each point in the trajectory.
Content Part: The sparse trajectory is sampled on average Ifour minutes) and aims to recover trajectory every (fifteen seconds).
The content within the placeholders { is filled with trajcctory-specific information. The movement feature-related trajectory prompts are:
Time Part: The trajectory started (eight 'clock) on (Saturday) and ended at (nine o' clock) on (Saturday).
Total time cost: (sixty minutes zero seconds). Total space transfer distance: {2} kilometers.
Movement Part:
where the elements are determined by the characteristics of the sparse trajectory. Here = EN distdistpp..P-- where dist(.,.) )) is used to calculate the distance between two trajectory points.
F Insight about the Learnable Fourier Features
Consider two trajectory points x and y, and the feature mapping function ((x) W4 (cos IIsin æW,] in Learnable Fourier Features. The relative information between
23

---

points z and y can be captured through multiplication operations, i.e.;
(x)) (yy = Wa [cos xW, IWii| 2 = W [coss yWr I|sm yW,! W (cos a cos y + sin a sin y) 1|W
(6)
||Wlll cos(æ y) ||Wrl2
In PLMTrajRec, after feature conversion, imput the trajectory feature into pre-language training model based on BERT. Since there are lot of multiplication--asee attention operations in the PLM, the relative information æ- can be easily modeled and utilized. This relative information helps infer crucial details like the distance between trajectory points, which is important for understanding movement. For instance, larger distance between two points may indicate higher likelihood of vehicle acceleration.
G Example of the Preprocessed Sparse Trajectory and Road Condition of the Missing Trajectory Point
08: U0: 00
08: 01: 00
O8: 02: 00
Ts
T
m2
m
m
(m]
FTC
08: 00:
08: 01: OD
08:
01:30 30
08: 02:00
08:01:45
Figure An example of the processed sparse trajectory.
As shown in Figure 6 the sparse trajectory T, consists three trajectory points P1. P2. and Ps. with a sampling interval of minute. We aim to reconstruct the dense trajectory with sampling interval of 15 seconds. Based on the timestamps of the observed trajectory points and the desired sampling interval, we determine the number of missing trajectory points and use placeholder token [m] to indicate them, and formulate the preprocessed sparse trajectory T
To obtain the road condition of the missing trajectory point 8, we identify its nearest observed forward and backward trajectory points, 8y and 8b, respectively. For instance, suppose have missing point timestamped at 8:00:45, its observed forward point 8 P1. and the backward point = P2. Then, use Equation to calculate the road condition of point
H
The Detailed Description of Variants
We randomly initialize the parameters of BERT instead of using the pre-trained BERT based on large-scale corpus datasets.
PLMTrajRec Randomll initialized BERT:
PLMTrajRec- GPT-2: We replace the pretrained BERT with GPT-2 24
PLMTrajRee Llama: We replace the pretrained BERT with Llama
44
w/o IF-guided explicit trajectory prompt: We remove the IF-guided explicit trajectory prompt.
w/o AF-guided implicit trajectory prompt: We use the '[MASK]' token in the BERT to represent the missing location.
w/o dual trajectory prompts:
We remove both the IF-guided explicit and implicit trajectory prompt, and the missing points are represented by the "[MASK]' token in BERT.
w/o reference tokens: We remove the trajectory feature transformation layer in the trajectory embedder module.
I Scalability Results on Different Datasets
L.1 Scalability Results on Chengdu-Large
As shown in T our model consistently achieves superior performance on the Chengdu-LLarge dataset under varying settings. Notably, under three different sampling intervals, the model surpasses

---

Table 7: Scalability analysis. The performance comparison the Chengdu-Larg dataset when
trained with different data ratios. Red denotes the best result, and blue denotes the second besond-best result.
Setting
Data Ratio
20%
40%
60%
80%
100%
Metne
Aoct%)
RMSE
Acc(%))
RMSE
Acc(%)
RMSE
Aoc(%)
RMSE
Aoc(%)
RMSE
MTrujRec
65.58
874.5
66.73
852.2
68.29
842.5
69.12
837.4
70.09
828.5
T3s Decoder
66.63
863.4
68.10
838.1
68.84
825.0
69.79
$15.4
70.62
771.3
mminotes
12vee Desoder
66.39
883.2
69.02
849.0
69.30
K31.9
70.82
813.9
71.49
792.8
R RNTnjKee
68.38
825.1
71.11
801.6
71,89
758.9
72.77
772.6
73.62
764.8
MM-STGED
71.23
781.3
73.76
753.7
74.89
739.6
75.33
727.6
75.51
718.9
PLMTrajRee
77.57
482.6
78.04
461.9
78.53
4466.
78.82
4.2.7
78.97
421.6
MThijRee
74.92
638.1
77.13
593.8
78.48
572.7
79.27
554..7
$0.09
$28.6
T3s + Decoder
74.41
614.9
77.09
574,9
77.83
566.4
78.78
5.26,9
79.19
499.5
A minutes
T2cv - Deoder
76.39
593.7
78.19
553.2
78 86
5.2
79.53
502.7
80.11
461
RNTrajRee 75.19
584.4
77.47
302.0
79,26
473.4
79.98
433.0
80.95
389.8
MM-STGED
81
10
83.77
337.7
P.MMTrajRee
83.92
84.82
MTnujRee
78.51
438.0
81.18
386.2
82.36
370.0
82.82
359.7
83.75
347.7
T3s Decoder
78.38
447.2
$0.17
364.1
$2.10
335.6
82.83
312.9
83.11
299.8
p= 1 minute
Decoder
77.18
82.14
RNThujRec
PlMMrajeee
the SOTA baseline trained on the full dataset while using only 20% of the data. It achieves an improvement 3.76% in Acc and 33.78% in RMSE. These results indicate that our model is well-suited for the recovery task in data-scarce scenarios, demonstrating its strong generalization capability.
1.2 Scalability Results on Porto-Small
Table 8: Scalability analysis. The performance comparison on the Porto-Small dataset when trained
with different data ratios. Red denotes the best result, and blue denotes the second-best result.
Setting
Data Ratio
Metric
Acc(Pe)
20%
RMSE
Acc((%)
40%
RMSE
Auc(())
60%
RMSE
Acc("%)
80%
RMSE
Acc(Ve)
100%
RMSE
MTraiRac
49.55
733.3
$1.10
652.1
$1.77
638
$2.09
629
52.36
591)
Tis t Decoder
50.34
715.8
$1.09
648.3
$1.67
632.7
$2.01
628.7
52,24
594.9
minutes
12vce Decoder
51.81
656
$2.36
52.72
620.6
53.13
571.0
RNTrajkee
51.41
636.2
PLMTrajRec
MTnijRee
Decoder
J minutes
Decoder
RNTmijRe
60.60
587.8
62.25
318.5
62.91
464.5
63.39
433.9
MM STGED
62.24
479.7
63.72
452.5
64.07
437.3
64,78
414.3
400.8
PLMTrajRee
65.01
371.4
65.47
348.4
65.76
327.0
66.17
310.7
66.40
294,6
MiraiRoc
Tis Decoder
68.10
482.1
69.28
421.4
70.47
372.5
71.04
335.9
71.78
328.0
p-
12vec Decoder
R RNTimjkee 69.66
67.89
419.8
$14.3
69.69
71.17
428.7
368.2
70.82
71.93
392.9
352.2
71.10
72.19
349.0
3.96.
71,86
72.31
334.7
325.7
MM-STGED
71.54
382.6
72.05
364.5
72.64
355.1
72.84
158.8
73.16
$21.9
PLMTrajRec
72.28
316.6
73.06
264.9
73.57
244.4
74.08
221.9
74.42
211.7
The experimental results on the Porto-Small dataset are presented Table Our model significantly outperforms all baseline models. We attribute this to the model's effective of world knowledge stored in the PLM, which enhances the model's ability to understand the characteristics of trajectory data. When compared with state-of-the-an trajectory recovery models such as MM-STGED and RNTrajRec, our model achieves improvements of 14.43% and 17.56%, respectively.
1.3 Scalability Results on Porto-Large
The experimental results on the Porto-Large dataset are presented in Table our model consistently achieves the best performance across all evaluation metrics. Compared with the state-of-the-an model MM-STGED, PLMTrajRRec outperforms by margins of 14.84%, 11.57%. 11.65% 10.46%, and 10.85% under data ratios of 20%, 40%, 60%, 80%, and 100%, respectively. Remarkably, even when trained on only 20% of the data, our model exceeds the performance of the baseline trained on the full dataset. These results highlight the strong scalability of PLMTrajRec.
25

---

Table 9: Scalability analysis. The performance comparison the Porto-Large dataset when trained
with different data ratios. Red denotes the best result, and blue denotes the second- result.
Setting
Data Ratio
20%
40%
60%
80%
100%
Metne
Aoct%)
RMSE
Acc(%)
RMSE
Acct%)
RMSE
Aoc(%)
RMSE
Aoc(%)
RMSE
MTrujRec
58.41
473.1
59.47
439..3
60.74
392.2
61.13
378.2
61.87
362.1
Decoder
59.54
459.3
61.92
411.4
62.50
398.1
62.92
381.8
63.52
375.1
mminotes
12vee Deooder
59.30
449.7
62.19
4088.8
63.45
382.8
63.98
361.9
64.24
358.4
RNTnjKee
61.66
419.4
64,07
352.6
64,69
3.99.7
65.24
3,28,8
63.98
311.0
MM-STGED
63.82
361.7
65.11
328.3
65.79
313.7
66.37
302.1
66.56
296.3
PLMTrajRee
66.53
311.6
66.89
295.6
67.12
279.8
67.38
271.0
67.57
264.2
MTnijRee
62.12
418.9
64.58
372.0
65.10
359
66.04
332.4
66.85
320.5
T3s + Decoder
63:49
391.7
64.68
366,7
66.22
348.6
66.79
355.9
67.39
324.9
A minutes
12xce + Daodeer
63.94
402.4
66. 70
352.2
62.21
320.6
68.41
$16.9
68.88
308.
RNTrajeee
64.19
358.0
67.33
340.0
67.81
331.2
68.30
304.8
68.88
256.6
MM-STGED
70.03
P.MMTrajRee
MTnujRee
69.10
71.48
318.9
71.98
264.0
72.31
238.2
72.63
216.5
+ Decoder
68.82
366.3
70.90
327.6
70.89
271.6
71.11
71.31
p= minute
Decoder
RNTrujRec
PLM.eajeee
J
Case Study
conduct case study on the Chengdu-Small dataset to visualize the trajectory recovery perfor- mance with various baselines. As shown in Figure 7 we draw the truth and recovered trajectory, where red points represent the truth trajectory points and blue points indicate the recovered trajectory points. We find that the recovered trajectory aligns well with the road network, demonstrating the effectiveness of using road segment and moving rate to represent trajectory point. To facilitate distinct
more intuitive comparison of recovery performance among different models, focus regions, labeled as A and B, for visual analysis. In region A, characterized by a relatively simple road network structure, all models maps trajectory points better by leveraging PLM. In contrast, region B exhibits a more intricate road network with multiple accessible routes. RNTrajRee captures spatial-temporal correlations of trajectories that are not adequate and recovers incorrect road segments. PLMTrajjRec not only excels in road segment recovery but also in accurately matching the actual trajectory points. This success can be attributed to its ability to model missing trajectory points through the implicit trajectory prompt, thereby introducing more valuable information and improving performance.
accurately recover road segments. Among them, PLMTrajRec
26

---

Ground Truth
RNTrajRec
B
MM-STGED
PLMTrajRec
B
B
Figure 7: Case study on the Chengdu- Small dataset. Red points represent the truth trajectory points and blue points represent the recovered trajectory points.
27


Reviews:
[{"review_id": "4WtsWw2gDY", "reviewer": "Reviewer_mGi6", "summary": "This paper proposes PLMTrajRec, a novel method for recovering missing points in sparse trajectory data using Pre-trained Language Models (PLMs). It leverages the scalability of PLMs and structured prompts to generalize across various sampling intervals and limited dense data. The model incorporates Dual Trajectory Prompts and an Interval-aware Trajectory Embedder, which unifies trajectories to a fixed interval and extracts features using learnable spatial encodings and road condition estimation. A message-passing-inspired mechanism is used to infer road conditions at missing points using nearby observed points. Experiments on four public datasets demonstrate superior performance, scalability, and generalization compared to baselines.", "questions": "Please refer to the weakness section.", "limitations": "yes", "rating": 4, "confidence": 2, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 2, "originality": 3, "strengths_and_weaknesses": "Strengths\n\n- **Novel Integration of PLM for Map-Matched Trajectory Recovery**: The attempt to apply Pre-trained Language Models (PLMs) to the map-matched trajectory recovery task is highly novel. Unlike prior works that mainly rely on sequence models or graph-based approaches, this paper leverages the powerful sequence modeling capabilities and pretrained knowledge of language models, which is an original idea.\n- **Thoughtful Design for Key Challenges**: The methodology is well-designed to address three core challenges: data scarcity, varying sampling intervals, and road condition inference.\n    - PLM scalability mitigates the limited data problem.\n    - An interval-aware embedder and explicit prompts effectively handle various sampling intervals (generalizability).\n    - Implicit prompts and the road condition passing mechanism enable inference of road conditions at missing points.\n    \n    These components are logically integrated and well-motivated.\n    \n- **Reproducibility**: The authors provide code and dataset access, enhancing the reproducibility of the results.\n- **Comprehensive Experimental Evaluation**:\n    - **Multiple Datasets & Scales**: The model is evaluated on four public datasets with different city types and scales, showing its general performance.\n    - **Various Sampling Intervals**: Experiments cover three different sampling intervals (4min, 2min, 1min), systematically validating the model’s ability to handle varying temporal sparsity.\n    - **Targeted Studies**: The paper includes well-designed experiments to highlight core strengths, such as scalability studies (training with limited data) and zero-shot studies (testing on unseen intervals).\n\nWeaknesses\n\n- **Lack of Deep Justification for PLM’s “Language” Capability in Trajectory Tasks**: The paper may lack a deeper explanation of *why* PLMs are effective for trajectory recovery beyond their strength as general sequence encoders. It would be helpful to analyze what aspects of trajectory data align with PLMs’ language modeling abilities—do the prompts facilitate any kind of linguistic reasoning, or are they merely embedding manipulators? Currently, the model may be perceived as simply utilizing PLM as a strong sequence encoder without fully exploiting its “language understanding” capabilities.\n- **Dependence on Road Network Structure**: Since the model’s output is directly tied to road segment IDs and segment-level positioning, it raises concerns about the model’s dependence on a specific road network structure. For example:\n    - How would the model perform on regions with entirely different road network structures (as hinted at in Appendix A.1)?\n    - What happens if the road network evolves over time?\n    \n    There is potential for significant performance degradation in such cases.\n    \n    Additionally, it’s worth questioning whether the core ideas of PLMTrajRec—such as PLM usage, trajectory prompts, and interval-aware embedding—can be transferred to **free-space trajectory recovery** settings, where road network information is not available. Some parts of the model (e.g., output layer design and certain feature extraction steps) seem tightly coupled to road network structure. It would be valuable to hear the authors’ perspective on the adaptability of PLMTrajRec to free-space scenarios.", "was_revised": true, "final_justification": "I believe the rebuttal has properly addressed my concerns, and since there is consensus among the reviewers, I will maintain my original rating.", "rebuttal": "Thank you for your insightful feedback! We are grateful for your acknowledgment of our task settings and novelty. Below, we address each of your concerns and questions in detail:\n\n\n\n> [W1.1] The paper may lack a deeper explanation of why PLMs are effective for trajectory recovery beyond their strength as general sequence encoders. \n\nWhile trajectories are not conventional language texts, they share substantial structural similarities with natural language that make PLMs well-suited for trajectory recovery. A trajectory can be analogized to a sentence, where each trajectory point corresponds to a word. The spatiotemporal dependencies between trajectory points mirror the contextual dependencies between words in a sentence. Movement patterns such as turning and acceleration correspond to semantic relationships between words. Trajectory recovery resembles a cloze-style task in NLP, where missing tokens must be inferred from surrounding context. These parallels enable PLMs to leverage their pre-trained knowledge and reasoning capabilities to extract trajectory semantics, enhancing generalization in sparse data scenarios.\n\n\n\n> [W 1.2] It would be helpful to analyze what aspects of trajectory data align with PLMs’ language modeling abilities—do the prompts facilitate any kind of linguistic reasoning, or are they merely embedding manipulators? Currently, the model may be perceived as simply utilizing PLM as a strong sequence encoder without fully exploiting its “language understanding” capabilities.\n\nGiven the similarities between trajectories and natural language, we use natural language prompts to activate the PLM's reasoning abilities for trajectories. Our IF-guided explicit trajectory prompts inform the PLM about the task objective, expected output format, and key trajectory features including start/end times and total movement distance. These prompts provide task-oriented descriptions that guide trajectory recovery, functioning beyond simple token manipulation. The AF-guided implicit prompts encode road condition dynamics that influence vehicle movement—for example, vehicles decelerate in congested areas and move steadily in free-flowing regions. PLMs can leverage their pre-trained temporal and behavioral priors to interpret this information.\n\nMoreover, since PLMs are not inherently trained for trajectory data, we introduce learnable reference tokens $\\textbf{E}_w$ in Section 4.2.3 to bridge the gap between natural language and structured trajectory features. These tokens facilitate semantic alignment and enable PLMs to better integrate spatiotemporal representations into their language-centric framework.\n\nOur ablation studies (as shown in Table 4) confirm the importance of both trajectory prompts and reference tokens; removing them significantly degrades performance. \n\n\n\n> [W2] The model’s dependence on a specific road network structure. And what happens if the model transfer to entirely different road network structures, or the road network evolves over time.\n\nWe appreciate this important concern. In map-matched trajectory recovery, modeling trajectory and road network interactions is crucial for accurate recovery. Like prior work including MTrajRec [22], RNTrajRec [5], and MM-STGED [33], our model utilizes road network structure to better understand how trajectories move through the map.\n\nAs we stated in Appendix A.1, PLMTrajRec's key limitation is its reliance on fixed road segment IDs for output classification. This design couples the model to a specific road topology, making it technically infeasible to directly apply a trained model to the different road networks or evolved network structures. While PLMTrajRec cannot achieve zero-shot transfer across road networks, it supports few-shot transfer through its scalability and generalization capabilities. Our experiments (Table 2 and Appendix I, Tables 7-9) show the model maintains competitive performance with only 20% of training data, demonstrating robustness in few-shot scenarios. In practice, this enables quick adaptation to changed or evolved road networks.\n\nIn future work, we plan to develop universal or topology-independent road segment embeddings that decouple the output space from specific road networks, enabling broader generalization across different road networks or evolving regions.\n\n\n\n> [Q] The adaptability of PLMTrajRec to free-space scenarios.\n\nWe appreciate this thoughtful question. The core ideas of PLMTrajRec can indeed be transferred to free-space trajectory recovery. Free-space trajectory recovery faces similar challenges: limited dense trajectory data and the need to generalize across varied sampling intervals. PLMTrajRec specifically addresses these challenges through PLMs and interval-aware embeddings, which naturally extend to free-space settings. Our prompt design encodes task instructions, sampling intervals, and trajectory features (temporal duration and movement distance) that are independent of road network constraints and transferable to free-space recovery.\n\nPLMTrajRec requires only minimal architectural modifications for free-space trajectory recovery. The key difference lies in output format: map-matched recovery outputs road segment IDs and moving rates, while free-space recovery outputs GPS coordinates. This is accommodated by modifying only the output layer, replacing road segment IDs and moving rates with latitude/longitude coordinates, and changing the loss function to coordinate-based MSE loss. Our experiments (as shown in Table 1) show that combining free-space models like TERI and TrajBERT with our map-constrained output layer yields good results.\n\nWhile both approaches improve trajectory data quality, we believe map-constrained recovery is more practical for real-world applications. Vehicles typically travel along roads, and map-constrained recovery directly reflects vehicle behavior on the road network. Free-space recovery requires additional map-matching steps to relate predicted points back to the road network."}, {"review_id": "HFZysk0xbM", "reviewer": "Reviewer_pB4W", "summary": "This paper addresses the problem of recovering missing points in sparse spatiotemporal trajectories, which is crucial for traffic-related applications but challenged by sparse data, varying sampling intervals, and difficulty in modeling dynamic road conditions. The authors propose PLMTrajRec, a trajectory recovery method that leverages a pre-trained language model (PLM) to overcome these challenges. Their contributions include: (1) Designing dual trajectory prompts (explicit and implicit) that encode sampling intervals, movement features, and road conditions into formats understandable by a PLM. (2) Introducing an interval-aware trajectory embedder that standardizes trajectories with diverse sampling intervals. (3) Proposing a road condition passing mechanism to estimate road conditions at missing points. Extensive experiments on four real-world datasets demonstrate the method’s effectiveness, scalability, and generalization, outperforming existing baselines, especially in low-data and zero-shot settings.", "questions": "1. The ablation compares different PLMs but does not deeply explore why encoder-only PLMs outperform others for this task. Could the authors elaborate on how task-specific needs (e.g., bidirectionality, context length) drive this choice, and how sensitive the performance is to PLM size and architecture?\n\n2. The paper demonstrates good scalability to low-data settings, but at the cost of increased inference time and memory. Are there scenarios (e.g., edge devices, real-time applications) where this trade-off becomes prohibitive? Could the authors discuss potential ways to further reduce the footprint?\n\n3. The design of the dual prompts is clever, but it’s not clear how sensitive the method is to the exact prompt format and content. Have the authors explored alternative prompt formulations, or can they recommend guidelines for constructing effective prompts in similar tasks?", "limitations": "See in weakness", "rating": 4, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 3, "originality": 3, "strengths_and_weaknesses": "Strengths\n1. This work tackles an important and practical problem with real-world implications in transportation systems, urban planning, and mobility analytics.\n\n2. The paper is technically solid, proposing several thoughtful innovations (e.g., dual prompts, interval-aware embedding, and road condition passing) that are well-motivated and clearly explained. \n\n3. The paper is clearly written and well-organized, making the methodology and experiments easy to follow. \n\nWeaknesses\n1. The method introduces additional computational and memory overhead compared to some baselines, which is mitigated but not fully eliminated by LoRA fine-tuning. \n\n2. Some details, such as the choice of PLM (why BERT over GPT or Llama) and sensitivity to the choice of PLM, are discussed but could benefit from deeper empirical analysis.\n\n3. While the paper discusses broader impacts in the appendix, the main text could highlight more explicitly potential societal risks (e.g., privacy, misuse of mobility data).", "was_revised": true, "final_justification": "The current rebuttal is sufficient to resolve my main reservations. Since I had already given a positive score, I am inclined to maintain my current rating.", "rebuttal": "Thank you for your insightful feedback! We are grateful for your acknowledgment of our task settings and novelty. Below, we address each of your concerns and questions in detail:\n\n> [W1 & Q2] The method introduces additional computational and memory overhead compared to some baselines, and discussing potential ways to further reduce inference time and memory.\n\n\n\nWhile PLMTrajRec has a relatively large parameter count, LoRA fine-tuning mitigates this issue. Only approximately 35% of parameters are trainable while the rest remain frozen, making the effective model size increase modest compared to full fine-tuning. The performance gains justify this trade-off in most settings. To further reduce overhead, we deliberately select a lightweight PLM architecture. As described in Appendix D.2, we use BERT-small with only 4 Transformer layers and a hidden size of 512. This significantly reduces inference time and memory footprint, making it suitable for resource-constrained settings.\n\nWe acknowledge that PLM-based models still incur overhead that could be prohibitive in extreme low-resource scenarios. Several optimization techniques can address this: (1) Model quantization, converting floating-point parameters (FP32) to lower-bit integers (INT8/INT4) or removing less important weights/neurons to reduce parameter count and computation; (2) Knowledge distillation, where a lightweight student model is co-trained to mimic the PLM teacher's trajectory representations, enabling efficient inference while maintaining generalization. These strategies show great potential for extending PLMTrajRec to wider deployment scenarios.\n\n\n\n> [W2 & Q1] More discussion about the choice of PLM and sensitivity to the choice of PLM.\n\n\n\nWe thank you for this helpful suggestion. Our choice of encoder-based PLM architecture is motivated by the trajectory recovery task's requirements. Recovering missing trajectory points requires understanding both past and future context. BERT's bidirectional encoding is well-suited for this need, allowing the model to jointly consider information from both directions. In contrast, decoder-only PLMs like GPT and LLaMA process tokens unidirectionally, relying only on left-to-right context. While advantageous for autoregressive generation, this limits their ability to incorporate future information, which is critical for accurate trajectory recovery. Our ablation studies (as shown in Table 4) show PLMTrajRec consistently outperforms decoder-only PLMs under identical training conditions.\n\nRegarding model size sensitivity, we experimented with larger BERT variants (BERT-base and BERT-large). Performance gains were limited relative to the increase in parameter count and inference cost. BERT-small, with only 4 layers and 512-dimensional hidden states, offers a favorable performance-efficiency trade-off, making it suitable for training and deployment in low-resource settings.\n\n\n\n> [W3] While the paper discusses broader impacts in the appendix, the main text could highlight more explicitly potential societal risks (e.g., privacy, misuse of mobility data).\n\nThe trajectory recovery task enables data collectors to store and transmit only sparsely sampled or partially masked trajectories, mitigating privacy exposure. Using PLMTrajRec to recover dense trajectories when needed reduces the amount of sensitive raw data retained or exposed. Nevertheless, any system capable of reconstructing dense mobility data carries misuse risks, such as surveillance or unauthorized profiling. We recommend deployment only in controlled environments with full anonymization.\n\n\n\n> [Q3] The design of the dual prompts is clever, but it’s not clear how sensitive the method is to the exact prompt format and content. Have the authors explored alternative prompt formulations, or can they recommend guidelines for constructing effective prompts in similar tasks?\n\nIn our pre-experiments, we explored several prompt formulation variants on Chengdu dataset with sampling interval of 2 minutes. Initially, prompts included only the task objective and expected output format (Task Part and Target Part). We then gradually added contextual information: sampling intervals of sparse and dense trajectories (Context Part), and trajectory-specific characteristics like time span and total movement distance (Time Part and Movement Part). This incremental enhancement led to our final prompt formulation. As shown below, the experiment results demonstrate that semantically richer content consistently improved performance, indicating that informative prompts more effectively activate PLM reasoning abilities.\n\n|                                                       | Acc   | Recall | Prec  | MAE   | RMSE  |\n| ----------------------------------------------------- | ----- | ------ | ----- | ----- | ----- |\n| base (prompt with Task and Target Part)               | 81.47 | 84.07  | 87.94 | 197.3 | 379.2 |\n| base + Context Part                                   | 81.66 | 84.20  | 88.17 | 191.7 | 371.0 |\n| PLMTrajRec (base + Context Part + trajectory Feature) | 81.76 | 84.31  | 88.38 | 187.4 | 366.2 |\n\nBased on these observations, effective prompt design should align with task structure and semantic context. Specifically, effective prompts should: 1) Clearly define the task goal (Task Part); 2) Describe input conditions like sampling sparsity (Context Part); 3) Provide relevant trajectory statistics such as time range and movement distance (Time Part and Movement Part); and 4) Specify desired output representation like full trajectories or road segment IDs (Target Part). Integrating these elements helps PLMs better understand both input and expected output, improving performance. This structured design may generalize to other related tasks."}, {"review_id": "4KXiI9mgdE", "reviewer": "Reviewer_huba", "summary": "This paper introduces a method entitled PLMTrajRec which tries to recover missing points in sparse trajectories. \n\nThere are three challenges in this task: 1) lack of datasets; 2) different sampling intervals of input trajectory data are hard to recover due to complex and dynamic spatiotemporal traffic conditions; 3) extracting road information for missing points is challenging.\n\nTo tackle the three problems, the authors 1) use pretrained language models (PLM) as backbone which equipped with human common sense and relieve the lack of data; 2) introduce an interval and feature-guided (IF-guided) explicit traejctory prompt to provide the sampling interval information to PLM, and also use a \"Trajectory Interval Unification\" module to gaurantee that each two points in the input trajectory has a same sampling interval; 3) design an area flow-guided (AF-guided) implicit trajectory prompt to provide dynamic traffic flow information for PLM, and also a road condition passing mechanism to retrieve relevant road condition for missing points to be recovered.\n\nThe authors test their model on four datasets, and the results show PLMTrajRec and its variant gets the best score on the metrics of Accuracy, Recall, Precision, Mean Absolute Error (MAE), and Root Mean Square Error (RMSE).\n\nThe authors conducted a solid ablation study to verify the effectiveness of each module. Besides, the authors also provide experiments to contrast the zero-shot ability between PLMTrajRec and other methods. Finally, the authors also provide efficient analysis to show computation  costs of the model.", "questions": "1.Questions\na.Line 197, you mentioned a function $f(d_{s, l})$ which seems to map the distance between a point and a road segment to a number (larger distance, smaller value of the number). So, does the function actually function as the weight to obtain $h_s^{road}$? And why use a \\textbf{ransomly initialized vector} (line 200)? Is the vector fixed or leaned?\nb.Line 223-226. You mentioned you use \"self-attention\", but $H'$ acts as the query, and $E_w$ serves as both key and vlue. In my understanding of attention, you may use cross attention instead of self-attention.\nc.Line 228 and Figure 2. You said you incorporated the Transformer position embedding PE into \\textbf{each} element of $Z$. 1) I hope you can provide more information about the position encoding you used. Is PE something about \"Learnable Fourier Features\" you mentioned in Appendix F? 2) In Figure 2, it seems that PE is a token instead of auxiliary embeddings for each token.\nd. Line 208-211. You only collect information for two points (the nearest observed forward and backward trajectory points), what do you think of extracting the information of the road between the two points? Will that be helpful?\n2.Writing Suggestions\na.The format should be consistent in section Preliminaries. The first words of Line 99, 103, 107, 113.\nb.More visualization and information about your method is helpful for understanding. Although the authors provide visualization in appendix, I do not see any link to Appendix K. I hope the author can add some links to the paper so that readers can see the visualization of the model result. I also suggest the author can provide an example of raw prompt and LLM output in appendix, that helps readers understand your tasks.", "limitations": "yes", "rating": 5, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 3, "originality": 2, "strengths_and_weaknesses": "1.Quality: This paper proposed a new method, provided detailed information and background of method. The author also provided code for reproducing. Also, the author provides rich and solid experiments to verify the rationality and effectiveness of the proposed method.\n2.Clarity: The paper is well organized, and provide link to appendix in each place that need extra information. However, in some place, the logic maybe not clarified.\n3.Significance: This paper tries to propose a method to solve the problem of recovering missing points in trajectories. The model can be applied in ride-hailing applications, provide more accuracy information for consumers and administrator. The results on the test set show the potential to utilize this method.\n4.Originality: Using PLM for Spatiotemporal data-related downstrained tasks is not a new thing. The authors should further elaborate on the common methods in related fields and clarify the innovations of this study.", "was_revised": true, "final_justification": "I believe the quality of this paper is good, and the rebuttal has addressed the issues I raised. I will raise my score to accept.", "rebuttal": "Thank you for your insightful feedback! We are grateful for your acknowledgment of our task settings and insightful analysis. Below, we address each of your concerns and questions in detail:\n\n> [W] The authors should further elaborate on the common methods in related fields and clarify the innovations of this study.\n\nWhile PLMs have been explored in certain spatiotemporal applications, their use in trajectory recovery remains limited. Some existing LLM-based models for trajectory-related tasks, such as TrajCogn [1] and Mobility-LLM [2], primarily focus on extracting movement intentions from existing trajectory features to better understand and represent the trajectory. However, in the trajectory recovery task, only a subset of trajectory points is observed, making it challenging to infer rich movement patterns or spatiotemporal semantics from such sparse information. Moreover, these models typically adopt a decoder-only architecture for trajectory learning. As demonstrated in our ablation experiments, using a decoder-only structure (e.g., GPT-2 or LLaMA) results in reduced recovery accuracy. This is because trajectory recovery requires access to both preceding and succeeding context simultaneously. In contrast, decoder-only models follow a left-to-right autoregressive design, which limits them to leveraging only past information, failing to incorporate future context.\n\nExisting trajectory recovery approaches primarily focus on capturing trajectory spatiotemporal features for improving accuracy. For instance, MTrajRec leverages GRU-based sequential encoders and autoregressive decoding to recover trajectories. RNTrajRec emphasizes modeling the spatial interactions between trajectory points and the road network using a Transformer architecture. MM-STGED incorporates semantic features by encoding trajectories as spatiotemporal graphs. Although these methods perform well, they generally assume access to abundant training data with consistent sampling intervals.\n\nHowever, it is challenging to obtain large-scale, high-quality trajectories in real-world situations. Therefore, our key innovation is explicitly designed to address two critical but underexplored challenges: (1) recovering trajectories with limited training data, and (2) generalizing to trajectories with varying sampling intervals. And we address them by leveraging PLMs’ broad general knowledge to mitigate the lack of domain-specific supervision. This enables our model to effectively handle data-scarce and sparse scenarios. Our experimental results support this claim, as shown in Tables 2, 3, 7, 8, and 9.\n\n\n\n[1] Zhou Z, Lin Y, Wen H, et al. TrajCogn: Leveraging LLMs for Cognizing Movement Patterns and Travel Purposes from Trajectories[J]. arXiv preprint arXiv:2405.12459, 2024.\n\n[2] Gong L, Lin Y, Lu Y, et al. Mobility-llm: Learning visiting intentions and travel preference from human mobility data with large language models[J]. Advances in Neural Information Processing Systems, 2024, 37: 36185-36217.\n\n\n\n> [Q1.a] Line 197, you mentioned a function $f(d_{s,l})$,which seems to map the distance between a point and a road segment to a number (larger distance, smaller value of the number). So does the function actually function as the weight to obtain $h_s^{road}$. And why use a randomly initialized vector (line 200)? Is the vector fixed or leaned?\n\nYes, the function $f(d_{s,l})$ represents the weights of trajectory points to road segment $l$ according to their distance, and these weights are used to calculate $\\mathbf{h}\\_s^{\\text{road}}$. For a trajectory point $s$, the calculation formula of $\\mathbf{h}\\_s^{\\text{road}}$ is:\n\n$\n\\mathbf{h}\\_s^{\\mathrm{road}} =  \\frac{ {\\sum\\_{l=1}^{|\\mathcal{V} |}} f(d\\_{s,l}) \\cdot \\mathbf{M}_l  }{\\sum\\_{l=1}^{|\\mathcal{V} |} f(d\\_{s,l})}\n$\n\nwhere $\\mathbf{M}_l \\in \\mathbb{R}^F$ is the learnable embedding of road segment $l$ , and $|\\mathcal{V}|$ is the total number of road segments.\n\nThe randomly initialized vector in line 200 is $\\mathbf{M}_l$. It is randomly initialized at the beginning and then learned during model training. We will clarify this in the revised version.\n\n\n\n> [Q1.b] Line 223-226. You mentioned you use \"self-attention\", but $\\textbf{H}'$' acts as the query, and $\\textbf{E}$ serves as both key and vlue. In my understanding of attention, you may use cross attention instead of self-attention.\n\nYou are correct. It is cross attention instead of self-attention. We will modify this in the revised version.\n\n\n\n> [Q1.c] Line 228 and Figure 2. You said you incorporated the Transformer position embedding PE into \\textbf{each} element of $Z$. 1) I hope you can provide more information about the position encoding you used. Is PE something about \"Learnable Fourier Features\" you mentioned in Appendix F? 2) In Figure 2, it seems that PE is a token instead of auxiliary embeddings for each token.\n\nWe apologize for the confusion caused by Figure 2. The positional encoding (PE) mentioned in Line 228 and Figure 2 refers to the standard positional encoding mechanism used in Transformer architectures. Our implementation adds PE directly to each token embedding in $Z$, consistent with conventional Transformer usage.\n\nFormally, the positional encoding is defined as:\n$$\n\\mathrm{PE}\\_{(pos,\\,2i)} = \\sin \\left (\\frac{pos}{10000^{2i/d\\_{\\mathrm{model}}}}\\right), \\quad\n\\mathrm{PE}\\_{(pos,\\,2i+1)} = \\cos \\left (\\frac{pos}{10000^{2i/d\\_{\\mathrm{model}}}}\\right),\n$$\nwhere $pos$ denotes the position index in the sequence, $i$ is the dimension index, and $d_{\\text{model}}$ is the model's embedding dimension (512 in our paper). $\\text{PE}(pos,k)$ represents the value at the $k$-th dimension for the token at position $pos$.\n\nThis is distinct from the learnable Fourier features described in Appendix F, which encode raw spatial coordinates (latitude and longitude) of trajectory points, as detailed in Section 4.2.2 Trajectory Feature Extractor. We will correct this in the revised version.\n\n\n\n> [Q1.d] Line 208-211. You only collect information for two points (the nearest observed forward and backward trajectory points), what do you think of extracting the information of the road between the two points? Will that be helpful?\n\n\nWe appreciate the reviewer’s thoughtful concern. To evaluate the effect of incorporating road network information between the two observed trajectory points, we conducted an additional experiment on Chengdu-Small with sampling interval of 2 minutes. In this variant, we constructed a representation of the missing point by weighting the road network features surrounding the two observed points.\n\n|                                  | Acc   | Recall | Prec  | MAE   | RMSE  |\n| -------------------------------- | ----- | ------ | ----- | ----- | ----- |\n| with road network                | 81.68 | 84.23  | 88.15 | 191.2 | 373.5 |\n| PLMTrajRec (with road condition) | 81.76 | 84.31  | 88.38 | 187.4 | 366.2 |\n\nAs shown in Table above, this modification led to slightly degraded performance compared to our original approach. We believe this is due to feature redundancy, as the road network information of the surrounding trajectory points has already been encoded during the trajectory point embedding stage (as shown in Line 195-202). Reintroducing similar road features may lead to overlapping or redundant signals, which in turn may hinder effective learning. Moreover, trajectories are inherently dynamic, and movement patterns in the same location can vary significantly across different times of day. In contrast, the road network is static and does not capture temporal variations. Therefore, we argue that incorporating time-dependent traffic road condition information is more effective than relying solely on static road network between points.\n\n\n> [Q2.a] The format should be consistent in section Preliminaries. The first words of Line 99, 103, 107, 113\n\nThank you for your careful observation. We will modify them in the revised version.\n\n\n> [Q2.b] Add more visualization of the model result and provide an example of raw prompt and LLM output in appendix.\n\nThanks for your suggestions. We will add more visualization examples.\nFor the example of raw prompt and LLM output, we have the following additions:\n\nConsider a sparse trajectory $\\mathcal{T} = \\langle p_1, \\cdots, p_{15} \\rangle  $ with 15 trajectory points with a sampling interval of 4 minutes, starting at 8 o’clock on Monday and ending at 9 o’clock on Monday. And the total movement distance is 40 kilometers. Our goal is to recover it within a sampling interval of 15 seconds; therefore, there are 240 output trajectory points (4 points per minute, totaling 60 minutes). According to this trajectory, our prompts are:\nTask Part: Sparse trajectory recovery. Target Part: Output the road segment and moving ratio for each point in the trajectory. Content Part: The sparse trajectory is sampled on average four minutes and aims to recover trajectory every fifteen seconds. Time Part: The trajectory started at eight o’clock on Monday and ended at nine o’clock on  Monday. Movement Part: Total time cost: sixty minutes zero seconds. Total space transfer distance: 40 kilometers.\n\nFor the output of the model, it should output the corresponding road segment ID $e_i$ and moving rate $r_i$ for each trajectory point, where $1\\le i\\le 240$​."}, {"review_id": "xKYKAJyQZv", "reviewer": "Reviewer_VuDY", "summary": "The paper introduces a novel trajectory recovery model PLMTrajRec to recover map-matched trajectory by fine-tuning a  pre-trained Language Model. By converting sampling intervals, movement features, and traffic flow into token sequences, the model unifies sparse trajectories of heterogeneous sampling rates and predicts both road-segment IDs and within-segment moving ratios. Experiments on four public datasets show outstanding gains of accuracy and RMSE compared to SOTA methods.", "questions": "See weakness.", "limitations": "Yes, the authors discuss the limitations in Appendix A.", "rating": 5, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 3, "originality": 2, "strengths_and_weaknesses": "Strengths\n\n(1) The work focuses on an interesting problem, extending pretrained language models to trajectory recovery and showing that generic PLMs's ability in spatio-temporal tasks.\n\n(2) This paper delivers a comprehensive evaluation on four real-world datasets and shows promising performance.\n\n(3) The architecture including the interval-aware embedder, dual prompts, and LoRA fine-tuning is clearly illustrated, and every module is justified through ablation studies.\n\n\n\nWeaknesses\n\n(1) The demonstration of third challenge (Figure 1) is confusing.\n\n(2) Experimentation on more cities could be considered.\n\n(3) Apart from the temporal granularity, the generalization ability of the method can be considered for zero-shot experiments between different cities.", "was_revised": true, "final_justification": "I carefully reviewed the authors’ rebuttal and the additional discussion. The new large-scale Xi’an dataset strengthens the performance.  Although zero-shot transfer across distinct road networks is technically infeasible with the current output space, the authors acknowledge this limitation and outline a plausible path toward topology-independent embeddings. Given the original strengths, I maintain an accept rating (5) and believe the paper meets the NeurIPS bar.", "rebuttal": "Thank you for your insightful feedback! We are grateful for your acknowledgment of our task settings and novelty. Below, we address each of your concerns and questions in detail:\n\n> [W1] The demonstration of third challenge (Figure 1) is confusing.\n\nWe apologize for the confusion caused by the third challenge illustrated in Figure 1. We would like to offer a clearer explanation:\n\nThe third challenge emphasizes the importance of capturing traffic conditions for both observed and missing trajectory points to ensure accurate recovery. For example, a vehicle may stop-and-go in congested zones, while moving faster in uncongested ones.\nFrom Figure 1, we can determine that the user may take route $R\\_1$ based on the road conditions of observed points $p\\_1$ and $p\\_4$ (Figure 1 (a); however, we cannot determine how the user travels within route $R\\_1$, such as whether they accelerate, decelerate, or drive at a constant speed. This information needs to be further extracted based on the road conditions of the missing points, $p\\_2$ and $p\\_3$. However, since the locations of these missing points are unknown, we cannot obtain their actual road condition information. Therefore, it is difficult to accurately infer the trajectory's movement. To address it, we propose a Road Condition Passing Mechanism, as shown in Lines 208-217. We will revise the figure caption and corresponding text to clarify.\n\n\n\n> [W2] Experimentation on more cities could be considered.\n\nWe have added a Xi'an trajectory dataset covering an area of 8.20 km × 7.98 km, which contains 3,392 road segments and 400,000 trajectories. The scale of the dataset is larger than Chengdu-Large. It is divided into training, validation, and test sets using a 7:1:2 ratio. The model settings remain consistent with those used for the other datasets, as described in the experimental settings. We conduct trajectory recovery experiments using a sparse sampling interval of 2 minutes, aiming to recover trajectories at 15-second intervals. \n\n|                  | Acc       | Recall    | Prec      | MAE       | RMSE      |\n| ---------------- | --------- | --------- | --------- | --------- | --------- |\n| RNTrajRec        | 70.58     | 70.63     | 71.38     | 166.3     | 274.3     |\n| MM-STGED         | 71.16     | 71.80     | 72.19     | 153.9     | 254.7     |\n| PLMTrajRec (our) | **73.29** | **74.11** | **75.28** | **117.4** | **173.1** |\n\nThe results show that our model outperforms the state-of-the-art map-constrained trajectory recovery methods, MM-STGED and RNTrajRec, on the Xi'an dataset in terms of both road segment recovery accuracy and spatial distance error. Specifically, our model improves accuracy by 2.13% and reduces RMSE by 81.6 meters. These results highlight the effectiveness of our model in trajectory recovery.\n\n\n\n> [W3] Apart from the temporal granularity, the generalization ability of the method can be considered for zero-shot experiments between different cities.\n\n\n\nWe appreciate this thoughtful concern. Zero-shot transfer between cities would indeed be valuable. However, as stated in Appendix A.1, PLMTrajRec's key limitation is its reliance on fixed road segment IDs for output classification. This design couples the model to a specific road topology, making direct application to different road networks technically infeasible.\n\nWhile PLMTrajRec cannot achieve zero-shot transfer across road networks, it supports few-shot transfer through its scalability and generalization capabilities. Our experiments (Table 2 and Appendix I, Tables 7-9) show the model maintains competitive performance with only 20% of training data, demonstrating robustness in few-shot scenarios.\n\nIn future work, we plan to develop universal or topology-independent road segment embeddings that decouple the output space from specific road networks, enabling broader generalization across different road networks or evolving regions."}]

Author rebuttal:

Meta-review: The paper received two borderline accept and two accept final recommendations. Reviewers agreed that applying a pre-trained language model for trajectory recover in traffic related applications is novel and valid. The authors provided a rebuttal. One reviewer raised the score to accept after reading the rebuttal. AC recommends to accept the paper
Decision: Accept (spotlight)