Skip to content
Open access

LAFNet: a lightweight neural network with fuzzy attention mechanism for rail surface defect classification

Sep 2026 · Scientific Reports · 0 citations

Abstract

Rapid and accurate detection of rail anomaly is crucial for railway transportation safety. Although existing deep learning methods have achieved certain progress, they generally suffer from large model parameter sizes and high computational costs, making it difficult to meet the requirements of real-time performance and resource constraints for on-site deployment. To address these challenges, this study proposes a lightweight neural network model (LAFNet) for rail anomaly classification. The model first adopts a three-layer convolutional structure to extract deep features. Then, an enhanced fuzzy neural network branch generates fuzzy rule activation vectors with clear semantics, and a fuzzy attention gating module is introduced to adaptively perform channel-wise reweighting of convolutional features using the rule vectors, thereby enhancing anomaly-related features and suppressing irrelevant ones. Furthermore, a residual fully connected block is employed to improve nonlinear representation capability and ensure stable gradient propagation. Experimental results show that the proposed model has only 0.46 million parameters, an CPU inference time of 1.045 milliseconds, and achieves a classification accuracy of 99.5%.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.