Neural networks can learn spurious correlations that lead to the correct prediction in a validation set, but generalise poorly because the predictions are right for the wrong reason. This undesired learning of naive shortcuts (Clever Hans effect) can happen for example in echocardiogram view classification when background cues (e.g. metadata) are biased towards a class and the model learns to focus on those background features instead of on the image content. We propose a simple, yet effective random background augmentation method called BackMix, which samples random backgrounds from other examples in the training set. By enforcing the background to be uncorrelated with the outcome, the model learns to focus on the data within the ultrasound sector and becomes invariant to the regions outside this. We extend our method in a semi-supervised setting, finding that the positive effects of BackMix are maintained with as few as 5% of segmentation labels. A loss weighting mechanism, wBackMix, is also proposed to increase the contribution of the augmented examples. We validate our method on both in-distribution and out-of-distribution datasets, demonstrating significant improvements in classification accuracy, region focus and generalisability. Our source code is available at: https://github.com/kitbransby/BackMix
翻译:神经网络可能学习到虚假相关性,这些相关性在验证集中能产生正确预测,但泛化能力较差,因为预测是基于错误原因得出的正确结果。这种不良的捷径学习现象(聪明汉斯效应)可能出现在超声心动图视图分类任务中,当背景线索(如元数据)与类别存在偏差时,模型会学习关注这些背景特征而非图像内容本身。我们提出一种简单而有效的随机背景增强方法BackMix,该方法从训练集中其他样本随机采样背景。通过强制背景与预测结果解耦,模型能够学习聚焦于超声扇区内的有效数据,并对扇区外区域保持不敏感性。我们将该方法扩展至半监督场景,发现即使仅使用5%的分割标注,BackMix仍能保持其积极作用。同时提出损失加权机制wBackMix以增强增强样本的贡献度。我们在分布内与分布外数据集上验证了该方法,证明其在分类精度、区域聚焦能力和泛化性能方面均有显著提升。源代码已开源:https://github.com/kitbransby/BackMix