# A Review of Abnormal Crowd Behavior Recognition Technology Based on Computer Vision
## 4 Research Status of Abnormal Crowd Behavior Recognition
### Deep Learning-Based Methods
#### 4.2.3 Methods Based on Generative Adversarial Networks  
Generative adversarial networks (GAN) learn the data distribution through the adversarial process of the generator and the discriminator. In anomaly detection, a GAN can be trained to effectively generate only normal behavior data; then, the reconstruction error of  
Figure 10: The structure of SDAE. Figure 9: Abnormal behavior recognition process based on hidden feature representation learning. the generator or the output of the discriminator can be used to determine whether the input data are normal. Abnormal behaviors are not within the distribution range of the training data and have poor generation or reconstruction effects; thus, they are identified. The GAN model structure is shown in Figure 11. The abnormal behavior recognition strategies based on GAN can be roughly classified into two categories: the direct reconstruction or prediction error detection method and the enhanced reconstruction method combined with an autoencoder. The core idea of the reconstruction-based method is to train a model to learn the distribution representation of normal video data. In the testing stage, it is determined whether the test sample is abnormal based on its reconstruction error. Specifically, first, a deep learning model, that is, a neural network \(g\), is constructed. Its goal is to learn a mapping relationship so that for any given video segment or video frame \(x\), the output \(g(x)\) processed by \(g\) is as close as possible to the original input \(x\). Secondly, an error function \(f\) is designed, which can quantify the difference between \(x\) and \(g(x)\), that is, the reconstruction error [71]\(\varepsilon=f(x,\,g(x))\). Then, during the training process, efforts are made to find an optimal set of neural network parameters so that for all samples \(x\) in the entire dataset, the corresponding sum (or average, weighted sum, etc.) of the reconstruction errors \(\varepsilon\) reaches the minimum. [PERSON] et al. [72] proposed an Ada-Net network architecture that integrates an attention-based autoencoder with a GAN model. This architecture can adaptively learn normal behavior patterns from video data and enhance the reconstruction ability of the autoencoder through adversarial learning, making the reconstructed video frames indistinguishable from the original frames. Different from the traditional reconstruction error metric based on Euclidean distance, the researchers introduced adversarial loss for the frame discriminator to make the reconstructed frame highly similar to the original frame, thereby improving the reconstruction accuracy of the autoencoder. In addition, [PERSON] et al. [73] proposed an anomaly detection model called NM-GAN, which consists of a reconstruction network R and a discrimination network D, forming a GAN-like architecture. NM-GAN builds an end-to-end framework, mainly consisting of three modules. (1) An image-to-image encoder-decoder reconstruction network with appropriate generalization ability. (2) A CNN-based discrimination network for identifying the spatial distribution pattern of the reconstruction error map. (3) An estimation model for quantitatively scoring anomalies. The entire model is trained in an unsupervised manner. The prediction-based method is based on the fact that a continuous sequence of normal videos has a certain contextual dependence and regularity. Abnormal behaviors are identified by comparing the difference between the observed test frame and its predicted frame. Specifically, given the consecutive t frames of video \(x_{1},x_{2},\ldots,x_{t}\), the goal of the prediction model is to generate the next frame \(\hat{x}_{t+1}\) and strive to make \(\hat{x}_{t+1}\) as close as possible to the actual next frame \(x_{t+1}\). In the  
include unidirectional prediction and bidirectional prediction: unidirectional prediction is usually based on predicting the current frame from the previous few frames. For example, [PERSON] et al.