Skip to main content

Continuous Performance Task

Version: v1 (current)

The Continuous Performance Task measures sustained attention and vigilance. Participants watch or listen to a rapid stream of items and tap a key whenever they detect a target, withholding their response to everything else. Over a long run, performance typically declines -- the task quantifies this vigilance decrement alongside accuracy and reaction time.

Overview

Sustained attention -- the ability to maintain focused responding over extended periods -- is a core cognitive function affected by sleep deprivation, fatigue, ADHD, aging, and many clinical conditions. This task measures it by requiring the participant to monitor a continuous stream and detect rare target items, producing signal-detection measures (hit rate, false-alarm rate, d-prime) as well as block-by-block vigilance decrement.

The task generalizes across the main sustained-attention paradigms through a target-rule parameter. It ships content-free: researchers supply their own stimulus sequences.

Scientific Background

Key Constructs:

  • Sustained attention / vigilance: maintaining detection sensitivity across time without external prompting
  • Signal detection theory (SDT): separates sensitivity (d-prime) from response bias (criterion c), so a cautious participant is not penalized relative to a liberal one
  • Vigilance decrement: the well-documented decline in hit rate and increase in RT across a long run; the task records per-block statistics to quantify it

Seminal References:

  • Rosvold, H. E., et al. (1956). A continuous performance test of brain damage. Journal of Consulting Psychology, 20(5), 343--350.
  • Hautus, M. J. (1995). Corrections for extreme proportions and their effect on estimated values of d'. Behavior Research Methods, 27(1), 46--51.

Target Rules

The task supports three target-detection rules that cover the main paradigm variants:

RuleWhen to tapParadigm examples
respond_to_targetItem is in your target set (e.g., "A")Auditory tap-on-A, CPT-X
conditional_sequenceItem follows the configured cue (e.g., "X" after "A")CPT-AX
respond_to_all_exceptItem is NOT in your withhold setConners, TOVA, SART

Important for respond_to_all_except: The cpt_target_set parameter lists the withhold items (the rare non-targets), not the tap items. The frequent items (everything else) are the targets. This is the reverse of the intuitive reading -- configure accordingly.

Configuration Options

Modality

ParameterTypeDefaultDescription
cpt_modalityvisual / auditory / bothvisualHow stimuli are presented. Auditory plays an audio clip you provide for each distinct stimulus (recorded with your microphone in the study form, or uploaded), inside the same timing window as visual mode. Every participant hears the same recording.
Audio clipsone per distinct stimulusnoneAttached in the configuration with inline playback and a "Play all" preview. The configuration cannot be saved in auditory/both mode while any stimulus is missing its clip or a clip lasts longer than its stimulus window (clips are never cut off; shorter clips are followed by silence).
cpt_clip_langBCP-47 stringen-USLabels the language of the recorded clips for the exported data; does not change playback.
cpt_font_size_pxnumber96Stimulus font size in pixels (visual and both modes).

Target Rule

ParameterTypeDefaultDescription
cpt_target_ruleenumrespond_to_targetClassification rule (see table above).
cpt_target_setstring[]['A']Target items (for respond_to_target) or withhold items (for respond_to_all_except).
cpt_cue_stimulusstringAThe prime (cue) item for conditional_sequence.
cpt_target_stimulusstringXThe target probe item for conditional_sequence.

Timing

ParameterTypeDefaultDescription
cpt_stimulus_msnumber1000How long each stimulus is shown or spoken (ms).
cpt_fixation_msnumber0Optional fixation cross before each stimulus (ms). Visual mode only.
cpt_isi_msnumber0Inter-stimulus interval after the stimulus window closes (ms).
cpt_response_window_msnumber1000How long the participant has to respond (ms). Must not exceed the stimulus-onset interval; the task warns and clamps if it does.
cpt_practice_feedback_msnumber1000How long to show correctness feedback during practice (ms).
cpt_block_gap_msnumber0Pause inserted between blocks (ms).

Trials

ParameterTypeDefaultDescription
cpt_trialsarray[]Main trial sequence. Each row: stimulus_value, type (target/nontarget), optional block, optional per-trial timing overrides.
cpt_practice_trialsarray[]Practice trial sequence (same format).
cpt_practice_enabledbooleantrueShow practice trials with correctness feedback before the main run.
cpt_randomize_orderbooleanfalseShuffle trial order within each block using a seeded random generator. Disabled automatically for conditional_sequence.
cpt_random_seednumbernullSeed for reproducible shuffle (null = derived from participation ID).
cpt_stimulus_modesheet / generatorsheetsheet: use the trial rows you supply. generator: auto-build a balanced sequence.
cpt_run_blocksnumber1Generator only: split the generated sequence into this many labeled blocks.

Generator-only parameters: cpt_target_frequency (proportion of target trials, default 0.25), cpt_generator_trial_count (total trials to generate, default 100), cpt_nontarget_stimuli (comma-separated non-target items, default B,C,D,E,F,G,H,I,J).

Keyboard and Response

ParameterTypeDefaultDescription
cpt_key_tapkey stringSpaceKey for the tap response.
cpt_tap_action_labelstringTapLabel shown in the on-screen hint.
cpt_show_keyboard_hintbooleantrueShow the on-screen key hint during trials.

Instructions

Instruction typeWhen shown
Main instructionsDedicated page before the task starts (with camera/screenshare if enabled).
Practice instructionsBefore practice trials begin (if practice is enabled).
Trials instructionsAfter practice, before the main run (if practice is enabled).
Hint instructionsQuick-reference via the "?" button during the task.

Trial Configuration

Each row in the trials spreadsheet defines one stimulus:

ColumnTypeRequiredDescription
stimulus_valuestringYesThe letter, digit, or word to display or speak.
typetarget / nontargetYestarget = a tap is expected; nontarget = withhold.
blockstringNoBlock label (e.g., block_1). Used for vigilance-decrement analysis.
fixation_msnumberNoOverride fixation duration for this trial.
stimulus_msnumberNoOverride stimulus duration for this trial.
isi_msnumberNoOverride ISI for this trial.
response_window_msnumberNoOverride response window for this trial.

Example Trial Sheet (auditory tap-on-A)

stimulus_value | type      | block
---------------|-----------|--------
A | target | block_1
B | nontarget | block_1
C | nontarget | block_1
A | target | block_1
D | nontarget | block_2
A | target | block_2

Participant Experience

Unmoderated / Moderated Mode

  1. Main Instructions: Participant reads the task instructions and clicks Start.
  2. Practice Phase (if enabled):
    • Practice instructions appear.
    • Short practice run with correctness feedback after each trial.
  3. Trials Instructions (if practice was enabled): Brief reminder before the main run.
  4. Main Run:
    • Optional fixation cross, then stimulus.
    • Press the tap key (default: spacebar) or the on-screen Tap button when you detect a target.
    • Withhold your response for non-targets -- the trial ends on its own.
    • No feedback during the main run.
  5. Completion: Task ends after all trials.

Strictly Moderated Mode

Same flow, but the researcher controls when instruction pages advance via the moderator dashboard.

Response Methods

  • Keyboard: Press the configured key (default: spacebar) when you detect a target.
  • Button: Tap the on-screen Tap button (useful on touch devices). This on-screen button is shown during the response window in every modality, including auditory (where there is no visual stimulus on screen) — so a touch-device or mouse-only participant always has a clickable way to respond, not only the keyboard.
  • Withhold: Do not press anything for non-target items; the trial advances automatically.

Only the first press per trial is recorded. Pressing more than once has no additional effect.

Data Output

Markers and Responses

The task records high-resolution markers and one response row per stimulus.

Trial Start (e.g., continuous_performance_trial_start):

{
"trial_index": 1,
"is_practice": false,
"stimulus_id": "continuous_performance_0_1",
"stimulus": "A",
"is_target": true,
"condition": "target",
"target_rule_role": "target",
"modality": "auditory",
"block": "block_1",
"fixation_ms": 0,
"stimulus_ms": 1000
}

Stimulus Onset (stimulus_shown):

{
"trial_index": 1,
"is_practice": false,
"stimulus_id": "continuous_performance_0_1",
"stimulus": "A",
"is_target": true,
"condition": "target",
"target_rule_role": "target",
"modality": "auditory",
"block": "block_1",
"onset_anchor": "clip_play",
"stimulus_ms": 1000
}

onset_anchor values: render (visual, stamped at render dispatch) and clip_play (auditory, stamped when the audio clip is started on the browser's audio clock; the clip's residual output latency is recorded alongside).

Response (one per stimulus; also emits response_recorded marker):

{
"trial_index": 1,
"is_practice": false,
"stimulus_id": "continuous_performance_0_1",
"stimulus": "A",
"is_target": true,
"condition": "target",
"target_rule_role": "target",
"modality": "auditory",
"onset_anchor": "clip_play",
"source": "keyboard",
"raw_key": " ",
"response_value": "target",
"response_correct": true,
"responded": true,
"outcome": "hit",
"latency_ms": 312,
"block": "block_1"
}

Response Outcomes:

OutcomeTrial typeResponseMeaning
hittargettappedCorrect detection
misstargetwithheldOmission error
false_alarmnontargettappedCommission error
correct_rejectionnontargetwithheldCorrect inhibition

latency_ms is omitted (never recorded as 0) for misses and correct rejections.

responded is true for taps and for correct rejections (D3 convention, consistent with Go/No-Go). It is false only for misses.

Summary Artifact

At task completion, a JSON summary file is generated (continuous_performance_summary_<taskIndex>.json). It reports a flat set of overall measures, plus an optional breakdown by block when block labels are configured:

{
"measures": {
"total_trials": 100,
"accuracy": 0.92,
"mean_rt_ms": 412,
"median_rt_ms": 398,
"d_prime": 2.34,
"criterion": 0.56,
"hit_rate": 0.8,
"false_alarm_rate": 0.04,
"omission_errors": 5,
"commission_errors": 3,
"total_errors": 8,
"rt_slope_ms_per_trial": 2.3
},
"breakdowns": {
"block": {
"block_1": {
"trial_count": 50,
"accuracy": 0.94,
"hit_rate": 0.923,
"false_alarm_rate": 0.027,
"mean_rt_ms": 387
},
"block_2": { "...": "same fields" }
}
}
}

If practice was enabled, the same measures are also reported separately for the practice trials, so practice performance never mixes into the scored results.

Key Metrics:

  • d_prime: Sensitivity index (higher = better detection); uses a correction so it stays finite even with 0% or 100% rates.
  • criterion: Response bias (positive = conservative / withholding; negative = liberal / over-tapping).
  • rt_slope_ms_per_trial: Trend of reaction time across trials, the vigilance-decrement index (positive = slowing over time); reported only when the run has at least two blocks.
  • total_errors: Omissions plus commissions; supports a simple threshold rule (e.g., fewer than 2 errors).
  • accuracy: Proportion of correct outcomes (hits plus correct rejections).

The block breakdown is omitted when no block labels are configured. The full per-trial data is available in the response export, not in this summary file.

Timing Precision

Visual mode: Stimulus onset is anchored at render dispatch. Residual vs. true screen paint is approximately 0 -- 16 ms (one frame). Non-cumulative per-trial jitter: each slot fires independently of prior timer slips.

Auditory mode: Onset is anchored to the scheduled start of the pre-recorded clip on the browser's audio clock. The residual gap to the sound leaving the speaker is the device's audio-output pipeline, typically a few milliseconds up to ~20 ms (larger on Bluetooth audio); the browser-reported output-latency values are recorded with each onset so the residual can be inspected per participant. Auditory RT is therefore interpretable for most purposes, but visual mode remains the most precise choice for strict reaction-time paradigms.

Design Recommendations

Trial Counts

  • Minimum: 60 -- 80 trials for basic SDT estimates
  • Standard: 100 -- 200 trials (25% target frequency)
  • Vigilance decrement: 200+ trials, organized into 4 -- 6 equal blocks

Target Frequency

  • Typical: 20 -- 30% target trials (creates vigilance demand)
  • Rare targets: 10 -- 15% (high demand; more false alarms expected)
  • Frequent targets: 40 -- 50% (easy; suitable for populations with reduced capacity)

Blocks

Divide the run into blocks (4 -- 6 recommended for decrement analysis) using the block column or the generator's cpt_run_blocks parameter. The cpt_block_gap_ms parameter can add a brief inter-block pause.

Practice

Include 10 -- 20 practice trials with feedback (cpt_practice_enabled: true) to ensure participants understand the response rule before the scored run begins.

Auditory vs. Visual

Use visual mode when reaction time is the primary outcome (the most precise onset anchor). Use auditory mode for listening paradigms (e.g., "tap when you hear A"): the stream keeps the same fixed cadence as visual mode, every participant hears your identical recordings, and reaction times are interpretable, with a small device-dependent audio-output residual.

Common Issues

Too Many False Alarms

  • Increase non-target frequency (reduce cpt_target_frequency)
  • Add more practice with feedback
  • Simplify instructions; make the withhold rule explicit

Too Many Misses

  • Lengthen cpt_response_window_ms
  • Slow down the stream (cpt_stimulus_ms + cpt_isi_ms)
  • Add practice with feedback

High RT Variability

  • Check for attentional lapses (normal in long runs)
  • Consider shorter blocks with rest periods between them
  • Use rt_slope_ms_per_trial as a measure of interest rather than a problem to fix

Auditory Run Is Skipped or a Trial Runs Silent

If the stimulus clips cannot be played on a participant's device (for example an audio format that browser cannot read, or a browser without the required audio support), the task protects the data rather than running silently:

  • In cpt_modality: auditory (no visual fallback), the run is stopped before any trial is scored and marked as aborted (the participant sees a neutral message and the task ends after a short delay). This is a safety net, not a normal outcome -- the study form already refuses to save an auditory configuration with missing clips, so it mainly covers device-side playback problems. A rare mid-run playback failure lets the affected trial run on its normal timing and flags it with a marker.
  • In cpt_modality: both, the run is NOT stopped (the visual presentation still carries the trial); only a caveat marker is recorded for the data-quality record.

References

  1. Rosvold, H. E., Mirsky, A. F., Sarason, I., Bransome, E. D., & Beck, L. H. (1956). A continuous performance test of brain damage. Journal of Consulting Psychology, 20(5), 343--350.

  2. Conners, C. K. (2000). Conners' Continuous Performance Test II: Computer Program for Windows. Multi-Health Systems.

  3. Robertson, I. H., Manly, T., Andrade, J., Baddeley, B. T., & Yiend, J. (1997). Oops!: Performance correlates of everyday attentional failures in traumatic brain injured and normal subjects. Neuropsychologia, 35(6), 747--758.

  4. Hautus, M. J. (1995). Corrections for extreme proportions and their effect on estimated values of d'. Behavior Research Methods, Instruments, and Computers, 27(1), 46--51.

  5. Mackworth, N. H. (1948). The breakdown of vigilance during prolonged visual search. Quarterly Journal of Experimental Psychology, 1(1), 6--21.


Related Tasks: Go/No-Go Task, N-Back Task