[论文解读] Evaluating XGBoost for Balanced and Imbalanced Data: Application to Fraud Detection
本文在平衡与非平衡数据集上评估了XGBoost在欺诈检测中的表现,采用标准化的处理流程和随机搜索超参数调优。结果表明,随着数据集增大,模型性能有所提升,但在高度类别不平衡时性能显著下降;通过数据采样使训练集平衡并不能一致地提升检测指标。
This paper evaluates XGboost's performance given different dataset sizes and class distributions, from perfectly balanced to highly imbalanced. XGBoost has been selected for evaluation, as it stands out in several benchmarks due to its detection performance and speed. After introducing the problem of fraud detection, the paper reviews evaluation metrics for detection systems or binary classifiers, and illustrates with examples how different metrics work for balanced and imbalanced datasets. Then, it examines the principles of XGBoost. It proposes a pipeline for data preparation and compares a Vanilla XGBoost against a random search-tuned XGBoost. Random search fine-tuning provides consistent improvement for large datasets of 100 thousand samples, not so for medium and small datasets of 10 and 1 thousand samples, respectively. Besides, as expected, XGBoost recognition performance improves as more data is available, and deteriorates detection performance as the datasets become more imbalanced. Tests on distributions with 50, 45, 25, and 5 percent positive samples show that the largest drop in detection performance occurs for the distribution with only 5 percent positive samples. Sampling to balance the training set does not provide consistent improvement. Therefore, future work will include a systematic study of different techniques to deal with data imbalance and evaluating other approaches, including graphs, autoencoders, and generative adversarial methods, to deal with the lack of labels.
研究动机与目标
- 评估XGBoost在不同数据集规模和类别分布(从平衡到高度不平衡)下的检测性能。
- 评估随机搜索超参数调优对XGBoost在不同数据规模下性能的影响。
- 探究数据采样技术(如平衡训练集)是否能提升非平衡数据上的检测性能。
- 比较在不同数据条件下,原始XGBoost与调优后XGBoost的有效性。
- 识别传统评估指标(如准确率)在非平衡设置下的局限性,并倡导使用精确率、召回率和F1分数。
提出的方法
- 应用标准化的预处理流程:对数值特征进行最小-最大缩放,对分类特征使用预留值处理未见类别。
- 使用1K、10K和100K样本的数据集,类别分布分别为50%-50%、45%-55%、25%-75%和5%-95%的正样本。
- 训练原始XGBoost和通过随机搜索调优超参数(包括初始学习率、最大深度和子采样率)的XGBoost模型。
- 使用基于混淆矩阵的指标评估模型:精确率、召回率、F1分数和马修斯相关系数(MCC)。
- 应用合成采样技术(如少数类过采样)以平衡训练集,同时保持原始测试集的分布不变。
- 通过多次随机种子重复实验以确保结果稳健,并报告平均性能指标。

实验结果
研究问题
- RQ1在不同类别不平衡程度下,XGBoost的性能如何随数据集规模增大而变化?
- RQ2随机搜索超参数调优是否在小型、中型和大型数据集上均能一致提升XGBoost性能?
- RQ3通过采样平衡训练集是否能提升高度不平衡数据集上的检测性能?
- RQ4在非平衡设置下,哪些评估指标(如F1、精确率、召回率)最能可靠地评估欺诈检测系统?
- RQ5在高度不平衡的欺诈检测数据背景下,传统指标如准确率为何具有误导性?
主要发现
- XGBoost性能随数据集增大而显著提升,100K样本时检测性能最高。
- 随机搜索超参数调优在100K数据集上持续提升了性能,但在1K或10K数据集上未表现出一致优势。
- 随着类别不平衡程度增加,检测性能下降,F1分数在5%-95%正负样本分布时下降最明显。
- 通过采样平衡训练集虽提升了召回率,但降低了精确率,导致F1分数不切实际,尤其在75%-25%和95%-5%分布下更为显著。
- 在应用采样后,原始XGBoost与随机搜索调优的XGBoost均未表现出一致性能提升,表明该方法在此设置下效用有限。
- 准确率在非平衡设置下具有误导性,而F1分数、精确率和召回率提供了更可靠的性能评估。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。