# Arbitrary Motion Style Transfer via Contrastive Learning
## 1 Introduction  
The virtual industry is experiencing rapid growth, leading to an increased demand for customized human motion. However, the process of customizing specific human motions can be expensive. In many cases, a significant portion of the motion content is repetitive. Therefore, if we can stylize these repetitive motions to meet customization requirements, it would result in substantial cost savings and expedite the creation of virtual assets. Consequently, research on motion style transfer has gained significant importance.  
Data-driven methods have emerged as a promising approach for motion style transfer due to their convenience, efficiency, and cost-effectiveness. In recent years, significant advancements have been made in data-driven end-to-end methods (e.g., [1, 2, 3, 4, 5, 6]). Despite the excellence of these methods, they primarily rely on a direct end-to-end approach to enhance the model's ability to preserve style and content. They do not thoroughly explore the differences and similarities between various motions, which limits their ability to construct better representations of style and content. Furthermore, accurately preserving information from the input motions continues to be a challenge in these approaches.  
In terms of the differences and similarities between the generated motion and other motions, contrastive learning offers a powerful framework for description. Contrastive learning discriminates each instance as a separate category, which aligns well with arbitrary motion transfer, treating each motion as an individual style or content category. Additionally, the instance similarities learned through contrastive learning aid in distinguishing between different motion styles and content. Our contrastive learning framework is based on the premise that the generated motion should be closer to the input style motion in terms of style, and closer to the input content motion in terms of content, while far awayfrom other input motions and generated motions. By employing this, we can effectively capture and model the differences and similarities between different motions.  
To enhance the model's ability to recognize different styles, we employ contrastive learning between two random temporal motion clips of the same motion, as shown in Figure 1. By comparing and linking each small clip of the input motion individually, the model can explicitly learn the differences and similarities in style from various temporal clips of the same motion. Consequently, our framework is capable of accurately preserving the style of the input motion during the transfer process.  
In this study, we make the following contributions:  
* We propose a novel framework that incorporates contrastive learning for arbitrary motion style transfer, leveraging the differences and similarities between various motions.
* We introduce a dedicated module for contrastive learning on random temporal motion clips. This module enhances the style encoder's ability to fully represent style motions.
* We conducted extensive experiments on the impact of contrastive learning and temporal contrastive learning on arbitrary motion style transfer, analyzing their ability to preserve style and content in the style transfer task.