Optimized encoder-based transformers for improved local and global integration in railway image classification
Railway image classification (RIC) represents a critical application in railway infrastructure monitoring, involving the analysis of hyperspectral datasets with complex spatial-spectral relationships unique to railway environments. Nevertheless, Transformer-based methodologies for RIC face obstacles pertaining to the extraction of local features and the efficiency of training processes. To address these challenges, we introduce the Pure Transformer Network (PTN), an entirely Transformer-centric framework tailored for the effective execution of RIC tasks. Our approach improves the amalgamation of local and global data within railway images by utilizing a Patch Embedding Transformer (PET) module that employs an “unfold + attention + fold” mechanism in conjunction with a Transformer module that incorporates relative attention. The PET module harnesses attention mechanisms to replicate convolutional operations, enabling adaptive receptive fields for varying spatial patterns in railway infrastructure, thus circumventing the constraints imposed by fixed convolutional kernels. Additionally, we propose a Memory Efficient Algorithm that achieves 35% training time reduction while preserving accuracy. Thorough assessments conducted on four hyperspectral railway image datasets validate the PTN's exceptional performance, demonstrating superior accuracy compared to existing CNN- and Transformer-based baselines.
Authors
- Tao Wu (ORCID: https://orcid.org/0000-0002-2519-7407)
- Hua Ma (ORCID: https://orcid.org/0000-0002-8717-6847)
- L. Li
- Xuemei Zhan
Institutions
- Zhengzhou Railway Vocational & Technical College (CN)
Publication Details
- Journal
- Frontiers in Computer Science
- Published
- 2025-11-05
- DOI
- https://doi.org/10.3389/fcomp.2025.1658556
- Primary Topic
- Advanced Neural Network Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Henan Provincial Science and Technology Research Project