GTR: A General, Multi-View, and Dynamic Framework for Trajectory Representation Learning
Authors: Xiangheng Wang
Ziquan Fang
Chenglong Huang
Danlei Hu
Lu Chen
Yunjun Gao
Venue: ICML 2025 poster (2025)
Keywords: Trajectory representation learning
mobility learning
spatio-temporal learning
Primary area: deep_learning->other_representation_learning

Abstract: Trajectory representation learning aims to transform raw trajectory data into compact and low-dimensional vectors that are suitable for downstream analysis. However, most existing methods adopt either a free-space view or a road-network view during the learning process, which limits their ability to capture the complex, multi-view spatiotemporal features inherent in trajectory data. Moreover, these approaches rely on task-specific model training, restricting their generalizability and effectiveness for diverse analysis tasks. To this end, we propose GTR, a general, multi-view, and dynamic Trajectory Representation framework built on a pre-train and fine-tune architecture. Specifically, GTR introduces a multi-view encoder that captures the intrinsic multi-view spatiotemporal features. Based on the pre-train and fine-tune architecture, we provide the spatio-temporal fusion pre-training with a spatio-temporal mixture of experts to dynamically combine spatial and temporal features, enabling seamless adaptation to diverse trajectory analysis tasks. Furthermore, we propose an online frozen-hot updating strategy to efficiently update the representation model, accommodating the dynamic nature of trajectory data. Extensive experiments on two real-world datasets demonstrate that GTR consistently outperforms 15 state-of-the-art methods across 6 mainstream trajectory analysis tasks. All source code and data are available at https://github.com/ZJU-DAILY/GTR.

GTR: A General, Multi Mulw, and Dynamic Framework for Trajectory Representation Learning
Xiangheng Wang'
Ziquan Fang' Chenglong Huang'
Danlei Hu
Lu Chen
Yunjun Gao
Abstract
1. Introduction
With the widespread use of GPS devices and prcation-based services, large volumes of trajectory data have been col- lected (Wang et al., 2020; Zhou et al., 2024). A trajectory is typically represented as sequence of spatio-temporal points, capturing the movement of a mobile object (e.g., a person or vehicle) and enabling various applications (Jeong et al., 2014; LOU et al., 2021), such as similarity search (Li et al., 2018), and transportation mode classification (Hu et al., 2024). Traditional approaches often rely man- ually extracted features for these analyses (Wang al., 2020), overlooking hidden correlations between trajecto- ries and thereby limit performance. Recently, trajectory representation learning has emerged (Chen et al., 2021; Fu Leee, 2020; Jiang et al., 2023a), aiming to transform high-ddmensiooal trajectories into low-dimensional vectors (i.e., trajectory embeddings) that retain essential information from the original data and capture hidden features. These vectors are then fed into a range of trajectory analysis tasks.
Trajectory representation learning aims to trans- form raw trajectory data into compact and low- dimensional vectors that are suitable for down- stream analysis. However, most existing meth- ods adopt either a free-space view a road- network view during the learning process, which limits their ability to capture the complex, multi- view spatiotemporal features inherent in trajec- tory data. Moreover, these approaches rely on task-specific model training, restricting their gen- eralizability and effectiveness for diverse analy- sis tasks. To this end, we propose GTR, gen- eral, multi-view, and dynamic Trajectory Rep- resentation framework built on pre-train and fine-tune architecture. Specifically, GTR intro- duces a multi-view encoder that captures the in- trinsic multi-view spatiotemporal features. Based on the pre-train and fine-tune architecture, we provide the spatio-tempora fusion pre-training with spatio-temporal mixture of experts dy- namically combine spatial and temporal features, enabling seamless adaptation to diverse trajectory analysis tasks. Furthermore, we propose an online frozen-hot updating strategy to efficiently update the representation model, accommodating the dy- namic nature of trajectory data. Extensive experi- ments on two real-world datasets demonstrate that GTR consistently outperforms 15 state-of-th of-te--o-hheaarr methods across 6 mainstream trajectory analysis tasks. All source code and data are available at https///ittubb.cmm/UUUUAAAYYYYAD
Existing trajectory representation learning studies can be divided into two categories: (i) free-space settings and (ii) retd-ne settings. In free-space settings, early stud- ies (Fang et al., 2021; Li et al., 2018) treat trajectories as pure point sequences, disregarding road network constraints. Thus, they typically apply sequential models like LSTMs and RNNs to capture the spatio-temporal dependencies in trajectory data. Since moving objects, such as people and vehicles, are constrained by road networks, road-network- based trajectory representation learning methods have been developed. These approaches (Fang et al., 2022; Fu & Lee, 2020; Han al., 2021; Yao al., 2022) typically begin by learning embeddings for road segments using graph neural networks (GNNs) with road network graphs as input. Sub- sequently, hidden spatio-temporal relations can be captured by feeding the road segment embeddings into sequential models, which are trained on task-specific objectives. Re- cently, state-of-the-art methods, including START (Jiang et al., 2023a) and JGRM (Ma al., 2024), have adopted self-supervised learning paradigms to improve the general- ization of trajectory representation learning across various tasks. More detailed works can be found in Appendix A. However, there are still some unsolved challenges in devel-
'Equal contribution 'School of Software, Zhejiang University, Ningbo, China *College of Computer Science, Zhejiang Univer- sity, Hangzhou, China, Correspondence to: Ziquan Fang <zq- fang @zju.edu.cn>
Proceedings of the 42nd International Conference Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).

---

GTR: A General, Multi- View, and Dynamic Framework for Trajectory Representation Learning
Residarial
POls
Service
Trapetery
OBter
POLs
Closificabor
Commersial
POIs
Trinug
Tranug
Triinig
Fize
A Real Trajectory
Emledding
Sturt Point
2
3
5
Readenticcl Ame
Model
Model
Pre-trriing
End Point
Secvice Ane
(a) Task-Specific pproach
(b) Our GTR A pproach
Map-maicholl Route
11
12
13
14-1
Commercial
Figure 2. Task Task-Specific Approach vs. Our General Approach
(b) Road Network View
(c) Free Space View
tuning has achieved great success in the representation learn- ing field (Fu & Lee, 2020), its direct utilization trajectory representation learning (Jiang al., 2023a; Ma et al., 2024) may hinder the model's robustness and generalization. Ac- cording to Table 9, even the state-of-the-art methods (Chen et al., 2021; Fu & Lec, 2020; Jiang et al., 2023a; Ma et al., 2024; Yang et al., 2021b) only address a limited subset of trajectory analysis tasks. This limitation arises due to confliciing correlations between different tasks. Therefore, how to balance the learning of spatial and temporal features to automatically adapt to various trajectory analysis tasks remains an unaddressed challenge.
Figure I. Free Space View vs, Road Network View
oping an effective trajectory representation learning model. Cl: Limitation of single-view representation. As men- tioned, existing representation learning methods generally model trajectory data from a single perspective- a free space view or a road network view. However, trajectory data encompasses complex spatio-temporal semantic infor- mation, while many essential semantic nuances required for downstream tasks cannot be fully captured from a single view. Fig. ((a) depicts real trajectory T on the road network, along with the complex surrounding environment. Fig. l(b) presents a representa- tion of T from the road-network view, which captures only its topological structure while neglecting the regional se- mantics of the traversed areas. As result, the trajectory embeddings learned in this manner may fail to encode the latent semantic meanings of the passed road segments or regions, potentially undermining downstream tasks such as semantic-aware trajectory similarity searches. In con- trast, Fig. I(c) illustrates the trajectory's 's representation in free-space view using a grid partitioning method (Li al., 2018). This example indicates that relying on single view may fail to capture the multi-faceted features of trajecto- ries. Although recent studies (Lin et al., 2023; Ma et al., 2024; Yi et al., 2024) have incorporated multi-dimensional information for trajectory learning, they differ from our set- ting, as they encode the road segments with GPS points. In contrast, we encode the road segments and grids with the latent semantic features, enabling more fine-grained spatio- temporal learning, as proved by experiments. Overall, how to collaboratively integrate multiple views for trajectory representation learning is challenge.
features and
C3: Lack of support for model update. Trajectory data exhibit strong dynamic characteristics, particularly in urban areas where large volumes of trajectories are continuously generated (Chen al., 2024). This constant influx of new data creates an evolving context, as trajectory movement patterns continuously adapt to changing traffic conditions. Consequently, it is crucial to continuously learn the latest spatio-temporal features from new trajectories to maintain an accurate and up-to-date representation learning model. However, as shown in Table 9, none of the state-of-the-ar methods currently support model updating, limiting their effectiveness in dynamic environments where data patterns are constantly shifting. Achieving online model updates presents significant challenge, as streaming trajectories exhibit complex spatio-temports correlations that are com- putationally intensive to extract in real time.
Contributions. To address the challenges above, we pro- pose GTR, General, multi-view, and dynamic Trajectory Representation learning framework, designed to generate ro- bust embeddings that support various downstream trajectory analysis tasks. To track challenge CI, we introduce an effec- tive Multi- Encoder (MVE), which encodes the origi- nal trajectories from both free-space and road-network per- spectives, integrating semantic regional and road topology information capture sufficient spatio-temporal features. To overcome challenge C2, we propose Spatio-Temppral fusion Pre- Pre-training (STP) based on Transformer, where we devise a Spatio-Temppraa Mixture of Expert (ST-MoF)) mod- ule to learn and adapt distinct spatio-temporal features re- quired by various tasks in a data-driven manner, providing a dynamic approach to integrate spatio- temiiialtmprrall features. In the fine-tuning stage, we provide a suite of tuning methods
C2: Limitation of multitasking. As aforementioned, quite a few approaches (Fang et al., 2023; Jiang et al., 2023b; Si et al., 2023) are designed for specific trajectory analysis tasks, which limits their generalizability across different applications. As shown in Fig 2(a), the task-specific ap- proaches require training separate models for each task, resulting in substantial development costs. In contrast, we aim to propose a general approach, illustrated in Fig. 2(b), to support a wide range of downstream tasks. While the sulf-supe learning paradigm of pre-training and fine-
2

---

GTR: A General, Multi- Nieti-View,aa and Dynamic Framework for Trajectory Representation Learning
is then mapped to a grid-constrained trajectory, offering auxiliary spatial information to enhance feature extraction within the road network context.
Table
I. Notations and Deseriptions
Notation
Description
T
GPS trajectory.
Definition 2.4 (Grid Constrained Trajectory). A grid constrained trajectory 7 is time-ordered sequence of grid cells, i.c., T ((g, tt S i S Ly 9i E G)), where G is set of grid cells, ty is the visit timestamp for Jt. and L is the length of T
T9
Grid-constrained trajectory.
T
hoad-network-conssee trajectory.
g
Grid cells.
G
Road network.
D
Road trajectory dataset.
Problem Statement. For road network G and a trajec- tory dataset D (T I i IDT]), goal is to learn a generalized representation h; for each trajectory Ti (T: E DT). This representation should capture essential spatiotemporal and semantic features to effectively support multiple downstream tasks, such as similarity search, impu- tation, generation, classification, simplification, and travel time estimation.
ZR
Road representation.
Za
Grid representation.
Zp
Position representation.
ZT
Temporal representation.
Spatial representation. Zs
h Trajectory generalized representation.
for diverse downstream tasks. To contend with challenge C3, we propose an efficient Online Frozen-hot Updating (OFU) strategy by selectively freezing the parameters of the Transformer encoder during model updating. Moreover, to enhance the interpretability of the trajectory representative model, we calculate the attention values to identify crucial information that influences the training process. Based on that, visualization processes illustrate the learning procedure and provide optimization guidelines. Finally, we conduct extensive experiments on two real-world datasets to demon- strate that GTR outperforms 15 state-of-the-art baselines across various trajectory analyses.
3. Methodology
Framework Overview. The GTR framework is illustrated in Fig. 3, comprising three key components: the Multi- View Encoder (MVE), the Spatio-Temporal fusion Pre- training (STP), and the Online Frozen-hot Updating (OFU). Together, these components are designed to generate generalized representations for road network-constrainet trajectories. In the sequel, detail each component in order.
3.1. Multi- Encoder (MVE)
2. Preliminaries
Design Motivation. Previous works (Fu & Lee, 2020; Jiang et al., 2023a) mainly focus on road networks with static semantics, ignoring the spatial features of free-space view, such as area function characteristies (cf. Fig. 1). More- over, the free-space view provides a coarse- gaarseegrained view of the trajectory, aiding the model in learning the trajectory's overall trend. Therefore, we design an MVE module to en- code GPS trajectories, extracting multi-view representations and spatio-temporal features by four embedding procedures.
Notations Table. We present the frequently used notations and descriptions in this paper, as listed in Table 1.
Definition 2.1 (GPS Trajectory). A GPS trajectory T is denoted as a sequence of GPS spatio-temporal points, i.e., T=(p: (1 < i < L)), where each point p;=(Ion;, lat, t.) contains longitude, latitude, and observed timestamp, P: is the i-th point of T, I. denotes the length T.
Definition 2.2 (Road Network). A road network is denoted as directed graph G=(V, F, V is the set of graph vertices, where each U; V denotes road segment. E C V x Vis is a set of graph edges, where each e,y=(v;, v;) denotes an intersection between iy and By. A E R [VxvV]] denotes the binary adjacency matrix of graph G. Definition 2.3 (Road-network Constrained Trajectory). road-network constrained trajectory T" is a time- ordered sequence of adjacency road segments, i.e., T" ((,,, (1 I i L,, Di E V)), where t is the visit times- tamp for vs and L, is the length of T..
Preparation. Given road network G and raw trajec- tory T, we first encode T into road network-constrained and grid frid-constrained trajectories. Specifically, any map- matching algorithms (Newson & Krumm, 2009; Ruan et al., 2018: Yang & Gidofalvi, 2018) can be employed to estab- lish correspondences between the GPS points of T and the road segments in G, ensuring road network connectiv- ity constraints. This process generates the road network- constrained trajectory T (cf. Definition 2.3), denoted as T + T Simultancously. the space is partitioned into grid cells, with each grid classified based on its contained POIs from OpenStreetMap'. As a result, the input T is also represented as a grid-constrained trajectory T (cf. Defini- tion 2.4), denoted as T + T Using T and T we extract
Following previous free space trajectory representation learning (Fang et al., 2021; Li et al., 2018), we partition the free space into W1 x W2 grid cells and assign each GPS point to the grid cell that contains it. All of these grids make up a set G=(gi (1 S S w/ x w2)). Each GPS trajectory
hmtps//wwww.ppnstteemap..ggg
3

---

GTR: A General, Multi- View, and Dynamic Framework for Trajectory Representation Learning
MVE
(2) STP
(3) OFU
Road Network View
GAT
ZR
a
ST-MoE
Latest Trajectory
Map Matching
Z
GPS Trajectory
Z
Grid
Q
GE
Z
Tmnglommz Eroookr
Multi- Head A Atention
ST-MoE
M Mapping
Add Layer Norm
Dourafomm Froood
4
Free IT
Space View
PE
Food Forward
Sequence
2 3
Fine-tune
Positton
O
Add & Layer Nomn
TE
TimeStamp
0000
W/W
Linsor
LOTR
Downstream Tasks
Figure 3. The Overall Framework of GTR
semantic and spatio-temporal features via four embedding methods as follows:
Specifically, use embedding vector to represent each grid cell, then map the trajectories to the corresponding embedding vectors. The process is as below:
i) Road embedding. We begin by collecting the features and semantic information of road segments in G, such as speed limits, road types, and road lengths, collected from OpenStreetMap, denoted as F.- f2. fvvl.. Next, Graph Attention Network (GAT) layers applied to code F. into the road embedding Zn. This process com- putes an attention coefficient matrix to capture the influence among features. The operation at the 1-th GAT layer is mathematically defined as follows:
(4) Here, GE, POIE construct the embedding vectors for grid- constrained trajectories T and grid's latent type coos Our POIs extraction method can be found in Appendix B.6. It is worth mentioning that combining grid embedding with POI information provides auxiliary insights, capturing features overlooked by road embeddings and enhancing the accuracy of trajectory representations. The grid embedding can be represented as Z [Pgg h'2,, ,hgh,.)
hgi GE(T,") + POIE(<"") (1
AEa- (W...i (y)
Here, fi represents the extracted features or semantic infor- mation of 0 (v; E V). AE,, denotes the attention coefficient between f. and fy. which depicts the influence among fea- tures. W a W., and a denote the learnable parameters. Next, the attention value is calculated and normalized to aggregate the vertex information of G:
iii) Position Embedding. To model the sequential depen- dencies within a trajectory, we employ position embed- dings (Devlin et al., 2019) to encode the order of the input trajectory T. These embeddings are generated using sine and cosine functions (Devlin et al., 2019) as follows:
pos
(B = sin (100002:74]
PE (poo,, cos
10000
exp(LeakyReLL(AEs.)) (ks EEEN; exp(LeakyReLL(AAi:))
(5)
where PE denotes the position embedding, and pos de- notes the sequence position in the trajectory T. d de- notes the embedding size of GTR. With the position embedding, we can get the position embedding hna -iridd--)--,-E((rTt.... PEiiTT)) (E and the position embedding can be represented as Zp hpp].
where LeakyReLU denotes the activation function. aiz de- notes the attention value between v; and uj, and Mf repre- sents the set of all neighbors of vs. Finally, the features fa (Ji E F.) can be represented as:
f! = ELU
ELU
Σ JEN;
W (K) mg
(3)
iv) Time Embedding. We aim to capture multi-gramularrty temporal features for effective trajectory representation, de- noted as ht. Specifically, we provide three temporal features for each timestamp of T: minutes, weeks, and years. By us- ing three embedding vectors extract the temporal patterns of minutes, weeks, and years, we obtain the corresponding embedding vectors for each timestamp, as defined below:
Here, ELU is the Exponential Linear Unit activation func- tion (Veličković et al., 2017), || represents the "CONCAT" operation. a.5) denotes the attention value computed by the k-tth attention head, and a' is the number of the attention us is the weight matrix of the corresponding lin- ear transformation in layer 1, The final road embedding can be represented as ZR = [fr, fez." ".. f.
heads. ((k)
he: = TE,, (f)(t))) + (f.(t) + TE, (t))
(6)
ii) Grid embedding with POIs. We aim to transfer the each grid constrained trajectory of T into a grid embedding hg.
Then, we can obtain the temporal feature representation Zr = ( hez, ..., her) TE TEg, and TEg construct the
4

---

GTR: A General, Multi-View, and Dynamic Framework for Trajectory Representation Learning
Zs
ST-MoE
follows:
Multi-Head A Attentio
Add & Layer
Zss
Z's = LayerNorm(Zz (zs + Dropou((Multitrrn (z)))), (8)
Spabal Expert
Norm
MultiHead (Zs) = (head1, ... head } W2 %g1
(9)
Gate
Wg
head, = Attentionn Z2 73. Zs W ligs Zg W (10)
Task ID
where Lioad donates the number of the attention head, w W W W are learnable parameters, Lay- Zs.' Za." Ze, erNorm donates the Layer Normalization (Lei Ba al.,
2
Wr
2016). We obtain Z/ in the same way, which process is omitted due to space limitations.
Multi-Head Attention
dd Layer
Norm
ZT
Next, we design a gating network to generate spatio- temporal weights for the experts. For different tasks, the task Frask is used to derive the task representation through a fully connected layer. The weights are then computed using Softmax function. The process is defined follows:
Temporal Expert
Figure The ST Module
embedding vectors for minute, week, and year represen- tations, respectively. We use the function fe to transform timestamps into index ranges: [0, 1440] for minutes. [0, 7] for weeks, and [0, 366] for years.
Ws, WT =
(11)
where ws is the spatial weight, wr is the temporal weight, Softmax is the Softmax activation function, and FC is the fully connected layer.
Finally, we combine the grid embedding Za, road embed- ding ZR. and position embedding Zp to derive the spatial feature representation, computed as follows:
Finally, we obtain the fusion road representation through a residual connection and normalization layer as follows:
Zs ZR + Za + Zp
Zip Z's ws + Z₁-
(12)
3.2. Opatio-Tempory Fusion Pre-training (STP)
7r LayerNorm (7r + Dropout
(13)
Design Motivation. Recent works (Jiang et al., 2023a; Lin et al., 2023) mainly focus on the subset of the trajec- tory downstream tasks, such as TTE, trajectory classifi- cation, and most similar trajectory search. However, the pre-training task is not usually suit for all downstream tasks, due the limitation of the invariant feature combination. Therefore, design STP module to solve this gap, aim- ing to develop dynamic trajectory representation learning model, enabling the generation of general trajectory rep- resentations that support multiple downstream tasks. The process comprises three stages: (i) spatio-temporal feature fusion, (ii) pre-training, and (iii) fine-tuning.
where ZF is the fusion representation, which is the input of the next pre-training stage.
3.2.2. TRE-TRAINING.
Leveraging the Transformer's powerful ability to capture long-distance dependencies within sequences and its effi- ciency in parallel computing (Yang al., 2023), adopt a Transformer encoder for pre-training to learn general trajec- tory representations through carefully designed pre-training tasks. Specifically, we utilize the Masked Language Model (MLM) as the pre-training task for trajectory representa- tion due to its proven effectiveness in handling sequential data (Devlin al., 2019). 1).. this approach, MLM randomly selects tokens from the sequence, masks them, and trains the Transformer encoder to predict the masked tokens, thereby capturing rich contextual information.
3.2.1. OPATIO-TEMPORAC FUSION.
Different downstream tasks require varying proportions of spatio-temporal features, necessitating dynamic adjustments. Inspired by the effectiveness of Mixture of Experts (MoE) methods (Cai et al., 2024) in feature fusion across diverse domains, we propose the ST-MoE module, specifically de- signed to dynamically integrate spatio-temporal features. An overview of the ST-MoE module is shown in Fig. 4. Specifically, this module includes two experts: spatial expert and temporal expert. First, the spatial feature repre- sentation Zs and temporal feature representation ZT are fed into their respective experts. The spatial expert processes Zs using a multi-head attention layer (Vaswani et al., 2017) followed by a residual connection layer. The temporal ex- pert follows the same process. The detailed procedure as
However, directly applying this technique to road network- constrained trajectory representation introduces limitations. This is, the adjacency of road segments in trajectories makes it relatively simple for the Transformer encoder to predict masked tokens. Consequently, treating individual road seg- ments sequence tokens results in a pre- pre-trained model that lacks the complexity needed to support advanced down- stream tasks. To overcome this limitation, we propose a new span masking method, which masks consecutive road seg- ments (i.c., sub-trajectories instead of individual segments. This method consists of three main steps.
5

---

GTR: A General, Multi- Vieli,View,, and Dynamic Framework for Trajectory Representation Learning
Step I: For the road network-constrained trajectory dataset DJ we apply data augmentation techniques to enrich the training data and provide additional information for model optimization. These techniques include sub-trajectory se- lecting and road drifts, which can be found in Appendix B.5.
results in the trajectory triplet (Ta, Tp Tr) and its corre- sponding representation triplets (h., hP, h²) (cf. Eq. 15). Using these triplets as training samples, we train the Trans- former encoder. During training, the model keeps the anchor trajectory closer to the positive sample and farther from the negative sample. Note that, the training procedure is self- supervised, as the triplet samples are generated from the trajectories themselves. The loss function is defined below: N
Step 2: Given a road network constrained trajectory T to be masked, we randomly select 30% of road segments from 7" and mask them by replacing them. Next, we obtain the feature representation Zp of the masked trajectory (cf. Eq. 12) and compute the weighted representations h based on Zp using a muulti-head attention layer (Vaswani et al., 2017). The multi-head attention layer captures information from multiple views (e.g.. grid view and road network view), thereby improving the accuracy of trajectory representation learning. Firstly, We obtain the query, key and value vectors QZ = -Z W22 2p- K2, Zp
C. - [IME where N is the number of training samples (i.e., triplets). 7 represents the parameter that defines the minimum margin required between positive and negative samples.
MI |I
A712 +
(17)
Overall, we aim to obtain a pre-trained model by training the two tasks described above, which is handled by the loss function defined as follows:
W 2p, Vzr Zy W 2p- ZF. WV, are learnable parameters. This
where w2, "FF' W step is defined as follows:
LGTA = 3 * L. + (1-8)* Lt.
(18)
where ,3 is an adjusting parameter to balance the influence of two pre-train tasks (i.e., MLM and Triplet Training).
h' = MultiHead azp. Kzp, Vzp),
(14)
h- = (ReLU(k'V) Wo + bo + bi.
(15)
3.2.3.
where Qzp Zz. and Vz, represent the query, key and value vectors obtained by linear transformation for h, re- spectively. RcLU is the activation function. Wo, W1, bo. and by denote the learnable parameters.
With the pre-trained model described above, we perform fine-tuning for each downstream task achieve superior performance. Unlike other methods (Fu & Lee, 2020; Jiang et al., 2023a; Ma et al., 2024), which apply the same fine- tuning approach across all tasks, we propose tailored fine- tuning strategies for each downstream task. Due to the limited space, we only introduce the Travel Time Estimation task here, more fine-tuning methods refer to Appendix B.
Step 3: We train the model to predict the masked road segments, using the cross-entropy loss (Mao et al., 2023):
Nant C
9 Suftmar(Waan + b2). C. =
Σ
Me.e log(),))
(16) where Softmax is the activation function. W2 and b2 de- note the learnable parameters. NNmask denotes the number of masked tokens, and C represents the size of the sub- trajectories that are masked, ji.c is the model prediction.
Travel Time Estimation. The goal of TTE is estimate the travel time for a moving object from start point to destination. To achieve this, we construct a regression model to estimate the travel time based on fully connected layer of neural networks. Then, we use the Huber loss (Shi et al., 2023) for fine- ainettunig, shown as below:
Training Optimization. To further improve the accuracy of the pre-trained model, we introduce an additional pre- training task that constructs trajectory triplets to capture the relationships among them. Specifically, for each T", we designate it as an anchor trajectory To and extract its sub-trajectory as the positive sample TØ. Unlike previous methods (Jiang et al., 2023a; Ma et al., 2024), which con- struct negative samples directly from the original trajectory data and struggle to distinguish dissimilar trajectories, we provide negative samples of varying difficulty levels to learn more nuanced differences between trajectories. First, we randomly select several trajectories T" from the trajectory Dataset D' as simple samples. Second, we employ Vari- ational Autoencoder (VAE) (Doersch, 2016) to generate more challenging negative samples. The reconstruction task and -uibbec (KL) divergence are employed during training to generate negative samples for the anchor. This
(v - 0)²² á (1v - 5 - 1)) otherwise
forly - 9 <
Loggession
(19)
where å is a preset threshold, we set 8 = 1 in our work. ø is the predicted value by the model, and y is the true label.
3.3. Online Frozen-Hot Updating (OFU)
Previous approaches (Chen et al., 2024; Ma et al., 2024) often fail to leverage the real-time capabilities of trajectory data, reducing their effectiveness in dynamic environments where traffic conditions are constantly evolving. To address this limitation, we propose an online frozen-hot updating strategy. Additionally, we introduce model interpretation methods to explain the rationale behind the model's 's outputs, facilitating optimization through well-founded approaches, which can be found in Appendix B.3 due to the limited space.
6

---

GTR: A General, Multi-View, and Dynamic Framework for Trajectory Representation Learning
Online Updating. We consider the latest trajectory data
RQI: How does GTR perform compared to the state-of-
for model updating, which is continuously collected. How-
the-art models on supporting multiple tasks?
ever, retraining the model using the latest trajectory data
RQ2: How effective is our online updating strategy for
as training samples would delay downstream tasks, result-
model training?
ing in low efficiency. Therefore, it is essential to update
RQ3: How do the individual modules in GTR contribute
the model while ensuring that downstream tasks continue
to the model performance?
to perform effectively. Additionally, historical trajectories must be preserved during model updates, as they contain vital information for trajectory analysis.
RQ4: How does GTR interpret model training?
RQ5: What is the scalability of our GTR?
4.1. Experimental Settings
With this in mind, we propose an incremental online updat- ing strategy. Specifically, first, for the Transformer encoder with L." layers, we divide the layers into two parts: LT and Lÿ. Second, we freeze LÍ to preserve the informa- tion of historical trajectories for downstream tasks, while continuing to pre-train LI using the latest trajectories as training samples. In this way, the model can perform tra- jectory analysis tasks and update simultaneously, achieving online optimization. Third, we update the model as new trajectories flow in, iteratively executing the second step. It is worth mentioning that the impact of historical and recent trajectories can be managed by adjusting the number of lay- ers in L' (denoted e) or Li (denoted L" e). In this paper, we set be half of I." to balance the influence of historical and recent trajectory information.
Table 2. Dataset Statistics
Datasets
segments
# trajectories
Avg. Length
Avg. Time
Porto
44.641
774,262
41
9.901
Beijing
40,305
889,306
27
12.833
Datasets. We evaluate GTR on two real-world trajectory datasets: (i) Porto? contains 774,262 GPS trajectories col- lected in Porto, Portugal, from 2013/07/01 to 2014/07/01, (ii) Beijing? 3 contains 889,306 GPS trajectories collected in Beijing, China, from 2015/1 1/01 to 2015/11/30. Detailed information is summarized in Table 2. The Avg.Length refers to the average number of trajectory points.
Baselines Description. We compare GTR with 15 most common state-of-the-arr methods among six tasks.
TremBR (Fu & Lee, 2020) constructs a RNN-based
Note that, the OFU strategy is theoretically grounded in incremental learning (Wang et al., 2024). We combine layer-
seq2seq model for representation leanring.
PIM (Yang et al., 2021b) combines node2vec and LSTM encoder to generate trajectory representations.
wise parameter freezing with Lyapunov stability analysis
to ensure robust adaptation while preventing catastrophic forgetting. Specifically, we freeze the first L layers and
Toast (Chen et al., 2021) utilizes node2vee model and trains a Transformer encoder to represent trajectories.
update the last N L layers. The objective optimization function is defined below:
START (Jiang et al., 2023a) trains a time-aware encoder with GAT that considers transitions in the road network. LightPath (Yang et al., 2023) trains sparse path encoder for path reconstruction and cross-view network contrast. TS- TrajGen (Jiang et al., 2023b) builds an A algorithm based generator within a generative adversarial network. SeqGAN (Yu et al., 2017) utilizes GANs combined with Seq2Seq models for trajectory representation.
min B(x.)) ~ Dnew Dnew[(((Fg.. [[[FoL. (I). yr 0 (L++EN
(20)
With frozen lower-layer parameters (V (Voil = 0), old fea-
tures remain unchanged, which guarantees that the old fea-
tures are not forgotten. The updating process can be mod-
eled as a dynamic system: O1+11NN = -f-+1:N 119t with c+1
Trajbert (Si et al., 2023) trains Transformer encoder by using a -emppalltempora loss for trajectory recovery.
a Lyapunov function: V(0)- = Lnew (0) + >1000-1 01:2 1|2.
As y + Dc, the system satifies: E[V 10++1)l < (())
Bi-STDDP (Xi et al., 2019) is designed to integrate bidi- rectional spatio-temporal dependencies and users' dy- namic preferences, identifying missing POIs.
nell nnw (0.) The monotonic decrease of V(0) ensures
stable updates. Freezing lower layers prevents cascading perturbations, balancing new feature learning with old fea- ture retention.
EB-OTS (Wang et al., 2021) proposes a multi-agent for online trajectory simplification.
S3 (Fang et al., 2023) constructs lightweight framework using two seq2seq models to simplify trajectories.
3.4. The Training of GTR
The training process of GTR is provided in Appendix B.2 with the complexity analysis in Appendix B.4.
JGRM (Ma et al., 2024) designs novel representation model that jointly encodes GPS and routes through a Transformer.
4. Experiments
Attn (Xia et al., 2021) recovers dense trajectories
In this section, we conduct a series of experiments on two real-world datasets to evaluate the performance of GTR, which are summarized to answer the following questions.
trajectory-i httpp///ggiabb..omm//////////111
7

---

GTR: A General, Multi-View, and Dynamic Framework for Trajectory Representation Learning
by inferring unobserved locations through a multi-layer attention-based neural network.
2x10
EB-OTS S UIR GIR
3x10
2x10
Mtrajrec (Ren et al., 2021) integrates a GRU model with an attention mechanism to enhance trajectory recovery. Tont (Zhu et al., 2024) leverages a diffusion model to efficiently generate trajectories.
PED
1x10
1x10
Beijing
Porto
(a) PED in Beijing
(b) PED in Porto
Implements. All experiments are conducted on CentOS 7 with an NVIDIA A40 GPU. We run GTR on PyTorch 1.13.1. For GTR, set the embedding size 768, the mask ratio for pre-training tasks as 30 %, and the dropout value as 0.2. Moreover, we perform pre-training and fine-tuning of GTR using the A (Loshchilov & Hutter, 2019) optimizer, and the value of the balancing parameter 3 in the overall loss function is set to 0.7. Our dataset is split into training, validation, and test sets with a ratio of 0.8, 0.1, and 0.1. More detailed settings refer to Appendix C.1.
Figure 5. Evaluation on Trajectory Simplification Task
and pt = (22, ye). Lower PED indicates lower compression errors. The results are shown in Fig. 5.
Trajectory Imputation: we assess the accuracy perfor- mance using Recall@3, @ecall@5,, and Mean Accuracy Per- cent (MAP) for Bi-STDDP, AutnMvve, Trajbert, MtrajRec, GTR, and GTR". Recall @ evaluates the model's ability to recover masked tokens by checking whether the ground truth appears in the top-x predicted candidates. Specifically, if the true value is contained within the top-x ranked predic- tions, Recall @x is assigned for that token; otherwise, it is assigned O. The final metric is computed by averaging these binary outcomes across all masked tokens in the evaluation set. The MAP represents the probability of the precision, and higher Recall @x and MAP indicate higher performance. The results are shown in Table 4.
4.2. Performance Evaluation (RQI& & RQ2)
In this section, we first evaluate the accuracy of all meth- ods on six usual downstream tasks, including trajectory similarity computation, trajectory simplification, trajectory imputation, travel time estimation, trajectory classification, and trajectory generation. Note that, we only evaluate the baselines' performance on their specific tasks. Next, we incrementally update the training model online to obtain the updated model GTR", and compute the accuracy to ver- ify the online updating strategy. To process newly arrived trajectory data, we employ the validation set to simulate real-world online/streaming scenarios. The model under- goes single-epoch incremental model updates.
Table 4. Evaluation on Trajectory Imputation Task
Beijing
Porto
Methods
Recall8
Recall@s
Recall@3
Recall
MAP
Bi-STDDP
0.97874
0.98338
0.82692
0.61926
0,74273
0.33584
AltnMove
0.94556
0.96151
0.78721
0.57879
0.69355
0.31801
Trajbert
0.93476
0.95059
0.65174
0.76151
0.37843
MimiRRec
0.94840
0.97640
0.87650
0.68170
0.73090
0.40920
Trajectory Similarity Computation: we perform Top-k similarity search by computing Mean Rank (MR), HR @ 1, @R@5 (Hu et al., 2023) for Trembr, PIM, Toast, START, JGRM, LightPath, and GTR (lower MR and higher HR @1 and HR@ 5 indicate the higher performance). Note that, we apply the detour method in JCLRNT (Mao et al., 2022) to generate the ground truth. The results are reported in Table 3. Further, we present a case study, shown in Appendix C.7.
GTR
0.99406
0.99521
0.98652
0.86465
0,93331
0.60344
GTR"
0.99418
0.99531
0.98657
0.86525
0.93354
0.60538
Travel Time Estimation: we compare Trembr, Toast, START, PIM, LightPath, and JGRM with GTR and GTR", by utilizing Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), and Mean Square Error (MSE) for evaluation (lower MAE. MAPE and MSE indicate the higher performance). The results are shown in Table 5.
Table 3. Evaluation on Top-k Similarity Computation Task
Beijing
Porto
Table 5. Evaluation on Travel Time Estimation Task
Methods
MR
HR@1
HR
MR
HR@1
HR @
Beijing
Porto
Trembr
2.4894
0.6070
0.9084
8.6536
0.6226
0.8424
Methods
MAE
MSE
MAPE
MAE
MSE
MAPE
PIM
4,8008
0.9462
0,9816
27.0137
0.6064
0.7928
Trembe
6.66722
81.36270
90.07389
2.12186
6.93319
31.15763
Toust
1.6656
0.9036
0,9850
14,6700
0.7554
0.8716
PIM
6,98318
81.43258
92,36455
2.09192
6.82120
27.67270
START
1,3870
0,8968
0,9888
1.0476
0.9722
0.9984
Toast
6,84877
102.61526
62,37184
2.15245
7.46382
29.16603
LightPath
1.1116
0,9312
0.9982
4.1272
0.7308
0.8808
START
5,50282
70.23768
39.74935
0.37485
0.15862
4.43707
JGRM
1.5946
0.9720
0.9938
5,9172
0.2326
0.6634
LightPath
4.42273
44.37277
41.17115
0.68104
0.73718
7,56974
GTR
1.0130
0.9906
0.9996
1.0028
0.9974
0.9999
JGRM
6.91029
80.54387
90.42306
1.3833
75485
26.85475
GTR
4.01277
40.55894
33.15476
0.01512
0.00060
0,23882
Trajectory Simplification: compute Perpendicular Dis- tance Error (PED) (Fang et al., 2023) of S3, EB-OTS, GTR, and GTR for performance evaluation due to the limited space. Note that, PED computes the shortest perpendicular distance between a deleted point P. = (x,, y1) and the line segment connecting its neighboring points p. = (xs, Us)
GTR
4.30101
49.55222
34,32996
0.01947
0.00093
0.19186
Trajectory Classification: we compare Trembr, START, PIM. Toast, LightPath, JGRM, with our GTR and GTR" for this task, by computing Accuracy (ACC), F1-Score (FI), and Area Under the ROC Curve (AUC) for performance
8

---

GTR: A General, Multi- Vieli, and Dynamic Framework for Trajectory Representation Learning
Table 6. The Ablation Study in Porto Datasct
Top= Similarity Search
Travel Time Extimaiin
Teijectory Imputation
Trijecory Clacsileation
Trajectory Generation
Simplification
MR
[
H
MAB
MSB
MAPE
recalle:
@5
MAP
ACC
F1
ALC
Haussorft
DTW
PED
L8025
0.9974
0,9099
0,01512
0.8806
0.23882
0.86465
0.93331
0.68344
0.83213
0.90528
0,01064
0J00NA5
Time Embed
1,0302
0.9962
0.02528
0,00177
0.31338
0.8031
0.89473
0.50160
0.82472
0.90201
0.01590
0.000064
w/o Grad Emnbed
1.0162
0:9378
0.9998
0.6674
0.07716
0.71440
065271
0.7652)
0.57667
0.78398
0.78099
0.88291
B00772
084195
010011799
wio Read Embed
10128
0.9983
0.9998
0.88100
0.00228
0.50857
0.8029
0.87994
0.48701
0.81881
0.8:981
0,90345
0/04722
0.02622
0.000011
w/o STMDE
1,0338
0.9790
0.9550
0.08388
0,00933
0.89989
0.71479
0.82876
0.41395
0.81516
0.51615
0.90054
0.00777
0.03067
01000001
wio Triplelloos Los
1.0162
0.9330
0.9998
0.01837
0.00881
0.2431
0.8688
0.98111
0.59674
0,82882
8 0.82881
0.903462
0.00295
0.01068
0
w/o MLMLoss
741.1848
0,0326
0.0670
0.01752
0.00147
0.36225
0,82449
0.90508
0.55668
0.81761
0.81762
0,90313
0.00304
0,01219
0.000067
evaluation. Specifically, higher ACC, F1-Score, and AUC indicate higher classification accuracy. The results are de- picted in Table 7.
putation, and 37%-81% for trajectory generation. These gains are attributed to our use of the MVE and STP mod- ules, which dynamically integrate spatio-temporal features in a multi-view setting. This design enables the trajectory representation learning model to dynamically capture and preserve relationships among trajectories in the learned rep- resentations, thereby enhancing performance across diverse trajectory analysis tasks.
Table 7. Evaluation on Trajectory Classification Task
Beijing
Porto
Methods
ACC
Fl
AUC
ACC
F1
AUC
Trembr
0,80132
0.85030
0,85937
0
0.80845
0.88425
PIM
0.68116
0.68111
0.65818
0.73370
0.73571
0.85097
Toast
0.68114
0.81031
0,50000
0,50379
0.50376
0,50100
(iii GTR* significantly enhances the performance of GTR across most trajectory analysis tasks by incrementally updat- ing model parameters online. This effectively leverages both historical and newly available trajectory data, allowing con- tinuous optimization and achieving superior performance.
START
0,73961
0,81045
0,79378
0,78520
0,78321
0,86379
LightPah
0.74454
0.82524
0.79614
0.74303
0.74303
0.86241
JGRM
0.76933
0,84583
0,83394
0.62007
0.62006
0.78775
GTR
0,80164
0.85509
0,86297
0.83213
0.83213
0.90528
GTR
0,80185
0,85535
0,86632
0.83904
0.83904
0.91317
Trajectory Generation: we evaluate the similarities between the generated and original trajectories, by us- ing distance measures Hausdorff (Xie et al., 2017) and DTW (Keogh & Ratanamahatana, 2005). Note that, the closer the distance between the generated and original trajectories, the more effective the trajectory generation method. We compare our GTR and GTR" with SeqGAN, ControlTraj, and Trrrraneen, where the results are shown in Table 8.
4.3. Ablation Study (RQ3)
We also conducted ablation studies to prove the effectiveness of six key components within our GTR on six mainstream tasks. (1) w/o Time Embed: This variant removes the time embedding. (2) w/o Grid Embed: This variant removes the grid embedding, including the grid POIs features. (3) w/o Road Embed: Similar to the previous one, which mainly removes the GAT and replaces it with embedding vectors. (4) w/o ST-MoE: This variant removes the ST-MoE module. (5) w/o TripletLoss: This variant removes the triplet task for pre-training. (6) w/o MLMLoss: This variant removes the MLM task for pre-training Table 6 presents the results in Porto, while the results in Beijing are shown at Table 10. We observe that our GTR framework achieves the best overall performance across most variants. This indicates that the proposed MVE and STP modules are helpful in supporting general trajectory representation learning.
Table 8. Evaluation on Trajectory Generation Task
Beijing
Porto
Methods
Hausdorff
DTW
Hausdorff
DTW
SeyGAN
0,06527
0.59283
0.02752
0,40514
ControfTraj
0,03139
0,51857
0.00608
0.03579
TrajGeee
0.04861
0.54997
100
0.21610
GTR
0,03080
0.48664
0.00286
0,01064
GTR
0.03047
0.48578
0.00262
0.01011
Overall, we have the following observations.
4.4. R44 & RQS
(i) Our GTR effectively generates general trajectory repre- sentations that support a wide range of downstream tasks, in contrast to state-of-the-art models, which are often tai- lored to specific tasks. This versatility is achieved through pre-training based on comprehensive feature extraction (ef. Section 3.1), enabling the model to meet the diverse and complex requirements of various tasks.
To answer RQ4 and RQ5, more experiments can refer to the Appendix C.4 and Appendix C.6, respectively.
5. Conclusions
In this paper, we propose GTR, a general, multi-view, and dynamic framework for trajectory representation learning. GTR learns spatio-temporal features via a designed multi- view encoder. To adaptively integrate spatial and tempo- ral features, introduce mixture of experts, tailored for downstream tasks. GTR also incorporates online frozen-hot strategy to dynamic updating. Future work will explore integrating LLMs to broaden GTR's 's applicability.
(ii) GTR consistently outperforms wate-of-the-ar models across all tasks, achieving accuracy improvements: up to 15%-60% for trajectory imputation, 1 1%-4% for trajectory classification, 10%-90% for the TTE task, 6%-26% for tra- jectory simplification, 4%.8% for trajectory similarity com-

---

GTR: A General, Multi-View, and Dynamic Framework for Trajectory Representation Learning
Acknowledgements
digitized line or its caricature. Cartographica: the inter- national journal for geographic information and geovisu- alization, 10(2):112-122, 1973.
This work was supported by the NSFC under Grant No. 62402422 and 62472377, Yongjiang Talent Introduction Pro- gramme (2024A-162-G),, Zhejiang Provincial Natural Sci- ence Foundation of China under Grant No. LZ25F020001, and ZTE Saanntty-Univevsit--nnssss under Grant No. IA20240731007. Ziquan Fang is the corre- sponding author.
Fang, Z., Du, Y., Chen, L., Hu, Y., Gao, Y., and Chen, G. E 2 dtc: An end to end deep trajectory clustering frame- work via self-training. 2021 IEEE 37th International Conference on Data Engineering (ICDE), pp. 696-707, 2021.
Cooperation Funds
Fang, Z., Du, Y., Zhu, X., Hu, D., Chen, L., Gao, Y., and Jensen, C. S. Spatio-temporal trajectory similarity learn- ing in road networks. In Proceedings of the 28th ACM SIGKDD conference on knowledge discovery and data mining, pp. 347-356, 2022.
Impact Statement
This paper presents work whose goal advance the field of Machine Learning. There are many potential societal consequences of our work, none of which we feel must be specifically highlighted here.
Fang, Z.. He, C., Chen, L., Hu, D., Sun, Q., L., and Gao, Y. A lightweight framework for fast trajectory simplifi- cation. In 2023 IEEE 39th International Conference on
References
Cai, W., Jiang, J., Wang, F., Tang, J., Kim, S., and Huang, A survey on mixture of experts. arXiv preprint arXiv:240.006204, 2024.
Data Engineering (ICDE), pp. 2386-2399 2023.
Fu, T.-Y. and Lee, W.-C Trembr: Exploring road networks for trajectory representation learning. ACM Transactions Intelligent Systems and Technology (TIST), 11(1):1-25, 2020.
Chang, Y., Qi, J., Liang, Y., and Tanin, E. Contrastive trajectory similarity learning with dual-feature attention. In 2023 IEEE 39th International Conference on Data Engineering (ICDE), pp. 2933 2945, 2023a.
Han, P., Wang, J., Yao, D., Shang. S., and Zhang, X. A graph-based approach for trajectory similarity computa- tion in spatial networks. In Proceedings of the 27th ACM SIGKDD Conference Knowledge Discovery & Data Mining, pp. 556-564, 2021.
Chang, Y., Tanin, E., Cao, X., and Qi, J. Spatial structure- road network embedding via graph contrastive learning, In EDBT, pp. 144-156, 2023b.
Hu, D., Chen, L., Fang, H., Fang, Z., Li, T., and Gao, Y. Spatio-tempon trajectory similarity measures: A com- prehensive survey and quantitative study. IEEE Transac- tions on Knowledge and Data Engineering. 2023.
Chen, W., Liang, Y., Zhu, Y., Chang, Y., Luo, K., Wen, H., Li, L., Yu, Y., Wen, Q. Chen, C., et al. Deep learning for trajectory data management and mining: A survey and beyond. arXiv preprint arXiv:2403. 14151, 2024.
Hu, D., Fang, Z., Fang. H., Li. T., Shen, C., Chen, L., and Gao, Y. Estimator: An effective and scalable framework for transportation mode classification over trajectories. IEEE Transactions on Intelligent Transportation Systems, 2024.
Chen, Y., Li, X., Cong, G., Bao, Z., Long, C., Liu, Y. Chan- dran, A. K., and Ellison, R. Robust road network repre- sentation learning: When traffic patterns meet traveling semantics. In Proceedings of the 30th ACM International Conference on Information & Knowledge Management, pp. 211-220, 2021.
Jeong, J. P., He, T., and Du, D. H. Trajectory-based data forwarding schemes for vehicular networks. ZTE Com- munications, 12(1):17, 2014.
Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. Bert: Pre-training of deep bidirectional transformers for lan- guage understanding. In Proceedings of the 2019 confer- ence of the North American chapter of the association for computational linguisties: human language technologies, volume (long and short papers), pp. 4171-4186, 2019.
Jiang, J., Pan, D., Ren, H., Jiang, X., Li, C., and Wang. J. Self-supervised trajectory representation learning with temporal regularities and travel semanties. In 2023 IEEE 39th international conference on data engineer- ing (ICDE), pp. 843-855, 2023a.
Doersch, C. Tutorial on variational autocncoders. arXiv preprint arXiv:1606. 160.0000 2016.
Jiang, W., Zhao, W. X., Wang, J., and Jiang, J. Continuous trajectory generation based on two-stage gan. In Proceed- ings of the AAAI Conference on Artificial Intelligence, volume 37, pp. 4374 4382, 2023b.
Douglas, D. H. and Peucker. T. K. Algorithms for the re- duction of the number of points required represent
10

---

GTR: A General, Multi- View, and Dynamic Framework for Trajectory Representation Learning
Keogh, E. and Ratanamahatana, C. A. Exact indexing of dy- namic time warping. Knowledge and information systems, 7:358-386, 2005.
Ruan, S., Li, R., Bao, J., He, T., and Zheng, Y. Cloudtp: A cloud-based flexible trajectory preprocessing frame- work. In 2018 IEEE 34th international conference on data engineering (ICDE), pp. 1601-1604, 2018.
Lei Ba, J., Kiros, J. R., and Hinton, G. E. Layer normaliza- tion. ArXiv e-prints, pp. arXiv-1607, 2016.
Shi, L.,, Wang, I.,, Zhou, S., and Hua, G. Trajectory unified transformer for pedestrian trajectory prediction. In Pro- ceedings of the IEEE/CVF International Conference on Computer Vision, pp. 9675-9684, 2023.
Li, X., Zhao, K., Cong, G., Jensen, C. S., and Wei, W. Deep representation learning for trajectory similarity computa- tion. In 2018 IEEE 34th international conference on data engineering (ICDE), pp- 617-628, 2018.
Si, J., Yang, J., Xiang, Y., Wang, H., Li, L.,, Zhang, R., Tu, B., and Chen, X. Trajbert: Bert-based trajectory recov- ery with spatial-temporal refinement for implicit sparse trajectories. IEEE Transactions on Mobile Computing. 2023.
Liang, Y. Ouyang, K., Wang, Y., Liu, X., Chen, H., Zhang, J., Zheng, Y., and Zimmermann, R. Trajformer: Efficient trajectory classification with transformers. Proceedings of the 31st ACM International Conference on Information & Knowledge Management, pp. 1229-1237, 2022.
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, Jones, L., Gomez, A. N., Kaiser, E., and Polosukhin, I. At- tention is all you need. Advances in neural information processing systems, 30, 2017.
Lin, Y., Wan, H., Guo, S., Hu, J., Jensen, C. S., and Lin, Y. Pre-training general trajectory embeddings with maxi- mum multi-view entropy coding. IEEE Transactions Knowledge and Data Engineering, 2023.
Veličković, P., Cucurull, G., Casanova, A., Romero, A., Lio, P., and Bengio, Y. Graph attention networks. arXiv preprint arXiv: 1710.10903, 2017.
Loshchilov, I. and Hutter, F. Decoupled weight decay regu- larization. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019, 2019.
Wang, L., Zhang, X., Su, H., and Zhu, J. A comprehen- sive survey of continual learning: Theory, method and application. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024.
LOU, K. YANG, Y., YANG, F., and ZHANG, X. Maximum- profit advertising strategy using crowdsensing trajectory data. ZTE Communications, 19(2):29, 2021.
Ma, Z Tu, Z.,, Chen, X., Zhang, Y., Xia, D., Zhou, G., Chen, Y., Zheng, Y., and Gong, J. More than routing: Joint gps and route modeling for refine trajectory representation learning. In Proceedings of the ACM on Web Conference 2024, pp. 1064-3075,-00 2024.
Wang. S., Cao, J., and Philip. Y. Deep learning for spatio-temporal data mining: A survey. IEEE transac- tions on knowledge and data engineering, 34(8):3681- 3700, 2020.
Wang. Z., Long. C., Cong, G., and Zhang, Q. Error-bounded online trajectory simplification with multi-agent rein- forcement learning. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, pp. 1758-1768, 2021.
Mao, A., Mohri, M., and Zhong. Y. Cross-entropy loss func- tions: Theoretical analysis and applications. In Interna- tional conference on Machine learning, pp. 23803-23828. PMLR, 2023.
Mao, Z., Li, Z., Li, D., Bai, L., and Zhao, R. Jointly con- trastive representation learning on road network and tra- jectory. In Proceedings of the 31 ACM International Conference on Information & Knowledge Management, pp. 1501-1510, 2022.
Xi, D., Zhuang, F., Liu, Y., Gu, J., Xiong, H., and He, Q. Modelling of bi-directional spatio-temporal dependence and users' dynamic preferences for missing poi check-in identification. In Proceedings of the AAAI conference on artificial intelligence, volume 33, pp.
2019.
Newson, P. and Krumm, J. Hidden markov map matching through noise and sparseness. In Proceedings of the 17th ACM SIGSPATIAL international conference on advances in geographic information systems, pp. 336-343, 2009.
Xia, T., Qi, Y., Feng, J., Xu, F., Sun, F., Guo, D., and Li, Y. Attnmove: History enhanced trajectory recovery via attentional network. In Proceedings of the AAAI conference on artificial intelligence, volume 35, pp. 4494 4502, 2021.
Ren, H., Ruan, S., Li, Y., Bao, J., Meng, C., Li, R., and
Zheng, Y. Mtrajrec: Map-constrained trajectory recovery via seq2seq multi-task learning. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, pp. 1410-1419, 2021.
Xie, D., Li, F., and Phillips, J. M. Distributed trajectory similarity search. Proceedings of the VLDB Endowment, 10(11):1478 1489, 2017.

---

GTR: A General, Multi- Nieti, and Dynamic Framework for Trajectory Representation Learning
Yang, C. and Gidofalvi, G. Fast map matching, algorithm integrating hidden markov model with precomputation. International Journal of Geographical Information Sci-
Zhu, Y., Yu, J. J., Zhao, X., Liu, Q. Ye, Y., Chen, W., Zhang, Z., Wei, X., and Liang, Y. Controltraj: Controllable tra- jectory generation with coonttay-o diffusion model. In Proceedings of the 30th ACM SIGKDD Con- ference on Knowledge Discovery and Data Mining, pp- 4676-4687, 2024.
ence, 32(3):547-570, 2018.
Yang, P., Wang, H., Zhang, Y., Qin, L., Zhang, W., and Lin, X. T3s: Effective representation learning for trajectory similarity computation. In 2021 IEEE 37th International Conference on Data Engineering (ICDE), pp. 2183-2188, 2021a.
Yang, S. B., Guo, C., Hu, J., Tang, J., and Yang, B. Un- supervised path representation learning with curriculum negative sampling. In Proceedings of the Thirtieth In- ternational Joint Conference on Artificial Intelligence, IJCAI 2021, Virtual Event Montreal, Canada, 19-27 August 2021, 2021b.
Yang. S. B., Hu, J., Guo, C., Yang, B., and Jensen, C. S. Lightpath: Lightweight and scalable path representation learning. Proceedings of the 29th ACM SIGKDD Con- ference on Knowledge Discovery and Data Mining, pp. 1990-3010, 2023.
Yao, D., Zhang, C., Zhu, Z., Huang, J., and Bi, J. Trajectory clustering via deep representation learning. In 2017 in- termational joint conference on neural networks (LJCNN), pp. 3880-3887, 2017.
Yao, D., Cong, G., Zhang, C., and Bi, J. Computing tra- jectory similarity in linear time: A generic seed-guided neural metric learning approach. In 2019 IEEE 35th in- ternational conference on data engineering (ICDE). pp. 1358-1369, 2019.
Yao, D., Hu, Du, L., Cong, G., Han, S., and Bi, J. Trajgat: A graph-based long-term dependency modeling approach for trajectory similarity computation. In Proceedings of the 28th ACM SIGKDD conference on knowledge discov- ery and data mining, pp. 2275 2285, 2022.
Yi, Z., Zhou, Z., Huang, Q. Chen, Y., Yu, L., Wang, X., and Wang, Y. Get rid of isolation: continuous multi-task spatio-temporal learning framework. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024.
Yu, I.., Zhang, W., Wang, J., and Yu, Y. Seggan: Sequence generative adversarial nets with policy gradient. In Pro- ceedings of the AAAI conference on artificial intelligence, volume 31, 2017.
Zhou, Z., Huang, Q. Wang, B., Hou, J., Yang, K., Liang, Y., and Wang, Y. Coms2t: A complementary spatiotemporal learning system for data- adaptive model evolution. arXiv preprint X.v::2240..00 0/7388 2024.
12

---

GTR: A General, Multi- Vieti- and Dynamic Framework for Trajectory Representation Learning
Appendix
Appendix A
Related Work
14
Appendix B
Additional Methodology Details
14
B.1
Fine-tuning Methods
14
B.2
The Process of GTR
16
B.3
Model Interpreting
16
B.4
Complexity Analysis
17
B.5
Data Enhance Strategies
17
B.6
POIs Extraction Approach
17
Appendix C
Additional Experimental Details
17
C.1
Extra Experiment Settings
17
C.2
Model Complexity Analysis
17
C33 Model Efficiency Study..
17
C,4 Model Interpretability Evaluation
18
C,5 Extra Experiment on Chengdu Dataset
19
C.6 Model Scalability Evaluation
19
C.7 Case Study of the Top-3 Similarity Search
19
C.8 Case Study of Trajectory Representation
20
13

---

GTR: A General, Multi- View, and Dynamic Framework for Trajectory Representation Learning
Table 9. A Comparison of the Latest Trajectory Representation Learning Models
Trajectory Analysis Tasks
Model
Year
Multi View
Model Updating
Similarity
TTE
Simplification
Impulation
Generation
Classifiation
Trembr (Fu & Lee, 2020)
20
X
K
PIM (Yang et ol., 2021h)
UCAT21
(Chen et. 2021)
CIKM'21
JCLRNT (Mao al., 2022)
CIKM'2 22
/
X
X
/
X
START (Jiang et al,, 2023a)
ICDE'23
/
X
X
X
X
X
LightPath (Yang et al., 2023)
KDD'2 23
X
X
/
X
X
MMTEC (Lin et al., 2023)
TKDE'23
X
X
el 2024)
WWW'24
GTR
2025
0
6
V
A. Related Work
Trajectory Representation Learning in Free Space. In free space, the GPS trajectories are transformed into data sequences for representation learning. For instance, traj2vec (Yao et al., 2017) splits trajectories into time interval based windows and encodes each window as a token in a sequence. Similarly, t2vec (Li et al., 2018) and E2DTC (Fang et al., 2021) partition the space into equally sized grids and use seq2seq models for representation. NeuTra (Yao et al., 2019) introduces an enhanced spatial memory module capture correlations among trajectories, while T3S (Yang et al., 2021a) incorporates auxiliary loss functions and self-attention mechanisms to improve trajectory representations for the similarity search task. TrajFormer (Liang et al., 2022) performs continuous point embedding to learn the representations of each point. S3 (Fang et al., 2023) designs lightweight framework with two chained seq2seq models to support the trajectory simplification task. Furthermore, TrajCL (Chang et al., 2023a) applies contrastive learning based on data augmentation and dual attention for trajectory similarity tasks. However, all of these studies ignore the physical constraints imposed by road networks upon behaviors of mobile road users, e.g.. people and vehicles. In this paper, we target performing robust trajectory representation learning considering road network context.
Trajectory Representation Learning in Road Networks. In road networks, the original GPS trajectories are typically mapped onto road network using map-matching algorithms (Yang & Gidofalvi, 2018). Compared to free-space settings, it provides the topological structure of the road network, enabling more precise modeling of trajectories. In this setting, existing works are primarily divided into two classes, task-specific and general-purpese methods. For the former, GTS (Han et al., 2021) designs a GNN-based framework for similarity computation tasks. ST2vec (Fang et al., 2022) considers temporal trajectory similarity and fuses spatial and temporal features. Trajbert (Si al., 2023) devises BERT-basee (Devlin et al., 2019) trajectory recovery method with teeporlltemporal aware loss function. Furthermore, TS-TrajGen (Jiang al., 2023b) introduces a two-stage generative adversarial framework support trajectory generation tasks. To support more tasks, recently, there have been several general-purposs models. Trembr (Fu & Lee, 2020) extends t2vec by performing map matching and introducing a road2vec module to learn road network representations. TrajGAT (Yao et al., 2022) integrates GAT's with Transformer to learn trajectory embedding, which retains long-term dependencies. Toast (Chen et al., 2021) and PIM (Yang et al., 2021b) utilize node2vec to learn road representations and then apply a Transformer encoder for trajectory embeddings. Further methods, including JCLRNT (Mao et al., 2022) and SARN (Chang et al., 2023b) enhance the Toast model through contrastive learning. START (Jiang et al., 2023a) incorporates semantic information from road networks and combines GAT with BERT for trajectory representations tailored for different tasks. MMTEC (Lin et al., 2023) utilizes discrete and continuous encoders to learn a general representation. LightPath (Yang et al., 2023) employs relational inference contrastive approach with global knowledge distillation framework for encoding. JGRM (Ma et al., 2024) uses a Transformer to learn representations from continuous GPS points and the road network. Table summarizes existing general-purpor trajectory representation learning methods. As observed, although MMTEC (Lin et al., 2023) and JGRM (Ma et al., 2024) integrate multiple views, they still overlook the hidden POI features within different regions, thereby affecting the performance of downstream tasks. Moreover, existing methods support limited trajectory analysis tasks while failing to enable representation model updates. In this paper, we propose multi-view trajectory representation framework that jointly captures free-space semantics and road-network topology features. Furthermore, approach supports the widest range of trajectory analysis tasks and enables online model updates, addressing the limitations of prior methods.
B. Additional Methodology Details
B.1. Fine-tuning Methods
As illustrated Fig. a simplified workflow for each task provided. All of the fine-tuning methods are listed follows.
14

---

GTR: A General, Multi- Vieti, and Dynamic Framework for Trajectory Representation Learning
Table 10. The Ablation Study in Beijing Dataset
Top-k Similar Injectory Query
Travel Time Estimation
Troectoyy Imputation
Trajettry Clasetication
Trajectry Ceneration
Simplifiation
MR
HIK
MAE
MSB
MAP::
recall08
recol100
MAP
ACE
F1
AUC
Housdofft
17WW
MED
CTTR
1,0130
0.9906
0.9996
40.55944
15.15476
0.99486
0.9862
0.30164
0.86297
0J00085
Time Embhad
1,0436
0.9730
0.9986
4.01588
40.7033
32,63000
0.99401
0.9230
0.98601
0.77005
0.83011
0,83322
0.3089
0.52565
0.000235
Grdd Embbed
1.0274
0.9810
4080434
3153330
0.98674
0.99957
0.96646
0.76626
0.52965
0.3739
0.52296
0.0000344
Emnhed
10152
0.9880
0.9955
4,00200
41159894
30.59967
0.98293
099635
0.75664
0.81914
0.81847
0.2963
0.000250
ST-M3F
095925
Tiplall
12.96600
0.99318
0.9855
0.79440
0.85313
0.90513
3663815
0,98352
0.95244
0.76601
0.53881
0.47877
Origizal Trsjectury
Imput Tmjjetory
Mask Trajecbory
Input Irajecsoyy
Input Trijentory
Trajectory
Distance
Compule
Simplify
Predict
Predict
Predict
Cienerato
Oompancy
Useecnpancy
Most Sinilla Irgledtor....
Singlifted Triestory
Predict Trajectory
Time Dstimate
Trajectory Classiticaiion
Generate Trajectory
(a) Similarity
(b) Simplification
(c) Imputation
(d) TTE
(c) Classification
(f) Generation
Figure 6. The Mainstream Trajectory Analysis Tasks
1. Trajectory Similarity Computation. Fine-tuning is unnecessary for the similarity task since the model learns trajectory distinctions during the pre-training stage. Instead, we evaluate model performance using the most similar trajectory search and visualize the Top-k similar trajectory search results for comparison with other models. 2. Trajectory Simplification. For the trajectory simplification task, we first generate labels using the Douglas-Peucker simplification algorithm (Douglas & Peucker, 1973). Then, we employ binary classification task to determine whether specific segments of the trajectory should be omitted:
1 N
Eximpls/y fy
(y log(ū.) + (1 y.) y.) log(1 9z))
(21)
where N is the number of training samples, ÿt denotes the predicted probability value, and yi represents the true label. 3. Trajectory Imputation. For the trajectory imputation task, we replace 20% of the trajectory with masked tokens, similar to the pre-training task, and then predict the missing segments using the model. The original trajectory serves as the label, with the cross-entropy loss function used as the optimization objective:
Nmosk
Lempratation
vi(c.) log().(c.)),
(22)
Nmask
where Co is the size of the trajectory vocabulary, Nmaak is the number of masked tokens, & denotes the predicted probability value of the masked token, and yı represents the true label.
4. Trajectory Classification. This task aims to classify trajectories based on specific labels, such as whether they are carrying passengers or the type of taxi call. We utilize a simple fully connected layer followed by Softmax activation to obtain the predictions, expressed as ÿ = Sofimax (FC(R))) The model is then optimized using the cross-entropy loss:
Lelassi scation
1 N
Σ vi(c.)
(23)
where C, is the size of the trajectory vocabulary, N is the number of training samples, is denotes the predicted probability value by the model, and yi represents the true label.
5. Trajectory Generation. The trajectory generation task involves removing 50% of the trajectory's 's content and then predicting the remaining 50% using the model. The predicted results are evaluated using the cross-entropy loss, and the outcome is compared with the original trajectory using common trajectory metrics, such as Dynamic Time Warping (DTW), to assess the effectiveness of the generation:
N Nmark
Egeneration
(24)
Nmask
where C₁ is the size of the trajectory vocabulary, Nmask is the number of masked tokens, i denotes the predicted probability value of the masked token, and y/s represents the true label.
15

---

GTR: A General, Multi- View, and Dynamic Framework for Trajectory Representation Learning
Algorithm 1 The Process of GTR
Input: road network G (V, F, A); GPS trajectory T, road features Fu, grids types c.oi
1: Preprocess: map T on G and space to get T and TT, pre-training dataset D fine-tuning dataset D updating dataset DD
2: for dmask, da dp. d, 'D" do
3: Calculate L = 7 Leriplet (da, dp, dn) + - Lmask (mast(dmaak): (dmask);
4: Update GTR by minimizing L;
5: end for
6: for deakk *D do
7: Calculate Leask for the downstream tasks;
8: Update GTR by minimizing Ltaski
9: end for
10: Online updating stage: Freeze the half of GTR's transformer encoder layers;
11: for dupdate E D do
Calculate Lupdate for the downstream tasks;
13: Update GTR by minimizing Lupdaate;
14: end for
Road Segments
Attention
0.08
Value Matrix
0.06
10
GTR
Encoder
0.04
20 27
Transforner Engoder
0.02
Trajectory Analysis
27
27 (c) Attentiio Value Matrix
(a) A Trajectory
(b) Attention Value Computation
Figure 7. Visualization of Attention Values
B.2, The Process of GTR
Algorithm presents the complete process of GTR training, which consists of preprocessing, pre-training, fine-tuning, and online updating.
In the preprocessing stage (line 1), we require the GPS trajectory T, the road network G (V, E, along with its static road features F. and POI types poi for each grid. We then apply the map-matching algorithm and grid partition method to transform T into T" and T The features F, are used the initial embedding for the GAT in GTR's MVE module. Next, we process T", T and ooo to generate the pre-tra pre-training dataset D", fine-tuning dataset D. and updating dataset DV
In the pre-training stage (lines 2-5), we first obtain the pre-training data dmaaks du dp. d, from D² We then compute the total loss by combining the triplet loss Ltriptet and MLM loss Lmask with the weight parameter ry to update GTR. In the fine-tuning stage(lines 6-9), we fine-tune GTR by calculating the downstream task loss Lrask for different downstream tasks, as outlined Section 3.2.3.
Finally, the online updating stage (lines 10-14), we use the fine-tuned GTR from the previous stage, freeze half of its Transformer encoder layers, and update the GTR by minimizing the updating loss Lapdate-
B.3. Model Interpreting
Understanding how different parameters in the model influence the representation vectors is crucial. Therefore, an interpretable model evaluation method is necessary for optimization. A natural approach is analyze the various model parameters in detail. However, some parameters contribute little model interpretation, while consuming significant amount of time during the analysis.
We propose a simple yet effective method to address this gap. As shown in Fig. 7(a), the trajectory constrained by the road network contains 27 road segments. These segments are processed through our GTR framework, illustrated in Fig. (b), where they pass through the Transformer encoder layers. From the encoder, we extract the attention value matrix, which represents the pairwise attention weights among the 27 road segments. This matrix indicates the degree of attention one
16

---

GTR: A General, Multi-View, and Dynamic Framework for Trajectory Representation Learning
road segment pays to another, enabling the model effectively encode contextual information by learning the relationships between different segments of the trajectory. Fig. 7(c) visualizes the attention value matrix as a heat map, reflecting the influence of neighboring road segments the trajectory in Fig. 7(a). The higher the attention value, the greater the impact of road segment. Based on these attention values, we perform an explanatory analysis. comparing the attention values derived from the Transformer encoder (cf. Eq. 2), which provides actionable insights for model optimization. Importantly, no additional computational or time costs are incurred during model interpretation, as we utilize information generated during model training.
B.4. Complexity Analysis
For the process of GTR, the time complexity of the single training phase is ([4-|D"1++ +D"* [D"i), the size the datasets. the pre-training stage, we calculate the Liripler and Lmask require a complexity of O (I)))))). While for the fine-tuning stage, we calculate Ltask for different downstream tasks, having a complexity of O(D")) for this stage. Finally, in the online updating stage, the complexity of calculating and minimizing Lupdate is O(IDU)).
depending on
B.5. Data Enhance Strategies
To enable the model to learn from more diverse data for enhancing the effectiveness of pre-training, we employed the following data augmentation strategies:
1) Sub-trajectory Selecting: This augmentation enhances trajectories by randomly removing continuous subsequence. To maintain the trajectory's 's continuity, trimming is applied only at the start or end of the trajectory. The trimming ratio is randomly selected between 0.05 and 15. This method is effective because trajectories with similar starting points or destinations often share similar features.
2) Road Drift: In tasks involving road drift, random roads and their corresponding timestamps within a trajectory are selected and masked. The resulting masked trajectories, which are treated as having missing values, enable the model to learn travel semantics across both temporal and spatial dimensions.
B.6. POIs Extraction Approach
We propose a POIs extraction approach. First, obtain the POIs from OpenStreetMap and classify the different types of POIs into mainly 4 categories: service POIs, residential POIs, commercial POIs, and other POIs. Then we calculate the number of each POI type within every grid. As the result of the residential areas always containing commercial POIs like small restaurants or shops, we also measure the size of each area to accurately determine the type of each grid.
C. Additional Experimental Details
C.1. Extra Experiment Settings
In the pretraining stage, we set the hidden size to 768, the number of training epochs 10, and both the attention layers and heads 12. In the fine-tuning stage, we set the training epochs to 50. For the most similar trajectory search, the query dataset consists of 5k trajectories and the key dataset consists of 50k trajectories, with detour rate of 0.2. In the classification task, there are two labels in the Beijing dataset and three labels in the Porto dataset. In the travel time estimation task, we predict the trip duration in minutes.
C.2. Model Complexity Analysis
A comparison of model parameters is shown in Table 11. While GTR has a higher parameter count due to its milti-view encoder (MVE) and spatio-temporal fusion pre-training (STP) modules, this increase is justified by two key advantages. (i) Enhanced Capability. The additional parameters enable GTR to support more downstream tasks effectively. (ii) Performance Gains. The trade-off in model size is offset by improvements in accuracy and robustness.
C.3. Model Efficiency Study
In this part, we focus on testing the efficiency of our approach. We measure the training time of the pre-training stage and the inference time of the most similar trajectory search. We choose 5k query trajectories and 50k key trajectories from the
17

---

GTR: A General, Multi- Vieti and Dynamic Framework for Trajectory Representation Learning
Model Name
Parameter Size (MB)
PIM
94.57
Trembr
148.08
Toast
161.18
START
1126.40
LightPath
73.96
JGRM
375.60
GTR
862.99
Table 11, Comparison of model parameter sizes.
Training Time (minutes)
Inference Time (minutes)
Trembr
7.450
1.450
PIM
5,867
2.873
Toast
9.883
1.886
START
51.617
4.850
LightPath
7.717
4.733
JGRM
118.598
3.617
GTR
179.583
6.883
Table 12. Comparison of Training and Inference Time Across Models.
test dataset. The valuation of the efficiency result is shown in Table 12. GTR spends more training time than other models but does not spend too much time during inference and outperforms state-of-the-art models in tasks.
C.4. Model Interpretability Evaluation (RQ4)
We consider explaining the model training procedure for two tasks (i.e., travel time estimation and trajectory classification). Because they are the typical tasks that require both spatial and temporal features, and enable effective evaluation of our model's interpreting strategy. Thus, this subsection, we conduct model interpretability evaluation for the two tasks above. Specifically, we select the important road segments Vimp with the greatest attention values, and mask them by replacing removing. Then, evaluate GTR by using these processed trajectories (i.e., GTR w/o Vimp) for the two tasks, and compare it with GTR trained by using the original trajectories (i.c., GTR w/ Vimp).
As shown in Figure 8, we observe that GTR w/ Vimp performs better than GTR w/o Vimp for both travel time estimation and trajectory classification tasks on two datasets. This is because the important segments play a vital role in trajectory representation learning. Thus, it is appropriate to assign more neurons or network layers for the road segments with higher attention values, instead of embedding all of the road segments uniformly. This provides optimization guidelines for improving model structure, achieving more effective trajectory representations.
GTR W/
GTR w/o Vimp
50
10
1.0
1.0
Accuraty (%)
Accuracy (%)
Accuracy 22
Accuracy 5
0.8
0.8
k777
0.6
Evalation Metrics
Evahation Metrics
Exalation Metrics
Exahation Metrics
(a) TTE (Beijing)
(b) TTE (Porto)
(c) Classification (Beijing)
(d) Classification (Porto)
Figure Interpretability Evaluation
18

---

GTR: A General, Multi-Vess View, and Dynamic Framework for Trajectory Representation Learning
0.8
0.6
MAE
MAF
12
0.4
0.2
2wV
4W
6W
8w
10w
0.0
2w
4w
BW
Bw
10w
Datase Size
Dataed Size
(a) MAE in Beijing
(b) MAE in Porto
Figure 9. Pre-training Effect Study
10
Man Rank
Pudo
6
HNO
5W
10W
15W 20W 2OW
0.9
5W
10W 15W 20W 25
Dalaset Size
Dalasst Size
(a) Mean Rank
(b) HR@
Figure 10. Model Scalability Evaluation
C.5. Extra Experiment on Chengdu Dataset
Existing works (START (Jiang al.. 2023a), Trembr (Fu Lee, 2020), ST2Vec (Fang et al., 2022), etc.) mainly use Beijing and Porto datasets, larger Chengdu dataset (containing 2,140,129 trajectories). We specifically test the most computationally intensive trajectory similarity computation task. Results are shown in Table 13. As expected, GTR maintains superior performance over baselines on the Chengdu dataset, confirming its robustness.
adopted them for fair comparison. To test the robustness of GTR, we have added the
Table 13. Evaluation on Top-k Similarity Computation Task
Chengdu
Methods
Mean Rank
HR@1
HR @
Trembr
63.5602
0.1940
0.4060
PIM
7.1468
0.6724
0.8552
Toast
8.3456
0.5588
0.7874
START
6.8745
0.6575
0.8434
LightPath
6.2140
0,6016
0,8206
JGRM
2.3111
0.8292
0,9352
GTR
1.7401
0.9212
0.9834
C.6. Model Scalability Evaluation (RQ5)
We conduct the model capacity evaluation by performing the most similar search using GTR trained on varying dataset sizes. The results are reported in Figure 10. We observe that with the growth of dataset size, model performs better (i.c., MR<2 and HR @ 1>9955) on both the Beijing and Porto datasets. This is because GTR is able to extract more spatial and temporal features via multi-view encoding from more training samples. Therefore, GTR has large capacity to support large-scale model training and data processing.
C.7. Case Study of the Top-3 Similarity Search
In this part, we present a case study for comparing the top three performing models on Top-3 similar trajectory search. We randomly select one trajectory from the test dataset, and find the Top-3 similar trajectories within The results are shown in Figure 11. We observe that our GTR can find more similar trajectories than other models due to the effective MVE module and STP module in GTR.
19

---

GTR: A General, Multi- View, and Dynamic Framework for Trajectory Representation Learning
Query Resuts Quay Trajoztoyy
Most Similar Trajectory
Second Simalar Tmjectory
Third Similar Trajeciory
Most Similar Traectory
Secand Similar Trajeciory
Thiel Similar" Trijecooy
(a)
GTR
(b) LightPai
Most Similar Trajeturry
Second Similar Trojectory
Third Similar Trajectony
SimilaTTajcctor
Most Simmla Trajectory
Second Simliar Trajectory
Third Similar Trajeturrd
(c) START RT
[d]]RR
Figure I1. Case Study: Top-3 Similarity Search (Beijing)
T2
T
Zad Competsot
2nd Companent
-4
30
Compencnt
Component
(a) w/o pre-train
(b) w/ pre-train
Figure 12. Case Study of Trajectory Representations in Beijing
C.8. Case Study Trajectory Representation
In this experiment, we study the effect the pre-training model within GTR in two ways. First, we train the GTR model without pre-training (i.e., w/o pre-train), and compare it with the pre-trained model (i.e., w/ pre-train) on the travel time estimation task. The results are reported in Figure 9, Second, representations generated by GTR trained with and without pre-traine pre-training, respectively. Figure 12 presents the visualizations. We observe that w/ pre-train performs better than w/o pre-train various dataset sizes of the two datasets, indicating that the pre-trained model is vital in GTR and able to capture more general knowledge for serving downstream tasks.
conduct case study, which visualizes the trajectory
20


Reviews:
[{"review_id": "rOX5qNNOjj", "reviewer": "Reviewer_vfe9", "summary": "This paper proposes GTR, a trajectory representation framework built on a pre-train and fine-tune architecture.\nThe proposed GTR consists of a Multi-View Encoder (MVE) and Spatio-Temporal Fusion Mixture of Experts (ST-MoE), supports pre-training, fine-tuning, and Online Frozen-Hot Updating (OFU), and facilitates multiple downstream tasks.\nCompared with previous work, GTR supports POI embedding, dynamic updating, and more downstream tasks. Experiments demonstrate that the performance of GTR surpasses previous work by a large margin, and the proposed modules are effective in most cases.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "**We thank the reviewer for offering the valuable feedback. We have addressed each of the concerns as outlined below.**\n\n```\nW1: Limited details are provided on the online updating approach. \n```\nWe are happy to provide more details about the online updating approach. To process newly arrived trajectory data, we employ the validation set to simulate real-world online/streaming scenarios. The model undergoes single-epoch incremental model updates.\n\n\n```\nW2: Some experimental results did not meet expectations, such as those in Table 5 and Table 9. \n```\nWe appreciate the reviewer's careful examination of our experimental results. Here, we are happy to provide more detailed experimental discussions to alleviate your concerns.\n\nRegarding **Table 5** (travel time prediction task), our online method GTR\\* shows slightly reduced effectiveness compared with our offline method GTR. This can be attributed to the presence of outliers in short-duration trajectories. Due to the sensitivity of regression task to short-term anomalies, it tends to overfit newly arriving anomalous real-time data. Nevertheless, our methods (GTR and GTR\\*) perform better than the other comparative baselines.\n\nRegarding **Table 9**'s ablation results for travel time prediction, the complete model shows slightly higher MAPE due to a small number of long-duration outliers. MAPE is known to be more sensitive to errors in lower-value ranges, which might amplify the effect of these outliers. \n\n\n```\nW3: It is beneficial to provide definitions of the metrics and specify which metrics indicate good performance, for clarity.\n```\n**These evaluation metrics are standard measures widely adopted in trajectory data processing research.** In the interest of manuscript conciseness, we directly cited the related papers in our manuscript. Here, due to space limitations, we provide rough definitions of the metrics and specify which metrics indicate good performance. We acknowledge that providing more detailed computational formulations could enhance reproducibility, and we will include these in the revised manuscript's appendix to ensure full methodological transparency. \n\nFor **trajectory simplification task**, $PED$ computes the shortest perpendicular distance between a deleted point $p_i = (x_i, y_i)$ and the line segment connecting its neighboring points $p_s = (x_s, y_s)$ and $p_t =(x_t, y_t)$. Lower $PED$ indicates lower compression errors.\n\nFor **trajectory imputation task**, $Recall@x$ evaluates the model's ability to recover masked tokens by checking whether the ground truth appears in the top-x predicted candidates. Specifically, if the true value is contained within the top-x ranked predictions, $Recall@x$ is assigned 1 for that token; otherwise, it is assigned 0. The final metric is computed by averaging these binary outcomes across all masked tokens in the evaluation set. The MAP represents the probability of the precision, and higher $Recall@x$ and MAP indicate higher performance.\n\nFor **travel time estimation task**, we use Mean Absolute Error (**MAE**), Mean Absolute Percentage Error (**MAPE**), and Mean Square Error (**MSE**) metrics. Specifically, lower MAE, MAPE, and MSE indicate higher prediction accuracy.\n\nFor **trajectory classification task**, we use $ACC$, $F1-Score$, and $AUC$ metrics. Specifically, higher $ACC$, $F1-Score$, and $AUC$ indicate higher classification accuracy. \n\nFor **trajectory generation task**, we use Hausdorff and DTW distance metrics. Lower DTW and Hausdorff value indicate higher performance. \n\nFor **trajectory similarity computation task**, we use Mean Rank and $HR@k$ metrics. Lower MR value and a higher $HR@k$ value indicate better performance.\n\n\n```\nSuggestions: Both MLM and Triplet Training are pre-training methods. It is beneficial to list them in parallel in Section 3.2.2 for clarity.\n```\nThanks for the suggestion. Such layout issues can be easily adjusted.\n\n\n```\nQuestions: Would you provide a comparison of model parameters between the proposed GTR and the baselines?\n```\nA comparison of model parameters is shown below. While GTR has a higher parameter count due to its multi-view encoder (MVE) and spatio-temporal fusion pre-training (STP) modules, this increase is justified by two key advantages. (i) **Enhanced Capability**. The additional parameters enable GTR to support more downstream tasks effectively. (ii) **Performance Gains**. The trade-off in model size is offset by improvements in accuracy and robustness. \n\n|  Model Name |  Parameter Size (MB)  |\n| ---------- | ------------------ |\n| PIM| 94.57|\n| Trembr| 148.08|\n| Toast| 161.18|\n| START| 1126.40|\n| LightPath| 73.96|\n| JGRM| 375.60|\n| GTR| 862.99|", "claims_and_evidence": "Yes.", "methods_and_evaluation_criteria": "Yes.", "theoretical_claims": "The application of the related theory in this paper is correct.", "experimental_designs_or_analyses": "The experimental designs and analyses are largely thorough and effective.\nHowever, some experimental results did not meet expectations and lack further discussion.", "relation_to_broader_scientific_literature": "The key contributions of the paper are related to the broader scientific literature on trajectory representation learning and to multiple application studies on downstream tasks, such as travel time estimation.", "essential_references_not_discussed": "No.", "other_strengths_and_weaknesses": "Strengths:\n\n1. This paper is highly comprehensive and technically solid. The proposed method supports pre-training, fine-tuning, and dynamic updating; it takes multi-view inputs and facilitates multiple downstream tasks. Experiments demonstrate its superior performance.\n\n2. The proposed challenges are well-justified, and the corresponding solutions are innovative, largely effective, and of further practical value.\n\n3. The paper is well-presented, with a clear flow from the challenges to the corresponding solutions and the purposes of the experimental design.\n\nWeaknesses:\n\n1. Limited details are provided on the online updating approach; please elaborate on it. For example, how does the method process the newly available trajectory data?\n\n2. Some experimental results did not meet expectations, such as those in Table 5 and Table 9. It is necessary to provide further discussions.\n\n3. Multiple downstream tasks and evaluation metrics are presented in the paper, and it is beneficial to provide definitions of the metrics and specify which metrics indicate good performance, for clarity.", "other_comments_or_suggestions": "Both MLM and Triplet Training are pre-training methods. It is beneficial to list them in parallel in Section 3.2.2 for clarity.", "questions_for_authors": "1. Please see the weaknesses.\n\n2. Would you provide a comparison of model parameters between the proposed GTR and the baselines?", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "dFp7bcw3ea", "reviewer": "Reviewer_z8Rd", "summary": "This paper proposes a novel framework for trajectory representation learning by integrating free-space trajectories with road network-based trajectories. The framework consists of three key components: 1) a multi-view encoder designed to handle different types of trajectories; 2) a spatial-temporal fusion pretraining mechanism that leverages a mixture of spatial and temporal experts; and 3) an online updating strategy for timely processing of new trajectories. Extensive experiments conducted on datasets from Beijing and Porto, comparing against 12 baseline methods, demonstrate the effectiveness of the proposed approach.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thanks for all the valuable comments.\n\n**Response to E1:** Existing works (START, Trembr, ST2Vec, etc.) mainly use Beijing and Porto datasets, so we adopted them for fair comparison. Following the suggestion, we have added the larger Chengdu dataset (containing 2,140,129 trajectories). Due to space limitation, we specifically test the most computationally intensive trajectory similarity computation task. The results are shown in the anonymous link https://anonymous.4open.science/r/Rebuttal_GTR/ (Table 1 : Trajectory Similarity Computation on Chengdu Dataset). As expected, GTR maintains superior performance over baselines on this new dataset, confirming its robustness. \n\n**Response to E2:** **We would like to emphasize that GTR extends task coverage compared to existing methods**. As reported in Table 8 (Appendix A, lines 605--614), GTR is the first unified framework supporting all six fundamental trajectory tasks, whereas prior methods (including the state-of-the-art START, LightPath, JGRM) handle at most three tasks. Note that, our framework allows easy adaptation to additional tasks (e.g., next-location prediction, anomaly detection) through straightforward training strategy modifications. For anomaly detection specifically, our framework can learn discriminative trajectory representations through the MVE and STP modules. Based on that, we can learn representations of different trajectories and classify them as normal or abnormal.\n\n**Response to E3&References:** **We appreciate the reviewer's feedback regarding baseline selection**. We would like to clarify that GTR is fundamentally a trajectory representation learning framework, rather than a task-specific model. Our primary objective is to learn robust trajectory embeddings that can effectively support multiple downstream tasks, which differs from specialized methods designed for individual tasks. This experimental design aligns with existing trajectory representation learning studies. Following the suggestion, we have now included comparisons with task-specific methods (AttnMove, MtrajRec, ControlTraj). The results are shown in the anonymous link https://anonymous.4open.science/r/Rebuttal_GTR/ (Table 2: Evaluationon on Trajectory Imputation Task; Table 3: Evaluationon on Trajectory Generation Task). As observed, GTR still achieves superior performance, further demonstrating the effectiveness. In the revised paper, we will include these results and cite these works.\n\n**Response to Methods And Evaluation Criteria:** We appreciate the concerns about the technical contributions and novelty. GTR effectively and innovatively unified multi-view encoding, multi-task pre-training, and online adaptation, which have been recognized by the other reviewers (vfe9, Th6q, and nfbU).\n\n(i) While multi-view learning is not new, our **MVE is first to integrate Grid, POI, and road-network attributes to jointly model spatial, semantic, and structural features—unlike prior works that focus on only one or two views**. The ablation studies (Tables 4 and 9) prove the effectiveness.\n\n(ii) Our ST-MoE is not a trivial extension of standard MoE, as **we introduces task-aware gating to dynamically adjust spatio-temporal feature fusion**. This enables jointly optimizing multiple tasks while preserving inter-task correlations. Additionally, we employ dedicated spatial and temporal experts (rather than multiple experts) to ensure clear structural separation between spatial and temporal feature learning. This design mitigates the common issue of expert polarization, where only a subset of experts remains active.\n\n(iii) Our online updating strategy is theoretically grounded in incremental learning [1]. We appreciate the opportunity to clarify the theoretical foundations, which **combines layer-wise parameter freezing with Lyapunov stability analysis to ensure robust adaptation while preventing catastrophic forgetting**.\n\nSpecifically, we freeze the first $L$ layers and update the last $N−L$ layers. The objective optimization function is:  $\\min\\_{\\theta^{L+1:N}}\\mathbb{E}\\_{(x, y)}\\sim\\mathcal{D}\\_{\\mathrm{new}}[\\ell(f\\_{\\theta\\_{\\mathrm{pre}}^{1:L}}(x), y;\\theta^{L+1:N})]$. With frozen lower-Layer parameters ($(\\nabla_{\\theta^{1:L}}\\ell=0)$), old features remain unchanged, which guarantees that the old features are not forgotten.\n\nThe updating process can be modeled as a dynamic system: $\\theta_{t+1}^{L+1:N} = \\theta_t^{L+1:N} - \\eta_t g_t$ , with a Lyapunov function: $V(\\theta)=\\mathcal{L}\\_\\mathrm{new}(\\theta)+\\gamma\\|\\theta^{1:L}-\\theta_\\mathrm{pre}^{1:L}\\|^2$. As $\\gamma\\to\\infty$, the system satifies: $\\mathbb{E}[V(\\theta\\_{t+1})]\\leq\\mathbb{E}[V(\\theta\\_t)]-\\eta\\_t\\|\\nabla\\mathcal{L}\\_{\\mathrm{new}}(\\theta\\_t)\\|^2$. The monotonic decrease of $V(\\theta)$ ensures stable updates. Freezing lower layers prevents cascading perturbations, balancing new feature learning with old feature retention.\n\n[1] *A Comprehensive Survey of Continual Learning: Theory, Method and Application.*", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "The key designs in the proposed framework appear to be trivial, offering limited novelty and technical contribution. The concept of the multi-view encoder is a common and straightforward approach that has been widely adopted in numerous spatial-temporal data mining studies. Additionally, the phrasing of the \"mixture of experts\" with only one spatial expert and one temporal expert seems somewhat forced and lacks clarity. Furthermore, while the online updating strategy aligns with intuition and represents a simple, practical design, it falls short in terms of technical depth and theoretical grounding.", "theoretical_claims": "NA", "experimental_designs_or_analyses": "1. The experiments only evaluate two small GPS trajectory datasets, which restricts the robustness and effectiveness of the proposed methods' performance.\n   \n2. While the authors argue that existing works cover only a limited range of trajectory tasks, the tasks mentioned in the paper are also narrow in scope, with notable omissions such as next-location prediction, map matching, and anomaly detection.\n\n3. Most tasks only incorporate baselines based on representation learning, lacking specific SOTA baselines tailored for each task. For example, trajectory imputation tasks fail to include AttnMove and MtrajRec, while trajectory generation tasks overlook ControlTraj and others.", "relation_to_broader_scientific_literature": "This work is closely related to representation learning in the context of spatial-temporal data mining and trajectory modelling.", "essential_references_not_discussed": "1. Xia, Tong, et al. \"Attnmove: History enhanced trajectory recovery via attentional network.\" Proceedings of the AAAI Conference on Artificial Intelligence. Vol. 35. No. 5. 2021.\n\n2. Ren, Huimin, et al. \"Mtrajrec: Map-constrained trajectory recovery via seq2seq multi-task learning.\" Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining. 2021.\n\n3. Zhu, Yuanshao, et al. \"Controltraj: Controllable trajectory generation with topology-constrained diffusion model.\" Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. 2024.", "other_strengths_and_weaknesses": "The paper is well-organized and easy to follow.", "other_comments_or_suggestions": "NO", "questions_for_authors": "Please refer to the previous section.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "f7DmEPTm2R", "reviewer": "Reviewer_Th6q", "summary": "This paper introduces GTR, a novel general, multi-view, and dynamic trajectory representation framework. GTR addresses the limitations of conventional approaches that rely exclusively on either free-space or road-network perspectives by incorporating a multi-view encoder to effectively capture the intrinsic spatio-temporal characteristics of trajectory data. GTR further enhances its representation capability through a spatio-temporal mixture of experts mechanism, which dynamically integrates spatial and temporal information. Moreover, GTR proposes an innovative online frozen-hot updating strategy that enables efficient model adaptation. Extensive evaluations conducted on two real datasets, encompassing comparisons with 12 baseline methods, demonstrate that GTR achieves superior performance across multiple metrics, significantly outperforming existing approaches in various trajectory analysis tasks.\n\n## Update after rebuttal: I have  read the rebuttal and my concerns are well addressed. Good luck!", "questions": "", "limitations": "", "rating": 4, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We express our gratitude to the reviewer for providing constructive feedback on our paper, and we greatly appreciate the acknowledgement of our contributions. We have addressed the specific concerns raised by the reviewer as detailed below.\n\n```\nW1&Q1: The paper does not specify the value of the balancing parameter β in the combined loss function (LGTR), leaving ambiguity in how the MLM and triplet tasks are weighted during pre-training, which could affect reproducibility and performance interpretation.\n```\nThanks for pointing this out. In our pre-training framework, **the balancing parameter $\\beta$ in the overall loss function is set to $0.7$**, which was determined through empirical validation on the validation set to optimally weigh the MLM and triplet loss components. This configuration ensures a balanced contribution from both tasks while maximizing downstream performance.\n\n\n```\nW2&Q2: Some figures (e.g., 1 and 2) and tables (e.g. 5 and 8) in the paper are too small to be clearly legible.\n```\nThanks for the comment. We will carefully fix these presentation issues in the revised manuscript.\n\n\n```\nOther Comments Or Suggestions: In table 5, the TTE task result MAPE in Porto 0.19186 should be bolded.\n```\nThanks for pointing this out. We will fix this marking error in the revised manuscript.", "claims_and_evidence": "Yes. The authors effectively demonstrate the significance of multi-view, dynamic, and general aspects through comprehensive comparative experiments and a rigorous ablation study.", "methods_and_evaluation_criteria": "Yes. i) To address the generalizability of the framework, this study introduces a novel Spatio-Temporal Mixture of Experts (ST-MOE) module for dynamically learning and integrating spatial and temporal features. ii) To enable online model update, this study proposes an effective online frozen-hot updating strategy.", "theoretical_claims": "Yes.", "experimental_designs_or_analyses": "Yes, I thoroughly examined the soundness and validity of the experimental designs and analyses. The experimental validation in this paper is indeed rigorous and convincing. The study offers a comprehensive performance comparison of 12 baseline models across two real-world datasets. Moreover, ablation studies are systematically conducted to demonstrate the effectiveness of each individual component. In addition, the authors provide details such as efficiency evaluation, model scalability evaluation, etc., which are crucial for demonstrating the practical applicability of the framework in real-world scenarios.", "relation_to_broader_scientific_literature": "This paper makes significant contributions that are closely connected to the wider scientific field. The MVE module addresses the limitations of single-view approaches, while the STP module integrates spatial and temporal features to solve the limitation of task-specific. Furthermore, the OFU module addresses the lack of support for model update. This work addresses the challenges of traditional methods.", "essential_references_not_discussed": "No, much of the work related to this paper has been already discussed.", "other_strengths_and_weaknesses": "S1. GTR effectively combines free-space and road-network views, providing robust representations for various trajectory tasks, along with an online frozen-hot update mechanism that adapts to the evolving nature of trajectory data.\n\nS2. The paper makes significant experimental contributions, convincingly demonstrating the model's improvements through extensive comparative experiments, comprehensive ablation studies, and efficiency evaluations.\n\nS3. The paper provides an in-depth exploration of the existing research in the trajectory representation learning. It offers a comprehensive discussion of the distinctions between the GTR and prior studies.\n\nS4. The paper is clearly written and easy to follow, with all necessary preliminaries provided. The motivations behind the different components of the model are well articulated.\n\n\nW1. The paper does not specify the value of the balancing parameter β in the combined loss function (LGTR), leaving ambiguity in how the MLM and triplet tasks are weighted during pre-training, which could affect reproducibility and performance interpretation.\n\nW2. Some figures (e.g., 1 and 2) and tables (e.g. 5 and 8) in the paper are too small to be clearly legible.", "other_comments_or_suggestions": "D1. In table 5, the TTE task result MAPE in Porto 0.19186 should be bolded.", "questions_for_authors": "Please answer the following questions,\n\nQ1. The paper does not specify the value of the balancing parameter β in the combined loss function (LGTR), leaving ambiguity in how the MLM and triplet tasks are weighted during pre-training, which could affect reproducibility and performance interpretation.\n\nQ2. Some figures (e.g., 1 and 2) and tables (e.g. 5 and 8) in the paper are too small to be clearly legible.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {"ethical_review_concerns": "N/A."}}, {"review_id": "kNNFK70mtr", "reviewer": "Reviewer_nfbU", "summary": "This paper proposes GTR, a general, multi-view, dynamic framework for learning trajectory representation. The authors conduct a thorough review of existing studies and identify three critical limitations in current research: (1) reliance on single-view representations, (2) limited multitasking capabilities, and (3) insufficient support for model updates. To address these challenges, GTR proposes three innovative components: a multi-view encoder (MVE) for capturing diverse perspectives of trajectory data, a spatio-temporal fusion pre-training (STP) mechanism for enhanced multitasking performance, and an online frozen-hot updating (OFU) strategy to facilitate dynamic model updates. Extensive experimental evaluations demonstrate that GTR consistently surpasses 12 state-of-the-art methods across six mainstream trajectory analysis tasks. Furthermore, the experiments validate the superiority and effectiveness of the proposed module designs, as well as the model's scalability and efficiency. These results highlight GTR's potential as a robust and versatile solution for trajectory representation learning.", "questions": "", "limitations": "", "rating": 4, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "**We appreciate the positive comments and our responses are detailed below.**\n\n```\nW1: Some parts of this paper are not explained very clearly, which could lead to misunderstandings and ambiguities. i) First, since there are many symbols, a symbol table is recommended for better following. ii) Besides, although the appendix includes detailed descriptions of relevant studies, the absence of citations of this \"Section\" in the main body may create the impression that the paper lacks a thorough discussion of prior studies. iii) In Table 1, does \"Avg.Length\" refer to the spatial length of the trajectory or the number of trajectory points?\n```\nWe sincerely appreciate the reviewer’s valuable feedback regarding the clarity of our manuscript. We have addressed each point as follows. (i) We would like to include a notation table below to clearly define all mathematical symbols used throughout the paper. (ii) We will add explicit citations to the appendix’s related work section in the main text. (iii) The “Avg.Length” in Table 1 indeed refers to the average number of trajectory points.\n\n| Symbol | Discription |\n| ----------------- | ------------------------------------- |\n| $\\mathcal{T}$     | GPS Trajectory                  |\n| $\\mathcal{T^g}$   | Grid Constrained Trajectory           |\n| $\\mathcal{T^r}$   | Road-network Constrained Trajectory   |\n| $\\mathcal{G}$     | Grid Cells                            |\n| $G$               | Road Network                          |\n| $D^{\\mathcal{T}}$ | Road Trajectory Dataset               |\n| $Z_R$             | Road Representation                   |\n| $Z_G$             | Grid Representation                   |\n| $Z_P$             | Position Representation               |\n| $Z_T$             | Temporal Representation               |\n| $Z_S$             | Spatial Representation                |\n| $h$               | Trajectory Generalized Representation |\n\n\n```\nW2: The experimental section can be optimized. i) For instance, including the percentage increase in experimental tables can indeed enhance the clarity and impact of the results. ii) The calculation processes of some evaluation metrics (e.g., PED for trajectory simplification task, Hausdorff/DTW for trajectory generation task, HR@x for trajectory similarity search task) are not provided.\n```\nThanks for the suggestion. (i) In addition to the detailed performance values, we are happy to include the percentage increase, i.e., 15%–60% for trajectory imputation task, 1%–4% for trajectory classification task, 10%–90% for the travel time estimation (TTE) task, 5%–26% for trajectory simplification task, 4%–8% for trajectory similarity computation task, and 37%–81% for trajectory generation task. (ii) As these evaluation metrics are well-established in the field, we directly cited the related papers that introduced them in our manuscript. The definitions of these metrics can refer to the response to reviewer vfe9's.\n\n\n```\nW3: There are also some minor details that need attention. i) \"we conduct extensive experiments on two real-world datasets demonstrate\"->\"we conduct extensive experiments on two real-world datasets to demonstrate\". ii) \"In this paper, we target perform\"->\"In this paper, we target performing\". iii) \"In classification task, there are two labels in beijing dataset\"->\"In classification task, there are two labels in the Beijing dataset\". iv) \"Mean Absolut Percentage Error (MAPE)\"->\"Mean Absolute Percentage Error (MAPE)\"\n```\nWe sincerely appreciate the reviewer's careful reading of our manuscript. We will correct all these minor issues in the revised version. We will carefully proofread the entire manuscript to improve its presentation.", "claims_and_evidence": "The motivation behind this study is clearly articulated, and the experimental results validate the identified shortcomings of existing work.", "methods_and_evaluation_criteria": "The studied trajectory representation learning problem is important in spatio-temporal data mining community. The authors have selected datasets and tasks that are widely recognized and extensively utilized in the field.", "theoretical_claims": "No mathematical proofs are provided in the paper.", "experimental_designs_or_analyses": "This paper conducts a comprehensive and rigorous set of experiments, thoroughly evaluating the proposed GTR framework from multiple perspectives, including model effectiveness, ablation, efficiency, scalability, case studies, etc.", "relation_to_broader_scientific_literature": "The paper has identified three key limitations in previous studies—single-view representation, limited multitasking capabilities, and lack of support for model updates—and proposes innovative solutions through the multi-view encoder (MVE), spatio-temporal fusion pre-training (STP), and online frozen-hot updating (OFU) mechanisms. An extensive evaluation using various tasks and datasets show the superiorities of the framework and its designs.", "essential_references_not_discussed": "The literature review is sufficient and the SOTA works have been discussed and evaluated.", "other_strengths_and_weaknesses": "Strengths:\n\nS1. The studied trajectory representation learning problem holds significant importance within the spatio-temporal data mining community, as it addresses fundamental challenges in analyzing and understanding complex movement patterns, which are critical for various real-world applications.\n\nS2. The paper has effectively identified three key limitations in previous studies. Then, the paper proposes three innovative solutions through the multi-view encoder (MVE), spatio-temporal fusion pre-training (STP), and online frozen-hot updating (OFU) mechanisms.\n\nS3. The extensive experiments have convincingly demonstrated the superior performance of GTR and its individual modules over state-of-the-art baselines across multiple tasks and datasets.\n\nS4. The paper is well-structured and easy to follow, making it accessible to readers while effectively conveying its technical contributions and experimental results.\n\nWeaknesses:\nW1. Some parts of this paper are not explained very clearly, which could lead to misunderstandings and ambiguities. i) First, since there are many symbols, a symbol table is recommended for better following. ii) Besides, although the appendix includes detailed descriptions of relevant studies, the absence of citations of this \"Section\" in the main body may create the impression that the paper lacks a thorough discussion of prior studies. iii) In Table 1, does \"Avg.Length\" refer to the spatial length of the trajectory or the number of trajectory points?\n\nW2. The experimental section can be optimized. i) For instance, including the percentage increase in experimental tables can indeed enhance the clarity and impact of the results. ii) The calculation processes of some evaluation metrics (e.g., PED for trajectory simplification task, Hausdorff/DTW for trajectory generation task, HR@x for trajectory similarity search task) are not provided. \n\nW3. There are also some minor details that need attention. i) \"we conduct extensive experiments on two real-world datasets demonstrate\"->\"we conduct extensive experiments on two real-world datasets to demonstrate\". ii) \"In this paper, we target perform\"->\"In this paper, we target performing\". iii) \"In classification task, there are two labels in beijing dataset\"->\"In classification task, there are two labels in the Beijing dataset\". iv) \"Mean Absolut Percentage Error (MAPE)\"->\"Mean Absolute Percentage Error (MAPE)\"", "other_comments_or_suggestions": "None", "questions_for_authors": "Please response to the comments in W1-W3.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Meta-review: This paper proposes a trajectory representation framework by integrating free-space trajectories with road network-based trajectories.

After rebuttal, all four reviewers gave positive comments, recognizing the good performance and novel idea of this paper.   

The Area Chair (AC) agrees with the reviewers and recommends accepting the paper. Additionally, it is strongly suggested that the authors incorporate the details discussed in the feedback to make the paper more comprehensive.
Decision: Accept (poster)