## 2 Related Work
### Vision Transformer-Based Approaches  
Vision transformers (ViTs) have emerged as a powerful tool in video anomaly detection, offering new perspectives and capabilities. [PERSON] et al. [33] demonstrated the usefulness of combining the \"Video Vision Transformer\" (ViViT) [34] with neural architectures like U-Net [35] for enhanced performance in anomaly detection. They have shown significant improvements in handling complex video data, achieving higher accuracy in detecting anomalies. Other notable works in this area include [36; 37]. The former dealt with road accident detection from dashboard cameras using ViTs, while the latter provided work on violence detection in videos. These works highlight the diverse applications of ViTs in surveillance, from detecting violent incidents to monitoring road safety, reflecting a significant shift towards more sophisticated, AI-driven surveillance systems. [PERSON] and [PERSON] [38] explored the application of vision transformers for pedestrian image retrieval and person re-identification in multi-camera systems, demonstrating the effectiveness of combining vision transformers with CNN models. [PERSON] and [PERSON] [39] presented AnoViT, a vision transformer-based encoder-decoder model to overcome the shortcomings of conventional convolutional encoder-decoders. The model exploited image anomaly detection and localization by learning both local and global relationships between image patches. Leveraging vision transformers' success in deep learning and imagine classification, [PERSON] et al. [40] suggested a strategy by fine-tuning a pre-trained vision transformer \"ViT-B16\" model to divide video frames into groups for normal and abnormal behavior. Another vision transformer-based framework for anomaly recognition in smart-city surveillance videos, called \"ViT-ARN\", was introduced by [PERSON] et al. [26]. The goal of the framework was to address the limitations of existing automated surveillance systems and it was composed of two phases: online anomaly detection, using a lightweight one-class deep neural network, and anomaly classification, using a vision transformer and a bottleneck attention mechanism. In addition, a multi-reservoir echo-state network was used to enable the assessment of real-world anomalies such as vandalism and road accidents. Furthermore, the ViT model was employed by [PERSON] et al. [41] to carry out spatiotemporal context-based video anomaly detection in surveillance videos. The introduced model consisted of a contextual appearance module and a motion reconstruction module to concentrate on the masked, whole, and partial contextual prediction streams. An enhanced time-series vision transformer (TSViT) was developed by [PERSON] et al. [42] to identify any irregularities in the pedestrians' (victim and follower) gait. In this model, the pedestrians' spatial information is encoded into 2D patterns, which are then passed to the TSViT as tokens. After that, the TSViT is regularized to enable training for small datasets. In addition, the use of ViT in the novelty detection of traffic scenario infrastructure was examined by [PERSON] et al. [43]. They converted the output of Vanilla ViT from predictive class labels to latent representations to fine-tune it. Furthermore, they used ViT to create latent representations for input road infrastructure pictures within a triplet loss-based autoencoder framework. To alleviate the catastrophic forgetting problem in deep learning models, which causes a substantial reduction in overall performance when additional classes are added progressively during training, [PERSON] et al. [44; 45] established a contrastive learning approach for ViT. The approach used ViT as a feature extractor and performed image anomaly detection step-by-step using a contrast learning framework. A self-supervised model called UNETwas utilized by [PERSON] et al. [PERSON] et al. (2018) to address the issue of insufficiently labeled data leading to inaccurate out-of-distribution detection (OOD).