## 4 Experiments
### Baselines  
We considered three perspectives of comparison when choosing the baselines: (1) We will compare different sequence modeling structures. (2) We will compare generative and discriminative models (AE and VAE). (3) A comparison of different strategies for learning disentangled representations (\(\beta\)-VAE, CVAE vs. CoTD-VAE). Four baseline methods are finally selected for comparison experiments. All of these methods provide ways to encode data and use these representations as features for later classification tasks. Long Short-Term Memory Autoencoder (LSTM-AE) [54, 55, 56]: LSTM-AE is a classical approach for processing sequence data. It uses a bi-directional LSTM as an encoder and a uni-directional LSTM as a decoder. The encoder takes the input sequence and maps it to a fixed dimensional potential vector. The decoder uses this vector to reconstruct the original sequence. The specific structure includes an input projection layer, a bidirectional LSTM encoder (hidden layer dimension 128, 2-layer structure), a bottleneck layer (LN+ReLU activation) and a decoder. The MSE loss function is used for reconstruction. Transformer Autoencoder (Transformer-AE) [57, 58]: The Transformer architecture, which is based on the self-attention mechanism, has been successful in recent years in tasks that involve understanding sequences. Our version of Transformer-AE includes a Transformer encoder and decoder module that uses positional encoding to improve its ability to understand the order of events. The model dimension is set to 64, there are four attention heads, it contains two layers of encoder and decoder layers, and the feedforward network dimension is 128. Once again, mean squared error (MSE) is used as the reconstruction loss. Beta-Variable Autoencoder (\(\mathbf{\beta}\)-VAE) [21]: \(\beta\)-VAE is a type of VAE that allows you to adjust the weights (\(\beta\)) to balance how well something is reconstructed with how much it is represented. We use CNN as the main structure, and the encoder has several convolutional layers (channel configuration (16, 32), kernel size 5, step size 2) and a batch normalization layer that converts the inputs to the mean and variance parameters of the hidden variables. The decoder uses transposed convolution to recover the original sequence. The loss function combines two things: the reconstruction error and the weighted KL scatter. Conditional Variational Autoencoder (CVAE) [59, 60]: CVAE introduces category information as a condition into the generation process and learns the conditional distribution of specific activity categories. The structure is similar to \(\beta\)-VAE, but it introduces category embedding (dimension 8) in both the encoding and decoding processes. This allows the model to generate specific reconstructions and learn representations that are sensitive to specific conditions. We applied systematic hyperparameter optimization to all baseline models. We used a grid search strategy to explore different combinations of key hyperparameters for each model. These included hidden layer dimensions and number of layers for LSTM, model dimensions and number of attention heads for Transformer, latent space dimensions and regularization strengths for the VAE variant, etc. We chose the configuration with the best performance on the validation set for complete training. The autoencoder/VAE model for each configuration was trained first. The model state from the epoch with the lowest reconstruction loss on the validation set was saved for the next stage. Subsequently, a classifier was trained on the frozen representations from the best-performing autoencoder to evaluate the discriminative performance of the latent representation. The classifier contains two hidden layers (dimensions 128 and 64, respectively) and uses BatchNorm and Dropout (0.3) to improve generalization. The final classifier model was selected based on the highest classification accuracy on a separate validation set, using cross-entropy loss and an Adam optimizer (learning rate \(5\times 10^{-4}\) ).