COCOA: Cross Modality Contrastive Learning for Sensor Data

Shohreh Deldari, Hao Xue, Aaqib Saeed, Daniel V. Smith, Flora D. Salim · DOI

TL;DR

This paper introduces COCOA, a novel self-supervised learning framework that leverages cross-modal contrastive learning to extract robust representations from multimodal sensor data. COCOA significantly outperforms existing methods in classification tasks and demonstrates remarkable data efficiency, achieving comparable results to fully supervised models with only a fraction of the labeled data.

What Problem Does This Paper Address?

The paper tackles the challenge of learning effective representations from multimodal sensor data, a common scenario in pervasive computing applications. While supervised learning has achieved great success, it heavily relies on large amounts of labeled data, which is often expensive and time-consuming to collect, especially for diverse sensor streams. Self-supervised learning (SSL) offers a promising alternative by learning from unlabeled data. However, existing SSL methods, particularly contrastive learning (CL), have primarily focused on single-modality data (like images or text) and struggle to effectively handle the complexity and heterogeneity of multiple sensor streams. This limitation hinders their application in domains where data from various sensors (e.g., accelerometers, gyroscopes, ECGs) is readily available but unlabeled.

Methods

COCOA introduces a novel cross-modal contrastive learning objective function designed for multimodal time-series data. Unlike traditional contrastive methods that rely on data augmentation or temporal proximity to create positive pairs, COCOA leverages the inherent complementarity of different sensor modalities.

The core of COCOA involves:

  • Modality-Specific Encoders: Each sensor modality is processed by its own encoder to learn modality-specific representations.
  • Cross-Modality Correlation: The model is trained to maximize the agreement (similarity) between the representations of synchronous samples from different modalities. This encourages the learning of a shared latent space where information across sensors is aligned.
  • Discriminator for Negative Pairs: To further refine representations, COCOA minimizes the similarity between irrelevant instances. This is achieved by treating temporally distant samples within the same modality as negative pairs, forcing the model to learn distinguishing features.
  • Computational Efficiency: COCOA is designed to be computationally efficient, with a complexity that scales linearly with the number of modalities, unlike some multimodal contrastive methods that exhibit quadratic complexity.

Datasets

The authors evaluated COCOA on five public datasets commonly used for human activity recognition, sleep stage detection, and emotion analysis:

  • UCIHAR: Human activity recognition using smartphone sensors (accelerometer, gyroscope).
  • PAMAP2: Physical Activity Monitoring dataset (accelerometer, heart rate monitor).
  • Opportunity: Human activity recognition using IMU sensors.
  • SLEEPEDF: Sleep stage detection using EEG, EOG, and EMG signals.
  • WESAD: Multimodal Dataset for Wearable Stress and Affect Detection (accelerometer, ECG, EMG, EDA, temperature, BVP).

Key Insights and Ideas

  • Complementarity of Modalities: The paper strongly supports the hypothesis that different sensor modalities, even with varying distributions and sampling rates, provide complementary views of the same event. This complementarity is crucial for learning robust representations.
  • Cross-Modal Learning is Key: COCOA demonstrates that explicitly modeling the cross-modal relationships is more effective than simply fusing features from different modalities.
  • Data Efficiency is Paramount: The ability of COCOA to achieve high performance with minimal labeled data is a significant finding, making it highly practical for real-world applications where labeling is a bottleneck.
  • Smaller Batch Sizes Can Be Better: Counter-intuitively, for sensor data, smaller batch sizes often lead to better performance in contrastive learning. This is attributed to a reduced likelihood of false negatives, which can degrade performance in multimodal settings.

Key Results

  • Superior Classification Performance: COCOA consistently outperformed all other self-supervised and supervised baselines across all tested datasets, achieving higher F1-scores.
  • Exceptional Data Efficiency: COCOA achieved performance comparable to fully supervised models using only 10-20% of the available labeled data for fine-tuning. For instance, it reached the upper bound of end-to-end supervised baselines on PAMAP2, WESAD, and SLEEPEDF with just 10% of labels.
  • Scalability to Multiple Modalities: Including more modalities (M > 2) consistently improved COCOA's performance, demonstrating its ability to leverage diverse sensor inputs effectively.
  • Computational Advantage: COCOA offers a linear complexity with respect to the number of modalities, making it more scalable than other multimodal contrastive methods.

Limitations and Future Work

  • Handling Missing Modalities: While COCOA uses modality-specific encoders, making it robust to missing modalities during inference, the paper doesn't deeply explore dynamic sensor selection strategies for situations where certain sensors are consistently unavailable.
  • Sensor Heterogeneity: The paper assumes data can be synchronized and re-sampled. Future work could explore more sophisticated methods for handling varying sampling rates and noise levels across sensors.
  • Dynamic Sensor Relevance: The authors acknowledge that the relevance of sensors can change dynamically based on the activity. Future work could incorporate dynamic sensor selection mechanisms to adapt to these changes.
  • Broader Modality Application: The paper primarily focuses on time-series sensor data. Extending COCOA to other modalities like video, audio, and text, and making it "context-aware," is suggested as a future direction.

Summary updated

BibTeX
@article{deldari2022cocoa,
  author = {Shohreh Deldari and Hao Xue and Aaqib Saeed and Daniel V. Smith and Flora D. Salim},
  title = {{COCOA: Cross Modality Contrastive Learning for Sensor Data}},
  journal = {Proc. ACM Interact. Mob. Wearable Ubiquitous Technol.},
  year = {2022},
  doi = {10.1145/3550316},
}
Figure