Supervision Recovery for Time Series Anomaly Detection via Counterfactual Pairing
Abstract
Time series anomaly detection (TSAD) remains challenging not only because anomaly labels are scarce, but also because temporal anomalies are highly context-dependent. Existing methods often rely on unsupervised or surrogate objectives, producing anomaly scores indirectly rather than learning explicit normal--anomalous distinctions. We propose Counterfactual Pairing with Anomaly Semantics (CAPS), a supervision-recovery framework for TSAD. CAPS formulates temporal anomalies as mechanism-induced effects on normal temporal evolution and recovers matched supervision without target-domain anomaly labels. It learns transferable anomaly semantics from simulated normal--anomalous pairs, disentangles them from normal temporal structure, and organizes them into family-wise modes. Instead of directly using simulated anomalies as target positives, CAPS instantiates the learned semantics as residual-form anomaly effects on target-domain reference trajectories via residual MoE generation. The resulting matched counterparts provide supervision-aligned signals for boundary-oriented detector learning. Experiments on nine benchmark datasets show that CAPS outperforms unsupervised and injection-based baselines, is competitive with supervised-reference baselines, and provides interpretable evidence through anomaly-effect generation and expert association.