On the 3D Social Behavior of Zebrafish
Authors:   , O'Shaughnessy Liam Gerard 
Published: November 2024

In this thesis, I present my work on the physics of social behavior, in which I quantitatively measure and analyze the pairwise fighting behavior of adult male zebrafish.
In the introduction, I provide a brief history of the study of animal behavior and discuss the utility of taking a quantitative approach. I explore questions of representation in animal behavior data and discuss the difficulties of measurement. I also motivate the choice of fighting as my model social behavior.
In Chapter 1, I discuss my work quantifying the pose of the nematode C. elegans. I extended an existing technique—through algorithmic improvements and the deployment of a large computational cluster—to achieve new levels of performance, producing a novel, large dataset of 2D C. elegans pose measurements (including coiled poses). Additionally, I helped design and test a machine-learning image-analysis solution for measuring coiled poses of the C. elegans.
Chapters 2 and 3 represent the experiment/tracking and analysis/theory sections of my paper entitled "Dynamics of Dominance in Interacting Zebrafish."
In Chapter 2, I begin by providing a historical account of the development of the tracking system. Next, I detail our experimental apparatus for recording zebrafish contests in the laboratory. In the final section, I present the details of the computational pipeline used for tracking the 3D positions of multiple bodypoints on two zebrafish during fights while maintaining the identity of the individuals.
In Chapter 3, I detail my motivation for choosing the state variables for studying fight dynamics. I describe the justification and details of a coordinate transformation to a co-rotating frame for studying multi-animal fighting behaviors. Next, I present my “fight bout detector,” a data-driven method for identifying when, in time, the fish are actively fighting during a recording. I then introduce my method for identifying the winner of contests using the post-fight asymmetry in relative orientations. I further describe my work on learning the short-time multi-animal motifs of fighting from data. Using the state variables and interpretable structure in the joint distributions of the state variables, I propose a model of zebrafish contest dynamics as transitions between stereotyped configurations of distance and relative orientation. To quantify these transitions, I cast the problem as a network clustering task. I discretize the state-space and build a microstate transition matrix, then apply the network community detection algorithm Infomap. I conclude this chapter with a discussion of what I learned about zebrafish contests using this approach and provide comments on connections with game theory assessment models.
In Chapter 4, I present the zebrafish-fighting bodypoint trajectories as a public dataset, and I provide a data-driven narrative description of the rich zebrafish contest data.
In Chapter 5, I offer a future-focused discussion on my short-term and long-term goals for further work on the physics of social behavior. I discuss some direct extensions of my PhD work and explore extensions to zebrafish aggression research beyond two fish. Finally, I elaborate on ideas I would like to explore in other social behaviors in both animal and human systems.