  Numerous methods for time-series anomaly detection (TSAD) have emerged in
recent years, most of which are unsupervised and assume that only normal
samples are available during the training phase, due to the challenge of
obtaining abnormal data in real-world scenarios. Still, limited samples of
abnormal data are often available, albeit they are far from representative of
all possible anomalies. Supervised methods can be utilized to classify normal
and seen anomalies, but they tend to overfit to the seen anomalies present
during training, hence, they fail to generalize to unseen anomalies. We propose
the first algorithm to address the open-set TSAD problem, called Multivariate
Open-Set Time-Series Anomaly Detector (MOSAD), that leverages only a few shots
of labeled anomalies during the training phase in order to achieve superior
anomaly detection performance compared to both supervised and unsupervised TSAD
algorithms. MOSAD is a novel multi-head TSAD framework with a shared
representation space and specialized heads, including the Generative head, the
Discriminative head, and the Anomaly-Aware Contrastive head. The latter
produces a superior representation space for anomaly detection compared to
conventional supervised contrastive learning. Extensive experiments on three
real-world datasets establish MOSAD as a new state-of-the-art in the TSAD
field.
