Skip to content

feat: add CUSUM MetaOperator for real-time change-point detection

Context

CUSUM (Cumulative Sum) is a real-time change-point detection algorithm commonly used in anomaly detection pipelines. This MR adds CUSUM as a MetaOperator in aidge_core, allowing it to be used as a standard node in an Aidge graph.

The algorithm maintains a running statistic: S[t] = max(0, S[t-1] + (x[t] - drift))

A change point is detected externally when S[t] exceeds a user-defined threshold. The operator is designed for online (real-time) use: no fixed number of steps is required.

Modified files

  • CUSUM.cpp (new): MetaOperator implementation using a micro-graph composed of Sub, Add, Clip and Memorize nodes
  • MetaOperatorDefs.hpp: add declarations for CUSUM_Op and CUSUM
  • pybind_MetaOperatorDefs.cpp: add Python bindings (aidge_core.CUSUM, aidge_core.CUSUMOp)
  • Test_MetaOperator.cpp: add structure unit test for the CUSUM node

Merge request reports

Loading