Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
[Preprint]. 2025 Jul 16:2025.04.28.650242.
doi: 10.1101/2025.04.28.650242.

Rapid, open-source, and automated quantification of the head twitch response in C57BL/6J mice using DeepLabCut and Simple Behavioral Analysis

Affiliations

Rapid, open-source, and automated quantification of the head twitch response in C57BL/6J mice using DeepLabCut and Simple Behavioral Analysis

Alexander D Maitland et al. bioRxiv. .

Update in

Abstract

Serotonergic psychedelics induce the head twitch response (HTR) in mice, an index of serotonin (5-HT) 2A receptor (5-HT2A) agonism and a behavioral proxy for psychedelic effects in humans. Existing methods for detecting HTRs include time-consuming visual scoring, magnetometer-based approaches, and analysis of videos using semi-automated commercial software. Here, we present a new automated approach for quantifying HTRs from experimental videos using the open-source machine learning-based toolkits, DeepLabCut (DLC) and Simple Behavioral Analysis (SimBA). Pose estimation DLC models were trained to predict X,Y coordinates of 13 body parts of C57BL/6J mice using historical experimental videos of HTRs induced by various psychedelic drugs. Next, a non-overlapping set of historical experimental videos was analyzed and used to train SimBA random forest behavioral classifiers to predict the presence of the HTR. The DLC+SimBA approach was then validated using a separate subset of visually scored videos. DLC+SimBA model performance was assessed at different video resolutions (50%, 25%, 12.5%) and frame rates (120, 60, 30 frames per second or fps). Our results indicate that HTRs can be quantified accurately at 50% resolution and 120 fps (precision = 95.45, recall = 95.56, F1 = 95.51) or at lower frame rates and resolutions (i.e., 50% resolution and 60 fps). The best performing DLC+SimBA model combination was deployed to evaluate the effects of bufotenine, a tryptamine derivative with uncharacterized potency and efficacy in the HTR paradigm. Interestingly, bufotenine only induced elevated HTRs (ED50 = 0.99 mg/kg, max counts = 24) when serotonin 1A receptors (5-HT1A) were pharmacologically blocked and activity at other sites of action may also impact its pharmacological effects (e.g., serotonin transporter). HTR counts for a subset of 21 videos from bufotenine experiments were strongly correlated for DLC+SimBA vs. visual scoring and semi-automated software detection methods (r = 0.98 and 0.99). Finally, the DLC+SimBA approach displayed high accuracy when compared to visual scoring of HTRs for three serotonergic psychedelic drugs with variable HTR frequencies (r = 0.99 vs. mean visual scores from 3 blinded raters). In summary, the DLC+SimBA approach represents a modular, noninvasive, and open-source method of HTR detection from experimental videos with accuracy comparable to magnetometer-based approaches and greater speed than visual scoring.

Keywords: automation; head twitch response; machine learning; mice; psychedelics; video.

PubMed Disclaimer

Figures

Figure. 1.
Figure. 1.
C57BL/6J mouse body parts labeled for tracking (A) and schematic for processing of historical videos for HTR (B). All pose estimation models were trained to track the 13 body parts shown. Image for panel A was created in https://BioRender.com.
Figure 2.
Figure 2.
Accuracy-discrimination threshold curves for SimBA behavioral classifiers for 50%, 25%, and 12.5% video resolution at 120, 60, and 30 fps. Discrimination thresholds are the probability levels at which the behavioral classifier determines an HTR is detected. All minimum behavior bout lengths were set to 30 ms. Precision in red, recall in orange, and F1 scores in teal at different discrimination thresholds are shown for all behavioral classifiers.
Figure 3.
Figure 3.
Heatmap visualization summarizing performance metrics at best performing accuracy-discrimination threshold for each SimBA classifier for 50%, 25%, and 12.5% video resolution at 120, 60, and 30 fps annotated originally (A) and by another experimenter (B). All minimum behavior bout lengths were set to 30 ms.
Figure 4.
Figure 4.
Feature importance as determined by mean decrease in impurity (gini importance) of all calculated features. The tile color corresponds to the relative importance value of each feature.
Figure 5.
Figure 5.
Accuracy-discrimination threshold curves using the 50% video resolution, 120 fps model combination for behavioral control videos. Discrimination thresholds are the probability levels at which the behavioral classifier determines an HTR is detected. All minimum behavior bout lengths were set to 30 ms.
Figure 6.
Figure 6.
Dose-response curves for effects of bufotenine without and with WAY100635 pretreatment on HTR. (A) the freebase chemical structure of bufotenine. All experimental videos were analyzed using the 50%, 120 fps model DLC+SimBA combination at 0.25 discrimination threshold for HTR counts (B), body temperature change pre vs post session (C), and total distance traveled during the 30 min testing period (D). All values are mean ± SEM and represent n = 5 – 7 mice per data point. Half bolded symbols represent statistical differences from vehicle controls for each group, while asterisks represent statistical differences between groups across doses (p < 0.05).
Figure 7.
Figure 7.
Correlations between HTR counts from 21 videos (bufotenine and WAY+bufotenine) across detection methods. (A) DLC+SimBA vs. visual scores, (B) commercial software vs. DLC+SimBA scores, and (C) visual scoring vs. commercial software scores.
Figure 8.
Figure 8.
Additional HTR validation studies with psilocybin (1 mg/kg), DOI (1 mg/kg), and LSD (0.1 mg/kg). Time-course (A) and mean total counts (B) after s.c. administration of each drug. Correlations between three independent raters (C) and the mean visual score vs. DLC+SimBA HTR counts (D) from 12 videos. All values in AB are mean ± SEM and represent n = 5 – 6 mice per data point. Asterisks represent statistical differences vs. saline vehicle controls (p < 0.05).

Similar articles

References

    1. Halberstadt A. L., and Geyer M. A. (2013) Characterization of the head-twitch response induced by hallucinogens in mice: detection of the behavior based on the dynamics of head movement, Psychopharmacology (Berl) 227, 727–739, DOI: 10.1007/s00213-013-3006-z. - DOI - PMC - PubMed
    1. González-Maeso J., Weisstaub N. V., Zhou M., Chan P., Ivic L., Ang R., Lira A., Bradley-Moore M., Ge Y., Zhou Q., Sealfon S. C., and Gingrich J. A. (2007) Hallucinogens Recruit Specific Cortical 5-HT2A Receptor-Mediated Signaling Pathways to Affect Behavior, Neuron 53, 439–452, DOI: 10.1016/j.neuron.2007.01.008. - DOI - PubMed
    1. Canal C. E., and Morgan D. (2012) Head-twitch response in rodents induced by the hallucinogen 2,5-dimethoxy-4-iodoamphetamine: a comprehensive history, a re-evaluation of mechanisms, and its utility as a model, Drug Test Anal 4, 556–576, DOI: 10.1002/dta.1333. - DOI - PMC - PubMed
    1. Nichols D. E. (2016) Psychedelics, Pharmacological Reviews 68, 264–355, DOI: 10.1124/pr.115.011478. - DOI - PMC - PubMed
    1. Halberstadt A. L., Chatha M., Klein A. K., Wallach J., and Brandt S. D. (2020) Correlation between the potency of hallucinogens in the mouse head-twitch response assay and their behavioral and subjective effects in other species, Neuropharmacology 167, 107933. - PMC - PubMed

Publication types

LinkOut - more resources