## 4 Automatic Evaluation of Dance Performance
### Encoding Model with Contrastive Learning  
Supervised contrastive learning is a learning approach that leverages pre-labeled data to identify similarities and differences. In this approach, relationships between data are based on pre-defined labels, and positive and negative examples are defined based on the labels. The model learns the feature space so that data are differentiated on the feature space according to these labels. By applying supervised contrastive learning to the learning of another dance motion encoder, this study aims to capture subtle differences more accurately in dance expression and style as features. Specifically, we use the evaluation scores in the six items annotated for dance performance to train a generic encoder by assuming that data with similar  
Figure 12: Autoencoder model architecture. evaluation scores are similar to each other. Score values were standardized by item in order to homogenize the differences in scores between each rated item. Specifically, the following equations are used for calculation. \[z_{ij}=\frac{\big{(}s_{ij}-\mu_{i}\big{)}}{\sigma_{i}} \tag{1}\]  
\[z_{j}=\big{[}z_{ij},z_{2j},\ \dots,\ z_{6j}\big{]} \tag{2}\]  
\[d_{E}\big{(}z_{j},\ z_{k}\big{)}=\sqrt{\sum_{i=1}^{6}\big{(}z_{ij}-z_{ik}\big{)} ^{2}} \tag{3}\]  
\[d_{M}\big{(}z_{j},\ z_{k}\big{)}=\sum_{i=1}^{6}\big{|}z_{ij}-z_{ik}\big{|} \tag{4}\]  
where \(i\) represents the evaluation item, \(\mu\) is the mean of the score distribution for item \(i\), and \(\sigma\) is the standard deviation. Equation (1) calculates the standardized score \(z\) for each item. Equations (3) and (4) are then used to calculate the Euclidean and Manhattan distances between datum \(j\) and datum \(k\). These scores are treated as vectors, and the distances between data are calculated as the distance between these vectors. To calculate the distance between vectors, Euclidean and Manhattan distances were used in comparative experiments. In this study, a two-layer BiLSTM was used to extract features from motion data. An MLP (multilayer perceptron) was also applied to the LSTM output for further feature extraction, which helps to capture nonlinearities in the data and identify more complex relationships and patterns. When training encoders, a model with an embedding layer added to the output layer was also used. This layer was not used as the output of the encoder, but rather only to compute the distance between data in contrast training. Figure 13 shows the model architecture for contrastive learning in this study. The reference-guided model uses two inputs: the motion data of the person being evaluated and the motion data of a reference model. In this model, an encoder is applied to each of the two inputs to extract features, and the resulting expression vectors are compared to predict the evaluation score (Figure 14). This method mimics the process in which the evaluator compares the motions of the model and the evaluated person and  
Figure 13: Model architecture for contrastive learning. allows quantitative analysis of the closeness of the expression to the model without relying on the dance choreography. In order to compare the expression vectors of the rater and the exemplar, it is necessary to integrate the two vectors, and in this study, three methods--subtract, concatenate, and multiply--were used to compare their accuracy. For the new feature vectors obtained by this method, the MLP is used to predict the evaluation scores. The model's parameters are adjusted to minimize this discrepancy. Specifically, in contrastive learning, loss functions such as contrastive loss and triplet loss are predominantly employed. As shown in the equation below, contrastive loss receives two sets of data as input. The model is trained to decrease the distance between the expression vectors for positive examples (similar data) and increase the distance for negative examples (dissimilar data).