## 3 Experiments and Results  
### Experimental Setup  
#### 3.1.1 Experimental Dataset  
To verify the effectiveness of the proposed method, experiments were conducted on the widely used MNIST public dataset and a self-constructed rail fastener dataset, aiming to demonstrate the performance of the method in rail fastener anomaly detection. The MNIST dataset is a collection of handwritten digit images provided by the National Institute of Standards and Technology (NIST), containing 60,000 training images and 10,000 testing images, each being a single-channel grayscale image of size \(28\times 28\) pixels. To maintain consistency with the rail fastener dataset in data processing, all images were uniformly resized to \(128\times 128\) pixels using bicubic interpolation. Although upsampling may introduce slight blurring, the key structural features of digits remain discernible, ensuring sufficient information retention for anomaly detection tasks. In the experiment, the digit \"0\" was defined as the anomaly class, while digits \"1-9\" were regarded as the normal class. A total of 2000 normal images and 100 abnormal images were randomly selected from the original dataset to establish a set of images comparable in scale to the self-constructed dataset. These images were then divided into a training set (60%), a validation set (30%), and a test set (10%), resulting in 1200 normal images for training, 600 normal and 40 abnormal images for validation, and 200 normal and 60 abnormal images for testing. Additionally, three types of anomalies--zero-position anomalies, disorder anomalies, and \begin{table}
\begin{tabular}{c c c} \hline \hline
**Level** & **Channels** & **Resolution** \\ \hline
4 & 256 & (\(2\times 2\)) \(\times\) (4 \(\times\) 4) \\
3 & 128 & (\(2\times 2\)) \(\times\) (8 \(\times\) 8) \\
2 & 64 & 32 \(\times\) 32 \\
1 & 32 & 64 \(\times\) 64 \\ Input & 1 & 128 \(\times\) 128 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Student and teacher generator structures in proposed method. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Level** & **Channels** & **Resolution** \\ \hline Input & 1 & 128 \(\times\) 128 \\
1 & 16 & 64 \(\times\) 64 \\
2 & 64 & 32 \(\times\) 32 \\
3 & 128 & 16 \(\times\) 16 \\
4 & 128 & 8 \(\times\) 8 \\
5 & 128 & 4 \(\times\) 4 \\ Output & 1 & 1 \(\times\) 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Discriminator structure in proposed method. missing anomalies--were artificially created to simulate realistic abnormal scenarios, as illustrated in Figure 7.  
A specialized dataset for unsupervised anomaly detection tasks was constructed based on standardized fastener samples obtained through the aforementioned data preprocessing pipeline. This dataset strictly adheres to the industrial scenario characteristics of the predominance of normal samples and the scarcity of anomalous instances in its distribution. Through a stratified sampling strategy, the dataset is divided into a training set, a validation set, and a test set. During the training phase, 1200 normal samples were utilized for unsupervised learning to enhance the model's capability in characterizing normal operational states. The validation set contains 600 normal samples and 40 anomalous instances for hyperparameter tuning and early stopping control. The test set comprises 200 normal samples and 60 anomalous cases covering three typical defect types--damaged clips, missing bolts, and foreign object occlusion (as illustrated in Figure 8)--to comprehensively evaluate the model's generalization performance under complex operational conditions. During model training and evaluation, all abnormal samples are unified under a single \"abnormal\" class label to validate the model's capability for generalized anomaly detection rather than defect-specific classification. The subtype-specific quantities and distribution details are independently presented in Table 4 to demonstrate the dataset's diversity and statistical integrity.