TEX-MEX: Similarity-Guided Temporal Contrastive Learning for Time Series
TEX-MEX attacks the central challenge in time-series contrastive learning: how to define similarity when semantic-preserving augmentations are scarce or unreliable. It unifies structural and temporal similarity by letting the encoder grade windows by cosine similarity, then pulling an anchor toward the time-shifted versions of similar batch windows and pushing it away from those of dissimilar ones. The result is a graded, efficient objective that learns what typically accompanies a physiological pattern in time, and it powers a 560K-parameter PPG foundation model that beats architectures roughly 50× larger.
TEX-MEX is an elegant and largely effective contrastive objective for physiological time series. The core trick—using the encoder's own evolving representations to weight temporally-shifted positives and negatives—is well motivated, and the CGM ablations strongly credit the design. That said, the paper overstates universal dominance. On HAR it ranks fourth among eleven methods, and the framing of the PPG foundation-model evaluation mixes forecasting-centric general models into a classification pool that flatters TEX-MEX. As the authors claim, "We introduce TEX-MEX, to our knowledge the first approach to unify the two into a single relationship." Yet they also concede that "On HAR, however, TEX-MEX is outperformed by SoftCLT, LFADS, and REBAR, ranking 4/11."
The ablation study on CGM is the strongest evidence that the method works because of its specific design, not just temporal shifting: removing graded weighting and falling back to hard contrastive sampling slashes cross-domain transfer by up to 17 AUROC points. The similarity-quality analysis is also convincing: "by 50% of training, the distance learned by TEX-MEX is the strongest measure across all three values of $k$, exceeding REBAR by 4–5 percentage points on average." The efficiency story is genuine too: "While TEX-MEX is the best-performing model overall, it is also by far the smallest in our evaluation: the next-smallest, AnyPPG, is over 7× larger."
Two flaws temper the SOTA narrative. First, the benchmark includes HAR, a standard activity-recognition time-series domain, where TEX-MEX trails three baselines; the authors dismiss this because the task is "highly saturated," but that does not explain why structural-temporal unification underperforms here. Second, the PPG foundation-model evaluation compares against general forecasting architectures (Chronos, MOMENT) on classification and regression probes, which is not a fair modality matchup. Most seriously, the paper concedes a major capability gap: "On sleep, however, TEX-MEX underperforms by roughly six percentage points relative to the best performer, PaPaGei-P. We suspect this reflects a limitation of the MOODS pretraining dataset, which contains no sleep recordings." Branding a model trained without sleep as a general PPG foundation model is misleading.
Evidence is strongest in the multi-domain linear-probe setting (Table 1), where TEX-MEX follows the standardized PULSE protocol, and in CGM (Table 2), where it wins eleven of twelve cells. The comparison is fairer in CGM because all methods operate under the same downstream protocol we verified from the original source: "We pretrain on ~389k unlabeled CGM readings from 228 subjects and evaluate on two clinical cohorts ... across cohort generalization, venous-to-CGM transfer, and home CGM regimes, under a 20-iteration × 2-fold cross-validation protocol." In the PPG foundation-model section the inclusion of forecasting-centric baselines inflates the margin; the authors themselves acknowledge that "The other two cases (DaLiA heart-rate estimation and sleep classification on SDB) are more substantial."
Experimental detail is generally excellent: Appendix A lists swept and final hyperparameters ($\sigma$, $\tau$, $\tau_w$) per domain, and Appendix B gives the exact 560K-parameter ResNet configuration. Most downstream datasets are public. The main gap is code and data availability. The abstract promises that "We will release this foundation model open-source and open-weight to the community to support future work and practical applications," but no repository, training scripts, or MOODS preprocessing pipeline are provided at submission. Without them, independent reproduction of the foundation-model pretraining and the exact temporal shifts across recordings remains blocked.
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.
Pick a starting point or write your own. Challenges run in the background, so you can keep reading while the AI investigates.
No challenges yet. Disagree with the review? Ask the AI to revisit a specific claim.