AI Engineer Intern · Amazing TechApr – Jun 2026

PhyDecoMamba: bearing faults by forecast

An unsupervised forecaster that learns healthy vibration and flags failing bearings from its forecast error, with thresholds set by extreme value theory.

75.65%
F1 under POT
14.1×
faster than LSTM, batch 1,024
215.9 MB
VRAM at batch 64
0.18%
false-alarm rate (ablation)

Context

Bearings fail gradually and failure labels are rare. Vibration windows are long (4,096 points), which makes attention-based models expensive, and many published pipelines leak future information when they pick an alarm threshold.

My internship task was a detector that needs no fault labels, runs cheaply enough for edge hardware, and calibrates its threshold without leakage.

What I did

  • Built PhyDecoMamba, a series-decomposed hybrid Mamba-CNN forecaster trained only on healthy data.
  • Added a physics-informed head that fuses eight time-domain indicators (RMS, kurtosis and others) into the forecast.
  • Calibrated alarms with Peak-Over-Threshold on early healthy segments only, so no future labels reach the threshold.
  • Benchmarked against LSTM, Simple-Mamba and PatchTST at matched parameter budgets (~338k) and ran a four-variant ablation; wrote it up as a paper draft.

How it works

  • Split each 4,096-point window into a slow trend and a fast seasonal part.
  • Forecast the trend with a linear layer.
  • Patch the seasonal part, suppress noise with a 1D CNN, then model it with a Mamba selective-scan backbone in linear time.
  • Fuse the eight physical statistics, mix both branches with a learned sigmoid gate and forecast the next 512 points.
  • Score each window by forecast error; raise an alarm when it crosses the POT threshold.

Results

  • Lowest test forecasting error of the four models (MSE 4.2488) and F1 75.65% under POT, second to PatchTST (76.49%).
  • At batch 1,024, 1.01 ms per sample: 14.1× faster than LSTM, 5.6× than Simple-Mamba, 2.0× than PatchTST.
  • At batch 64, 215.9 MB of VRAM, 83.8% less than PatchTST.
  • In the ablation, the physical-statistics head cut validation MSE by 5.56%, and POT reached a 0.18% false-alarm rate with 12.12 ms of calibration.

Lessons

Detection accuracy was close across models; the clear win was cost — memory and latency — which is what decides whether a model can run next to the machine. Next I would validate on more datasets and model interactions between sensor axes.

PhyDecoMamba: phát hiện lỗi vòng bi

Mô hình dự báo không giám sát: học tín hiệu rung lúc khỏe, báo lỗi khi sai số dự báo vượt ngưỡng tính bằng lý thuyết giá trị cực trị.

75,65%
F1 với POT
14,1×
nhanh hơn LSTM, batch 1.024
215,9 MB
VRAM ở batch 64
0,18%
báo động giả (ablation)

Bối cảnh

Vòng bi hỏng dần và hầu như không có nhãn lỗi. Cửa sổ tín hiệu rung dài (4.096 điểm) khiến mô hình attention tốn kém, và nhiều pipeline đã công bố bị rò rỉ dữ liệu tương lai khi chọn ngưỡng cảnh báo.

Nhiệm vụ thực tập của tôi: một bộ phát hiện không cần nhãn lỗi, đủ nhẹ để chạy trên thiết bị biên và chọn ngưỡng không rò rỉ.

Tôi đã làm gì

  • Xây PhyDecoMamba, mô hình dự báo lai Mamba-CNN có tách chuỗi, chỉ huấn luyện trên dữ liệu khỏe.
  • Thêm đầu thống kê vật lý gộp 8 chỉ số miền thời gian (RMS, kurtosis…) vào phần dự báo.
  • Hiệu chuẩn ngưỡng bằng Peak-Over-Threshold chỉ trên đoạn khỏe đầu đời, không để nhãn tương lai lọt vào.
  • So sánh với LSTM, Simple-Mamba, PatchTST ở cùng ngân sách tham số (~338k), làm ablation 4 biến thể và viết bản thảo bài báo.

Cách hoạt động

  • Tách mỗi cửa sổ 4.096 điểm thành thành phần xu hướng chậm và thành phần mùa vụ nhanh.
  • Dự báo xu hướng bằng một lớp tuyến tính.
  • Chia patch phần mùa vụ, lọc nhiễu bằng 1D CNN rồi mô hình hoá bằng Mamba selective scan với độ phức tạp tuyến tính.
  • Gộp 8 chỉ số vật lý, trộn hai nhánh bằng cổng sigmoid học được và dự báo 512 điểm kế tiếp.
  • Chấm điểm bằng sai số dự báo; vượt ngưỡng POT thì báo động.

Kết quả

  • Sai số dự báo trên tập test thấp nhất trong 4 mô hình (MSE 4,2488), F1 75,65% với POT, đứng sau PatchTST (76,49%).
  • Ở batch 1.024: 1,01 ms mỗi mẫu, nhanh hơn LSTM 14,1×, Simple-Mamba 5,6×, PatchTST 2,0×.
  • Ở batch 64: 215,9 MB VRAM, ít hơn PatchTST 83,8%.
  • Trong ablation, đầu thống kê vật lý giảm MSE validation 5,56%; POT đạt tỉ lệ báo động giả 0,18% với 12,12 ms hiệu chuẩn.

Bài học

Độ chính xác giữa các mô hình khá sát nhau; điểm thắng rõ là chi phí — bộ nhớ và độ trễ — yếu tố quyết định mô hình có chạy được cạnh máy móc hay không. Bước tiếp theo: kiểm chứng trên nhiều bộ dữ liệu hơn và mô hình hoá tương tác giữa các trục cảm biến.