Manuscript Offprint

arXiv:2610.10245

MorphCL: Morphological Contrastive Learning for Inertial-based Human Activity Recognition

Marius Bock, Yuwei Zhang, Juergen Gall, Michael Moeller, Kristof Van Laerhoven, Cecilia Mascolo

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Despite the ubiquity of sensors in wearable and mobile devices and the abundance of human movement data they generate, translating unlabeled recordings into foundational motion models remains an open challenge. Self-supervised learning (SSL) has alleviated the need for costly annotations, yet existing approaches leave the global structure of large-scale motion data largely untapped, relying on randomly sampled batches and local comparisons that become particularly problematic for in-the-wild inertial data dominated by stationary, low-variance behaviors. Here we introduce Morphological Contrastive Learning (MorphCL), a self-supervised pretraining framework that uses structure-aware grouping to inject explicit modeling of global structure into inertial-based SSL approaches. Building on two well-established pillars of motion analysis, the discovery of motion primitives, or motifs, and domain-specific feature descriptors, we show that MorphCL substantially improves linear probing and finetuning results of learned encoders by up to 15 percentage points in F1-score. In a comparison with existing foundation models, we demonstrate that MorphCL-pretrained encoders match or surpass them models in linear probing performance while trained on 4600×4600\times less data. Qualitative analysis of the resulting embedding spaces further reveals morphologically meaningful cluster structure, with improved separation of kinematically similar activity classes.

Figure

(i)

Motif discovery

(ii)

Morphological clustering

(iii)

Morphological Contrastive Learning

Figure 1: Morphological Contrastive Learning (MorphCL) explicitly models global motion structure by (i) discovering recurring motifs (red) from raw accelerometer data, (ii) clustering them into morphological groups across the pretraining corpus, (iii) defining a group-based contrastive objective that drives agreement beyond instance-level comparisons.

*Corresponding author: [lastname]@iai.uni-bonn.de

1 INTRODUCTION

Activities and movements performed during daily life encode rich information about an individual's behavioral patterns, physiological state, and habitual routines (Tryon, 2006). The automatic identification of such behaviors, commonly referred to as Human Activity Recognition (HAR), has therefore attracted growing interest across a range of health-related research fields (Patterson et al., 2005; Ward et al., 2006). Inertial Measurement Units (IMUs), now ubiquitous in consumer wearables and mobile devices, have emerged as a particularly practical sensing modality for this purpose, yielding discriminative representations well-suited to activity recognition systems (Bulling et al., 2014). However, while other domains such as computer vision have seen the rise of large-scale foundation models, which can generalize easily to unseen tasks being trained on vast amounts of data, inertial-based HAR research remains largely confined to small-scale benchmark studies. This gap is driven in part by the difficulty of annotating raw IMU signals retrospectively without additional context, making the construction of labeled datasets (Reiss & Stricker, 2012; Roggen et al., 2010) costly and predominantly restricted to controlled laboratory environments. Although such datasets have enabled verification of methodological progress on relatively small neural networks (Ordóñez & Roggen, 2016), they lack the scale and diversity required to train modern architectures and fail to capture the variability of real-world human behavior.

The introduction of self-supervised learning (SSL) to inertial HAR has presented a paradigm shift. By no longer requiring annotations of human activities, it has unlocked the use of the large corpora of unlabeled data, generated by everyday wearables. While cleverly crafted pretext tasks such as contrasting differently augmented views of input signals have shown to perform well on various downstream tasks (Tang et al., 2021), such methods typically rely on instance-level discrimination, treating each segment as independent. However, this assumption is often violated in IMU data, where recurring motion primitives are shared across activities and subjects, making instance-level objectives poorly aligned with the underlying structure (Xu et al., 2024).

Recent work relaxes this constraint by defining positives beyond simple augmentations. Methods like REBAR and RelCon (Xu et al., 2024; 2025) retrieve similar segments across a timeseries and introduce ranking-based objectives. While improving pair selection, they do not use information about dataset composition and still rely on randomly sampled batches. This becomes particularly problematic in large-scale, in-the-wild datasets, which are highly imbalanced and dominated by repetitive, low-variance activities. For example, in the largest open dataset CAPTURE-24 (Chan et al., 2024), approximately 75% of the data corresponds to stationary behaviors, while more informative activities are rare. As a result, randomly sampled batches are likely to contain many near-identical segments, sustaining the false negative problem (Chuang et al., 2020) at the batch level even with well-chosen pairs. This can lead to weak training signals and limits contrastive objectives from learning discriminative representations (as shown in Section 5).

Based on this observation, we argue that a key missing component in current SSL approaches for HAR is the explicit modeling of global structure in motion data. Human movement exhibits recurring patterns, such as periodic walking cycles or characteristic transitions, that appear across time, activities, and individuals (Minnen et al., 2006). The automatic discovery of these motifs has long served as a fundamental concept in motion analysis, acting as atomic building blocks for recognizing complex activities (Minnen et al., 2006; Hamid et al., 2007). We therefore introduce Morphological Contrastive Learning (MorphCL), a self-supervised pretraining framework that can serve as a plug-in solution to inject explicit modeling of global structure into existing SSL approaches (see Figure 1). By combining motif discovery with domain-specific feature descriptors, MorphCL constructs a morphological clustering of the pretraining corpus and uses the resulting grouping to define a group-based contrastive objective that encourages agreement between segments sharing similar motion patterns. Our contributions are three-fold:

• We propose a novel morphological clustering system for accelerometer data, which uses a combination of motif-discovery and domain-specific precomputed features to extract morphological structures within an unlabelled pretraining corpus.

• Using the extracted clusters, we devise Morphological Contrastive Learning (MorphCL), a group-based contrastive objective that optimizes agreement between windows with similar motion morphology, moving beyond instance-level comparisons.

• We demonstrate that including explicit modeling of morphological structure can improve downstream results if combined with existing SSL frameworks (up to 15% in F1-score) and yields representations competitive with a foundation model that was trained on 4600×4600\times more data (Yuan et al., 2024), suggesting that domain-informed inductive bias can complement large scale training.

References (45)