Skip to main content

N-Back Task

Version: v1 (current)

Overview

The N-Back task is a continuous performance measure of working memory capacity and executive control. Participants view a sequence of stimuli (letters, numbers, or shapes) and must decide whether each item matches the one presented N positions earlier in the sequence.

For example, in a 2-back task viewing the sequence "A-B-A-C-C", the participant would respond "match" on the third trial (A matches 2 positions back) and the fifth trial (C matches 2 positions back), but "no match" on trials 1, 2, and 4.

The N-back load can be manipulated (1-back, 2-back, 3-back, etc.) to vary cognitive demand, making this a flexible tool for assessing working memory capacity across different populations.

Scientific Background

The N-back task has become a gold-standard measure of working memory in both cognitive and clinical research:

  • Kirchner, W.K. (1958). Age differences in short-term retention of rapidly changing information. Journal of Experimental Psychology, 55(4), 352-358. (Original N-back task)
  • Owen, A.M., et al. (2005). N-back working memory paradigm: A meta-analysis of normative functional neuroimaging studies. Human Brain Mapping, 25(1), 46-59.
  • Jaeggi, S.M., et al. (2008). Improving fluid intelligence with training on working memory. Proceedings of the National Academy of Sciences, 105(19), 6829-6833.

The task requires three core processes:

  • Encoding: Store the current stimulus in working memory
  • Updating: Continuously refresh the memory trace as new items appear
  • Comparison: Match current item against the item N positions back

Performance typically declines as N increases, with most adults showing ceiling effects at 1-back, moderate accuracy at 2-back, and substantial difficulty at 3-back and beyond.

Why Researchers Use This Task

  • Working memory assessment: Measures both storage and executive control components
  • Load manipulation: Systematic variation of N allows dose-response analysis
  • Training studies: Used to assess working memory plasticity and transfer effects
  • Clinical research: Sensitive to ADHD, schizophrenia, aging, and other conditions affecting executive function
  • Neuroimaging: Robust activation in dorsolateral prefrontal cortex and parietal cortex
  • Signal detection analysis: Provides hits, misses, false alarms, and correct rejections for d-prime calculation

Task Parameters

N-Back Configuration

ParameterTypeDefaultDescription
Nback Nnumber1The N value (how many positions back to match); typically 1-3
Nback Time BasedbooleanTrueIf True, trials auto-advance; if False, participant clicks to advance

Visual Configuration

ParameterTypeDefaultDescription
Nback Font Size (px)number72Font size for stimuli (8-400)
Nback Font Colorstring'#111827'Stimulus text color (hex)
Nback Background Colorstring'#ffffff'Background color (hex)

Button Labels

ParameterTypeDefaultDescription
Nback Match Labelstring'Match'Label for "match" button
Nback No Match Labelstring'No match'Label for "no match" button

Practice Trials

ParameterTypeDefaultDescription
Nback Practice EnabledbooleanFalseEnable practice trials with visual feedback
Nback Practice Trialsarray[]Array of practice trial configurations

Trial Configuration

Each trial is defined in the Trials spreadsheet with the following columns:

ColumnDescriptionExample
strThe stimulus to displayA, B, 5, X
fixation_msFixation cross duration500
stimulus_msStimulus display duration2000
blockOptional grouping label1-back, 2-back, Practice

Important: The task automatically determines which trials are "targets" (matches) based on the N value and sequence position. You don't need to specify is_target in the spreadsheet because the task calculates this dynamically.

Example Trial Sequence (2-back)

| str | fixation_ms | stimulus_ms | block  | Computed: Is Target? |
|-----|-------------|-------------|--------|---------------------|
| A | 500 | 2000 | 2-back | No (first trial) |
| B | 500 | 2000 | 2-back | No (second trial) |
| A | 500 | 2000 | 2-back | YES (matches trial 1)|
| C | 500 | 2000 | 2-back | No |
| B | 500 | 2000 | 2-back | YES (matches trial 2)|
| A | 500 | 2000 | 2-back | YES (matches trial 3)|

Target rate: Typically 30-40% of trials should be targets. The task will compute this automatically based on your sequence.

Participant Experience

Trial Sequence

  1. Main Instructions: Explains the N-back rule (e.g., "Press Match if the letter matches the one from 2 trials ago")
  2. (Optional) Practice Instructions: If practice enabled
  3. (Optional) Practice Trials: With visual feedback (green checkmark for correct, red X for incorrect)
  4. (Optional) Trials Instructions: Shown before main trials begin
  5. Main Trials: Each trial follows this sequence:
    • Fixation cross (+) appears (if fixation_ms > 0)
    • Stimulus appears
    • Participant decides: "Match" or "No match"
    • Press corresponding button or wait for auto-advance
    • Next trial begins

Response Modes

Time-based mode (nback_time_based: true):

  • Participant must respond within stimulus duration
  • Trial advances automatically after stimulus_ms
  • Non-responses counted as "no match"

Button-based mode (nback_time_based: false):

  • Participant clicks either "Match" or "No match" button
  • Trial advances after button press
  • Allows self-paced responding

Data Output

Markers and Responses

Markers (stimulus_shown):

{
"type": "stimulus_shown",
"ts": "2024-01-01T00:00:06.000Z",
"hr": 6234.56,
"data": {
"trial_index": 3,
"stimulus_id": "nback_0_3",
"stimulus_value": "A",
"n_value": 2,
"is_target": true,
"block": "2-back"
}
}

Response Data:

{
"trial_index": 3,
"stimulus_id": "nback_0_3",
"source": "button",
"stimulus_value": "A",
"n_value": 2,
"is_target": true,
"response_value": "match",
"correct": true,
"signal_detection": "hit",
"latency_ms": 672,
"ts": "2024-01-01T00:00:06.672Z",
"hr": 6906.56
}

Signal detection outcomes:

  • hit: Correctly responded "match" to a target
  • miss: Failed to respond "match" to a target
  • false_alarm: Incorrectly responded "match" to a non-target
  • correct_rejection: Correctly responded "no match" to a non-target
  • no_response: No response made (timeout)

Summary Artifact

A JSON file (nback_summary_<taskIndex>.json) with signal detection metrics:

{
"task_kind": "nback",
"n_value": 2,
"total_trials": 60,
"overall": {
"accuracy": 0.85,
"mean_rt_ms": 658,
"signal_detection": {
"hits": 18,
"misses": 4,
"false_alarms": 5,
"correct_rejections": 33,
"hit_rate": 0.818,
"false_alarm_rate": 0.132,
"d_prime": 1.85,
"criterion": -0.12
}
},
"trials": [ /* per-trial data */ ]
}

Key metrics:

  • d_prime: Sensitivity (ability to discriminate targets from non-targets); higher is better
  • criterion: Response bias (negative = liberal, positive = conservative)
  • hit_rate: Proportion of targets correctly identified
  • false_alarm_rate: Proportion of non-targets incorrectly identified as targets

Design Recommendations

N Value Selection

N ValueDifficultyTypical AccuracyUse Case
1-backEasy>90%Children, clinical populations, ceiling control
2-backModerate70-85%Standard adult assessment
3-backHard50-70%High-functioning adults, training studies
4-back+Very Hard<50%Expert populations, pushing limits

Recommendation: Start with 2-back for most adult studies. Use 1-back for practice or populations with cognitive impairment.

Trial Count

Minimum for stable estimates:

  • 60 trials total
  • At least 20 target trials (matches)
  • At least 40 non-target trials

Optimal:

  • 100-120 trials total
  • 30-40% target rate
  • Multiple blocks with breaks

Stimulus Selection

Letters: Most common; use consonants to avoid acronyms (B, C, D, F, G, H, J, K, L, M, N, P, Q, R, S, T, V, W, X, Z)

Numbers: Alternative to letters; use 1-9 (avoid 0 which looks like O)

Shapes: For non-literate populations

Avoid:

  • Sequences with obvious patterns (A-B-A-B-A-B)
  • Too many consecutive targets (no more than 2 in a row)
  • Sequences where every N position is the same stimulus

Timing Guidelines

ParameterStandardFastSlow
Fixation (ms)500ms200ms800ms
Stimulus (ms)2000ms1500ms3000ms

Total trial duration = fixation_ms + stimulus_ms (e.g., 2500ms standard)

Practice Trials

Include 12-20 practice trials:

  • Use same N value as main task
  • Mix targets and non-targets (30-40% targets)
  • Provide feedback so participants understand the rule
  • Consider starting with easier (1-back) practice, then moving to target N

Common Issues and Solutions

Low Accuracy (<60%)

Possible causes:

  • N value too high for population
  • Insufficient practice
  • Stimulus duration too short
  • Participants don't understand the rule

Solutions:

  • Reduce N value (try 1-back or 2-back)
  • Extend practice with clearer feedback
  • Increase stimulus_ms to 3000ms
  • Revise instructions to emphasize "positions back" concept

High False Alarm Rate

Problem: Participants responding "match" too often

Possible causes:

  • Misunderstanding task (comparing to any previous item)
  • Response bias toward "match"
  • Lure trials (items that appeared N+1 or N-1 back)

Solutions:

  • Emphasize exact N-back rule in instructions
  • Show examples in practice with explicit feedback
  • Review sequence design for unintended lures

No Practice Mode

Problem: Participants struggle in main trials without feedback

Solution:

  • Enable nback_practice_enabled: true
  • Create practice sequence in nback_practice_trials spreadsheet
  • Use same stimuli and timing as main trials
  • Ensure all participants complete practice before main task

Example Study Configurations

Standard 2-Back Assessment

  • N = 2
  • 100 trials (35 targets, 65 non-targets)
  • Letters as stimuli (consonants only)
  • 500ms fixation, 2000ms stimulus
  • Time-based mode
  • Practice: 20 trials with feedback

Load Manipulation Study

Within-subjects design with three blocks:

  • Block 1: 1-back (40 trials)
  • Block 2: 2-back (60 trials)
  • Block 3: 3-back (60 trials)

Each block has separate practice (12 trials)

Clinical/Developmental Version

  • N = 1 (easier)
  • Longer stimulus duration (3000ms)
  • Button-based mode (self-paced)
  • Larger font (96px)
  • Simple stimuli (numbers 1-5)
  • Fewer trials (60 total)
  • Extended practice (20 trials)

References

  • Kirchner, W.K. (1958). Age differences in short-term retention of rapidly changing information. Journal of Experimental Psychology, 55(4), 352-358.
  • Owen, A.M., McMillan, K.M., Laird, A.R., & Bullmore, E. (2005). N-back working memory paradigm: A meta-analysis of normative functional neuroimaging studies. Human Brain Mapping, 25(1), 46-59.
  • Jaeggi, S.M., Buschkuehl, M., Jonides, J., & Perrig, W.J. (2008). Improving fluid intelligence with training on working memory. Proceedings of the National Academy of Sciences, 105(19), 6829-6833.
  • Kane, M.J., Conway, A.R., Miura, T.K., & Colflesh, G.J. (2007). Working memory, attention control, and the N-back task: A question of construct validity. Journal of Experimental Psychology: Learning, Memory, and Cognition, 33(3), 615-622.