Next Article in Journal
Bio-Inspired Enhanced Adaptive Centered Collision Optimizer for Hyperparameter Optimization of Multi-Scale Spatio-Temporal ConvNeXt in Boxing Action Recognition
Previous Article in Journal
A Smooth-Motion Walking-Type Piezoelectric Actuator over a Large Travel Range with High Torque
Previous Article in Special Issue
An Immersive P300 Brain–Computer Interface Based on 3D Morphological Stimuli and Self-Adaptive Bayesian Linear Discriminant Analysis
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Cross-Species Behavioral Representation Learning Using Domain-Adversarial Adaptation on Wearable IMU Signals

by
Çiğdem İnan Acı
1,*,
Furkan Say
1 and
Esin Ayşe Zaimoğlu
2
1
Department of Computer Engineering, Mersin University, 33343 Mersin, Turkey
2
Department of Information Systems Engineering, Sakarya University, 54050 Sakarya, Turkey
*
Author to whom correspondence should be addressed.
Biomimetics 2026, 11(7), 496; https://doi.org/10.3390/biomimetics11070496
Submission received: 31 May 2026 / Revised: 10 July 2026 / Accepted: 13 July 2026 / Published: 15 July 2026
(This article belongs to the Special Issue Artificial Intelligence (AI) in Biomedical Engineering: 2nd Edition)

Abstract

Animal locomotion exhibits highly structured temporal dynamics despite significant inter-species biomechanical and anatomical discrepancies. While wearable inertial measurement unit (IMU) sensors and deep learning have advanced animal activity recognition, existing systems remain largely species-dependent, requiring large-scale labeled datasets for each deployment. To address this, we propose a biomimetic cross-species behavioral representation learning framework that extracts transferable locomotor structures from heterogeneous IMU signals. The proposed methodology integrates behavioral ontology harmonization, imbalance-aware augmentation, and semi-supervised domain-adversarial adaptation to reduce inter-species distributional discrepancies. Unlike conventional classification models, our dual-head architecture enables simultaneous processing of multi-label and single-label behavioral structures across anatomically diverse species. Extensive experiments conducted on dog, goat, and horse datasets demonstrate that the proposed framework significantly improves cross-species transferability, achieving a mean Macro-F1 score of 0.711 compared to 0.345 for direct transfer learning. Furthermore, we show that sparse target supervision is critical for stabilizing adversarial adaptation. K-Means head adaptation partially mitigated fully unsupervised negative transfer. However, its performance remained below semi-supervised Domain-Adversarial Neural Network (DANN), indicating that sparse target supervision is still necessary for stable cross-species adaptation. These findings suggest that biologically motivated locomotor similarity can support cross-species behavioral transfer, although external validation on additional species, sensor placements, and deployment conditions is still required.

Graphical Abstract

1. Introduction

Animal locomotion exhibits highly structured temporal dynamics despite substantial anatomical and biomechanical differences among species. Behaviors such as walking, standing, grazing, trotting, resting, and feeding emerge from coordinated locomotor patterns shaped by neuromuscular and biomechanical adaptation processes. In recent years, wearable inertial measurement unit (IMU) sensors have enabled continuous monitoring of these behavioral patterns under natural conditions, supporting the development of intelligent animal activity recognition systems for livestock management, animal welfare assessment, veterinary monitoring, and precision farming applications [1,2,3]. Advances in deep learning have further accelerated the ability to model temporal behavioral signals directly from raw multivariate accelerometer streams without extensive handcrafted feature engineering [4,5,6]. Nevertheless, most existing wearable sensing systems remain strongly species-dependent and generally require large-scale labeled datasets collected under fixed sensor configurations and controlled environmental conditions.
Early animal activity recognition studies primarily relied on handcrafted statistical and frequency-domain features extracted from accelerometer signals combined with conventional machine learning algorithms such as Random Forests, Support Vector Machines, and k-Nearest Neighbors for species-specific activity classification [7,8,9]. These approaches demonstrated that wearable sensors could successfully distinguish fundamental locomotor behaviors in sheep, cattle, goats, horses, and dogs under controlled experimental settings [7,10,11,12]. Subsequently, deep learning architectures, particularly Convolutional Neural Networks (CNNs), Long Short-Term Memory (LSTM) networks, Bidirectional LSTMs, and Gated Recurrent Units (GRUs), were introduced to automatically learn discriminative temporal motion representations directly from raw sensor streams [5,13,14,15]. Attention-based recurrent models and transformer-inspired architectures further improved recognition performance by capturing both local motion dynamics and long-term temporal dependencies within animal movement patterns [16,17]. Despite these advances, most existing approaches still assume that training and test data originate from the same species and sensing distribution, limiting their generalization capability under heterogeneous real-world conditions.
Recent studies have demonstrated that animal behavior recognition performance is affected not only by model architecture but also by sensor placement, sampling frequency, segmentation strategy, behavioral imbalance, and inter-individual variability [8,18,19]. In practical deployment scenarios, anatomical differences, varying sensor attachment positions, and heterogeneous environmental conditions introduce substantial distributional discrepancies between datasets collected from different animal species [20]. Consequently, each newly introduced species or sensing condition often requires expensive manual annotation and model retraining. Furthermore, many animal behaviors exhibit hierarchical and partially overlapping structures, making conventional single-label classification frameworks insufficient for representing complex behavioral dynamics [21]. These limitations indicate that current wearable sensing systems remain highly dependent on domain-specific supervision and often fail to generalize under severe anatomical, behavioral, and environmental heterogeneity.
To overcome these limitations, recent research has increasingly focused on transfer learning, domain adaptation, and semi-supervised learning strategies capable of extracting transferable behavioral representations from heterogeneous sensor data [22,23,24,25]. Among these approaches, Domain-Adversarial Neural Networks (DANNs) have attracted considerable attention because of their ability to reduce domain discrepancies through adversarial feature alignment [22,23]. Conditional adversarial adaptation and pseudo-labeling strategies have further improved adaptation performance under limited target supervision [24,25]. In parallel, several studies explored federated learning frameworks for scalable and privacy-preserving livestock monitoring across distributed sensing infrastructures [26]. Data augmentation and imbalance-aware learning methods, including Generative Adversarial Network (GAN)-based augmentation, Multi-Label Synthetic Minority Over-sampling Technique (MLSMOTE), and synthetic oversampling approaches, have also been proposed to address severe class imbalance problems frequently observed in wearable animal behavior datasets [27,28,29,30]. In addition, compact time-series representation techniques such as catch22 descriptors have been introduced to improve computational efficiency while preserving discriminative locomotor characteristics [31]. However, most existing studies continue to formulate animal behavior analysis primarily as a closed-set classification problem rather than a biomimetic representation learning problem centered on discovering transferable locomotor structures shared across species. Therefore, the present study focuses specifically on wearable IMU-based animal activity recognition and cross-species domain adaptation, rather than on broader AI applications outside the animal-sensing context.
Cross-species behavioral intelligence remains particularly underexplored in wearable sensing research. Existing domain adaptation studies mainly investigate transfer across sensor positions or environmental conditions within a single species rather than between anatomically heterogeneous animals [23,32]. Moreover, behavioral annotation schemes frequently differ between datasets, leading to semantic inconsistencies that complicate direct representation transfer across species [32]. Recent cross-species knowledge-sharing frameworks demonstrated that biologically shared locomotor structures can partially improve universal activity recognition performance across multiple animal species [33]. Nevertheless, severe inter-species biomechanical discrepancies, sparse target annotations, and behavioral imbalance frequently cause negative transfer and unstable adaptation behavior under realistic deployment conditions [25]. However, most of these methods evaluate adaptation at the level of domain alignment or target-domain accuracy, without explicitly examining whether the learned representations preserve behavior-level transferability under heterogeneous annotation structures. This limitation is particularly important when one dataset follows a multi-label behavioral scheme while another follows a mutually exclusive single-label scheme. Therefore, developing biologically meaningful and transferable latent representations capable of preserving shared locomotor dynamics while adapting to species-specific behavioral patterns remains a major open challenge in biomimetic wearable sensing systems.
In this study, we propose a biomimetic cross-species behavioral representation learning framework for transferable animal activity recognition using wearable IMU signals collected from heterogeneous animal species. The proposed framework integrates semi-supervised domain adaptation, adversarial feature alignment, imbalance-aware learning, and temporal deep representation learning to reduce inter-species distribution discrepancies while preserving biologically shared locomotor structures. Unlike conventional activity classification systems that primarily optimize within-domain prediction accuracy, the proposed approach focuses on learning species-invariant latent behavioral representations that remain transferable across heterogeneous anatomical and environmental conditions. The framework incorporates a dual-head architecture capable of jointly processing multi-label and single-label behavioral structures across different species datasets.
In addition, Behavioral Transferability Similarity Score (BTSS)-based label harmonization, Principal Component Analysis (PCA)-based representation optimization, and imbalance-aware augmentation strategies are integrated into the learning pipeline to improve cross-species adaptation robustness. Extensive experiments are conducted under transfer learning and semi-supervised domain adaptation settings with varying target-label availability using multiple wearable IMU datasets containing heterogeneous behavioral distributions and annotation structures. The study further investigates negative transfer behavior under fully unsupervised conditions and analyzes the effects of sparse supervision on adversarial adaptation performance. Experimental results demonstrate that biologically informed adversarial representation learning substantially improves cross-species transferability while reducing dependence on large-scale labeled target datasets, highlighting the potential of biomimetic representation learning for next-generation adaptive animal behavior intelligence systems.
In this study, the term biomimetic does not refer to the explicit computational emulation of animal neural control mechanisms. Rather, it refers to a biologically motivated representation-learning strategy in which shared locomotor regularities across species are used as the basis for cross-species behavioral transfer. Therefore, the biomimetic interpretation is limited to locomotor-structure-inspired abstraction and should not be interpreted as evidence of direct neurobiological modeling.
The main contributions of this study are as follows:
  • A dual-head cross-species learning architecture is proposed to jointly handle multi-label dog annotations and single-label goat/horse annotations within a unified transfer-learning framework.
  • A BTSS- and Jensen–Shannon Divergence (JSD)-guided behavioral ontology harmonization strategy is used to map heterogeneous species-specific labels into six transferable behavior classes.
  • A semi-supervised DANN framework is evaluated across six bidirectional source–target transfer settings, four temporal architectures, and three training stages, resulting in 72 model-stage evaluations.
  • The role of sparse target supervision is explicitly analyzed through target-supervision weight ablation, showing that even minimal target-label information can prevent severe negative transfer.
  • The contribution of preprocessing components is quantified through an ablation analysis covering class balancing, PCA transformation, noise cleaning, and minority-window boosting.

2. Materials and Methods

This study proposes a biomimetic cross-species behavioral representation learning framework for transferable animal activity recognition using wearable inertial measurement unit (IMU) sensor data collected from heterogeneous animal species. The proposed methodology integrates behavioral ontology harmonization, imbalance-aware preprocessing, adversarial domain adaptation, and temporal deep representation learning within a unified semi-supervised learning pipeline. The overall framework was designed to investigate whether biologically shared locomotor structures can be preserved across anatomically distinct species while reducing dependence on large-scale labeled target datasets.

2.1. Datasets and Behavioral Ontology Harmonization

All datasets used in this study were obtained from publicly available wearable IMU datasets reported in previous studies. No new animal experiment was conducted. The dog dataset follows a multi-label annotation scheme, whereas the goat and horse datasets follow single-label multi-class annotation schemes. Therefore, the experimental design was constructed not only as a cross-species transfer problem but also as a heterogeneous-label-structure adaptation problem.
Three publicly available wearable IMU datasets collected from dogs, goats, and horses were used in this study [11,12,34]. These datasets were selected because they contain heterogeneous locomotor behaviors, distinct anatomical movement patterns, and different labeling structures, thereby providing a suitable benchmark for evaluating cross-species behavioral transferability under realistic domain discrepancy conditions. The dog dataset consisted of multi-label behavioral annotations collected using collar-mounted wearable sensors [11], whereas the goat and horse datasets contained single-label locomotor behavior annotations acquired from body-mounted IMU devices [12,18]. Consequently, substantial inter-species differences existed not only in movement biomechanics but also in annotation semantics, sensor placement, sampling configuration, and behavioral distribution characteristics. Detailed characteristics of the datasets used in this study are summarized in Table 1.
Because the datasets were collected in different original studies, they differ in subject composition, annotation protocol, and behavioral distribution. These differences were not removed from the evaluation design; instead, they were treated as part of the cross-species domain shift to be addressed by the proposed adaptation framework.
To establish a common behavioral representation space across species, a BTSS-based ontology harmonization procedure was applied prior to model training [33,35]. Initially, all species-specific behavior labels were analyzed using Jensen–Shannon Divergence (JSD)-based behavioral similarity estimation to quantify inter-class transferability relationships between datasets [35,36]. Behaviors exhibiting semantically and biomechanically similar locomotor characteristics were subsequently grouped into unified transferable behavioral categories [33]. Through this procedure, species-specific annotations were reduced into six common behavioral classes shared across datasets. This harmonization stage enabled direct cross-species comparison and domain adaptation by minimizing semantic inconsistencies between heterogeneous annotation protocols [32].
The harmonization procedure consisted of four steps. First, all original behavior labels were extracted from the dog, goat, and horse datasets. Second, window-level feature distributions were generated for each original label. Third, pairwise behavioral similarity was estimated using JSD, and semantically compatible labels with similar locomotor characteristics were grouped. Fourth, labels observed in only one species, labels representing composite or ambiguous behavioral states, and labels with insufficient transferable samples were excluded from the unified ontology. The raw-label-level JSD matrices for the dog–goat, dog–horse, and goat–horse comparisons are provided in Supplementary Figures S1–S3, while the unified-class-level validation matrices are provided in Supplementary Figures S4–S6.
The resulting behavioral ontology included locomotor and stationary behavior categories that were consistently observable across all species [21,33]. Since the dog dataset contained simultaneous multi-label behavioral annotations while the goat and horse datasets contained mutually exclusive single-label annotations [11,12,18], the proposed framework adopted a hybrid dual-head learning strategy capable of jointly processing both multi-label and single-label classification structures within a unified representation learning pipeline. This design enabled transferable behavioral modeling without discarding species-specific annotation characteristics. The final unified behavioral ontology and cross-species label mappings are presented in Table 2. The JSD-based raw-label similarity matrices and unified-class ontology validation matrices are provided in Supplementary Figures S1–S6.
For the dog dataset, the original behavior annotation columns were merged into a six-dimensional multi-label target vector after ontology harmonization. For the goat and horse datasets, each window was assigned to one mutually exclusive class within the same six-class ontology.
The unified ontology was designed for transfer-level behavioral abstraction rather than fine-grained ethological classification. Therefore, some original labels were intentionally grouped into broader locomotor categories to create a shared cross-species label space. For example, jumping, playing, galloping, and running were grouped under high-intensity locomotion, whereas sniffing was grouped with low-intensity locomotion when its window-level motion pattern was closer to walking-like movement. Although JSD and BTSS were used to support these mappings quantitatively, they do not fully replace biological validation. Thus, ontology harmonization may improve transferability while reducing behavioral specificity.

2.2. Behavioral Transferability Similarity Score

To make the ontology harmonization and class-wise adaptation procedure explicit, the Behavioral Transferability Similarity Score (BTSS) was formally defined as a JSD-derived class-level transferability measure. For each unified behavior class c , source-domain and target-domain feature distributions were estimated separately for each feature dimension d . Let P s ( c , d ) and P t c , d denote the normalized histogram-based probability distributions of the source and target samples belonging to behavior class c in feature dimension d , respectively. The Jensen–Shannon divergence (JSD) between these distributions is given in Equation (1).
J S D P Q = 1 2 D K L P M + 1 2 D K L Q M , M = 1 2 ( P + Q )
In Equation (1), D K L   denotes the Kullback–Leibler (KL) divergence. For discrete histogram bins, it is defined as given in Equation (2):
D K L P M = i = 1 n P i l o g 2 ( P i M i )
Here, i   denotes the histogram-bin index, P i   is the probability mass of P in bin i , and M i is the corresponding probability mass of the mixture distribution M . Terms with P i = 0 were treated as zero in the summation. With logarithms computed in base 2, JSD is bounded in the interval [0, 1]. Unlike KL divergence, JSD is symmetric and finite because both P   and Q are compared with their common mixture distribution M .
The class-level BTSS is given in Equation (3), where the JSD values are averaged across all D feature dimensions and converted into a similarity score:
B T S S   c = 1 1 D d = 1 D J S D ( P s c , d , P t ( c , d ) )
Accordingly, B T S S ( c ) [ 0 ,   1 ] , where values close to 1 indicate high cross-species similarity and stronger behavioral transferability, while values close to 0 indicate large source–target distributional discrepancy and lower transferability. Therefore, JSD was used as the underlying distributional distance measure, whereas BTSS represents a behavior-level normalized transferability score derived from JSD. In other words, JSD quantifies feature-wise distributional distance, while BTSS aggregates these distances into an interpretable class-wise transferability score.
BTSS was operationalized in two ways. First, it was used together with the semantic and biomechanical definitions of the behaviors to support the construction of the six-class shared behavioral ontology. Raw labels with low JSD and high BTSS, and with compatible operational definitions, were grouped into the same transferable behavior class. Labels with weak transferability, ambiguous behavioral meaning, or insufficient transferable samples were excluded from the unified ontology. Second, BTSS was used to weight the target-domain focal loss during DANN training. For each behavior class c , the BTSS-based loss weight is given in Equation (4):
w c = α 1 B T S S c + ( 1 α )
Here, α   = 0.7 controls the contribution of the transferability term. The resulting weights were normalized across classes and multiplied by the target-domain focal loss at the sample level. In this formulation, behaviors with lower transferability receive relatively higher adaptation weight, whereas behaviors that are already highly transferable receive lower additional weighting.

2.3. Data Preprocessing and Imbalance-Aware Augmentation

The collected IMU datasets exhibited substantial inter-species variability in sampling characteristics, behavioral distributions, sensor placement configurations, and annotation density. In addition, severe class imbalance was observed across several behavioral categories, particularly in rare locomotor and transition behaviors. To improve representation consistency and adaptation stability, a multi-stage preprocessing pipeline was applied prior to model training. The class distributions obtained after ontology harmonization and window-level segmentation are summarized in Table 3.
Temporal segmentation was performed using a sliding window of 128 samples. At 100 Hz, this corresponds to approximately 1.28 s per window. Label homogeneity filtering was applied only during training-window construction to reduce ambiguous windows. The test partitions were kept unchanged to preserve a realistic evaluation protocol. For multi-label dog windows, label assignment was performed after merging the original behavior annotation columns into the unified six-class vector. Windows with ambiguous or inconsistent label composition were excluded only from the training set by the homogeneity filter.
To prevent subject-level data leakage, the train, validation, and test partitions were created at the animal-subject level before window generation and before any cleaning, balancing, augmentation, or PCA fitting operation. Accordingly, all windows originating from the same animal were assigned to only one partition and were never shared across training, validation, and test sets. This subject-wise partitioning strategy ensured that the model was evaluated on unseen animals rather than on temporally adjacent windows from animals already observed during training.
After subject-wise partitioning, preprocessing operations were restricted to the training partition. Noise cleaning, class balancing, synthetic sample generation, feature standardization, and PCA fitting were performed only on the training data. The validation and test partitions were transformed using the parameters learned from the training data and were not cleaned, balanced, or augmented. The subject-wise split was performed using a training/validation/test ratio of 70/15/15. Due to the small number of goat subjects, the 70/15/15 split ratio was implemented using the nearest feasible subject-level allocation, while keeping all windows from the same animal within a single partition.
The exact subject-level allocation used in the train/validation/test split is reported in Table 4. For the dog dataset, 45 subjects were divided into 31 training, 7 validation, and 7 test subjects. For the goat dataset, the small number of available animals required the nearest feasible subject-level allocation, resulting in 3 training, 1 validation, and 1 test subject. For the horse dataset, 18 subjects were divided into 12 training, 3 validation, and 3 test subjects. All windows from the same animal were assigned to only one partition. Therefore, no animal-level leakage occurred across the training, validation, and test partitions. However, because the goat dataset contains only five animals, goat-target results should be interpreted with caution and are reported as a limited-sample transfer scenario rather than as a statistically broad species-level validation.
Initially, noisy and potentially mislabeled samples were removed using Edited Nearest Neighbors (ENN) and Tomek Links filtering methods [37,38]. ENN eliminates samples whose class labels disagree with the majority labels of their nearest neighbors, thereby reducing local class overlap and noisy decision boundaries [37]. Tomek Links were subsequently employed to identify ambiguous inter-class boundary samples and improve class separability within the feature space [38]. This cleaning stage was particularly important for reducing inter-species distributional noise before adversarial adaptation. The retained and removed training windows after the cleaning stage are reported in Table 5.
Following noise reduction, imbalance-aware augmentation strategies were applied to address the highly skewed behavioral distributions observed across datasets. Since the dog dataset contained multi-label annotations, the Multi-Label Synthetic Minority Over-sampling Technique (MLSMOTE) was employed to generate synthetic minority samples while preserving label co-occurrence structures [29]. MLSMOTE extends conventional SMOTE-based augmentation to multi-label learning problems by synthesizing feature vectors and associated label sets simultaneously [29]. For single-label datasets, additional synthetic augmentation was performed using Conditional Wasserstein Generative Adversarial Networks with Gradient Penalty (cWGAN-GP) [28,39]. The adversarial augmentation framework was designed to generate realistic synthetic IMU sequences while improving minority-class representation diversity and reducing mode collapse during GAN training [28].
For the single-label goat and horse datasets, cWGAN-GP augmentation was applied only to the training partition and only for minority classes below the class-balancing target. The conditioning variable was the harmonized six-class behavior label, encoded as a one-hot class vector. The generator received a Gaussian noise vector (dimension 32) concatenated with this class vector and produced synthetic samples in the PCA-transformed feature space. The critic received either a real or generated PCA feature vector concatenated with the same one-hot class condition and returned a scalar Wasserstein score. Both the generator and critic were implemented as fully connected multilayer perceptrons; the generator used a (32 + 6) → 128 → 128 → d architecture with LeakyReLU(0.2) activations, and the critic used a (d + 6) → 128 → 128 → 1 architecture with LeakyReLU(0.2) activations and dropout (p = 0.2), where d is the PCA feature dimensionality (components retained at 99% explained variance) and 6 is the number of harmonized behavior classes. The cWGAN-GP models were trained for 800 generator update steps (mini-batch size 256) with the Adam optimizer (learning rate 1 × 10−4, β1 = 0.0, β2 = 0.9), using a gradient-penalty coefficient of 10 and 5 critic updates per generator update. As is standard for WGAN-GP, training length is specified as the number of generator update iterations rather than epochs, since each iteration draws a randomly sampled mini-batch. Synthetic samples were accepted only until the predefined geometric-mean class target was reached, with each augmented (minority) class receiving at most 20% synthetic samples relative to its real count, while majority classes were undersampled to the same target rather than augmented. Synthetic sample quality was checked by applying the same post-generation ENN-based cleaning procedure used in the preprocessing pipeline. The validation and test partitions were never augmented, cleaned, or used during cWGAN-GP fitting; therefore, all reported test results were obtained on unchanged real target-domain samples.
After augmentation, Principal Component Analysis (PCA) was applied for dimensionality reduction and representation stabilization prior to deep feature extraction [40]. PCA was used to reduce redundancy within high-dimensional temporal IMU feature representations while preserving dominant locomotor variance across species. Four different PCA fitting strategies were evaluated, including Dog-PCA, Goat-PCA, Horse-PCA, and combined PCA configurations, in order to analyze the effect of source-domain representation structure on transfer performance. This stage additionally aimed to reduce species-specific feature dominance and improve adversarial alignment stability during domain adaptation training. The effect of PCA strategy was therefore evaluated experimentally rather than assumed a priori, and the final representation setting was selected according to transfer performance and representation stability.
To prevent evaluation leakage, all cleaning, class balancing, synthetic sample generation, and PCA fitting operations were applied only to the training partition. The test set was not cleaned, balanced, augmented, or used for PCA fitting. Therefore, the reported test performance reflects adaptation to the original target-domain distribution rather than performance on a synthetically balanced or cleaned test set.

2.4. Cross-Species Behavioral Representation Learning Framework

The proposed framework is a semi-supervised cross-species behavioral representation learning pipeline that integrates temporal feature extraction, adversarial domain adaptation, dual-head behavioral classification, and sparse-label target adaptation. The overall architecture of the framework is shown in Figure 1.
To investigate the effect of temporal representation learning capacity on cross-species transferability, four different deep learning architectures were evaluated as feature extractors: Bidirectional Long Short-Term Memory with attention (BiLSTM-Attention), Gated Recurrent Unit with attention (GRU-Attention), Transformer, and one-dimensional Convolutional Neural Network (CNN1D) architectures [13,14,41,42]. Recurrent architectures were selected because of their ability to model long-term temporal dependencies within sequential locomotor signals [13,14]. Attention mechanisms were incorporated to improve temporal saliency estimation and emphasize behaviorally informative motion segments during representation learning [16]. Transformer-based temporal modeling was additionally evaluated due to its self-attention-based global sequence learning capability, whereas CNN1D architectures were included as computationally efficient local temporal feature extractors [43]. The common architectural settings and training hyperparameters used for all evaluated models are summarized in Table 6. The evaluated training stages were transfer learning (TL), DANN adaptation, and Dynamic Pseudo Self-Training (D-PST). Binary cross-entropy (BCE) and categorical cross-entropy (CE) denote the loss families used for multi-label and single-label heads, respectively.
To reduce inter-species distribution discrepancies during transfer learning, DANN-based adaptation was employed [22]. The DANN framework integrates a Gradient Reversal Layer (GRL) between the feature extractor and the domain discriminator to encourage the extraction of species-invariant latent representations. During training, the feature extractor minimizes behavioral classification loss while simultaneously maximizing domain confusion through adversarial optimization. This adversarial process enables latent features originating from different animal species to become less distinguishable within the shared representation space, thereby improving transferability across heterogeneous domains.
Since the dog dataset contained multi-label annotations while the goat and horse datasets contained mutually exclusive single-label structures, the proposed framework incorporated a hybrid dual-head classification architecture. The source-domain branch employed focal binary cross-entropy loss for multi-label learning, whereas the target-domain branch used focal categorical cross-entropy loss for single-label classification [29,44]. This design enabled simultaneous optimization across heterogeneous annotation structures without discarding species-specific behavioral information. Focal loss functions were selected to reduce the influence of dominant classes and improve learning stability under severe behavioral imbalance conditions [29]. The hybrid dual-head classification mechanism used for jointly processing multi-label and single-label behavioral structures is illustrated in Figure 2.
The dual-head design was required because the source and target domains did not always share the same annotation structure. In Dog → Goat and Dog → Horse transfer settings, the multi-label dog predictions were not directly converted into a single-label target prediction. Instead, the dog source head used independent sigmoid outputs and focal binary cross-entropy to supervise the shared feature extractor, whereas the goat or horse target head used softmax outputs and focal categorical cross-entropy for mutually exclusive target-class prediction. Therefore, the source and target heads preserved their original annotation structures while sharing only the latent representation. When the dog dataset was used as the source or target, the corresponding head was optimized with binary cross-entropy for multi-label prediction; when goat or horse data were used, the corresponding head was optimized with categorical cross-entropy for single-label prediction.

Loss Formulation and Optimization

To make the dual-head optimization procedure explicit, the proposed framework was formulated as a shared feature extractor with domain-specific behavioral heads and a domain discriminator. Let F θ ( . ) denote the shared temporal feature extractor, C s ( . ) the source behavioral classification head, C t ( . ) the target behavioral classification head, and D ψ .   the domain discriminator. For a source mini-batch B s = { ( x i s , y i s ) } and a target mini-batch B t = { ( x j t , y j t ) } , the latent representations are given in Equation (5).
z i s = F θ x i s ,     z j t = F θ x j t
The output activation and classification loss of each behavioral head depend on the annotation structure of the corresponding domain. For multi-label data, the classifier uses independent sigmoid outputs; for single-label multi-class data, the classifier uses softmax outputs. Therefore, the same shared representation can be optimized under heterogeneous label structures without forcing the dog dataset into a single-label format or converting the goat and horse datasets into artificial multi-label targets.
For a multi-label head, let y i k { 0,1 } be the ground-truth indicator of class k for sample i , and let p i k = σ ( a i k ) be the corresponding sigmoid probability. The class-wise probability assigned to the true binary state is given in Equation (6).
p * i k = y i k p i k + ( 1 y i k ) ( 1 p i k )
The focal binary cross-entropy loss used for multi-label prediction is given in Equation (7).
L F B C E = 1 N K i = 1 N k = 1 K β k ( 1 p * i k ) γ B C E   l o g ( p * i k + ε n u m )
where K is the number of unified behavior classes, β k is the optional class-balancing weight, γ B C E is the focal focusing parameter, and ε n u m is a small numerical constant used to avoid l o g ( 0 ) . In the experiments, γ B C E = 2.0 was used for the source B C E term. When label smoothing was applied, binary labels were replaced by smoothed labels before computing the B C E term.
For a single-label multi-class head, let y i { 1 , , K } denote the ground-truth class of sample i , and let p i , c be the softmax probability of class c . The focal categorical cross-entropy loss is given in Equation (8).
L F C E = 1 N i = 1 N ω y i ( 1 p i , y i ) γ C E   l o g ( p i , y i + ε n u m )
where ω y i is the class-balancing weight for the true class and γ C E is the focusing parameter. In the experiments, γ C E = 1.5 was used for the target C E term.
The supervised source classification loss L s r c is computed using either L F B C E or L F C E , depending on the source-domain annotation structure. Similarly, the supervised target classification loss L t g t is computed using the loss function corresponding to the target-domain annotation structure. The combined classification loss is given in Equation (9).
L c l s = L s r c + w t g t L t g t
where w t g t controls the contribution of labeled target samples. In the main semi-supervised DANN experiments, w t g t = 0.20   was used. In the fully unsupervised setting, w t g t = 0 , and therefore no target classification gradient is used.
The domain discriminator receives the gradient-reversed latent representation and predicts whether each embedding originates from the source or target domain. Let d i { 0,1 } denote the domain label and q i = D ψ ( G R L λ ( z i ) ) denote the predicted probability of the source domain. The binary domain-discrimination loss is given in Equation (10).
L d o m = 1 N s + N t i = 1 N s + N t [ d i log q i + ε n u m + ( 1 d i ) log ( 1 q i + ε n u m ) ]
The overall DANN optimization objective is given in Equation (11):
min θ , C s , C t max ψ [ L c l s λ ( p ) L d o m ]
In implementation, this minimax behavior is obtained through the Gradient Reversal Layer (GRL). The GRL acts as an identity function during the forward pass but multiplies the gradient by λ ( p ) during backpropagation, as shown in Equation (12).
G R L λ z = z ,   G R L λ ( z ) z = λ p I
Thus, the domain discriminator is trained to distinguish source and target embeddings, whereas the feature extractor receives the reversed domain gradient and is encouraged to learn species-invariant representations.
The GRL reversal coefficient was gradually increased using the standard sigmoid schedule in Equation (13).
λ p = λ m a x 2 1 + e x p ( 10 p ) 1 ,   p = e E
where e is the current epoch, E is the total number of DANN training epochs, p [ 0,1 ] is the normalized training progress, and λ m a x   is the maximum adversarial weight. This schedule starts with a weak domain-alignment signal and progressively strengthens the adversarial objective as the behavioral classifier becomes more stable.
During the TL stage, only L s r c is optimized; target-domain samples, L t g t , and the domain discriminator are not used. During the DANN stage, both source and target mini-batches are processed. The source loss updates the shared feature extractor and source head, while the target loss contributes only when w t g t > 0 .   In parallel, L d o m is backpropagated through the GRL, encouraging the feature extractor to reduce behavioral classification error while making source and target embeddings less distinguishable.

2.5. Training Strategy and Experimental Design

The proposed framework was evaluated using six bidirectional source–target transfer pairs constructed across dog, goat, and horse datasets. For each experiment, one species was assigned as the source domain and another as the target domain to evaluate cross-species behavioral transferability under heterogeneous anatomical and behavioral conditions. The experimental pipeline consisted of three sequential training stages: TL, DANN, and Dynamic Pseudo Self-Training (D-PST). The dual-head source–target transfer scenarios evaluated in this study are summarized in Table 7.
During the TL stage, the feature extractor and classification heads were trained using only supervised source-domain data without adversarial adaptation. BCE was used for multi-label outputs with independent class probabilities, whereas CE was used for single-label multi-class outputs with mutually exclusive class probabilities. Dog data were treated as multi-label, while goat and horse data were treated as single-label multi-class. In the DANN stage, adversarial domain alignment was activated through the GRL model to reduce inter-species distribution discrepancies [22]. Semi-supervised target adaptation was performed by incorporating a limited number of labeled target samples into the optimization process using a target supervision coefficient ( w t g t ). The primary experiments were conducted under semi-supervised conditions with w t g t = 0.2 , while additional experiments were performed under sparse-label ( w t g t = 0.01 ) and fully unsupervised ( w t g t = 0 ) settings to analyze the effects of target supervision availability on adaptation stability and negative transfer behavior.
Labeled target samples used for semi-supervised adaptation were drawn only from the target-domain training partition and were never sampled from validation or test subjects. In the D-PST stage, 10 pseudo-labeled target samples per adaptation setting were used for target-head refinement, as indicated in Figure 1. Pseudo-labels were generated once after DANN using the best DANN checkpoint and only from the target-domain training partition. The term “dynamic” refers to the class-adaptive pseudo-label selection strategy: majority pseudo-label classes required a higher confidence threshold, whereas minority pseudo-label classes were allowed a lower threshold to reduce class-dominance bias. A single global confidence threshold was not used; instead, pseudo-label candidates were ranked within each predicted class according to posterior confidence, and the effective acceptance threshold varied according to predicted class frequency and class-level caps. Accepted pseudo-labels were ranked by confidence and limited by class-level caps. Pseudo-labels were not updated iteratively during D-PST; they remained fixed during refinement, and the adversarial domain loss was disabled. The complete experimental matrix, including transfer directions, model architectures, adaptation stages, and target supervision settings, is provided in Table 8.
All experiments were conducted under the same preprocessing, feature extraction, architecture, and training settings to ensure comparability across source–target pairs. Hyperparameters were not separately optimized for each transfer direction. Early stopping was based on validation loss, and the best validation checkpoint was used for final test evaluation. Fixed random seeds were used to ensure deterministic preprocessing and model initialization across experiments.
Models were trained using AdamW during the TL stage and Adam during the DANN and D-PST stages, as summarized in Table 6. Early stopping was applied based on validation loss to reduce overfitting during transfer learning. To ensure fair architectural comparison, identical preprocessing, augmentation, and training settings were applied across all evaluated feature extraction models. Experimental performance was analyzed across 72 transfer experiments covering multiple architectures, adaptation stages, and target supervision conditions.

2.6. K-Means Head Adaptation Strategy

To further investigate negative transfer behavior under severe domain discrepancy conditions, an additional lightweight target adaptation strategy based on K-Means clustering was evaluated after adversarial adaptation. In this stage, the feature extractor learned during DANN training was frozen, and only the target classification head was updated using cluster-guided target feature refinement. The objective of this procedure was to analyze whether species-invariant latent representations obtained through adversarial learning could be further stabilized through unsupervised target-space restructuring.
Initially, latent target representations extracted from the frozen feature extractor were grouped using K-Means clustering [45]. The number of clusters was selected according to the number of harmonized behavioral classes shared across species. Cluster assignments were subsequently used to initialize pseudo-target partitions within the latent feature space, enabling lightweight target-head adaptation without modifying the shared representation backbone. This strategy reduced computational complexity while preserving previously learned cross-species locomotor representations. To resolve the cluster-to-class alignment problem, cluster labels were not mapped manually. After K-Means clustering, each cluster was assigned to a behavioral class using the majority class among the sparse labeled target-training samples located in that cluster. If two clusters were assigned to the same class, the assignment was selected by maximizing the total number of matched labeled samples across clusters, following a Hungarian-style one-to-one matching rule. After this alignment, cluster assignments were converted into pseudo-target labels. The shared feature extractor was frozen, and only the target classification head was updated by minimizing the cross-entropy loss between the cluster-aligned pseudo-labels and the target-head predictions. No adversarial domain loss was used in this stage. Therefore, K-Means head adaptation was used only as a lightweight target-decision calibration step, not as a replacement for full semi-supervised DANN training.
The K-Means head adaptation stage was particularly designed to analyze the relationship between latent feature separability and transfer performance under sparse-label and fully unsupervised adaptation settings. In addition, the method enabled investigation of whether adversarially aligned behavioral representations formed biologically meaningful locomotor clusters independent of species identity. Experimental findings obtained from this stage were further evaluated using latent-space separability metrics and transfer performance analyses.

2.7. Evaluation Metrics and Statistical Analysis

Experimental performance was evaluated using Macro-F1, Micro-F1, Weighted-F1, precision, and recall metrics to analyze cross-species behavioral recognition performance under heterogeneous and imbalanced class distributions [46]. Since several behavioral categories contained substantially fewer samples than dominant locomotor classes, F1-based metrics were prioritized over overall accuracy to provide a more reliable assessment of minority-class recognition capability. Macro-F1 was used to evaluate balanced class-level performance, whereas Weighted-F1 and Micro-F1 were used to measure overall classification robustness under imbalanced behavioral distributions.
To evaluate latent representation quality and cross-species feature separability, Silhouette Score analysis was additionally performed on the learned feature embeddings [47]. This analysis was used to investigate whether adversarial adaptation improved species-invariant behavioral clustering within the shared latent representation space. Higher silhouette scores indicated improved intra-class compactness and inter-class separability across transferred behavioral representations.
Statistical significance analyses were conducted to compare architectural performance differences across transfer settings and adaptation stages. Pairwise comparisons between competing models were evaluated using the Wilcoxon signed-rank test [48], while multi-model performance comparisons were analyzed using the Friedman test [49] followed by Nemenyi post-hoc analysis [50]. Statistical analyses were performed to determine whether observed performance differences originated from consistent transfer improvements rather than random experimental variation. For the Wilcoxon signed-rank tests, each paired observation corresponded to the same source–target direction and model architecture evaluated under two different training stages. For the Friedman tests, repeated observations were formed across matched transfer settings, allowing comparison of training stages and model architectures under identical experimental conditions. Nemenyi post-hoc tests were then used to identify which stages or architectures differed significantly after the omnibus Friedman test.

3. Results

This section presents the experimental results obtained from the proposed cross-species behavioral representation learning framework. The results are organized according to the main experimental findings: the effect of representation-space selection, the contribution of domain-adversarial adaptation, source–target transfer performance, model architecture comparison, behavior-level recognition performance, sparse-label adaptation behavior, and statistical validation. Since the datasets contained heterogeneous and imbalanced behavioral distributions, Macro-F1 was used as the primary performance metric, while Precision–Recall Area Under the Curve (PR-AUC) was used as the primary complementary threshold-independent metric. Receiver Operating Characteristic Area Under the Curve (ROC-AUC) was retained only as a secondary descriptive metric for completeness because it may overestimate performance under severe class imbalance. Therefore, the interpretation of model performance was based primarily on Macro-F1 and PR-AUC rather than ROC-AUC. Because the train, validation, and test partitions were separated at the subject level, the reported results reflect performance on unseen animals rather than on windows from animals already observed during training. The results focus on quantifying whether adversarial representation learning can improve cross-species behavioral transferability while preserving biologically meaningful locomotor structures across heterogeneous animal species.
In addition to the main performance comparisons, the results include component-level ablation analyses to clarify whether the observed improvements were attributable to adversarial adaptation alone or to the combined preprocessing and representation-learning pipeline.

3.1. Preprocessing and Representation-Space Outcomes

The preprocessing pipeline reduced noisy and ambiguous training samples while preserving the test sets unchanged for unbiased evaluation. After ontology harmonization, segmentation, and cleaning, the datasets still showed heterogeneous class distributions, particularly in short-duration behaviors such as Shaking and high-intensity behaviors such as Running. Therefore, imbalance-aware augmentation and PCA-based representation stabilization were essential before cross-species adaptation.
Class balancing produced more stable training sets across species, although the dog dataset retained higher residual imbalance because of its multi-label annotation structure. The final balancing outcomes are summarized in Table 9.
Although class balancing reduced the imbalance in all datasets, residual imbalance remained more pronounced in the dog dataset, with a max/min ratio of 10.5:1 compared with 1.5:1 for the goat dataset and 1.8:1 for the horse dataset. This persistent imbalance is likely to be one of the structural factors contributing to the lower transfer performance observed in dog-targeted scenarios, particularly for the Shaking class.
The representation-space analysis showed that PCA strategy affected transferability. Goat-PCA produced the strongest average transfer performance in the preliminary logistic-regression analysis, followed by Horse-PCA, Dog-PCA, and Combined-PCA. In the Dog → Horse BiLSTM setting, PCA selection also influenced DANN performance, indicating that feature-space construction affected adversarial alignment quality. The mean transfer Macro-F1 values were averaged over the six source–target pairs. The deep-transfer comparison was conducted only for the Dog → Horse scenario using BiLSTM-Attention. These results are summarized in Table 10.
The PCA strategy analysis showed that Goat-fitted PCA achieved the highest mean transfer Macro-F1 in the logistic regression screening, followed by Horse-fitted PCA, whereas Joint PCA produced the lowest score. In the selected Dog → Horse BiLSTM-Attention setting, the effect of PCA depended on the learning strategy. Dog-fitted PCA performed better for TL only and K-Means head adaptation, while Goat-fitted PCA improved both unsupervised and semi-supervised DANN. This suggests that PCA spaces fitted on single-label datasets may provide a cleaner behavioral variance structure for adversarial adaptation. A separate dimensionality check under the Goat-fitted PCA setting showed that Macro-F1 increased from 0.564 with 5 components to 0.647 with 61 components, although the gain became smaller after 30 components. Therefore, the final experiments used a variance-preserving PCA setting to balance information retention and computational cost. In the final reported experiments, shared PCA refers to a single PCA transformation fitted only on the training partition and then applied consistently to the corresponding source and target validation/test partitions. It does not refer to separate PCA models fitted independently on source and target test data. The alternative Dog-fitted, Goat-fitted, Horse-fitted, and Joint PCA configurations in Table 10 were included as a representation-space sensitivity analysis. The large performance drop observed when removing shared PCA suggests that the deep temporal models benefited from a variance-stabilized input space before adversarial alignment, rather than being fully robust to raw heterogeneous IMU variability across species.
The Silhouette analysis (Table 11) further showed that the TL embedding produced the strongest behavior-level separation, while the DANN embedding yielded the lowest separation ratio, indicating improved domain alignment with a moderate reduction in class separability.
The feature-space visualizations supported these quantitative findings. As shown in Figure 3, compared with raw IMU representations, statistical features and PCA-transformed representations produced more structured and separable spaces. The contribution of each processing component is quantified later in Section 3.7.

3.2. Transfer Learning, DANN, and D-PST Performance

The overall phase comparison showed that DANN substantially improved cross-species transfer performance compared with direct transfer learning. Across the full experimental matrix, the average Macro-F1 increased from 0.345 in the TL phase to 0.711 in the DANN phase. This improvement indicates that adversarial feature alignment was effective in reducing inter-species distribution discrepancies.
In contrast, the D-PST stage did not provide additional benefit after DANN. Although D-PST remained above the TL baseline in several cases, it reduced DANN performance in most experiments. Therefore, the best overall adaptation stage was DANN, not DANN followed by D-PST. The phase-level results are summarized in Table 12 and visualized in Figure 4.
Although D-PST remained above the TL baseline in some scenarios, its decrease relative to DANN indicates that pseudo-label errors accumulated after adversarial adaptation, particularly under class imbalance and behavior-level ambiguity. This degradation was interpreted together with the phase-level results in Table 12, the source–target trends in Figure 4, and the behavior-level F1 patterns reported in Section 3.4, rather than as evidence that D-PST provides a consistently beneficial refinement stage. The decline after D-PST was mainly interpreted as a confirmation-bias effect: pseudo-labels generated from already imperfect target predictions reinforced ambiguous decision boundaries, especially for short-duration or semantically overlapping behaviors such as Eating and Shaking. Although D-PST used class-adaptive confidence thresholding, confidence filtering alone was not sufficient to fully prevent pseudo-label noise under severe cross-species distribution shift. Therefore, D-PST is reported as a diagnostic negative result rather than as a consistently beneficial refinement stage.

3.3. Source–Target and Architecture-Level Results

The source–target analysis showed that the highest transfer performance was achieved in the Goat → Horse setting, with a Macro-F1 score of 0.747. This result suggests that transfer was more effective between species with compatible locomotor structures and single-label annotation schemes. In contrast, transfer settings targeting the dog dataset were more challenging because of its multi-label structure and higher residual imbalance. The source–target DANN results are presented in Table 13.
Figure 4 shows that DANN consistently improved over transfer learning (TL) across all source–target directions, whereas Dynamic Pseudo Self-Training (D-PST) produced a systematic decline after Domain-Adversarial Neural Network (DANN) adaptation in most settings. The highest Mean Macro-F1 was obtained in the Goat → Horse transfer direction, indicating that the goat source domain provided the most transferable behavioral representation for the horse target domain. In contrast, dog-targeted transfers produced lower Macro-F1 and PR-AUC values, suggesting that the multi-label structure and residual class imbalance of the dog dataset made target adaptation more difficult. Accuracy and ROC-AUC remained high across all transfer directions, but PR-AUC better reflected the performance differences under class imbalance. Accordingly, Table 14 and Figure 5 were interpreted primarily in terms of PR-AUC, while ROC-AUC values were considered only secondary descriptive indicators.
Model-level results showed that attention-based recurrent architectures achieved the strongest overall performance. GRU-Attention obtained the highest average Macro-F1 score (0.737), followed very closely by BiLSTM-Attention (0.736). CNN1D performed moderately, whereas Transformer produced the lowest average Macro-F1 among the four architectures. These results indicate that recurrent attention-based architectures were more effective for extracting transferable temporal locomotor representations from wearable IMU data. The model-level results are summarized in Table 14 and Figure 5.

3.4. Behavior-Level Results

Behavior-level analysis showed that the proposed framework recognized rhythmic and temporally stable locomotor behaviors more successfully than short-duration or semantically overlapping behaviors. Trotting, Walking, and Stationary were the strongest classes, with several experiment–behavior pairs exceeding an F1 score of 0.90. In contrast, Shaking and Eating showed more variable performance because of their shorter duration, lower frequency, and stronger overlap with other low-mobility or head-related behaviors.
The behavior-level F1 distribution is shown in Figure 6, while the descriptive behavior-level statistics and high-performing experiment–behavior pairs are summarized in Table 15.
Stationary, Walking, and Trotting achieved the strongest class-level performance under DANN, with several behavior-specific transfer cases exceeding an F1 score of 0.90. In contrast, Running and Shaking remained the most challenging classes, reflecting the combined effects of class imbalance, short-duration movement patterns, and greater inter-species variability. The high-performing cases were mostly observed in goat- and horse-related transfer directions, suggesting that single-label target structures provided more stable class boundaries for adversarial adaptation.
These results indicate that longer-duration and rhythmically stable behaviors were more transferable across species, whereas short-duration or semantically overlapping behaviors were more sensitive to annotation mismatch, class imbalance, and inter-species biomechanical variability.

3.5. Sparse-Label and Unsupervised Adaptation Results

The target-label weight ablation revealed that fully unsupervised adversarial adaptation was unstable under strong inter-species discrepancy. In the Dog → Horse BiLSTM-Attention setting, the fully unsupervised condition ( w t g t = 0 ) reduced Macro-F1 to 0.03, indicating severe negative transfer. However, even a very small target-label signal ( w t g t = 0.01 ) increased Macro-F1 to 0.63, demonstrating that sparse target supervision was sufficient to stabilize adversarial adaptation.
The K-Means Head Adaptation strategy partially mitigated negative transfer under fully unsupervised target adaptation. Under the same unsupervised Dog → Horse setting, K-Means Head Adaptation achieved 0.40 Macro-F1, indicating a clear mitigation of fully unsupervised negative transfer compared with DANN. To address the diagnostic baseline limitation, a CORrelation ALignment (CORAL)-based feature alignment baseline was additionally evaluated in the same Dog → Horse BiLSTM-Attention setting. This baseline provided a non-adversarial discrepancy-reduction comparison and was used to determine whether covariance alignment could mitigate the negative transfer observed under fully unsupervised DANN. Table 16 summarizes the sparse target-supervision and unsupervised adaptation results in the representative Dog → Horse BiLSTM-Attention setting.
The fully unsupervised DANN result should be interpreted as a stress-test analysis rather than as evidence of universal failure across all source–target pairs and model architectures. The catastrophic negative transfer case (Macro-F1 = 0.03) was observed in the Dog → Horse setting using BiLSTM-Attention, which represents a difficult transfer scenario due to both inter-species biomechanical discrepancy and heterogeneous annotation structure. Therefore, we revised the interpretation to avoid overgeneralization. The result demonstrates that, under at least one severe cross-species shift, adversarial alignment without any target-label signal can collapse behavior-discriminative information. Broader evaluation of fully unsupervised DANN across all transfer pairs and architectures is left as a limitation and future work.
As shown in Figure 7, the representative Dog → Horse DANN model preserved the main locomotor classes more effectively than short-duration or semantically overlapping behaviors. Most errors were concentrated between behavior pairs with similar inertial signatures, supporting the behavior-level interpretation reported in Section 3.4.
To clarify the scope of the baseline comparison, additional unsupervised target-adaptation baselines were evaluated in the Dog → Horse BiLSTM-Attention diagnostic setting. These baselines included a Conditional Domain Adversarial Network (CDAN)-style conditional adversarial adaptation variant, Pseudo-label-Assisted Domain-Adversarial Neural Network (PA-DANN), entropy minimization, nearest-centroid head adaptation, and K-Means head adaptation. This comparison was intended as a focused diagnostic analysis of whether alternative unsupervised adaptation strategies could mitigate the fully unsupervised DANN collapse, rather than as a comprehensive state-of-the-art benchmark across all source–target pairs and architectures. Fully unsupervised DANN and the adversarial variants remained below the TL-only zero-shot baseline, whereas nearest-centroid and K-Means head adaptation improved over TL-only by freezing the shared feature extractor and adapting only the target decision head. Cross-Species Knowledge Sharing and Preserving (CKSP) was not directly reimplemented because it follows a different multi-species joint-training protocol and was originally reported on different species, datasets, and evaluation conditions. Therefore, the present study does not claim superiority over CKSP or other non-reimplemented domain adaptation frameworks.
Fully unsupervised DANN showed severe negative transfer in the Dog → Horse setting, with Macro-F1 decreasing to 0.03. The target focal loss also increased from 1.41 to 4.35, indicating unstable target-domain adaptation. In contrast, adding a very small target-label signal, w t g t = 0.01 , increased Macro-F1 to 0.63 and reduced the target focal loss from 1.27 to 0.71. Further increases in target supervision improved performance more gradually, reaching 0.72 at w t g t = 0.20 and 0.74 at w t g t = 1.00 . Among fully unsupervised alternatives, K-Means head adaptation achieved the best Macro-F1 score of 0.40, but this value remained far below the semi-supervised DANN result. Therefore, K-Means head adaptation can reduce the severity of negative transfer but cannot fully compensate for the absence of target-label information. Other unsupervised variants, including the CDAN-style conditional adversarial variant, PA-DANN, and strong entropy minimization, were not retained in the table because they performed substantially worse in the diagnostic setting.

3.6. Statistical Validation

Statistical analyses confirmed that the observed performance differences were significant. The Wilcoxon signed-rank test was applied to paired model-stage results across identical source–target and architecture settings. The improvement from TL to DANN was statistically significant, and the decrease from DANN to D-PST was also significant. The Friedman test confirmed significant differences across training stages and model architectures. Nemenyi post-hoc comparisons showed that DANN significantly outperformed TL and D-PST, while attention-based recurrent architectures performed significantly better than the Transformer-based representation. The statistical results are summarized in Table 17.
The statistical analysis confirmed that the training stage had a significant effect on performance. All pairwise Wilcoxon comparisons among TL, DANN, and D-PST were significant, with W = 0.0 and p = 1.19 × 10−7. The Friedman test also showed a strong overall stage effect, supported by Kendall’s W = 1.00. The Nemenyi post hoc test confirmed significant differences among all stage pairs. Model architecture also had a significant effect. The post hoc analysis showed that the attention-based recurrent models differed significantly from Transformer, whereas their difference from CNN1D was not statistically significant. The very strong Kendall’s W and Wilcoxon results should be interpreted as consistency across the matched experimental configurations rather than as evidence of independent biological replication or absence of uncertainty. Specifically, W = 0.0 indicates that the paired stage comparisons showed the same directional ordering across the evaluated model-stage observations. Therefore, these statistical results should be interpreted together with the limitations related to missing confidence intervals, effect sizes, and repeated-seed variability.

3.7. Component-Level Ablation and Explainability

The ablation analysis demonstrated that the complete processing pipeline produced the most stable cross-species transfer behavior, with all components—ontology harmonization, noise cleaning, imbalance-aware augmentation, PCA-based feature stabilization, and DANN-based alignment—jointly contributing to the final performance rather than any single component alone. Removing the shared PCA transformation caused the largest drop, reducing Macro-F1 from 0.711 to 0.439, indicating that the shared PCA space was critical for reducing heterogeneous species-specific variance prior to adversarial alignment. Removing class balancing caused a substantial decrease particularly for minority classes, with F1 scores of Shaking and Running falling from 0.39 to 0.14 and from 0.48 to 0.18, respectively. Excluding minority-window reinforcement reduced the diversity of rare-class samples and lowered Macro-F1 to 0.519. Removing training-set cleaning produced the smallest decrease, suggesting that the DANN model was relatively robust to residual boundary noise compared with the effects of PCA and class balancing. The ablation scenarios are summarized in Table 18.
The ablation analysis was conducted in the Dog → Horse transfer setting using the BiLSTM-Attention backbone under semi-supervised DANN, because this setting represented a challenging cross-species transfer scenario and was used as a diagnostic case for component-level contribution analysis.
SHapley Additive exPlanations (SHAP) analysis further indicated that the learned models relied on physically meaningful motion-related features. The most influential predictors were associated with acceleration magnitude, gyroscope dynamics, temporal variability, and movement intensity. This supports the interpretation that the learned representations captured transferable locomotor information rather than dataset-specific artifacts. The averaged SHAP results are summarized in Table 19.
The SHAP analysis showed that gyroscope-derived zero-crossing features were the most consistently informative predictors across transfer settings. In particular, Gz_zcr and Gx_zcr ranked as the two most important features and appeared in the top-five feature list in 21 of the 24 scenarios. Gy_zcr and Gx_dom_ratio also showed high cross-scenario stability, indicating that rotational transition patterns and dominant-frequency structure were more discriminative than amplitude-based descriptors. Accelerometer-derived features were also relevant, especially Ax_zcr and Ay_zcr, but they appeared less consistently than gyroscope-based features. Overall, the results suggest that cross-species behavioral transfer was primarily driven by dynamic movement-transition characteristics rather than static signal magnitude alone.
Overall, the results show that semi-supervised domain-adversarial learning substantially improved cross-species behavioral transfer compared with direct transfer learning. The strongest results were obtained with attention-based recurrent architectures, particularly GRU-Attention and BiLSTM-Attention. DANN was consistently the most effective training phase, while D-PST reduced performance after adversarial adaptation. Sparse target supervision was critical for preventing negative transfer, and K-Means Head Adaptation provided a more stable but still limited unsupervised mitigation strategy.

4. Discussion

The findings of this study show that cross-species animal behavior recognition can be improved when wearable IMU data are modeled through transferable behavioral representations rather than through species-specific classification pipelines. The most important result was the substantial improvement obtained with domain-adversarial adaptation. Across the experimental matrix, the average Macro-F1 score increased from 0.345 in the TL phase to 0.711 in the DANN phase. This indicates that direct transfer learning was not sufficient to overcome anatomical, behavioral, and distributional differences between species, whereas adversarial feature alignment enabled the model to learn a more transferable latent representation.
These results support the assumption that different animal species may share partially transferable locomotor patterns, even though their morphology, gait dynamics, and annotation structures differ. In this sense, the biomimetic aspect of the framework lies in using biologically motivated locomotor similarity as a basis for representation transfer, rather than treating each species as a completely isolated classification problem.

4.1. Cross-Species Transferability and Adaptation Behavior

The comparison between TL, DANN, and D-PST provides a clear methodological conclusion. TL produced limited target-domain performance because the learned source representations remained biased toward the source species. DANN improved this limitation by reducing source–target distribution discrepancies through adversarial alignment. The consistent increase from TL to DANN indicates that cross-species behavioral recognition requires explicit domain adaptation rather than direct model reuse.
However, the results also show that adversarial adaptation has limits. In the Dog → Horse BiLSTM-Attention stress-test setting, the fully unsupervised condition w t g t = 0 reduced Macro-F1 to 0.03, indicating a severe risk of negative transfer under strong cross-species domain shift. This result should not be interpreted as a universal failure mode of unsupervised DANN across all transfer directions or architectures. Rather, it shows that, in this particularly difficult setting, adversarial alignment may remove behavior-discriminative information when no target-label signal is available. Adding a very small target-label contribution w t g t = 0.01 increased Macro-F1 to 0.63, suggesting that sparse target supervision can stabilize adaptation under severe domain shift.
A plausible explanation is that, in the fully unsupervised setting, the GRL optimizes domain confusion without any target-domain class anchor. Under strong anatomical and biomechanical differences, this can encourage the feature extractor to remove not only species-specific information but also behavior-discriminative structure. In this case, the model may satisfy the domain discriminator by over-aligning heterogeneous target features, leading to class-boundary collapse or majority-class-biased predictions. This interpretation is consistent with the sharp recovery observed when even a very small target-label signal was introduced.
The D-PST stage did not consistently improve DANN performance. Although pseudo-labeling can be useful in semi-supervised learning, the present results indicate that pseudo-label errors may accumulate after adversarial adaptation, especially for rare or ambiguous behaviors. This explains why D-PST reduced performance in most experiments. In contrast, K-Means Head Adaptation was more stable than fully unsupervised DANN under the tested unsupervised condition, but its performance remained substantially below semi-supervised DANN. This suggests that, when target labels are unavailable, adapting the decision head on clustered target embeddings may be safer than continuing full adversarial optimization.

4.2. Architecture, Behavior Classes, and Processing Pipeline

The architecture-level results showed that attention-based recurrent models produced the strongest transfer performance. GRU-Attention achieved the highest average Macro-F1 score, followed very closely by BiLSTM-Attention. This outcome is consistent with the sequential structure of IMU-based animal behavior data. Recurrent attention models can capture temporal dependencies and emphasize informative motion segments, which is particularly useful for rhythmic locomotor behaviors.
The weaker performance of Transformer and CNN1D can be interpreted in relation to the structure of the data. Transformer models generally require large and diverse datasets to learn stable global attention patterns, whereas CNN1D models are more limited in modeling long-range temporal dependencies. In contrast, GRU-Attention and BiLSTM-Attention provide a stronger inductive bias for medium-scale sequential sensor data. This explains why these architectures were more effective for cross-species transfer.
The behavior-level findings further support this interpretation. Trotting, Walking, and Stationary were recognized more reliably than Eating and Shaking. The better-performing classes have more stable temporal and biomechanical signatures, while Eating and Shaking are more variable, shorter in duration, or semantically overlapping with other behaviors. Eating may resemble low-mobility or head-down postures, and Shaking may be difficult to capture consistently within fixed windows. Therefore, transferability was not uniform across behaviors; it depended on temporal regularity, class frequency, and cross-species semantic consistency. Nevertheless, the operational ontology cannot completely eliminate sensor-level semantic mismatch. For example, dog Eating may co-occur with stationary posture or low head movement, whereas goat Eating often corresponds to sustained grazing-like head-down motion. This difference may partly explain the weaker and more variable Eating performance across transfer settings.
The ablation and preprocessing results also indicate that the final performance was produced by the complete pipeline rather than by a single component. Ontology harmonization reduced semantic mismatch between datasets. Noise cleaning removed ambiguous boundary samples. Class balancing improved minority behavior representation. PCA helped stabilize the feature space before adaptation. DANN then aligned source and target distributions in the learned representation space. Together, these components formed a coherent pipeline for improving cross-species transfer.

4.3. Implications and Explainability

The explainability results, summarized in Table 19, showed that the most influential features were related to gyroscope dynamics, zero-crossing behavior, acceleration magnitude, temporal variability, and movement intensity. The scenario-wise top five SHAP-ranked features across source–target transfer settings are provided in Supplementary Table S1. In particular, the frequent occurrence of Gz_zcr, Gx_zcr, Gy_zcr, and Gx_dom_ratio among the top-ranked SHAP features indicates that rotational transition patterns and dominant-frequency structures contributed strongly to cross-species behavioral discrimination.
The findings also have practical implications for animal monitoring systems. A model trained on one species can be partially transferred to another species when limited target labels are available. This can reduce annotation cost and support more scalable monitoring systems for animal welfare, livestock management, and comparative behavioral analysis. The strong performance of DANN under sparse supervision suggests that future systems do not need full target-domain annotation to become useful; carefully selected small target-label sets may be sufficient to guide adaptation.

4.4. Limitations

This study has several limitations. First, the experimental validation was limited to three animal species. Although subject-level partitioning prevented animal-level leakage, the goat dataset contained only five subjects, leaving one goat for validation and one goat for testing; therefore, goat-target transfer results should be interpreted cautiously and require confirmation on larger goat cohorts. Second, the datasets were collected in different original studies, and therefore differences in annotation protocol, animal population, recording context, and dataset balance may have affected transfer performance. Third, the dog dataset followed a multi-label structure, whereas the goat and horse datasets followed single-label structures, which made direct cross-species comparison more challenging. Relatedly, the six-class ontology intentionally reduced fine-grained behavioral specificity to create a shared cross-species label space; therefore, grouped behaviors such as playing, jumping, galloping, and running should not be interpreted as biologically identical across species. Fourth, the instability of fully unsupervised DANN was demonstrated only in the Dog → Horse BiLSTM-Attention stress-test setting; therefore, this result should be interpreted as evidence of potential negative transfer under severe domain shift rather than as a general conclusion for all transfer pairs and architectures. Fifth, the D-PST stage did not provide reliable improvement after DANN, suggesting that pseudo-label selection and confidence calibration require further methodological refinement. The ablation analysis was limited to major preprocessing and representation components in a single diagnostic transfer setting; additional sensitivity analyses for the BTSS weighting coefficient, GRL schedule, and focal-loss configuration should be performed in future work. The statistical analysis was based on matched model-stage comparisons rather than independent biological replicates. Therefore, the very strong Friedman and Wilcoxon results should be interpreted as evidence of consistent directional differences across the evaluated experimental matrix, not as proof of universally stable biological performance. Future work should report confidence intervals, effect sizes, repeated-seed variability, and broader replicate-based uncertainty estimates. In addition, the comparison with alternative domain adaptation methods was limited to a diagnostic Dog → Horse BiLSTM-Attention setting and did not constitute a full state-of-the-art benchmark across all transfer pairs and architectures. Therefore, future work should include broader comparisons with recent domain adaptation and self-supervised time-series representation methods, including margin disparity discrepancy (MDD), minimum class confusion (MCC), CORAL, maximum mean discrepancy (MMD)-based approaches, and modern self-supervised time-series encoders. The SHAP analysis was used only as a post-hoc feature-level interpretability tool and does not provide direct biological validation of the learned representations. Future work should include class-specific SHAP analysis, confusion matrices, error-case inspection, and broader hyperparameter sensitivity analyses to better assess the robustness of the reported performance gains. Finally, the proposed framework should be externally validated on additional species, sensor placements, and real-world deployment conditions before being considered a general-purpose animal behavior monitoring solution.
Overall, the results show that semi-supervised domain-adversarial representation learning can substantially improve cross-species behavioral transfer from wearable IMU data. The strongest performance was obtained when adversarial alignment was combined with sparse target supervision and attention-based recurrent feature extraction. These findings suggest that transferable locomotor representations can be learned across heterogeneous animal species, provided that semantic label harmonization, imbalance-aware preprocessing, and adaptation stability are carefully addressed.

5. Conclusions

This study presented a semi-supervised cross-species behavioral representation learning framework for transferable animal activity recognition using wearable IMU data from dogs, goats, and horses. The proposed approach combined behavioral ontology harmonization, imbalance-aware preprocessing, PCA-based representation stabilization, temporal deep feature extraction, and domain-adversarial adaptation within a unified learning pipeline. The main objective was to determine whether shared locomotor structures could be learned across anatomically and behaviorally heterogeneous species while reducing dependence on large-scale labeled target datasets.
The experimental results demonstrated that domain-adversarial adaptation substantially improved cross-species transfer performance. Across the evaluated transfer settings, the average Macro-F1 score increased from 0.345 in the direct transfer learning phase to 0.711 in the DANN phase. Attention-based recurrent architectures achieved the strongest performance, with GRU-Attention and BiLSTM-Attention outperforming Transformer and CNN1D models. The highest transfer performance was obtained in the Goat → Horse setting, suggesting that behavioral transfer is more effective when target and source domains share compatible locomotor structures and annotation schemes. Behavior-level results further showed that rhythmic and temporally stable behaviors, such as Trotting, Walking, and Stationary, were more transferable than short-duration or semantically overlapping behaviors.
The Dog → Horse BiLSTM-Attention stress-test analysis showed that fully unsupervised adversarial adaptation may become unstable under severe inter-species domain shift. In this setting, the absence of target supervision reduced Macro-F1 to 0.03, whereas a very small target-label contribution increased Macro-F1 to 0.63. Therefore, this result is interpreted as evidence of a potential negative-transfer risk rather than as a universal conclusion for all transfer pairs and architectures. K-Means Head Adaptation provided a more stable but limited mitigation strategy in the same unsupervised setting. Broader evaluation of fully unsupervised DANN across all transfer directions and model architectures remains an important direction for future work.
Overall, the findings support the feasibility of learning biologically meaningful and transferable behavioral representations from wearable sensor data across animal species. The proposed framework offers a scalable direction for animal behavior monitoring systems by reducing the need for extensive species-specific annotation and model redesign. Future work should extend the framework to additional species, sensor placements, and real-world deployment conditions. Further improvements may also be achieved by integrating confidence-aware pseudo-labeling, adaptive ontology refinement, stronger target-domain calibration, and multimodal sensing sources such as video, GPS, or physiological signals.
The results should therefore be interpreted as evidence for semi-supervised cross-species transferability under controlled public-dataset conditions, rather than as proof of fully unsupervised generalization across all animal species and sensing environments.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/biomimetics11070496/s1, Figure S1: Raw-label-level JSD distance matrix between dog and goat behavior labels; Figure S2: Raw-label-level JSD distance matrix between dog and horse behavior labels; Figure S3: Raw-label-level JSD distance matrix between goat and horse behavior labels; Figure S4: Unified ontology-class-level mean JSD distance matrix for the Dog → Goat transfer setting; Figure S5: Unified ontology-class-level mean JSD distance matrix for the Dog → Horse transfer setting; Figure S6: Unified ontology-class-level mean JSD distance matrix for the Goat → Horse transfer setting; Table S1: Scenario-wise top five SHAP-ranked features across source–target transfer settings.

Author Contributions

Conceptualization, Ç.İ.A. and F.S.; methodology, Ç.İ.A. and F.S.; software, F.S.; validation, Ç.İ.A., F.S. and E.A.Z.; formal analysis, F.S.; investigation, F.S.; resources, F.S.; data curation, F.S.; writing—original draft preparation, F.S. and Ç.İ.A.; writing—review and editing, Ç.İ.A. and E.A.Z.; visualization, F.S.; supervision, Ç.İ.A. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable. This study used previously published publicly available datasets and did not involve new animal experiments.

Informed Consent Statement

Not applicable.

Data Availability Statement

The datasets analyzed in this study are publicly available through the original studies. The dog dataset is available through Kumpulainen et al. [11], https://doi.org/10.1016/j.applanim.2021.105393. The goat dataset is available through Kamminga et al. [34], https://doi.org/10.1145/3191747. The horse dataset is available through Kamminga et al. [12], https://doi.org/10.3390/data4040131. No new animal dataset was generated during this study. Processed data tables, ontology mappings, and experimental outputs are available from the corresponding author upon reasonable request.

Acknowledgments

During the preparation of this manuscript, the authors used generative artificial intelligence tools only for English language editing and visual enhancement of figures. The authors reviewed and edited all AI-assisted outputs and take full responsibility for the content of this publication.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
BCEBinary Cross-Entropy
BiLSTMBidirectional Long Short-Term Memory
BTSSBehavioral Transferability Similarity Score
CDANConditional Domain Adversarial Network
CECategorical Cross-Entropy
CKSPCross-Species Knowledge Sharing and Preserving
CNNConvolutional Neural Network
CNN1DOne-Dimensional Convolutional Neural Network
CORALCORrelation ALignment
cWGAN-GPConditional Wasserstein Generative Adversarial Network with Gradient Penalty
DANNDomain-Adversarial Neural Network
D-PSTDynamic Pseudo Self-Training
ENNEdited Nearest Neighbors
GANGenerative Adversarial Network
GRLGradient Reversal Layer
GRUGated Recurrent Unit
IMUInertial Measurement Unit
JSDJensen–Shannon Divergence
KLKullback–Leibler
LRLogistic Regression
LSTMLong Short-Term Memory
MCCMinimum Class Confusion
MDDMargin Disparity Discrepancy
MLSMOTEMLSMOTE
MMDMaximum Mean Discrepancy
PA-DANNPseudo-label-Assisted Domain-Adversarial Neural Network
PCAPrincipal Component Analysis
p.p.percentage points
PR-AUCPrecision–Recall Area Under the Curve
ROC-AUCReceiver Operating Characteristic Area Under the Curve
SHAPSHapley Additive exPlanations
SRPSparse Random Projection
TLTransfer Learning
w t g t   Target supervision coefficient

References

  1. Riaboff, L.; Shalloo, L.; Smeaton, A.F.; Couvreur, S.; Madouasse, A.; Keane, M.T. Predicting Livestock Behaviour Using Accelerometers: A Systematic Review of Processing Techniques for Ruminant Behaviour Prediction from Raw Accelerometer Data. Comput. Electron. Agric. 2022, 192, 106610. [Google Scholar] [CrossRef]
  2. Mao, A.; Huang, E.; Wang, X.; Liu, K. Deep Learning-Based Animal Activity Recognition with Wearable Sensors: Overview, Challenges, and Future Directions. Comput. Electron. Agric. 2023, 211, 108043. [Google Scholar] [CrossRef]
  3. Hernández, G.; González-Sánchez, C.; González-Arrieta, A.; Sánchez-Brizuela, G.; Fraile, J.-C. Machine Learning-Based Prediction of Cattle Activity Using Sensor-Based Data. Sensors 2024, 24, 3157. [Google Scholar] [CrossRef] [PubMed]
  4. Ismail Fawaz, H.; Forestier, G.; Weber, J.; Idoumghar, L.; Muller, P.-A. Deep Learning for Time Series Classification: A Review. Data Min. Knowl. Disc. 2019, 33, 917–963. [Google Scholar] [CrossRef]
  5. Wang, L.; Arablouei, R.; Alvarenga, F.A.P.; Bishop-Hurley, G.J. Classifying Animal Behavior from Accelerometry Data via Recurrent Neural Networks. Comput. Electron. Agric. 2023, 206, 107647. [Google Scholar] [CrossRef]
  6. Li, J.; Wei, R.; Xie, Q.; Wu, C.; Kim, Y.H. Prediction of Three-Dimensional Ground Reaction Forces in the Golf Swing Using Wearable Inertial Measurement Units and Biomimetic Deep Learning Models. Biomimetics 2026, 11, 159. [Google Scholar] [CrossRef] [PubMed]
  7. Mansbridge, N.; Mitsch, J.; Bollard, N.; Ellis, K.; Miguel-Pacheco, G.G.; Dottorini, T.; Kaler, J. Feature Selection and Comparison of Machine Learning Algorithms in Classification of Grazing and Rumination Behaviour in Sheep. Sensors 2018, 18, 3532. [Google Scholar] [CrossRef] [PubMed]
  8. Walton, E.; Casey, C.; Mitsch, J.; Vázquez-Diosdado, J.A.; Yan, J.; Dottorini, T.; Ellis, K.A.; Winterlich, A.; Kaler, J. Evaluation of Sampling Frequency, Window Size and Sensor Position for Classification of Sheep Behaviour. R. Soc. Open Sci. 2018, 5, 171442. [Google Scholar] [CrossRef] [PubMed]
  9. González, S.; Sedano, J.; Villar, J.R.; Corchado, E.; Herrero, Á.; Baruque, B. Features and Models for Human Activity Recognition. Neurocomputing 2015, 167, 52–60. [Google Scholar] [CrossRef]
  10. Hollevoet, A.; De Waele, T.; Peralta, D.; Tuyttens, F.; De Poorter, E.; Shahid, A. Goats on the Move: Evaluating Machine Learning Models for Goat Activity Analysis Using Accelerometer Data. Animals 2024, 14, 1977. [Google Scholar] [CrossRef] [PubMed]
  11. Kumpulainen, P.; Cardó, A.V.; Somppi, S.; Törnqvist, H.; Väätäjä, H.; Majaranta, P.; Gizatdinova, Y.; Hoog Antink, C.; Surakka, V.; Kujala, M.V.; et al. Dog Behaviour Classification with Movement Sensors Placed on the Harness and the Collar. Appl. Anim. Behav. Sci. 2021, 241, 105393. [Google Scholar] [CrossRef]
  12. Kamminga, J.W.; Janßen, L.M.; Meratnia, N.; Havinga, P.J.M. Horsing Around—A Dataset Comprising Horse Movement. Data 2019, 4, 131. [Google Scholar] [CrossRef]
  13. Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
  14. Cho, K.; van Merrienboer, B.; Gulcehre, C.; Bahdanau, D.; Bougares, F.; Schwenk, H.; Bengio, Y. Learning Phrase Representations Using RNN Encoder-Decoder for Statistical Machine Translation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar, 25–29 October 2014. [Google Scholar]
  15. Hussain, A.; Ali, S.; Abdullah; Kim, H.-C. Activity Detection for the Wellbeing of Dogs Using Wearable Sensors Based on Deep Learning. IEEE Access 2022, 10, 53153–53163. [Google Scholar] [CrossRef]
  16. Suh, S.; Rey, V.F.; Lukowicz, P. TASKED: Transformer-Based Adversarial Learning for Human Activity Recognition Using Wearable Sensors via Self-KnowledgE Distillation. Knowl.-Based Syst. 2023, 260, 110143. [Google Scholar] [CrossRef]
  17. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention Is All You Need. In Proceedings of the Advances in Neural Information Processing Systems; Curran Associates, Inc.: New York, NY, USA, 2017; Volume 30. [Google Scholar]
  18. Sakai, K.; Oishi, K.; Miwa, M.; Kumagai, H.; Hirooka, H. Behavior Classification of Goats Using 9-Axis Multi Sensors: The Effect of Imbalanced Datasets on Classification Performance. Comput. Electron. Agric. 2019, 166, 105027. [Google Scholar] [CrossRef]
  19. Dehghani, A.; Glatard, T.; Shihab, E. Subject Cross Validation in Human Activity Recognition. Available online: https://arxiv.org/abs/1904.02666v2 (accessed on 17 May 2026).
  20. Arablouei, R.; Bishop-Hurley, G.J.; Bagnall, N.; Ingham, A. Cattle Behavior Recognition from Accelerometer Data: Leveraging in-Situ Cross-Device Model Learning. Comput. Electron. Agric. 2024, 227, 109546. [Google Scholar] [CrossRef]
  21. Mo, L.; Zhu, Y.; Zeng, L. A Multi-Label Based Physical Activity Recognition via Cascade Classifier. Sensors 2023, 23, 2593. [Google Scholar] [CrossRef] [PubMed]
  22. Ganin, Y.; Lempitsky, V. Unsupervised Domain Adaptation by Backpropagation. In Proceedings of the 32nd International Conference on Machine Learning; PMLR: New York, NY, USA, 2015; pp. 1180–1189. [Google Scholar]
  23. Ahn, S.-H.; Kim, S.; Jeong, D.-H. Unsupervised Domain Adaptation for Mitigating Sensor Variability and Interspecies Heterogeneity in Animal Activity Recognition. Animals 2023, 13, 3276. [Google Scholar] [CrossRef] [PubMed]
  24. Long, M.; Cao, Z.; Wang, J.; Jordan, M. Conditional Adversarial Domain Adaptation. In Proceedings of the Advances in Neural Information Processing Systems; Curran Associates, Inc.: New York, NY, USA, 2018; Volume 31. [Google Scholar]
  25. Lee, J.; Chae, H.; Son, S.; Seo, J.; Suh, Y.; Lee, J.; Chung, Y.; Park, D. Sustainable Self-Training Pig Detection System with Augmented Single Labeled Target Data for Solving Domain Shift Problem. Sensors 2025, 25, 3406. [Google Scholar] [CrossRef] [PubMed]
  26. Mao, A.; Huang, E.; Gan, H.; Liu, K. FedAAR: A Novel Federated Learning Framework for Animal Activity Recognition with Wearable Sensors. Animals 2022, 12, 2142. [Google Scholar] [CrossRef] [PubMed]
  27. Mariani, G.; Scheidegger, F.; Istrate, R.; Bekas, C.; Malossi, C. BAGAN: Data Augmentation with Balancing GAN. Available online: https://arxiv.org/abs/1803.09655v2 (accessed on 17 May 2026).
  28. Gulrajani, I.; Ahmed, F.; Arjovsky, M.; Dumoulin, V.; Courville, A. Improved Training of Wasserstein GANs. In Proceedings of the Advances in Neural Information Processing Systems; Curran Associates, Inc.: New York, NY, USA, 2017; Volume 30. [Google Scholar]
  29. Charte, F.; Rivera, A.J.; del Jesus, M.J.; Herrera, F. MLSMOTE: Approaching Imbalanced Multilabel Learning through Synthetic Instance Generation. Knowl.-Based Syst. 2015, 89, 385–397. [Google Scholar] [CrossRef]
  30. Chawla, N.V.; Bowyer, K.W.; Hall, L.O.; Kegelmeyer, W.P. SMOTE: Synthetic Minority over-Sampling Technique. J. Artif. Int. Res. 2002, 16, 321–357. [Google Scholar] [CrossRef]
  31. Li, J.; Yang, Y.; Chen, Y.; Zhang, J.; Lai, Z.; Pan, L. DWLR: Domain Adaptation under Label Shift for Wearable Sensor. In Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence, Jeju Island, Republic of Korea, 3–9 August 2024; Guide Proceedings. pp. 4425–4433. [Google Scholar]
  32. Zhou, S.; Li, W.; Zhou, M.; Dilger, R.N.; Condotta, I.C.F.S.; Wu, Z.; Tang, X.; Wu, Y.; Wang, T.; Li, J. Foundations of Livestock Behavioral Recognition: Ethogram Analysis of Behavioral Definitions and Its Practices in Multimodal Large Language Models. Animals 2025, 15, 3030. [Google Scholar] [CrossRef] [PubMed]
  33. Mao, A.; Zhu, M.; Guo, Z.; He, Z.; Norton, T.; Liu, K. CKSP: Cross-Species Knowledge Sharing and Preserving for Universal Animal Activity Recognition. Biosyst. Eng. 2025, 259, 104303. [Google Scholar] [CrossRef]
  34. Kamminga, J.W.; Le, D.V.; Meijers, J.P.; Bisby, H.; Meratnia, N.; Havinga, P.J.M. Robust Sensor-Orientation-Independent Feature Selection for Animal Activity Recognition on Collar Tags. In Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies, Singapore, 8–12 October 2018; Volume 2, pp. 1–27. [Google Scholar] [CrossRef]
  35. Lin, J. Divergence Measures Based on the Shannon Entropy. IEEE Trans. Inf. Theory 1991, 37, 145–151. [Google Scholar] [CrossRef]
  36. Endres, D.M.; Schindelin, J.E. A New Metric for Probability Distributions. IEEE Trans. Inf. Theory 2003, 49, 1858–1860. [Google Scholar] [CrossRef]
  37. Batista, G.E.A.P.A.; Prati, R.C.; Monard, M.C. A Study of the Behavior of Several Methods for Balancing Machine Learning Training Data. SIGKDD Explor. Newsl. 2004, 6, 20–29. [Google Scholar] [CrossRef]
  38. Pereira, R.M.; Costa, Y.M.G.; Silla, C.N., Jr. MLTL: A Multi-Label Approach for the Tomek Link Undersampling Algorithm. Neurocomputing 2020, 383, 95–105. [Google Scholar] [CrossRef]
  39. Mirza, M.; Osindero, S. Conditional Generative Adversarial Nets. Available online: https://arxiv.org/abs/1411.1784v1 (accessed on 17 May 2026).
  40. Jolliffe, I. Principal Component Analysis. In International Encyclopedia of Statistical Science; Springer: Berlin/Heidelberg, Germany, 2011; pp. 1094–1096. [Google Scholar]
  41. Schuster, M.; Paliwal, K.K. Bidirectional Recurrent Neural Networks. IEEE Trans. Signal Process. 1997, 45, 2673–2681. [Google Scholar] [CrossRef]
  42. LeCun, Y.; Boser, B.; Denker, J.S.; Henderson, D.; Howard, R.E.; Hubbard, W.; Jackel, L.D. Backpropagation Applied to Handwritten Zip Code Recognition. Neural Comput. 1989, 1, 541–551. [Google Scholar] [CrossRef]
  43. Pan, Z.; Chen, H.; Zhong, W.; Wang, A.; Zheng, C. A CNN-Based Animal Behavior Recognition Algorithm for Wearable Devices. IEEE Sens. J. 2023, 23, 5156–5164. [Google Scholar] [CrossRef]
  44. Arazo, E.; Ortego, D.; Albert, P.; O’Connor, N.E.; McGuinness, K. Pseudo-Labeling and Confirmation Bias in Deep Semi-Supervised Learning. In Proceedings of the 2020 International Joint Conference on Neural Networks (IJCNN); IEEE: New York, NY, USA, 2020; pp. 1–8. [Google Scholar]
  45. Ahmed, M.; Seraj, R.; Islam, S.M.S. The K-Means Algorithm: A Comprehensive Survey and Performance Evaluation. Electronics 2020, 9, 1295. [Google Scholar] [CrossRef]
  46. Sokolova, M.; Lapalme, G. A Systematic Analysis of Performance Measures for Classification Tasks. Inf. Process. Manag. 2009, 45, 427–437. [Google Scholar] [CrossRef]
  47. Rousseeuw, P.J. Silhouettes: A Graphical Aid to the Interpretation and Validation of Cluster Analysis. J. Comput. Appl. Math. 1987, 20, 53–65. [Google Scholar] [CrossRef]
  48. Wilcoxon, F. Individual Comparisons by Ranking Methods. In Breakthroughs in Statistics: Methodology and Distribution; Kotz, S., Johnson, N.L., Eds.; Springer: New York, NY, USA, 1992; pp. 196–202. [Google Scholar]
  49. Friedman, M. The Use of Ranks to Avoid the Assumption of Normality Implicit in the Analysis of Variance. J. Am. Stat. Assoc. 1937, 32, 675–701. [Google Scholar] [CrossRef]
  50. Nemenyi, P.B. Distribution-Free Multiple Comparisons. Ph.D. Thesis, Princeton University, Princeton, NJ, USA, 1963. [Google Scholar]
Figure 1. Overall architecture of the proposed cross-species behavioral representation learning framework. The pipeline begins with public dog, goat, and horse IMU datasets, followed by BTSS-based ontology harmonization, subject-wise partitioning, training-set-only preprocessing, dual-head temporal representation learning, domain-adversarial adaptation, and evaluation on unchanged target test partitions.
Figure 1. Overall architecture of the proposed cross-species behavioral representation learning framework. The pipeline begins with public dog, goat, and horse IMU datasets, followed by BTSS-based ontology harmonization, subject-wise partitioning, training-set-only preprocessing, dual-head temporal representation learning, domain-adversarial adaptation, and evaluation on unchanged target test partitions.
Biomimetics 11 00496 g001
Figure 2. Hybrid dual-head classification mechanism for heterogeneous annotation structures.
Figure 2. Hybrid dual-head classification mechanism for heterogeneous annotation structures.
Biomimetics 11 00496 g002
Figure 3. Evolution of representation spaces across preprocessing stages.
Figure 3. Evolution of representation spaces across preprocessing stages.
Biomimetics 11 00496 g003
Figure 4. Source–target pair-based comparison of TL, DANN, and D-PST phases.
Figure 4. Source–target pair-based comparison of TL, DANN, and D-PST phases.
Biomimetics 11 00496 g004
Figure 5. PR-AUC comparison of model performance under class imbalance.
Figure 5. PR-AUC comparison of model performance under class imbalance.
Biomimetics 11 00496 g005
Figure 6. Behavior-level F1-score distribution in the DANN phase.
Figure 6. Behavior-level F1-score distribution in the DANN phase.
Biomimetics 11 00496 g006
Figure 7. Confusion matrix for the representative Dog → Horse transfer scenario under DANN using the BiLSTM-Attention backbone.
Figure 7. Confusion matrix for the representative Dog → Horse transfer scenario under DANN using the BiLSTM-Attention backbone.
Biomimetics 11 00496 g007
Table 1. Technical characteristics of the datasets used in the study.
Table 1. Technical characteristics of the datasets used in the study.
CharacteristicDog Dataset *Goat DatasetHorse Dataset
ReferenceKumpulainen et al. [11] Kamminga et al. [34]Kamminga et al. [12]
Number of subjects45 dogs from 27 breeds5 goats, including 3 Pygmy and 2 larger goats18 animals, including horses and ponies
Sensor deviceActiGraph GT9X LinkProMove-mini, Inertia Tech.Gulf Coast Data Concepts HAM
Sensor placementNeckNeckNeck
Sensor modalityTri-axial accelerometer and gyroscopeTri-axial accelerometer and gyroscopeTri-axial accelerometer and gyroscope
Recorded sensor channelsANeck_x, ANeck_y, ANeck_z, GNeck_x, GNeck_y, GNeck_zANeck_x, ANeck_y, ANeck_z, GNeck_x, GNeck_y, GNeck_zANeck_x, ANeck_y, ANeck_z, GNeck_x, GNeck_y, GNeck_z
Sampling frequency100 Hz100 Hz100 Hz
Classification settingMulti-label classificationSingle-label
multi-class classification
Single-label
multi-class classification
* In the dog dataset, each sample may be associated with multiple behavior annotations, whereas the goat and horse datasets assign a single behavior class to each sample.
Table 2. Unified six-class behavior ontology and mapping of original dataset labels.
Table 2. Unified six-class behavior ontology and mapping of original dataset labels.
Unified Target ClassMapped Original LabelsOperational Definition
Eating
(feeding-related behavior)
Eating, drinking, breastfeeding, grazingFeeding- or drinking-related behaviors characterized by repetitive head-down movements during food or water intake, including grazing and nursing-related activity.
Shaking
(grooming-like behavior)
Shaking, headshake, scratch biting Rapid whole-body or head movements associated with shaking, irritation relief, grooming-like scratching, or biting-related self-directed actions.
Stationary
(postural behavior)
Standing, sitting, panting, rubbing, scared, lying chest, lyingLow-mobility postural states in which the animal remains largely stationary, including standing, sitting, lying, and other non-locomotor behaviors.
Walking
(low-intensity locomotion)
Walking, walking-natural, walking-rider, pacing, sniffing, carrying object, synchronizationLow-speed locomotion involving regular forward movement, including natural or ridden walking and slow exploratory or socially synchronized movement.
Trotting
(moderate-intensity locomotion)
Trotting, trotting-natural, trotting-rider, climbing up, climbing downA moderate-speed rhythmic locomotion pattern, faster than walking but slower than running, including diagonal gait patterns and inclined movement.
Running
(high-intensity locomotion)
Galloping, running, galloping-natural, galloping-rider, jumping, playingHigh-speed or high-intensity locomotor activity involving rapid acceleration, asymmetric gait patterns, jumping, galloping, or play-related explosive movement.
Table 3. Window-level class distribution after ontology harmonization.
Table 3. Window-level class distribution after ontology harmonization.
Unified ClassDatasetRaw Sample Count *Raw Proportion (%)Windowed Segment CountWindowed Proportion (%)Change (p.p.)
Eating Dog377,4804.6287,2335.8+1.2
Shaking42,0470.536,7370.7+0.2
Stationary 4,755,74058.22,274,01845.7−12.5
Walking764,5409.4637,49112.8+3.4
Trotting2,013,96024.61,579,09031.7+7.1
Running216,6742.7162,9093.3+0.6
Total 8,170,441 100.04,977,478100.0
Eating Goat23,854,91136.42,177,16328.7−7.7
Shaking564,9360.9356,3134.7+3.8
Stationary 26,058,81839.82,254,19029.8−10.0
Walking1,430,7792.21,014,16313.4+11.2
Trotting12,801,50619.51,130,16414.9−4.6
Running794,4191.2643,0638.5+7.3
Total65,505,369100.07,575,056100.0
Eating Horse2,086,56719.5176,85210.2−9.3
Shaking156,1391.5100,5975.8+4.3
Stationary 623,8235.8533,17430.6+24.8
Walking2,910,08827.3242,91614.0−13.3
Trotting4,435,75441.5365,61321.0−20.5
Running464,2044.3321,35918.5+14.2
Total10,676,575100.01,740,511100.0
* Raw sample count refers to the number of time-point-level sensor observations before windowing, whereas windowed segment count refers to the number of samples obtained after temporal segmentation. Change is reported in percentage points, calculated as the difference between the windowed and raw class proportions. For the dog dataset, which is multi-label, the class counts refer to behavior-label assignments rather than mutually exclusive class instances.
Table 4. Exact subject-level train/validation/test allocation.
Table 4. Exact subject-level train/validation/test allocation.
DatasetTotal SubjectsTraining
Subjects
Validation SubjectsTest Subjects
Dog453177
Goat5311
Horse181233
Table 5. Data-cleaning statistics after ENN and Tomek Links filtering.
Table 5. Data-cleaning statistics after ENN and Tomek Links filtering.
DatasetInitial Training
Windows
Removed Training Windows *Final Training WindowsRemoval Rate (%)
Dog4,960,199706,5004,253,69914.2
Goat4,158,772301,3453,857,4277.2
Horse1,265,70667521,258,9540.5
* Removed training windows refer to samples excluded through the sequential application of Sparse Random Projection (SRP)-assisted Mahalanobis outlier detection, Edited Nearest Neighbors, and Tomek Links. The test set was not subjected to this cleaning procedure in order to preserve an unbiased evaluation protocol.
Table 6. Common training configuration and hyperparameters used across all models.
Table 6. Common training configuration and hyperparameters used across all models.
ComponentHyperparameterSetting
OptimizationOptimizerAdamW for Transfer Learning (TL); Adam for DANN and D-PST
Learning rate5 × 10−4 for TL; 1 × 10−4 for DANN; 1 × 10−5 for D-PST
Learning-rate scheduleLinear warm-up for TL, followed by cosine annealing in all stages
Training setupBatch size128
Maximum epochs120 for TL; 60 for DANN; 10 for D-PST
Early stopping patience20 for TL; 7 for DANN; 7 for D-PST
RegularizationDropout rate0.5
Weight decay5 × 10−4 for TL
Gradient clippingmax_norm = 1.0
Input noiseGaussian noise with σ = 0.3 during TL
Loss configurationLabel smoothingε = 0.05 for source BCE
Focal-loss parameter γ B C E = 2.0; γ C E = 1.5
Entropy weightw_ent = 0.01
Rare-class loss weightw_rare = 0.5
BTSS weightingTransferability coefficientα = 0.7
Table 7. Dual-head source–target transfer scenarios.
Table 7. Dual-head source–target transfer scenarios.
Transfer SettingSource → Target PairSource HeadTarget Head
Multi-label to single-label multi-classDog → Goat;
Dog → Horse
Sigmoid + focal BCESoftmax + focal CE
Single-label multi-class to multi-labelGoat → Dog;
Horse → Dog
Softmax + focal CESigmoid + focal BCE
Single-label multi-class to single-label multi-classGoat → Horse;
Horse → Goat
Softmax + focal CESoftmax + focal CE
Table 8. Experimental matrix of source–target transfer directions.
Table 8. Experimental matrix of source–target transfer directions.
Source DomainTarget DomainTransfer Direction *
DogGoatMulti-label to single-label multi-class
DogHorseMulti-label to single-label multi-class
GoatDogSingle-label multi-class to multi-label
GoatHorseSingle-label multi-class to single-label multi-class
HorseDogSingle-label multi-class to multi-label
HorseGoatSingle-label multi-class to single-label multi-class
* All source–target transfer settings were evaluated using four backbone architectures: BiLSTM-Attention, GRU-Attention, CNN1D, and Transformer. Each model was trained and evaluated across three sequential stages: TL, DANN, and D-PST. Accordingly, the experimental matrix comprised six transfer directions, four model architectures, and three training stages, yielding 72 model-stage evaluations in total.
Table 9. Final training-set class distribution after class balancing.
Table 9. Final training-set class distribution after class balancing.
DatasetBalancing StrategyFinal Training WindowsTarget SizeEatingShakingStationaryWalkingTrottingRunningMax/Min Ratio
Dog *Proto-selection + MLSMOTE + ENN992,522376,974 per label155,28839,318412,885324,887161,63695,47410.5:1
GoatcWGAN-GP + K-Meansapproximately 3,315,000593,045593,045384,661593,045558,156593,045593,0451.5:1
HorseENN + cWGAN-GP + K-Means824,887163,86993,501109,243163,869163,869130,536163,8691.8:1
* For the dog dataset, class counts indicate label-level assignments because the dataset is multi-label. Therefore, class counts do not sum to the number of final training windows. For the goat and horse datasets, which follow a single-label multi-class setting, class counts correspond to mutually exclusive class instances. The max/min ratio was calculated using the largest and smallest class counts after balancing.
Table 10. PCA strategy and representation-space evaluation.
Table 10. PCA strategy and representation-space evaluation.
PCA Fitting StrategyRetained ComponentsMean Transfer Macro-F1, Logistic Regression (LR), Six PairsTL OnlyDANN, UnsupervisedK-Means HeadDANN, Semi-Supervised
Dog-fitted PCA590.2650.330.030.400.72
Goat-fitted PCA610.307 *0.310.140.320.80
Horse-fitted PCA610.301
Joint PCA620.263
* Bold values indicate the best result within each comparison.
Table 11. Representation-space quality across the data processing pipeline.
Table 11. Representation-space quality across the data processing pipeline.
Representation StageDimensionalityDomain SilhouetteBehavior SilhouetteSeparation Ratio
Raw IMU signals60.258−0.1081.563
Statistical features980.0280.0110.691
PCA-transformed features590.0620.0630.670
TL embedding5120.0100.233 *0.623
DANN embedding5120.0520.1930.588
* Bold values indicate the most favorable value for each metric.
Table 12. Phase-level average performance across TL, DANN, and D-PST.
Table 12. Phase-level average performance across TL, DANN, and D-PST.
Training StageMean Macro-F1Mean Accuracy
TL0.3450.490
DANN0.711 *0.846
DANN + D-PST0.6430.790
* Bold values indicate the best-performing stage.
Table 13. Source–target pair-based DANN performance averaged across model architectures.
Table 13. Source–target pair-based DANN performance averaged across model architectures.
Source → TargetMean Macro-F1AccuracyROC-AUCPR-AUC
Dog → Goat0.7150.8840.9620.731
Dog → Horse0.7140.8340.9480.745
Goat → Dog0.6450.7980.9240.634
Goat → Horse0.7470.8630.9570.781
Horse → Dog0.6410.8090.9300.633
Horse → Goat0.7130.8860.9640.748
Values represent the mean performance of the DANN stage across the evaluated model architectures. Bold values indicate the best result for each metric. To further clarify the effect of heterogeneous label structures, transfer settings were descriptively grouped according to the target-domain annotation format. Single-label-to-single-label transfers, namely Goat → Horse and Horse → Goat, achieved a mean Macro-F1 of 0.730. Transfers targeting the multi-label dog dataset, namely Goat → Dog and Horse → Dog, achieved a lower mean Macro-F1 of 0.643. Dog-source transfers to single-label targets, namely Dog → Goat and Dog → Horse, achieved a mean Macro-F1 of 0.715. This pattern suggests that the main label-structure difficulty occurred when the target domain followed a multi-label annotation scheme. However, this comparison should be interpreted as a descriptive group-level analysis rather than as a fully controlled relabeling ablation.
Table 14. Model-architecture performance comparison with PR-AUC emphasized under class imbalance.
Table 14. Model-architecture performance comparison with PR-AUC emphasized under class imbalance.
Model ArchitectureMean Macro-F1AccuracyROC-AUCPR-AUC
BiLSTM-Attention0.7360.8620.9580.739
GRU-Attention0.7370.8690.9550.740
CNN1D0.6950.8230.9460.715
Transformer0.6740.8160.9300.654
The difference between GRU-Attention and BiLSTM-Attention was negligible, whereas both recurrent attention-based models clearly outperformed CNN1D and Transformer in Macro-F1. Therefore, the main architectural conclusion is not that one recurrent model is dominant, but that attention-based recurrent temporal modeling is more suitable for transferable IMU representations in this setting.
Table 15. Behavior-level DANN performance summary.
Table 15. Behavior-level DANN performance summary.
Unified Target ClassMean Class F1F1 RangeHigh-Performing Transfer Cases, F1 > 0.90
Eating 0.6550.034–0.899None
Shaking 0.3930.108–0.665None
Stationary 0.8280.541–0.923Dog → Goat, BiLSTM, 0.913; Horse → Goat, CNN1D, 0.911; Horse → Goat, GRU, 0.902
Walking 0.7900.032–0.922Dog → Goat, GRU, 0.917; Dog → Horse, GRU, 0.908;
Goat → Horse, BiLSTM, 0.906; Goat → Horse, GRU, 0.901
Trotting 0.7420.381–0.920Goat → Horse, GRU, 0.920; Goat → Horse, BiLSTM, 0.912
Running 0.4480.106–0.655None
Table 16. Sparse target-supervision and unsupervised adaptation ablation in the Dog → Horse scenario using BiLSTM-Attention.
Table 16. Sparse target-supervision and unsupervised adaptation ablation in the Dog → Horse scenario using BiLSTM-Attention.
AnalysisMethod/Setting w t g t Macro-F1Accuracy
Target-supervision ablationDANN, unsupervised0.000.030.20
DANN, sparse supervision0.010.63
DANN, low supervision0.10≈0.70
DANN, semi-supervised0.200.720.85
DANN, full target signal1.000.74 *0.86
Unsupervised comparisonTL only, zero-shot0.000.33
Nearest centroid head0.000.39
K-Means head adaptation0.000.40
CORAL feature alignment0.000.330.45
* The unsupervised comparison includes only the strongest non-DANN baselines. The K-Means head adaptation result should be interpreted as a partial mitigation of negative transfer under fully unsupervised conditions, not as a replacement for semi-supervised DANN. Bold values indicate the best result within each analysis group.
Table 17. Statistical validation of training-stage and model-architecture effects.
Table 17. Statistical validation of training-stage and model-architecture effects.
Analysis FactorComparisonStatistical TestTest Statisticp-ValueEffect SizeMacro-F1 Difference95%
Bootstrap CI
Interpretation
Training stageTL vs. DANN vs. D-PSTFriedmanχ2 = 46.08;
Kendall’s W = 0.96
9.84 × 10−11
< 0.001
Kendall’s W = 0.96+0.351 (max gap, DANN−TL)[+0.324, +0.377]Significant stage effect
Training stageDANN − TLWilcoxon signed-rank *W = 0.0 for all comparisons1.19 × 10−7
< 0.001
r_rb =1.00+0.351[+0.324, +0.377]All stage pairs differed significantly
Training stageDANN − D-PSTWilcoxon signed-rank *W = 2.0≤ 0.0015r_rb = 0.987 (23/1)+0.053[+0.027, +0.087]TL, DANN, and D-PST differed significantly
Training stageD-PST − TLWilcoxon signed-rank *W = 0.01.19 × 10−7
≤ 0.001
r_rb =1.00+0.297[+0.259, +0.334]D -PST significantly improves over the TL baseline
Model architectureFour architecturesFriedmanχ2 = 11.800.0081
≤ 0.01
Kendall’s W = 0.66+0.063[+0.034, +0.098]Significant architecture effect
Model architecture, post hocRecurrent attention models vs. Transformer/CNN1DNemenyiΔrank = 2.170.037 / 0.279r_rb = 1.00+0.062[+0.035, +0.091]Recurrent attention models differed from Transformer, but not from CNN1D
* The Wilcoxon signed-rank tests were conducted over 24 paired experiments. Significance was assessed at α = 0.05.
Table 18. Component-level ablation analysis of the preprocessing and representation pipeline in the Dog → Horse transfer setting using BiLSTM-Attention under semi-supervised DANN.
Table 18. Component-level ablation analysis of the preprocessing and representation pipeline in the Dog → Horse transfer setting using BiLSTM-Attention under semi-supervised DANN.
ScenarioConfigurationRemoved ComponentMacro-F1 Δ Macro-F1
S0Full pipelineNone0.711
S1Without class balancingClass balancing0.469−0.241
S2Without shared PCAShared PCA transformation0.439−0.272
S3Without training-set cleaningTraining-set cleaning0.586−0.124
S4Without minority-window reinforcementMinority-window reinforcement0.519−0.191
Table 19. Overall SHAP feature importance and cross-scenario stability across 24 transfer settings.
Table 19. Overall SHAP feature importance and cross-scenario stability across 24 transfer settings.
RankFeatureFeature TypeMean SHAP ImportanceStandard DeviationTop-5 Occurrence, n/24
1Gz_zcrGyroscope, zero-crossing rate1.0160.43621
2Gx_zcrGyroscope, zero-crossing rate0.9900.42221
3Gx_dom_ratioGyroscope, dominant-frequency ratio0.9840.42118
4Gy_zcrGyroscope, zero-crossing rate0.9780.40919
5Ax_zcrAccelerometer, zero-crossing rate0.9660.40115
6Gz_dom_ratioGyroscope, dominant-frequency ratio0.9420.3894
7Ay_zcrAccelerometer, zero-crossing rate0.9420.3878
8Gy_dom_ratioGyroscope, dominant-frequency ratio0.9390.3863
9svm_acc_meanSignal-magnitude feature0.9180.4112
10Az_zcrAccelerometer, zero-crossing rate0.8890.3661
11Az_entropyAccelerometer, entropy0.8700.3570
12Az_band35Accelerometer, spectral-band energy0.8640.4132
13Gz_rmsGyroscope, RMS amplitude0.8590.4172
14Ay_rmsAccelerometer, RMS amplitude0.8510.4311
15Gz_entropyGyroscope, entropy0.8460.3410
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Acı, Ç.İ.; Say, F.; Zaimoğlu, E.A. Cross-Species Behavioral Representation Learning Using Domain-Adversarial Adaptation on Wearable IMU Signals. Biomimetics 2026, 11, 496. https://doi.org/10.3390/biomimetics11070496

AMA Style

Acı Çİ, Say F, Zaimoğlu EA. Cross-Species Behavioral Representation Learning Using Domain-Adversarial Adaptation on Wearable IMU Signals. Biomimetics. 2026; 11(7):496. https://doi.org/10.3390/biomimetics11070496

Chicago/Turabian Style

Acı, Çiğdem İnan, Furkan Say, and Esin Ayşe Zaimoğlu. 2026. "Cross-Species Behavioral Representation Learning Using Domain-Adversarial Adaptation on Wearable IMU Signals" Biomimetics 11, no. 7: 496. https://doi.org/10.3390/biomimetics11070496

APA Style

Acı, Ç. İ., Say, F., & Zaimoğlu, E. A. (2026). Cross-Species Behavioral Representation Learning Using Domain-Adversarial Adaptation on Wearable IMU Signals. Biomimetics, 11(7), 496. https://doi.org/10.3390/biomimetics11070496

Article Metrics

Back to TopTop