## 2 Generative AI and Machine Fault Diagnosis  
The application of generative AI in diagnosing rotating systems predominantly involves the use of GANs on a large scale. The concept of GAN was first introduced in 2014 by [PERSON] et al. [52] within the field of generative AI. GANs are composed of two convolutional architectures engaged in a zero-sum game [80; 81] as shown in Figure 1.  
The objective of generator \(G\) is to generate images that closely resemble a specific distribution \(Y\) of images, using random input in the form of white noise \(X\). Discriminator \(D\) consists of a CNN that functions as a binary classifier, discerning between authentic images and synthetic ones generated by the generator by transformation \(X\to G(X)\). The mathematical representation of the competitive interaction between the two convolutional structures can be described by objective function \(\mathcal{L}_{GAN}\), as shown in Equation (1). The expected value operator \(\mathbb{E}[\cdot]\) is applied to generic \(y\), which belongs to domain \(Y\) and follows probability distribution \(p_{y}\). Similarly, generic \(x\) belongs to domain \(X\) and follows probability distribution \(p_{x}\). The output of the generator is denoted as \(G(\cdot)\), while the output of the discriminator is denoted as \(D_{Y}(\cdot)\). Namely, this latter represents the probability of the input image being real. From the perspective of the discriminator, it is advantageous to maximize the \(\mathcal{L}_{GAN}\) function, whereas for the generator, it is suitable to decrease it. The existence of such a dichotomy leads to the establishment of a zero-sum game. Then, the training of GAN involves the identification of a Nash equilibrium [80; 81] between the generator and discriminator components, as represented by Equation (2). \[\mathcal{L}_{GAN}=\mathbb{E}_{y\sim p_{y}}\big{[}\log D_{Y}(y)]+\mathbb{E}_{x \sim p_{x}}[\log(1-D_{Y}(G(x))]], \tag{1}\]  
\[\underset{G}{\text{minmax}}\mathcal{L}_{GAN}. \tag{2}\]  
A particular type of generative networks is represented by cycleGANs, which were originally introduced in 2017 by [PERSON] et al. [70]. The fundamental architecture of cycleGANs is shown in Figure 2 and consists of two generators, denoted as \(G\) and \(F\), as well as two discriminators, referred to as \(D_{Y}\) and \(D_{X}\). The two GANs are mathematically interconnected through cycle consistency loss function \(\mathcal{L}_{cyc}\) defined in Equation (3). The global loss function is reported in Equation (4), where \(\lambda\) is the weight assigned to \(\mathcal{L}_{cyc}\). \[\mathcal{L}_{cyc}=\mathbb{E}_{x\sim p_{x}}[\|F(G(x))-x\|_{1}]+\mathbb{E}_{y \sim p_{y}}[\|G(F(y))-y\|_{1}], \tag{3}\]  
\[\mathcal{L}_{tot}=\mathcal{L}_{GAN(x\to y)}+\mathcal{L}_{GAN(y\to x)}+ \lambda\mathcal{L}_{cyc}. \tag{4}\]  
Figure 1: Generative Adversarial Network (GAN): general outline. Function \(\mathcal{L}_{cyc}\) enables the establishment of a bidirectional correspondence between two image domains \(X\) and \(Y\), even in cases where training data pairings \(\{x_{i}\), \(y_{i}\}\) lack an exact equivalent in the coupled domain (i.e., unpaired image-to-image translation). The \(\mathcal{L}_{cyc}\) function in Equation (3) imposes a constraint on the model built on two GANs, ensuring that it produces an image that is virtually identical to input image \(x\) after undergoing transformation \(x\to G(x)\to F(G(x))\approx x\). This method obviates the need for a perfect coupling between training images \(x_{i}\) and \(y_{i}\). For instance, in the original paper, the methodology is employed to convert the style of images, thereby transforming them from paintings to photos. This transformation could be achieved without prior training by providing both the painting and its associated photo as input. This is because the model is cycle consistent and it learns the specific mapping from the \(x\) to the \(y\) domain for which \(x\to G(x)\to F(G(x))\approx x\) rather than a random one.