# A Real-Time Detection of Pilot Workload Using Low-Interference Devices
## 4 Experimental Setup
### Data Augmentation Using CTGAN  
As the FCN-Transformer model is a type of deep learning architecture, there exists a risk of overfitting when applied to small-sample datasets, especially with complex neural  
Figure 7: The Calinski–Harabasz index of different numbers of clusters.  
networks. To mitigate this problem, the study employs the conditional generative adversarial network for tabular data (CTGAN) algorithm to augment the original dataset of 1050 entries to a dataset containing 6000 entries.  
The operational principle of CTGAN is based on the framework of generative adversarial networks (GANs), which includes two main components: a generator (G) and a discriminator (D). The goal of the generator is to produce data realistic enough to deceive the discriminator, while the discriminator aims to differentiate between generated and real data. Throughout the training process, these two components compete against each other, with the generator eventually learning to produce data indistinguishable from real data. The interaction between the generator \(G\) and the discriminator \(D\) can be described by the following optimization problem:  
\[\min_{G}\max_{D}V(D,G)=E_{x\sim p_{data(z)}}[\log D(x)]+E_{z\sim p_{z}(z)}[\log( 1-D(G(z)))].\]  
Here, \(x\) represents real data; \(z\) is a noise vector drawn from a prior distribution; \(G(z)\) denotes the data generated by the generator; \(D(x)\) is the discriminator's assessment of the real data; and \(D(G(z))\) is the discriminator's assessment of the generated data. CTGAN modifies this foundational architecture to handle tabular data more efficiently. For categorical variables, CTGAN implements a training-by-sampling strategy, introducing conditional vectors and a generator loss function to address issues of category imbalance. In CTGAN, the generator is conditionally trained, meaning that for each category, it generates data based on a conditional vector that guides the generation process [100]. The conditional vectors specify the generation conditions, while categorical variables are represented as multi-dimensional one-hot vectors. During training, the conditional generator can produce any combination of one-hot vectors. For numerical variables, CTGAN utilizes a variational Gaussian mixture model (VGM) and employs the Wasserstein GAN loss function for gradient penalty, enhancing the stability and effectiveness of the training process. Overall, CTGAN, with these technological enhancements, is better equipped to handle the imbalance of categories in tabular data and generate synthetic data that more closely mirror the distribution of real data.  
The Jensen-Shannon divergence (JSD) is a common method of measuring the similarity between two probability distributions [101]. The definition is as follows:  
\[JSD=H(M)-\frac{1}{2}(H(P)+H(Q)),\]  
where:  
\(M=\frac{1}{2}(P+Q)\) is a mixture distribution of P and Q;  
\(H(P)\) is the Shannon entropy for distribution P, \(H(P)=-\frac{\sum}{x}P(x)\log P(x)\).  
The similarity between the distributions is greater when the Jensen-Shannon distance is closer to zero [102]. The JS divergence of the data before and after augmentation using CTGAN is shown in Table 4, where the left column lists the features, and the right column displays the JSD of each feature distribution before and after augmentation. Results demonstrate the effective data augmentation performance of CTGAN.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Feature** & **JS Divergence** & **Feature** & **JS Divergence** \\ \hline Fixation duration & 0.023 & Right pupil diameter & 0.079 \\ Fixation frequency & 0.017 & Fixation duration in AOI A & 0.055 \\ Saccade frequency & 0.010 & Fixation frequency in AOI A & 0.005 \\ Blink frequency & 0.018 & Fixation duration in AOI B & 0.014 \\ Saccade distance & 0.008 & Fixation frequency in AOI B & 0.042 \\ Left pupil diameter & 0.121 & Workload label & 0.019 \\ \hline \hline \end{tabular}
\end{table}
Table 4: The JS divergence of features.