Structure-preserving contrastive learning for spatial time series
Yiru Jiao, Sander van Cranenburgh, Simeon Calvert, Hans van Lint · 2025
Read Structure-preserving contrastive learning for spatial time series by Yiru Jiao, Sander van Cranenburgh, Simeon Calvert, Hans van Lint (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2502-06380.txt.
Introduction
Yiru Jiao and co-authors teach neural networks on spatial time series without scrambling the map inside in a 2025 paper. Traffic flows, sensor webs, and weather grids all produce series tied to places. Contrastive learning builds representations by pulling similar examples together, but careless pulling can tear the very similarity structure, who is near whom, in space and time, that makes the data meaningful.
Two regularizers guard the geometry: one preserves the topology of similarities among instances, the other the graph shape of similarities across space and time. A dynamic weighting scheme balances the guards against the main objective so training stays stable. Tests ranged from general time-series classification to traffic prediction at two scales. Across them, the method kept latent neighborhoods truer to the original ones and improved on leading task scores. The authors offer it as a plug-in for any backbone facing geographic data.
Catalog record
| CREATOR | Yiru Jiao, Sander van Cranenburgh, Simeon Calvert, Hans van Lint |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 63 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2502-06380
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Structure-preserving contrastive learning for spatial time series Yiru Jiao, Sander van Cranenburgh, Simeon Calvert, Hans van Lint Abstract Neural network models are increasingly applied in transportation research to tasks such as prediction. The effectiveness of these models largely relies on learning meaningful latent patterns from data, where self-supervised learning of informative representations can enhance model performance and generalisability. However, self-supervised representation learning for spatially characterised time series, which are ubiquitous in transportation domain, poses unique challenges due to the necessity of maintaining fine-grained spatio-temporal similarities in the latent space. In this study, we introduce two structure-preserving regularisers for the contrastive learning of spatial time series: one regulariser preserves the topology of similarities between instances, and the other preserves the graph geometry of similarities across spatial and temporal dimensions. To balance the contrastive learning objective and the need for structure preservation, we propose a dynamic weighting mechanism that adaptively manages this trade-off and stabilises training. We validate the proposed method through extensive experiments, including multivariate time series classification to demonstrate its general applicability, as well as macroscopic and microscopic traffic prediction to highlight its particular usefulness in encoding traffic interactions. Across all tasks, our method preserves the similarity structures more effectively and improves state-of-the-art task performances. This method can be integrated with an arbitrary neural network model and is particularly beneficial for time series data with spatial or geographical features. Furthermore, our findings suggest that well-preserved similarity structures in the latent space indicate more informative and useful representations. This provides insights to design more effective neural networks for data-driven transportation research. Our code is made openly accessible with all resulting data at https://github.com/yiru-jiao/spclt . 1 Introduction Modern transportation systems create massive streams of spatially distributed time series data, such as traffic speeds across road networks and transit ridership through various locations over time. Extracting useful patterns from these data is crucial, especially as neural network models are increasingly used for a range of downstream tasks such as traffic forecasting [ 1 , 2 ] , congestion detection [ 3 , 4 ] , and mobility analysis [ 5 , 6 ] . In recent years, self-supervised representation learning (SSRL) has emerged as a promising approach to leverage such large-scale datasets [ 7 ] . By learning informative latent representations, SSRL can effectively facilitate model performance [ 8 , 9 , 10 ] and generalisability [ 11 , 12 ] in downstream tasks. This advantage is especially valuable in transportation research, where real-world sensor measurements and labels are often noisy or sparse. In SSRL of time series, contrastive learning is becoming the mainstay technique. This adoption is supported by empirical investigation. In 2022, Lafabregue et al. [ 13 ] conducted an extensive experimental comparison over 300 combinations of network architectures and loss functions to evaluate the performance of time series representation learning. One of their key findings is that the reconstruction loss used by traditional autoencoders does not sufficiently fit temporal patterns. Instead, contrastive learning has emerged as a more effective approach, which explicitly pulls similar instances closer and pushes dissimilar instances farther apart in the latent space of representations [ 14 , 15 ] . This mechanism encourages neural networks to organise the latent space according to the inherent similarities in data, yielding representations that capture meaningful patterns. Unique challenges arise when learning contrastive representations for spatially characterised time series data. A foremost difficulty is the need to preserve fine-grained similarity structures among data instances in the latent space. The notion of similarity for spatial time series can be subtle and highly domain-specific. For example, financial time series may be considered similar even if some variables show significant divergence, while movement traces with very different spatial features can be anything but similar. Beyond preserving fine-grained similarities, spatially characterised time series such as traffic interactions can involve multiple scales of spatio-temporal patterns. At the macroscopic scale, traffic flow measures collective road usage evolving over the road network; at the microscopic scale, trajectories describe the motion dynamics of individual road users such as car drivers, cyclists, and pedestrians, in local road space. SSRL for spatial time series must accommodate such heterogeneity, capturing patterns at the appropriate level of granularity for the targeted task. To address these challenges, this study explores contrastive learning regularised by structure preservation to better capture the subtle similarities in spatial time series data. We introduce two regularisers at different scales to preserve the original similarity structure in the latent space. One is a topology-preserving regulariser for the global scale, and the other is a graph-geometry-preserving regulariser for the local scale. This incorporation can be simplified as a weighted loss {\mathcal{L}}=\eta_{\text{CLT}}\cdot\ell_{\text{CLT}}+\eta_{\text{SP}}\cdot\ell_{\text{SP}}+r_{\bm{\eta}} , where we propose a mechanism to dynamically balance the weights \eta_{\text{CLT}} of contrastive learning for time series (CLT) and \eta_{\text{SP}} of structure preservation (SP). Within this mechanism, the adaptive trade-off between contrastive learning and structure preservation is based on the uncertainties of their corresponding terms \ell_{\text{CLT}} and \ell_{\text{SP}} ; meanwhile, the term r_{\bm{\eta}} adds regularisation against overfitting of the dynamic weights. The proposed method is applicable to spatial time series in general, while we highlight its particular usage for traffic interactions in this paper. To thoroughly validate the method, we conduct experiments on tasks of 1) multivariate time series classification, where we benchmark against the current state-of-the-art (SOTA) models, i.e., [ 16 ] and [ 17 ] ; and 2) traffic prediction, where we use [ 18 ] for macroscopic benchmark and [ 19 ] for microscopic. Along with these experiments, the efficiency of this method is evaluated with various network architectures. In addition to performance improvement, we also investigate and discuss the importance of preserving similarity structure. Below is a summary of the key contributions in this study. • We introduce a method that incorporates structure-preserving regularisation in contrastive learning of multivariate time series, to maintain finer-grained similarity structures in the latent space of sample representations. We propose a dynamic weighting mechanism to adaptively balance contrastive learning and structure preservation during training. This method can be applied to an arbitrary neural network model for more effective representation learning. • Preserving similarity structure can enhance SOTA performance on various downstream tasks. The relative improvement on spatial datasets in the UEA archive is 2.96% in average classification accuracy; on macroscopic traffic prediction task is 0.57% in flow speed MAE and 0.55% in the standard deviation of prediction errors; on microscopic trajectory prediction task is 1.87% and 3.40% in missing rates under radii of 0.5 m and 1 m, respectively. • Considering neural network modelling as learning the conditional probability distribution of outputs over inputs, the similarity structure hidden in the input data implies the distribution of conditions. Our method is therefore important to preserve the original distribution in the latent space for more effective representational learning. This is particularly beneficial for time series data with spatial or geographical features as they require finer-grained information, not only in the field of transportation, but also robotics, meteorology, remote sensing, etc. The rest of this paper is organised as follows. In Section 2 , we briefly review related work in the literature. We use Section 3 to systematically introduce the methods. Then we explain the demonstration experiments in Section 4 and present