# Low-Cost Active Anomaly Detection with Switching Latency
## 5 Conclusions  
In this paper, we considered the problem of detecting anomalous processes among a fixed number of processes with the framework of the AHT model. The decision-maker can choose only one process to probe at each given time. If the processes of any two consecutive observations are different, a switching across processes will occur. Either observation for any process or switching across processes increases time delay. Each abnormal process incurs cost per unit time until its state is identified and normal processes do not incur any cost. Our objective is to find an active inference policy that minimizes the expected cumulative cost incurred by all the abnormal processes during the entire detection procedure.  
As far as we know, the anomaly detection problem with the objective of minimizing the expected cumulative cost considering the switching costs is first formulated in this paper. For such a problem, we proposed a deterministic policy referred to as DMSC policy that partitions the problem into two cases, one in which the decision-maker directly selects and identifies all abnormal processes, and the other in which all normal processes are excluded and all the abnormal processes are located finally. Furthermore, we proved that the proposed algorithm is asymptotically optimal and order-optimal under error constraints when the ratio of the single-switching delay to the single-observation delay is much smaller than or comparable with the threshold which determines the expected sample size required to declare the states of processes. We also provided numerical simulations to show the strong performance of DMSC policy in the finite regime. The numerical results show the optimality of the DMSC policy in a certain scenario.  
However, the optimality of our proposed algorithm is based on the assumption that all abnormal processes incur the same and constant cost per unit time until their corresponding states are identified. Besides, we focus on the scenario where the number of anomalies is known and the distributions of normal and abnormal processes are completely known. If any of these conditions are not met, the optimality of the proposed DMSC policy may no longer hold.  
In the future, we would like to study such an anomaly detection problem in the scenario where different anomalous processes incur different single-time costs, or the single-time costs change over time. Besides, we expected that the problem can be extended to the situation where the number of anomalies or the distribution of each hypothesis is unknown, which may be more advantageous in some practical scenarios.  
conceptualization, F.Q. and H.F.; methodology, F.Q. and H.F.; validation, F.Q.; formal analysis, F.Q.; investigation, F.Q.; resources, F.Q.; writing--original draft preparation, F.Q.; writing--review and editing, F.Q., H.F., T.Y. and B.H.; visualization, F.Q. All authors have read and agreed to the published version of the manuscript.  
This research was funded by the Shanghai Municipal Natural Science Foundation grant number 19 ZR1404700 and the Yiwu Research Institute of Fudan University.  
The authors declare no conflict of interest.