Published: Vol 15, Iss 17, Sep 5, 2025 DOI: 10.21769/BioProtoc.5442 Views: 139
Reviewed by: Xiaochen SunAnonymous reviewer(s)
Protocol Collections
Comprehensive collections of detailed, peer-reviewed protocols focusing on specific topics
Related protocols
Pupillometry: A Simple and Automatic Way to Explore Implicit Cognitive Processing
Tian Yuan [...] Yi Jiang
Apr 5, 2025 538 Views
The Mouse Social Frailty Index (mSFI): A Standardized Protocol
Charles W. Collinge [...] Alessandro Bartolomucci
Apr 20, 2025 838 Views
Surgical Implantation of a Telemetry-Based Pressure Sensor in the Internal Jugular Vein to Monitor Respiration Wirelessly
Neha Kushwaha and Debanjan Dasgupta
Jun 20, 2025 607 Views
Abstract
Cognitive flexibility is a process that involves dynamically adapting behavior to obtain a desired series of outcomes during continuously changing stimulus-response-reward associations. Attentional set-shifting is a multi-modal decision-making paradigm that tests cognitive flexibility, which can be useful for investigating neural circuitry that is disrupted in multiple neuropsychiatric disorders, including schizophrenia, Alzheimer’s disease, depression, and addiction. The canonical human attentional set-shifting paradigm for measuring cognitive flexibility is the Wisconsin Card Sorting Test, in which subjects sort cards based on rules that change periodically and adapt their behavior by utilizing feedback in the form of correct and incorrect outcomes. To transfer these tests to rodent models, previous techniques involved attentional set-shifting paradigms in free-roaming test chambers, in which animals associated cues with reward locations. The protocol presented here involves an analogous attentional set-shifting paradigm, in which water-restricted mice are head-restrained on a platform and must keep track of periodically switching stimulus-response-outcome associations. The mice must learn to associate odor or whisker vibration cues with a binary directional lick response that triggers water delivery. The mice are trained to respond by licking one of two spouts, in which the correct decision is dependent on the current stimulus rule. This protocol allows for behaviorally measuring cognitive flexibility alongside neural activity by pairing the head-restrained paradigm with 2-photon calcium imaging, optogenetics, and extracellular and intracellular physiology.
Key features
• Head-restraint design that allows for optogenetic manipulation, in vivo imaging, extracellular and intracellular electrophysiology, and other manipulations.
• Attentional set-shifting paradigm that measures cognitive flexibility in rodents.
Keywords: Set-shiftingGraphical overview
Background
Cognitive flexibility is the ability to shift behavioral strategy based on context to receive a desired outcome. This process depends on the prefrontal cortex (PFC); lesion studies, optogenetic studies, and humans with damaged PFCs support a critical role for the PFC in cognitive flexibility [1–3]. Deficits in cognitive flexibility are associated with frontal lobe dysfunction, particularly in a range of neuropsychiatric disorders including schizophrenia [4], attention deficit/hyperactivity disorder [5], Alzheimer’s disease [6], major depressive disorder [7], and addiction [8]. Moreover, age-related cognitive deficits are predicted to rise dramatically given the predicted demographic trends in the coming decades [9]. No current treatment for these disorders specifically targets these deficits, in part because the neural circuitry of cognitive flexibility is not yet fully understood. Thus, it is necessary to incorporate techniques that directly manipulate or record specific neural populations to help distinguish the neural mechanisms and circuitry underlying cognitive flexibility. Circuit-specific investigations in rodent models will play a critical role in finding future treatments.
Rodent cognitive flexibility tasks involve animals learning a decision rule, typically motivated by consummatory reward, most frequently food or water. After dozens to hundreds of trials, the experimenter changes the task rule without cueing the animal, requiring the animal to change its strategy to continue to receive the same reward. These rodent paradigms are inspired by human neuropsychological tests. A prime example is the Wisconsin Card Sorting Task, which involves a deck of cards depicting objects that differ by three dimensions: color, shape, and number [1,9]. Participants are instructed to sort the cards into piles in one of these dimensions. Participants are never explicitly told the active rule, but rather, are given feedback after each trial (correct/incorrect). Once the participants learn which dimension is “active” and reach criterion accuracy, the task rule (active dimension) covertly switches. Thus, participants must adapt their strategy and apply a new rule to maintain positive feedback.
To identify relevant functional circuitry in cognitive flexibility, animal cognitive paradigms can be beneficial for enabling detailed in vivo imaging, electrophysiology, pharmacology, and optogenetic manipulation of neurons in relevant brain regions. Much of the foundational work in this area used free-roam versions of an attentional set-shifting (ASST) paradigm, which involved learning and alternating between two task rules associated with sensorimotor pairings, most frequently involving olfaction and somatosensation. Training for ASST involves multiple stages, with each building upon the previous stage [10–12]. A well-established example of the rodent ASST involves a testing chamber with multiple bowls containing digging media that vary by texture and odor. One bowl contains a food pellet on each trial [13,14], and the animal must switch between odor and texture rules to locate the food reward. The training begins with the animal learning simple discriminations between stimuli within one modality (e.g., gravel vs. sandy digging medium). As the training progresses, stimuli from the distractor modality are included (e.g., citrus vs. clove-scented bowls), eventually building up to the modality rule-switching ASST task. While this free-roam task incorporates a naturalistic foraging model, it carries constraints that include limits on trial numbers, extensive manual intervention by the experimenter, and limits on the neural recording techniques that can be employed. Some head-fixed paradigms have been used to study cognitive flexibility, which particularly incorporate virtual reality environment navigation (i.e., associating reward with a particular location within a virtual environment) [15] or environments depicting different visual gratings that are consequently associated with a reward [17]. It is also possible to model cognitive flexibility in head-restrained mice without requiring explicit stimulus discrimination by employing a 2-armed bandit or reversal paradigm. While these alternative approaches test cognitive flexibility, the cross-modal attentional set-shifting task presented here affords the unique advantage of building on an extensive experimental literature that spans basic, translational, and clinical work. Head-restrained experiments can also be designed to be temporally specific by having fixed times between stimulus, behavior, and reward—an advantage over free-roam navigation tasks. Trade-offs of the technique presented here include sacrificing naturalistic behavior (i.e., foraging) as well as the potential for stress associated with head-restraint [17]. However, proper and repeated habituation and handling help animals adjust to temporary restrictions.
This protocol includes instructions on behavioral training to prepare animals to learn the Serial Extradimensional Set-Shifting Task (SEDS). The SEDS task involves two modalities: whisker vibrations (e.g., 35 Hz vs. 155 Hz) and odorants (e.g., almond oil vs. nutmeg oil) [2]. Water-restricted mice are placed on a treadmill facing two lick spouts and must use one of these sensory stimuli to determine which spout releases water during each trial; both sensory modalities are presented concurrently, but within each trial block, only one of the two modalities signals the correct spout for each trial. In the paradigm presented here, as in the WCST and other rodent rule-switching paradigms [17], the rule switches each time the animal reaches criterion accuracy (80% correct within a 30-trial moving window). However, the switch frequency can also be set to a fixed trial number [18] or pseudo-randomized [19], depending on the constraints of the experiment.
Through modifications to the FlexRig hardware and Arduino software, the behavioral protocol can be edited for application to other tasks, including but not limited to delayed non-match to sample tasks, serial pattern learning tasks, concurrent schedule learning, multi-armed bandit tasks, and other conditioning paradigms.
Materials and reagents
Biological materials
1. Animals used for the training are C57BL/6 mice. Both male and female mice have been tested on this protocol, with both males and females performing with equal training time and response accuracy. Mice undergo surgeries and training at 4–6 weeks of age. Bodyweight is monitored daily to ensure it remains above 80% of baseline (pre-water restriction)
Laboratory supplies
1. MN Health 1cc Luer Lock syringe (MN Health, SLL-1ml, catalog number: 1040001)
2. Reusable oral gavage needles (PetSurgical, catalog number: AFN2425S)
Equipment
All equipment and associated software for building and running the FlexRig behavioral platform has been previously described in detail [20], including manufacturer information and software such as Arduino. No additional modifications have been made to the FlexRig since earlier publication.
1. A treadmill “base” to secure a head-restrained mouse that has the ability to stand below a microscope
2. A water module to reward water to animals during the training
3. A lick detection circuit module that can detect behavioral responses (i.e., licks to the lick spouts) from the animal
4. An olfactory presentation module that has the ability to release different types of odorant stimuli for the animal
5. An air vibration module for administering auditory or whisker cues
6. A platform for interfacing the FlexRig with an Arduino board
7. Arduino Mega 2560 programmable microprocessor
8. DF Robot sound card (DF Player Pro)
Software and datasets
1. Arduino IDE
2. (Optional) PuTTY Serial logging software for trial data logging (or alternative logging software)
3. FlexRigFunctions Arduino library (available through Spellman Lab website or the GitHub repository)
Example behavioral datasets are available upon written request.
Procedure
A. Mouse handling and care
1. Engage mouse in water restriction for 3 days, beginning at least two weeks post-surgery (i.e., any surgical procedures including, but not limited to, brain implants or viral injections). During this regime, the animal should be fed 50 mL/kg of water per day (e.g., 1.25 mL per day for a 25 g mouse).
PAUSE POINT: The experiments for which this protocol was adapted involve transcranial vector transfusion and implantation of in vivo imaging hardware during stereotactic surgeries. However, surgeries will vary depending on the needs of the experiments.
2. After the 3-day water restriction period, acclimate the animal to experimenter handling. Hold the animal in a cupped hand and offer 1.0 mL of water from a syringe with an attached oral gavage needle (referred to as hand feeding). Offer the mouse water for 10 min or until satiated. This will teach the mouse to associate a lick spout with the release of water. Hand feed for 3 consecutive days.
Note: After surgery, mice will generally be more docile.
PAUSE POINT: To ensure proper adjustment to a new environment, gently lift the mouse from the cage into your hand, using a cupped hand method [21]. Hold the animal ~8 inches above the open-topped cage. Do not scruff or hold the mouse with its tail (Figure 1). Techniques such as these can induce stress in mice, which can consequently reduce the willingness of the mouse to explore and interact with a new environment, such as the hand of a researcher or the FlexRig [16,22,24].
Figure 1. Overview and timeline of training protocol. An overview of the stages of SEDS training in order. Each step of training gradually builds rules for the mice to learn revolving around receiving a water reward during daily water restriction. Upper left: examples of incorrect (i.e., scruffing technique, holding mouse by its tail) and correct handling of mice. Both methods can impact performance on training and set-shifting tasks.
3. Let the mouse adjust to the new environment (i.e., the experimenter’s hand). Use the hand-over-hand treadmill technique, which involves placing the mouse in one hand, resting the other hand slightly below and in front of the hand the mouse is in, prompting the mouse to move from one hand to the other (Video 1). Keep the mouse in a position where it is walking downward and forward, toward its cage.
4. After 5 min of adjustment and exploration with the technique described above, begin feeding the mouse water with the syringe and gavage needle. Make sure to dispense in discrete droplets of ~3 μL at a time (Video 1). The experimenter should attempt to keep the oral gavage needle at the same distance as the lick spouts on the FlexRig, because although the mouse is freely moving, it could in effect approach the lick spout from multiple angles in alternation.
B. Habituation
1. Habituation 1 (HB1): Habituate the mouse to the FlexRig in a non-head-restrained context. During HB1, the Arduino pseudo-randomly arms a lick spout to dispense a 4 μL bolus when licked. The armed lick spout alternates every 1–4 trials, with a uniformly varying 0.5–1.5 s timeout after water is delivered each trial (Video 1). The goal of HB1 is to introduce the mouse to the rig while associating the lick spouts with the release of water. This step requires close supervision, given the lack of head restraint.
a. Loading the program and beginning the session: Open the Arduino script habituation.ino. At the top of the program menu, click Tools → Port, and then select the USB port to which the FlexRig is connected. Upload that script to this Arduino board by pressing the Upload button in the IDE. Next, open the serial window (Tools → Serial Monitor) and select HB1/HB2.
b. Place the mouse on the center of the treadmill of the FlexRig, making sure that the mouse is facing forward toward the lick spouts.
c. Bait the mouse with a syringe toward the lick spouts by dispensing water as the mouse moves closer.
PAUSE POINT: If the mouse wanders and tries to explore the outskirts of the rig, guide the mouse back into place via a water syringe.
d. The passing requirement for HB1 is at least 500 μL consumed from the automated lick spouts; this value is tallied and displayed in the Serial Monitor window.
2. Habituation 2 (HB2): Habituate the mouse to the FlexRig in the same manner as HB1, but this time incorporate brief head restraint. HB2 familiarizes the mouse to the head-restrained component of the FlexRig.
a. Upload the Arduino script habituation.ino to the port associated with the specific FlexRig and select HB1/HB2 in the serial window.
b. Place the mouse on the treadmill and bait the animal toward the area of the treadmill where the head restraints are located. Press the head plate into the corresponding grooves on the rig and screw into place.
c. Secure the headplate with 0-80 screws. To do this, maintain one finger on one side of the headplate while screwing in the other side to ensure the mouse is secured. Repeat for the opposite side of the headplate.
PAUSE POINT: Make sure not to touch the mouse’s head or the transcranial window or prism if using in vivo imaging, or optogenetic implants if using optogenetics.
d. Carefully position the lick spouts so that they are horizontally centered on the mouse’s nose. Spouts should be ~5 mm apart horizontally, ~6 mm below (ventral to), and ~4 mm in from (caudal to) the tip of the nose (Figure 2).
e. Use the knob at the front of the treadmill to move the lick spouts closer or further to the mouse (Video 2) and check to see if the mouse can reach by applying water to the spout with the syringe.
f. Use the knob to the side of the treadmill to move the lick spouts to the left or the right of the mouse (Video 2). Look above the mouse’s head to see if the lick spouts are positioned in equal distance to the mouse (Figure 2).
g. Turn the brass knob underneath the lick spouts left or right to adjust for the height of the lick spouts, making sure that they are not too high up or too low for the mouse to reach (Video 2).
h. Bait the mouse by manually dispensing 1–2 drops of water at a time onto the lick spouts via syringe. Alternate left and right to observe the mouse’s licks in both directions and gauge lick spout positioning. While the spout distances indicated above are standard, individual differences, e.g., in head orientation relative to the restraint bar, may require further adjustment. Once the animal begins licking, stop dispensing water and allow the mouse to learn to associate water and the lick spouts independently. If it stops licking for longer than 10 s, bait with the same technique again.
i. Record the animal as passing HB2 once 500 μL of water has been consumed within 10 min of the start of the session.
Figure 2. Correct positioning of lick spouts. (A) Side view of lick spout positioning. The mouse’s nose should be centered between the two lick spouts, which should be kept 6 mm below the mouse’s nose. (B) Overhead view of lick spout positioning. When positioning the lick spouts, look overhead to make sure the lick spouts are positioned correctly, as sometimes the lick spouts can incorrectly appear as if they are centered when viewed laterally.
3. Habituation 3 (HB3): Habituate the head-restrained mouse to the dispensing of water in left or right trial blocks. During this stage, lick spouts will be armed in blocks of 20 trials (e.g., left lick spout armed for 20 trials, right lick spout armed for the following 20 trials). This prepares the animal for Shaping, which is facilitated by a blocked trial structure.
a. Upload the script habituation.ino from the Arduino IDE to the port associated with the specific FlexRig and select HB3 on the Serial Window.
b. Place the animal in the FlexRig treadmill with the same head-fixing procedure as in HB2.
c. Record the animal as passing HB3 once 500 μL has been consumed within 10 min of the session.
C. Shaping
1. Shaping 1 (SH1): Once the mouse has passed HB3, begin behavioral shaping (SH1), in which the temporal structure of the trial (trial start tone, stimulus presentation, and brief arming of the lick spout) is introduced to the animal (Figure 1). The beginning of the trial will be signaled by a 500 ms white noise (2–17 kHz). Experimenter-chosen stimuli are presented for 2.5 s. The mouse will be given a 4-s response window in which a lick to the specific spout associated with the current stimulus presented will dispense water. SH1 incorporates the blocked trial structure, where the presented stimuli will switch after 20 trials (e.g., if the first stimuli were 155 Hz associated with the left lick spout, the second stimuli will be 35 Hz associated with the right lick spout). Correct licks are rewarded, while error licks are not counted and do not end the trial or result in a timeout (see General notes). An inter-trial interval of 8–10 s is used and randomly determined on a trial-to-trial basis. This training stage reinforces the association between stimuli and reward.
a. Upload the script shaping.ino from the Arduino IDE to the port associated with the specific FlexRig in use and select SH1, then select the desired modality (whisker vs. odor).
b. Place the mouse on the FlexRig treadmill with the same head-fixing procedure as in previous sessions.
c. Record the mouse as passing once 500 μL of water has been consumed in a single session.
2. Shaping 2 (SH2): Once the mouse has passed SH1, begin training on SH2 (Figure 1). SH2 utilizes the same trial-block structure as SH1, but the time constraint for the response window is reduced from 4 to 1.5 s, and critically, licks to the incorrect lick spout are penalized, triggering the end of the trial without delivering a reward. No additional timeout beyond the standard inter-trial interval is imposed following incorrect trials in this or any of the following stages, in order to facilitate comparisons of neural activity following correct and incorrect trials.
a. Upload the script shaping.ino from the Arduino IDE to the port associated with the specific FlexRig in use and select SH2. Then, select the desired modality (odor vs. whisker) for the animal that corresponds to their previously assigned modality.
b. Place the mouse on the FlexRig treadmill with the same head-fixing procedure as in previous sessions.
c. Record the animal as passing if the criterion is met. Criterion here consists of 80% accuracy within a 100-trial moving window.
PAUSE POINT: If mice continuously struggle to pass SH1 or SH2, observe behavior during the task, and if they are not responding (i.e., not licking the lick spouts), bait them by placing water on the sides of the lick spouts as the trial commences.
D. Serial extradimensional set-shifting training
1. Simple discrimination (SD): Once the mouse has passed SH2, begin training on Simple Discrimination (SD). SD incorporates the same trial structure and modalities as assigned to the mouse in SH2, but rather than using blocks of left and right trials, SD randomizes stimulus presentation for each trial. A 500-ms audible white noise signals the start of each trial, which is followed by stimulus presentation for 2.5 s (Video 3). An inter-trial interval of 8–10 s is typically used.
a. Upload the script bimodal_2AFC.ino from the Arduino IDE to the port associated with the specific FlexRig and select SD. Select the desired modality for the mouse that corresponds to what modality was chosen in the previous training.
b. Place the mouse on the FlexRig treadmill with the same head-fixing procedure as in previous sessions.
c. Record the mouse as passing if the animal performs >100 trials and reaches 80% accuracy within any 30-trial moving window, while simultaneously performing at least 50% on both left and right trials (this value is computed and displayed in the Serial Window). These same passing criteria are used for the subsequent tasks as well.
PAUSE POINT: If a mouse struggles to pass SD for more than 5 days, move the animal back to SH2 and increase the passing requirements to 90% accuracy within a 100 moving trial window. However, make note that if the passing requirements change, this must be done for all mice undergoing the same experiment. See Troubleshooting for more information.
2. Compound discrimination (CD): Once the mouse passes SD, begin training on Compound Discrimination (CD). CD introduces the irrelevant modality simultaneously with the relevant modality while incorporating the same structure as SD. Thus, in this session, the mouse must learn to ignore the irrelevant modality.
a. Upload the script bimodal_2AFC.ino from the Arduino IDE to the port associated with the FlexRig and select CD. For CD, select the same modality as in prior stages, and the code will automatically assign the irrelevant modality as the opposite modality that was chosen.
b. Place the animal on the FlexRig treadmill with the same head-fixing procedure as in previous sessions.
c. The criterion for passing CD is identical to the criterion for SD.
3. Intradimensional shift (IDS): Once the mouse passes CD, begin training on Intradimensional Shift (IDS). IDS is a form of cognitive flexibility that involves using a new set of stimulus exemplars within the same modality as the previous training stages (e.g., SD, CD). The irrelevant exemplars are kept constant here.
a. Upload the script bimodal_2AFC.ino from the Arduino IDE to the port associated with the FlexRig and select IDS. Select the same modality as in previous stages.
b. Place the animal on the FlexRig treadmill with the same head-fixing procedure as in previous sessions.
c. The criterion for passing is identical to CD and SD.
4. Reversal (REV): REV incorporates the same relevant and irrelevant stimuli that were used in IDS, but the left-right mapping is swapped (e.g., a 210 Hz whisker vibration that previously cued the animal to lick left now cues a right lick). This stage introduces a cognitive flexibility rule, whereby the mouse must learn to adjust its behavior following a change in left-right stimulus-response pairings.
a. Upload the script bimodal_2AFC.ino from the Arduino IDE to the port associated with the FlexRig and select REV. Select the same modality as in previous trainings.
b. Place the animal on the FlexRig treadmill with the same head-fixing procedure as in previous sessions.
c. The criterion for passing is identical to IDS, CD, and SD.
5. Extradimensional shift (EDS): Once the mouse passes REV, begin training on Extradimensional Shift (EDS). EDS involves the same stimuli that were used in IDS and REV and introduces a new abstract principle—the rule switch in this stage involves changing the irrelevant and relevant stimulus dimensions. Because the irrelevant and relevant stimuli are chosen randomly and independently on each trial, 50% of trials will be congruent (e.g., both the irrelevant rule and relevant rule indicate the same spout), whereas 50% of trials will be incongruent (e.g., the irrelevant rule and relevant rule give conflicting information about which lick spout has the desired outcome). Perseveration on incongruent trials following rule switches is interpreted as cognitive inflexibility, while errors on congruent trials reflect random or nonspecific deficits and are often interpreted as positive control trials. This test is the classic PFC-dependent set-shift [23].
a. Upload the script bimodal_2AFC.ino from the Arduino IDE to the port associated with the FlexRig and select EDS. Then, select the desired modality for the animal that corresponds to what modality was assigned in previous trainings.
b. Place the animal on the FlexRig treadmill with the same head-fixing procedure as in previous sessions.
c. The criterion for passing is identical to Rev, IDS, CD, and SD.
6. Intradimensional shift B (IDSB): Once the mouse passes EDS, begin training on Intradimensional Shift B (IDSB). As in the initial IDS stage, a new set of stimulus exemplars is introduced, this time within the newly relevant sensory modality. This stage teaches the animal that both modalities can have multiple stimulus combinations that still determine the left-right mapping of outcomes, thus reinforcing abstract stimulus sets in each modality and preparing the animal for the continuous set-shifting in the serial extradimensional set-shifting task.
a. Upload the script bimodal_2AFC.ino from the Arduino IDE to the port associated with the FlexRig and select IDSB. Then, select the desired modality for the animal that corresponds to what modality was assigned in previous trainings.
b. Place the animal on the FlexRig treadmill with the same head-fixing procedure as in previous sessions.
c. The criterion for passing is identical to the previous stages.
7. Serial extradimensional set-shifting (SEDS): Once the mouse passes IDSB, begin training on the Serial Extradimensional Set-Shifting Task (SEDS) (Figure 1). Here, the relevant sensory modality is randomly chosen for the initial trial block. Each time the animal reaches criterion performance (as with earlier task stages, 80% accuracy within a 30-trial moving window and simultaneous accuracy over 50% for both left and right trials), the sensory rule changes, and the previously irrelevant modality becomes newly relevant. The two whisker stimuli and two odor stimuli used are unchanged from IDSB.
a. Upload the script bimodal_2AFC.ino from the Arduino IDE to the port associated with the FlexRig and select SEDS.
b. Place the animal on the FlexRig treadmill with the same head-fixing procedure as in previous sessions.
c. Mark the animal as passing the task once it has reached at least two set-shifts, i.e., has begun at least its third trial block, within a given session.
Data analysis
Data analysis of head-fixed tasks with the modular platform has been previously described [2]. After passing SEDS, mice typically complete about 3–8 set-shifts and approximately 300–600 trials per session. It typically takes 15–20 trials following a rule change for the mice to cease perseverating on incongruent trials, i.e., using the sensory rule from the previous block. Behavioral data generated by FlexRig can be imported into MatLab using the importBehavior.m function provided in the FlexRig GitHub package (https://github.com/spellmanlab/FlexRig).
Validation of protocol
The protocol has been used and validated previously [2,20].
General notes and troubleshooting
General notes
1. Maintain recordings of each mouse’s weight in grams. If a mouse is under 80% body weight, take the mouse off the water-restricted regime and exclude them from the experiment.
2. Lick bias algorithm: Most mice have a tendency to favor one of the two lick spouts and to revert to persistently licking one spout when frustrated or uncertain about the task rule. The Arduino code (bimodal_2AFC.ino) used to administer training stages SD, CD, IDS, Rev, EDS, IDSB, and SEDS features optional lick bias correction, in which the ratio of left and right trials is dynamically computed based on the animal’s recent directional bias. Lick bias is tracked in a 10-trial moving window. When lick bias correction is engaged, the probability for a given lick spout to be rewarded on each trial is a function of the inverse of the frequency of the mouse’s licks to that spout across the 10 previous trials. The code provides several options for lick bias correction, of which we generally recommend selecting triggered for animals exhibiting a persistent preference for one lick spout. Below is a list of the possible options that can be selected on the serial window:
a. Always OFF option. No measures are taken to counteract the animal’s directional lick bias when this option is selected, and left-right lick spout selection is fully randomized on each trial. This is recommended for post-training testing sessions, in which randomized trial-to-trial parameters and a balance of left and right trials are desired.
b. Always ON option. A moving window tracks mouse performance and provides more of one trial type (e.g., left trials) if there is a preference toward the opposite trial type (e.g., right trials).
c. Triggered option. The program provides a random assignment of left and right trials until the lick bias exceeds 50% (e.g., for left trials). When this threshold is crossed, the algorithm begins providing more right trials. Lick bias algorithm resets to random left/right assignment once the bias falls below 50%.
3. Mice should be housed on a reverse light/dark (12 h each, 9 A.M. to 9 P.M.) in a regulated facility (20–24 °C, humidity 30%–60%).
4. Mice should be run a minimum of 5 consecutive days per week. Six days is recommended, with one day off. Mice should be hand-watered, either through a gavage needle or by leaving a water ration in a small cup in the home cage.
5. Lick detection on the FlexRig is achieved by passing micro-currents (3 μA) from the metal treadmill through the animal’s feet and to the lick spout via the tongue. Maintaining low resistance between the spout and the treadmill is therefore important. Prior to running a mouse, place a few drops of water on the treadmill to improve conductance for lick detection, and keep the treadmill surface clean between uses, both to facilitate conductance and to allow smooth running. The FlexRig treadmill should be taken apart weekly to clean the rotors and the treadmill thoroughly with water and ethanol.
6. Head restraint plates or bars should make direct contact with the skull for improved conductance.
7. Care should be taken to minimize stress to the mice during training. Where possible, mice undergoing the training protocol should be housed in the same room where training is conducted. If animals must be returned to a centralized animal facility each day, care should be taken to minimize noise and vibration during transport [24].
8. Cages should be changed at least weekly. Food should be made available ad libitum.
9. If a mouse does not pass the training for that day, do not run the mouse on the same training during the same day unless the mouse does not reach 100 trials in the session.
PAUSE POINT: Some mice may be unable to complete training within the time constraints of an experiment. If a mouse is stuck on one stage of the training post-habituation stage for ~2 weeks, then that mouse should generally be excluded from the study. Depending on the needs and constraints of the experiment, this threshold may be adjusted, provided that it is predetermined and applied uniformly across groups.
a. If the mouse does not pass training for the day but performs over 100 trials, hand water them the remaining amount of water for the day (volume: 1,100 μL minus the volume drank during training session).
b. If the mouse does not pass training for the day and does not perform 100 trials, make sure the FlexRig is set up correctly. Test for lick spout conductance by triggering lick detectors manually and run a test of the training program being used for that session. Then, train the mouse again on the same session for the second time that day. This second training should be immediately after the first training, but this time, the researcher must participate in the training by baiting the animal with water on both lick spouts once the stimuli are released. If the mouse still does not respond, hand-feed the mouse the remaining amount of water they did not drink, and do not run them until the next day. Do not re-run a mouse for a third time if they still fail to respond.
Troubleshooting
Problem 1: Mice are not participating in the task or training.
Possible cause 1: The mice are not motivated to participate.
Solution: Water-deprive animals for one day and return to training the next day.
Possible cause 2: The lick spouts are not dispensing water.
Solution 1: Fill water if low and ensure positive air pressure in the water bottle of 3–5 PSI.
Solution 2: Make sure to test the FlexRig using the Arduino code RigTest.ino. Check if all components of the FlexRig are working properly (e.g., water dispensing, lick detection, sound cards, odor release, etc.).
Possible cause 3: The mouse cannot reach the lick spouts, or lick spouts are not correctly positioned.
Solution: Reposition lick spouts based on the position of the mouse. Check to see if the mouse can lick each by placing some water on each lick spout.
Possible cause 4: If using tone stimuli, speakers are not positioned to reach the mouse’s whiskers.
Solution: Reposition the speakers so that the tone vibration reaches the whiskers of the mouse. Test for whisker vibration by holding tissue paper or a fine-haired brush up to the speaker aperture.
Possible cause 5: If using odor stimuli, odor stimuli may not be potent enough, and odorants or solenoids might have to be replaced.
Problem 2: Mice take excessive time to pass a stage in the SEDS training protocol.
Solution 1: Place the mouse back on the previous training step (e.g., if a mouse is stuck on EDS, revert back to REV the following day until the animal passes again).
Solution 2: Increase the passing requirements for each step, such as Habituation, Shaping, or SD requirements. For example, for habituation, require 800–1,000 μL within 10 min. For Shaping and SD, increase the passing criterion to 90%.
Note: Troubleshooting with the hardware or software components of the FlexRig can be assessed using Cristino et al. and the associated GitHub repository [20].
Acknowledgments
This protocol was conceptualized and developed by Timothy Spellman. Training of animals on SEDS was conducted and refined by John Stout, Alexander Mitchell, and Katarina Kalajzic. The original draft was written by Katarina Kalajzic, and the work was supervised by Timothy Spellman. Review & Editing was done by Alexander Mitchell, John Stout, Timothy Spellman, and Katarina Kalajzic.
This protocol was described and validated in Spellman et al. [2] and Cristino et al. [20].
The presented work is funded by the National Institute of Mental Health Grant R00MH117271-03.
Graphical overview was created with biorender.com: Kalajzic, K. (2025) https://BioRender.com/01ix58o. Videos were created using Microsoft ClipChamp.
Competing interests
The authors declare no conflicts of interest.
Ethical considerations
The IACUC at the UConn Health Center has approved the described experiment. Permission was given by the IACUC to provide photos of live animals in this protocol.
References
Article Information
Publication history
Received: May 20, 2025
Accepted: Jul 22, 2025
Available online: Aug 20, 2025
Published: Sep 5, 2025
Copyright
© 2025 The Author(s); This is an open access article under the CC BY-NC license (https://creativecommons.org/licenses/by-nc/4.0/).
How to cite
Kalajzic, K., Stout, J. J., Mitchell, A. C. and Spellman, T. (2025). Training Mice to Perform Attentional Set-Shifting Under Head Restraint. Bio-protocol 15(17): e5442. DOI: 10.21769/BioProtoc.5442.
Category
Neuroscience > Behavioral neuroscience > Cognition
Neuroscience > Behavioral neuroscience > Sensorimotor response
Do you have any questions about this protocol?
Post your question to gather feedback from the community. We will also invite the authors of this article to respond.
Tips for asking effective questions
+ Description
Write a detailed description. Include all information that will help others answer your question including experimental processes, conditions, and relevant images.
Share
Bluesky
X
Copy link