Confidence-balanced contribution-based XLNet framework for detecting anomalous product prices and sales
For the recognition of anomalies in commodity prices, a binary classification problem, one of the current state-of-the-art algorithms is XLNet. It integrates the AR model and BERT, addressing the shortcomings of inconsistent pre-training and integration content between BERT and the inability of AR to consider contextual information. XLNet employs cross-entropy loss (Loss). However, when dealing with a significantly imbalanced distribution of positive and negative class samples in the presence of a massive volume of data, such as a much larger quantity of normal-priced commodities compared to abnormal-priced ones, there is a problem of overfitting easy-to-classify samples with excessively high confidence. Focal Loss mitigates this issue by reducing the weight of easily classified samples in the loss function, thereby increasing the loss contribution of hard-to-classify samples. However, it focuses solely on the difficulty of classifying individual samples and does not consider the overall discreteness level of easy and hard samples. To address this, a reshaped cross-entropy loss called Slanting Loss is proposed. Slanting Loss retains the contribution of the original loss function for samples with a high level of discreteness while reducing it for samples with lower discreteness. To evaluate the effectiveness of the loss, a simple model, XLNet-PM, is designed and trained using Slanting Loss. Experimental results on the same test set show that XLNet-PM achieves an improvement in F1 score compared to Bert, XLNet, and Roberta by 2.01%, 0.08%, and 0.30%, respectively. Therefore, Slanting Loss demonstrates optimization effectiveness, particularly in scenarios of significantly imbalanced data volume and distribution of positive and negative class samples, making it competitively viable.
Authors
- Yan-yi Shen
- Wolfgang Lang
- Ge Gao (ORCID: https://orcid.org/0000-0001-8670-2385)
- Y. C. Zhu (ORCID: https://orcid.org/0009-0000-6597-7275)
- Wenjuan Ma (ORCID: https://orcid.org/0000-0001-8637-0800)
- Jiawei Li (ORCID: https://orcid.org/0000-0002-3517-4049)
Institutions
- Nanjing University of Science and Technology (CN)
Publication Details
- Published
- 2025-04-25
- DOI
- https://doi.org/10.1117/12.3061090
- Primary Topic
- Anomaly Detection Techniques and Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00