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:
| Rule | When to tap | Paradigm examples |
|---|---|---|
respond_to_target | Item is in your target set (e.g., "A") | Auditory tap-on-A, CPT-X |
conditional_sequence | Item follows the configured cue (e.g., "X" after "A") | CPT-AX |
respond_to_all_except | Item is NOT in your withhold set | Conners, TOVA, SART |
Important for
respond_to_all_except: Thecpt_target_setparameter 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
| Parameter | Type | Default | Description |
|---|---|---|---|
cpt_modality | visual / auditory / both | visual | How 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 clips | one per distinct stimulus | none | Attached 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_lang | BCP-47 string | en-US | Labels the language of the recorded clips for the exported data; does not change playback. |
cpt_font_size_px | number | 96 | Stimulus font size in pixels (visual and both modes). |
Target Rule
| Parameter | Type | Default | Description |
|---|---|---|---|
cpt_target_rule | enum | respond_to_target | Classification rule (see table above). |
cpt_target_set | string[] | ['A'] | Target items (for respond_to_target) or withhold items (for respond_to_all_except). |
cpt_cue_stimulus | string | A | The prime (cue) item for conditional_sequence. |
cpt_target_stimulus | string | X | The target probe item for conditional_sequence. |
Timing
| Parameter | Type | Default | Description |
|---|---|---|---|
cpt_stimulus_ms | number | 1000 | How long each stimulus is shown or spoken (ms). |
cpt_fixation_ms | number | 0 | Optional fixation cross before each stimulus (ms). Visual mode only. |
cpt_isi_ms | number | 0 | Inter-stimulus interval after the stimulus window closes (ms). |
cpt_response_window_ms | number | 1000 | How 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_ms | number | 1000 | How long to show correctness feedback during practice (ms). |
cpt_block_gap_ms | number | 0 | Pause inserted between blocks (ms). |
Trials
| Parameter | Type | Default | Description |
|---|---|---|---|
cpt_trials | array | [] | Main trial sequence. Each row: stimulus_value, type (target/nontarget), optional block, optional per-trial timing overrides. |
cpt_practice_trials | array | [] | Practice trial sequence (same format). |
cpt_practice_enabled | boolean | true | Show practice trials with correctness feedback before the main run. |
cpt_randomize_order | boolean | false | Shuffle trial order within each block using a seeded random generator. Disabled automatically for conditional_sequence. |
cpt_random_seed | number | null | Seed for reproducible shuffle (null = derived from participation ID). |
cpt_stimulus_mode | sheet / generator | sheet | sheet: use the trial rows you supply. generator: auto-build a balanced sequence. |
cpt_run_blocks | number | 1 | Generator 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
| Parameter | Type | Default | Description |
|---|---|---|---|
cpt_key_tap | key string | Space | Key for the tap response. |
cpt_tap_action_label | string | Tap | Label shown in the on-screen hint. |
cpt_show_keyboard_hint | boolean | true | Show the on-screen key hint during trials. |
Instructions
| Instruction type | When shown |
|---|---|
| Main instructions | Dedicated page before the task starts (with camera/screenshare if enabled). |
| Practice instructions | Before practice trials begin (if practice is enabled). |
| Trials instructions | After practice, before the main run (if practice is enabled). |
| Hint instructions | Quick-reference via the "?" button during the task. |
Trial Configuration
Each row in the trials spreadsheet defines one stimulus:
| Column | Type | Required | Description |
|---|---|---|---|
stimulus_value | string | Yes | The letter, digit, or word to display or speak. |
type | target / nontarget | Yes | target = a tap is expected; nontarget = withhold. |
block | string | No | Block label (e.g., block_1). Used for vigilance-decrement analysis. |
fixation_ms | number | No | Override fixation duration for this trial. |
stimulus_ms | number | No | Override stimulus duration for this trial. |
isi_ms | number | No | Override ISI for this trial. |
response_window_ms | number | No | Override 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
- Main Instructions: Participant reads the task instructions and clicks Start.
- Practice Phase (if enabled):
- Practice instructions appear.
- Short practice run with correctness feedback after each trial.
- Trials Instructions (if practice was enabled): Brief reminder before the main run.
- 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.
- 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:
| Outcome | Trial type | Response | Meaning |
|---|---|---|---|
hit | target | tapped | Correct detection |
miss | target | withheld | Omission error |
false_alarm | nontarget | tapped | Commission error |
correct_rejection | nontarget | withheld | Correct 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_trialas 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
-
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.
-
Conners, C. K. (2000). Conners' Continuous Performance Test II: Computer Program for Windows. Multi-Health Systems.
-
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.
-
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.
-
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