Pavlovian avoidance learning (zebrafish)

Avoidance learning procedures involve subjects learning that certain aversive events are predicted by specific environmental stimuli. This protocol is for assessing the associative learning and memory of zebrafish.

In the following zebrafish version of the task, fish must learn that a specified visual cue (e.g. grey vs check pattern) predicts an aversive stimulus (e.g. mild electric shock). This type of task is a robust method which assesses associative learning and memory, and it is reported to be impaired in many psychiatric disorders, such as anxiety disorders and schizophrenia and in neurodegenerative disorders, such as Alzheimer’s disease.


Experimental set up

The Zantiks AD and LT units can be used for avoidance learning in zebrafish. The LT system can hold two of the AD tanks with shocking plates for higher throughput.

The dividing inserts are used to create four separate testing compartments for tracking four fish in one AD tank (see image A below).

Metal “shock-plate” inserts are used to deliver the unconditioned stimulus (US+), a mild electric shock, through the water. The plates are placed at both ends of the AD tank and are designed to be present in each of the 4 arenas (as shown in images A and B below).

The visual stimuli are presented from the integrated screen below the testing tank(s). The visual stimuli can be comprised of colour, shapes, stripes, or bitmap images. In this example we will use a plain grey background and a checked background. The fish will be conditioned to avoid the checked background.

Ad Tank W Shocking Plates And Insets
A) The AD tank with 3 dividing inserts and 2 shocking plates inserted at each end, to create 4 separate arenas for 4 fish.
4Channel Shock
B) Overhead still image of the inserts in a testing tank captured from the Zantiks interface during the running of the experiment.

The tank set up for the AD and the LT will differ slightly. Please follow the appropriate video tutorial below depending on which system you are using.

AD setup for Pavlovian avoidance assay

Setting up the AD unit for a Pavlovian avoidance learning assay.

LT setup for Pavlovian avoidance assay

Setting up the LT unit for a Pavlovian avoidance learning assay.


Experimental procedure

Pavlovian avoidance learning is typically divided into three distinct stages.

  1. Baseline: Fish are initially habituated to the tank for 30 minutes. The two stimuli are presented concurrently, switching sides of the tank every five minutes. During the final 10 minutes of the baseline stage, the fish are tracked to establish baseline preference for the conditioned stimuli (CS). (See the below for preference calculation)
  2. Conditioning: The CS is paired with a mild electric shock (unconditioned stimulus, US). During nine, consecutive conditioning trials, the non-CS is displayed across the entire screen below the fish for 8.5 sec. The CS was then displayed for 1.5 sec, at the end of which the the brief shock US (9 v DC, 80 ms) is delivered.
  3. Probe: Immediately following the final CS+US pairing, the CS preference is measured again. The fish is tracked while both stimuli are presented together. (See the below for preference calculation)

During the baseline and probe stages of the aversion learning task, the two stimuli are presented together on the integrated screen below. The use of a checked pattern vs grey colour is illustrated in the video below. In this example experiment two adult zebrafish are being tested at stage 3 (probe) following the conditioning stage. Aversive stimuli (mild shock) was delivered on the checked background during the conditioning stage of this experiment.

Pavlovian conditioning probe, following conditioning stage with a grey and checked background


Results / data output

The conditioned stimulus preference scores are the main behavioural endpoint analysed in this task. Preference towards the CS is determined in the same manner for both baseline and probe calculations. The proportion of time spent in the area of the CS is calculated for the preference as: Total time in CS / (Time in CS + Time in non-CS).

A decrease in the time spent in the CS can be interpreted that the fish has learned to avoid the environmental stimulus present during the electric shock conditioning. A learned association between the environmental stimulus and the electric shock results in the fish spending less time in that environmental stimulus. The Zantiks AD system can automatically track and provide data analysis on this variable.

The CS preference scores are frequently analysed with independent samples t-tests, one-way ANOVAs or two-way repeated measures ANOVAs, depending on the number of factors.

Avoidance Learning Result Chart 3
Typical results when a change in preference following aversive conditioning is seen. Fish are initially measured for baseline preference. The decrease in time spent in the conditioned stimulus, following conditioning is observed in the trial.

Protocol scripts downloads

There are two scripts for the Pavlovian Avoidance Learning Assay for adult zebrafish. One script for use in the AD system and one for the LT system.

There are two assets that you will use. The arena asset will 'divide' the testing tank(s) into the number of arenas you wish to use (2,3 or 4); one arena for each individual fish. The zones asset will 'divide' your testing tank(s) in two separate target zones where your stimuli will be presented.

The example scripts below have been written for use at maximum throughput (4 fish per tank). If you wish to have fewer replicates and larger arenas, please ensure that you edit the assets and data export headings in the script accordingly.

Zantiks AD script

  1. AD_pavlovian_aversion_learning.zs

Zantiks LT script

  1. LT_pavlovian_aversion_learning.zs


You will need to upload the asset into the Asset directory on your Zantiks Control Console and ensure the correct asset name is in the LOAD(ZONES,"name_of_asset") and the LOAD(ARENAS,"name_of_asset") command in the script.

See the Calibrating your Zantiks unit page and Asset building in the AD unit page or Asset building in the LT unit page for details on how to create assets customised to your system.

Sprite images

When using sprite images for your stimuli, you will also need to upload them into the Assets directory and include them in the script. The following images are a checked pattern vs a grey colour.

  1. check640X640.bmp
  2. grey128X128.bmp


Brock, A. J., Sudwarts, A., Daggett, J., Parker, M. O., & Brennan, C. H. (2017). A fully automated computer based Skinner box for testing learning and memory in zebrafish. bioRxiv, 110478.
Kenney, J. W., Scott, I. C., Josselyn, S. A., & Frankland, P. W. (2017). Contextual Fear Conditioning in Zebrafish. Learning & Memory, 24(10), 516-523.
Valente, A., Huang, K. H., Portugues, R., & Engert, F. (2012). Ontogeny of classical and operant learning behaviors in zebrafish. Learning & Memory, 19(4), 170-177.