Memory and Affective Flexibility Task - MAFT

Technical Manual

Script Author (orig): J.D. Allen, Ph.D. (jd.allen@brainhealthconsulting.org) for Brain Health Consulting, LLC
credit: The original Inquisit MAFT was generously provided by J.D. Allen and was updated for Inquisit 7 by Millisecond

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

Script Copyright © Millisecond Software, LLC

Background

This script implements the Memory & Affective Flexibility Task (MAFT, Allen et al, 2025), a behavioral tool to assess two components of affective control: emotional working memory and affective flexibility. The working memory task is based on the nBack procedure suggested by Jaeggi et all (2010) using images differing in their valence (neutral,negative,positive). The flexibility task, randomly interwoven into the nBack procedure, requires a quick shift from the working memory task to a procedure that requires the evaluation of the valence of presented images instead.

References

Maft:
Allen, K. J., Elliott, M. V., Ronold, E. H., Rajgopal, N. A., Hammar, Å., & Johnson, S. L. (2025). The Memory and Affective Flexibility Task: A new behavioral tool to assess neurocognitive processes implicated in emotion-related impulsivity andinternalizing symptoms. Frontiers in Psychiatry, 16, 1456691. https:// doi. org/ 10. 3389/ fpsyt. 2025. 1456691

Nback:
Jaeggi, Susanne M.; Studer-Luethi, Barbara; Buschkuehl, Martin; Su, Yi-Fen; Jonides, John; Perrig, Walter J. (2010). The relationship between n-back performance and matrix reasoning - implications for training and transfer. Intelligence, 38, 625–635.

Duration

25 minutes

Description

Participants are presented a sequence of images. NBack memory trials require participants to determine whether the current image matched one shown N trials earlier. They are asked to press the 'A' key if it the same; otherwise they are asked to press the 'L' key. Affective switch trials, randomly interspersed within the nBack procedure, require participants to evaluate whether the presented image is positive ('S' key) or negative ('K' key). The switch trials present the text “POSITIVE or NEGATIVE?” above the image.

Procedure

Tasks
• nBack: require a working memory performance response:
=> compare presented stim to stim presented n-trials before
- if they are the same: it's a TARGET (press key 'A')
- if they are different: it's a nontarget (press key 'L')

• switch: require a switch to a valence evaluation response of the presented stims
=> evaluate the valence of the presented stim
- Negative: press 'K' key
- Positive: press 'S' key

Setup
(1) Practice: 2 Blocks (first: N=1; second: N=2 -> edit list.nextN_practice to change levels of N practiced)
- only Ambiguous stims
- 10 trials (+ nBack start trials) per block 4 nontarget trials, 2 target trials, 2 reg. switch trials, 2 rev. switch trials*
- order random

- practice is repeated until participants achieve an accuracy threshold of
at least 70% on n-back trials at the n=2 level
- practice task can also be repeated by request (optional)
- error feedback provided for 500ms


(2) Test: 9 blocks
=> Design: 3 N-levels (1,2,3) x 3 emotions (Ambiguous,Negative,Positive)
- the N-levels are tested in increasing order
- the emotions per N-level are tested in the following fixed order: Ambiguous,Negative,Positive

- 20 trials (+ nBack start trials) per block: 8 nontarget trials, 4 target trials, 4 reg. switch trials, 4 rev. switch trials*
- order random


Trial Types:
• nBack trials:
require a working memory performance response: compare presented stim to stim presented n-trials before
(response keys: A(target), L(nontarget))

- start: these are the first couple of trials in a block that CANNOT present targets yet ("L" response)
(can be treated as nontarget trials; by default they are simply ignored for performance metrics)

- nontarget: do not present target stims ("L" response)

- target: present target stims ("A" response)


•Switch trials:
require a switch to valence evaluation response of the presented stims
(response keys: S(positive), K(negative))

- ntSwitch: present stimuli with a valence that is congruent with the block valence

- ntSwitchrev: present stimuli with a valence that is the opposite of the block valence (unless the blockValence = amb)

all switch trials present nonTarget images


Trialsequence:
- Image presented for 1500ms
- blank screen for 3000ms
- Max responseTime: 4500ms

Stimuli

provided by original authors
Images taken from the International Affective Picture System (IAPS)
Lang PJ, Bradley MM, Cuthbert BN. International affective picture system

(IAPS): Affective ratings of pictures and instruction manual. Tech Rep A-8.
Gainesville FL: Univ Florida. (2008).

Instructions

provided by original authors
can be edited in script 'maft_instructions_inc.igjs'

Summary Data

File Name: "maft_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
totalBlocks The total number of experimental blocks run
Nback - Test Performance Metrics
propCorrectNBackOverall PropCorrect responses across all target and nontarget nBack trials
meanCorrRTNBackOverall Mean correct response time across all target and nontarget nBack trials
propNoResponsesNBackOverall Proportion no responses across all target and nontarget nBack trials
propCorrectNBackAmb PropCorrect responses across all target and nontarget nBack trials for Ambiguous Stims
meanCorrRTNBackAmb Mean correct response time across all target and nontarget nBack trials for Ambiguous Stims
propNoResponsesNBackAmb Proportion no responses across all target and nontarget nBack trials for Ambiguous Stims
propCorrectNBackNeg PropCorrect responses across all target and nontarget nBack trials for Negative Stims
meanCorrRTNBackNeg Mean correct response time across all target and nontarget nBack trials for Negative Stims
propNoResponsesNBackNeg Proportion no responses across all target and nontarget nBack trials for Negative Stims
propCorrectNBackPos PropCorrect responses across all target and nontarget nBack trials fo Positive Stims
meanCorrRTNBackPos Mean correct response time across all target and nontarget nBack trials for Positive Stims
propNoResponsesNBackPos Proportion no responses across all target and nontarget nBack trials for Positive Stims
Switch - Test Performance Metrics
propCorrectSwitchOverall PropCorrect responses across all Switch trials
meanCorrRTSwitchOverall Mean correct response time across all Switch trials
propNoResponsesSwitchOverall Proportion no responses across all Switch trials
propCorrectSwitchAmb PropCorrect responses across all Switch trials for Ambiguous Stims
meanCorrRTSwitchAmb Mean correct response across all Switch trials for Ambiguous Stims
propNoResponsesSwitchAmb Proportion no responses across all Switch trials for Ambiguous Stims
propCorrectSwitchNeg PropCorrect responses across all Switch trials for Negative Stims ( this refers to the actually presented valence of the stim during the trial; not the emotion condition of the block)
meanCorrRTSwitchNeg Mean correct response time across all Switch trials for Negative Stims ( this refers to the actually presented valence of the stim during the trial; not the emotion condition of the block)
propNoResponsesSwitchNeg Proportion no responses across all Switch trials for Negative Stims
propCorrectSwitchPos PropCorrect responses across all Switch trials fo Positive Stims ( this refers to the actually presented valence of the stim during the trial; not the emotion condition of the block)
meanCorrRTSwitchPos Mean correct response across all Switch trials for Positive Stims ( this refers to the actually presented valence of the stim during the trial; not the emotion condition of the block)
propNoResponsesSwitchAmb Proportion no responses across all Switch trials for Positive Stims

Raw Data

File Name: maft.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.
totalBlocks The total number of experimental blocks run
n The current level N tested
startTrialCounter Keeps track of how many start trials have been run
stimulusItem.1 The image presented
stimulusNumber.1 The item index of the presented image
emotion The block "emotion" index: 1 = ambiguous; 2 = negative; 3 = positive
blockValence The block valence (amb, neg, pos)
valence The stimulus valence (congruent with blockValence except for trial.ntSwitchrev)
currentTarget The item number of the current target
response The Response of the participant (scancode of response button)
0 = no response
31 = 'A' key (target key)
38 = 'L' key (non-target key)
32 = 'S' key (positive key)
37 = 'K' key (negative key)
(57 = spacebar)
responseText The letter of the pressed response key
responseCategory "Correct", "Incorrect", "No Response"
correct The correctness of the response (1 = correct; 0 = otherwise)
latency How fast a participant responded within the given timeframe, if at all (in ms)
no responses = the entire trialduration
list.blockAcc.mean Proportion correct during the current block (start trials are excluded from block acc assessment by default, editable)

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
Design
allowPracticeRepeat True: practice can be repeated as often as indicated
false: practice cannot be repeated
true
excludeStartTrialfromPerformanceMeasure True (1): performance during start trials that cannot be targets yet is not considered
for Block level performance analyses, e.g. for feedback purposes (default)
false (0): performance during start trials that cannot be targets yet IS considered for block performance analyses (default)
true
Timing Parameters
soa Stimulus onset asynchrony in ms4500
stimulusPresentationTime The duration (in ms) that the images are presented1500