Source-linked AI summary
TEX-MEX: Similarity-Guided Temporal Contrastive Learning for Time Series
Aditya Radhakrishnan, Maxwell A. Xu, Wanting Mao, Santosh Kumar, Harish Haresamudram, James M. Rehg
TL;DR
Time-series contrastive learning lacks reliable invariances for defining similar and dissimilar windows, and prior work has treated structural and temporal similarity separately. TEX-MEX uses encoder-estimated similarity to contrast temporal shifts of similar and dissimilar windows. It broadly achieves state-of-the-art performance across five modalities, and its 560K-parameter PPG foundation model is roughly 50× smaller than the next-best unimodally pretrained PPG model in the evaluation.
Problem
Time-series recordings lack a rich set of reliable invariances for forming positive pairs, and prior contrastive methods have treated structural and temporal similarity as separate notions.
Source: §1 · p. 2Method
TEX-MEX uses encoder representations to identify similar and dissimilar windows, then contrasts their temporally shifted versions.
Source: §1 · p. 2Results
TEX-MEX broadly achieves state-of-the-art performance across PPG, ECG, EEG, accelerometry, and CGM; its 560K-parameter PPG model is roughly 50× smaller than the next-best unimodally pretrained PPG foundation model in the evaluation.
Source: §1 · p. 3, §6 · p. 10Takeaways & Limitations
The evaluation demonstrates a compact 560K-parameter PPG foundation model with state-of-the-art downstream performance.
Source: §1 · p. 3On sleep classification on SDB, TEX-MEX trails PaPaGei-P by roughly six percentage points; the authors suspect MOODS lacks sleep recordings.
Source: §5 · p. 9
Abstract
from arXiv · showhide
Contrastive learning for time series depends on deciding which pairs of inputs should be treated as similar and dissimilar. Because few augmentations reliably preserve meaning in time series, prior methods have relied on two disjoint notions of similarity between windows: structural similarity, which relates windows with similar morphology, and temporal similarity, which relates windows that occur close together in time. We introduce TEX-MEX, to our knowledge the first approach to unify the two into a single relationship. Given a random batch of windows drawn across the dataset, TEX-MEX uses the encoder to identify which windows are structurally similar or dissimilar to each other. It then pulls each window toward the temporally shifted versions of similar windows and pushes it away from those of dissimilar ones, learning what typically accompanies similar windows in time. Across PPG, EEG, ECG, accelerometry, and continuous glucose monitoring, TEX-MEX broadly achieves state-of-the-art performance against contrastive, reconstructive, JEPA-based, and modality-specific approaches, establishing it as a strong general SSL objective. We further train a 560K-parameter PPG foundation model that achieves state-of-the-art performance across a broad range of downstream benchmarks while being roughly 50x smaller than the next-best unimodally pretrained PPG foundation model in our evaluation. We will release this foundation model open-source and open-weight to the community to support future work and practical applications.
1 INTRODUCTION
Time-series contrastive learning is challenged by weakly defined invariances and dependencies spanning multiple timescales. TEX-MEX unifies structural and temporal similarity, with broad results across domains and a compact PPG foundation model.
1 INTRODUCTION
- Time-series recordings have few reliable invariances for constructing positive pairs, while useful dependencies can span minutes, hours, or longer behavioral patterns.Prior work therefore used separate structural or temporal notions of similarity; TEX-MEX composes them.Source: §1 · pp. 1–2
- TEX-MEX combines structural and temporal similarity by pulling anchors toward shifted similar windows and away from shifted dissimilar ones, with similarity derived from encoder representations.The method uses encoder-estimated similarity to grade relationships rather than relying on fixed signal-distance measures.Source: §1 · p. 2, Figure 1 · p. 2
- Encoder-based similarity improves during training and surpasses existing signal-distance approaches as a predictor of mutual class membership.Source: §1 · p. 2
- Across PPG, ECG, accelerometry, EEG, and CGM, TEX-MEX broadly achieves state-of-the-art performance against leading contrastive, reconstructive, JEPA-based, and modality-specific methods.The paper presents this as evidence of the method’s generality across time-series domains.Source: §1 · p. 3
- The 560K-parameter PPG foundation model achieves state-of-the-art performance across downstream tasks and is roughly 50× smaller than the next-best unimodally pretrained PPG foundation model in the evaluation.The authors say they will release it open-source and open-weight.Source: §1 · p. 3
2 RELATED WORK
Prior time-series SSL methods use temporal proximity, structural similarity, or independent temporal and instance-wise objectives. PPG foundation models likewise vary in how they relate windows or predict signal content.
Time-Series Self-Supervised Learning
- Temporal contrast methods use proximity within a recording, while structural methods relate windows by learned distances; masked modeling instead reconstructs masked input portions.CPC contrasts future samples and TNC uses locally stationary neighborhoods; RE-BAR and RelCon use structural distances.Source: §2 · p. 3
PPG Foundation Models
- PPG foundation models use subject identity, morphology, temporal proximity, paired-ECG synchronization, cross-modal reconstruction, or autoregressive next-patch prediction.TEX-MEX builds on Pulse-PPG’s pretraining corpus and downstream evaluation.Source: §2 · p. 3
3 METHODOLOGY
TEX-MEX samples windows across the dataset, grades their relationships using encoder representations, and contrasts their shared temporal shifts. An additional term separates shifted representations from unshifted frames.
3 METHODOLOGY
- Each step samples B dataset-wide windows and applies one shared Gaussian offset δ, bounded to avoid overlap or crossing recording gaps.The lower bound prevents shifted windows from overlapping their originals; the upper bound limits shifts across gaps or recording boundaries.Source: §3 · p. 3
- Encoder representations grade each anchor against unshifted batch members; complementary weights favor the most-similar and least-similar windows, with stop-gradient applied to similarities.The weighting temperature controls distribution sharpness.Source: §3 · pp. 3–4
- The same shifted windows serve as positive and negative candidates: w+ attracts similar members, while w− repels dissimilar members.Each shifted window contributes partly to both terms according to its estimated relationship with the anchor.Source: Figure 2 · p. 4, §3 · p. 4
- To preserve temporal-frame information, TEX-MEX repels unshifted versions of similar members, discouraging an invariance that collapses shifted and original representations.The unshifted anchor itself is excluded as a negative.Source: §3 · pp. 4–5
- The combined objective attracts anchors to shifted similar members, repels them from shifted dissimilar members, and separates shifted representations from the original frame.These are the positive, negative, and temporal-frame separation terms.Source: §3 · p. 5
4 TEX-MEX AS A GENERAL TIME-SERIES SSL OBJECTIVE
Across four sensor domains and continuous glucose monitoring, TEX-MEX is evaluated as a general time-series SSL objective against existing methods. It performs strongly across these tasks, while its learned distance also becomes a better predictor of mutual class membership during training.
4 TEX-MEX AS A GENERAL TIME-SERIES SSL OBJECTIVE
- The evaluation follows PULSE across PPG, EEG, ECG, and HAR, and CGM-JEPA for continuous glucose monitoring, retaining their core protocols.For CGM, the 24-hour windows were replaced with 39-reading windows because most recordings were only one day long.Source: §4 · p. 5, §4.1 · p. 5, §4.2 · p. 7
4.1 MULTI-DOMAIN SELF-SUPERVISED LEARNING: PPG, EEG, ECG, AND HAR
- By 50% of training, TEX-MEX’s learned distance is strongest across k = 1, 3, and 5, exceeding REBAR by 4–5 percentage points on average.The held-out comparison measures the share of nearest neighbors that match an anchor’s ground-truth class across PPG, EEG, ECG, and HAR.Source: §4.1 · p. 5, Figure 3 · p. 6
- TEX-MEX achieves the highest or tied-highest AUROC and PRAUC on PPG, EEG, and ECG; on saturated HAR, it ranks fourth of 11 methods.PULSE is generally the closest baseline, while TEX-MEX reaches 99.44% AUROC versus SoftCLT’s 99.69% on HAR.Source: §4.1 · p. 6, Table 1 · p. 6
4.2 TEX-MEX APPLIED TO CONTINUOUS GLUCOSE MONITORING
- TEX-MEX is best or tied-best on 11 of 12 CGM metric-task combinations, with gains up to 8.6 AUROC points for insulin resistance under venous-to-home transfer.TNC leads on the sole exception, venous insulin-resistance AUROC; venous-to-home transfer tests clinical venous measurements against wearable CGM at home.Source: §4.2 · p. 7, Table 2 · p. 8
- Removing graded weighting sharply reduces CGM performance, while fixing the temporal offset at zero is more damaging and brings venous performance to chance.Removing frame separation or stop-gradient costs up to 6.6 or 7.9 AUROC points; an EMA encoder trails the live encoder by up to 9.0 points.Source: §4.2 · pp. 7–8, Table 3 · p. 8
5 SCALING TEX-MEX: A BITE-SIZED, SOTA PPG FOUNDATION MODEL
The PPG foundation model is evaluated across diverse downstream tasks using a strengthened cross-validation protocol. TEX-MEX performs strongly while using a compact encoder, with sleep prediction standing out as a limitation associated with the pretraining data.
Setup
- The evaluation uses subject-level five-fold cross-validation repeated across 15 random seeds for each downstream task.Tasks span wearable-field, wearable-lab, and clinical settings, with classification and regression across multiple input-window scales.Source: §5 · p. 8
Results
- TEX-MEX achieves the best performance on 7 of 11 downstream tasks and beats all unimodally pretrained PPG foundation models on 10 of 11.Table 4 summarizes performance across five datasets and wearable-field, wearable-lab, and clinical settings.Source: §5 · p. 9, Table 4 · p. 9
- TEX-MEX is roughly 50× smaller than Pulse-PPG and outperforms it on 10 of 11 tasks despite using the same pretraining dataset and evaluation splits.On the sleep exception, the gap is under one percentage point on both AUROC and PRAUC.Source: §5 · p. 9
- The authors suspect the sleep shortfall reflects MOODS pretraining data that contain no sleep recordings, a limitation they propose addressing by expanding the dataset.TEX-MEX underperforms the best sleep performer, PaPaGei-P, by roughly six percentage points.Source: §5 · p. 9
6 CONCLUSION
The conclusion presents TEX-MEX as an efficient, scalable time-series SSL objective that unifies structural and temporal similarity. It reports broad state-of-the-art performance across signal domains and a compact PPG foundation model with strong downstream results.
Conclusion
- TEX-MEX unifies structural and temporal similarity by contrasting temporally shifted windows the encoder deems similar against those it deems dissimilar.The conclusion describes the objective as efficient and scalable.Source: §6 · p. 9
- Across PPG, ECG, EEG, accelerometry, and CGM, TEX-MEX broadly achieves state-of-the-art performance.The conclusion also reports a 560K-parameter PPG foundation model with state-of-the-art downstream performance and significantly fewer parameters than evaluated PPG foundation models.Source: §6 · p. 10
A MULTI-DOMAIN BENCHMARK DETAILS
The benchmark details describe shared training-hyperparameter selection and method-specific sweeps for TEX-MEX, SoftCLT, and TNC. Final method-specific and shared settings are reported in separate tables.
Multi-domain benchmark details
- All methods share 30 random-search trials over training hyperparameters, with the best configuration selected by validation performance.The selected shared settings include a batch size of 64 for all methods and domains except TEX-MEX on HAR, which uses 128.Source: A MULTI-DOMAIN BENCHMARK DETAILS · p. 12, Table 6 · p. 13
- TEX-MEX sweeps offset scale, contrastive temperature, and weighting temperature, with the offset resampled until its magnitude lies between 1 and 2.5σ.Table 5 reports final method-specific hyperparameters selected on the validation set for each domain.Source: A MULTI-DOMAIN BENCHMARK DETAILS · p. 12, Table 5 · p. 13
- SoftCLT sweeps instance-wise and temporal sharpness while keeping its loss weight fixed at λ = 0.5.The search follows the classification search space of Lee et al. (2024).Source: A MULTI-DOMAIN BENCHMARK DETAILS · p. 12
- TNC sweeps its positive-unlabeled weight, Monte Carlo sample size, and augmentation factor across ranges spanning settings in its official implementation.Setting the positive-unlabeled weight to zero disables the PU correction.Source: A MULTI-DOMAIN BENCHMARK DETAILS · p. 13
B PPG FOUNDATION MODEL DETAILS
The PPG foundation model uses a reduced 1D ResNet encoder. Its architecture and pretraining hyperparameters are listed in Table 7.
PPG foundation model details
- The PPG foundation-model encoder is a 1D ResNet reduced to 560K parameters.Table 7 lists the final architecture configuration.Source: B PPG FOUNDATION MODEL DETAILS · p. 14, Table 7 · p. 14