TransferTraj: A Vehicle Trajectory Learning Model for Region and Task Transferability
Authors: Tonglong Wei
Yan Lin
Zeyu Zhou
Haomin Wen
Jilin Hu
Shengnan Guo
Youfang Lin
Gao Cong
Huaiyu Wan
Venue: NeurIPS 2025 oral ()
Keywords: Spatio-temporal data mining
trajectory data mining
vehicle trajectory learning
Primary area: machine_learning_for_sciences
TL;DR: Propose a vehicle trajectory learning model capable of transferring across regions and tasks without retraining.

Abstract: Vehicle GPS trajectories provide valuable movement information that supports various downstream tasks and applications. A desirable trajectory learning model should be able to transfer across regions and tasks without retraining, avoiding the need to maintain multiple specialized models and subpar performance with limited training data. However, each region has its unique spatial features and contexts, which are reflected in vehicle movement patterns and are difficult to generalize. Additionally, transferring across different tasks faces technical challenges due to the varying input-output structures required for each task. Existing efforts towards transferability primarily involve learning embedding vectors for trajectories, which perform poorly in region transfer and require retraining of prediction modules for task transfer.

To address these challenges, we propose $\textit{TransferTraj}$, a vehicle GPS trajectory learning model that excels in both region and task transferability. For region transferability, we introduce RTTE as the main learnable module within TransferTraj. It integrates spatial, temporal, POI, and road network modalities of trajectories to effectively manage variations in spatial context distribution across regions. It also introduces a TRIE module for incorporating relative information of spatial features and a spatial context MoE module for handling movement patterns in diverse contexts. For task transferability, we propose a task-transferable input-output scheme that unifies the input-output structure of different tasks into the masking and recovery of modalities and trajectory points. This approach allows TransferTraj to be pre-trained once and transferred to different tasks without retraining. We conduct extensive experiments on three real-world vehicle trajectory datasets under various transfer settings, including task transfer, zero-shot region transfer, and few-shot region transfer. Experimental results demonstrate that TransferTraj significantly outperforms state-of-the-art baselines in different scenarios, validating its effectiveness in region and task transfer. Code is available at https://github.com/wtl52656/TransferTraj.

TransferTraj: A Vehicle Trajectory Learning Model for Region and Task Transferability
Tonglong ;ei'; Yan Lin"; Zeyu Zhou', Haomin Wen', Jilin Hu
Shengnan Guo Youfang Lin Gao Cong'. Huaiyu Wan 16
School of Computer Science and Technology, Beijing Jiaotong University, China Department of Computer Science, Aalborg University, Denmark Carnegie Mellon University
School of Data Science and Engincering, East China Normal University, China
5 Key Laboratory of Big Data & Artificial Intelligence in Transportation, Ministry of Education, China Beijing Key Laboratory of Traffic Data Mining and Embodied Intelligence, China CCollege of Computing and Data Science, Nanyang Technological University Eveitonglong zeyuzhou, guoshn, yflin, hywan)&bjtu. edu. cn, 1yan@cs aau. dk, haominwedandrew edu jlhu@dase ecnu. edu. en, gaocongentu. edu. sg
Abstract
Vehicle GPS trajectories provide valuable movement information that supports various downstream tasks and applications. A desirable trajectory learning model should be able transfer across regions and tasks without retraining, avoiding the need to maintain multiple specialized models and subpar performance with limited training data. However, each region has its unique spatial features and contexts, which are reflected in vehicle movement patterns and are difficult to generalize. Additionally, transferring across different tasks faces technical challenges due the varying input-output structures required for each task. Existing efforts towards transferability primarily involve learning embedding vectors for trajectories, which perform poorly in region transfer and require retraining of prediction modules for task transfer.
To address these challenges, we propose TransferTraj, a vehicle GPS trajectory learning model that excels both region and task transferability. For region trans- ferability, we introduce RTTE as the main learnable module within TransferTraj, It integrates spatial, temporal, POI, and road network modalities of trajectories to effectively manage variations in spatial context distribution across regions. It also introduces TRIE module for incorporating relative information of spatial features and a spatial context MoE module for handling movement patterns in diverse contexts. For task transferability, we propose a fasstrransferable input- output scheme that unifies the input-output structure of different tasks into the masking and recovery of modalities and trajectory points. This approach allows TransferTraj to be pre-trained once and transferred to different tasks without re- training. We conduct extensive experiments on three real-world vehicle trajec- tory datasets under various transfer settings, including task transfer, zero-shot region transfer, and few-shot region transfer. Experimental results demonstrate that Transfer Traj significantly outperforms state-of- state-of-the-nn the-art baselines in different scenarios, validating its effectiveness in region and task transfer. Code available wttp:///ww112666//aaaafeeeeeeeee
at
"Both authors contributed equally to this rescarch.
I Corresponding author.
39th Conference on Neural Information Processing Systems (NcurIPS 2025).

---

Introduction
vehicle GPS trajectory is a sequence of (location, time) pairs that record a vehicle's 's movement. The widespread adoption of location-aware devices- as in-vehicle navigation systems and smart- phones-has led to the large-scale collection of vehicle trajectory data. This growing availability, together with increasing interest in intelligent transportation systems (TTS), encouraging the devel- opment of trajectory learning models that can perform various generative tasks to power woal-world applications in ITS., such trajectory prediction [38 42 39], trajectory recovery 26 36 34], travel
45 35 These tasks typically involve inputting trajectories with missing features or points and generating these missing components.
time estimation [37 43 24] 288. and trajectory generation
A common approach for addressing various trajectory generative tasks is to train a dedicated trajectory learning model for each region and task. However, this practice leads to substantial training costs and requires that each region have a large amount of available trajectory data to support model training. To mitigate these limitations, it is desirable develop trajectory learning model with both region and task transferability. This means it should be able to transfer across regions and tasks without retraining. For example, region transferability allows model trained in region A to work effectively in region B, while task transferability enables a model developed for trajectory prediction to also perform well for travel time estimation. This transferability has two key benefits. First, it eliminates the need to retrain and maintain multiple dedicated models, improving overall computational efficiency. Second, transferring a trained model to other regions or tasks with limited training data can be more effective than training from scratch. However, existing efforts have struggled to develop a trajectory learning model with effective region and task transfcrability due to the following challenges.
The challenge of region transferability arises from differences in spatial features and the distribution of spatial context (including POIs and roads) across regions, leading significant variations in vehicle movement patterns, such as turning patterns, accelerating behaviour, and movement directions. Specifically, each region has its own geographical size, which makes common spatial features standardization methods, such as normalization [41 31 and grid discretization [18 (39,, prone to producing inconsistent spatial scales across regions. Therefore, model trained the spatial features of one region cannot be directly applied to another. Moreover, trajectories with the same travel purpose across regions-such as trips from parks residential areas via main roads, indicating a shared purpose of returning home after leisure- their movement patterns often vary substantially due to the distribution difference of spatial context. These discrepancies prevent the direct transfer of movement patterns learned from one region to another.
The challenge of task transferability stems from the differences in input-output structures and the correlations learned for different tasks, making it difficult for a model to handle various types of tasks simultaneously. For instance, the trajectory prediction task involves generating future trajectory points based on historical trajectory sequences, focusing on learning sequential correlations between trajectory points. In contrast, the travel time estimation task predicts arrival time from origin to destination, emphasizing temporal correlations between origin-destination pairs and travel times. These tasks exhibit substantial discrepancies in their input-output structure and learned correlations. Existing efforts towards task transferability mostly adhere to the embedding strategy, which learns trajectory encoders for mapping vehicle trajectories into embedding vectors [1] 21
15 22 Although these embedding vectors contain movement information of trajectories, they still necessitate prediction modules for adaptation to downstream tasks, which require additional training and storage of parameters.
In this paper, we propose Transfer Traj, a trajectory learning model that be pretrained on one region and effectively transferred to other regions and various types of generative tasks. Transfer'Traj encompasses two core components: a Region- Transffrbaaee Trajectory Encoder (RTTE) and a task- transferable input-output scheme. RTTE enables Transfer Traj region transferability. It incorporates spatial, temporal, POI, and road network modalities of trajectories to discern differences in spatial context distribution across regions. Additionally, it includes a Trajectory Relative Information Extraction (TRIE) module for transferable modeling of relative relation in spatial features across different regions and a Spatial Context Mixture-od of -ffeeeests (SC-MoE) module to identify and share movement patterns under similar spatial contexts. The task-transferaale input-output scheme equips TransferTraj with task transferability by unifying the input-output structure of different generative tasks into the masking and recovery of modalities and trajectory points. Coupled with a pre-training mechanism, this approach enables TransferTraj to adapt to various tasks without retraining. We

---

evaluate the effectiveness of TransferTraj through extensive experiments on three real-world vehicle GPS trajectory datasets with diverse settings. In terms of task transferability, only with pre-training, TransferTraj outperforms the SOTA baselines by 7.94% to 20.18 20.18% across different tasks. And it achieves an average improvement of 83.70% and 33 33.68% in zero-shot region transferability.
Related Works
We categorize vehicle trajectory learning models into non-transferable and transferable, based on their ability to generalize across different regions or tasks.
Non-transferable trajectory learning models are typically trained in an end-to-end fashion for specific tasks and regions. For instance, trajectory prediction methods such as DeepMove [[O] HST-LSTM [17], and ACN [25] leverage Recurrent Neural Networks (RNN) [13 to capture sequential correlations in trajectories, while PreCLN 39 employs Transformers 30 for processing
vehicle trajectories. In the realm of trajectory recovery, methods like Trimpute
g and DHTR [33
capture spatiotemporal relationships of sparse trajectories to infer missing GPS coordinates, while MTrajRec [26). RNTrajRee [5], and MM-STGED [36] simultaneously recover missing points and map them to road networks. For
travel time estimation, approaches such as (4 estimate travel time using origin, destination, and departure time information. Although these methods are straightforward to implement, their limited transferability necessitates separate model designs and training for different tasks and regions, significantly increasing computational and storage demands.
TEMP 32 MURAT [191, DeepOD 43 and DOT
Transferable trajectory learning models primarily employ pre-trained embedding techniques to enable task transferability. Models such as trajectory2vec [41], 12vec [88, Trembr [1], START [15] and MMTEC [22 develop trajectory encoders that map vehicle trajectories into embedding vectors using pre-training techniques like auto-encoding [12] and contrastive learning [3]. Despite their versatility, these trajectory encoders still require additional prediction modules to generate task- specific predictions from the embedding vectors. Furthermore, they remain non-transferable across regions due inherent differences in spatial features and context distribution.
3 Preliminaries
Vehicle trajectory. A vehicle trajectory T is a sequence of trajectory points: T (pI. . Pn). where the number of points. Each point p; (Ing,, lat,, 4x) consists of the longitude Ing,, latitude lat,, and timestamp i, representing the vehicle's 's location at specific time.
POL A point of interest (POI) is significant geographical location with specific cultural, environ- mental, economic importance. We represent POI as / (Ing, lat, desc'), where Ing and lat denote the coordinates of the POI, and desc' is a textual description including the name, type, and address of the POI.
Road segment. We represent a road segment coordinates of the midpoint of the road segment, and desc" is a textual description including the name, type, and length of the road segment.
(Ing, lat, desc"), where Ing and lat denote the
Problem definition. Region and task transferable vehicle trajectory learning aims to develop a trajectory learning model fo with learnable parameters 0. Once pre-trained, this model should effectively transfer between trajectory datasets from different regions and accurately generate the required outputs for various tasks based on their inputs, without needing retrain the parameters 0.
4 Methodology
In this paper, we introduce TransferTraj, a trajectory learning model that excels in region and task the transferability. The framework of TransferTraj is shown in Figure It comprises two key components: Trajectory Encoder (RTTE) and trass-raafeeealle input-output scheme.
RTTE is the learnable module of TrajsferTraj. designed to achieve region transferabilityy It first maps each trajectory point into four distinct feature modalities: spatial, temporal, point of interest (POI), and road network. The inclusion of POI and road network modalities enables the model to capture
3

---

Modality Trajectory Peint
Region- Transferrbeee Trajectory Encoder (RTTE)
Ing [A5]
Spartal
XXL
Tryj ecctrry M Modality Predieen
Road Network
Atsention
Ourput
Modality
LTD
Modality
Masking
Pi
Roisani
Roct
Recovery
Park
Resodent
Tri--oontt
Misking
Pbaj
Rotation
Leamable ST
Traj-pount Recovery
Trajectory Point and Spatial Context
TRIE
SC-MoE
Figure 1: The framework of TrajsferTraj.
differences in spatial context distributions across regions. trajectory modality mixing layer then integrates these four modalities into latent vector representing the trajectory point. Next, the latent vectors are fed into I. stacked layers to extract trajectory features. Each layer contains a Trajectory Relative Information Extraction (TRIE) block and Spatial Context Mixture-of -fe-reettxtttstee- (SC-MoE) block. The TRIE block, inspired by RoFormer [29]. captures relative spatial relationships among trajectory points, preventing the model from becoming biased towards specific regions. The SC-MoE block dynamically selects appropriate movement pattern experts based on the local spatial context, allowing the model to adapt flexibly to diverse contexts.
The task traksrranserealle input-output scheme equips Transfer Traj with the flexibility to handle various tasks. It standardizes the input and output structure of different tasks by combining two approaches: masking and recovering modalities or trajectory points. In one approach, spatial or temporal modali- ties of trajectory point are masked in the input and then recovered in the output. In another approach, entire trajectory points are masked with special tokens in the input and subsequently recovered the output. This scheme enables TransferTraj to transfer seamlessly between tasks without re-training after the pre-training phase.
4.1 Region-Transferan Transferable Trajectory Encoder (RTTE)
We begin by representing each point p; in a trajectory T as a tuple of four modalities: spatial, temporal, POL, and road network, denoted as p; ((Ing, lat;), t,, P., R,). The POI modality P. = {1 dis(I, p.) S (dist is defined as the set all POIs lying within distance F of the trajectory point ps. Similarly, the road network modality R2 fr dis(r, p.) I g } the set of all road segments located within distance Pdiit of Pi.
4.1.1 Trajectory Modality Mixing
For the spatial modality, we compute each point's position relative the first point the trajectory, ie., (x,, 9:) = (Ing, Ing1, lat, - lat,). A linear layer is then applied to obtain the spatial modality embedding e E Rdd This approach preserves the scale variations different regions better than methods like min-max normalization
grid discretization. For the temporal modality, each timestamp 4 is represented by a 4-dimensional vector: day of the week, hour of the day, minute of the hour, and the time difference in minutes relative 41. These features encoded using a learnable Fourier encoding layer (20] and then projected into a d-dimensional embedding e/. For the POI and road network modalities, we utilize a pre-trained text embedding mode to encode the textual descriptions of POIs and road segments. The resulting embeddings are processed via mean pooling and linear transformations to obtain needddimesiional vectors, denoted as ei E Rd and e E R This approach enables the model capture region-indepena independent semantic information, enhancing its transferability across different geographic areas.
Next, the latent vectors of the four modalities at each trajectory point are organized into a sequence of length and fed into the Transformer. This is followed by mean pooling layer that merges information across modalities to compute the embedding vector e, E Rd for trajectory point pi.
https://platform: http:///oo..oopppaoooooooo/////s httpaaaa././//////g////////eeeae

---

Following this, the mixed embedding vectors are passed through L stacked identical layers to capture correlations among trajectory points, Each layer comprises a TRIE block and a SC-MoE block. The output of the (1 )-tth layer serves as the input to the 1-th layer. The first layer receives the sequence of embedding vectors for all trajectory points, formulated as (ei.... en), where the number of points. We use the first layer as an example to describe the TRIE and SC-MoB blocks in detail.
4.1.2 Trajectory Relative Information Extraction (TRIE)
To capture the spatiotemporal dependencies among trajectory points while enabling transferabilityy across regions, we propose modeling the correlations between trajectory points' embedding vectors and relative spatial information simultaneously. Extracting this relative information prevents the model from becoming biased towards specific regions, thereby providing region-transserable approach for handling spatial features.
Specifically, for a trajectory point with spatial modality (z, y). we first generate its spatial representa- tion vector & (xr y) = W (allly) through learnable linear transformation, where || denotes vector concatenation and Wa a E Rd/2x2 is a learnable projection matrix. We then introduce a learnable spatio-temporal rotation matrix to encode spatial information, calculated as follows:
Foos ()).
-s.. v)0; cos do g16
sin de g116
(a
E R ddd
(1)
dura v/0 -snn oeral 2/60/2 duy (x. 800
cos dhyye pllayy
where ox (z, y) the k-th element of 4 y). 0,, 02.02....... 02.00................. 0a/2 are frequency weights, and 02 10000-2A0 22/dd_
Next, we apply the rotation matrix to query q, and key kj in the attention mechanism to model the relationships between embeddings e, and Bj. Formally,
q: R.((..))) W qe:.
ky- = (R) Wee,,
Vj Weej,
(2)
where W, E Rddd We E IRdxd, and W. E Raxd are mapping matrices. Following this, we implement the attention mechanism for the input sequence and calculate the i-th hidden state as h,.
Through the above process, our TRIE addresses regional transferability with two key advantages: (I) TRIE enhances the model's understanding of relative spatial information by naturally considering the true relative distances ((r; Ty, y: yU) between trajectory points during attention computation through rotational mechanism. A detailed proof of this enhancement is provided in Appendix C (2) By leveraging the continuous and periodic nature of trigonometric functions in the learnable spatiotemporal rotation matrix, TRIE can generalize trajectories longer than those seen during training and capture their relative information effectively.
4.1.3 Spatial Context Mixture-of-Experee (SC-MoE)
To effectively capture the movement patterns of trajectories, we observe that such patterns strongly influenced by the spatial context. For instance, highways and regions with sparse Points of Interest (POIs) typically correspond to high-speed, straight-line movement, whereas dense POI areas with complex road networks often result in stop-and-go behavior. While the global distribution of spatial context differs between regions, there exist similar local spatial contexts. Motivated by this observation, we introduce a Spatial Context Mixture of Experts (SC-MoE) that integrates multiple experts to model diverse movement patterns under different spatial contexts, while learning similar movement patterns in similar contexts. Specifically, given the learned trajectory point embedding h; in the TRIE layer and the modality embedding e,, the output of SC-MoE is:
h ES=,,, G,,, + F, + +e),
where G(-) denotes the gating network and (-) denotes the output of the j-th expert network, each expert network is implemented by two MLP layers. There are a total of C' expert networks, each with separate parameters, and the gating network outputs C-dimensional vector.
To prevent the movement patterns from being represented by the same set of experts and to explore better expert combinations in varying contexts, we implement noisy top-K gating (27) before applying
5

---

the softmax function in the gating network. This mechanism routes each spatial context to the most suitable experts, guided by the gating network, thereby distinguishing movement patterns across different contexts. The noisy top-K gating for the trajectory point is formulated as:
G(h, e.) Softmax(Toop((FF)
+ (e),,)),
H(h; + e;l; = ((hi + ex) W) + (N 1) Softplus(((h; + e;) Wnoise)s),
TopK(a, k), aj if ay is in the top k elements of a
-00
otherwise.
After stacking L TRIE and SC-MoE layers, we obtain the latent vector of the trajectory point ps. denoted as 2;. We then feed z; into the trajectory modality predictor to predict the trajectory point's spatial and temporal modalities.
4.1.4 Trajectory Modality Predictor
We use linear projection layer to predict the i-th trajectory point's spatial modality (d.. 0s) and obtain the coordinates (Ing,, lat,) by adding the coordinates of the first point. For the temporal modality,
linear projection layer followed by Softplus activation predict the temporal features é, To supervise the predicted modalities, apply the Mean Squared Error (MSE) loss function to the predicted spatial and temporal modalities, formulated as follows:
C (f: =xa)² + (ū -
C = || t:/l2
(5)
4.2 Task-Trrnsferable Input-Output Scheme
To enable task transferability, we standardize the input-output structure of various generative tasks, allowing seamless adaptation across different tasks. Our approach combines two methods: 1) masking a specific modality of a single trajectory point in the input and recovering it in the output, and 2) masking entire trajectory point from the input using special mask point and subsequently recovering it in the output.
Given a trajectory point p. ((ngg lat;), f4, P., R.) with its four modalities, we can mask either the spatial or temporal modality. point with masked spatial modality is represented as p! ([m), 42, [m]] (m])), where the spatial, POI, and road network modalities are replaced by the special mask token [m]. Note that since the POI and road network modalities are linked to the spatial modality, masking the spatial modality necessarily masks these associated modalities well. Similarly, point with a masked temporal modality is denoted as pfa = ((Ig,, lat,), [m]] P,, R.). The fully masked masked, is represented
trajectory point, where all modalities The masked modalities in p!"s, p, or Pim] then recovered in the corresponding output of the trajectory modality predictor module at the same time step, denoted as p..
P[m) ([m]), [mm], [m]] [m]).
Pre-training with the scheme. We propose to pre-train TransferTraj with mixture of the above two masking and recovery approaches, enabling it to transfer effectively between tasks without requiring re-training. Given trajectory T in the pre-training dataset, we first randomly select the starting point s and ending point e for sub-trajectory masking from a uniform distribution (1, n). where n the trajectory length and < For each trajectory point in the selected sub tub-trajectory, (p.. Pst1..... .P). complete trajectory point masking is applied in the input, and these points must be fully recovered in the output. For the remaining trajectory points in the input, P1.... . PP--i. Pe.tl....... ........... Pr. we randomly mask either their spatial or temporal modalities with an equal probability, and task the model with recovering these masked modalities in the output. Finally, the pre- veeiirining loss for trajectory T is computed as the sum of reconstruction losses across all masked and recovered modalities.
Ps-1-
By integrating our modality and trajectory point masking and recovery scheme with the pre-training procedure, TransferTraj can adapt to various tasks without retraining.
Experiments
To evaluate the performance of our proposed model, we conduct extensive experiments on three real- world vehicle trajectory datasets across three generative tasks: Trajectory Prediction (TP), Trajectory Recovery (TR), and Origin-Destinall Travel Time Estimation (OD TTE).

---

The TP task aims to forecast the future segment of trajectory given its historical seg- ment. For this task, the historical portion of the trajectory can be provided TransferTraj as Pa.......... {P(m)) "nn))""=")) where n' is the historical length, and [pmm] indicates that there are n n' points represented by P[m]]: The future portion is then predicted. We set n' n 5, and evaluate the precision of the trajectories' destinations. MAE and RMSE of the shortest distance on the Earth's 's surface are used as evaluation metrics.
The TR task aims to reconstruct the dense trajectory with a finer sampling interval, given the sparse trajectory. For this task, we define the sampling interval for the dense trajectory as and for the sparse trajectory as f4, where μ4 > Therefore, a sequence (p1, {P(m)) } / 4 e [Pim) } + #=2.-... Pun:) can be used as input to TransferTraj, and the missed trajectory points are derived from the recovered spatial modality of the masked trajectory points. We set μ = 4 e, 8 e, and 16 e, respectively. MAE and RMSE used as evaluation metrics.
The OD TTE task aims to predict the travel time of trajectory given its starting and ending locations and departure time. For this task, a sequence (p1. p',) can be used as the input to Transfer Traj. where p'a = (Ing lat,); [ml, Pn. RR,). ). The predicted travel time derived from the recovered temporal modality of the last point P.. MAE, RMSE, and MAPE are used as evaluation metrics.
Datasets. In our experiments, we use three real-world vehicle trajectory datasets derived from Chengdu, Xi'an, an, and Porto. Since the original trajectories in the Chengdu and Xi' an datasets have very dense sampling intervals, we employ a three-hop resampling method to retain only a portion of the trajectory points, ensuring that most trajectories have sampling intervals of at least 6 seconds. We also filter out trajectories containing fewer than 5 or more than 120 trajectory points. Additionally, we retrieve information on POIs and road networks within these datasets' areas of interest from the AMap AP and OpenStreetMap. Table presents the statistics of these datasets after preprocessing.
Baselines. For the TP task, we compare with the latest trajectory representation learning methods, including 12vec (9) Trembr (II], CTLE (23), Toast [4. TrajCL M. START (15), and LightPath [40]
For the TR task, we compare with Linear, MPR 66 Trimpute (8) DHTR (33), MTrajRRec (26].
RNTrajRec [5], and MM-STGED 33 For the OD TTE task, we compare with RNE 14], TEMP 32
LR, GBM, ST-NN [16), MURAT [19), DeepOD 43 and DOT 24 For our TransferTraj, we introduce two variants for comparison: (1) TransferTral (wo pt), which excludes the pre-training process and trains the model using only task-specific methods; and (2) TransferTral Fraj (wo ft), which omits the fine-tuning stage and directly handles specific tasks in zero-shot manner after pre-training.
Setting. TransferTraj is first pre-trained for 30 epochs on the training set using the trajectory masking and recovery strategy to enhance task transferability. We then perform task-specific fine-tuning to further improve performance on downstream tasks. The model is trained on one dataset and then transferred to the other two datasets. Additional implementation details are provided in Appendix B.2
Table 1: Overall performance of methods on trajectory prediction.
Dataset
Chengdu
Xian
Porto
Metric
RMSF. (meters)
MAF L (meters)
RMSF (meters)
MAF (melens)
RMSE (meters)
MAE (meters)
Method
Trembr ft)
1787. 18 29.01
1419,58 28.95
2067,80 + 16.30
1749.76
18.82
1640.13
14.88
1270.43 + 16.13
START (wo IT)
1347.11 = 30.72
1111.77
1 29.11
1406.06 : 18.42
1173.62 = 17.18
19.78 2345.71
1258.09
1038.36 =: 19.57
LightPath (wo to
2365,87 = 57.52
1948.97 + 57.78
2177.27 = 60.03
1859.35
48.50
55,28
2036.93 + 43.78
12vec
$79.30 1 11.94
387.50 4.03
482.64 1 2.67
310.08
3.00
360.90 0.83
212.92 1. 2.44
Trembr CTLE
505.62 4.57
376.88
7.34
473.97 = 1.24
301.45
4.98
315.50
4,90
182.38 :: 1.43
430.19 - 52.64
382.82
52.88
477.70
48.25
384.08 + 53,18
319.85 + 59.83
179.95 36.71
Trast
480.52 + 82.39
412.58 + 72.32
523,76
67.04
443.99 + 60.41
482 58 + 66.46
290,55 74.33
TrajCL
365.50 :
272.63
7,30
262.20 10.68
327.10 1.48
176.47
START
333.10 + 10.47
240.40 15.10
319.00 + 4.27
208. 35 = 7.30
260.29 3.68
159.73 29.09
LightPah
553.27 1. 42.26
360.86
56.41
598.20
15.57
348.61 19.32
388 22.46
217.04 38.44
Transfe/Traj (wo PO
289.25 9.19
218.43 4 5.63
296.32 : 5.71
197.79 = 5.08
249.33 - 7.41
164.10 + 6.72
TransferTruj Traj two ft)
223.15
9.228
176.88 9.45
238. 4.34
174,59 7.36
218.49 + 4.77
153.26 + 5.27
TransferTruj
187.91 1. 8.65
144.53 1. 5.25
212.62 J. 2.79
3.94 154.86
196.46 4.81
149.75 1 3.46
Red denotes the best result, and blue denotes the second-hest result.
means lower better.
https: wttpppcc///ppp////aaaccpspp-aaap
7

---

Table 2: Overall performance of methods on trajectory recovery on the Chengdu dataset. Performance on Xi' an and Porto as shown in Table and
Sampling Intervals
c+4
J p-c- c
c 16
Metric
RMSE (meters)
MAE 1 (meters)
RMSE J (meters)
MAE (meters)
RMSE (meters)
MAE L (meters)
Method
Linear
2800.39
188.04
347.92
247.20
503.96
398.67
MPR
266.06
173.55
332.68
233.17
494.28
375.19
Trimpute
242.36
164,96
316.08
216.83
476.83
350.19
DHTR
273.76 + 4.77
176.09 = 3.42
328.26 4.74
223.81 + 4.47
487.54 + 5.22
357.22 + 4.38
MTrrajRee
214.07 +: 5.19
143.16
4.06
30181
6.02
208. + 7.10
438.48
+: 5.43
335,90
8.04
RNTrajRec
205.29 + 3.92
138.47 2.48
262.93 + 3.74
193.06 + 4.19
420.04 5.86
316.70 8.73
MM-STGED
181.03 +: 8.27
130.24 + 9,58
247 46 + 6.30
186.07 + 5.12
405.29 4: 5,51
301.81 + 8.22
TransferTraa Traj (wo pt)
194.48 + 3,50
139.40 + 4.69
228 46 8.12
174.20 + 6.37
361 + 4.43
286.20 + 4.63
TransferTis Traj (wo ft)
158.39 + 5.89
115.23 5.26
194.69 6.76
149.51 + 6.41
321.06 4: 7.88
237.10 6.38
Transfer
135.15 + 2.35
97.87 3.17
176.91 2.57
129.26 +
277.32 +: 2.83
200.38 3.90
Red demotes the best result, and blue denotes sccond-best result. means lower is better.
Table 3: Overall performance of methods on OD TTE.
Dataeet
Chengou
Xian
Pocto
Metric
RMSE
MAE 1
MAPE (96)
RMSE 1 (minutes)
MAE (minutes)
MAPS (96)
RMSE L (minutes)
MAE
MAPE
Method
(minuses)
(minstes)
(mimunes)
(99)
RNB
3.66210.360 367
3.478.10.00 406
20.2261..911
5.651111 1.0
5.355 1.09
16.81711.519
4. 4.166.107783
2.712102119
34.261155.0 927
TEMP
3.490.10
3.016.11 399
1260221
2.119
6.751.1 1.328
5,600.1.22 200
28. 1.588.2230 2.229
4 4.21410.720
2 2.9010829
34.5201..294
LB
3.478.10:216
2,909 267
15.3661.2.30 2.769
5. 5.18911
0035
5.002.10.22 723
26.25511 01.2951.000 793
4.0.9 1.1
2.516.1.78 757
31.67614.1150
GBM
3.4122::335
2.703.0.22 297
14.927::0:5255
5.538 022
4.720330.08 056
15.7200-0:917
3.99120.319
2.397 2.191
27. 27.39661..172
STNN
1,379106628
2.65510.411 419
2.915
5,30210.33 350
4.61910.411
414
15.
15.3191: 1.390
3.75910.510
2.264110.593
24.761322047
MaRAT
1,33010.110
2.62110011 125
13.198. 280
5.028.111 550
4.332.1
294
13,885 1:5 2445
3.69 160.33
2,029 459
20.61913.199 1936200023
DoqpOD
3210000038
2:570:00:445
12:730+22592
4.715=00.721 720
3.818+0 620
12.026422 799
5.0254500006
17. 17.398=-0.922
DOT
3.161:00442
2.390:20000 10
10.192::0:926
5.394::0:546
3.256:60.75
729
9.504:11.366
2.782:00081
1.79420014
16.30KE2.104
Trawse/Traj(wo
3,663+0.13
2.486 188
9.964=1.3116
4.005=00:041
2,700 143
0:082::1 1,08
2.699:07721
1.50+:0761
15.631#22440 406
Transfe/Tijjvwo
2392220 3803
2.265:00010
9:113:01600
4.061::00299
3,00 205
9.219:22A83
2.580%20.400
1.321:00008
15.967:3.429
Transterlraj
2.61::0:17
2,08030011 112
9,360231,29
5.816:0-428
2.509130.236
8.343:00:997
2,138200011
1,225
14.082:11.229
Red denotes the best restft, and blkee deeotes the second best restlt. means lower bentrr
5.1 Performance Comparison
Task transferability. Tables I and present the performance of various methods on the TP, TR, and OD TTE tasks. Our proposed model consistently outperforms all baselines across tasks. Using pre- training alone (TransferTral wo ft), our model achieves average 20.18% % 17.87 %, and 7.94 % gains over the SOTA baselines START, MM-STGED, and DOT on three tasks, demonstrating strong task transfcrability. When further fine-tuned on the target tasks, performance further improves by 11.41 %, 13.59% and 8.62%, respectively. the TP task, we also freeze the pre-trained encoders of trajectory representation methods and fine-tune only the prediction heads (wo ft). The results show a significant performance degradation compared to the fully fine-tuned approach. To reach optimal performance, these methods require fine-tuning the entire trajectory encoder with task supervision, thus failing to fully achieve task transferability. By comparison, TransferTraj does not require fine-tuning the learnable model or prediction modules to reach the reported performance. It can be pre-trained once and directly perform different tasks with high performance. This demonstrates its superior task transferability, enabling high efficiency and practical utilization in real-world applications.
Table 4: Zero-shot region transfer performance of methods on trajectory prediction.
Datavet
Chengsu + Xian
Chengdu - Porto
Xian +
Porto
Xian -
Chengdu
Ponto - Changda
Porto + Xian
Maric
RMSE |
MAE
RMSE :
MAE J
RMSE J (meters)
MAR (meters)
RMSE |
MAB |
RMSE (mesers)
MAE 1 (iacters)
RMSE | (maters)
MAP. J
Mathod
(meters)
(meters)
(meters)
(meters)
(meters)
(meters)
(meters)
12ves (wo ft)
3258.54
2994.46
2963.71
2200.58
2890.09
2177. 13
2920.99
2560.44
2679.04
2263.09
2900.75
2257.04
Trembr (wo 6)) 2914.69
2566.89
2445.43
2677.11
1860.29
2706.51
2598.04
2093.15
2675.0
2142.97
CTI. (wo
3775.45
3479
3260.91
2741.78
3173.62
313100
2753,10
2956.23
2590.10
3285
2602.12
Toast (wo ft)
2622.43
2100.58
2200.25
1662.52
2262.42
1811.06
2673.11
2294.38
2237.22
1875,89
2502. 75
1926.15
TrajCL (wo ft)
2144.55
1823.11 11
1888.65
1130.30
1797.26 26
1550.88
2278. 60
1718.00
1582.46
1297.13
1681.19
1274.26
START (wo f0)
1891.36
1627.6 57
1963.76
1241.50 100
1655.5 80
1369.22 25
1859
1569. 15
1669.19
1214.12
1768.
1376.46
LightPaih (wo II)
2793.72
2465.34
2025.05
1881,52
1525.55
2610.30
2228.35
1460.01
1946.
1555.06
TransferTraj 329.77
242.83
216.19
286.24
209.99
225.19
170.64
239.60
188.21
357.45
294,46
Red densnes the boxt revals, and blue depotes the spsond-bor box revult.
Ricuts lower bettet.
8

---

Table 5: Zero-shot region transfer performance of methods on OD TTE.
Dataset
Chengdu
Xian
Chengdu
Porto
Xian - Porto
Metric
RMSE (minutes)
MAE. (minutes)
MAPE L (5c
RMSE (minutes)
MAE 1 (minutes)
MAPE + (%)
RMSE 1 (minutes)
MAE (minutes)
MAPE
Method
(5)
LR
7.982
6.912
21.793
5,280
3.118
38.191
4,991
3.094
37.286
GBM
7.317
6.106
19.435
4,720
3.002
32,957
4.804
2.946
34.342
ST-NN
6,322
5.661
17.036
4,394
2.819
28.911
4.522
2.800
29.160
MURAT
5.917
4.613
15.307
3.905
2.694
27.395
4.099
2.705
24.038
DcepOD
5.076
4.003
13.428
3,706
2,585
22.021
3.954
2.639
21.483
3.560
2.527
TransferTraj
4.484
3.236
10.532
2.762
1,987
17.428
2.675
2,002
18.284
Dataset
Xian + Chengdu
Porto - Chengdu
Porto - Xian
Metric
RMSE 1 (minutes)
MAF. (minutes)
MAPE L
RMSE L (minutes)
MAE 4 (minutes)
MAPE 4 (%)
RMSE J (minutes)
MAF
MAPE J
Method
(minutes)
(%)
I.R
4.923
3.901
23.977
5.384
4.321
21.118
7.186
6.510
20.469
GBM
4,890
3.884
20.027
5.002
4,103
20.915
6.952
5.914
18.325
ST-NN
3.723
3.965
16.259
MuRAT
4.525
3.527
16.043
4,677
3.833
17.118
5.413
4,803
15,405
DeepOD
4.497
3.474
14.338
4,532
3.621
16.001
5.305
4.172
15.927
DOT
4.206
3.362
12.621
4.334
3.356
13.699
4,995
4.203
13.892
TransferTraj
3.842
2.973
11,320
3.995
3.168
11.935
4.874
3.961
12.396
Red denotes the best result, and blue denotes the second best resalt, J means lower is better.
Table Ablation Study on Chengdu dataset.
Task
TP
TR
OD TTE
Metric
RMSE (meters)
MAE J (meters)
RMSE (meters)
MAE (meters)
RMSE | (minutes)
MAE 4 (minutes)
MAPE J (minutes)
Method
wo TRIE wo SC-MoE wo POI modality
236.18
185.14
163.47
124.66
3.347
2.861
11.685
227.36
167.75
166.48
127.45
3,240
2.585
11.584
226.25
159.37
152.19
119.38
3.166
2.307
11.388
wo road network modulity
223.59
165.44
164.07
124.53
3.128
2.221
11.631
Transfer Traj
197.91
144.53
135.15
97.87
2.861
2.060
9,360
Red denotes the best result, and blue denotes the second- best result.
means lower is hetter.
Region transferability. We conduct regional transfer experiments under both zero-shot and few-shot settings. In the zero-shot setting, TP and OD TTE baselines are pre-trained on one region and directly applied to other regions. For the TR task, we do not conduct zero-shot transfer experiments, the baselines rely on multiclassification over road IDs, and the number roads varies across regions, making direct transfer infeasible. In the few-shot setting, all models are first pre-trained on one region and then fine-tuned on other regions by randomly sampling 5,000 trajectories.
We present the performance comparison of zero-shot transfer in Tables and and few-shot transfer in Tables IT 12 [3 14 and The experimental results demonstrate that our model consistently outperforms baseline methods across all three tasks, highlighting its strong region transferability. Specifically, on the task, our method achieves improvements
83.70 % and 33.68% over SOTA models in zero-shot and few-shot settings. For the TR task, it improves performance by 18.08 % in the few-shot setting, and for the OD TTE task, the gains are 10.88% % and 13.07% % in zero-shot and few-shot settings. We attribute this success to the model's ability to capture the relative spatial information of trajectories and to extract shared movement patterns from the surrounding context.
5.2 Model Analysis
Ablation study. The experimental results presented in Table reveal several important findings. First, removing the TRIE component leads significant performance decline, highlighting the critical importance of capturing spatial relative information between trajectory points for effective trajectory understanding. Furthermore, our ablation study on SC-MoE demonstrates a substantial performance drop of 14.52% on the OD TTE task, validating its effectiveness in capturing complex movement patterns. Additionally, the integration of POI and road network modalities further enhances the model's performance by providing richer spatial context for trajectory analysis.

---

High-density
Middle-density
Low-density
Frequeccy
Xi' an Normalized Trequency
Normalized Prequency
0.3
0.3
0.3
0.2
0.2
0.2
6.0
[1.3.5/8]
(1.5..8)
0.0
[1.2.566
[1.2.7.8]
6.9
[1.4.56]
[2.46.8]
Figure 2: Expect activation distribution.
Analysis of the SC-MoE. We analyze the experts activated across different spatial contexts by grouping trajectory points based on the density of nearby POIs and road segments. Specifically, we classify the local spatial context into three categories: high-densttn regions (> 15 POIs and road segments), medium denssty regions (5 ~ 15), and low-density regions (< 5). For each category, we compute the distribution of activated experts, shown in Figure The results reveal distinct expert activation distributions across density levels, indicating that the model dynamically selects specialized combinations of experts effectively capture movement patterns in diverse spatial contexts.
Table 7: Efficiency methods on TP task.
Dataset
Chengdu
Porto
12vec
1.64
2.78
4.45
6.30
5.94
9.70
7.21
9.29
13.52
Trembr
5.75
3.36
3.23
5.30
6.07
9.72
6.14
10.68
13.03
CTLE
3.76
4.53
14.58
3.76
14.35
33.86
3.76
18.55
53.13
Toast
4.01
4.40
14.54
3.56
10.65
33.86
3.95
17.64
52.88
TrajCL
4.38
7.70
10.25
3.93
14.57
23.88
4.46
19.50
39.15
START
15.93
15.93
28.70
15.03
37.53
49.89
17.81
62.88
67.49
LightPath
12.96
10.25
22.49
12.51
23.22
46.26
13.90
46.49
63.65
TransferTraj 3.64
1.27
1.21
3.64
4.09
3.92
3.83
8.38
8.17
Red denotes the best result, and blue denotes the second- best result.
Efficiency Study Table compares the efficiency of different methods on three datasets in TP task, measured by the size of the learning model and the time required for training and testing. We observe that TransferTraj is lightweight, with model size comparable RNN-based methods like t2vec and Trembr, and much smaller than state-of-the- methods like START and LightPath. TransferTraj also has an efficient training process and is competitive test time compared to other methods. Overall, applications, as only needs to be trained once
TransferTra enhances the efficiency of and can perform various tasks in different regions without re-training.
6 Conclusion
We propose TransferTraj. a vehicle trajectory learning model that excels in both region and task transferability. First, we introduce RTTE as TransferTraj's learnable component enable region transferability. This component incorporates POI and road network modalities, enabling model to comprehend spatial context distributions across diverse regions. Equipped with TRIE and SC-MoFF mechanisms, TransferTraj effectively captures relative spatial correlations among trajectory points and identifics shared movement patterns in similar spatial contexts, thereby preventing bias toward specific regions. Second, we unify the input-output structure across different tasks to facilitate task transferability. Through combination of randomly masking and recovering trajectory modalities or entire trajectory points, along with an effective pre-training mechanism, our model seamlessly transfers various tasks without requiring retraining. For discussion on the limitations and broader impacts of TransferTraj, please refer to Appendix[A]
Acknowledgment. This work was supported by the Beijing Natural Science Foundation (Grant No. 4242029), **STAR RIE2025 Manufacturing, Trade and Connectivity (MTC) Programmatic Fund (M24N6600433) and ECNU Multifunctional Platform for Innovation (001).
10

---

References
[1] Yanchuan Chang. Jianzhong Qi. Yuxuan Liang. and Egemen Tanin. Contrastive trajectory similarity learning with dual-feature attention. In ICDE, pages 1933-2945, 2023.
Tianqi Chen and Carlos Guestrin. Xghoost: scalable tree boosting system. In Proceedings of the 22nd acm sigkdd international conference on knowledge discovery and data mining, pages 785-794, 2016.
[3] Ting Chen, Simon Korbliihh, Mohammad Norouzi, and Geoffrey E. Hinton. simple framework for contrastive learning of visual representations. In ICML, volume 119, pages 1597-1607, 2020.
[4] Yile Chen, Xiucheng Li, Gao Cong, Zhifeng Bao, Cheng Long, Yiding Liu, Arun Kumar Chandran, and Richard Ellison. Robust road network representation learning: When traffic patterns meet traveling semantics. In CIKM, pages 21 1-220, 2021.
[5] 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 on Data Engineering (ICDE), pages 829 842. IEEE, 2023.
[6] Zaihen Chen, Heng Tao Shen, and Xiaofang Zhou, Discovering popular routes from trajectories. In 201 IEEE 27th International Conference on Data Engineering, pages 900-911. IEEE, 2011.
[7] Junyoung Chung, Caglar Gulcchre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint 14Xi::14/2.3555, 2014.
[8] Mohamed M Elshrif, Keivin Isufaj, and Mohamed F Mokbel. Network-less trajectory imputation. In Proceedings of the 30th International Conference on Advances in Geographic Information Systems, pages 1- 2022.
[9] Ziquan Fang. Yuntao Du, Xinjun Zhu, Danlei Hu, Chen, Yunjun Gao, and Christian S. Jensen, Spatio- temporal trajectory similarity learning in road networks. In KDD, pages 347-356, 2022.
[10] Jie Feng, Yong Li, Chao Zhang, Funing Sun, Fanchao Meng, Ang Guo, and Depeng Jin. Deepmove: Predicting human mobility with attentional recurrent networks. In WWW, pages 1459-1468, 2018.
[11] Tao- lcarning. ACM Trans. Intell. Syst. Technol., 1(1):10:1-10:2: 2020.
Tao-Yang Yang Fu and Wang-Chien Lee. TremBR: Exploring road networks for trajectory representation
[12] Geoffrey E Hinton and Ruslan R Salakhutdinov. Reducing the dimensionality of data with neural networks. science, 313(578)):504-5535 2006.
[13] Sepp Hochreiter and Jürgen Schmidhuher. Long short-term memory. Neural computation, 98): 1997.
[14] Shuai Huang. Yong Wang. Tianyu Zhao, and Guoliang Li. A learning-bast based method for computing shortest path distances road networks. In 2021 IEEE 37th International Conference Data Engineering (ICDE), pages 360-371. IEFE, 2021.
[15] Jiawei Jiang, Dayan Pan, Houxing Ren, Xiaohan Jiang, Chao Li, and Jingyuan Wang. Self-supervised trajectory representation learning with temporal regularities and travel semanties. In ICDE, pages -55, 2023.
[16] Ishan Jindal, Xuewen Chen. Matthew Nokleby, Jieping Ye, et al. unified neural network approach for estimating travel time and distance for a taxi trip. arXiv preprint 1rXiv:1710.04355 2017.
[17] Dejiang Kong and Fei Wu. HST-LSTM: A hierarchical spatial temporal long-short term memory network for location prediction. In IJCAI, pages 2341-2347, 2018
[18] Xiucheng Li, Kaiqi Zhao, Gao Cong, Christian S. Jensen, and Wei Wei. Deep representation learning for trajectory similarity computation. In ICDE, pages 617-628.
[19] Yaguang Li, Kun Fu, Zheng Wang. Cyrus Shahabi, Jieping Ye, and Yan Liu. Multi-task representation learning for travel time estimation. In KDD, pages 1695-17400 2018
[20] Yang Li, Si Si, Gang Li, Cho-Jui Hsich, and Samy Bengio. Learnalle fourier features for multi dimeniiddm spatial positional encoding, Advances in Neural Information Processing Systems, 144:15116-15555 1021.
[21] Yuxuan Liang. Kun Ouyang, Hanshu Yan, Yiwei Wang, Zekun Tong, and Roger Zimmermann. Modeling trajectories with neural ordinary differential equations. In IJCAI, pages 1498- 1504, 2021.

---

[22] Yan Lin, Huaiyu Wan, Shengnan Guo, Jilin Hu, Christian S. Jensen, and Youfang Lin. Pre-training general trajectory embeddingg with maximum multi-view entropy coding. IEEE Trans, Knowl. Data Eng., pages 1-15, 2023.
[23] Yan Lin, Huaiyu Wan, Shengnan Guo, and Youfang Lin. Pre-training context and time aware location embeddings from spatial-temporal trajectories for user next location prediction. In AAAI, pages 4241-4248, 2021.
[24] Yan Lin, Huaiyu Wan, Jilin Hu, Shengnan Guo, Bin Yang. Youfang Lin, and Christian S. Jensen. Origin- destination travel time oracle for map- based services. PACMMOD, 1(3):21:1121777 2023.
[25] Congcong Miao, Ziyan Luo, Fengzhu Zeng, and Jilong Wang. Predicting human mobility via attentive convolutional network. In WSDM, pages 438-446, 2020.
[26] Huimin Ren, Sijic Ruan, Yanhua Li, Jic Bao, Chuishi Meng, Ruiyuan Li, and Yu Zheng. Mtrajrec: 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] Noam Shazeer, Azalia Mirhoseini. Krzysztof Maziarz. Andy Davis. Quoe Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The aparsely-gated mixture-of-experts layer. arXiv preprint vrXiv:/701.06:.
2017.
[28] Zekai Shen, Haitao Yuan, Xiaowei Mao, Congkang Lv, Shengnan Guo, Youfang Lin, and Huaiyu Wan. To- wards efficient and effective route travel time estimation framework. arXiv preprint arXiv:2504.00 04086, 2025.
[29] Jianlin Su. Murtadha Ahmed, Yu Lu, Shengfeng Pan, Wen Bo, and Yunfeng Liu. Roformer: Enhanced transformer with rotary position embedding. Neurocomputing, 568:12706: 2024.
[30] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez. Lukasz Kaiser, and Illia Polosukhin. Attention all you need. In NeurIPS, pages 5998-6008, 2017.
[31] Huaiyu Wan, Yan I Lin, Shengnan Guo, and Youfang Lin. Pre-training time-aware location embeddings from spatial-temporal trajectories. IEEE Trans. Knowl. Data Eng., 34(1 1):5510-55522 2022.
[32] Hongjian Wang, Yu-Hsuan Kuo, Daniel Kifer, and Zhenhui Li. A simple baseline for travel time estimation using scgee-ccae trip data. In SIGSPATIAL, pages
2016.
[33] Jingyuan Wang, Ning Wu, Xinxi Lu, Wayne Xin Zhao, and Kai Feng. Deep trajectory recovery with fine-grained calibration using kalman filter. IEEE Trunsactions on Knowledge and Data Engineering, 33(3):921-934, 2019.
[34] Tonglong Wei, Yan Lin, Youfang Lin, Shengnan Guo, Jilin Hu, Gao Cong, and Huaiyu Wan. Ptr: pre-trained language model for trajectory recovery. arXiv preprint arXiv:2410. 14281, 2024.
[35] Tonglong Wei, Youfang Lin, Shengnan Guo. Yan Lin, Yiheng Huang, Chenyang Xiang, Yuging Bai, and Huaiyu Wan. Diff-mttraj: A structure-awart aware diffusion model for road network-constraing trajectory generation. IEEE Transactions on Knowledge and Data Engineering, 2024.
[36] Tonglong Wei, Youfang Lin, Yan Lin, Shengnan Guo, Lan Zhang, and Huaiyu Wan. Micro-macro spatial- temporal graph-based encoder-decoder for map-constrained trajectory recovery. IEEE Transactions on Knowledge and Data Engineering, 2024.
[37] Fan Wu and Lixia Wu. Deepeta: A apatial-tempont sequential neural network model for estimating time of arrival in package delivery system. In AAAI, pages 774-781, 2019.
[38] Hao Wu, Ziyang Chen, Weiwei Sun, Baihua Zheng, and Wei Wang. Modeling trajectories with recurrent neural networks. In ISCAL, pages 3083-3090, 2017.
[39] Bingqi Yan, Geng Zhao, Lexue Song, Yanwei Yu, and Junyu Dong. PreCLN: Pretrained-hased contrastive learning network for vehicle trajectory prediction. WWW, 26(4):1853-188) 2023.
[40] Sean Bin Yang. Jilin Hu, Chenjuan Guo, Bin Yang, and Christian S. Jensen. Lightpath: Lightweight and scalable path representation learning. In KDD, pages 2999-3010, 2023.
[41] Di Yao, Chao Zhang, Zhihua Zhu, Jian-Hui Huang, and Jingping Bi. Trajectory clustering via deep
representation learning. In IJCNN, pages 3880-3887, 2017. 2017.
[42] Haitao Yuan and Guoliang Li. A survey of traffic prediction: from spatio-temporal data to intelligent transportation. Data Sci. Eng.. 6(1):63-85. 2021.
12

---

[43] Haitao Yuan, Guoliang Li. Zhifeng Bao, and Ling Feng. Effective travel time estimation: When historical trajectories over road networks matter. In SIGMOD, pages 2135-2149, 2020.
[44] Yuanshao Zhu, Yongehao Ye, Shiyao Zhang, Xiangyu Zhao, and James Yu. Difftraj: Generating gps trajectory with diffusion probabilistic model. Advances in Neural Information Processing Systems. 36:65168-6535 65188, 2023.
[45] Yuanshao Zhu, James Jianqiao Yu, Xiangyu Zhao, Qidong Liu, Yongchao Ye, Wei Chen, Zijian Zhang, Xuetao Wei, and Yuxuan Liang. Controltraj: Controllable trajectory generation with applloy-constrainee diffusion model. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pages 4676 4687, 2024.
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:
We introduce the limitations of the paper in Appendix A.1
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 D and
B
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 deseribe 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:///gttheii ctcaluu..oom///a wttp:b/c.mmmtt12mmmm
TransferTraj
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/pil wwcppbblc/guuiicuccccccccoeooopp
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 and Appendix
B
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 Section 5.1 and Appendix F
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 еπхо rates).
If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables the text.
8. Experiments compute resources
For each experiment, does the paper provide sufficient information on the puter resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?
Question:
Answer: [Yes]
Justification: We analyze model size, the number of parameters, training time, and inference time in Appendix (.2
Guidelines:
The answer NA means that the paper does not include experiments.
The paper should indicate the type of compute workers CPU GPU, internal cluster, or cloud provider, including relevant memory and storage.
The paper should provide the amount of compute required for each of the individual experimental runs as well as 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 in the paper conform, in every respect, with the NeurIPS Code of Ethics
Answer: [Yes]
Justification: respects.
We ensured that the study complied with the NeurIPS Code Ethics in all
Guidelines:
The answer NA means that the authors have not reviewed the NeurlPS 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 (c.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: [NA]
Justification: The core method development in this research does not involve LLMs any important, original, or non-standard components.
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

---

Table 8: Statistics of datasets.
Dataset
Chengdu
Xian
Porto
Trajectories # POIs
140,000
210,000
323, 481
12,439
3,900
6,529
# Road Segments # Sampling Intervals Latitude range
4315
3392
9559
~ 6s
6s
158
30.6552 30.7270
34.2064 34.2802
41.1405 41.1865
Longitude range
104.0430 ~ 104. 1265
108.9172 ~ 109.0039
-8.6877 ~ -8.5557
Size of training area (km²)
7.98 * 7.98
8.20 7.98
11.13 5.11
A Limitations and Broader Impacts
A.1 Limitations
Our work faces challenges in cross-region classification tasks, such as trajectory-user linking or destination road segment prediction, due to the varying number of users and road networks across different regions. Future work will focus on developing unified framework that enables the model to generalize more effectively across broader range of tasks.
A.2 Broader Impacts
We present a trajectory learning model that achieves both region and task transferability. This capability allows a single model to be applied across tasks without maintaining multiple model parameters, thereby significantly reducing storage and computation overhead. Moreover, the model can be directly transferred to other regions with limited data while maintaining strong performance, effectively alleviating overfitting issues caused by data scarcity.
B Experiment SetUp
B.1
Dataset
Table g provides a statistical summary of Chengdu Xian and Porto which exhibit variations in data scale, sampling frequency, spatial size, geographic origin, and the number of POIs and road segments. This heterogeneity renders them highly appropriate for a thorough assessment of the proposed model's regional transferability.
B.2 Setting
For both datasets, we split the departure time of the trajectories chronologically into 8:1:1 ratios to create the training, validation, and testing sets. TransferTraj is implemented using the PyTorch framework and optimized with the Adam optimizer, with a learning rate set to 1e-3 and a batch size of 64. For the baseline models, we adopt the optimal hyperparameters as reported in their original papers. All baselines are trained for 50 epochs with an early stopping strategy based on a patience of 10 epochs. To retrieve the POIs and road segments surrounding trajectory point, set the distance thresholds Pdiit 100 meters and Fdist 100 meters. The three key hyperparameters of TransferTraj and their optimal values are L = 2, d = 128, and C = 8. A comprehensive analysis of the influence of these hyperparameters on model performance is provided in Appendix During pre- pre-training, we randomly divide each trajectory into multiple -verllallg segments, with the number of segments set to 0.2 x [T), where [T] represents the trajectory length. We then randomly select 40% of these segments and apply trajectory point masking to all points within the selected segments. For the remaining trajectory portions, we further select 20% of the trajectory points and apply either spatial or temporal modality masking. Experiments are conducted on Ubuntu 22.04
https://outrease wttp::ttrrerccc.ciiiiiiiiiiiiiii wiedididdiiiiiii didichuxing..cc.
21

---

servers equipped with Inte (R) W-2155 CPUs and NVIDIA(R) TITAN RTX GPUs. Each experiment is repeated five times, and report the mean and standard deviation of the evaluation metrics.
B.3
Evaluation Metrics
For the TP and TR tasks, we evaluate the distance error between the predicted and ground-truth using Mean Absolute Error (MAE) and Root Mean Square Error (RMSE). For the OD TTE task, we use RMSE, MAE, and Mean Absolute Percentage Error (MAPE) to assess the discrepancy between the predicted and actual travel times. Lower values of these metrics indicate a better performance.
RMSE
(
y:)²
72 >
MAE
1i yi
(6)
7i
i=1
10s
Vil
MAPE
X
100%
V/
where n denotes the total number of samples, ÿJ represents the predicted value, and yi is the target value.
B.4 Baselines
For the TP task, we select the following seven trajectory representation baselines to compare model performance. We append two MLP layers after their output embedding to predict the destination location.
t2vec []] Pre-trains the model by reconstructing original trajectories from low-sampling ones using denoising auto-encoder.
Trembr [1I Constructs an RNN-based seq2seq model that recovers the road segments and time of the input trajectories.
CTLE 23 Pre-trains bi-directional Transformer with two MLM tasks involving location and hour predictions. The trajectory representation is obtained by applying mean pooling on point embeddings.
Toast 4 Utilizes a context-aware node2vec model to generate segment representations and trains the model with an MLM-based task and sequence discrimination task.
TrajCL I: Introduces a dual-feature self-attention-basee encoder and trains the model in contrastive style using the InfoNCE loss.
START [15]:
Includes a time-aware trajectory encoder and a GAT that considers the transitions between road segments. The model is trained with both MLM task and contrastive task based on SimCLR loss.
LightPath :0] Constructs a sparse path encoder and trains with a path reconstruction task and cross-view and cross-network contrastive task.
We also compare the variant of the Trembr, START, and LightPath models without fine-tuning, where the pretrained encoder is frozen and only the MLP layers are fine-tuned. The variant termed as Trembr (wo ft), START (wo ft), and LightPath (wo ft), respectively, shown in the upper part of Table
For the TR task, we select the following 7 trajectory recovery baselines. Including three relu-based methods and four learning- based methods.
Linear: Assumes that the movement along the trajectory follows a uniform linear pattern. Missing trajectory points are imputed using linear interpolation between known points.
22

---

MPR [6]:
Divides the region into equally sized grids and estimates the most frequently traveled grid path between two known trajectory points. The center points of the inferred grids are then used to fill in the missing points.
8 Fills sparse trajectories using crowd-wisdom wisdom-based algorithm, which leverages patterns learned from the behavior of multiple users.
TrImpute
Employs Seq2Seq framework infer the grid sequences corresponding missing trajectory points, followed by a Kalman filter to refine the recovered trajectory and enhance accuracy.
DHTR
33
Mer 26]: Originally designed
road network-constraing, trajectory recovery model, which predicts road segment IDs and moving ratio. To enable region transferability, modify its output layer to predict the latitude and longitude of missing points. The model adopts a GRU-based Seq2Seq architecture.
Ret [ Similar to MTrajRec, we adapt the output to recover latitude and longitude coordinates instead of road segment IDs. It integrates trajectory sequences and road network information using a Transformer to capture spatio-tempont correlations for trajectory recovery.
MM-STGED 36]: Utilizes graph-based methods to capture the semantic structure of trajectories and incorporates macro-level traffic conditions regions to assist trajectory imputation.
For the OD TTE task, we select the following 8 origin- degginddestintioon travel time estimation baselines.
RNE [14] Estimates distance between trajectory points by learning their latent embeddings, capturing spatial relations implicitly.
TEMP 32
Computes the average travel time of historical trajectories that are closely related in both spatial and temporal dimensions.
LR: A simple linear regression model that maps input features to travel time based on temporal labels.
GBM: powerful non-linear regression model, implemented using XGBoost [2), capable of capturing complex feature interactions.
ST-NN [6] Simultaneously predicts travel distance and travel time for origin-destination pairs using deep learning framework.
MURAT M Jointly predicts travel distance and time, while incorporating departure time
as an auxiliary feature to enhance performance.
DeepOD 43 Leverages the correlation between input features and historical trajectories during training to improve prediction accuracy.
DOT 24 A two-stage framework that generates image-like representations of trajectories to estimate travel time through visual inference techniques.
B.5
Variant of TransferTraj
The variations of the proposed model include:
wo TRIE: Removes TRIE and uses vanilla transformer encoder to encode the sequence of trajectory points.
wo SC-MoE: Removes the spatial context MoE.
wo POI modality: Removes POI modality.
wo road network modality: Removes road nerwork modality.
C The Proof of TRIE to Capture Relative Spatial Information
Given two trajectory points p; and Pj, associated with spatial modalities (r,, ys) and (zty yj). respec- tively, we introduce learnable spatiotemporal rotation matrix Re(a.)) to encode their relative spatial
23

---

information (x: 3, Fb) through matrix multiplication, where
Teos (a. 6/4
(st (c.. cos (nn,)9
(o(
Rdxd
(7)
-in p160
cos cos v1Pay2
Based on the matrix multiplication of the attention mechanism, we apply Re(z,.) to the query and key, allowing the model effectively capture the relative information (e - between trajectory points. This design helps mitigate region-specific biases and improves the model's region transferability. The detailed derivation process is as follows:
9: k3 (R. an) W Weee) (Ro()) W key)
= c; Wg
( (Ro(a)))) Wee,)
cos 01 (m,, 16
sin di (Ze, 30) cos p1 (Z.,3)
sin 01 (Ze 14
= E; Wg
cos 2a 30 1ayz sin 2a/2 (ass Us Bayz
sin @ayz M1 2ayz
0
cos sayz (1to U4 8ap2
Toos (13) 1:10
sin d (z), v3)01
sin (1),, 0;
cos d1 (5,,05201
W ejj
cos 0u May2 sin ano Mayz
sin uara (z My Oarz cos ( 10/2
E;
W
kee
will (8.0
e; W,
W eej
aosdhaal (ty, Mal sin lil (Ry 19 anoeec (onaaal Doy Moll
E; W. 9 R Riza))) - (()))))
Wee
e:
W R 13) W kej,
(8)
where
cos Φi (1,, 00s 1z + sin dh (1,, w:)0 oi (zy My vy)0
cos (z 9 0 d1 (I,, M, sin 01 (1,, d 01 cos on (I,, y ) (z), M/ cos di (m,, i 0 sin di (I 11 00, (I) 0,,
sin Φ1 (z.,
cos 61 (z., cos 0 0 htgp /2 6in / 
sin (, 9 sin
(9)
(2)
cos / (z,,
2a/2 13/2,
= sin ou
cos cos
22/2( 0a/2,
= sin 64/2 v. 0 02/2 0 cos 22/2 (2,, y1 cos 22 U/ 10/2
D Performance Comparison in Task Transfer
Table 9 and 10
present the trajectory recovery performance the Xi'an and Porto datasets. We observe that even using only the pretraining scheme (TransferTraj wo ft) in Section 4.2 our model outperforms the state-of-the-arr trajectory recovery task bascline by 9.25% and 1.20%, demonstrating

---

Table 9: Overall performance of methods on trajectory recovery on the Xi an dataset.
Sampling Intervals
c=
E
== 16
Metric
RMSE
MAE. 4 (meters)
RMSE J (meters)
MAE (meters)
RMSE (meters)
MAB 1
Method
(meters)
(meters)
Linear
316.79
276.11
401.09
295.
610.38
481.58
294.18
242.54
388.11
288.33
631.48
510.05
Trimpute
253.50
199.48
371.39
270.03
582.48
447.71
DHTR
286.19 3.92
207.33 + 3.23
394.18
3.57
290.11 + 4.54
612.38 + 3.63
490.37 + 4.02
MTrajRoe
273.49 = 6.63
195.19 6.20
388.13 13
279.19 + 5.50
600. +: 7.91
464.67 6.61
RNTruReec
237,44 3.89
168.58 4.29
357.18 4.59
266.22 + 4.54
$71.59 1: 3.15
438.48 4.77
MM-STGED
214.58 = 7.50
157.31 = 9.80
131.10
248.33 + 8.14
544.14 = 7.30
407.11 11 + 5.25
Transfe/Traj (wo pÚ
222.57 + 3,42
171.93 + 3,28
319.38 + 3.25
238.47 + 4.23
499.32 4 2.87
381.48 48 + 2.26
Transfer Traj (wo It)
201.48
4.23
155,42 + 4.73
290. 3.92
211.43 + 4.19
471.70 + 3.64
366.19 4.23
Transfer
181.71
#: 3,91
132.83 4.61
267.74
4.55
196.01
3.50
443.65 :: 3.92
322.54 4,90
denotes result,
second-best result. means better.
Table 10: Overall performance of methods on trajectory recovery on the Porto dataset.
Sampling Intervals
16
Metric
RMSE J (meters)
MAE J. (meters)
RMSE J (meters)
MAR L (meters)
RMSE 1 (meters)
MAF. J. (meters)
Method
Lineur
430,59
329.48
523.69
415.77
762.48
561.39
MPR
404.19
310.04
504.11
396.28
722.48
537.28
Trlmpute
372.95
288.
486.11
377.41
693.58
$11.49
DHTR
387.18 2.02
293.19
2.39
494.38 +: 3.79
384.59
2.08
671.49 3.37
492.33
3.65
MTrajRee
394.19
7.59
303.19
+ 8.44
488.41 +: 7.43
371.33
+ 4.97
682.51 +: 10.20
503
7.07
RNTrajRee
366.19 5.21
283.58
- 4.61
474.19 +: 4.57
358.
4.15
649.18 = 7.28
475.66
5.96
MM-STGED
341.29 8.15
252.44 7.56
446.18
11:27
328.34
7.82
610.46 13.30
448. 9.28
TransferTraj (wo pt)
361.49 5.09
264.11 4.66
485.28 +: 4.87
351.39
4.33
622.48 7.18
453.33
4.89
TransferTraj (wo ft)
331.61
+
258.39 + 4.31
447.22 + 5.82
321.39
4.73
604.17 = 4.38
431.00 3,96
Transfer Traj
316.71 4.92
230.97 3.83
431.66 + 6.17
309.38 5.24
578.71 + 5.25
401.52 3.24
Red donotes the best resalt, and blue demotes the sccond-best result. 1 meaas lower better.
strong task transferability. This capability is largely attributed to our modality and sub- trajecryyy masking and recovery strategies. Notably, in the most challenging trajectory recovery setting, where 16 e, our model still surpasses the baseline by 1..68% and 2.42%. Furthermore, fine-tuning on the trajectory recovery task further boosts performance by additional 9.54% and 5.56%, confirming the effectiveness of our model.
Table 11: Few-shot region transfer performance of methods on trajectory prediction.
Datasel
Caengdu
+ Xian
Chengdu + Porto
Xian
Parto
Xian - Chengda
Poeto
Chengdu
Porto - Xian
Metric
RMSF
MAF (meters)
RMSF (meters)
MAF |
RMSE (meters)
MAF (meterrs)
RMSF
MAF (meterss
RMSF (meters)
MAF (meters)
RMSF
MAF.
Mettod
(meters)
(meterss
(iecters)
(encters)
(meters)
12vee
584.74
429.30 299
425.20
438.28
287.28
672.49
460.39
488.29
592.59
400.38
Trembr
387.29
237.49
236.20
573.59
571.38
CTLE
600.29
472.59
296.20
228.85
400.
236.81
531.59
443.67
520.52
462.59
588.19
452.51
Toass
654.22
$22.66
558.83
339.65 98
563.65 633.68
353.55 99
639.227
/19./17
661..9
500.28
631.81
$01.29
TrajCL
451.11
325, 79
400.29
248.29
29
257.22
427.58
308.31
459.39
300.58
446.29
311.68
START
366.10
250.01
339.29
220.04
234.20
370.18
286.02
372.59
278.24
375.38
269.25
LighiPath
286.80
473.59
Trunsfer Traj
251.07
179.00
239.73
166.13
238.56
159.07
209.97
160,48
214.08
165,43
262.09
187,47
Rei denines the bod revall, and blue dentes the woudd-hei scault
mecan lowcr is Isclic..
Table 12: Few-shot region transfer performance of methods trajectory recovery on /r # 4.
Dataset
Chengdu
Xian
Chengdu
Porto
Xian
Porto
Xian
Chengda
Porto
Chengdu
Porto
Xinn
RMSF (meteess
MAF (eseters)
RMSE [meters)
MAF (meters)
RMSF [meteess
MAF (metters)
RMSF (metters)
MAF. (meters))
RMSE (secters)
MAE (meters))
RMSF (meterss
MAF
Meshad
(meters)
DHTR
331.58
268.91
413.61
351.95
150.38
363.19
280.17
199.36
291.18
206.09
348.18
271.42
MTrajRee
326
254.44
431.44
341.49
428.47
337.18
266.39
185.10
261.96 16..96
177.39
335.55
264.19
RN RNTrsjRee
26
213.52
414.68
301.35 38
405.
311.47
251.26
177.29
268.19
171.54
271.38
201.33
MM-STEED
251.33
372.48
224.66
231.57
160.48
262.48
191.39
Trancfer/rre Traj
156.27
264.29
163.68
173.29
122.41
210.48
Red denoces the best resalt. and blze denoces the second best result
means lower better.
25

---

Table 13: Few-shot region transfer performance of methods on trajectory recovery on = # &8.
Daraset
Chenedu
-> Xinn
Chengdu
Porto
Xin
Parto
Xian
Chengdu
Pozto
Chengdu
Porto -?
Xinn
Metric
RMSE
MAE
RMSE 1 (meters)
MAE 1 (meteos)
RMSE
MAE 1 (mattors)
RMSE (metters)
MAE 1 (meterrs)
RMSE (mxcters)
MAE (mattons)
RMSE
MAE
Method
(meteers
(mateors)
(meteers)
(eneters)
(meteens)
DHTR
70
388.72
273.65
MTnujRec
358.73
566.40
417-15
376.00
269.47
382.31
275.81
472.92
RNTmjjeec
437.71
316.21
528.89
382.38 33
535. 25
387.96
324.00
219.96
338.63
257.19
446.29
$29.03
MM-STGED
383.08
285 06
491.11
369.49
503.30 86
375.26
279.22
208.54
275.5
204.97
374,99
291.16
TransferBray Braj
294,90
230. 79
461.66
327.96
473.73
339.08
203.04
158.42
198.43
152.80
288.77
215.32
demotos
Table 14: Few-shot region transfer performance methods on trajectory recovery on μ = E+ 16.
Dataset
Chengdu
Chengdu
Chengda
Chengdu
Motrie
RMSE
MAE (sacters)
RMSE |
MAF 1 (cacters)
RMSE (meters)
MAE (tacters)
RMSE (maters)
MAP.
RMSE (metees)
MAE (utetens)
RMSE |
MAP.
Method
(mesers)
(meters)
(cacters)
(materr)
(meters)
DHTR
673.85
$39.70
752.11
569.15
763.71
574.97
548.24
442.99
553.62
450.61
682.19
S49.39
MTrajRee
546.07
765.80
568.07
537.96
535.42
431.40
692.10
555.81
RNTnijRee
519.34
711.28
538.19
492.89
362.15
482.
646.12
MM-STGED
584.21
446.28
674.94
497.29
683.06
508.39
433.77
328.19 19
446.36
325.39
591.61
4522440
Trunsfer Traj
472.74
363.38
611.86
449.68
605. 98
453.94
318.14
235.84
327.70
244.86
466.49
358.82
Red denones the best reseit, and blue denotos the second best result
means lower better.
Table 15: Few-shot region transfer performance of methods on OD TTE.
Dataset
Chengdu + Xian
Chengdu + Porto
Xian + Porto
Metric
RMSE (minutes)
MAE (minutes)
MAPE L (%)
RMSE (minutes)
MAE 1 (minutes)
MAPE (%)
RMSE J (minutes)
MAE L (minutes)
MAPE
Method
(%)
LR
7.105
6.353
19.396
4.993
2.990
34,689
4.612
2.867
34.195
GBM
6.445
5.529
17.693
4,461
2.748
29.573
4.628
2.770
30.197
ST-NN
5.914
5.011
16.003
4.067
2,660
26.899
4.333
2.776
27.250
MuRAT
5.610
4.509
14.536
3.819
2.443
25.686
3.813
2.511
21.063
DeepOD
3,935
2.390
DOT
4.771
3.372
11.096
3.087
2,003
17.693
2.915
2.218
17.502
TransferTraj
4.286
2,928
9.376
2.565
1,533
15.378
2.447
1.598
15.935
Dataset
Xian - Chengdu
Porto - Chengdu
Posto - Xian
Metric
RMSE (minutes)
MAE (minutes)
MAPE L (%)
RMSE (minutes)
MAE (minutes)
MAPE (%)
RMSE J (minutes)
MAE (minutes)
MAPE
Method
(%)
LR
4.731
3.815
20.886
4.875
3,883
19.941
6.703
5.983
19.091
GBM
4.537
3.561
18.386
4.525
3.619
18.004
6.538
5.429
17.021
ST-NN
4.301
3.417
16.480
4,296
3.372
15,257
5.637
4.811
16.029
MuRAT
4.228
3.322
15..998
4.324
3.297
14.397
5.306
4.602
14.667
DeepOD
3.998
3.175
13.319
4.012
3.179
13.744
4,992
3.998
14.074
DOT
3.827
2.991
11.967
3.709
3,204
12.481
4.536
3.029
12.636
TrausferTraj
3.532
2.730
9.990
3.691
2.811
9.803
4.339
2.874
10.946
denotes the
blue the secoud-best result. J. micans betler.
E Performance Comparison in Few-shot Region Transfer
We conduct regional transfcrability experiment under the assumption that small amount of data is available in the target region. To evaluate model performance in this setting, we first train the models on source region and then fine-tune them using 5,000 trajectories from the target region. The results across three downstream tasks and all datasets are shown in Table I1 12 13 14 and [5] Our model consistently achieves the best performance, with improvements of 33.68% 68%, 18.08 %, and 13.07%
TP, TR, and OD TTE tasks, respectively. Compared to the zero-shot transfer setting discussed in Section 5. baseline models show significant performance gains after fine-tunin tuning, as they focus on learning region-specific representations. In contrast, the superior transferability of our model stems from its carefully designed region-agnostic feature representation, which enables robust adaptation across different geographic areas.
F Hyperparameter Study
We analyze three key hyperparameters: the hidden state dimension of the model, the number of block L of stacked TRIE and SC-MoE, the value of k and the number of experts C' in the SC-
26

---

Table 16: Hyperparameter range and optimal value.
Parameter
Range
number of hidden state
32, 64, 128, 256,
The number of layer of stacked TRIE and SC-MoR
5.4.6.6
The number experts in the SC-MoE
G1
Cg
distance threshold pot
50, 100, 150, 200
POI and road segment and Fiiet
Changdu
Xi'an
Porto
300
250
RMSE
MAE
RMSE
MAE
RMSE
MAE
200
RMSE
200
RMSB
200
RMSE
250
180
200
150
150
150
32
64
128
256
512
200
32
64
128
256
512
32
64
128
256
512
Figure 3: Hyperparameter analysis of the d.
Chengdu
Xi'a
Parto
RMSE
MAB
RMSE
2,50
RMSE
180
MAB
200
160
150
150
3
3
4
4
Figure Hyperparameter analysis of the
Cbengdu
Xi'an
Porto
300
250
250
300
RMSE
250
m
IMSE
MAB
RMSE
180
250
160
140
C3
63
C4
6
C6
C
C1
C2
C3
Co
G
G
G
C.
Ce
Co
Figure 5: Hyperparameter analysis of the value of and the number of expert C.
Cbenglu
Xi'nn
Porto
300
250
250
RMSE
MAE
300
RMSE
MAB
RMSE
MAB
200
&MSE
250
200 E
200
RMSE
250
250
100
200
140
1.0
200
50m
100m
150m
200m
50m
100m
150m
200m
50m
100m
190m
200m
Figure 6: Hyperparameter analysis of the distance threshold of POI and road segment po and
road
MoE, and the distance threshold of POI and road segment poi and Paiitt The values of these hyperparameters, along with their optimal value, are summarized the 16] Figure 3 and 6 present the experimental results of these hyperparameters on three datasets for trajectory prediction tasks. The results show that varying significantly impacts model performance, and has an optimal value of 2; beyond that, the model becomes overly complex and harder to train. The optimal value
27

---

for d is 256; smaller values limit the model's 's learning capability, while larger values offer minimal performance gains and decrease computational efficiency.
For the SC-MoF, setting = and the number of experts C yields optimal performance. This can be attributed to the fact that too few experts limit the model's ability capture trajectory movement patterns, as they can handle only limited spatial context. On the other hand, increasing the number of experts excessively raises model complexity, complicating the training process and ultimately compromising performance.
For the poi and road Chengdu and Porto datasets achieve optimal performance at 100 meters, while Xi' an performs best 155 meters. This difference likely stems from Xi' an's sparser POI and road network distribution (~ 111.44 POIs and road segments per km in Xi' vs. 263. 10 Chengdu and 282.87 in Porto), where a smaller radius does not capture sufficient spatial context. Performance first improves then declines with increasing distance, indicating that insufficient POIs/road segments provide inadequate contextual information while excessive numbers introduce redundancy.
28


Reviews:
[{"review_id": "1hdqPX7rvs", "reviewer": "Reviewer_qUMg", "summary": "This paper proposes TransferTraj, a novel vehicle trajectory learning model designed for both transferability across regions and downstream tasks. The author introduces RTTE and spatial, temporal, POI, and road network modalities to address region transfer by modeling relative spatial relationships using a rotary position matrix and dynamically routing trajectories to experts based on local spatial context. Additionally, the paper introduces the unified input and output structures for various tasks via modality and points masking and recovery, enabling task transfer after pre-training. Extensive experiments on three real-world datasets show SOTA performance in task transfer and zero-shot region transfer.", "questions": "1.The experiments are conducted with k=4 and C=8, but Figure 2 shows that the number of activated experts in different-density regions mostly concentrates around 2, 3, and 4. Does this suggest that some experts may be redundant?\n\n2.When the sampling rate is set to $\\mu=16\\epsilon$, both the proposed model and the baseline experience a significant increase in error. What might be the underlying cause of this phenomenon?\n\n3.In the pre-training section, how are the lengths of the masked start and end segments defined? how is the modality mask of trajectory points determined?\n\nThe TRIE module is designed to address generalization with varying trajectory lengths. What is the distribution of trajectory lengths across different regions? Is the model sensitive to trajectory length or sampling frequency?", "limitations": "yes", "rating": 5, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 3, "originality": 3, "strengths_and_weaknesses": "Strengths:\n1.The paper introduces a novel problem formulation and is the first to incorporate both regional and task transferability into a single model, laying the foundation for the development of a trajectory base model.\n\n2.This paper presents a well-designed and technically sound architecture. The TRIE and SC-MoE modules effectively handle spatial feature differences and regional context distributions. A unified pre-training strategy enables multi-task learning without introducing additional parameters.\n\n3.Experiments are comprehensive and rigorous, covering three tasks, three datasets, and diverse transfer scenarios. Ablation and efficiency studies further validate the model’s effectiveness and lightweight design.\n\n4.The paper is well-structured and clearly articulates its research objectives, methodology, and conclusions.\n\nWeakness:\n1.Although the authors claim that the TRIE module addresses the challenge of varying trajectory lengths across regions, they do not provide a clear explanation of how this is achieved. Additionally, the paper lacks an analysis of trajectory length distribution differences across datasets to support this claim.\n\n2.The author terms the top-K gating mechanism \"prevent the movement patterns from being represented by the same set of experts\", however, it does not explain why or how this mechanism successfully enforces expert diversity.\n\n3.There are some inconsistencies in the writing. For example, the term \"trajectory modality\" is used interchangeably as \"modality\" and \"feature\" throughout the paper. The masked spatial and temporal modalities ( p^{ms} and p^{mt} in Section 4.2) are not clearly illustrated in the figures.", "was_revised": true, "final_justification": "All my concerns have addressed and I keep a postive score on this paper.", "rebuttal": "Thank you for your positive and insightful comments. We are delighted that the reviewer found our motivation interesting and reasonable. Below, we address each of your concerns and questions in detail:\n\n\n\n> [W1 & Q4] Explaining why TRIE can address the challenge of varying trajectory lengths and the analysis of trajectory length distribution.\n\n**About TRIE's generalization to varying trajectory lengths:** TRIE achieves length generalization through its learnable spatial-temporal rotation matrix encoding method. Each trajectory point is encoded as a rotation vector on the $d$-dimensional plane, where relative spatial distance information between trajectory points is naturally embedded through cosine and sine functions. This design ensures that angular differences between positions remain both periodic and continuous, maintaining robustness when processing sequences longer than those seen during training. Therefore, TRIE can seamlessly extend to longer sequences during inference while preserving accurate relative position representation and computational stability.\n\n**About trajectory length distribution:** The datasets exhibit different trajectory length distributions: Chengdu has lengths ranging from 20-120 points with an average distance of 4.057km; Xi'an ranges from 20-120 points with an average distance of 5.253km; Porto ranges from 20-100 points with an average distance of 8.284km. These statistical differences in length distributions make cross-dataset transfer challenging. Our zero-shot transfer experiments demonstrate that TRIE maintains strong generalization ability across these varying distributions, validating its effectiveness.\n\n\n\n> [W2] The author terms the top-K gating mechanism \"prevent the movement patterns from being represented by the same set of experts\", however, it does not explain why or how this mechanism successfully enforces expert diversity.\n\nIntroducing the top-K gating mechanism in the routing stage can break the model's over-reliance on specific experts, increase the randomness of routing decisions, and improve the overall utilization of experts. In standard MoE architectures, the router tends to repeatedly select a few high-performing experts, causing different movement patterns to be assigned to the same subset of experts. This leads to expert overload and overfitting, weakening the model's expressiveness and generalization ability. The top-K gating mechanism prevents this by forcing the model to explore more diverse expert combinations during training, ensuring better utilization of all available experts. This design enables the model to capture fine-grained differences in movement patterns more effectively. Each expert specializes in a specific subspace of movement patterns, enhancing the model's ability to distinguish and generalize across complex and diverse trajectory behaviors.\n\n\n\n> [W3] There are some inconsistencies in the writing. \n\nThank you for your observations. We will revise them in the revision.\n\n\n\n> [Q1] The experiments are conducted with k=4 and C=8, but Figure 2 shows that the number of activated experts in different-density regions mostly concentrates around 2, 3, and 4. Does this suggest that some experts may be redundant?\n\nAlthough experts 2, 3, and 4 are frequently activated, each operates within different spatial density contexts. Expert 3 is primarily activated in high-density areas, expert 2 in medium-density areas, and expert 4 in low-density areas. This pattern demonstrates that the model effectively allocates different spatial contexts to different experts through the routing mechanism. Furthermore, the combination of activated experts varies significantly across density levels, confirming that our model adaptively activates appropriate experts based on spatial context, enhancing its modeling capability. Additionally, our hyperparameter study in Figure 5 examines the effect of the number of experts C and activations K on model performance. The experimental results show that reducing the number of experts leads to noticeable performance degradation. Therefore, the current configuration of K=4 and C=8 represents a balanced and optimal choice.\n\n\n\n> [Q2] When the sampling rate is set to $\\mu=16\\epsilon$, both the proposed model and the baseline experience a significant increase in error. What might be the underlying cause of this phenomenon?\n\nThis phenomenon occurs because the missing rate of trajectory points is extremely high. When $\\mu = 16 \\times \\epsilon$, 93.75% of trajectory points are missing, resulting in severely limited available information. Consequently, both our model and baselines experience degraded performance compared to other sampling rates. However, our model still maintains significant improvement over baselines even under these challenging conditions, further demonstrating its effectiveness.\n\n\n\n> [Q3] In the pre-training section, how are the lengths of the masked start and end segments defined? how is the modality mask of trajectory points determined?\n\nDuring pre-training, we randomly divide each trajectory into multiple non-overlapping segments, with the number of segments set to $0.2 \\times T$, where $T$ represents the trajectory length. We then randomly select 40% of these segments and apply trajectory point masking to all points within the selected segments. For the remaining trajectory portions, we further select 20% of the trajectory points and apply either spatial or temporal modality masking. These parameter settings will be clarified in the revised version."}, {"review_id": "bxyL6pzuLY", "reviewer": "Reviewer_sVcu", "summary": "This paper presents an innovative vehicle trajectory learning framework that supports both region and task transfer. It addresses the limitations of existing embedding-based methods, which usually require retraining when applied to new regions or tasks. The model uses four modalities and two key modules TRIE and SC-MoE to capture relative spatial relationships and adapt to different movement patterns across regions. The authors also propose a unified input-output scheme that reformulates various tasks as a masking and recovery problem, making it possible to pretrain the model in a task-agnostic way. Experiments show that TransferTraj performs exceptionally well on three real-world datasets.", "questions": "1.Compared to traditional trajectory representation learning models, what are the core advantages of TransferTraj in terms of task transferability?\n\n2.Why can the POI and road network modalities generalize across different regions, given that their spatial distributions and semantics may differ?\n\n3. In the task-transferable input-output scheme, how are the masking rates for modalities and trajectory points determined?", "limitations": "Yes", "rating": 5, "confidence": 5, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 4, "clarity": 3, "significance": 3, "originality": 4, "strengths_and_weaknesses": "Strengths:\n1.The paper presents an interesting topic and introduces a novel unified framework that supports both region and task transfer within a single model, without requiring retraining. The proposed RTTE module and the task-transferable input-output scheme are both innovative and effective. Together, they enable the model to generalize well to other regions, different spatial contexts, and various trajectory-related tasks.\n\n2.The authors provide a theoretical derivation to show that the proposed module is effective in capturing the relative spatial relationships between trajectory points.\n\n3.The paper is well-structured and logically organized. It clearly explains the motivation and challenges of learning relative spatial information, capturing dynamic movement patterns, and designing a unified input-output format.\n\n4.The author conducts comprehensive experiments on zero-shot, few-shot, and task transfer scenarios across multiple tasks and datasets, proving that the proposed models can outperform the SOTA. The code and data are publicly available, which ensures reproducibility.\n\nOverall, I think this paper offers an interesting and novel solution for transferable vehicle trajectory learning, but a few weaknesses can be highlighted:\n\nWeakness:\n\n1.Theoretically, trajectory representation learning models can also achieve task transferability by attaching task-specific heads. What are the key advantages of TransferTraj compared to these methods?\n\nSince POIs and road network structures vary significantly across regions, the authors should further clarify how these two modalities are encoded.", "was_revised": true, "final_justification": "The article is particularly good. rebuttal perfectly solved my problem. I suggest accepting this article.", "rebuttal": "Thank you for your positive and insightful comments. We are delighted that the reviewer found our motivation interesting and reasonable. Below, we address each of your concerns and questions in detail:\n\n\n\n> [W1 & Q1] The key advantages of TransferTraj compared to traditional trajectory representation learning models.\n\nTrajectory representation learning models pre-train an encoder to obtain universal trajectory embeddings, requiring separate training of task-specific output heads, which incurs additional training costs. Furthermore, our experiments demonstrate that trajectory representation learning requires joint fine-tuning of both the pre-trained encoder and output head when applied to various tasks (as shown in Table 1). \n\nIn contrast, TransferTraj eliminates the need for task-specific output heads and additional training, directly adapting to various tasks through our well-designed pre-training scheme while achieving excellent experimental results. Additionally, our model transfers directly to other regions without retraining while maintaining strong performance, whereas existing trajectory representation learning models require separate training for each region.\n\n\n\n> [W2 & Q2] Further clarify how POI and road network modalities are encoded, and explain why they can be generalized across different regions.\n\n\n\nWhen encoding POIs and road networks, we utilize textual descriptions rather than ID embeddings to capture semantic information. As described in the Preliminaries section, we represent POIs using their name, type, and address as text descriptions, while road segments are described using their name, type, and length. These text descriptions are input into OpenAI's pre-trained text embedding model to generate fixed-dimension vectors. Since the extracted semantic information depends solely on POI and road network attributes and is independent of specific regions, this approach guarantees transferability across different geographical areas.\n\n\n\n> [Q3] In the task-transferable input-output scheme, how are the masking rates for modalities and trajectory points determined?\n\nDuring pre-training, we randomly divide each trajectory into multiple non-overlapping segments, with the number of segments set to $0.2 \\times T$, where $T$ represents the trajectory length. We then randomly select 40% of these segments and apply trajectory point maskinxg to all points within the selected segments. For the remaining trajectory portions, we further select 20% of the trajectory points and apply either spatial or temporal modality masking. These parameter settings will be clarified in the revised version."}, {"review_id": "1Afe9uyRqJ", "reviewer": "Reviewer_dG9Z", "summary": "This article proposes TransferTraj, a deep learning-based architecture designed to facilitate transfer across regions and tasks in the context of trajectory prediction. The model addresses domain discrepancies that arise between different geographic regions and related tasks, such as prediction, recovery, and travel time estimation. To achieve this, it introduces the Region-Transferable Trajectory Encoder (RTTE), which encodes spatial and temporal information from trajectories. RTTE includes two key components: TRIE, which captures relative spatial relationships between trajectory points, and SC-MoE, a mechanism that detects movement patterns based on local context by leveraging similarities in urban or road environments. Additionally, the article proposes a task-transfer scheme based on masking and recovering trajectory modalities or points. The proposed approach is evaluated on three real-world datasets and compared against multiple baseline methods, showing improvements in accuracy and generalization capability.", "questions": "In the proposed method, there are some important implementation details that remain unclear. For instance, in the definition of the POI modality: ” The POI modality $Pi = {l | dis(l, pi) ≤ \\underset{\\text{dist}}{\\varphi^{\\text{poi}}}}$ is defined as the set of all POIs lying within a distance $\\underset{\\text{dist}}{\\varphi ^{\\text{poi}}}$ of the trajectory point $pi$.”\nWhat specific distance metric is used for dis(l, pi)? Is it the Haversine distance, Euclidean, or another geodesic measure appropriate for geographic coordinates?\n\nIn the same context, $\\underset{\\text{dist}}{\\varphi ^{\\text{poi}}}$ and $\\underset{\\text{dist}}{\\varphi ^{\\text{road}}}$ are introduced as distance thresholds for selecting POIs and road segments around each trajectory point. However, it is not explained how these hyperparameters were selected. Were these values fixed across all datasets, or tuned for each region individually? What was the rationale or methodology behind the selection of these thresholds?\n\nRegarding the Transformer-based multimodal architecture, it is unclear whether the model was trained entirely from scratch or built upon a pre-existing encoder. Could the authors clarify whether a standard Transformer (e.g., RoFormer, ViT, etc.) was adapted, or whether the encoder was implemented from the ground up? Additionally, how many layers and attention heads are used in the RTTE module?\n\nAlthough Figure 1 provides a schematic overview of the proposed architecture, its connection to the textual description is limited. I suggest aligning the narrative more explicitly with the labeled components of the figure as the model is described. In particular, the integration of the four modalities (spatial, temporal, POI, road network) is conceptually important but currently somewhat unclear. A more detailed mapping between the components in the figure and their function in the pipeline would greatly improve clarity.", "limitations": "The paper presents certain technical limitations, particularly regarding the lack of detailed experimentation and insufficient information on the training and comparison of baseline models. For further discussion, please refer to the “Weaknesses” and “Questions” sections.", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 3, "originality": 3, "strengths_and_weaknesses": "Strengths:\n- The article addresses a real and relevant problem: the generalization of trajectory models to new regions and tasks.\n- It proposes an architecture that integrates key components to improve transferability across regions and tasks, combining several established deep learning techniques such as mixture-of-experts, attention mechanisms, and masking + recovery strategies. Additionally, the use of a rotation matrix to capture spatiotemporal information is a novel and valuable idea.\n- Multiple baseline models are considered for comparison, which supports the empirical evaluation of the proposed method.\n\nWeaknesses:\n- Although several baselines are used for comparison, the paper does not specify how they were trained or tuned. It is not clear whether pre-trained weights were reused or whether hyperparameters were fairly adjusted, which raises concerns about the fairness of the comparisons.\n- The paper lacks implementation details such as the number of layers, embedding size, batch size, and task-specific learning rates. These aspects are only superficially mentioned in the appendices and not explained in the main text.", "was_revised": true, "final_justification": "I will raise my score to an acceptance. The authors have satisfactorily addressed my questions, and I have read the comments from other reviewers, which indicate that the paper has the potential to be accepted", "rebuttal": "Thank you for your insightful feedback! We are grateful for your acknowledgment of our idea. Below, we address each of your concerns and questions in detail:\n\n\n\n> [W1] Although several baselines are used for comparison, the paper does not specify how they were trained or tuned. It is not clear whether pre-trained weights were reused or whether hyperparameters were fairly adjusted, which raises concerns about the fairness of the comparisons.\n\nFor baseline settings, we adopted hyperparameters reported in the original papers and retrained models from scratch on our datasets. For trajectory representation learning baselines, we first pre-trained their trajectory encoders from scratch, then fine-tuned both encoders and output heads following standard trajectory representation learning protocols. For baselines used in trajectory recovery and origin-destination travel time estimation tasks, we conducted end-to-end training from scratch. Baseline settings are described in Appendix B.2 (lines 448-450), and we will include these clarifications in the revised version.\n\n\n\n> [W2] The paper lacks implementation details such as the number of layers, embedding size, batch size, and task-specific learning rates. \n\nDue to page limitations, implementation details are provided in Appendix B.2. Our settings are: number of layers $L = 2$, embedding size $d = 128$, batch size 64, and learning rate $1 \\times 10^{-4}$. These choices are justified through hyperparameter experiments presented in Appendix G (Figures 3-5). If accepted, we will move this content to the main text.\n\n\n\n> [Q1] What specific distance metric is used for dis(l, pi)? Is it the Haversine distance, Euclidean, or another geodesic measure appropriate for geographic coordinates?\n\nWe use Haversine distance to calculate the distance between the trajectory point and the POI in meters.\n\n\n\n> [Q2] How to select the hyperparameter of  $\\varphi_{\\text{dist}}^{\\text{poi}}$ and $\\varphi_{\\text{dist}}^{\\text{road}}$ ?\n\nThe parameters $\\varphi_{\\text{dist}}^{\\text{poi}}$ and $\\varphi_{\\text{dist}}^{\\text{road}}$ are region-specific and adjustable. We added a hyperparameter experiment on Chengdu, Xi'an, and Porto dataset in trajectory prediction task.\n\n|                                                              | Chengdu    |            | Xi'an      |            | Porto      |            |\n| ------------------------------------------------------------ | :--------- | ---------- | ---------- | ---------- | ---------- | ---------- |\n| $\\varphi_{\\text{dist}}^{\\text{poi}}, \\varphi_{\\text{dist}}^{\\text{road}}$ | RMSE       | MAE        | RMSE       | MAE        | RMSE       | MAE        |\n| 50m                                                          | 193.18     | 155.38     | 238.29     | 172.41     | 204.29     | 157.11     |\n| 100m                                                         | **187.91** | **144.53** | 224.13     | 165.39     | **196.46** | **149.75** |\n| 150m                                                         | 195.36     | 152.49     | **212.62** | **154.86** | 209.51     | 154.03     |\n| 200m                                                         | 213.48     | 164.20     | 217.98     | 160.32     | 220.47     | 169.10     |\n\nThe experiment results show that Chengdu and Porto datasets achieve optimal performance at 100 meters, while Xi'an performs best at 150 meters. This difference likely stems from Xi'an's sparser POI and road network distribution (~111.44 POIs and road segments per $\\text{km}^2$ in Xi'an vs. ~263.10 in Chengdu and ~282.87 in Porto), where a smaller radius does not capture sufficient spatial context. Performance first improves then declines with increasing distance, indicating that insufficient POIs/road segments provide inadequate contextual information while excessive numbers introduce redundancy. This hyperparameter analysis will be included in the revised version.\n\n\n\n> [Q3] Regarding the Transformer-based multimodal architecture, it is unclear whether the model was trained entirely from scratch or built upon a pre-existing encoder. Could the authors clarify whether a standard Transformer (e.g., RoFormer, ViT, etc.) was adapted, or whether the encoder was implemented from the ground up? Additionally, how many layers and attention heads are used in the RTTE module?\n\nThe model is trained entirely from scratch, adapted from RoFormer by replacing the original rotary position encoding with our learnable spatiotemporal position encoding and substituting the fully connected layer with SC-MoE. These modifications enable better capture of relative relationships between trajectory points and adaptive extraction of movement patterns based on surrounding spatial context, enhancing regional transferability.\n\nAccording to our hyperparameter experiments (Appendix G, Figure 4), the RTTE model uses 2 layers with 1 attention head.\n\n\n\n> [Q4] Although Figure 1 provides a schematic overview of the proposed architecture, its connection to the textual description is limited.\n\nWe appreciate your careful observation and constructive suggestions. We will revise Figure 1 to better align the visual components with the textual description, providing clearer mapping between the four modalities (spatial, temporal, POI, road network) and their integration in the pipeline. Specifically, we will present a more intuitive pipeline that illustrates the association between trajectory points and the four modalities, as well as the encoding and mixing processes of these modalities. For the TRIE module, we will clearly show its capability to capture the relative relationships between trajectory points. Additionally, we will update the figure’s labels to ensure consistency with the textual description."}, {"review_id": "mtAahj5MTG", "reviewer": "Reviewer_rKX5", "summary": "TransferTraj proposes a unified trajectory-learning framework that simultaneously enables region-level and task-level transfer. Without retraining, the mask-and-recover pre-training objective can be applied to three generative downstream tasks—trajectory prediction, trajectory recovery, and OD travel-time estimation. Experiments on Chengdu, Xi’an, and Porto taxi datasets show that TransferTraj outperforms strong baselines, confirming both its effectiveness and scalability.", "questions": "See weakness.", "limitations": "Yes", "rating": 5, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 3, "originality": 3, "strengths_and_weaknesses": "Strengths\n\n(1) The authors tackle both region and task transferability in a single framework, reducing the need to train and maintain multiple region- or task-specific models.\n\n(2) Extensive experiments provide strong empirical evidence for the ability of TransferTraj.\n\n(3) A unified masking-and-recovery pre-training scheme enables zero-shot usage on three heterogeneous generative tasks without re-training prediction heads.\n\n\n\nWeaknesses\n\n(1) The evaluation of TP task only focuses on the precision of the trajectories’ destinations and ignores the intermediate trajectory, which weakens the claim of accurate trajectory prediction.\n\n(2) The unified input and output scheme of three tasks is pivotal to the task transferability, which is just stated in Appendix. Without an explicit, worked example in the main body, it will hurt clarity and reproducibility.", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your insightful feedback! We are grateful for your acknowledgment of our work. Below, we address each of your concerns and questions in detail:\n\n\n\n> [W1] The evaluation of TP task only focuses on the precision of the trajectories’ destinations and ignores the intermediate trajectory, which weakens the claim of accurate trajectory prediction.\n\nWe conducted additional experiments evaluating trajectory prediction performance for predicting 1, 2, 3, 4, and 5 future trajectory points on the Chengdu dataset. The experiment results show that the prediction error increases with the number of predicted steps. However, our model consistently outperforms baselines across all prediction lengths, demonstrating its effectiveness in trajectory prediction tasks.\n\n|                           |      | START  | LightPath | TransferTraj (Ours) |\n| ------------------------- | ---- | ------ | --------- | ------------------- |\n| Further 1-step prediction | RMSE | 58.59  | 63.37     | **22.83**           |\n|                           | MAE  | 36.35  | 54.52     | **15.94**           |\n| Further 2-step prediction | RMSE | 142.55 | 177.03    | **63.86**           |\n|                           | MAE  | 93.64  | 168.40    | **43.62**           |\n| Further 3-step prediction | RMSE | 218.21 | 368.26    | **117.50**          |\n|                           | MAE  | 163.44 | 201.18    | **98.18**           |\n| Further 4-step prediction | RMSE | 296.94 | 427.34    | **162.47**          |\n|                           | MAE  | 207.06 | 284.87    | **120.10**          |\n| Further 5-step prediction | RMSE | 333.10 | 553.27    | **187.91**          |\n|                           | MAE  | 240.40 | 360.86    | **144.53**          |\n\n\n\n> [W2] The unified input and output scheme of three tasks is pivotal to the task transferability, which is just stated in Appendix. Without an explicit, worked example in the main body, it will hurt clarity and reproducibility.\n\nDue to page limitations, the unified input-output scheme details for three tasks are provided in Appendix C. If the paper is accepted, we will move this critical content to the main text for better clarity and reproducibility."}]

Author rebuttal:

Meta-review: This paper proposes TransferTraj, a novel vehicle trajectory learning model designed for both transferability across regions and downstream tasks. It is the first to incorporate both regional and task transferability into a single model, laying the foundation for the development of a trajectory base model. Further, the novelty of the proposed method is recognized by all reviewers. Extensive experiments are conducted to validate the proposed effectiveness of the proposed method. The authors' rebuttals have fully  addressed all reviewers' concerns and all reviewers recommended the acceptance of the paper.
Decision: Accept (oral)