Hallucinogens induce the head-twitch response (HTR), a rapid reciprocal head movement, in mice. Although head twitches are usually identified by direct observation, they can also be assessed using a head-mounted magnet and a magnetometer. procedures have been developed to automate the analysis of magnetometer recordings by detecting events that match the frequency, duration, and amplitude of the HTR. However, there is considerable variability in the features of head twitches, and behaviors such as jumping have similar characteristics, reducing the reliability of these methods. We have developed an automated method that can detect head twitches unambiguously, without relying on features in the amplitude-time domain. To detect the behavior, events are transformed into a visual representation in the time-frequency domain (a scalogram), deep features are extracted using the pretrained convolutional neural network (CNN) ResNet-50, and then the images are classified using a Support Vector Machine (SVM) algorithm. These procedures were used to analyze recordings from 237 mice containing 11,312 HTR. After transformation to scalograms, the multistage CNN-SVM approach detected 11,244 (99.4%) of the HTR. The procedures were insensitive to other behaviors, including jumping and seizures. Deep learning based on scalograms can be used to automate HtR detection with robust sensitivity and reliability. Serotonergic hallucinogens such as psilocybin, d-lysergic acid diethylamide (LSD), and mescaline can induce profound alterations of consciousness, including changes in thought, perception, and mood. The psychedelic effects produced by these drugs are thought to be primarily mediated by activation of the 5-HT 2A receptor 1-4. In recent years, studies have explored the potential therapeutic effects of serotonergic hallucinogens in disorders such as anxiety and depression 5-8. Given the potential therapeutic efficacy of these compounds, there is an increasing need for preclinical behavioral models that can be used to study the pharmacology and mechanism of action of hallucinogens. Administration of LSD and other hallucinogens to mice induces the head-twitch response (HTR), a paroxysmal side-to-side head rotation, which is mediated via 5-HT 2A receptor activation 9,10. The HTR assay is a popular behavioral model for assessing 5-HT 2A activation by hallucinogens in rodents 11-15. Although the non-hallucinogenic LSD analog lisuride is active in some preclinical behavioral models used to study hallucinogens, lisuride does not induce the HTR in mice 16,17. In addition, there is a robust correlation between the potency of hallucinogens in the HTR paradigm and their activity in humans 18. The HTR has traditionally been assessed by direct observation, making data collection time-consuming and subjective. To increase the reliability and throughput of HTR studies, the behavior can be detected using a head-mounted magnet and a magnetometer coil 17. The head movement made during the HTR is highly rhythmic and has a higher frequency than most oth...