Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Zebrafish exhibit associative learning for an aversive robotic stimulus


Zebrafish have quickly emerged as a species of choice in preclinical research, holding promise to advance the field of behavioral pharmacology through high-throughput experiments. Besides biological and heuristic considerations, zebrafish also constitute a fundamental tool that fosters the replacement of mammals with less sentient experimental subjects. Notwithstanding these features, experimental paradigms to investigate emotional and cognitive domains in zebrafish are still limited. Studies on emotional memories have provided sound methodologies to investigate fear conditioning in zebrafish, but these protocols may still benefit from a reconsideration of the independent variables adopted to elicit aversion. Here, we designed a fear-conditioning paradigm in which wild-type zebrafish were familiarized over six training sessions with an empty compartment and a fear-eliciting one. The fearful stimulus was represented by three zebrafish replicas exhibiting a fully synchronized and polarized motion as they were maneuvered along 3D trajectories by a robotic platform. When allowed to freely swim between the two compartments in the absence of the robotic stimulus (test session), zebrafish displayed a marked avoidance of the stimulus-paired one. To investigate whether fear conditioning was modulated by psychoactive compounds, two groups of zebrafish were administered ethanol (0.25% and 1.00%, ethanol/water, by volume) a few minutes before the test session. We observed that ethanol administration abolished the conditioned avoidance of the stimulus-paired compartment. Ultimately, this study confirms that robotic stimuli may be used in the design of fear-conditioning paradigms, which are sensitive to pharmacological manipulations.

This is a preview of subscription content

Access options

Rent or Buy article

Get time limited or full article access on ReadCube.


All prices are NET prices.

Fig. 1: Robotics-based experimental setup.
Fig. 2: Workflow of the tracking algorithm to obtain the trajectory of the fish from the experimental videos.
Fig. 3: Experimental results.

Data availability

Datasets and codes used in the analyses are stored at the authors’ home institution and will be provided upon request.


  1. 1.

    Brewin, C. R., Andrews, B. & Valentine, J. D. Meta-analysis of risk factors for posttraumatic stress disorder in trauma-exposed adults. J. Consult. Clin. Psychol. 68, 748–766 (2000).

    CAS  PubMed  Google Scholar 

  2. 2.

    Read, J., van Os, J., Morrison, A. P. & Ross, C. A. Childhood trauma, psychosis and schizophrenia: a literature review with theoretical and clinical implications. Acta Psychiatr. Scand. 112, 330–350 (2005).

    CAS  PubMed  Google Scholar 

  3. 3.

    Schneiderman, N., Ironson, G. & Siegel, S. D. Stress and health: psychological, behavioral, and biological determinants. Annu. Rev. Clin. Psychol. 1, 607–628 (2005).

    PubMed  PubMed Central  Google Scholar 

  4. 4.

    Arnau-Soler, A. et al. A validation of the diathesis-stress model for depression in Generation Scotland. Transl. Psychiatry 9, 25 (2019).

    PubMed  PubMed Central  Google Scholar 

  5. 5.

    Roy, A. et al. Family environment interacts with CRHR1 rs17689918 to predict mental health and behavioral outcomes. Prog. Neuropsychopharmacol. Biol. Psychiatry 86, 45–51 (2018).

    CAS  PubMed  Google Scholar 

  6. 6.

    Brett, Z. H. et al. Serotonin transporter linked polymorphic region (5-HTTLPR) genotype moderates the longitudinal impact of early caregiving on externalizing behavior. Dev. Psychopathol. 27, 7–18 (2015).

    PubMed  PubMed Central  Google Scholar 

  7. 7.

    Carola, V. & Gross, C. Mouse models of the 5-HTTLPR × stress risk factor for depression. Curr. Top. Behav. Neurosci. 12, 59–72 (2012).

    PubMed  Google Scholar 

  8. 8.

    Bartolomucci, A. et al. Increased vulnerability to psychosocial stress in heterozygous serotonin transporter knockout mice. Dis. Model. Mech. 3, 459–470 (2010).

    CAS  PubMed  Google Scholar 

  9. 9.

    Gilbertson, M. W. et al. Smaller hippocampal volume predicts pathologic vulnerability to psychological trauma. Nat. Neurosci. 5, 1242–1247 (2002).

    CAS  PubMed  PubMed Central  Google Scholar 

  10. 10.

    Caspi, A. et al. Influence of life stress on depression: moderation by a polymorphism in the 5-HTT gene. Science 301, 386–389 (2003).

    CAS  PubMed  Google Scholar 

  11. 11.

    Belsky, J. et al. Vulnerability genes or plasticity genes? Mol. Psychiatry 14, 746–754 (2009).

    CAS  PubMed  PubMed Central  Google Scholar 

  12. 12.

    Bateson, P. et al. Developmental plasticity and human health. Nature 430, 419–421 (2004).

    CAS  PubMed  Google Scholar 

  13. 13.

    Zoratto, F. et al. Effects of maternal L-tryptophan depletion and corticosterone administration on neurobehavioral adjustments in mouse dams and their adolescent and adult daughters. Prog. Neuropsychopharmacol. Biol. Psychiatry 35, 1479–1492 (2011).

    CAS  PubMed  Google Scholar 

  14. 14.

    Zoratto, F., Fiore, M., Ali, S. F., Laviola, G. & Macrì, S. Neonatal tryptophan depletion and corticosterone supplementation modify emotional responses in adult male mice. Psychoneuroendocrinology 38, 24–39 (2013).

    CAS  PubMed  Google Scholar 

  15. 15.

    Beach, F. A. The Snark was a Boojum. Am. Psychol. 5, 115–124 (1950).

    Google Scholar 

  16. 16.

    Macrì, S. & Richter, S. H. The Snark was a Boojum - reloaded. Front. Zool. 12(Suppl 1), S20 (2015).

    PubMed  PubMed Central  Google Scholar 

  17. 17.

    Fontana, B. D., Mezzomo, N. J., Kalueff, A. V. & Rosemberg, D. B. The developing utility of zebrafish models of neurological and neuropsychiatric disorders: a critical review. Exp. Neurol. 299, 157–171 (2018).

    PubMed  Google Scholar 

  18. 18.

    Freires, I. A., Sardi, Jd. C. O., Castro, D. R. D. & Rosalen, P. L. Alternative animal and non-animal models for drug discovery and development: bonus or burden? Pharm. Res. 34, 681–686 (2017).

    CAS  PubMed  Google Scholar 

  19. 19.

    Gerlai, R. Fish in behavior research: unique tools with a great promise! J. Neurosci. Methods 234, 54–58 (2014).

    PubMed  Google Scholar 

  20. 20.

    Shams, S., Rihel, J., Ortiz, J. G. & Gerlai, R. The zebrafish as a promising tool for modeling human brain disorders: a review based upon an IBNS Symposium. Neurosci. Biobehav. Rev. 85, 176–190 (2018).

    PubMed  Google Scholar 

  21. 21.

    Kalueff, A. V., Echevarria, D. J. & Stewart, A. M. Gaining translational momentum: more zebrafish models for neuroscience research. Prog. Neuropsychopharmacol. Biol. Psychiatry 55, 1–6 (2014).

    PubMed  Google Scholar 

  22. 22.

    Walters, E. T., Carew, T. J. & Kandel, E. R. Associative learning in aplysia: evidence for conditioned fear in an invertebrate. Science 211, 504–506 (1981).

    CAS  PubMed  Google Scholar 

  23. 23.

    Maren, S. Neurobiology of Pavlovian fear conditioning. Annu. Rev. Neurosci. 24, 897–931 (2001).

    CAS  PubMed  Google Scholar 

  24. 24.

    LeDoux, J. E. Emotion circuits in the brain. Annu. Rev. Neurosci. 23, 155–184 (2000).

    CAS  PubMed  Google Scholar 

  25. 25.

    Blank, M., Guerim, L. D., Cordeiro, R. F. & Vianna, M. R. A one-trial inhibitory avoidance task to zebrafish: rapid acquisition of an NMDA-dependent long-term memory. Neurobiol. Learn. Mem. 92, 529–534 (2009).

    CAS  PubMed  Google Scholar 

  26. 26.

    Kenney, J. W., Scott, I. C., Josselyn, S. A. & Frankland, P. W. Contextual fear conditioning in zebrafish. Learn. Mem. 24, 516–523 (2017).

    CAS  PubMed  PubMed Central  Google Scholar 

  27. 27.

    Maximino, C. et al. Extending the analysis of zebrafish behavioral endophenotypes for modeling psychiatric disorders: fear conditioning to conspecific alarm response. Behav. Processes 149, 35–42 (2018).

    PubMed  Google Scholar 

  28. 28.

    Brock, A. J., Sudwarts, A., Daggett, J., Parker, M. O. & Brennan, C. H. A fully automated computer based ‘Skinner Box’ for testing learning and memory in zebrafish. Preprint at (2017).

  29. 29.

    Fontana, B. D., Cleal, M., Clay, J. M. & Parker, M. O. Zebrafish (Danio rerio) behavioral laterality predicts increased short-term avoidance memory but not stress-reactivity responses. Anim. Cogn. 22, 1051–1061 (2019).

    PubMed  PubMed Central  Google Scholar 

  30. 30.

    Fontana, B. D., Cleal, M. & Parker, M. O. Female adult zebrafish (Danio rerio) show higher levels of anxiety‐like behavior than males, but do not differ in learning and memory capacity. Eur. J. Neurosci. (2019).

  31. 31.

    Doving, K. B. & Lastein, S. The alarm reaction in fishes–odorants, modulations of responses, neural pathways. Ann. N. Y. Acad. Sci. 1170, 413–423 (2009).

    PubMed  Google Scholar 

  32. 32.

    Cianca, V., Bartolini, T., Porfiri, M. & Macrì, S. A robotics-based behavioral paradigm to measure anxiety-related responses in zebrafish. PLoS One 8, e69661 (2013).

    CAS  PubMed  PubMed Central  Google Scholar 

  33. 33.

    Clement, R. J. G., Macrì, S. & Porfiri, M. Design and development of a robotic predator as a stimulus in conditioned place aversion for the study of the effect of ethanol and citalopram in zebrafish. Behav. Brain Res. 378, 112256 (2019).

    PubMed  Google Scholar 

  34. 34.

    Ladu, F. et al. Live predators, robots, and computer-animated images elicit differential avoidance responses in zebrafish. Zebrafish 12, 205–214 (2015).

    PubMed  Google Scholar 

  35. 35.

    Spinello, C., Yang, Y. P., Macrì, S. & Porfiri, M. Zebrafish adjust their behavior in response to an interactive robotic predator. Front. Robot. AI 6, 38 (2019).

    Google Scholar 

  36. 36.

    Neri, D., Ruberto, T., Cord-Cruz, G. & Porfiri, M. Information theory and robotics meet to study predator-prey interactions. Chaos 27, 073111 (2017).

    PubMed  Google Scholar 

  37. 37.

    Romano, D., Donati, E., Benelli, G. & Stefanini, C. A review on animal-robot interaction: from bio-hybrid organisms to mixed societies. Biol. Cybern. 113, 201–225 (2019).

    PubMed  Google Scholar 

  38. 38.

    Katsnelson, A. Advancing artificial animals. Lab Animal 47, 201–204 (2018).

    PubMed  Google Scholar 

  39. 39.

    Krause, J., Winfield, A. F. T. & Deneubourg, J. L. Interactive robots in experimental biology. Trends Ecol. Evol. 26, 369–375 (2011).

    PubMed  Google Scholar 

  40. 40.

    Porfiri, M. Inferring causal relationships in zebrafish-robot interactions through transfer entropy: a small lure to catch a big fish. Anim. Behav. Cogn. 5, 341–367 (2018).

    Google Scholar 

  41. 41.

    Miller, N. & Gerlai, R. From schooling to shoaling: patterns of collective motion in zebrafish (Danio rerio). PLoS One 7, e48865 (2012).

    CAS  PubMed  PubMed Central  Google Scholar 

  42. 42.

    Hunt, P. S., Levillain, M. E., Spector, B. M. & Kostelnik, L. A. Post-training ethanol disrupts trace conditioned fear in rats: effects of timing of ethanol, dose and trace interval duration. Neurobiol. Learn. Mem. 91, 73–80 (2009).

    CAS  PubMed  Google Scholar 

  43. 43.

    Gould, T. J. Ethanol disrupts fear conditioning in C57BL/6 mice. J. Psychopharmacol. 17, 77–81 (2003).

    CAS  PubMed  Google Scholar 

  44. 44.

    Gerlai, R., Lahav, M., Guo, S. & Rosenthal, A. Drinks like a fish: zebra fish (Danio rerio) as a behavior genetic model to study alcohol effects. Pharmacol. Biochem. Behav. 67, 773–782 (2000).

    CAS  PubMed  Google Scholar 

  45. 45.

    Pannia, E., Tran, S., Rampersad, M. & Gerlai, R. Acute ethanol exposure induces behavioural differences in two zebrafish (Danio rerio) strains: a time course analysis. Behav. Brain Res. 259, 174–185 (2014).

    CAS  PubMed  Google Scholar 

  46. 46.

    Spinello, C., Macrì, S. & Porfiri, M. Acute ethanol administration affects zebrafish preference for a biologically inspired robot. Alcohol 47, 391–398 (2013).

    CAS  PubMed  Google Scholar 

  47. 47.

    Tran, S. & Gerlai, R. Time-course of behavioural changes induced by ethanol in zebrafish (Danio rerio). Behav. Brain Res. 252, 204–213 (2013).

    CAS  PubMed  PubMed Central  Google Scholar 

  48. 48.

    Tran, S., Nowicki, M., Fulcher, N., Chatterjee, D. & Gerlai, R. Interaction between handling induced stress and anxiolytic effects of ethanol in zebrafish: a behavioral and neurochemical analysis. Behav. Brain Res. 298, 278–285 (2016).

    CAS  PubMed  Google Scholar 

  49. 49.

    Lonsdorf, T. B. et al. Don’t fear ‘fear conditioning’: methodological considerations for the design and analysis of studies on human fear acquisition, extinction, and return of fear. Neurosci. Biobehav. Rev. 77, 247–285 (2017).

    PubMed  Google Scholar 

  50. 50.

    Melia, K. R., Ryabinin, A. E., Corodimas, K. P., Wilson, M. C. & Ledoux, J. E. Hippocampal-dependent learning and experience-dependent activation of the hippocampus are preferentially disrupted by ethanol. Neuroscience 74, 313–322 (1996).

    CAS  PubMed  Google Scholar 

  51. 51.

    Tran, S., Facciol, A. & Gerlai, R. Alcohol-induced behavioral changes in zebrafish: the role of dopamine D2-like receptors. Psychopharmacology (Berl) 233, 2119–2128 (2016).

    CAS  Google Scholar 

  52. 52.

    Maximino, C. et al. Role of serotonin in zebrafish (Danio rerio) anxiety: relationship with serotonin levels and effect of buspirone, WAY 100635, SB 224289, fluoxetine and para-chlorophenylalanine (pCPA) in two behavioral models. Neuropharmacology 71, 83–97 (2013).

    CAS  PubMed  Google Scholar 

  53. 53.

    Bartolini, T., Mwaffo, V., Butail, S. & Porfiri, M. Effect of acute ethanol administration on zebrafish tail-beat motion. Alcohol 49, 721–725 (2015).

    CAS  PubMed  Google Scholar 

  54. 54.

    Fontana, B. D. et al. Concomitant taurine exposure counteracts ethanol-induced changes in locomotor and anxiety-like responses in zebrafish. Psychopharmacology (Berl) 237, 735–743 (2020).

    CAS  Google Scholar 

  55. 55.

    Macrì, S. et al. Three-dimensional scoring of zebrafish behavior unveils biological phenomena hidden by two-dimensional analyses. Sci. Rep. 7, 1962 (2017).

    PubMed  PubMed Central  Google Scholar 

  56. 56.

    Bartolini, T. et al. Zebrafish response to 3D printed shoals of conspecifics: the effect of body size. Bioinspir. Biomim. 11, 026003 (2016).

    PubMed  Google Scholar 

  57. 57.

    Papaspyros, V., Bonnet, F., Collignon, B. & Mondada, F. Bidirectional interactions facilitate the integration of a robot into a shoal of zebrafish Danio rerio. PLoS One 14, e0220559 (2019).

    CAS  PubMed  PubMed Central  Google Scholar 

  58. 58.

    De Lellis, P. et al. Model-based feedback control of live zebrafish behavior via interaction with a robotic replica. IEEE Trans. Robot. 36, 28–41 (2020).

    Google Scholar 

  59. 59.

    Macrì, S. et al. Moderate neonatal stress decreases within-group variation in behavioral, immune and HPA responses in adult mice. PLoS One 2, e1015 (2007).

    PubMed  PubMed Central  Google Scholar 

  60. 60.

    Cahill, G. M. Circadian regulation of melatonin production in cultured zebrafish pineal and retina. Brain Res. 708, 177–181 (1996).

    CAS  PubMed  Google Scholar 

  61. 61.

    Kim, C., Ruberto, T., Phamduy, P. & Porfiri, M. Closed-loop control of zebrafish behaviour in three dimensions using a robotic stimulus. Sci. Rep. 8, 657 (2018).

    PubMed  PubMed Central  Google Scholar 

  62. 62.

    Ruberto, T., Mwaffo, V., Singh, S., Neri, D. & Porfiri, M. Zebrafish response to a robotic replica in three dimensions. R. Soc. Open Sci. 3, 160505 (2016).

    PubMed  PubMed Central  Google Scholar 

  63. 63.

    Hartley, R. & Zisserman, A. Multiple View Geometry in Computer Vision. (Cambridge University Press, New York, NY, USA, 2003).

    Google Scholar 

  64. 64.

    Feng, C., Xiao, Y., Willette, A., McGee, W. & Kamat, V. R. Vision guided autonomous robotic assembly and as-built scanning on unstructured construction sites. Autom. Constr. 59, 128–138 (2015).

    Google Scholar 

  65. 65.

    Szeliski, R. Introduction. In Computer Vision: Algorithms and Applications. (eds Gries, D. & Schneider, F. B.) 1–25 (Springer-Verlag, London, UK, 2011).

Download references


The authors are grateful to Vrishin Rajiv Soman for his help in experiments and data collection and to Andrea Scaramuzzi for technical assistance. This work was supported by the National Institutes of Health, National Institute on Drug Abuse under grant number 1R21DA042558-01A1 and the Office of Behavioral and Social Sciences Research that co-funded the National Institute on Drug Abuse grant.

Author information




S.M. and M.P. designed and supervised the research. C.S. and M.K. performed the experiments and prepared a first draft of methods. M.K. developed the tracking software for the analysis and generated the datasets. S.M. provided a first draft of the manuscript. All the authors reviewed and approved the manuscript.

Corresponding author

Correspondence to Maurizio Porfiri.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information

Supplementary information

Supplementary Figures 1–3

Reporting Summary

Supplementary Software

Supplementary Data

Trajectory of the shoal of replicas used to control the robotic platform during the experiments

Supplementary Video

Sample tracking video of a fish from the top and front views overlaid with instantaneous speed, acceleration and angular speed. The green cross shows the position of the fish detected by the tracking software.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Macrì, S., Karakaya, M., Spinello, C. et al. Zebrafish exhibit associative learning for an aversive robotic stimulus. Lab Anim 49, 259–264 (2020).

Download citation

Further reading


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing