ALDI-ray: Adapting the ALDI Framework for Security X-ray Object Detection

Omid Reza Heidari, Yang Wang, Xinxin ZuoarXiv 2025 · DOI · arXiv

Abstract

Security X-ray object detection faces significant challenges from "endogenous domain shift"—performance degradation caused by subtle variations in scanner hardware and environments. This paper adapts the ALDI++ (Align and Distill) framework to this domain. By employing a teacher-student self-distillation approach combined with modern transformer-based backbones (ViTDet), the proposed ALDI-ray method achieves new state-of-the-art results on the multi-domain EDS dataset, significantly outperforming previous specialized unsupervised domain adaptation (UDA) methods.

Introduction

Detecting prohibited items like knives or power banks in cluttered luggage is a critical security task. While deep learning has advanced general object detection, security X-ray imagery suffers from endogenous domain shift. These are discrepancies intrinsic to the data acquisition process—such as sensor characteristics or scanning geometry—that are often imperceptible to humans but detrimental to neural network performance. Since manual annotation for every new scanner deployment is impractical, Unsupervised Domain Adaptation (UDA) is essential for transferring knowledge from a labeled source domain to an unlabeled target domain.

Methodology

ALDI-ray leverages the ALDI++ framework, prioritizing robust self-distillation over traditional hard pseudo-labeling.

The ALDI++ framework utilizes a teacher-student architecture with soft distillation and EMA updates.

The architecture consists of several key components:

  • Teacher-Student Model: A Student model learns from labeled source data, while a Teacher model—maintained as an Exponential Moving Average (EMA) of the student—generates targets for unlabeled target data.
  • Multi-task Soft Distillation: Rather than filtering predictions with a hard confidence threshold, the student learns from the teacher’s raw "soft" outputs for both RPN localization and RoI classification, reducing confirmation bias.
  • Robust Burn-in: A pre-training phase with heavy data augmentation ensures the Teacher provides reliable guidance before adaptation begins.
  • Backbone Scaling: The framework evaluates the transition from traditional CNNs (VGG-16) to Vision Transformer-based detectors (ViTDet), which better capture global context in cluttered scenes.

Experimental Setup

The method was evaluated on the EDS dataset, a benchmark for endogenous shift in X-ray security. It contains three sub-datasets (EDS1, EDS2, EDS3) across 10 categories, including Drill/Bottle (DB), Knife (KN), and Powerbank (PB). Experiments covered all six possible transfer directions between these domains (e.g., $D_{1 \to 2}$).

Results and Discussion

ALDI-ray establishes a new state-of-the-art for X-ray UDA. With a VGG-16 backbone, it achieved an average mAP of 56.4%, surpassing the previous best method, PSN (54.77%).

Performance comparison across different backbones and transfer directions on the EDS dataset.

The most significant gains came from scaling the backbone. As shown in the results, upgrading to ViTDet led to a massive performance leap. For instance, in the $D_{2 \to 3}$ transfer task, ViTDet reached 79.43% mAP, a substantial improvement over the 61.14% achieved by VGG-16. This suggests that transformers are particularly well-suited for the "visual noise" inherent in security X-rays. Furthermore, the model showed marked improvements in difficult, thin-profile categories like Knife (KN) and Glassbottle (GB).

Conclusion

ALDI-ray demonstrates that combining soft self-distillation with powerful transformer backbones effectively bridges the endogenous domain gap in security X-ray detection. While some categories like Laptops remain challenging due to high inter-domain variance, the framework provides a robust foundation for future work in automated threat detection. Future research will explore specialized modules to account for the unique physics of X-ray occlusion and density summation.

Summary updated

Abstract

Domain adaptation in object detection is critical for real-world applications where distribution shifts degrade model performance. Security X-ray imaging presents a unique challenge due to variations in scanning devices and environmental conditions, leading to significant domain discrepancies. To address this, we apply ALDI++, a domain adaptation framework that integrates self-distillation, feature alignment, and enhanced training strategies to mitigate domain shift effectively in this area. We conduct extensive experiments on the EDS dataset, demonstrating that ALDI++ surpasses the state-of-the-art (SOTA) domain adaptation methods across multiple adaptation scenarios. In particular, ALDI++ with a Vision Transformer for Detection (ViTDet) backbone achieves the highest mean average precision (mAP), confirming the effectiveness of transformer-based architectures for cross-domain object detection. Additionally, our category-wise analysis highlights consistent improvements in detection accuracy, reinforcing the robustness of the model across diverse object classes. Our findings establish ALDI++ as an efficient solution for domain-adaptive object detection, setting a new benchmark for performance stability and cross-domain generalization in security X-ray imagery.
BibTeX
@misc{heidari2025aldi,
  author = {Omid Reza Heidari and Yang Wang and Xinxin Zuo},
  title = {{ALDI-ray: Adapting the ALDI Framework for Security X-ray Object Detection}},
  year = {2025},
  eprint = {2512.02696},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.02696},
}
Figure