{'fraction_non_alphanumeric': 0.02649633309675893, 'fraction_numerical': 0.006766027915779513, 'mean_word_length': 5.006251776072748, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Animal behavior and animal personality from a non-human perspective: Getting help from the machine

Summary We can now track the position of every fly's leg or immerse a tiny fish inside a virtual world by monitoring its gaze in real time. Yet capturing animals' posture or gaze is not like understanding their behavior. Instead, behaviors are still often interpreted by human observers in an anthropomorphic manner. Even newer tools that automatically classify behaviors rely on human observers for the choice of behaviors. In this perspective, we suggest a roadmap toward a "human-free" interpretation of behavior. We present several recent advances, including our recent work on animal personalities. Personality both underlies behavioral differences among individuals and is consistent over time. A mathematical formulation of this idea has allowed us to measure mouse traits objectively, map behaviors across species (humans included), and explore the biological basis of behavior. Our goal is to enable “machine translation” of raw movement data into intelligible human concepts en route to improving our understanding of animals and people.


INTRODUCTION
A colleague once told me that she would rather spend 3 months writing an algorithm for animal tracking than "waste" 2 weeks on annotating her data by hand. This statement came at a time in which practically everyone engaged in studying animal behavior had to build specialized systems and write their own code. In our case, for example, even though we wanted to work with an animal as common as the house mouse, we could not use commercially available tools. At the time, these tools could handle only one animal at a time, while we wanted groups (Figure 1; see Shemesh et al. 1 ). At roughly the same time, fittingly, another lab just one floor down from us was busy building their own slightly modified system. The main difference between our two approaches was that we used hair dyes to label the mice, while they employed radio-frequency identification (RFID) for identification. 2 A seminal step in animal behavior science of recent years has been the release of DeepLabCut. 3 This deep neural network provides a way to estimate the frame-by-frame posture of any animal from video data using a relatively small annotated training set. Although tracking pose was previously possible for mice, flies, 4 worms, 5 or fish, 6 and others, DeepLabCut made it easy to track any animal, in different environments, without requiring stringent technical skills or a great deal of tweaking ( Figure 1C). Additional tools that followed, such as LEAP 7 and DeepPoseKit, 8 provide a different take on the same idea, while others, like idtracker.ai, 9 focus on tracking the position of animals within large groups, altogether eliminating the need to tag the animals.
THE BIGGER PICTURE Being able to track the intricate movements of a spider, a cat, or any other animal does not mean we understand its behavior. Behaviors should be studied from the animal's perspective, yet for now, we can offer only our own anthropocentric interpretations. Trying to understand animals is like trying to do machine translation of a new language when we do not even know what letters make up the words; however, we do have some clues. For example, adjacent movements or movement patterns with similar outcomes are probably more related than others. A different approach is to focus on animal personalities. Personality drives behavior, and it was recently shown to be a property that can be automatically and objectively measured. Moreover, as a mediator between genes and behavior, personality is more straightforward to translate between species. New ways of interpreting behavior will improve our ability to understand animals, but potentially also change how we study and practice human psychology.
The ability to track animal movement has improved considerably, and not only in the video domain. Global navigation satellite systems (such as GPS and BDS, for example 10 ) and ''reverse GPS'' systems like the ATLAS project, 11 as well as RFID beacons, 12 have all gotten smaller, cheaper, and easier to use, and have the battery life needed to track large groups of animals over large distances. Recently, and after some delay, the ICA-RUS initiative, which is a specialized receiver positioned on the international space station, started collecting data from lightweight transmitters mounted on animals all over the world. 13 These new tracking tools not only allow us to measure more complex data, but also enable the design of novel experiments. For example, real-time eye tracking of zebrafish larvae (measuring approximately 12 mm in length) made it possible to place freely behaving animals within a virtual world 14 . Unlike the headsets used in most virtual-reality experiences in humans and, occasionally, other animals, 15 this system works by projecting images directly to the animal's vicinity, taking into account its field of view. In this way, the animals were exposed to experiences such as a dynamic environment or social encounters with one or more virtual fish.
The driving force behind all these innovations is the hope that an improved data flow will enhance our understanding of behavior. Yet, it is essential to keep in mind that what we actually measure are movements and poses, which do not necessarily map into meaningful behaviors. Behavior is organized in a hierarchical structure, wherein simple actions are nested within more complex actions and so on across multiple scales. 16 We usually refer to a behavior as "ethologically relevant" when it is meaningful from the animal's perspective. Peacock spiders, for example, occasionally display complex, well-orchestrated action sequences that involve leg movements, fang wiggling, and abdomen wagging while exposing their elaborate colored patterns. 17 Although each pose is unique, it can also be considered part of just one complex behavior: a mating ritual (or at least that is what we assume, as it often leads to procreation).
Although there are many ways to assign a behavioral interpretation to movements, recently, several tools that can do it automatically were developed. Most of these tools can recognize only a predefined set of species-specific behaviors. 1,[18][19][20] In contrast, the system developed in Kabra et al. 21 uses machine learning to train a classifier from a small set of user-annotated behaviors. Either way, all these tools rely on human observers to define the behaviors to be tracked, often resulting in a biased and anthropocentric viewpoint.
Making sense of movements or postures can also be achieved by applying various computational approaches that eliminate subjective interpretation. Many of these approaches rely on the assumption that body postures occurring in adjacent time frames are more closely related than ones happening at unrelated times. 22,23 Based on this assumption, we can define a mapping function that takes instantaneous postures and maps them into points in some low-dimensional space, and use this to cluster similar behaviors or segment behaviors in time. The motion-sequencing method (or MoSeq; see Wiltschko et al. 22 ), for example, uses temporal sequencing to detect sub-second motion primitives that the authors refer to as syllables. This method was recently used to capture the unique behavioral mark of various neuro-and psychoactive drugs. 24 In Stephens et al. 5 , an analysis of the shape of C. elegans revealed that just four principal components account for 95% of the worm's shape variability. These so-called "eigen-worms" are responsible for different modes of motion: the first and second components are primarily related to crawling, the third component to turning, and the fourth accounts for head and tail movements relating to foraging and navigation behaviors.
But rather than breaking behavior down into its components, a different approach altogether is to try to capture the processes that drive behavior. One type of such a process is well known from human psychology, namely personality. 25 The prevalent model for human personality is the big-five personality model, which, as the name suggests, describes an individual's personality using five continuous factors. 26 These five factors are usually determined by a self-report questionnaire, precluding its use in animal studies.
The challenge of measuring animal personality Considerable controversy surrounds the concept of animal personality. From an evolutionary perspective, we know that responding differently to similar cues in a consistent manner has its benefits. Yet for animals, the definition of personality is still disputed, as reflected by the multitude of interpretations and names it is referred to by, including temperament, behavioral syndrome, coping style, or simply predisposition. [27][28][29][30][31] Beyond the terminology problem, many studies still end up relying on just a small set of behaviors (sometimes as few as one), subjectively chosen and measured under a limited and often artificial ll OPEN ACCESS set of conditions. Moreover, the choice of personality traits is also mostly based on an anthropomorphic perspective.
So we end up measuring boldness, for example, by the average distance of a fish from its shelter, 32 the movement patterns of a cow in an unfamiliar room, 33 or the number of head pokes a mouse makes toward a brightly lit portion of its arena. 34 In doing so, apart from the issues mentioned above, we are also ignoring the fact that a behavior is potentially affected by multiple traits; for instance, baseline fear levels and curiosity are two independent traits that may have opposite effects on what we measure as boldness.
In addition, reductionist approaches may, at times, lead us to utterly misunderstand animals. For example, a standard model for anxiety has been three lines of mice, which were selectively bred according to differences in their risk-assessment behavior. 35 The mice were labeled as exhibiting either high-anxiety behavior, normal-anxiety behavior, or low-anxiety behavior, according to their performance in the classical elevated-plus-maze paradigm. 36 Many studies based their conclusions on these lines, yet recent work revealed that the mice considered as exhibiting low anxiety actually suffer from full retinal blindness, which could explain their seemingly fearless demeanor in the maze. 37 We have recently demonstrated a computational approach to measuring personality, starting from groups of mice. 38 Personality is defined as being consistent and stable across time and contexts while varying among individuals. We have used highdimensional behavioral data, consisting of 60 distinct behaviors (including chasing, approaching, and exploring), measured automatically under naturalistic conditions 39 and tracked across multiple days to infer personality traits subjectively. Our primary motivation was to take the "textbook definition" of personality and turn it into a mathematical equation that can be accurately measured, which we refer to as identity domains (IDs; Figure 2A). The code, as well as all the data used for this work, is available online. 40 A B C Figure 2. From behavior to personality (A) Personality can be defined as an optimization problem for identifying traits that differentiate individuals while also remaining stable over time and context. We ended up with an equation similar to linear discriminant analysis, which is solvable and has a unique solution.
(B) Solving this optimization problem for 168 mice in 42 groups leads to four significant traits. We refer to the traits obtained in this way as identity domains, or IDs for short. The IDs were labeled according to their order of statistical significance, from ID1 to ID4. We show here the correlation between the IDs and a representative subset of the 60 measured behaviors.

DISCUSSION
Identity domains capture traits that are stable over time, age, and context Based on the assumption that personality is unique to each animal in addition to being consistent over time and context, we end up with the following formulation for it: Here, W ID is the set of vectors that span the personality traits space, obtained by maximizing the ratio between S b , the behavioral variability between mice, and S w , the mean variability over time for each mouse (see Forkosh et al. 38 for further details). The resulting projection matrix W ID is of dimensions n 3 d, where n is the number of personality traits and d is the total number of measured behaviors (60, in our case). Although the motivation for this formulation was purely behavioral, we ended up with an expression equivalent to the linear discriminant analysis decomposition. The traits for each mouse are computed by projecting its behaviors using the computed projection matrix W ID .
We refer to the set of traits obtained in this way as IDs to avoid confusion with previous methods. To test it, we monitored 168 mice in 42 groups for 4 days and ended up with four significant traits ( Figure 2B). These traits were stable across time, developmental stages, and social contexts. 38 Yet, the four IDs should be regarded as a lower bound to the actual number of traits mice might have; more traits might become statistically significant once we increase the number of tests or include other behaviors in the analysis.
A streamlined approach to the biology of behavior and personality A major advantage of measuring personality in this way is that it simplifies the process of uncovering the biology of behavior. Because behavior and biology (whether genetics, proteomics, etc.) are mediated by personality, the relation between them can be broken into two, practically independent, questions: first, what is the connection between behavior and personality? And second, what is the dependency of personality on the biology of individuality? In simple mathematical forms, this idea can be translated to a Markovian chain such that: Pðbjg; eÞ = X p Pðbjp; eÞPðpjgÞ; i.e., the probability of observing a specific behavior b given the environment e and genetics g of the animal (or any other factor) can be reformulated as two separate terms by adding the personality p of the animal. Although we mostly focused on the first question, Pðbjp; eÞ, we also touched upon the second one, PðpjgÞ; by measuring the single-cell transcriptomics in three brain regions of 32 mice. 38 We found that the personality traits captured the differences in the transcriptomes of these mice significantly. In addition, it provided us with several candidate genes that proved to be related to a specific trait (such as the growth factor BDNF and ID4) and therefore associated with a limited set of behaviors.
The problem of labeling and its relation to the structure of personality space One of the biggest challenges in behavioral science is how to classify behaviors without using manual labeling and without making prior assumptions. This challenge can be thought of as equivalent to building a machine translator that takes raw behaviors and translates them into language. In our study, we tried to circumvent the labeling issue by not assigning labels to any murine personality traits. Even though some of the IDs we found seemed to have a clear interpretation (for example, ID1 in Figure 2C), we chose to keep them labeled only according to their order of statistical significance, from ID1 to ID4. However, this approach does have its shortcomings, and not all of them are due to pressure from reviewers and collaborators. That said, the particular structure of personality space provides a unique way to interpret the IDs and, as a result, behavior too. We found the personality space spanned by ID1 and ID2 to be triangularly shaped (Figure 3). This triangle is partially due to a mathematical property of dimensionality reduction, but, as a previous study suggests, it might also be related to evolutionary challenges. 41 Either way, this triangle's vertices represent extreme behavioral strategies, which we refer to as behavioral archetypes. The three archetypes we found here can be associated with three known forms of social behavior in mice: commensal, non-commensal, and non-territorial. Like with ID1 and hierarchy, these associations should not be regarded as labels, but as guides to help decipher each archetype's role.
We did not find similar archetypes when looking at ID3 or ID4. By definition, these IDs are less stable than the first IDs, as we sorted the traits by statistical significance. This instability might be entirely due to a technical reason-the result of our choice of behaviors that favors certain traits. It is also possible that different IDs have different timescales, making them either more or less dynamic. In both cases, finding clear archetypes in the higher IDs might simply require a larger dataset.
Doing similar personality analysis for other species, such as the so-called rock-paper-scissor lizards, 42 or humans (both works in preparation), we find a very similarly shaped personality space: a triangle with a notch at its base. Mapping the vertices, or archetypes, between the different species may provide a new way of interpreting personality from a top-down and cross-species perspective.

CONCLUSION
Research in artificial intelligence has influenced many fields, and the study of animals is no exception. One of the biggest challenges to this field is the ability to decipher animal behavior, regardless of species, in a genuinely unsupervised manner from end to end; that is, to use machines to transcribe movements and postures into our own words. To some extent, this idea is not unlike the "universal translator" concept portrayed in many works of fiction. However, as animals faced similar evolutionary challenges, we expect them to share behavioral commonalities, which can help realize a behavioral translator. And a possible starting point for this realization is using personality traits to link biology and behavior.
Because there might be aspects of an animal's experience beyond human language, the idea of an animal behavior translator may be restrictive. Animals may have emotions, moods, and feelings that are so different from ours that we lack the adequate words to describe them, or, as the philosopher Ludwig Wittgenstein phrased it: "limits of my language mean the limits of my world." Whether we could ever grasp what it is to be or feel like an animal is yet to be seen.
Automatic methods for tracking behavior and personality also provide an opportunity to change the way we study humans radically. To a large extent, current research in human psychology relies on self-report questionnaires. Despite their proven usefulness in numerous studies, they have several limitations, due to ''wishful thinking'' (social desirability effects) or lack of self- Taking the two most significant identity domains for all the mice yields a personality space that is triangularly shaped and defined by the three archetypes in its vertices. These archetypes seem to correspond to three behavioral strategies that mice are known to exhibit in nature: commensal, noncommensal, and non-territorial (which we fondly refer to as ''city mice,'' ''country mice,'' and ''subordinate mice,'' respectively). Each individual's ID scores are represented by a trapezoid, with scores on each day marking the four vertices (three vertices if the fourth point falls inside the shape). Each trapezoid was colored according to its distance from all of the archetypes. The triangle and archetypes were found using minimal volume simplex analysis (t ratio test, p = 0.006). Other ID combinations and different archetype numbers did not yield significant results. ll OPEN ACCESS knowledge, and are also time-consuming and often tedious. Employing tracking devices like cell phones 43,44 with the tools we develop for studying animal psychology can offer new insights into the human brain. These new approaches are especially useful when considering less-verbal individuals, such as children or people with disabilities. Yet, because of exactly that, these new approaches also raise several ethical questions. Apart from privacy issues, these approaches might soon allow computers to understand us better than we could.

Data and code availability
The personality code, as well as all the data used for this work, is available online at https://github.com/OrenForkosh/Identity Domains. The tracking algorithm, arena design, and behavioral analysis are stored here: https://github.com/OrenForkosh/ CheeseSquare.

ACKNOWLEDGMENTS
Special thanks to Alon Chen and Stoyo Karamihalev, without whom the personality study would not have been possible. We thank Shiri Gerson and Estherina Trachtenberg for their help, comments, and support. This work was supported by the Israel Science Foundation (grant 2505/20).

AUTHOR CONTRIBUTIONS
The author confirms sole responsibility for this work, the analysis and interpretation of results, and the manuscript preparation.

DECLARATION OF INTERESTS
The author declares no competing interests.