Abstract
We present a machine learning–based system for automatically computing interpretable, quantitative measures of animal behavior. Through our interactive system, users encode their intuition about behavior by annotating a small set of video frames. These manual labels are converted into classifiers that can automatically annotate behaviors in screen-scale data sets. Our general-purpose system can create a variety of accurate individual and social behavior classifiers for different organisms, including mice and adult and larval Drosophila.
This is a preview of subscription content, access via your institution
Relevant articles
Open Access articles citing this article.
-
Preserved neural dynamics across animals performing similar behaviour
Nature Open Access 08 November 2023
-
DVT: a high-throughput analysis pipeline for locomotion and social behavior in adult Drosophila melanogaster
Cell & Bioscience Open Access 05 October 2023
-
3D mouse pose from single-view video and a new dataset
Scientific Reports Open Access 21 August 2023
Access options
Subscribe to this journal
Receive 12 print issues and online access
$259.00 per year
only $21.58 per issue
Rent or buy this article
Prices vary by article type
from$1.95
to$39.95
Prices may be subject to local taxes which are calculated during checkout



References
Branson, K., Robie, A.A., Bender, J., Perona, P. & Dickinson, M.H. Nat. Methods 6, 451–457 (2009).
Dankert, H., Wang, L., Hoopfer, E.D., Anderson, D.J. & Perona, P. Nat. Methods 6, 297–303 (2009).
de Chaumont, F. et al. Nat. Methods 9, 410–417 (2012).
Swierczek, N.A., Giles, A.C., Rankin, C.H. & Kerr, R.A. Nat. Methods 8, 592–598 (2011).
Luo, L. et al. J. Neurosci. 30, 4261–4272 (2010).
Friedman, J., Hastie, T. & Tibshirani, R. Ann. Stat. 28, 337–407 (2000).
Settles, B. Active learning literature survey (Computer sciences technical report 1648) 〈http://research.cs.wisc.edu/techreports/2009/TR1648.pdf〉 (Univ. Wisconsin-Madison, 2009).
Gomez-Marin, A., Stephens, G.J. & Louis, M. Nat. Commun. 2, 441 (2011).
Jenett, A. et al. Cell Rep. 2, 991–1001 (2012).
Martin, J.R. Behav. Processes 67, 207–219 (2004).
Robie, A.A., Straw, A.D. & Dickinson, M.H. J. Exp. Biol. 213, 2494–2506 (2010).
Aggarwal, J.K. & Ryoo, M.S. ACM Comput. Surv. 43, 16 (2011).
Dollar, P., Rabaud, V., Cottrell, G. & Belongie, S. in Visual Surveillance and Performance Evaluation of Tracking Surveillance (VS-PETS) 65–72 (IEEE, 2005).
Simon, J.C. & Dickinson, M.H. PLoS ONE 5, e8793 (2010).
Pfeiffer, B.D. et al. Proc. Natl. Acad. Sci. USA 105, 9715–9720 (2008).
Acknowledgements
We thank A. Miller and R. Egnor (HHMI JFRC) for creating the mouse behavior detectors; R. Egnor and S. Ohayon (Caltech) for providing their mouse data before publication; P. Keller for help in preparing the manuscript and helpful discussions; H. Kelstrup and C. Mirth (Instituto Gulbenkian de Ciência) for providing their larva data; G. Rubin (HHMI JFRC) for providing GAL4 lines before publication; G. Card and U. Heberlein (HHMI JFRC) for sharing flies; the Janelia Fly Olympiad Team (particularly J. Hirokawa, L. Umayam, W. Korff, M. Phillips and S. Roberts) and the Janelia Fly Facility (particularly J. MacMahon and T. Laverty) for helping in the TrpA neural activation fly screen; B. Arthur and J. Liu for help in developing the JAABA software; U. Heberlein, P. Perona, M. Zlatic, T. Jovanic, E. Hoopfer, B. Afonso, M. Gershow and C. Schusterreiter for helpful discussions; S. Albin, Y. Aso, R. Azanchi, B. Baker, G. Card, C. Dan, E. Hoopfer, V. Jayaraman, W. Korff, G. Ophir, Y. Pan and A. Seeds for participating in our study of JAABA's usability; and W. Karsh for acronym help.
Author information
Authors and Affiliations
Contributions
K.B. conceived of the project with help from M.K., A.A.R. and S.B. M.K. and K.B. designed and wrote the software with help from A.A.R., S.B. and M.R.-A. A.A.R. created and tested the fly behavior detectors with help from K.B. A.A.R. developed and performed the fly experiments with help from K.B. and M.K. M.R.-A. developed the larva tracker and larva behavior detectors with help from K.B. and M.K. K.B., A.A.R. and M.K. wrote the paper with help from M.R.-A.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing financial interests.
Supplementary information
Supplementary Text and Figures
Supplementary Figures 1–6, Supplementary Tables 1–3 and Supplementary Note (PDF 2090 kb)
Supplementary Software
MATLAB source code for JAABA. The documentation and a video tutorial are in the 'docs' folder. (ZIP 58510 kb)
Demonstration of using JAABA to train a wing-grooming classifier.
We recorded a screencast of a user beginning to train a wing-grooming classifier. In this video, the user labels one bout of frames in which the fly is wing grooming and one bout of frames in which the fly is not wing grooming. The user leaves a gap between the end of one of these bouts and the beginning of the next, as it is difficult to consistently label these frames. The user then trains an initial classifier from this first set of labels, a process that takes a few seconds. The user examines the resulting classifier's predictions on frames not in the training data. This initial classifier makes several mistakes, and the user labels a third bout to correct some mistakes. The user then retrains a new classifier and again examines the predictions. After just three bouts of training labels, the classifier is making reasonable predictions on data outside the training set. (AVI 16481 kb)
Automatic detection of 15 behaviors for adult flies.
We show the results of applying the 15 automatic fly behavior classifiers described in Figure 2 to a video of pBDPGAL4U control and R71G01 flies. For all the flies, we show clips of 500 frames. The first four clips are for two males and two females from the control lines. The last two clips show two males from R71G01. We selected clips from R71G01 because the social behaviors are rare in control lines. On each frame, we plot a triangle to indicate the selected fly's tracked position and a line to indicate its trajectory. Below the frame, we plot each of the 15 behavior classifiers' current predictions in gray (above the dashed line indicates a prediction that the behavior is occurring; below, that the behavior is not occurring). In color, on top of these gray boxes, we plot the raw outputs of the classifier, where larger bars indicate that the classifier is more confident. The names of the behaviors currently detected are written behind the fly. The video plays at on-third real time (10 f.p.s.). (AVI 21121 kb)
Behavior variation between GAL4 lines.
We show the results of applying three of the automatic fly behavior classifiers (chase, jump and righting) to the selection of GAL4 lines described in Figure 3. For each video, we show one male and one female fly for 250 frames. Data are plotted as in Supplementary Video 2. (AVI 16481 kb)
Rights and permissions
About this article
Cite this article
Kabra, M., Robie, A., Rivera-Alba, M. et al. JAABA: interactive machine learning for automatic annotation of animal behavior. Nat Methods 10, 64–67 (2013). https://doi.org/10.1038/nmeth.2281
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1038/nmeth.2281
This article is cited by
-
DVT: a high-throughput analysis pipeline for locomotion and social behavior in adult Drosophila melanogaster
Cell & Bioscience (2023)
-
An automated, low-latency environment for studying the neural basis of behavior in freely moving rats
BMC Biology (2023)
-
Preserved neural dynamics across animals performing similar behaviour
Nature (2023)
-
Drosophila mutants lacking the glial neurotransmitter-modifying enzyme Ebony exhibit low neurotransmitter levels and altered behavior
Scientific Reports (2023)
-
EXPLORE: a novel deep learning-based analysis method for exploration behaviour in object recognition tests
Scientific Reports (2023)