From Text to Locations: Repurposing Language Models for Spatial Trajectory Similarity Assessment - Melo, Wilken C. Dantas; Cruz, Lívia Almada; Lettich, Francesco; Silva, Ticiana L. Coelho da; Magalhães, Regis Pires (Anais do Simpósio Brasileiro de Banco de Dados (SBBD), 2024)
The proliferation of electronic devices with geopositioning capabilities has significantly increased trajectory data generation, thus opening up novel opportunities in mobility analysis. Our work considers the problem of assessing spatial similarity between trajectories, and focus on deep learning-based approaches that discretize trajectories using a uniform grid to generate their embeddings. In this context, t2vec is the reference approach. Large Language Models (LLMs) show promise in capturing patterns in mobility data. In this paper, we investigate whether an LLM can be repurposed to generate high-quality trajectory embeddings for the considered task. Using two real-world trajectory datasets, we consider repurposing three language models: Word2Vec, Doc2Vec, and BERT. Our results show that BERT, trained on dense trajectory datasets, can generate high-quality embeddings, thus highlighting the potential of LLMs.