To reduce the probability of violent crimes, the deep learning (DL) technology and linear spatial autoregressive models (ARMs) are utilised to estimate the model parameters through different penalty functions. In addition, under a determinate space, the influences of environmental factors on violent crimes are discussed. By taking campus violence cases as examples, the major influencing factors of violent crimes are found through data analysis. The results show that campus violence cases are usually caused by the complex surrounding environments and persons. Also, campus security measures only cover a small range, and the security management is difficult. In the meantime, due to the younger ages and lack of self-protection awareness, students may easily become the targets of criminals. Therefore, the results have a positive significance for authorities to analyse the crime rates in a determinate area and take preventive measures against violent crimes.
In recent years, violent crimes on campus are not uncommon. These crime cases not only have a bad impact on the majority of teachers and students but also cause a negative guidance to society, which has received widespread concern [1, 2]. According to previous surveys and data, in China, the number of people who have suffered campus violence has exceeded 57%, and the resulting number of people who have violated the laws and regulations has reached 85%. Therefore, campus violence has become a common issue, which has brought negative impacts to the campus; campus violence not only disrupts the normal teaching order but also has a side impact on the mental health of students. Hence, it is necessary to take effective preventive measures against campus violent crimes, and provide schools with a stable and harmonious campus environment [3, 4].
As a well-developed and widely researched technology in recent years, deep learning (DL) has solved many problems in many fields and has also provided more possibilities for the development of these fields. Especially, in image recognition, feature values can be extracted continuously through convolutional neural networks (CNNs), thereby recognising and classifying images through continuous learning [5, 6]. In addition to images, DL can perform sound detection and diagnosis of sound. Even if it is affected by environmental noise during the sound collection process, sound extraction can also be achieved through feature extraction. Once the spatial factor is added, the difficulty of signal extraction will increase. At this moment, machine learning (ML) can improve the classification accuracy to some extent through abstract learning, thereby discovering the signal defects [7, 8, 9].
Therefore, considering the huge negative impacts of campus violence on society, as well as the recognition advantages of ML, DL technology and linear spatial autoregressive models (ARMs) are combined to compare the compression estimations under the penalty functions of different violent crimes. In addition, the campus violence cases are taken as examples for in-depth analysis, with the hope of discovering the major influencing factors of campus violence, and thereby fundamentally reducing the crime rate of campus violence and providing a safer environment for the campus.
The continuous development of computer technology has promoted the development of DL technology, making DL well-applied in more fields; in addition to image recognition, it also achieved good results in speech classification and recognition . Fawaz et al. (2019) pointed out that deep neural networks (DNNs) have brought revolutionary changes to the field of computer vision, especially the emergence of deeper structures. In addition to images, when processing sequence data such as text and audio, DNNs can also achieve the optimal classification and recognition performance. When using DNNs to process time-series classification, it is found that DNNs show good performance and are evaluated on a univariate time-series benchmark and 12 multivariate time-series datasets. The results show that the training of 8,730 DL models in 97 time-series datasets provides more possibilities for the application of DNNs in event sequence classification . Chen et al. (2018) proposed a long-term memory (LTM) neural network, support vector regression machine and extreme value optimisation algorithm for DL time-series prediction nonlinear learning integration method, which is applied to the information mining and development of implicit wind speed time series; on this basis, the predictions are assembled into a nonlinear learning regression top layer composed of SVRM, and an extreme value optimisation algorithm is introduced to optimise the top layer parameters. The results show that the proposed algorithm model has better prediction performance compared with other models . Karim et al. (2017) proposed a time-series classification method for fully convolutional networks (FNNs) with LTM recursive neural network sub-modules. The results show that the proposed model can significantly improve the performance of FNN, the increase in the model size and the minimal preprocessing of the dataset .
Benton (2017) pointed out that because violence and organised crimes will destroy the development of a country, foreign direct investment is reduced, armed conflicts also lower the sovereign credit rating, and the loan business is also affected to some extent. Therefore, analysis of the cross-sectional time series of the crime rate and municipal debt in Mexico has shown that the governments most in need of cost-effective financing are most likely to be charged higher prices due to violent crimes . Eren and Mocan (2017) used administrative data from a state in the southern United States to discuss the impact of juvenile crime punishment in later life. The results show that juvenile criminal punishment has a greater impact on the adulthood of these teenagers and may make them commit more serious crimes; however, the impact on people around them is almost zero . Gerlinger and Hipp (2020) used the negative binomial and logistic regression models to estimate the impact of high-school dropouts and high-performing schools on violent crimes in a county in California, in the United States. The results show that school dropout is associated with an increase in serious violent robberies, but schools with good grades will not have a significant impact on these types of crimes. Finally, by comparing the juvenile crime model with the juvenile and adult crime model, the viewpoint that reasonable measures should be performed on juvenile delinquency is supported .
In sum, in previous explorations, DL technology is mostly applied to the prediction of images, speech and time. At present, campus violence is frequent, and the degree of punishment will also affect the future lives of teenagers who have committed violent crimes to some extent. Therefore, the DL technology and linear spatial ARMs are utilised to estimate the penalty functions of different violent crimes. By taking the campus violence cases as examples, the major influencing factors of crimes are discovered.
Backpropagation neural network (BPNN) is a feedforward neural network trained according to the error backpropagation algorithm, which has good applications in many fields. BPNN and feedforward neural network are similar in structure; they consist of the input layer, the hidden layer and the output layer. The hidden layer can be a single layer or multiple layers. The difference is that BPNN will also utilise the backpropagation algorithm after the forward propagation ends and obtain the loss function of the difference between the expected output and the actual output of the model. It uses the gradient descent method to adjust the node weights layer-by-layer to improve the fitting degree of the model. This algorithm has an excellent classification effect for those input objects with obvious characteristics. However, when the dimension of the input value is too large or complicated, the convergence speed will also be slowed down, and it is easy for the model to fall into the local minimum. Thus, considering this defect, the hidden layer of BPNN only retains one layer [17, 18, 19].
In addition to feature extraction and classification of images, the signal frequency domain features also show good classification performance. In terms of extracting frequency domain features, this algorithm can also exert its advantages as much as possible to reduce the impact of disadvantages; therefore, BPNN is an efficient classifier. The model structure of BPNN is shown in Figure 1:
In the input layer of BPNN, each node corresponds to a feature. When outputting through the hidden layer node, the hidden layer node needs to be determined, as shown in Eq. (1):
Deep belief network (DBN) is a widely used algorithm in DL. It is a probabilistic generative model that establishes the joint distribution between observation data and labels; the discriminant model is only to predict the labels. This kind of network can be used for both supervised and unsupervised learning as a classifier. Among them, the restricted Boltzmann machine (RBM) is a component unit in DBN; the entire DBN is composed of multiple RBM stacks; the structure of DBN is shown in Figure 2 [21, 22]:
As shown in Figure 2, in the DBN, there are
ARM is a stationary time-series model with a good effect on the prediction of economy, information and natural phenomena. This method does not require much data when predicting, and can complete the prediction task according to its variable sequence. However, ARM will also be limited during applications. For example, it must have autocorrelation, because autocorrelation coefficient is the key. Usually, autocorrelation is used to predict the economic phenomena associated with the previous period. For economic phenomena that are greatly affected by social factors, other variables need to be added, or other methods need to be combined to complete the prediction [23, 24].
Due to the lag in space, the parameter estimation results obtained by the least squares method (LSM) are inconsistent when estimating the parameters of the spatial ARM. Therefore, many scholars have utilised the maximum likelihood estimation method and the generalised matrix estimation method to estimate the parameters. These methods have good verification results in their respective fields. The linear spatial ARM is proposed based on the spatial ARM. Variable selection is an important component of the model and an important link in the analysis of specific data. Generally, the autoregressive variable selection problems are explored specifically for a determinate penalty function. However, due to the large number of penalty functions, different penalty functions have different penalty effects [25, 26].
On this basis, the interface likelihood method is used to find the estimates
If Eqs (5) and (6) are brought into Eq. (4), Eq. (7) will be obtained:
While solving Eq. (7) and obtaining the maximum value, the estimated value
The basic principle of the penalty function is to compress the smaller parameters to 0 as much as possible, thereby eliminating them finally. Therefore, not only can the parameter be estimated but also the selection of variables can be realised. Therefore, the following three penalty functions are introduced, that is, least absolute shrinkage and selection operator (LASSO), adaptive least absolute shrinkage and selection operator (ALASSO), and smoothly clipped absolute deviation (SCAD). The estimates of these functions are shown in Eqs (9–11):
Equation (9) is the estimator of LASSO penalty. This method has small variance and fast calculation speed, but it is biased for the parameter estimation. Equation (10) is the estimator of ALASSO penalty, where
The subsequent orders of the ARMs established by different types of signals are different. At this moment, to ensure that the dimensions of the regression parameter vectors of all signals are the same, the smallest model lag order in a set of ARMs established by all signals in the dataset is used as a criterion for determining the parameter vector dimension.
After obtaining all the regression parameters of the ARM, these models are combined into parameter vectors; then the DBN model is utilised to learn and extract features. Since RBM nodes are binary, it can be seen that each node has only two states: 0 and 1. Besides, the nodes of each layer are not directly connected; therefore, the state probability of each node can be expressed by Eq. (14) to Eq. (17):
Therefore, on this basis, the possible probability of the combined allocation of the visible layer and the hidden layer is shown in Eq. (19):
After summing all the possible hidden layer node states, the probability distribution of the visible layer unit state vector is obtained, as shown in Eq. (20):
When training RBM, it is necessary to adjust the weights and offsets, thereby reducing the structural energy and then reaching a stable state. The parameters are adjusted, as shown in Eq. (21):
On this basis, an output layer is added to the DBN structure as a classifier. At this moment, the weight and offset of the DBN network need to be used as the feature values of the structure, and the network state is continuously optimised through training . After the DBN is trained, the number of nodes in the output layer is consistent with the number of signal types that need to be identified. This requires the utilisation of supervised learning of the BPNN algorithm to adjust the optimal parameters of each RBM, so as to optimise the entire network. BPNN can adjust the feedback layer-by-layer during the adjustment process; then, it connects the RBM to obtain the optimal parameters.
Here, the campus violence cases are taken as examples. The violent crime cases from 2006 to 2010 in a determinate area are selected, and the simulation analysis is conducted through different punishment functions. Finally, the parameter estimations are compared.
According to statistics, from 2015 to 2019 in this area, the local procuratorate has prosecuted 238 violent crimes in and around the campus, involving 340 people and covering nearly 100 schools, including universities, primary schools and high schools. The data statistics are shown in Figure 3:
As shown in Figure 3, violent incidents occur on and off campus every year. According to the number of incidents and schools, the incidents involve various schools, and the frequency of occurrence is high, which threatens the safety of teachers and students. Since 2016, the number of cases and the number of crimes has declined year by year, which is also a happy fact.
In the analysis of violence cases, the model parameters are set. It is assumed that the total number of campus areas studied is
In the study of campus violence, when different parameter values are applied, the corresponding results are also different. Therefore, when using LASSO, ALASSO and SCAD penalty functions for analysis, different results are obtained. When
According to the above results, the difference in
According to the results shown in Figures 4–7, as the sample size and the number of simulations increase, the
When analysing violence on campus, the influencing factors include the identity, education, age, crime area, crime incident and the modus operandi (MO) of the criminals, as well as the age, identity and outcomes of the victims. Therefore, in this determinate area, the population (X1), the proportion of non-school groups (X2), the median income (X3), the percentage of people with a bachelor's degree or above (X4), the proportion of high-school graduates aged 25 years and above (X5), the percentage of children born in unmarried families among all children (X6), the percentage of children living with parents among all children (X7), the percentage of divorced couples (X8) and the percentage of people without full-time jobs (X9) are selected as research targets. The statistical results of these parameters are shown in Table 1:
Data parameter estimation of crime influencing factors
Based on the above results, the lag coefficients of LASSO, ALASSO and SCAD are estimated to be 0.5801, 0.5811 and 0.5801, respectively. According to these results, among all the factors analysed, the three penalty estimates have some parameters compressed to 0 relative to QMLE, and the signs of non-zero parameters are consistent with the signs of QMLE estimates. Among the above variables, the number of variables that LASSO can compress to 0 is 2, and there are 5 variables that ALASSO and SCAD can compress to 0. Therefore, among the three penalty functions of LASSO, ALASSO, and SCAD, ALASSO and SCAD can compress the variables more efficiently.
For those variables that cannot be compressed regardless of which penalty function is used, attention needs to be paid, indicating that these influencing factors are vital to campus violence. For example, the number of non-school groups around the campus, the proportion of children born in unmarried families, and the proportion of divorced couples are positively correlated with the crime rate, which means that the more non-school groups around the campus, the greater the possibility of violent crime will be; the higher the proportion of children born in unmarried families, the higher the crime rate will be. This is because that when children are born in an unmarried family, they may lack family education and are prone to psychological and personality defects. The higher the proportion of divorced couples, the higher the crime rate will be; the reason is that men are more prone to extreme behaviours than women.
ALASSO, adaptive least absolute shrinkage and selection operator; LASSO, least absolute shrinkage and selection operator; SCAD, smoothly clipped absolute deviation.
In sum, when analysing the influencing factors of violent crimes, it is found that family has a greater impact; in addition, family structure and family relationships will affect the development of children to some extent. Whether from the psychological or personality perspective, this will affect the ideological awareness of children, making them suffer from the negative impacts of the family and society, which, in turn, leads to criminal thoughts. Therefore, family education for children is more important among many educations; any change in the family may become a cause of juvenile delinquency, which will also have a greater impact after the teenagers enter society.
Based on the spatial ARMs, BPNN and DBN are utilised to obtain features. By setting different areas, numbers and variance values, the parameters are compressed and estimated. Then, the two penalty functions ALASSO and SCAD can be obtained, which can perform the compression estimation more effectively. Also, it is found that some family associated factors have a greater impact on teenagers and younger adults, which should be valued while considering the crime rate. However, the influencing factors selected in the research process are less. In the future, the influence of social factors will be analysed to further verify the importance of family relations, which will play an important role in preventing juvenile delinquency. The utilisation of DL technology and linear spatial ARMs to explore violent crimes has a positive significance for investigating the crime rate in a determinate area and the surrounding crime situation. To some extent, it can fundamentally prevent the occurrence of violent crimes.
Data parameter estimation of crime influencing factors