Abstract:Given the extreme imbalance in the distribution of normal and fraudulent transactions data in cryptocurrency transaction samples, as well as the complex high-dimensional features and nonlinear relationships in transaction data, an imbalanced data classification method with interpretable analysis for cryptocurrency transaction fraud detection was proposed. Firstly, synthetic minority oversampling technique(SMOTE) and contrastive learning-based data enhancement strategies were used to balance the data. Secondly, a deep learning model based on transformer was introduced to learn sample relevance. Pre-training based on contrastive loss and fine-tuning strategies based on Bayesian were used to optimize the model. It distinguished the distribution of features between normal and fraudulent transactions bertter, extracted higher-order, high-dimensional features related to fraud. Finally, the interpreter was designed based on shapley additive explanations(SHAP), and combined with attention scores for model predictions interpretaion to reveal the role of different transaction features in fraud detection. Comparative results show that the model performs well in recall and can fully identify fraudulent activities in cryptocurrency transactions. Meanwhile, it achieves an excellent F1 value, striking a balance between accuracy and recall. Ablation experiments verify the necessity of the proposed data balancing and pre-training-fine-tuning strategies, show that it can effectively deal with the classification problem of unbalanced data. The research not only enriches financial fraud detection but also enhances cryptocurrency transaction security, promotes market development, and contributes to economic stability and social security.