### Motivations and Related Works  
In the high-speed railway system, the track fastener is a core component ensuring driving safety. The stability and integrity of the fastener are key factors in ensuring driving safety. As a core component for fixing the rails, the fastener, by maintaining the geometric shape of the track structure, can not only effectively restrain the displacement and deformation of the track, improving the operational safety of trains, but also significantly reduce daily maintenance costs and workload [6; 7; 8]. However, with the long-term use of the railway and the continuous changes in the operating conditions of trains, the stress borne by the fastener has become more complex and variable, which also significantly increases the risk of its abnormal conditions. Common failures, such as the breakage of elastic clips, the absence of bolts, and the fastener being blocked by foreign objects, if not detected and dealt with in a timely manner, may lead to the vibration or even the deviation of the rails, directly affecting the safe operation of the trains. In severe cases, it may even cause major safety accidents such as derailments [9; 10; 11]. To ensure the safe operation of railways, the anomaly detection of rail fasteners primarily relies on manual inspections. However, given the vast railway networks and complex operational environments, manual inspections of fastener conditions are not only susceptible to weather conditions, but are also influenced by subjective factors such as the inspectors' experience and emotional states, resulting in the relatively low accuracy and efficiency of inspection outcomes. Consequently, the traditional manual inspection approach has become inadequate to meet the demands of large-scale railway maintenance [12]. To address the inefficiency of manual inspection, computer-vision-based automation has emerged as a promising alternative. Traditional computer-vision-based methods for railway fastener anomaly detection primarily rely on handcrafted features such as Histogram of Oriented Gradients (HOG) [13; 14] and Scale-Invariant Feature Transform (SIFT) [15], combined with machine learning classifiers to identify fastener defects. However, the representational capability of these handcrafted features is fundamentally constrained by their inability to encode higher-order structural features. This limitation manifests itself in three critical aspects within railway fastener inspection: (1) The geometric variability of fastener defects (e.g., irregular defect shapes) cannot be effectively captured by fixed handcrafted descriptors. (2) Accuracy degradation under environmental variations: Machine learning classifiers trained on these handcrafted features suffer from accuracy degradation when encountering illumination variations or weather-induced texture changes [16]. (3) Operational complexity: Manual threshold adjustments are required for different railway sections, significantly increasing operational burdens [17]. In recent years, the successful application of deep learning in data-driven feature learning for tasks such as face recognition [18; 19; 20] and anomaly detection [21; 22; 23] has effectively overcome the inherent limitations of traditional methods. This breakthrough has motivated researchers to introduce Faster R-CNN and YOLO series models into railway fastener inspection tasks, thereby providing novel solutions for fastener detection. [PERSON] et al. [24] simplified and improved the Faster R-CNN framework by employing k-means clustering to automatically identify optimal anchor box locations, thereby enhancing fastener detection performance. [PERSON] et al. [25] developed a defect detection model based on Mask R-CNN, built upon the YOLOv5 framework, to identify rail surface defects and segment defect regions. Additionally, they employed the ResNet architecture to classify fastener conditions. [PERSON] et al. [26] enhanced the YOLOv5 framework by incorporating a Convolutional Block Attention Module (CBAM).