  Deep learning has achieved remarkable success in bearing fault diagnosis.
However, its performance oftentimes deteriorates when dealing with highly
imbalanced or long-tailed data, while such cases are prevalent in industrial
settings because fault is a rare event that occurs with an extremely low
probability. Conventional data augmentation methods face fundamental
limitations due to the scarcity of samples pertaining to the minority class. In
this paper, we propose a supervised contrastive learning approach with a
class-aware loss function to enhance the feature extraction capability of
neural networks for fault diagnosis. The developed class-weighted contrastive
learning quadratic network (CCQNet) consists of a quadratic convolutional
residual network backbone, a contrastive learning branch utilizing a
class-weighted contrastive loss, and a classifier branch employing
logit-adjusted cross-entropy loss. By utilizing class-weighted contrastive loss
and logit-adjusted cross-entropy loss, our approach encourages equidistant
representation of class features, thereby inducing equal attention on all the
classes. We further analyze the superior feature extraction ability of
quadratic network by establishing the connection between quadratic neurons and
autocorrelation in signal processing. Experimental results on public and
proprietary datasets are used to validate the effectiveness of CCQNet, and
computational results reveal that CCQNet outperforms SOTA methods in handling
extremely imbalanced data substantially.
