Tex-mex combines time and shape similarity to improve time series learning

TEX-MEX: Similarity-Guided Temporal Contrastive Learning for Time Series

Machine LearningArtificial Intelligence

Summary

Time series data like heartbeats or brain waves are tricky to analyze because it’s hard to decide which parts should be considered similar or different. The authors developed a method called TEX-MEX that looks at both how similar patterns appear over time and how they look structurally, combining these into one approach. This lets the system learn better representations of the data by pulling together similar patterns and pushing apart different ones. TEX-MEX showed strong results across many types of health-related time series, and the authors also created a smaller yet powerful model for wearable heart sensor data.

What this means in practice

  • For wearable device developers: Improve physiological signal analysis by using a smaller, efficient model that captures meaningful patterns in heart rate and other sensor data.$Commercial implications: Enables more accurate and compact health monitoring models for consumer and medical wearable devices, improving user experience and battery life.
  • For healthcare data teams: Integrate better time series representations to enhance analysis of continuous patient monitoring records like EEG or glucose levels.

Authors

Aditya Radhakrishnan, Maxwell A. Xu, Wanting Mao, Santosh Kumar, Harish Haresamudram, James M. Rehg

Abstract

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.