Affective Shift Task

Technical Manual

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com), Millisecond

Created: January 13, 2022

Last Modified: January 17, 2025 by K. Borchert (katjab@millisecond.com), Millisecond

Script Copyright © Millisecond Software, LLC

Background

This script implements Millisecond's version of the Affective shift Task (AST), a paradigm to study executive functioning as measured by inhibition and set shifting, in response to emotional and non-emotional face stimuli.

Due to the fact that the keyboard response keys should spatially map onto the 4 quadrants of a 2x2 matrix, the script should be run on devices with external keyboards only. In case the script cannot detect an external keyboard, the script terminates after a brief notification message.

DISCLAIMER: The implemented procedure is based on the description of the task by De Lissnyder et al (2010) and is a best guess-effort based on the provided information.

References

De Lissnyder, E., Koster, E. H. W., Derakshan, N., & De Raedt, R. (2010). The association between depressive symptoms and executive control impairments in response to emotional and non-emotional information. Cognition and Emotion, 24(2), 264–280. https://doi.org/10.1080/02699930903378354

Duration

25 minutes

Description

Participants are asked to find the 'odd-one-out' face in 2x2 arrays of faces based on a cued dimension (gender, color, or emotion). Three of the four faces always share one particular variation on each of these three dimensions and one face is always the 'odd-one-out'.

For example, three of the faces might be colored light gray and one face is dark gray - if the cue is 'COLOR', the target would be dark gray face. At the same time, three faces in the array share the same gender - if the is 'GENDER' the sole face of the other gender would be the target. Likewise, three faces in the array share the same emotion - if the cue is 'EMOTION', the target would be the only face with the opposite emotion. For each of the three dimensions (gender, color, or emotion), the target face is always a different one, so participants have to pay attention to the 'cue'.

Procedure

(1) INTRO

(2) PRACTICE
- each practice block runs 12 trials
- Each dimension is run four times (with each of the two variations being used as the 'odd-one-out' twice)
Example: dimension "GENDER" is run four times with 2 times showing a Female face as the 'odd-one-out'
and 2 times showing a Male face as the 'odd-one-out'
- the order of the cues is randomly determined
- the Practice block is repeated up to four times (editable parameters) if performance is lower than 80%correct
(editable parameters)
- after a maximum of 4 practice blocks, everyone advances to the test block despite practice performance

(3) TEST

General Design: 4 trialtypes (inhibitory, control, unclassified, repeat) X
3 cues (emotion: angry/happy, gender: female/male, color: dark/light)

The design runs: 216 trial sequences total (see list.trialtypes and list.cueOrder for details), order is randomly determined

Shifting Trial Sequences:
48 Inhibitory trial sequences:
-trial sequence that runs 3 cue-face display trials where the last cue is different from the second cue;
but repeats the first one (a-b-a)
there are 48 different possible ways to arrange the 6 variations of each possible
dimension as cues for Inhibitory trial sequences (see list.cueOrder for details)

48 Control trial sequences:
- trial sequence that runs 3 cue-face display trials where all
three cues are different from each other (a-b-c)
there are 48 different possible ways to arrange the 6 variations of each possible
dimension as cues for Control trial sequences (see list.cueOrder for details)

48 Unclassified trial sequences:
- trial sequence that runs 3 cue-face display trials where the second cue repeats the first,
but the last cue is always different (a-a-b)
there are 48 different possible ways to arrange the 6 variations of each possible
dimension as cues for Unclassified trial sequences (see list.cueOrder for details)

Repeat Trial Sequences:
72 Repeat trial sequences:
- trial sequence that runs 2 cue-face display trials where the second cue always repeats the first one
there are 12 different possible ways to arrange the 6 variations of each possible
dimension as cues for Repeat trial sequences; each of those (see list.cueOrder for details)

IMPORTANT: The target trials in each trial sequence are always the LAST cue-face display.

Trial Sequence
Example: I(nhibitory) trial sequence

cue order is sampled beforehand: Example 'afh'

Cue1 (a -> EMOTION -> the 'angry' face will be 'odd-one-out'): 500ms
Face Display of four faces arranged in a 2x2 matrix*: until response ()
ITI: 100ms

Cue2 (f -> GENDER -> the female face will be 'odd-one-out'): 500ms
Face Display of four faces arranged in a 2x2 matrix*: until response
ITI: 100ms

Cue3 (h -> EMOTION -> the 'happy' face will be 'odd-one-out'): 500ms
Face Display of four faces arranged in a 2x2 matrix*: until response (TARGET TRIAL)
ITI: 100ms

• all faces displays are randomly determined

Face Display Generation

=> see expressions.generateFoilsAndTargets

Target Face:
- the target face is constrained by the particular 'cue' sampled
Example: 'a' -> the target face needs to be 'angry'; the foil faces need to be 'happy'

- the script randomly determines the remaining variations of the target face:
color: randomly (without replacement) selects dark vs. light
gender: randomly (without replacement) selects female vs. male

- Based on the composition of the target face,
the required foil face variations are constructed.
Example:
target face: angry-light-male
foil1: happy-light-male
foil2: happy-light-female
foil3: happy-dark-male

- the script randomly without replacement samples from the available pool for each
face (target face, foil1, foil2, foil3).
Example: the composition of the target face is: angry-light-male
The script randomly (without replacement) selects the next available 'angry-light-male' face
( this script only provides 2 possible examples for each combination, so there will be
a lot of repeats of faces - however, the same face should not be selected on consecutive draws.).
Similarly, the script will select the next available 'happy-light-male' image as foil1.

Quadrant Assignment:

- the script randomly (without replacement) selects the quadrant in which the target should be
presented for each face display. Across the 576 face displays (576 = 48*3 + 48*3 + 48*3 + 72*2),
the target should be presented in each quadrant 144 times.
- the foils are randomly distributed amongst the remaining three quadrants

Response Keys:
The current response keys are E (quadrant1), I (quadrant2), M (quadrant3), and C (quadrant4).
The spatial location of the keys (on the American keyboard) map directly onto the four quadrants of the
2x2 face matrix.
Because the default Inquisit response keys on touchscreens (run without external keyboards) would be
presented in a linear line, the spatial mapping of response keys and matrix positions is lost.
The script therefore checks whether an external keyboard can be detected on the current device at the start
of the script. If that's not the case, the script terminates with a brief notification message.

Stimuli

provided by Millisecond - can be edited under section 'Editable Stimuli'

Faces:
● Original study (De Lissnyder et al,2010)
The original face stimuli were taken from the Karolinska Directed Emotional Faces database
(KDEF; https://www.kdef.se/). All faces were adjusted to exclude interference of background
stimuli (hair) and were adjusted to the same size.
The images were taken based on the results from a validation study of this picture set
(Goeleven, De Raedt, Leyman, & Verschuere, 2008).

● Millisecond script:
The Millisecond script provides PLACEHOLDER stimuli from the NIMS database.
https://www.macbrain.org/resources.htm

8 female faces and 8 male faces were selected. Each face was selected with an
angry, open-mouth expression and a happy, open-mouth expression.
All faces are of young adult caucasian actors.
The faces were adjusted to exclude interference of background
stimuli (hair - as much as possible) and were adjusted to the same size (600px X 600px).
Color variations were achieved by changing the brightness of the images up and down.
All image changes were made in Paint.net.

These face images can easily be replaced/edited by others under section Editable Stimuli,
editing item.female_dark_angry to item.male_light_happy_faces.

The script ensures to select a different actor for each of the four quadrants.

Instructions

provided by Millisecond - can be edited under section 'Editable Instructions'.
They are not the originals.
See script 'affectiveshifttask_instructions_inc.iqjs'

Summary Data

File Name: affectiveshifttask_summary*.iqdat

Data Fields

NameDescription
inquisit.version Inquisit version number
computer.platform Device platform: win | mac |ios | android
computer.touch 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities
computer.hasKeyboard 0 = no external keyboard detected; 1 = external keyboard detected
startDate Date the session was run
startTime Time the session was run
subjectId Participant ID
groupId Group number
sessionId Session number
elapsedTime Session duration in ms
completed 0 = Test was not completed
1 = Test was completed
propCorrectOverall Overall proportion correct target trial responses
meanCorrRTOverall Overall mean response time (in ms) of correct target trial responses
inhibition Calculated as 'RT to Inhibitory trials - RT to Control trials'
Interpretation: High inhibition scores reflect good executive ability (Executive Function Measures)
setShifting Calculated as '([RT to Control + RT to Unclassified]/2) - RT to Repeat trials' (Executive Function Measures)
Interpretation: Smaller difference is better executive abilit
meanCorrRTI Mean response time (in ms) of correct target trial responses in I(nhibitory) trial sequences
meanCorrRTC Mean response time (in ms) of correct target trial responses in C(ontrol) trial sequences
meanCorrRTU Mean response time (in ms) of correct target trial responses in U(nclassified) trial sequences
meanCorrRTR Mean response time (in ms) of correct target trial responses in R(epeat) trial sequences
meanCorrRTIGender Mean response time (in ms) of correct target trial responses in I(nhibitory) trial sequences with GENDER cues
meanCorrRTIColor Mean response time (in ms) of correct target trial responses in I(nhibitory) trial sequences with COLOR cues
meanCorrRTIEmotion Mean response time (in ms) of correct target trial responses in I(nhibitory) trial sequences with EMOTION cues
meanCorrRTCGender Mean response time (in ms) of correct target trial responses in C(ontrol) trial sequences with GENDER cues
meanCorrRTCColor Mean response time (in ms) of correct target trial responses in C(ontrol) trial sequences with COLOR cues
meanCorrRTCEmotion Mean response time (in ms) of correct target trial responses in C(ontrol) trial sequences with EMOTION cues
meanCorrRTUGender Mean response time (in ms) of target trial responses in U(nclassified) trial sequences with GENDER cues
meanCorrRTUColor Mean response time (in ms) of target trial responses in U(nclassified) trial sequences with COLOR cues
meanCorrRTUEmotion Mean response time (in ms) of target trial responses in U(nclassified) trial sequences with EMOTION cues
meanCorrRTRGender Mean response time (in ms) of target trial responses in R(epeat) trial sequences with GENDER cues
meanCorrRTRColor Mean response time (in ms) of target trial responses in R(epeat) trial sequences with COLOR cues
meanCorrRTREmotion Mean response time (in ms) of target trial responses in R(epeat) trial sequences with EMOTION cues
propCorrectI Proportion correct target trial responses in I(nhibitory) trial sequences
propCorrectC Proportion correct target trial responses in C(ontrol) trial sequences
propCorrectU Proportion correct target trial responses in U(nclassified) trial sequences
propCorrectR Proportion correct target trial responses in R(epeat) trial sequences
propCorrectIGender Proportion correct target trial responses in I(nhibitory) trial sequences with GENDER cues
propCorrectIColor Proportion correct target trial responses in I(nhibitory) trial sequences with COLOR cues
propCorrectIEmotion Proportion correct target trial responses in I(nhibitory) trial sequences with EMOTION cues
propCorrectCGender Proportion correct target trial responses in C(ontrol) trial sequences with GENDER cues
propCorrectCColor Proportion correct target trial responses in C(ontrol) trial sequences with COLOR cues
propCorrectCEmotion Proportion correct target trial responses in C(ontrol) trial sequences with EMOTION cues
propCorrectUGender Proportion correct target trial responses in U(nclassified) trial sequences with GENDER cues
propCorrectUColor Proportion correct target trial responses in U(nclassified) trial sequences with COLOR cues
propCorrectUEmotion Proportion correct target trial responses in U(nclassified) trial sequences with EMOTION cues
propCorrectRGender Proportion correct target trial responses in R(epeat) trial sequences with GENDER cues
propCorrectRColor Proportion correct target trial responses in R(epeat) trial sequences with COLOR cues
propCorrectREmotion Proportion correct target trial responses in R(epeat) trial sequences with EMOTION cues

Raw Data

File Name: affectiveshifttask_raw*.iqdat

Data Fields

NameDescription
build Inquisit version number
computer.platform Device platform: win | mac |ios | android
computer.touch 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities
computer.hasKeyboard 0 = no external keyboard detected; 1 = external keyboard detected
date Date the session was run
time Time the session was run
subject Participant ID
group Group number
session Session number
blockcode The name the current block (built-in Inquisit variable)
blocknum The number of the current block (built-in Inquisit variable)
trialcode The name of the currently recorded trial (built-in Inquisit variable)
trialnum The number of the currently recorded trial (built-in Inquisit variable)
trialnum is a built-in Inquisit variable; it counts all trials run
even those that do not store data to the data file.
practiceBlockCounter Counter to track the number of practice blocks run
practicePass 1 = practice was passed with the minimum propCorrect
0 = otherwise
trialCounter Counter to track the trialCount per block
a test trial sequence spans 2 (R Trials) to 3 (I, C, U) actual trials
trialCounterI Counter to track the Inhibitory (I) trials run
trialCounterC Counter to track the Control (C) trials run
trialCounterU Counter to track the Unclassified (U) trials run
trialCounterR Counter to track the Repeat (R) trials run
trialType I(nhibitory), C(ontrol), U(nclassified), R(epeat) (only relevant for test trials)
I: the last cue in the 3-face display sequence repeats the first one (a-b-a)
the second one is always different
C: all three cues from the 3-face display sequence are different from each other (a-b-c)
U: the last cue in the 3-face display sequence is different from the first and second cue,
but the second cue repeats the first (a-a-b)
R: 2-face display sequence: the second cue repeats the frist (a-a)
cueOrder The order in which the cues should run across a test trial sequence
as well as the target to find
Examples
"mda" ->
'm' => cue word given: GENDER, the target to find will be the singular male
face amongst 3 female face ('m' for male target).
'd' => cue word given: COLOR, the target to find will be the singular dark gray face
amongst three light gray faces ('d' for dark target)
'a' => cue word given: EMOTION, the target to find will the singular angry face
amongst three happy faces ('a' for angry)
cueNumber The number of cues run for the current test trial sequence
(I, C, U: 3; R: 2)
countCues A counter that tracks the number of cues run in the current test trial sequence
targetTrial 1 = the current trial is the last and thus target trial of the current test trial sequence
0 = otherwise
cue Stores the cue (with target information) for the current face display
'f'/'m' = Gender cues, target face will be female/male
'd'/'l' = Color cues, target face will be dark/light gray
'a'/'h' = Emotion cue, target face will be angry/happy target
cueWord The cue word presented for the current face display
GENDER, COLOR or EMOTION
switch 1 = the current cue repeats the previous cue; 0 = otherwise
( this does not necessarily depend on the actual trialtype)
targetQuadrant The target to find is located in
1 = top left; 2 = top right; 3 = bottom right, 4 = bottom left (clockwise from top-left to bottom-left)
correctResponse Stores the correct key press for the current face display
response The response of participant (scancode of response button)
responseText The response key pressed
correct Correctness of response (1 = correct, 0 = error)
latency Response latency (in ms); measured from: onset of face display
targetPic The actual target image presented
foil1Pic Foil1 image
foil2Pic Foil2 image
foil3Pic Foil3 image
targetQuadrant
foil1Quadrant The quadrant foil1 was randomly assigned to
foil2Quadrant The quadrant foil2 was randomly assigned to
foil3Quadrant The quadrant foil3 was randomly assigned to

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
Color Parameter
canvasColor Display color of the actively used portion of the screen (the 'canvas')black
screenColor Color of the screen not used by the board black
defaultTextColor Default color of textitemswhite
Stimsizing
cueSizePct The height of the cue (text) relative to canvas height10%
picSizePct The height of the pics relative to canvas height40%
bufferBtwPicsPct The empty space btw. the pics relative to canvas height2%
Timing Parameters
cueDurationMS The duration (in ms) that each cue is presented500
itiMS The intertrial interval (in ms) - shows a blank page100
practiceFeedbackDurationMS The feedback duration (in ms) during practice trials500
Settings For Practice Round
minPracticeAcc The minimum practice performance to continue on to the test0.8
maxPracticeRounds The maximum number of practice rounds conducted
after 4 practice sessions, participants move on the test
regardless of performance.
4
Responsekeys
topLeftResponseKey Top left response key"E"
bottomLeftResponseKey Bottom left response key"C"
topRightResponseKey Top right response key"I"
bottomRightResponseKey Bottom right response key"M"