Published May 11, 2026 | Version v3

Frequency-Selective Memory Networks for Adaptive Signal Processing - Source Code and Datasets

Authors/Creators

Description

FSM-Net: Dual-Path Signal Classification with Learned Frequency Decomposition

This repository provides the complete Python implementation and experimental framework for FSM-Net (Frequency-Selective Memory Network), a neural architecture that learns to decompose signals into task-relevant spectral components through end-to-end gradient optimization. The accompanying paper proposes a learnable STFT-based frequency gating mechanism, dual-pathway LSTMs with asymmetric memory dynamics, and an attention-based adaptive fusion module for time-series classification tasks.

Contents

  • FSM-Net.py: Single-file implementation (~1,600 lines) containing the full FSM-Net architecture, five baseline models (Standard LSTM, 1D-CNN, CNN-LSTM, Transformer, SincNet), dataset loaders, training/evaluation pipelines, ablation studies, loss-weight sensitivity analysis, noise robustness evaluation, and publication-quality figure generation (Figures 2–7 in the paper).
  • Datasets: CWRU Bearing Fault Diagnosis dataset (12 kHz, 4-class), Paderborn University Bearing dataset (64 kHz, 3-class), and MIT-BIH Arrhythmia dataset (360 Hz, binary classification).

Key Features

  • Learnable frequency decomposition via trainable gating networks applied to STFT coefficients, discovering task-optimal spectral boundaries without manual specification.
  • Dual-pathway LSTM processing with distinct dynamics for target signal enhancement and interference suppression.
  • Context-aware adaptive fusion with multi-head attention for dynamic combination of pathway outputs.
  • Comprehensive benchmarking against five baselines under identical training protocols and data splits.
  • Systematic ablation, hyperparameter sensitivity (λ_s and λ_r), and noise robustness experiments across SNR levels from clean to −5 dB.
  • Physically interpretable learned gate patterns that align with known bearing characteristic frequencies (BPFO ≈ 107 Hz, BPFI ≈ 162 Hz) without geometric priors.

Reported Results

FSM-Net achieves 97.74% (CWRU), 92.61% (Paderborn), and 96.54% (MIT-BIH) accuracy, consistently outperforming all frequency-unaware baselines across all three datasets.

Requirements

Python 3.8+, PyTorch, NumPy, SciPy, scikit-learn, matplotlib, seaborn, pandas, tqdm.

How to Reproduce

  1. Place the dataset files in the paths specified in the dataset configuration section of FSM-Net.py (or modify the paths accordingly).
  2. Run python FSM-Net.py to execute the full experimental pipeline, including training all models, ablation studies, and figure generation.
  3. Results and figures will be saved to the output directory.

Files

CHANGELOG.md

Files (9.0 GB)

Name Size
md5:2c16e65c713a218677f3e9ea1403ae90
5.4 kB Preview Download
md5:78fc2b3580f5a6b79f839834859e585a
9.0 GB Preview Download
md5:31470909929e0be0abc2476aff325349
5.0 kB Preview Download