dataesr/scientific-paragraphs-categorization huggingface dataset:
Though the neural network performs well here, it could likely be improved by as much as 10% by addressing the imbalance in context classes  23. To conclude, in this study, we collaboratively built a large database of vocalizations spanning the lives of pigs from birth to slaughter, analyzed it for acoustic insights, and tested two potential classification methods. First, the acoustic analyses revealed that emotional valence can be inferred by call duration and amplitude modulation rate. The spectral center of gravity (Q50%) seems to be an additional promising indicator for increasing the accuracy of an automated system for recognizing emotional valence in calls. Second, using just a small number of acoustic parameters, we found that the emotional valence (for LF calls) and context of production of vocalizations (for both LF and HF calls) could be cross-classified above chance levels (61.
7% for valence with a 50. 5% chance level; 19. 5% for context with a 14. 3% chance level) using a pDFA analysis. The second classification approach, a spectrogram classifying neural network, classified vocalizations with a much higher accuracy by valence (91. 5%) and context (81. 5%). In combination with t-SNE, this method could be used to refine the dataset, identify novel vocalization types and subtypes, and further expand the recognizable vocabulary of animal vocalization. The classification successes achieved in this study are encouraging to the future development of a fully automated vocalization recognition system for both the valence and context in which pig calls are produced. Such system should then ideally be externally validated, and its performance assessed, in order to establish its potential for a wide and useful implementation.
Methods Recording contexts. In order to consider situations typically encountered by commercial pigs throughout their life, we first gathered vocalizations that had been recorded as part of previously published studies (Supplementary Table  S1 ), and completed our database with recordings collected for the specific purpose of the current analysis. The final database consisted of over 38,000 calls recorded by five research groups, representing 19 context categories (see Supplementary Table  S1  for information on the number of calls, animals, their age, breed, and sex across the contexts).
Acoustic analyses. In total, 7414 calls were selected from the database based on their low audible/visible (in the spectrogram) noise (i. e. low signal-to-noise ratio that distorts acoustic characteristics of the calls or impedes the precise detection of call onset and end; see Supplementary Text for further details on this selection), and analyzed using a custom-built script in Praat v. 5. 3. 41 DSP Package  34. This script batch processed the vocalizations, analyzed the parameters and exported those data for further evaluation (adapted from  20, [35] [36] [37]  ). In total, we extracted 10 acoustic parameters that could be measured in all types of calls and were likely to be affected by emotions (Table  3 ; see Supplementary Text for detailed settings  11, 17, 18, 38  ). Calls were classified into two types, i.
Statistical analyses. Changes to specific vocal parameters. Since our 10 acoustic parameters were likely to be inter-correlated, we first carried out a principal component analysis (PCA) in R software v. 3. 6. 1. (prcomp function, package stats  42  ) on each call type (LF and HF) separately (two PCAs in total), in order to select a set of non-redundant parameters. This procedure resulted in the following four parameters to be included in subsequent tests: Dur, AmpModRate, Q50% and WienEntropy (Supplementary Table  S3 ; see Supplementary Text for more information on the PCA). To investigate the effect of the assumed valence (positive or negative) and of the context category (19 categories; Supplementary Table  S1 ) on the acoustic structure of the calls, the raw values of these selected parameters (Dur, AmpModRate, Q50% and WienEntropy) were entered as outcome variables into linear mixed-effects models (LMM; one model per outcome variable) fit with Gaussian family distribution and identity link function in R software v.
Automated classification. Permuted discriminant function analysis. To test if calls could be classified to the correct valence or context category above chance levels, further analyses were carried out on the same selected four parameters (Dur, AmpModRate, Q50% and WienEntropy). This was achieved using a permuted discriminant function analysis (pDFA  44  ), which can handle unbalanced datasets and allows the inclusion of a control factor. The pDFA was conducted using a script provided by R. Mundry, based on the function lda of the R package MASS  45  (see Supplementary Text for more information on the pDFA settings). Since not all pigs were recorded in both valences, nor in all context categories, we used a crossed pDFA for incomplete design. It included either the valence (positive or negative) or the context category (19 categories; Supplementary Table  S1 ) as the test factor, and the individual identity of the pigs (n = 411 pigs) as the control factor.
Neural network and t-SNE. To complement and contrast the pDFA classifier, a second approach which preserved as much signal information as possible was desired. For this task, a machine learning algorithm was chosen as they are optimal for analyzing complex, high-dimensional data. A neural network was selected because of the minimal pre-processing and data reduction required. Additionally, neural networks have proven highly capable in sound classification tasks  [46] [47] [48]. The convolutional neural network ResNet-50 was chosen to be adapted via transfer learning because of its performance efficiency  49  and proven application in this field  47. As an input to the neural network, spectrograms were computed from the pig vocalization audio recordings in MATLAB R2020b. Each spectrogram was centrally zero-padded to be of equal length to the longest recording (3.
595 s). The spectrograms were computed using a 3 ms window, 99% overlap, and 512 sampling points to calculate the Discrete Fourier Transform. Neural networks were trained separately to both desired applications: (1) classifying the spectrograms based on positive or negative valence; and (2) classifying the spectrogram according to the context in which the vocalization was produced. The dataset was randomly split 70/30 into a training and validation set each time the neural network was trained. The neural network was trained on the given classification task (valence/context) for 20 epochs, with a mini-batch size of 32, an initial learning rate of 0. 001, and a learn rate drop factor of 10 -0. 5. After the training period, the highest accuracy version of the neural network, as measured on the validation set, was saved.
Correct classification of calls according to the valence and context of production by the pDFA. Results of the permuted discriminant function analysis (pDFA) for low-frequency calls (LF) and highfrequency calls (HF); number of valence or contexts included, number of individuals, total number of calls, number of calls selected, percentage of calls classified and cross-classified to the correct valence or context, and corresponding chance level (expected percentage of correctly classified calls based on the permutation test, averaged across the permutations), relative classification (percentage of calls cross-classified/chance level), and p value. The analysis was performed on the entire dataset, after excluding missing data (Sample size: calls in which AMRate could not be measured = 191; calls in the entire dataset = 7414; calls included for this analysis = 7223).
Acknowledgements We are grateful to  Roger Mundry  for providing us with the pDFA script and to  Lorenz Gygax  for statistical advice. This article is part of the  SoundWel  project funded by the  Era-Net ANIHWA (French National Agency for Research   ANR 30001199  ( CT, CG, ERR, CM, AB) );  Czech Ministry of Agriculture   MZE-RO0718  ( MS, PL );  Federal Food Safety  and  Veterinary Office 2. 16. 04  ( EFB, EH );  German Federal Ministry of Food and Agriculture  through the  Federal Office for Agriculture and Food 2815ERA04D (LL, JHR, SD) ;  Norwegian Food Safety Authority   FOTS 12021  (AMJ, MPT).
The distance the pigs had to walk to go back to the sorter once they exited the feeding area was 3 m for SA and 2 Â 30 m for FA. The treatments were applied from two weeks after the entrance into the experimental room until slaughter. Before the application of the treatments, the sorter remained opened to the animals to become familiarised with the room, and no data were collected. The electronic feeders provided ad libitum access to a pelleted diet composed of cereals and soybean meal containing 10 MJ NE/kg and 160 g CP/kg, with a minimum of 0. 80 g digestible Lys/MJ NE. Water was supplied ad libitum through 10 drinkers in the resting area. Six fixed chains were hung 1 m above the ground to enrich the environment.
Statistical analyses Quantitative continuous variables obtained once per animal were analysed by ANOVA with a linear mixed model using the MIXED procedure of SAS (9. 2, SAS Institute, Cary, North Carolina). The model included the fixed effects of genetic line, activity treatment, replicate, sex, their interactions and a random effect of the individual. Variables resulting from repeated quantitative measures were analysed with the same model as described before, and the fixed effect of time and its interactions with all other factors were also included as fixed effects. Time was recorded in weeks for variables resulting from sorters or feeders and in a 30min interval (within recording days) for variables resulting from video analyses. The covariance matrix structure retained was an autoregressive moving average model (ARMA(1,1)) for most variables except the daily number of meals, which was analysed with an autoregressive model of order 1 (AR(1)) after selection of the best fitting model by comparisons of the AIRs.
Data related to the percentage of standing pigs were transformed using an arcsin root transformation to achieve a normal distribution. Discrete variables such as lameness and OC scores were analysed using the GENMOD procedure with an ordinal model for multinomial data. Because shapes of score distribution remain closed between lines and treatments, gross averages of scores were given to synthetise the score distribution. For continuous data obtained once per animal, the model included the fixed effects of the line, the treatment, the replicate, the sex, and their interactions. The statistical units for analysis of the occurrence of lameness scores were groups of pigs (by line, sex and activity treatment) Â week of measurement (N = 72). All SAS scripts are given as Supplementary Materials.
P-values of anatomical proportions of the carcass were obtained from the mixed procedure of SAS after transformation of the variable by the arcsin function, and back transformation of the LSmeans are given. *P < 0. 05, **P < 0. 01, ***P < 0. 001. 2 P-values of gait and osteochondrosis scores were obtained from the Genmod procedure of SAS, and gross averages are given. Salaün  et al. , 2014; Gilbert et al. , 2017). Observations of grouphoused pigs usually show that the majority of movements occur around feeding and suggest that the distance walked by pigs for feed is essentially a representation of the mobility intensity and the distance covered by animals according to access to the feeder  (Hansen et al. , 1982). Thus, we assumed that the daily number of sorter crossings can be a good predictor of physical activity.
The data we analyze were obtained from an intensive summer predation study contrasting established and dispersed packs of wolves in Finland, where wolves have reestablished themselves at relatively low densities via a process of natural dispersal from Russia  (Kojola et al. , 2006; Barry et al. , 2020). During these predation studies, we obtained a detailed, behaviorally annotated time-series by visiting nearly all nonden GPS locations over a two-month period. Importantly, we identified carcasses, allowing us to infer the location, composition and timing of most kills  (Gurarie et al. , 2011) , as well as boundary visits. Our first goal was to demonstrate that wolves do use spatial memory by developing a cognitive model that outperforms a non-cognitive null model for predicting wolf foraging decisions.
Field Tracking We analyzed data from seven intensively field tracked wolves. Each wolf was followed intensively for 60 days from the beginning of June to the end of July for one summer each from 2006 to 2013, with the exception of one wolf (Hessu) that was followed for two summers  (2011 and 2013). All of the collared wolves represented breeding individuals, and we did not have more than one wolf collared in any particular pack. GPS locations were obtained for all the wolves at half hour intervals via the GSM (Global System for Mobile) network, which covered the entirety of all wolves' territories. In seven of the eight studies, every location was visited in the field after a minimum five day time lag, excluding locations near or around the den. The lag was maintained to minimize disturbance, and the locations visited on a given day were as far as possible from the location of the focal wolf on that day.
We, therefore, introduce an intuitive measure of predictive power of the models to use a basis of comparisons: the relative predictive improvement index (RPI) defined as the ratio of the mean of the predicted probabilities over the mean of the null probabilities, i. e. : RPI = n t t=1 Pr(z t )/ n t i=1 Pr 0 (z t ) where the sums are across all trips t ∈ 1, 2,. , n t , and the null probabilities are the proportion of trips for each zone (note, since both sums are over the same number of trips, the ratio of the sums is equal to the ratio of the respective means). As an example, if an entire dataset consisted of one visit to each of 4 zones: z = (1, 2, 3, 4), and the model predictions for choosing each of those trips were Pr t = (0. 75, 0. 5, 0. 25, 0. 5), then Pr(z t ) = 0. 5. The mean of the null probabilities is P 0 (z t ) = 0.
For most wolves, fitted and parameterized cognitive models were 20 to 50% better at predicting choices than non-cognitive null models (Table  4 ). In order to develop and fit such models, we relied on an extraordinarily detailed dataset which contained reliable information on objects and locations that are known to be of importance to wolves during the breeding season: the precise location of the den, of kill sites with identification of prey species, and-with slightly more guesswork-the contours of the territorial boundary. We therefore constructed our model around the behavioral imperatives of predation and territorial marking, anchored around fairly regular, central-placed trips that began and ended at the den site. The model assumed a spatially-explicit scoring that emerges directly from prior experiences for both priorities.
Inferring Cognition From Movement Data It is-in short-a surprisingly steep challenge to infer the use of memory for animals moving in the wild, mainly because of the large number of variables that cannot be controlled and the complexity of animal behavior. Nonetheless, cognitive inferences can be made when certain criterion are met. We propose here a checklist building on the somewhat qualified success of fitting our own cognitive model on the wolf data set. 1. Identification and isolation of a distinct quantifiable behavior that might hypothetically be driven by prior experiences and otherwise be minimally confounded by unknown behavioral imperatives; e. g. , den departures to specific spatial zones. 2. Identification of key events or cues that might determine the movement behavior to be modeled; in our example, predation events and boundary visits.
ACKNOWLEDGMENTS The authors are indebted to the many field workers and volunteers who contributed to collecting summer predation field data on all the wolf studies. NSF grant  DBI1915347  to WF and EG further supported this research. OO was funded by  Academy of Finland  (grant no. 309581 ),  Jane and Aatos Erkko Foundation ,  Research Council of Norway  through its  Centres of Excellence Funding Scheme  ( 223257 ), and the  European Research Council (ERC)  under the European Union's  Horizon 2020 research and innovation programme  (grant agreement no  856506 ;  ERC-synergy  project  LIFEPLAN ).
Early-life risk factors for behavioral problems in adult dogs No research in dogs investigating the effects of maternal stress or diet during pregnancy on the behavior of offspring was identified, except a mention that puppies of malnourished dams were extremely nervous in addition to displaying physical abnormalities  (179). Poor maternal care and socialization before 3 months of age have been associated with fearfulness in dogs, and poor maternal care alone was also associated with a combination of fearfulness, noise sensitivity and separation anxiety  (180). These data were derived from a survey of owners, but other studies with more objective measures show that the level of mothering can affect the performance of dogs in cognition tests, stress responses, and temperament in later life.
The upper age limit of this "window" will depend upon species and breed. Variables of particular interest for DOHaD research in dogs and cats, both individually and in combination, include the maternal and neonatal environment, nutrition and associated weight gain and/or growth rate, the gut microbiota, weaning stress, and neutering (Figure  4 ). Work in other species highlights the need for studies to consider the periconception period  (211) , the exact timing of environmental exposure, differences in programming between the sexes (212-214), the role of the placenta (215), paternal influences on the offspring's epigenome, breed and genetic variation  (216) (217) (218). It is critical for the whole scientific research community to be able to access large datasets encompassing high quality "whole of life" data and biobanks of tissue samples in order to explore the long-term impact of exposures in early life.
e. , the period of life spent free from disease  (224). The Norwegian School of Veterinary Science cohort established to investigate skeletal disease in four large dog breeds (n = 700 puppies recruited 1998-2001), is notable as an example of a longitudinal cohort in which dog litters were recruited from the time of the dam's mating, and data were obtained from breeders, owners and veterinarians  (225, 226). Longitudinal cat registries and cohort studies appear to be scarce. The landmark Bristol Cats Study led by the University of Bristol is the first reported birth cohort study of kittens  (227). Cats were registered between the ages of 8 and 16 weeks, and owners complete questionnaires at set intervals. Analyses reported to date include the prevalence of and risk factors for obesity, and owner-reported lower urinary tract signs  (228) (229) (230).
The Cat Phenotype and Health Information Registry in the USA (UC Davis Veterinary Medicine) collects DNA samples from healthy and diseased cats with long-term follow-up where possible  (231). Data on epigenetic mechanisms linking early-life experiences to adult disorders in dogs and cats are scant; they are needed to help confirm and understand developmental programming, and unravel the effects of genetic background. Methods for profiling genome-wide DNA methylation are well established, and much can be achieved before attempting to identify the specific genes responsible for an epigenetically determined phenotype  (232, 233). Epigenetic mechanisms other than DNA methylation should also be studied, such as histone modifications, including but not limited to methylation and acetylation, and non-coding RNA that can regulate gene expression during cell differentiation and development  (234).
A publicly available repository of canine epigenomic data (BarkBase) has recently been established, comprising the results of RNA sequencing and assays determining chromatin accessibility across the genome  (235). The database includes 27 different adult tissues and five fetal tissue types at four embryonic timepoints. The Royal Veterinary College has instituted the Companion Animal Brain Bank-a standardized collection of brain tissue and other biological samples from dogs and cats euthanized with neurological conditions, together with appropriate controls. Although such tissue banks could be used to investigate changes in the epigenome, including those associated with disease, without corresponding data on environmental aspects of pregnancy and early life, they will not provide evidence of developmental programming.
Animals Data collection was conducted between August 2015 and January 2016 in the Hospital do Gato (Lisbon, Portugal). A total of 64 patients were recruited with 53 meeting the selection criteria. Clinical data of all patients were collected. Fifty-three cats subjected to an oral examination at the Hospital do Gato (Lisbon, Portugal) were included in this study. Cat ages were between 4 months and 16 years (mean = 6. 4, SD = 5. 2 years). Twenty-seven of the 53 cats were female (51%) and 26 were male (49%). All cats undergoing anesthesia were not anesthetized solely for research purposes, but rather for necessary dental or elective reproductive clinical procedures after obtaining informed consent from the owners.
Statistical Analysis Results were analyzed using the 9. 4 SAS Software f to compare PDP and SDP with pain scores. When the dependent variable had more than two groups, the Glimmix and Genmod SAS procedures were employed. Post-hoc multiple means comparisons were carried out using the adjustment of Tukey-Kramer. Comparison between oral parameters and pain were carried out using the chi-square test, except when variables were continuous. In this case, data were analyzed with a logistic regression using the Logistic procedure of SAS 9. 4 software f. Dental parameters and pain scores were also compared to age, sex and type of food. Statistical significance was based on a 5% (ρ<0. 05) significance level.
Field observations We studied the water-related behaviours and activities of the communities through thorough investigations of nine villages, corresponding to 11 sources of water as well as water bodies and streams of different types, over a period of three months (Fig  2A ). The various types of individual behaviour were described on the basis of static observations  [43, 44]. A four-step method was used: (i) selection of the sources of water as well as water bodies and streams in and around the village, for long-term observations; (ii) initial contact with the group of villages studied at the investigation site, without the collection of information, to enable the communities to identify the researchers, and to ensure the acceptability of subsequent visits (the aim being to observe unobtrusively, so as not to affect usual behaviour); (iii) observation of all activities in and around sources of water as well as water bodies and streams at different times of the day; (iv) quantitative data collection (age and sex, main activities and frequency of visits), recorded on scoring grids, and qualitative data collection based on notes describing the general appearance of the site, and individual and collective behaviours in the aquatic environment.