# Real-Time Failure Prediction of ROADMs by GAN-Enhanced Machine Learning
## 2 Related Works and Our Approaches
### Generative Adversarial Network for Data Augmentations  
A Generative Adversarial Network (GAN) is a framework introduced by [27] to train deep generative models. As shown in Figure 5, it consists of a generator network, \(G\), whose goal is to learn a distribution, \(p_{z}\) matching the data, and a discriminator network, \(D\), which tries to distinguish between real data (from true distribution \(p_{data}(x)\)) and fake data (generated by the generator). \(G\) and \(D\) are competitors in a minimax game with the following formulation:  
\[\underset{G}{\text{minmax}}V(D,G)=\mathbb{E}_{x\sim p_{data}(x)}p_{data}(x) \text{log}\left(D(x)\right)+\mathbb{E}_{x\sim p_{z}(z)}[\text{log}(1-D(G(z)))] \tag{1}\]  
Figure 4: Tapped raw digital signal (TRDS); (DAC: Digital-to-Analog Converter, LPF: Low-Pass Filter, VCO: Voltage-controlled Oscillator, PLL: Phase-Locked Loop). Figure 5: GAN model diagram. Here, \(\mathbb{E}\) represents the empirical estimate of the expected value of the probability. The generator \(G\) transforms a noise variable \(z\) into \(G(z)\), effectively generating a sample from the distribution \(p_{z}\). Ideally, the distribution \(p_{z}\) should converge to the true data distribution \(p_{data}\). Minimizing \(\log(1-D(G(z)))\) is mathematically equivalent to maximizing \(\log(D(G(z)))\). The training process is iterative and adversarial. The generator learns to fool the discriminator by improving the quality of its generated samples, while the discriminator simultaneously learns to better distinguish between real and fake data. This dynamic interplay results in a balance where the generator produces high-quality samples, and the discriminator achieves robust classification accuracy. The Deep Convolutional Generative Adversarial Network (DCGAN) [20] is an extension of the standard GAN that incorporates convolutional and deconvolutional layers to improve the quality and stability of the generated outputs. While traditional GANs typically rely on fully connected layers, DC-GANs utilize convolutional layers in the generator and discriminator, making them particularly effective for image-related tasks as shown Figure 6.  
In a DC-GAN, the generator employs transposed convolutional layers to progressively up-sample a low-dimensional noise vector into a high-resolution image. Meanwhile, the discriminator uses standard convolutional layers to down-sample the input image and determine whether it is real or generated. This architectural shift has several advantages. The use of convolutional layers allows the network to effectively capture spatial hierarchies and local features in the data, making DC-GAN more suitable for generating visually coherent images. Furthermore, techniques such as replacing pooling operations with stridden convolutions and the introduction of batch normalization help to stabilize the training process, a common challenge in traditional GAN. Overall, the DC-GAN represents a significant improvement over the conventional GAN, particularly in applications involving high-dimensional data like images, due to its ability to leverage convolutional structures for better feature representation and generation quality. To train machine learning models in the actual field, it is necessary to acquire a large volume of constellation data to train machine learning models for various anomalous conditions. However, collecting the constellation data used for machine learning takes a certain amount of time, and the data are not generally distributed. In addition, the actual network is mainly used to carry customer traffic; so, the time needed to acquire constellation data should be minimized. Therefore, reducing the amount of data needed for machine learning seems to be very attractive to solve the above-mentioned issue. Figure 6: **Dimensions and structure of a DC-GAN model diagram.