## 4 Experiment
### Models and Experimental Settings  
In the experiment, we compared several models that are used for anomaly detection in trading platforms. These models are from the PYOD library [31]: angle-base outlier detection (ABOD), cluster-based local outlier factor (CBLOF), unsupervised outlier detection using empirical cumulative distribution functions (ECOD), isolation forest (iForest), lightweight online detector of anomalies (LODA), local outlier factor (LOF), one-class support vector machine (OCSVM), and principal component analysis (PCA). We implemented the remaining neural network models using PyTorch [32] and added the embedding layer to handle enumeration types. These were the deep autoencoder (DAE), DeepAnT, recurrent neural network autoencoder (RNN-AE), our framework DeepAnT, and our framework RNN. The DAE model is a simple deep autoencoder trained per user and uses reconstruction bias to judge anomalous behavior. On each trading platforms, users were divided into training-users and test-users. We trained the models using different training and testing methods according to the limitations of each model. Existing methods to detect user behavior anomalies on trading platforms use separate models for each user. Therefore, we trained an individual model for each test-user for all traditional anomaly-detection methods and the DAE model. Since the inputs of the traditional anomaly detection and the DAE model are individual user actions, the basic units of the training and test sets are user actions. The training sets are the first 2/3 behavior sequence actions of the corresponding users. The test sets consisted of two parts. The normal part was the actions of the last 1/3 of the behavior sequence of the corresponding users. The anomalous part was the actions of other arbitrarily selected users. The number of normal and anomalous actions in the test set was guaranteed to be the same. Regarding the sequence model of DeepAnT and RNN-AE, the basic units of the training and test sets were user behavior sequence segments. We also trained an individual model for each test-user. The training set was generated by passing a sliding window over the first 2/3 of the behavior sequences of the corresponding test-users. The test set was divided into two parts. The normal part was generated by passing a sliding window over the last 1/3 of the behavior sequences of these users. The anomalous part was generated from the normal part by replacing the last action of the segment with the action of the other test-user. In the ablation study, we demonstrate another training and testing method. The number of normal and anomalous actions in the test set was guaranteed to be the same. Contrastive learning frameworks take different training and testing schemes when training modified DeepAnT and RNN models. Our framework uses GMs, which do not require training a model for each user and can be trained directly on the records of training-users. The basic units of the training and test sets were user behavior sequence segments. The training set was divided into two parts. The normal part was generated from the behavior sequence of the training-user using a sliding window, and the anomalous part was generated from the normal part by replacing the last action of the segments with the action of the other training-user. The test set was generated in the same way as with the sequence models, such as DeepAnT and RNN-AE, except that the complete behavior sequence of the test-user was used instead of the last 1/3. All models were trained and tested on a computer with an NVIDIA 1080 Ti graphics card. Their runtime might have been affected by their specific implementation.