DOI: 10.3390/computers15090628 ISSN: 2073-431X

Efficient Log Anomaly Detection via Dual-Domain State Space Modeling

Xianlang Hu, Guangsheng Feng, Ruini Wang, Dawei Yang, Chuhao Chen

Log anomaly detection requires models that capture long-range event dependencies without the quadratic sequence-length cost of self-attention. We present LogMamba, a reconstruction-based model that combines a bidirectional selective state-space branch with a Multi-Scale Frequency Learner (MSFL). The sequence branch models ordered semantic dependencies, whereas the MSFL applies a Fast Fourier Transform to the sequence-position axis and processes multiple spectral bands with independent multilayer perceptrons. An adaptive gate integrates both representations before semantic-embedding reconstruction. Because the position-frequency branch uses FFT operations, the complete block has O(LlogL) complexity with respect to a sequence of length L. On HDFS, BGL, and Thunderbird, LogMamba obtains mean F1-scores of 0.837 ± 0.006, 0.987 ± 0.002, and 0.983 ± 0.003, respectively. The HDFS score is 6.3% higher than the strongest baseline reported in our comparison, while recall reaches 0.996 on BGL and 0.998 on Thunderbird. Component ablations indicate that the sequence and position-frequency branches contribute differently across datasets, supporting their complementary use for log-sequence reconstruction.