Understanding Vocalization Might Help to Assess Stressful Conditions in Piglets

Simple Summary This research aimed to analyze the possibility of assessing piglets’ welfare using the records of their vocalization. The trial was done in a pig commercial farm, and we recorded the vocal signals from piglets in several stressful exposure situations. Data mining techniques were applied to the processed signals in order to obtain a stress classification using the recorded data. We found that, using the piglets’ vocalization, it was possible to identify the most frequent stressful conditions at the farrowing phase, namely: pain, cold and hunger. Abstract Assessing pigs’ welfare is one of the most challenging subjects in intensive pig farming. Animal vocalization analysis is a noninvasive procedure and may be used as a tool for assessing animal welfare status. The objective of this research was to identify stress conditions in piglets reared in farrowing pens through their vocalization. Vocal signals were collected from 40 animals under the following situations: normal (baseline), feeling cold, in pain, and feeling hunger. A unidirectional microphone positioned about 15 cm from the animals’ mouth was used for recording the acoustic signals. The microphone was connected to a digital recorder, where the signals were digitized at the 44,100 Hz frequency. The collected sounds were edited and analyzed. The J48 decision tree algorithm available at the Weka® data mining software was used for stress classification. It was possible to categorize diverse conditions from the piglets’ vocalization during the farrowing phase (pain, cold and hunger), with an accuracy rate of 81.12%. Results indicated that vocalization might be an effective welfare indicator, and it could be applied for assessing distress from pain, cold and hunger in farrowing piglets.


Introduction
Although it is of great relevance, the assessment of animal welfare status in commercial farming is still a difficult task. The Farm Animal Welfare Council (FAWC) proposed the "Five Freedoms" in order to guarantee the minimal welfare conditions in which the animals must be free from thirst, hunger and malnutrition; free of discomfort, pain, injury and disease; should have the freedom to express normal behavior; and be free from fear and stress. By this approach, it is necessary to develop accurate tools to estimate the animal welfare status and to ensure applicability on field.
Distress related vocalization is of particular interest as an indicator of impaired welfare [1,2], and it is an objective and noninvasive procedure that has been studied to estimate pigs' welfare [3][4][5][6]. There are other techniques to recognize stress in animals, e.g., a stress response as an adrenaline release can be accompanied by changes in the rates of specific types of vocalization [7] while other studies suggested an increased rate of vocalization in pigs after receiving corticotrophin injections [8]. Subsequently, increased vocalization was observed in piglets from sows treated with cortisol [9]. According to [2], the energy emission parameters, frequency, and duration of calls are particularly suitable for characterizing the type of call. To analyze the data from vocalization records, some methods can be used to assist in the identification of stress situations. These techniques can transform raw data into relevant information and offer support for the decision making process. In particular, data mining techniques have shown promising results in the discovery of knowledge in the field of animal production [10][11][12]. Data mining is a key step in this process by identifying valid, unknown, potentially useful, and understandable patterns [13]. These patterns can be useful to describe unknown structures and/or to predict new situations on animal behavior.
The objective of this study was to classify different distress circumstances (pain, cold and hunger) from the vocalization of piglets in the farrowing stage by using data mining techniques.

Experimental Section
We recorded individual vocalization from 40 piglets (20 males and 20 females) aged 22 weeks under different stress situations during the farrowing phase. For the sound recording, the animals were randomly selected and individually isolated in a corridor (Figure 1(a)) with limited visual contact with others through a slatted wall. Vocal signals were recorded from the animals under the following situations: normal (baseline, within their thermal comfort zone, pain-free and with access to nursing); followed by the pain distress (consisting of a firmer squeeze than a simple restraint by the animal handler, Figure 1(b)). After the distress by assumed pain, the animals returned to their pens for 2 hours, when normal behavior was observed, and afterwards they were again randomly selected and exposed to the next distress. For the thermal stress test, the animals were exposed to a temperature of about 25 °C for 30 min, in which is considered below the thermal comfort zone for piglets during this stage [14]. Under thermal comfort temperature, the animals were apart from each other, indicating the absence of cold. After the cold stress exposure, the piglets became crowded in order to avoid heat loss and keep warm.
Similarly to the previous trial, the animals were kept in the pens for 2 hours, prior to the hunger distress. Nursing was constrained from the piglets. The sow's body was covered with a rubberized fabric tied at the ends with strings, covering the teats (Figure 2(a)); thus, preventing the piglets from nursing. The vocal signal was recorded 30 minutes after the piglets had their last nursing bout. Although this might also indicate frustration for not reaching the sows' teats, it was assumed they were hungry as they approached the sow to nurse immediately after the removal of the rubberized fabric ( Figure 2  A Yoga ® unidirectional microphone positioned about 15 cm from the animals' mouth was used for recording the acoustic signals. The microphone was connected to a Marantz ® PMD 660 digital recorder, where the signals were digitized at the 44,100 Hz frequency. The recorded sounds were edited and analyzed by using the Praat ® software. Each signal was divided into three samples, and for each sample had 20 attributes extracted related to sound, sex identification, and stress situation ( Table 1). To determine the stress conditions, the data were processed using Weka ® (3.5) software [15], applying the C4.5 decision tree algorithm, (known as J48 in the Weka ® environment), considering cross-validation samples with 10% (10-fold cross-validation), e.g., the initial data were randomly partitioned into 10 mutually exclusive subsets or folds, each of approximately equal size. Training and testing were performed 10 times. For classification, the accurate estimation is the overall number of correct classifications from the 10 iterations, divided by the total number of instances in the initial data. In general, stratified 10-fold cross-validation is recommended for estimating accuracy due to its relatively low bias and variance [16].
This field trial was approved by the Ethics Committee, Unicamp, n. 2224-1/2011.  Figure 3 shows the vocalizations' sonogram of piglets in (a) normal welfare status (baseline); (b) in assumed pain; (c) feeling cold, and (d) in hunger distress. The curve of sound intensity showed different profiles for the four studied conditions. Differences in the frequency of pitch were also observed; however, the investigation of the formants differences was more complex. The sonogram represents the initial examination of the data, requiring the extraction of numerical data from these parameters to determine the stress conditions.  It was possible to classify the four distress conditions from the recorded vocalization, by using the C4.5 algorithm from the Weka ® software. In a previous study [10], an algorithm was developed based on Artificial Neural Networks to classify the vocalization of piglets during the farrowing stage, in situations of dispute over the sow's teats and of eventual risk. Table 2 presents the hit rate (%), the Kappa statistic, and the number of rules generated by the J48 algorithm, considering the different pruning levels (minimum number of objects per leaf). The number of objects per leave corresponds to the minimum number of examples of the test set used to evaluate the generated rules (tree leaves). It is observed that in all situations, the Kappa statistic ranged from median (0.4 to 0.75) to excellent (>0.75) [17]. The Kappa statistic procedures is used to measure the reliability between predicted and observed categorizations of a dataset, while correcting for an agreement that occurs by chance. It ranges from 0 to 1, where 0 indicates no confidence and 1 the maximum confidence of the classifier. In particular, the accuracy rate (81.69) yielded the largest Kappa statistic (0.75) for a minimum number of objects per leaf equal to 9. However, this scenario generated the largest number of rules, providing a more complex decision tree. Therefore, for the purpose in question, it is more interesting to increase both the accuracy rate and the Kappa statistic than to get a more simplified decision tree. An increase of the accuracy rate (%) occurred with the increase of the minimum number of objects per leaf up to the maximum value (82%). Then, the accuracy rate (%) tended to decrease (Figure 4). The same behavior was observed for the Kappa statistic values (Figure 5), and for the number of rules ( Figure 6). The results indicated that, for this dataset, the best model (decision tree) was the one whose minimum number of objects per leaf is equal to nine.

Number of objects per leaf
The decision tree was generated using the C4.5 algorithm, considering that the minimum number of objects per leaf is equal to nine (Figure 7). Through the generated rules, it was possible to classify the four types of distress with an accuracy rate of 81.69%. The precision rate (a type of accuracy for a specific class of the data) can be thought of as a measure of exactness. The class with the highest precision was the pain distress (0.99), followed by the normal welfare status (baseline) (0.90), the cold distress (0.89), and the hunger distress (0.69) ( Table 3).  Twelve rules were generated from the decision tree (Table 4), and they may aid the development of an algorithm for the automatic identification of distress in piglets. From these rules, we enhance rules number 1, 3 and 12 which were sufficient for identifying the animal in pain. Table 4. Description of the rules found within the decision tree.

Rule
Description 1 If the average value of the formants is 2,671.99 and the duration of the signal is 0.28, then the piglet is in normal condition. 2 If the average of formants is 2,671.99 and the duration of the signal is >0.28 and the maximum amplitude is 0.34 and F2-F3 is 1,111.98 and the sum of the formants is 9,583.13 then the piglet is hungry. 3 If the average of formants is 2,671.99 and the duration of the signal is >0.28 and the maximum amplitude is 0.34 and F2-F3 is 1,111.98 and the sum of the formants is >9,583.13 then the piglet is in normal condition. 4 If the average of formants is 2,671.99 and the duration of the signal is >0.28 and the maximum amplitude is 0.34 and F2-F3 is >1,111.98 and the sum of the formants is 9,743.14 then the piglet is feeling cold. 5 If the average of formants is 2,671.99 and the duration of the signal is >0.28 and the maximum amplitude is 0.34 and F2-F3 is >1,111.98 and the sum of the formants is >9,743.14 then the piglet is hungry. 6 If the average of formants is 2,671.99 and the duration of the signal is >0.28 and the maximum amplitude is >0.34 and the formant 2 is 1,612.35 then the piglet is hungry. 7 If the average of formants is 2,671.99 and the duration of the signal is >0.28 and the maximum amplitude is >0.34 and the formant 2 is >1,612.35 and F3-F2 is 958.02 then the piglet is hungry. 8 If the average of formants is 2,671.99 and the duration of the signal is >0.28 and the maximum amplitude is >0.34 and the formant 2 is >1,612.35 and F3-F2 is >958.02 and F4-F2 is 2,419.21 and F2-F1 is 1,018.63 and the maximum amplitude 0.56 then the piglet is hungry. 9 If the average of formants is 2,671.99 and the duration of the signal is >0.28 and the maximum amplitude is >0.34 and the formant 2 is >1,612.35 and F3-F2 is >958.02 and F4-F2 is 2,419.21 and F2-F1 is 1,018.63 and the maximum amplitude is >0.56 then the piglet is feeling cold. 10 If the average of formants is 2,671.99 and the duration of the signal is >0.28 and the maximum amplitude is >0.34 and the formant 2 is >1,612.35 and F3-F2 is >958.02 and F4-F2 is 2,419.21 and F2-F1 is >1,018.63 then the piglet is feeling cold. 11 If the average of formants is 2,671.99 and the duration of the signal is >0.28 and the maximum amplitude is >0.34 and the formant 2 is >1,612.35 and F3-F2 is >958.02 and F4-F2 is >2,419.21 then the piglet is feeling cold. 12 If the average of formant is >2,671.99 then the piglet is in pain.
Piglets respond to pain distress with loud squeals [2,18]. This type of call can be identified using only one attribute, which is the average frequency of formants. According to the generated tree, if the average of the formants frequencies is greater than 2,671.99, then the animal is in pain, and if this attribute is lower, then the animal is pain-free. Evaluating the frequencies of the first four formants of vocalizations from healthy and arthritic pigs, it was found that the frequencies from the first two harmonics, belonging to the healthy animals were larger than in the arthritic ones [19]. However, the frequencies of the third and fourth formants from healthy animals were smaller than in the arthritic ones. The C4.5 algorithm used the formants averages instead of separated frequencies, which showed a strong relationship with the pain situation. Excited pigs produce high tone vocalizations [7], and piglets in pain distress can be differentiated by the altered types of calls such as squeals that significantly differ from the other calls [2]. Furthermore, animals in pain distress also emit longer vocalizations [19] and could be distinguished from the others, even by the human ear. Nevertheless, it was not possible to confirm differences among the other tested distresses just by hearing the animals. The cold and hunger distresses were the most difficult to classify; it was necessary to use more attributes and combinations between them (Figure 7).
The parameters of energy emission, frequency and duration of calls are particularly suitable for characterizing the type of call [2]. In the present study, the chosen algorithm did not use the energy parameter, but used the maximum range, which is related to the energy of the signal. Previously, variations have been found in the ranges of vocalizations from pigs in alert status (50-72 dB), apprehension (63-70 dB), and holding (74-120 dB) conditions [3]. The frequencies of the formants have been widely used by the algorithm, which is in line with [20], which also found that the differences in the resonance frequencies of pigs' vocalization rely on the aversive stimulus. It was previously reported [21] that it is possible to recognize physiological changes by analyzing the characteristics of the vocal signals frequencies.
Other studies [22] suggested algorithms using a combination of sound analysis by linear prediction coding and artificial neural networks to detect the animals' stress vocalizations in commercial piggeries. In this research we used the process of data mining to develop an algorithm using animal vocalization to classify stress situations. These results could have been validated by physiological parameters. Thus, seeking to replace the physiological indicators by vocalization characteristics, as the techniques to obtain the physiological responses can often cause stress to the animals. Traits such as behavior, performance and physiological parameters (both rectal and surface temperatures, and respiratory rate) as indicators of the welfare status of pigs reared on a concrete floor bedded with coffee husks have been found in the current literature [23]. Differences in cortisol levels between the pigs submitted to the pre-slaughter and stunning stress and those ones that were not exposed to this condition was reported, suggesting that cortisol level might be also used as welfare status indicator [24]. Other authors [25] evaluated the Phosphocreatine Kinase (PCK), the Lactate Dehydrogenase enzymes and the glucose in blood samples, in addition to the salivary cortisol levels, normal heart rate, and heart rate during the pre-slaughter handling of pigs, and found that the pre-slaughter resting period significantly influenced the concentrations of lactate in the blood and the salivary cortisol levels. However, during the transportation, the heart rate was greater than elsewhere evaluated. Future studies should compare the vocalization data with the physiological parameters seeking a more reliable system for assessing the welfare status of pigs in commercial farming.

Conclusions
The vocalization of piglets is an efficient technique for identifying their stress conditions. Specific computational techniques, such as data mining are needed for interpretation of animals' vocalization. Determining the signals' duration, the resonance frequencies, and signals' amplitude in this research was fundamental for the interpretation of the sounds emitted by the piglets. The classification task can potentially aid in the discovery of relationships between the characteristics of acoustic signals and distress.