Introduction
In the fields of biology and ethology, understanding social behavior requires tracking the fine-grained movements—or keypoints—of multiple interacting animals. While supervised deep learning has significantly advanced this field, it remains bottlenecked by the need for thousands of manually labeled frames. This process is not only expensive and slow but often fails to generalize across different species or experimental conditions.
Self-supervised keypoint discovery offers a solution by learning these points automatically from raw video. However, existing methods frequently struggle with multi-agent scenarios, particularly when animals are visually identical (e.g., two black mice). These models often suffer from "identity confusion," where keypoints drift between agents or fail to distinguish which individual they belong to, rendering them unreliable for studying complex social interactions like aggression or mating.
The B-KinD-multi Framework
To address these challenges, the authors introduce B-KinD-multi, a self-supervised framework that integrates decoupled video segmentation to guide the discovery process. By masking individual agents, the method overcomes identity confusion and achieves state-of-the-art performance in automated behavior classification.
Methodology
The core innovation of B-KinD-multi is a multi-step pipeline designed to localize features to specific individuals:
- Agent Segmentation: The system utilizes a pre-trained segmentation model (DEVA) to generate masks for each individual agent. This can be achieved through simple text prompts or in a fully unsupervised manner.
- Localized Heatmap Masking: The model generates global keypoint heatmaps which are then "cropped" using the agent masks. This forces the model to assign specific sets of keypoints to individual agents.
- Spatiotemporal Reconstruction: Training is driven by the model's ability to reconstruct the motion (the difference between two frames) using only the discovered keypoints and a single appearance frame. Accurate keypoints allow the model to successfully "warp" the appearance to match observed movement.
- Loss Functions: Stability is maintained through a combination of reconstruction loss (SSIM), rotation equivariance (ensuring keypoints follow the animal's orientation), and separation loss to prevent keypoint clumping.
Experimental Evaluation
The model was evaluated across diverse datasets involving social interactions, including CalMS21 (mouse behavior), MARS-Pose (keypoint regression), Fly vs. Fly (fruit fly aggression), and PAIR-R24M (rat dyadic interactions). Qualitative tests were also conducted on ants, bees, and dancing humans to assess flexibility.
Key Results
B-KinD-multi demonstrates significant quantitative improvements over previous state-of-the-art self-supervised methods:
- Error Reduction: The framework reduced keypoint regression error by 58.8% for mice, 90.2% for flies, and 81.9% for rats.
- Behavior Classification: On the CalMS21 dataset, the discovered keypoints achieved a Mean Average Precision (MAP) of 0.864, nearly matching the performance of fully supervised models (0.880).
- Zero-Shot Generalization: The model successfully identified semantically meaningful keypoints on species never seen during training, such as ants and bees.
Discussion and Future Work
The "aha moment" of this research is the realization that precise keypoint labels are unnecessary if the general location of objects is known. By using segmentation as a prior, the model naturally learns to distribute points across an agent's body while maintaining identity even during huddling or crossing paths.
Despite its success, the model currently assumes a static background and stationary camera, which may limit its use in "in-the-wild" footage. Future work will focus on extending the framework to dynamic backgrounds and exploring 3D keypoint discovery in multi-agent settings.
Summary updated