Context Consistency Regularization for Label Sparsity in Time Series

Yooju Shin, Susik Yoon, Hwanjun Song, Dongmin Park, Byunghyun Kim, Jae-Gil Lee, Byung Suk LeeICML 2023

Overview

In real-world applications—from wearable heart rate monitors to industrial sensors—time series data is abundant, but labeling it is prohibitively expensive. Annotating every timestamp in a long sequence requires immense human effort, often resulting in "sparse labels" where only a tiny fraction of the data is categorized.

To address this, researchers have developed CrossMatch, a novel semi-supervised learning framework. Instead of relying on traditional data augmentation techniques that "break" data through noise or scaling, CrossMatch leverages the sequential nature of time series by attaching surrounding context to data points. This approach outperforms state-of-the-art methods by up to 23 percentage points in extremely sparse label scenarios.

The Problem: Why Traditional Augmentation Fails in Time Series

To train models on largely unlabeled datasets, researchers typically employ Consistency Regularization (CR). The core premise of CR is that if an unlabeled data point is augmented (e.g., rotating an image), the model's prediction should remain consistent.

However, most CR techniques were designed for independent data points like images. When applied to time series, they rely on "perturbations" such as jittering or scaling. The authors argue that these methods are fundamentally flawed for sequential data because they destroy the very temporal patterns the model needs to learn. Time series data points are temporally correlated; their meaning is inherently tied to their neighbors.

The CrossMatch Solution

CrossMatch abandons data perturbation in favor of a "perturbation-free" approach called Context-Attached Augmentation (CAA).

1. Context-Attached Augmentation (CAA)

Instead of altering the target data instance, CrossMatch keeps it pristine and attaches different "contexts" (preceding or succeeding data points). It generates a pair of augmented instances: one with context added to the left ($X_{left}$) and one with context added to the right ($X_{right}$). By avoiding jittering or scaling, the model does not have to guess what the real signal looks like under artificial noise.

2. Theoretical Diversity

Using the "martingale embedding" assumption, the authors mathematically prove that attaching context to opposite ends of a target instance maximizes the difference between their embeddings. This maximal difference provides the strongest possible supervision, forcing the model to learn highly consistent and robust representations.

3. Reliability-Weighted Mixing

Not all predictions are equally trustworthy. Models are generally more accurate when the target instance is in the center of their receptive field. CrossMatch uses a bell-shaped reliability function to weight the pseudo-labels generated from the left and right context windows. Unlike methods that use "hard" (one-hot) pseudo-labels, CrossMatch merges these into a single "cross-window soft label." This prevents the model from over-committing to incorrect predictions early in training.

Experimental Setup and Key Results

The framework was evaluated on three widely-used benchmark datasets for human activity and action recognition: HAPT (smartphone sensor data), mHealth (wearable sensor data), and Opportunity (complex daily activity data from ambient and wearable sensors). The researchers simulated extreme label sparsity by randomly sampling just 0.1% to 1.0% of the original labels.

CrossMatch significantly outperformed existing state-of-the-art consistency regularization methods, including FixMatch, FlexMatch, and PropReg:

  • Massive Accuracy Gains: On the HAPT dataset with only 0.1% labels, CrossMatch improved the F1 score by 20 to 23 percentage points over baseline methods.
  • Faster Convergence: Training curves indicate that CrossMatch reaches high accuracy much earlier in the training process. It demonstrates superior robustness during the "warm-up" phase, where competing models often struggle with low-quality pseudo-labels.
  • Synergy with Traditional Methods: While CAA is highly effective on its own, combining it with traditional inner-augmentations (like jittering) boosted performance even further, yielding an additional 2–22% improvement in F1 scores.

Limitations and Future Directions

While CrossMatch sets a new standard for semi-supervised time series classification, the authors note a few areas for future refinement:

  • Unidirectional Constraints: The current CAA method assumes the use of a bidirectional model (such as a Transformer or Bi-LSTM) that can process context in both directions. For strictly unidirectional models (like standard RNNs), right-side context is less meaningful, requiring architectural modifications.
  • Context Length Heuristics: The optimal length of the attached context is currently determined by a heuristic (typically 1/5 to 1/2 of the average segment length). Automating the discovery of the ideal context window for varying signal types remains an open challenge.
  • Label Transitions: If a context window crosses a boundary into a completely different activity, it could theoretically introduce noise. However, the temporal coherence inherent in most time series datasets makes this a rare occurrence in practice.

By treating context as a natural regularizer, CrossMatch aligns machine learning more closely with how humans understand sequences—by looking at the surrounding situation rather than isolated, distorted snapshots.

Summary updated

BibTeX
@inproceedings{shin2023context,
  author = {Yooju Shin and Susik Yoon and Hwanjun Song and Dongmin Park and Byunghyun Kim and Jae-Gil Lee and Byung Suk Lee},
  title = {{Context Consistency Regularization for Label Sparsity in Time Series}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=BVYt0BdWbbZ},
}
Figure