# Intelligent Fault Diagnosis of Unbalanced Samples Using Optimized Generative Adversarial Network
## 1 Introduction  
The safe operation of automatic equipment is essential in production processes. Equipment failure can lead to injury and severe accidents in manufacturing [1]. It is necessary to improve the diagnosis of faults to discover potential safety hazards in time for maintaining the health conditions of the machines [2]. With the development of intelligent computing techniques, effective automatic fault diagnosis becomes possible, as does ensuring safety in industrial production [3; 4; 5]. Fault diagnosis approaches always process the collected vibration signals. Current intelligent methods [4] are divided into two types: traditional machine learning methodologies (e.g., random forests (RFs) [6], back propagation neural networks [7], and support vector machines (SVMs) [8]) and deep learning methodologies (e.g., convolutional neural networks (CNNs) [9; 10], a residual network (ResNet) [11], and capsule network (CapsNet) [12]. For example, [PERSON] et al. [13] constructed a new CNN model for the identification of machine failures with a wavelet transform technique. The current literature has focused on using plenty of balanced samples to learn a satisfactory training model. However, in real applications, the amount of the collected samples for individual fault classes is often insufficient, causing unbalanced sampling. This deficiency makes it difficult to form a perfect dataset for learning features, so there is a pressing need to discover better and more effective methods to deal with unbalanced data [14]. Current methods usually employ optimization algorithms for alleviating the problem of unbalanced training data [15]. [PERSON] et al. [16] established a normalization CNN mode to enhance training effectiveness and used weighted Softmax loss to solve classification imbalance. [PERSON] et al. [17] designeda deficiency detection strategy with ResNet by employing an imbalance-weighted cross-entropy loss function to resolve the sample imbalance. However, for the optimization strategy, the proportion of the category samples is fixed, so it is difficult to address the issue of proportion change. Data augmentation under small samples is a practical way to overcome the limitation above. As a prospective approach, a generative adversarial network (GAN) [18] is a semi-supervised feature-learning method using game scenarios. The GAN and its variations have been widely employed in signal formation and recognition [19]. GAN learns the distribution of previous samples and outputs satisfactory simulated ones. Thus, GAN provides a novel approach for solving the problem of unbalanced and insufficient data for actual fault diagnosis [20; 21; 22; 23]. Recently, [PERSON] et al. [24] presented a conditional variational GAN model for imbalance fault diagnosis that gains the distribution features from a small fault sample size. [PERSON] et al. [25] developed a novel GAN method via global optimization to create more fault condition data to deal with the imbalance problem, and a two-hierarchical discriminator is designed to process unqualified data. [PERSON] et al. [26] designed a Wasserstein GAN diagnosis approach with a full attention mechanism and gradient normalization to promote the quality of the fake samples. [PERSON] et al. [27] proposed a feasible auxiliary classification GAN methodology with Wasserstein distance and attention modules for information insufficiency. GANs are also suitable for producing two-dimensional (2D) samples. [PERSON] et al. [28] developed an effective generator by using a time-series GAN that learns raw data and an auxiliary classifier GAN for producing multimode time-frequency maps to balance the sample distributing. [PERSON] et al. [29] proposed a multi-scale residual GAN to generate time-frequency maps to balance an unbalanced data distribution and used a classifier based on feature enhancement for fault classification. These studies are all two-step strategies. An example is the generative training of a GAN model and another deep learning classification model that are independent.