A Differentiable Gating Mechanism for DETR: Improving Attention Efficiency in Real-Time Road Anomaly Detection
Abstract
Accurate detection of road-surface anomalies such as potholes and bumps, along with safety-critical dynamic objects including vehicles and pedestrians, is essential for ensuring traffic safety and enabling reliable autonomous navigation. In this work, "anomalies" refer specifically to static road defects, whereas dynamic objects are treated as safety-relevant events that require immediate attention by intelligent systems. Conventional convolution–based detectors like Faster Region-based Convolutional Neural Network (Faster R-CNN), Single Shot MultiBox Detector (SSD), and You Only Look Once (YOLO) perform well on structured objects but struggle to capture long-range contextual dependencies, limiting performance in complex scenes. Transformer-based models such as the Detection Transformer (DETR) overcome these limitations through global self-attention but suffer from redundant attention activations and slow convergence. To address this, we introduce a Differentiable Gating Mechanism integrated into the encoder's self-attention layers of DETR, employing learnable sigmoid-based gates to selectively emphasize informative heads while suppressing redundant ones. Experiments on a custom COCO-annotated dataset of over 4,700 road images demonstrate that the proposed model improves mean Average Precision (mAP)@0.5 from 82.9% to 96.2%, increases mean Intersection over Union (mIoU) from 0.79 to 0.84, reduces trainable parameters by 56%, and achieves a 4.58× faster per image inference time (147.6 ms to 32.2 ms). These results confirm that adaptive gating enhances attention efficiency, accelerates convergence, and significantly improves detection accuracy for real-time road anomaly detection.
Fields of Study & Subjects
Advanced Neural Network Applications
Infrastructure Maintenance and Monitoring
Visual Attention and Saliency Detection
Publication details
- Journal / source
- Engineering Technology & Applied Science Research
- Volume
- 16
- Issue
- 1
- Pages
- 31976–31982
- Publication date
- 9 February 2026
- Language
- EN