{'fraction_non_alphanumeric': 0.03665395614871306, 'fraction_numerical': 0.012654909437559581, 'mean_word_length': 4.861293476742562, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 1, '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 Kingdom: A Large and Diverse Dataset for Animal Behavior Understanding

Understanding animals' behaviors is significant for a wide range of applications. However, existing animal behavior datasets have limitations in multiple aspects, including limited numbers of animal classes, data samples and provided tasks, and also limited variations in environmental conditions and viewpoints. To address these limitations, we create a large and diverse dataset, Animal Kingdom, that provides multiple annotated tasks to enable a more thorough understanding of natural animal behaviors. The wild animal footages used in our dataset record different times of the day in extensive range of environments containing variations in backgrounds, viewpoints, illumination and weather conditions. More specifically, our dataset contains 50 hours of annotated videos to localize relevant animal behavior segments in long videos for the video grounding task, 30K video sequences for the fine-grained multi-label action recognition task, and 33K frames for the pose estimation task, which correspond to a diverse range of animals with 850 species across 6 major animal classes. Such a challenging and comprehensive dataset shall be able to facilitate the community to develop, adapt, and evaluate various types of advanced methods for animal behavior analysis. Moreover, we propose a Collaborative Action Recognition (CARe) model that learns general and specific features for action recognition with unseen new animals. This method achieves promising performance in our experiments. Our dataset can be found at https://sutdcv.github.io/Animal-Kingdom.


Introduction
A better understanding of how animals behave and move in the wild is not only a cornerstone of behavioral sciences [24] but also crucial for a wide range of applications. Animal behavioral analysis plays a pivotal role in conservation efforts [17,62] and wildlife management [49]. Each year, the world spends at least $75 billion [43,68] in conservation efforts. Before researchers can better protect the wildlife, they often need to first monitor the animals. Researchers often monitor animals using video cameras, without having to attach physical markers that may alter their natural behaviors [24]. By monitoring and analyzing the behaviors of the animals, they can gain deeper insights into their health and needs [24], and even detect movement-related injuries [24]. In addition, detecting and analyzing changes in animal behaviors allow researchers to learn about new behaviors [1,72]. Besides, animal behavioral analysis has also helped pharmaceutical scientists understand the effects of experimental interventions on behaviors, and neuroscientists learn more about brain activity across different temporal scales [1,24,29,42,52]. These findings also help researchers better understand human diseases and develop drugs that are suitable for use in humans. Moreover, insights gained from analyzing animals' behaviors have also played an important role in aiding engineers in designing bio-inspired robots [46,83] to efficiently perform specialised functions (e.g., lifesaving). Animators and game developers can also make use of the insights to realistically render animals in animations and games [8,83]. In summary, the analysis of animal behaviors is not only significant for ecological protection, but also significant in a wide range of applications, and thus has received more and more research attention recently [8,17,34,35,38,39,46,53,77,79].
Animal action analysis is especially important in the understanding of the health and needs of animals. Given the diversity of animals' actions, and how actions can occur and switch within split seconds, the use of video footages enables us to monitor multiple animals round the clock [1]. In addition, by localizing keypoints and employing pose estimation, we can analyze and identify changes in the animal's pose to better interpret their actions and behaviors. Before we analyze animal behaviors, we may need to first identify the frames of interest, since oftentimes a large part of the animal footages may not even contain any animal [12,44]. However, the vast volume of wildlife animal footages inherently make it both labour and time-intensive to identify animals and actions. In view of this, employing video ground-ing [47,81] will be effective to localize the animals and behaviors of interest in long video streaming.
Previous studies [8,72] show that a large and comprehensive dataset is important to develop robust deep learning models. However, many existing animal behavioral analysis datasets have limitations in multiple aspects: (1) Relatively small dataset and scarcity of extensive and wellannotated labels [72], which reduce the generalization ability and transferability of models [72]. In contrast, having a large and comprehensive dataset would be helpful to mitigate such issues. (2) Limited number and limited diversity of animals [1,72], as many of the existing datasets are designed for and to study specific groups of animals (e.g., mammals only). However, there is a far greater diversity of animals in nature, and the understanding of wildlife should not be restricted to only a few specific classes. Furthermore, there exists a huge variety in shapes, sizes (e.g., different stages in life cycle), body patterns (e.g., camouflage), and number of limbs or appendages (e.g., wings) within and across animal classes. Therefore, having an extensive range and diverse representation of animals in a dataset would improve the generalization ability of the model for analysing behaviors of various animal classes [72]. (3) Uniform environmental conditions (e.g., laboratory conditions or specific habitat) prevent the transferability of models to a different context (e.g., another habitat), because the models are often not able to generalize well when the new data differs from those previously used for training [72]. Moreover, animals in the wild are naturally found at various locations, in different environmental conditions, and at different time periods, which in turn will all affect the appearances and behaviors of the animals [24]. However, many of the existing datasets are confined to specific or uniform environmental set-ups. Therefore, it is essentially important to possess a sizable range of environmental conditions and backgrounds. (4) Limited number of tasks and annotations for a more comprehensive analysis of animal behaviors. Most of the current datasets provide annotations of one task only, while different tasks can facilitate the understanding of animal behaviors in different aspects. Therefore, we create a diverse dataset, Animal Kingdom, for animal behavioral analysis from video grounding task that identifies and extracts the segments of relevant videos, to animal action recognition and pose estimation tasks to better understand animal behaviors. The natural behaviors of animals in the wild are generally dynamic, complex and noisy [42,52,69], and our diverse dataset is a good reflection of the realities in the wild. Besides constructing the Animal Kingdom dataset, in this paper, we also design a simple yet effective Collaborative Action Recognition (CARe) model for action recognition with unseen new types of animals.
Many existing animal behavior datasets are tailored to specific environments and target only a few actions performed by specific animals. For example, the behaviors of mice [23,70], worms [27], monkeys [2] and flies [24,55] are often examined in the laboratory settings, sometimes to understand the effects of experimental interventions [11]. Behaviors of animals, such as sheep [50], cows [36], and pigs [38] in livestock industry, and salmons [39] in fishing and aquaculture industries, are most frequently studied.
Meanwhile, the understanding of wildlife behaviors for ecological understanding and environmental protection [17] has garnered lots of interest of the community [8,17,35,59,79]. However, most of them are still largely limited to a few or specific classes of animals. Animal Pose [8] is a smaller subset created from the publicly available VOC2011, which is targeted at only 5 mammal species and used solely for pose estimation. In contrast, by far one of the largest datasets available, AP-10K [79] focuses solely on pose estimation, and it is confined to only mammals. Likewise, the action recognition dataset in [35] focuses solely on 7 action categories. Besides these, there are also some attempts to adopt synthetically generated animal data [46,60] for pose estimation on real-life images of animals.
In summary, most of these datasets focus specifically on a small number of action classes and types of animals, yet there exists far more animals out there in the animal kingdom. All of these also illustrate the evident challenges of obtaining considerably diverse and comprehensive set of animal data. In comparison to all the existing animal behavior datasets, our Animal Kingdom dataset demonstrates noteworthy advantages in terms of having a bigger dataset size for a number of tasks (i.e., video grounding, action recognition and pose estimation), with rich an-notations of multi-label actions and a much vaster diversity of animal classes found in a wide range of diverse background scenes with different weather conditions, low light and night scenes, and taken at different viewpoints. Hence, our dataset provides a challenging and comprehensive benchmark for the community to develop and test different types of models for animal behavior analysis.

Animal Behavioral Analysis Methods
Some animal pose estimation models have been proposed [24,29,41,52]. Various body parts of the animals are segmented and used for pose normalization in [67]. Some works use synthetic images to learn poses of real animals [31,34,60]. 3D models [46,84] are even used in this endeavour. Another approach is to leverage knowledge from synthetic to real animals [31], or from both human and animal poses [8] to extend pose knowledge to other animals.
Current animal action recognition models are mainly adapted from existing human action recognition methods. Some of the popular ones are CNN [6] with LSTM [38,50], Mask R-CNN [17,59] with VGG [17], I3D [35], (2+1)D ResNet [59], and SlowFast [59]. Different from existing animal action recognition methods, in this work, considering the diversity of animals and the fact that the same class of action (e.g., eating) can look similar yet different when performed by different types of animals, we develop a simple yet effective Collaborative Action Recognition (CARe) model that extracts and utilizes both general and specific features to effectively identify the actions of unseen new types of animals.

Dataset Description
Our Animal Kingdom dataset contains 50 hours of long videos for video grounding, 50 hours of video clips for action recognition, and 33K annotated frames for pose estimation. In addition, our dataset possesses significant properties as listed below.
Diverse types of animals and actions. Having a large diversity of animals and actions is useful to understand animal behaviors in the wild, and important for training various types of models. Our dataset identifies 140 classes of actions exhibited by a wide range of terrestrial and aquatic animals, which make up to 850 unique species that span over 6 key animal classes (e.g., reptiles, birds, and fishes as seen in Fig. 1). Even for the same animal, the behaviors differ in different scenarios (e.g., amphibious animals like frogs which live and move differently in water and on land). Such is the intriguing lives of animals which add dimensions of complexities to action recognition in our dataset, and also influence the postures and movements of the animals, thus giving rise to a variety of animal poses. On the other hand, some animals having the same outward appearance live in  totally different habitats and thus have different forms of movements (e.g., a terrestrial spider that crawls on land but a water spider that swims in water). All of these examples in our dataset illustrate the complex yet beautiful diversity of wildlife, and highlight the benefit of containing a diverse and good range of animal classes to encompass various actions and behaviors that occur naturally in the wild.
Diverse environmental conditions. The various environmental and weather conditions enable better understanding of animal behaviors in natural ecosystems. In the wild, animals are found in a variety of environments (e.g., grassland, forests, rivers, oceans) and environmental conditions Table 1. Comparison of our dataset with some of the previous animal behavioral analysis datasets. Our dataset contains more annotated data for various tasks, more diverse animal classes, multiple types of environmental and weather conditions, which shall provide a challenging and comprehensive benchmark for animal behavior understanding in images and videos.
(e.g., raining, snowing). The animal footages in our dataset are captured at different times of day, under different illumination conditions (e.g. low light, sunset, backlight, different underwater depths), sometimes leading to shadow cast and low foreground-background contrast. This challenge is compounded when some animals (e.g., crows or ravens in Fig. 2) lack distinctive colours for various body parts, while others (e.g., tree lizards in Fig. 2) camouflage very well, blending seamlessly into their environment [56]. Some animals (e.g., chameleons in Fig. 2) may even change their appearance rapidly in response to the environment. Animals move around in habitats with complex compositions and dynamic background with other animals in close proximity, or plants swaying in the wind [56]. All of these are found in our dataset and present the significant yet practical challenges of animal behavioral analysis in the wild.
Varied viewpoints and various types of footages. Obtaining real footages documenting how animals live and behave in the wild is of great significance to ecological studies and conservation efforts [62]. The animal footages, which were captured by nature enthusiasts and professionals who used different equipment (e.g., night vision), come in various forms (e.g., documentaries, animal trap videos, and personal camera recordings), and were taken from various vantage points (e.g., birds' eye view, bottom up, underwater). This brings diversities of captured viewpoints in our dataset.
Various compositions of scenes with fine-grained multi-label actions. Our dataset encapsulates the lives and actions of wildlife, with clips depicting the fine-grained action(s) of one animal to multiple types of animals in a single frame. This leads to the creation of a multi-label dataset comprising fine-grained actions to aptly describe each unique action of animal(s) in the clip. However, this also inevitably leads to a long-tailed distribution of actions, which poses a significant challenge for accurate models, and deserves attention to deepen research into the building of more robust models for the practical world.

Dataset Tasks and Annotations
Similar to the experience detailed in [72], our diverse dataset for video grounding, action recognition and pose estimation was meticulously assembled together through the collective effort of 23 individuals (including biology experts). We manually identified and provided framewise annotations of both animal and action descriptions for 50 hours of videos that were collected from YouTube videos. A total of 3 rounds of quality checks were performed to uphold the annotation quality. Please refer to the Supplementary and our website for more details of our dataset.
Action recognition with multi-label fine-grained actions. In action recognition, the model takes in an input video clip, and outputs the action labels for it. Actions of animals can occur within split seconds (e.g., jumping), and up to minutes (e.g., sexual display) for more complex behavioral patterns. Our diverse dataset contains 50 hours of video clips, comprising over 850 animal species and 140 fine-grained action classes that were taken from a list used by ethologists [19,22,58,63]. The collection of actions and behaviors (see Supplementary) encompasses life events (e.g., molting), to daily activities (e.g., feeding), to social interactions (e.g., playing). The video clips last an average of 6 seconds, and range from 1 second to 117 seconds.
The complexities brought by the natural world, present a set of practical challenges in analysing animal actions in the wild. (1) There exists a large intra and inter-class variation of actions in our dataset. As seen in the first two rows in Fig. 2, the same type of action (e.g., eating) can look differently when performed by different types of animals. Hence, we need to design robust methods to recognize the actions of various animals. (2) In nature, an animal can perform more than one action at the same time. Besides, there can be multiple animals in the same frame, with different animals performing different actions. All of these lead to the multilabel actions, and can also result in a long-tailed distribution of actions. (3) As the videos of animals were captured in the wild, some actions (e.g., molting) occur less frequently than others (e.g., eating) in nature. This inevitably leads to an uneven long-tailed distribution of actions, thus encouraging the development of advanced strategies for handling long-tailed distributions.
When constructing our animal action recognition dataset, we follow the work of [82] and divide the distribution into three different segments based on the number of samples in each action class. Specifically, we group all the 140 action classes in our dataset into the head segment (17 action classes that have more than 500 samples each), the middle segment (29 action classes that have 100 to 500 samples each), and the tail segment (94 action classes that have fewer than 100 samples each). The head segment contains the more frequently occurring actions in nature (e.g., sensing and eating). The middle segment consists of actions that are commonly observed in nature (e.g., climbing, grooming, and digging), while the tail segment is made up of actions that are less frequently observed in nature (e.g., molting and doing somersault).
Video grounding based on descriptions. In video grounding, an input query sentence, describing the scene with the animals and behaviors of interest, is provided to the model. Then the model needs to output the relevant temporal segment with the start and end timing (Fig. 3), much like a video clip search engine. Video grounding plays a pivotal role in improving productivity for ecological research, because a large part of the ecological surveillance videos may not contain the footage of the animals and behaviors of interest [12,44], while video grounding provides a convenient way for users to search for the relevant time segment in long videos by describing the scenarios of interest.
The key challenge of video grounding comes in the form of identifying the behaviors and delineating the animals from the complex background to return relevant results based on the language descriptions. The video grounding task in our dataset contains 50 hours of videos (a total of 4301 long video sequences) with 18,744 annotated sentences. Each video sequence contains 3-5 sentences. Pose estimation for inferring animal keypoints. In pose estimation, the model takes in an input image of the animal, and predicts the locations of its joints. As animals can have vastly different anatomical structures across classes, this poses a challenge for pose estimation. As such, we organize the images according to five main animal classes: mammals, reptiles, amphibians, birds, and fishes, to construct differentiated understanding of the poses for each animal class. We institute a common set of keypoints across the five animal classes (Fig. 4). These keypoints correspond to the equivalent of human poses, and are also in line with the recommendations in [72]. We define a total of 23 keypoints: 1 head, 2 eyes, 4 parts of mouth, 2 shoulders, 2 elbows, 2 wrists, 1 mid torso, 2 hips, 2 knees, 2 ankles, and 3 parts of the tail. For the upper limbs of birds (i.e., wings) and fishes (i.e., fins), their shoulders, elbows, and wrists are defined in accordance to how their upper limbs move. Similarly, for the 'lower' limbs of fishes which do not have legs, their hips, knees, and ankles are annotated along the edge of their tail section, because their tails control their swimming movements [7].
In summary, our Animal Kingdom dataset possesses several significant properties for various types of animal behavior analysis tasks. In addition, the large intra-class variations, multi-label actions, and long-tailed distributions, present practical challenges to understanding animal behaviors in the wild. Hence, our dataset provides a challenging and diverse benchmark to facilitate the research community to develop, adapt, and evaluate various types of advanced methods for animal behavioral analysis.

The Proposed CARe Model
When constructing our dataset, we observe that the same class of action can look similar yet different when performed by different types of animals. For example, the action "eating" shares similarities yet still differs between chameleons and otters, as shown in Fig. 2. Meanwhile, training network models to analyze and recognize actions of various types of animals can be an interesting problem. However, even if we can collect a large number of video action samples for a set of animals, it can still be difficult to exhaustively collect and annotate lots of samples for various types of species for network training, considering that there are more than 7 million species in the world [45].  . Architecture of our Collaborative Action Recognition (CARe) model. During testing, given an video action sample of an unseen type of animal, the approximated specific feature will be obtained by combining the outputs of the K existing specific feature elaborators in a spatially-aware weighting manner. Then the approximated specific feature will be fused with the general feature, and finally fed to the classifier C to predict the action class.
Nevertheless, since the same action class of different animals can share some common (generalizable) characteristics, it becomes possible to train a general network based on video samples of the annotated animal set, and then apply this network for recognizing the same set of actions of even unseen new animals (i.e., animal types that are not included during model training, but are of interest later). In this way, well generalizable features shared across different animals can be extracted by the network for action recognition. However, extracting general features only while ignoring the specific features of actions of different animal types can limit the action recognition performance, because the specific features, which though may be unique to a certain animal type only, can still convey discriminative information for recognizing the actions of this animal type.
To address this issue, we propose a simple yet effective Collaborative Action Recognition model (CARe), which is able to recognize the same set of actions even for unseen types of animals, by leveraging both the general and specific features, as shown in Fig. 5. Assuming that we have the data of K types of observed animals for training, then the training data can be denoted as . Here x k n represents a video action sample, y k n represents its ground-truth action label, and N k is the number of samples for the k-th observed animal type.
Our basic model is composed of the backbone feature extractor E, as well as the relatively lightweight general feature elaborator F gen (shared by all animal types) and specific feature elaborators {F k specif ic } K k=1 (each specific for a certain type of animal), and the classifier C. The backbone feature extractor E (an I3D model) is used to extract base feature f base = E(x) from each input video sample x, which is then fed to the general feature elaborator F gen to get the general feature f gen = F gen (f base ), and a specific feature elaborator F k specif ic to get the specific feature f k specif ic = F k specif ic (f base ). Such a base model can be trained on the training set D as follows:ŷ This indicates, for each training sample x k n , its general and specific features are concatenated and finally fed to the classifier C for predicting the action labelŷ k n , and the training of this base model is performed under the supervision of the cross-entropy loss ℓ CE . Via this scheme, during training, action samples from all the K types of training animals will pass through the general feature elaborator (F gen ), while only the samples from the k-th animal type will pass through the specific elaborator F k specif ic . Thus, the general feature elaborator (that is well trained on a large amount of data of various (i.e., K) types of animals) is able to learn to extract well generalizable features. Meanwhile, each specific elaborator F k specif ic (that is trained on the data of a specific type of animal) will learn to extract features that tend to be more specific for the corresponding type of animal. Thus, these two sets of features, which are complementary, can be fused for action recognition.
Though the aforementioned basic model can generate general and specific features for a seen animal type, it still does not address the scenario for handling unseen animal types, since we do not have specific feature elaborators for animal types beyond these K trained types.
Considering that different animals can share different levels of similarities in their appearances and behaviors (e.g., cheetahs share many more similarities with tigers, compared to other animals like snakes), when handling an input video of an unseen animal type, to obtain its specific feature, a possible solution is to leverage existing elaborators based on different levels of similarities, to mine and approximate the specific feature for the unseen animal.
To this end, we design a relevance evaluator R that is a sub-network for assessing the similarities of the action sample (x) of the unseen animal type w.r.t all the K observed animal types. To achieve this, we first input x to the backbone feature extractor E to get the base feature (f base ), which is then fed to all the K specific elaborators, yielding a set of intermediate features {f k specif ic } K k=1 . Then we estimate the similarities as: represents the set of similarity (relevance) scores of this sample w.r.t the K observed animal types. Thus, we can then approximate the specific feature of this unseen animal type's action sample (x), via the collaboration of the existing K specific elaborators as: Moreover, considering an animal can have different similarity degrees w.r.t another type of animal at different spa-tial positions (different body parts), w k can also be implemented as a tensor (i.e., w k ∈ R h×w ) instead of a scalar, such that the approximated specific feature of the unseen animal type is produced based on its different similarities to different observed animal types and also different spatial positions on the feature maps (with size h × w). In this way, the K feature elaborators collaborate with one another in a spatially-aware manner to yield optimal approximation. After specific features have been approximated, the general and approximated specific features are fused and fed to the classifier C to predict the action class, as shown in Fig. 5.
As mentioned before, our basic model can be trained on the training set (D) of the observed animals. However, the relevance evaluator R needs to be generalizable to unseen new animals, which makes the training of R challenging. Inspired by meta learning [13,18,25,32], which is a "learning to learn" technique that can learn to generalize by splitting the original training set to meta-train and meta-test sets to mimic target testing scenarios during model training, we here apply meta-learning to train our R for improving its generalization ability to unseen animal types. Specifically, following the mimicking scheme of meta learning, we split the training set containing the K types of animals into a virtual meta-train set (with K − 1 seen types of animals), and a virtual meta-test set (with one "unseen" type of animal). Based on these sets, we then take advantage of the domain generalization meta-learning (MLDG) algorithm [32] that can effectively optimize our module R.
By alternately training our base model using Eq. (1) and training R via MLDG, our CARe model obtains generalization ability, and can produce reliable general and approximated specific features that are useful for recognition of the same set of actions of unseen animals. More implementation details of CARe can be found in the Supplementary.

Action Recognition Results
For our first type of experiments, we perform multi-label action recognition. We first use Multi-Label Binarizer [51] on our multi-label animal action recognition dataset, which contains all the 30.1K video clips, to stratify the action classes and split both the video clips and each action class into 80% train and 20% test. Following [61], we adopt the mean Average Precision (mAP) as our evaluation metric. As mentioned in Sec. 3.2, our dataset contains a longtailed distribution of multi-label actions and we follow [82]  to identify the head, middle and tail segments. Thus, we evaluate the overall mAP and also segment-specific mAP of action recognition. Note that as our dataset has longtailed distribution, we also evaluate methods for handling long-tailed distribution [9, 37, 66] on our dataset, and apply these methods on action recognition methods. Specifically, we test the cost-sensitive learning (Focal Loss [37]) and reweighting methods (LDAM-DRW [9] and EQL [66]), in conjunction with different action recognition methods (I3D [10], X3D [15], and SlowFast [16]). As shown in Table 2, action recognition methods with approaches for handling long-tailed distribution (e.g., Focal Loss) achieve higher mAP for the head, middle and tail segments, compared to the baselines. This shows the possibility and brings opportunities for the community to explore various approaches to handle challenges including long-tailed and multi-label problems. For our second type of experiment, we perform action recognition for unseen types of animals. Specifically, we pick video clips of six action classes (i.e., moving, eating, attending, swimming, sensing, and keeping still) that are widely shared by various types of animals, to train and test our CARe model for action recognition of unseen new types of animals. We select four animal types (i.e., birds, fishes, frogs, snakes) for training, and another five animal types (i.e., lizards, primates, spiders, orthopteran insects, water fowls) for testing. In this experiment, we use the video clips, each containing only one action instance. As such, we use accuracy as the evaluation metric for this experiment. We conduct ablation studies, as well as compare our method with two recent domain generalization methods [33,74], and all experiments are conducted by using I3D as the backbone. For the ablation study, we first construct 'CARe without specific feature', and 'CARe without general feature' (i.e., only using approximated specific feature). We also construct 'CARe without spatially-aware weighting' where similarity weights w are implemented as a set of scalars, while w are a set of tensors in our full CARe model. Results in Table 3 show that our full model (CARe) achieves the best results, demonstrating the effectiveness of taking advantage of the general feature and also spatiallyaware approximated specific features for recognizing actions of unseen types of animals.

Video Grounding Results
Following [21,47,81], we use both mean Intersection over Union (IoU), and "Recall@n, IoU=µ" as our evaluation metrics. Mean IoU means the average IoU of all test samples. As for "Recall@n, IoU=µ", we first compute the IoU of the results with ground truth (i.e., length between the start and end time). The returned result is considered correct if IoU is larger than the threshold µ. Hence, "Recall@n, IoU=µ" refers to the percentage of language queries in the test set with at least one correct result among the top-n returned results. We use n=1 and µ ∈ {0.1, 0.3, 0.5, 0.7}, and report the results in Table 4.

Pose Estimation Results
We define three protocols to identify potential challenges of pose estimation that arise due to intra and inter-animal class variations.
Protocol 1: The whole dataset with all animal species is split to the training set (80% of samples) and test set (20% of samples). This means all species are contained in both the train and test sets, for evaluating the efficacy of models when estimating pose of all animals.
Protocol 2: We adopt the leave-k-out setting by selecting k = 12 animal sub-classes (e.g., felines, turtles, etc.) that are reserved and used only for testing, while the other animal sub-classes are used for training. The selected subclasses come from the five major classes. Therefore, the sub-classes in the test set do not appear in the training set. This evaluates the generalization ability of the model for pose estimation of unseen animal classes.
Protocol 3: We group all the samples in our dataset to five major classes (i.e., mammals, amphibians, reptiles, birds, and fishes). And for each major class, we define its own training set (80% samples) and test set (20% samples). This is to evaluate the pose estimation performance of each major class of animals. Following [78], we adopt Percentage of Correct Keypoints (PCK) as our evaluation metric. PCK@α measures the accuracy of localizing body joints within the distance threshold α. The predicted keypoint is considered to be correct if it falls within the distance threshold calculated by α × max(height, width) of the animal bounding box.
Here we set α to 0.05. As shown in Table 5, we evaluate two state-of-the-art pose estimation methods [64,80] on our dataset. In Protocol 3, the results for reptiles and amphibians are lower than other animals, possibly due to the challenges of estimating their keypoints, as they come in various forms of shapes and textures with varying positions of their joints within its class, and they camouflage well into their environments. We observe that the result of Protocol 2 is comparatively lower than the rest, illustrating the challenges in generalizing the pose to unseen new animal classes. This shall bring opportunities for the community to develop novel methods to better learn and generalize pose information across various animal classes.

Conclusion
We introduce a challenging animal behavioral analysis dataset, comprising over 850 species of animals in the animal kingdom for video grounding, action recognition, and pose estimation. We also introduce a Collaborative Action Recognition (CARe) model with improved ability to recognize actions of unseen new animal types. The variations within and between classes of animals for both action recognition and pose estimation illustrate the advantage of our dataset being diverse in nature, and yet at the same time highlight the challenges and reinforce the compelling need for further research in the areas of video grounding, animal action recognition and pose estimation. We expect that our work will inspire further works in animal behavioral analysis, and understanding animal behaviors can make our world a better place for both wildlife and humans.

Details of Data Collection and Verification
The team consisted of 23 members, including biology experts with knowledge of biodiversity.
We manually identify and provide framewise annotations of both animal and action descriptions for over 50 hours of videos that were collected from YouTube videos. We process them into a total of 30,100 video clips, each ranging from 1 second to 117 seconds (average 6 seconds). The title, description or captions in the videos contains the name of the animals. We manually check and tally the animals in the video clips with the animal names provided. As for the actions, we identify them using a defined set of ethological terms [1,2,4,5]. In order to minimize discrepancies in our annotations, we first identify the commonly used terms that describe the same type of action in different classes of animals (e.g., grooming in insects, but preening in birds refers to the same act of self-maintenance), and redefine ambiguous terms that describe vastly different movements (e.g., snake gliding on land versus eagle gliding in the sky). At the same time, we also include descriptions of the scenes, and note their start and end times for video grounding task. We conduct a total of three rounds of quality checks through various permutations of cross-checks by different individuals to verify the correct start and end time of the video clips for video grounding task, and harmonize the nomenclature of actions for action recognition task. As for pose estimation task, we label a total of 33K images that are extracted from the video clips, using Label Studio [6]. Annotators are given instructions with reference images on how to label each class of animals. As the animal footages are captured in the wild, the complex backgrounds with various illumination and weather conditions make the annotation challenging. Thus, three rounds of quality checks are performed to ensure that the keypoints are correctly labelled. * Corresponding author. ‡ Equal contribution to this work.

Diverse Range of Animals
Our dataset contains over 850 species of animals. We group them into 6 major animal classes, and further divide them into sub-classes. The distribution of animals in our dataset is shown in Fig. 1 and examples are shown in Fig. 2.
For action recognition, we label the actions of animals in 6 major classes (i.e., mammals, reptiles, amphibians, birds, fishes, insects). For pose estimation, we label the poses of animals in 5 major classes (i.e., mammals, reptiles, amphibians, birds, fishes). Because different animals can have vastly different anatomical structures across classes (e.g., insects vs mammals), which poses a great challenge for pose annotation, we thus label these five animal classes which share similarities in their anatomical structures.

Details of the Proposed CARe Model
In this section, we present the implementation details of our CARe model. We discuss in detail the architecture of the model (Fig. 7) and how it is trained (Algorithm 1). The backbone feature extractor E, the feature elaborators F gen and {F k specif ic } K k=1 , and the classifier C form the basic version of our model. Below we present the design of each of them.
For the backbone feature extractor E, we adopt the early part of the I3D architecture. It includes three 3D convolutional layers E conv1, E conv2, and E conv3, two maxpooling layers E maxpool1 and E maxpool2, and an inception submodule of the I3D architecture E incept. Given the input video x ∈ R ch×t×h×w (whereby the number of channels ch, number of frames t, height h, width w equals 3, 16, 180, and 320 respectively), it will be transformed by E conv1, E maxpool1, E conv2, E conv3, E maxpool2, and E incept sequentially to obtain the base feature f base ∈ R ch ′ ×t ′ ×h ′ ×w ′ , with ch ′ = 256, t ′ = 8, h ′ = 23, and w ′ = 40.
Regarding the subsequent feature elaborators {F k specif ic } K k=1 and F gen , each of them consists of two lightweight two-head self-attention layers [3]. Given the base feature, the specific features {f k specif ic } K k=1 and general feature f gen computed by the feature elaborators have the size of ch ′′ × h ′′ × w ′′ , where ch ′′ , h ′′ , and w ′′ equal 4, 12, and 20.
The final classifier C consists of one linear layer C linear that maps the flattened and concatenated general and specific features to action likelihoods y ∈ R M for the M possible actions.
Besides components of the basic version of the CARe model, the relevance evaluator R is included to compute similarity scores for unseen animals. It consists of two layers, R conv1 and R conv2, which will be used to further transform the base feature, and K layers {R linear k } K k=1 to compute the set of similarity scores {w k } K k=1 . More specifically, f base will be first transformed by R conv1 and R conv2. To obtain the similarity score for the k-th specific feature elaborator w k , we flatten and concatenate the transformed base feature and the specific feature f k specif ic , which will be fed into its respective layer R linear k to compute w k .
Training and testing. Since the base feature extractor follows the I3D architecture, we initialize its parameters with the pre-trained I3D. The parameters of the base feature extractor will be optimized with an initial learning rate of 0.001. Other components of our CARe model will be randomly initialized and given a higher initial learning rate of 0.01. SGD optimizers are used to update all components. A summary of the training scheme can be found in Algorithm 1. Update the parameters for R using: 10 ϕ ′ ← ϕ − α▽ ϕ ℓ mtrain (ϕ); 11 2.2 Meta-test: 12 Calculate the cross-entropy loss ℓmtest for Dmtest; 13 2.3 Meta update: 14 Update the parameters ϕ of R using: 15 ϕ ← ϕ − β((1 − λ)▽ ϕ ℓ mtrain (ϕ) + λ▽ ϕ ℓmtest(ϕ ′ )); 16 end In our experiments, 16 frames from each video sequence are randomly selected and used as the input. The model was trained for 40 epochs with a 2-GPU implementation. The initial learning rates were used for the first 30 epochs. The reduced learning rates that are 10% of the initial ones were used to train the model for 10 additional epochs.