PREDICTION OF FIGHT OR FLIGHT RESPONSE USING ARTIFICIAL NEURAL NETWORKS

The modern society has posed several threats to the public. Public security is declining with increasing anti-social behaviour. Cases of rape and terrorist attacks have become increasingly common and there is a strong demand for a security system to control such modalities. Anti-social behaviour is a key issue of public concern. Public perceptions, however, have been improving recently. The vital response to physical and emotional danger is called fight or flight response. It is a basic survival mechanism occurring in response to a specific stimulus, such as pain or the threat of danger. Predicting the flight and fight response is an important aspect to identify possible areas susceptible to such events and provide emergency assistance to the victims involved. This study analyses various physiological changes associated with fight or flight response and proposes an approach to predict measures that determines whether an individual is under fear caused due the perceived threat. The proposed approach uses feed forward neural networks with back propagation algorithm. With the physiological changes such as blood pressure, heart rate and respiratory rate as inputs, the optimal configuration of neural network was configured and the proposed system is able to predict the measure of fight or flight response with minimal error. By monitoring and identifying the fear measure it is possible to prevent or reduce the damage to the society by activities such as rape and terrorist attacks.


INTRODUCTION
The fight or flight response is a physiological reaction that occurs in response to a perceived harmful event or threat. To produce the fight-or-flight response, hypothalamus of the brain activates two systems: The sympathetic nervous system and the adrenal-cortical system. The sympathetic nervous system initiate reactions in the body using nerve pathways and the adrenal-cortical system makes use of the bloodstream. When the hypothalamus signals the sympathetic nervous to activate, the body becomes tensed, speeds up activity and becomes alert. It sends out impulses to smooth muscles and glands and signals the adrenal medulla to release epinephrine (also known as adrenaline) and norepinephrine (also known as noradrenaline) into the bloodstream. These "stress hormones" can cause several changes in the body, such as increase in blood pressure and heart rate. At the same time Corticotropin-Releasing Factor (CRF) is released into the pituitary gland by the hypothalamus, to activate the adrenal-cortical system. The pituitary gland (which is a major endocrine gland) secretes the hormone ACTH (or adrenocorticotropic hormone). It moves through the bloodstream to arrive at the adrenal cortex, where it activates the release of several hormones that prepares a human body to handle the threat. The physiological changes associated with increased secretion of these hormones cause the fight or flight response.

AJAS
Fight-or-flight response measure is an important performance indicator of an individual which provides a better perception of possible occurrence of a harmful event. This study proposes an approach for prediction of fight and flight response to measure and identify individuals susceptible to harmful events. Automatic prediction can be achieved with the help of Artificial Neural Networks (ANNs), whereas the threshold value can be obtained by taking into account the different physiological and behavioural conditions of the person experiencing fear. This estimation has a lot of applications such as remote patient monitoring in healthcare systems and emergency responders for public safety. Thus a prediction model that can predict the measure of flight or fight response of an individual can be an effective tool for the police in making proper plans for preventive interventions and to provide better safety and security.
The rest of the paper is organised as follows: Section-II presents the related work, Section-III briefly presents our proposed system including an overview of Artificial Neural Networks (ANNs) used in this study. In section-IV experimental results and analysis based on the corresponding data is provided. Discussion and future scope is provided in section-V.

RELATED WORK
There have been several studies on fight or fight response. Several work have considered only few of the many physiological changes associated with fear or has been extensively used for health care monitoring. A few emergency responder system exists but it either requires explicit interaction of the user or use geological monitoring.
The term "fight-or-flight" is originally formulated by (Cannon, 1929) representing various behaviours occurring in response to the threat. Cannon (1932) in his study proposed that stress-responses may cause physiological changes such as reduced blood flow to gut (extremities during fight-or-flight), increased blood flow to lungs and increased blood glucose levels. Williams and Williams (1993) in their laboratory studies on assessing the stress had shown that stress (fear) results in increased blood pressure, heart rate and reduced blood flow to the heart. Diest et al. (2001) in their study of Respiratory responses had shown that Hyperventilation is one of the physical change associated with fight-or-flight. Studies have proved that "Age" plays a crucial role in deciding the "threshold value" of a person. i.e., "fight-or-flight" response of the person changes (decreases) with the ageing (Elhamdani et al., 2002). These work support the fact that fight or flight response can be measured by the physiological and behavioural changes in human body. However besides the factors mentioned above several other factors can be taken into consideration which will have an impact in determining the fight or flight response. Gao et al. (2005) proposed vital signs monitoring and patient tracking over a wireless network. This system makes use of two types of non-invasive vital signs sensors-a pulse oximeter to measure heart rate and blood oxygenation level and a blood pressure sensor to measure systolic and diastolic blood pressure. It also uses geolocation sensors for location sensing. Lo et al. (2005) proposed a wireless body sensor network for health care monitoring. It included various parameters such as ECG or electrocardiogram, Temperature, Pulse Oxiometer and Accelerometer. Blount et al. (2007) designed and built over a platform called personal care connect for remote health care monitoring. Paradiso (2003) proposed a wearable health care system for vital signs monitoring. It monitored respiratory rate and ECG signal and used GPRS/UMTS connection to transmit the data to their system (called WEALTHY). These work support the fact that various vital signs can be measured and transmitted wirelessly. However these system has been established with healthcare and patient monitoring. This study is built with focus on improving public safety by helping the police in preventive interventions to genuine threat perceived by an individual.

PROPOSED SYSTEM
The idea of ANN algorithms was originally obtained from simplified models of human central nervous system activity (McCullogh and Pitts, 1943;Hopfield and Tank, 1986) that can be used in machine learning and pattern recognition. Neural network can solve complicated and wide range of tasks. Three major concepts in neural network research are Connection strength, Excitation/Inhibition and Transfer function (ANN, 2014).Connection strength describes the strength of connection between one neuron and another. This indicates the extent to which the action of one neuron influences the other. Excitation/Inhibition represents the activity of one neuron which in turn will either increase or decrease the activation rates of the connected neurons. Third important factor in determining a neurons response is the transfer function which determines how fast a neuron responds on receiving the inputs.

AJAS
In this study, a feed forward neural network with backpropogation algorithm is being used. The basic element which processes neural network is called a node that represents human neurons present in the central nervous system. The nodes are arranged in a series of layers. The nodes in a given layer are fully connected to the nodes in the next layer (Fig. 1). The input layer is composed of the input parameters(nine in our case) and the output layer consists of the classes(one in our case). All the layer that lie between the input and the output layers are called "hidden layers". The complexity of the ANN depends on the number of inputs, hidden nodes, layers, outputs and connections.

Architecture
The feed forward neural network used in this study consists of three layers-input, hidden and output layer. The input layer consists of the input parameters (9 in our case) and the output layer consists of output value (1 in our case). Any layer between the input and output layer is the hidden layer which is used for computation. Only one hidden layer is used in this system. Having multiple hidden layers will slow the computation speed especially when there is a demand for computing faster. On the other hand having very few neurons in a hidden layer can prevent convergence. Additional nodes provide some excess capacity-additional weights to store/release signal to the network during iteration. Moreover as the iteration progresses it is easy to prune. In the proposed work the hidden layer consists of 6 neurons. Sigmoidal function is used as the activation. We have investigated a variety of multilayer backpropagation algorithm. All networks has 9 input nodes, one for each parameter and one output node from classification. We present here the results obtained with a very simple network, with only one hidden layer with 9 nodes. This configuration labelled hereafter (9, 6, 1), is depicted in Fig. 1. We have used sigmoid as our linear transfer function.

Inputs
The input consists of 9 nodes ( Table 1). Based on the physiological changes associated with fight or flight response 8 of the 9 inputs are the important vital signs that has been considered and the 9th input is for tolerance. Since fight or flight response may not exactly refer to a harmful event, as the vital signs may vary for different individual in different situations. Tolerance has been introduced to avoid inconsistent or wrong classification.
The parameters for input are the following. The first input parameter is age taken over a range of 1 to 100. However statistically the age of an individual susceptible to a harmful event does not span over the whole range. Hence more emphasis has been provided for the individuals between age 10 and 70. The next ECG (Electrocardiogram) which is used to measure the electrical activity of the heart. The normal ECG count for an adult ranges from 90 to 140 mmHg and for a child ranges from 80 to 110 mmHg. When perceiving a harmful event the heart rate increases.

AJAS
The next parameter is the pulse rate. In a normal adult body the Pulse Rate (PR) ranges from 60 to 100 beats per minute. In the case of children, this varies from 80 to 100 beats per minute. It represents the tactile arterial palpation. The temperature of the individual is also taken into account and varies from 35 to 38.3 Celsius. Low body temperature makes veins in the skin to constrict and sends more blood to major muscles. A person experiencing the fight or flight situation tends to sweat more and may often lead to high conductance in the skin. Hence, skin conductance is also an input parameter which can be also called as galvanic skin response.
(Electroencephalogram) is the measure of electrical activity along the scalp. It is described in terms of rhythmic activity and transient. The rhythmic activity is divided into bands such as delta and theta by frequency. Each bands signifies a state of mind. Beta range having a frequency of 15-30 Hz generally refers to that state of mind when an individual is alert. Electromyogram (EMG) is the measure of electrical activity of the muscles. When a person is subjected to fear, the eye muscles tend to expand and the muscles in the surface of the skin tend to contract. Respiratory rate of an average adult ranges from 12 to 20 breaths per minute and for a child ranges from 15 to 30 breaths per minute.
There are several challenges related to each of the factor such as body temperature of an individual residing in cold region, an individual with predefined illness, with high or low heart rate irrespective of situations. In such cases tolerance level is used to accommodate the difference.

Output
The output layer consists of only one neuron. The output obtained as a result denotes the measure of fight or flight response. It is a cumulative measure of the given input parameters. During the training phase, the difference between the obtained result and the expected result is propagated backwards starting from this layer. Over time the neural network learns through the given set and for a given set of provided inputs it would be able to predict the corresponding output. The performance of the network is measured is based on how precise it could be predicted.

Algorithm
The back propagation algorithm comprises a forward and backward pass through the network. For each input vector x in the training set the following steps are to be followed: Compute the network's response a, Calculate the activation of the hidden units: Calculate the activation of the output units: Compute the error at each output: e2 = a-t Take the derivative of the activation. This gives us the 'direction' that we should move towards: Pass back the error from the output to the hidden layer: Adjust the weights from the hidden to output layer: Adjust the weights from the inputs to the hidden layer: w 1 = w 1 + (x×d 1 )

Backpropagation-the Forward Pass
During the forward pass all weight values are unchanged. The inputs x i ,…,x n are multiplied by the receptive weights for each hidden unit-W 1 j : (W 1 j • X) net_h value of H j (for H 1 -H) Each Hidden unit sums the activation that it receives, from the weights that fan into it from the units it is connected to in the input layer. The summation of the inner product is passed through the (sigmoid) activation function which for the hidden units is: The hidden units h i ,…,h p are multiplied by the receptive weights for each output unit-W 2 k : Each Output unit sums the activation it receives, from the weights that fan into it from the hidden units it is Science Publications AJAS connected to. The summation of the inner product is passed through the (sigmoid) activation function (also known as the threshold logistic function) which for the output units is:

Hidden to Output Weight Adjustment
The connectivity within an MLP network is complete. A weight connects each j'th unit in the hidden layer to the k'th unit in the output layer. The result of the forward pass through the net is an output value a k for each k'th output unit. This value is subtracted from its equivalent value in the Target giving the raw error signal (t k -a k ).
The error measure at each unit is calculated by multiplying the raw error by the 1st derivative (gradient) of the squashing function, (a k (1-a k )), calculated for the unit k: The δ k value is then multiplied by the value of out for the j'th unit in the preceding (hidden) layer and by η, which scales the value by which the weights should be adjusted, to give ∆W: The weights are then changed using this: W kj (t+1) = W kj (t) + ∆W where, W k is the weight value from the j'th unit in the hidden layer to the k'th unit in the output layer, W kj (t+1) is the new value of the weight, δ k is the value of for the k'th unit in the output layer, η is the learning rate, a k is the output value for the j'th unit in the hidden layer.

Passing Back the Error-Output to Hidden
The Hidden units have no target vector, therefore it is not possible to calculate an error for them by subtracting the output from the target. BP propagates the error computed over the output layer back through the network to the hidden units. To achieve this the value calculated over the output value is propagated back through the same weights to generate a value for each hidden unit.
This process is performed for all units between the hidden and output layer. During the reverse pass, the weights multiply the value from the k'th unit in the output and pass it back to the j'th hidden unit.
The value of for the j'th hidden unit is produced by summing all such products from each output unit and then multiplying by the derivative of the squashing function. D1j = hj(1-hj) Σk = 0 w2jk d2k

Input to Hidden Weight Adjustment
The propagated values are used in turn to adjust the Input to Hidden weights. The Input to Hidden weights are adjusted using this Delta, as for the output layer. The result is the value by which the weights should be adjusted, i.e., ∆W.
To change the weights between the inputs and hidden units as follows: There are two ways of presenting data to a neural network during training, namely: Batch and incremental training. In incremental training, each of the input pattern or training data is presented to the neural network and weights are updated for each data presented, thus the number of weight updates will be equal to the size of the training set. In batch training, all of the input pattern or training data are presented to the neural network one after the other and then the weights are updated based on a cumulative error function. In this network Levenberg-Marquardt Algorithm (LMA) is used for initial batch training and GDR with momentum is used for adaptive learning.
GDR with a momentum parameter speeds up the training time and stabilises the learning process by scaling the current weight adjustment so that it is proportional to previous weight change. The learning equations including momentum are shown here for the input to hidden unit weights. The same applies for the second layer of weights: LMA is more robust than gauss newton algorithm and tend to perform efficiently for a small scaled neural network. The weight equations corresponding to this algorithm are shown here:

Science Publications
AJAS where x represents the weights and biases of the network, J represents the Jacobian Matrix, µ is the training parameter and e is a vector of network errors.

Method Overview
The system designed to predict fight or flight response consists of three phases.

Training Phase
This is the initial phase of the system. The neural network (9, 6, 1) has to be undergo initial training before prediction. This algorithm proposed is a supervised learning method and requires a dataset for training. The dataset is a collection of records with the different input values and corresponding expected outputs. During this phase, the synaptic weights and the bias of each neuron across different layers are adjusted in order to produce a result that is very close to the expected result. The trained neural network is obtained as the output of this phase.

Implementation Phase
This is the second phase of the system. During this phase, the different input values-AGE, ECG, PR, TEMP, GSR, EMG, EEG, RR and DIS is obtained from the user and passed into the network. The value of AGE and DIS may not change frequently. The fear or flight measure is obtained as the output along with the position of the individual. Based on the obtained measure, it is possible to classify the intensity of the response ( Table 2). Based on this intensity, the emergency responding team or the police can take corresponding actions.

Learning Phase
This is the last phase of the system. The feedback obtained from the emergency responding team or police on the accuracy of prediction is used to adapt the neural network. This step essential in order to sustain the performance of the system and make it robust. The precision of prediction increases with increased learning.

EXPERIMENTAL RESULTS
Here we illustrate this method using nntool box in MATLAB. We use 9 factors to measure the flight and fight response shown in Table 1. The dataset used for training the neural network is obtained by random sampling (using real-time hardware data (http://www.cookinghacks.com/documentation/tutorials/ehealth-biometricsensor-platform-arduino-raspberry-pi-medical; http://store.neurosky.com/products/mindwave-1)). We have normalized our input data between 0 and 1 by using the minimum and maximum values of each parameter except disabilities which has been normalized in the range 0 to 2. The output or the fear measure is the cumulative value of these factors. The final data set has 7500 records. We then randomly sort these records into two independent sets of 5000 and 1500 objects for training and testing respectively. The learning and momentum coefficients were n = 0.01 and α = 0.01 for all layers. The n decrease factor was 0.1 and n increase factor was 10. We have verified however that our results are robust over a large range of these parameters. We have used Gradient descent with momentum as adaptive learning function and Levenberg-Marquardt Algorithm (LMA) (Moré, 1978) is used as the training function.
The predictive nature of the network not only provides useful information on the fight or flight response of each victim. The distribution of output value for the correctly classified fits, more when compared to the wrongly classified. Based on the output value three classes or categories are established. They are normal, nominal fear and extreme fear ( Table 2). In general victims in genuine fight or flight situation are classified either under extreme fear or nominal fear.
The regression plot (Fig. 2) of the neural network after training it with 5000 records. The regression plot show the distribution of the data points used in the dataset during training, validation and test. It also presents a overall distribution. The R value is an indication of the relationship between the outputs and the targets. In our case the training set indicates a good fit. When simulated using the TEST data, our neural network was able to identify 83% of them correctly. Table 3 shows the estimated and obtained output for 10 different samples. The samples are unique and contain different input parameter.

AJAS
The result obtained as a result of passing the inputs to the neural network is tabulated. The difference between expected and the obtained fight or flight response measure is the error difference. This difference signifies how precise the network was able to predict. The average deviation of the error or the difference is approximately 0.3%.

DISCUSSION
Prediction of fight or flight measure is important at all levels of the society. The hormones secreted during a perceived threat triggers several physiological changes. The previous research work has identified some of the factors associated with the fight or flight response. Williams and Williams (1993) identified increased blood pressure and heart rate. Diest et al. (2001) identified respiratory rate as one of the important factors. Age also plays an important role. By including other factors such as galvanic skin resistance to indicate sweat, electroencephalography for mental state and electromyography for tensing muscles, a new system has been proposed.
A set of 5000 record were used for training and a regression plot analysis was performed. Based on regression plot analysis, the value of R obtained is closer to 1 and this indicates that the dataset used for training the algorithm is a good fit and the neural network is well suited for prediction for this scenario. After training a test data set was used to validate the performance of the network. The simulation on the test data set illustrates that the distribution of output value correctly classifies fit of the highest level, when compared to the wrongly classified ones. The average error deviation of 0.3% between the expected and the obtained results indicates that the neural network is able to predict the fight or flight measure very close to the expected output. This error deviation tend to decrease with increased adaptation with real time data i.e., the feedback obtained in real time can be propagated back into the network for adaptation of the synaptic weights and bias values.
The extensive research on vital signs monitoring in healthcare system signify the feasibility of this system. The work done by (Gao et al., 2005;Lo et al., 2005) in vital signs monitoring using wireless sensors shows that implementation of the proposed system using wireless sensors can be implemented in real time.

CONCLUSION
The proposed work illustrates that the ANN artificial intelligence method is able to produce prediction to fight or flight response. Despite of the fact that the data set was obtained from random sampling with the help of min and max values of each parameter carried out. ANN uses reasonably well predicted values of fight or flight response. By using real time data set to train and adapt from feed backs, one can improve predictions further.
Though our system was able to predict the fight or fight measure with minimal error, more emphasis has been given to the system as such and hence designing the hardware for this system possess various challenges. Fear is very common. The genuineness of the perceived threat is very important and may not be the same in different cases. For example: An individual watching a thriller movie is equally susceptible to fear. It should also be noted that continuous monitoring of the individual may not comply with the privacy of that individual. Addressing such challenges by creating a suitable hardware design is one of the future prospects of this research. Our initial success with simple back propagation has encouraged us to pursue other optimal choice of network parameters e.g., number of hidden layers and the node and thereby create learning and momentum coefficient. The future work may also include optimizing this system by evaluating the performance of different algorithms to train the neural network.