TS-P 2 CL: Plug-and-Play Dual Contrastive Learning for Vision-Guided Medical Time Series Classification
Qi’ao Xu †, Pengfei Wang †, Bo Zhong, Tianwen Qian ✉, Xiaoling Wang ✉, Ye Wang, Hong Yu · 2025
Read TS-P 2 CL: Plug-and-Play Dual Contrastive Learning for Vision-Guided Medical Time Series Classification by Qi’ao Xu †, Pengfei Wang †, Bo Zhong, Tianwen Qian ✉, Xiaoling Wang ✉, Ye Wang, Hong Yu (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-2509-17802.txt.
Introduction
Qi'ao Xu and 6 co-authors offer a plug-in way to sort medical time data, such as heart or brain traces. Their 2025 paper notes that people differ a lot, so a model trained on some folk may fail on new folk. Past fixes tied to one signal type do not travel well.
Their plan turns a one-line trace into a flat fake image. A pre-trained vision model can then use what it learned from real images. Two contrast steps keep time sense and line the trace up with the image view. On six data sets, the plan beat a wide set of past methods.
Catalog record
| CREATOR | Qi’ao Xu †, Pengfei Wang †, Bo Zhong, Tianwen Qian ✉, Xiaoling Wang ✉, Ye Wang, Hong Yu |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 32 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2509-17802
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
TS-P 2 CL: Plug-and-Play Dual Contrastive Learning for Vision-Guided Medical Time Series Classification Qi’ao Xu †, Pengfei Wang †, Bo Zhong, Tianwen Qian ✉, Xiaoling Wang ✉, Ye Wang, Hong Yu Abstract Medical time series (MedTS) classification is pivotal for intelligent healthcare, yet its efficacy is severely limited by poor cross-subject generation due to the profound cross-individual heterogeneity. Despite advances in architectural innovations and transfer learning techniques, current methods remain constrained by modality-specific inductive biases that limit their ability to learn universally invariant representations. To overcome this, we propose TS-P 2 CL, a novel plug-and-play framework that leverages the universal pattern recognition capabilities of pre-trained vision models. We introduce a vision-guided paradigm that transforms 1D physiological signals into 2D pseudo-images, establishing a bridge to the visual domain. This transformation enables implicit access to rich semantic priors learned from natural images. Within this unified space, we employ a dual-contrastive learning strategy: intra-modal consistency enforces temporal coherence, while cross-modal alignment aligns time-series dynamics with visual semantics, thereby mitigating individual-specific biases and learning robust, domain-invariant features. Extensive experiments on six MedTS datasets demonstrate that TS-P 2 CL consistently outperforms fourteen methods in both subject-dependent and subject-independent settings. 1 Introduction Medical time series (MedTS), such as electroencephalography (EEG), electrocardiography (ECG), and stereo-electroencephalography (sEEG), capture the dynamic changes of physiological signals over time [ 1 ] . The automated classification of these signals holds immense potential for intelligent healthcare, enabling real-time monitoring, early intervention, and personalized medicine. However, a fundamental challenge impedes their clinical deployment: poor cross-subject generalization. Models trained on one cohort often degrade significantly when applied to new individuals, due to substantial cross-subject variability in signal morphology, amplitude, and noise profiles. This heterogeneity renders representations learned from limited, modality-specific data prone to overfitting, undermining robustness in real-world settings. The research community has explored two primary directions: 1) architectural innovations using deep neural networks (CNNs, RNNs, and Transformers [ 2 ] ) to model complex temporal dependencies, and 2) transfer learning techniques involving either large-scale time series pretraining or language model adaptation [ 3 ] . Despite notable progress, these approaches face inherent limitations. The former relies heavily on modality-specific inductive biases, which can hinder the learning of universally invariant representations. The latter, harnessing powerful pre-trained language knowledge, suffers from a fundamental modality gap when projecting continuous signals into discrete text, potentially distorting temporal dynamics. Inspired by the remarkable universal pattern recognition capabilities of pre-trained vision models, we explore a vision-guided paradigm for MedTS classification by treating physiological signals as pseudo-images. Our key insight is that time series and natural images share deep, intrinsic structural commonalities: trends manifest as edges, periodicities resemble textures, and abrupt changes correspond to discontinuities. This suggests that the powerful, general-purpose representations learned by vision models like ViT [ 4 ] and VanillaNet [ 5 ] can be transferred to understand physiological dynamics. This thought is not only theoretically grounded but also clinically intuitive: physicians routinely diagnose by visually inspecting waveforms [ 6 ] . Recent studies have demonstrated the efficacy of this paradigm in time series forecasting [ 7 , 8 ] , but they are primarily designed for forecasting and lack explicit mechanisms for learning robust representations for classification under significant cross-subject heterogeneity. In this paper, we propose TS-P 2 CL , a plug-and-play MedTS classification method that improves cross-subject generalization through dual contrastive learning. We transform 1D physiological signals into 2D pseudo-images, bridging them into the rich feature space of pre-trained vision models. To learn robust and generalizable representations, we employ two complementary objectives: ( i ) Intra-modal consistency ensures temporal coherence by contrasting different augmentations of the same time series. ( ii ) Cross-modal alignment directly aligns the time-series embeddings with the frozen features of a pre-trained vision model, facilitating the acquisition of semantically meaningful visual representations. Crucially, our approach requires no fine-tuning of the vision model, enabling efficient, plug-and-play deployment while leveraging off-the-shelf visual knowledge. Our contributions are summarized as follows: • We introduce TS-P 2 CL, a plug-and-play framework that bridges the gap between vision-based zero-shot transfer and MedTS representation learning, enhancing generalization through dual contrastive learning. • We develop a vision-guided paradigm where a frozen pre-trained vision model serves as a semantic anchor for cross-modal alignment, enabling efficient knowledge transfer without any modification. • We conduct extensive experiments on six MedTS datasets, showing that TS-P 2 CL outperforms fourteen methods under both subject- and subject-independent setups, validating its effectiveness and strong generalization. 2 Related Work 2.1 Medical Time Series Classification Medical time series (MedTS) classification plays a crucial role in disease diagnosis and health monitoring through physiological signal analysis. These signals are often noisy, high-dimensional, and exhibit significant cross-subject variability, posing challenges for robust classification. Classical methods include dynamic time warping and shapelets [ 9 ] , which are interpretable but limited in scalability. Statistical models like autoregressive models [ 10 ] capture temporal dynamics but struggle with non-stationarity. Recently, deep learning has driven significant progress. For example, Medformer [ 2 ] employs a multi-granularity transformer to model complex temporal patterns. These advances reflect progress toward more robust and clinically relevant MedTS models. 2.2 Cross-Modal Learning Cross-modal learning leverages complementary signals from different modalities to extract rich semantic features. Existing studies have shown that pre-training across modalities can produce highly transferable representations for downstream tasks [ 11 ] . Notable examples include the audio-visual contrastive learning and CLIP’s joint image-text embedding space [ 12 ] , which learn unified representations by contrasting matched and mismatched pairs. This paradigm has also gained traction in healthcare, especially in brain signal analysis, where visual or auditory cues can enhance feature learning. For instance, aligning EEG with fMRI through self-supervised improves representative robustness [ 13 ] . These efforts highlight the potential of cross-modal methods to bridge heterogeneous data and improve generalization in real-world applications. 3 Method Figure 1: Overall architecture of TS-P 2 CL. The framework employs dual contrastive learning during training: ( a ) Intra-modal contrastive learning ensures temporal robustness by contrasting augmented views of the time series, and ( b ) Cross-modal contrastive learning aligns time-series embeddings with visual features from a frozen pre-trained vision model, transferring universal visual knowledge. During inference, only the time series branch is applied. 3.1 Overall Framework Given a medical time series dataset D=\{(x_{i},y_{i})\}_{i=1}^{N} , where x_{i}\in\mathbb{R}^{C\times T} denotes a multivariate time series and y_{i} its corresponding label, the goal of MedTS classification is to learn a robust encoder f_{\theta_{X}} and a projection head g_{\phi_{X}} enables accurate prediction. We propose TS-P 2 CL, a plug-and-play framework that enhances cross-subject generalization through dual contrastive learning with visual guidance. As shown in Fig. 1 , our approach consists of three key components: • Intra-modal contrastive learning ( \mathcal{L}_{\text{intra}} ): By treating differently augmented views of the same input as positive pairs, it enforces temporal consistency and reduce semantic drift, yielding stable and discriminative representations. • Cross-modal contrastive learning with visual guidance ( \mathcal{L}_{\text{inter}} ): Transforms 1D signals into 2D pseudo-images and align their prototypes with visual features from a frozen pre-trained vision model ( e.g. , ViT, EfficientNet), transferring universal visual knowledge to enhance generalization. • Progressive joint learning: Enables end-to-end optimization by jointly learning representation and classification objectives, with a