Classification and quantification of behavioral patterns and sequences in neuroethological studies, using artificial neural networks Sabbatini, R.M.E. and Cardoso, S.H. Center for Biomedical Informatics of the State University of Campinas, P.O. Box 6005, Campinas, SP 13081-970, Brazil. Email: sabbatini@ccvax.unicamp.br Laboratory of Psychobiology, Dept. Psychology and Education, University of São Paulo, Ribeirão Preto, SP 14040-000, Brazil. Email: shcardos@fox.cce.usp.br Introduction and Aims The identification, isolation and quantification of animal behavioral patterns and sequences represent essential steps for the analysis of observed behavior using the ethological approach. Several statistical techniques have been developed for this purpose, based on Markov chains, stochastic point processes, formal grammar models, cluster analysis, etc. Many of the difficulties and poor performance associated to these techniques can be traced to time-varying transition probabilities between elements of a sequence and the essential non-linear separability of multidimensional patterns. In this paper we present a novel approach to the problem of behavioral pattern classification, using artificial neural networks (ANN). They do not require rigid analytical or causal assumptions, such as parametric distributions or linear separability of patterns, have a higher reliability in presence of noise and uncertainty and are able to provide graded or fuzzy responses. Complex time-ordered phenomena are easily treated by ANNs, in contrast to other approaches. Our aim was to test the feasibility of using ANNs in the task of automatic identification and quantification of complex behavioral patterns, using as input a raw sequence of elementary behavioral items recorded systematically by direct observation. Material and Methods Behavioral data for testing the ANN approach consisted of computer- recorded sequences of aggressive, defensive and escape behavior of brain-stimulated cats (Felis domestica). For this purpose, electrically isolated, straight wire electrodes were implanted into the median areas of mesencephalon and hypothalamus of male adult cats, using a stereotactical platform permanently positioned over the animal's skull (Sabbatini, 1982). The freely moving animals, contained in an observation chamber, were stimulated electrically for brief periods and their behavior was recorded before, during and after each stimulation episode,using ethological techniques. The behavior stream was categorized by an observer into predetermined behavioral units, consisting of an ethogram, of ca. 140 items. The name and time of occurrence, in relation to the start of observation, was recorded for each observed unit, and this record was preserved in computer-readable medium in the form of a sequence of symbols. In order to elicit inter- and intraspecific behavior, all stimulation sessions were carried out in presence of another (female) cat, a small piece of meat, and a tame, living rat. The electrode was moved by hand in small 0.5 to 1 mm increments, and the points which yielded interesting behavioral sequences were explored in more detail. Approximately 100 sequences were selected for testing the ANN classification capability. Temporal information was disregarded for the present purposes. Neural networks were built and simulated using the NEURONET connectionist system shell developed in our laboratory (Sabbatini et al., 1992), running under MS-DOS in a 32-bit microcomputer (80486 PC with 66 MHz clock and 8 Mbytes RAM). The neural network architecture was a non-linear, three-layer, feedforward perceptron. In order to experiment with the effect of hidden layer size on classification performance, we trained and tested identical datasets with 5, 10 and 15 elements. Weight initialization was random, between 0.3 and -0.3, and the activation function was a sigmoid. The learning rule was unmodified backpropagation, with zero moment and learning rate varying from 0.5 to 1.2. Randomization was used to divide the dataset into two: one containing the training examples, and another containing the test examples. Each input node of the MLP was assigned to a different behavioral item in the predefined cat ethogram. A total of 30 behavioral, motor and autonomic reaction items related to agonistic behavior were identified, and the presence/absence of a behavioral item in the input pattern were defined as 1 or 0 numerical inputs. Each output node of the MLP was assigned to a pattern class, as clearly identified by an experienced observer. A total of five behavioral patterns were represented (affective defense, instraspecific aggression, escape reaction, arousal reaction and none), and the correct output pattern for a given input pattern was identified by the observer by setting the value 1 for its corresponding output node, while all the others were set to zero. The training set was presented several times to the ANN, until learning was achieved (defined as a mean square classification error of less than 2 %). At least 5.000 training cycles were used for each configuration. After training (network convergence), the net was used to classify first the examples used for it, and then the test dataset. Performance was evaluated by comparing desired versus obtained output in each case, and indices of accuracy were calculated using the NEURONET program. Results and Conclusions All networks converged to criterion. The ANN was able to classify the five basic behavioral patterns with a 98% accuracy for the training dataset and with 90 % accuracy for the testing dataset. Mixed behavioral patterns (e.g., defense/escaspe) were correctly identified by the ANN, as evidenced by the fact that two or more output nodes in the network had significant values above zero. The trained network was then tested as a sliding window against a time-ordered sequence of behavioral items, picking either 5 or 10 elements at a time. Plotting the graded output of the network in function of time (or sequence position) yielded curves depicting a fuzzy estimate of the occurrence of each behavioral pattern. These curves can be interpreted also as measures of pattern stereotipy (Sabbatini, 1992) The present work provides a demonstration of the usefulness and viability of the ANN approach in computational analysis of observed behavioral patterns in neuroethology. References Sabbatini, R.M.E. - A head-mounted stereotaxic platform for intracranial exploration with movable electrodes. Brazilian Journal of Medical and Biological Research, 15(1): 65 - 71, 1982. Sabbatini, R.M.E. - Quantitative evaluation of the stereotipy of behavioral sequences. Proceed IX Annual Meeting on Ethology, Florianópolis, Brazil, p. 64-68, 1992. Sabbatini, R.M.E.; Carvalho-Júnior, P.M.; Felipe Jr., P.; Freitas, N.C. - NEURONET: a connectionist shell system for automatic pattern classification in Biomedicine. Proceed. I National Forum Nacional on Science and Technology in Health. Caxambu, Brazil, p. 352-355, 1992. ---------------- Submitted to III Computational and Neural Systems Conf. Monterey, CA, USA - July 1994