Abstract:Anomaly detection is one of the research focuses in machine learning and data mining, which is mainly used in fault diagnosis, intrusion detection, and fraud detection. There have been many effective related studies, especially those of the anomaly detection method based on isolation forest, but there are still many difficulties in the processing of high-dimensional data. A new anomaly detection algorithm, k-nearest neighbor based isolation forest (KNIF), is proposed. The method uses hyperspheres as an isolation tool, utilizes the k-nearest neighbor method to construct an isolation forest, and constructs a distance-based outlier calculation method. Sufficient experiments show that the KNIF method can effectively detect anomalies in complex distribution environments and can adapt to application scenarios of different distribution forms.