Logo van Fmri Task Design Guide

Fmri Task Design Guide

OrganisatiePopulair
NeuroAIHub
fmri-task-design-guide

Guides fMRI task design: block vs. event-related vs. mixed; jittering; contrasts; power for BOLD detection

Add to TypingMind

Overzicht

UitgeverNeuroAIHub
RepositoryBrainPilot
Skillnaamfmri-task-design-guide
Sterren
1.1K
Forks
74
Meegeleverde bestanden
1
LicentieAGPL-3.0
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 1

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door NeuroAIHub op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Fmri Task Design Guide in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/NeuroAIHub/BrainPilot/tree/main/packages/skills/skills/06_fMRI_Neuroimaging/fmri-task-design-guide
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/NeuroAIHub/BrainPilot.git /tmp/BrainPilot
mkdir -p .claude/skills
cp -r /tmp/BrainPilot/packages/skills/skills/06_fMRI_Neuroimaging/fmri-task-design-guide .claude/skills/fmri-task-design-guide
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Fmri Task Design Guide in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Fmri Task Design Guide automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Fmri Task Design Guide niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

fMRI Task Design Guide

Purpose

The experimental design is the single most important determinant of an fMRI study's statistical power, interpretability, and scientific value. Choosing between block, event-related, and mixed designs involves trade-offs between detection power and estimation efficiency that depend on the research question. Similarly, the choice of inter-stimulus interval (ISI), jittering strategy, condition ordering, and trial count directly determines whether the BOLD signal of interest can be reliably detected.

A competent programmer without neuroimaging training would not know that block designs provide higher detection power but cannot estimate HRF shape, that exponentially distributed jitter is more efficient than uniform jitter, or that the BOLD response takes 12-16 seconds to return to baseline. This skill encodes those domain-specific design decisions.

When to Use This Skill

  • Planning a new task-based fMRI experiment
  • Choosing between block, event-related, or mixed designs
  • Optimizing inter-stimulus interval and jittering strategy
  • Calculating design efficiency for contrast detection
  • Determining minimum trial counts per condition
  • Integrating behavioral task constraints with fMRI timing requirements
  • Reviewing or troubleshooting an existing fMRI task design

Research Planning Protocol

Before executing the domain-specific steps below, you MUST:

  1. State the research question — What specific question is this analysis/paradigm addressing?
  2. Justify the method choice — Why is this approach appropriate? What alternatives were considered?
  3. Declare expected outcomes — What results would support vs. refute the hypothesis?
  4. Note assumptions and limitations — What does this method assume? Where could it mislead?
  5. Present the plan to the user and WAIT for confirmation before proceeding.

For detailed methodology guidance, see the research-literacy skill.

⚠️ Verification Notice

This skill was generated by AI from academic literature. All parameters, thresholds, and citations require independent verification before use in research. If you find errors, please open an issue.

Design Type Selection

Comparison of Design Types

Design TypeDetection PowerEstimation EfficiencyTrial-Level AnalysisBest ForSource
BlockHighLowNoDetecting whether a region is activeFriston et al., 1999; Petersen & Dubis, 2012
Event-related (slow)ModerateHighYesEstimating HRF shapeDale, 1999
Rapid event-relatedModerate-HighModerate-HighYesFlexible trial-by-trial analysis with good powerDale, 1999; Friston et al., 1999
Mixed (hybrid)High (sustained) + Moderate (transient)ModerateYes (transient component)Separating sustained and transient effectsPetersen & Dubis, 2012

Decision Tree

What is the primary goal?
 |
 +-- Detect presence/absence of activation (localization)
 | |
 | +-- Is HRF shape estimation needed?
 | |
 | +-- NO --> Block design (maximum detection power)
 | |
 | +-- YES --> Mixed design (blocks + events within blocks)
 |
 +-- Estimate trial-by-trial neural responses
 | |
 | +-- Are there enough trials (>40 per condition)?
 | |
 | +-- YES --> Rapid event-related design (jittered ISI)
 | |
 | +-- NO --> Slow event-related design (ISI > 12 s)
 |
 +-- Separate sustained state vs. transient item effects
 --> Mixed design (Petersen & Dubis, 2012)

Block Design Parameters

  • Optimal block duration: 15-20 seconds for maximum detection power (Maus et al., 2010; Bandettini et al., 1993). Shorter blocks (< 12 s) reduce sensitivity because the BOLD response does not reach steady state. Longer blocks (> 30 s) increase habituation and strategy effects (Poldrack et al., 2011, Ch. 3)
  • Minimum block duration: 12 seconds to allow the BOLD signal to reach near-plateau (Bandettini et al., 1993)
  • Number of blocks per condition: At least 4-6 blocks per condition per run for stable estimates (Poldrack et al., 2011, Ch. 3)
  • Condition alternation: Alternate conditions (ABAB or ABCABC) rather than grouping (AAABBB), which confounds condition with time (Poldrack et al., 2011, Ch. 3)
  • Rest blocks: Include rest/fixation blocks of at least 12-16 seconds between active blocks to allow BOLD signal return to baseline (Glover, 1999)

Event-Related Design Parameters

Inter-Stimulus Interval (ISI) and Jittering

The ISI between events is critical for statistical efficiency and BOLD signal separability.

ParameterRecommendationSource
Minimum ISI2-4 seconds (for partial BOLD recovery)Dale, 1999; Glover, 1999
Mean ISI for rapid designs4-6 secondsDale, 1999
ISI range for jittered designs2-8 secondsDale, 1999; Wager & Nichols, 2003
Null/fixation trials20-33% of total eventsFriston et al., 1999

Jittering strategies (from most to least recommended):

  1. Optimized sequences: Use design optimization tools (optseq2, NeuroDesign) to maximize efficiency for specific contrasts (Dale, 1999; Durnez et al., 2017)
  2. Truncated exponential distribution: More short ISIs, fewer long ISIs; near-optimal efficiency (Hagberg et al., 2001)
  3. Uniform random: Equal probability across ISI range; acceptable but suboptimal
  4. Fixed ISI: Avoid for rapid event-related designs; severely reduces design efficiency

Domain warning: Jittered designs can be over 10x more efficient than fixed-ISI designs with the same mean interval (Dale, 1999). Always jitter for event-related fMRI.

HRF Timing Constraints

The BOLD hemodynamic response imposes hard constraints on fMRI design timing:

  • HRF peak: 4-6 seconds after neural event onset (Glover, 1999)
  • Return to baseline: 12-16 seconds after a brief event (Glover, 1999)
  • BOLD nonlinearity: Responses to stimuli separated by < 2 seconds sum nonlinearly (reduced amplitude), making them harder to separate (Glover, 1999; Wager & Nichols, 2003)

Trial Count Requirements

Design TypeMinimum Trials per ConditionRecommended TrialsSource
Event-related (detection)2030-50Desmond & Glover, 2002
Event-related (HRF estimation)3050+Murphy & Garavan, 2005
Rapid event-related3040-60Desmond & Glover, 2002
FIR/deconvolution40+60+Glover, 1999

Domain insight: These are per-condition minimums. If comparing conditions (A vs. B), each condition needs this many trials. More conditions require longer scan sessions or fewer trials per condition, creating a power trade-off.

Design Efficiency

Efficiency Calculation

Design efficiency quantifies how well a given design matrix allows detection of specific contrasts:

Detection efficiency = 1 / trace(c' * inv(X'X) * c)

where c is the contrast vector and X is the design matrix (Dale, 1999; Liu et al., 2001).

Detection vs. Estimation Trade-off

  • Detection power: Ability to detect whether an effect exists. Maximized by block designs and rapid event-related designs with high event density (Liu et al., 2001)
  • Estimation efficiency: Ability to accurately characterize the HRF shape. Maximized by jittered designs with sufficient ISI variability (Liu et al., 2001)
  • These are inherently in tension: block designs maximize detection but cannot estimate HRF shape

Design Optimization Tools

  • optseq2 (FreeSurfer): Optimizes event ordering and null events for maximum efficiency (Dale, 1999)
  • NeuroDesign (Python): Genetic algorithm-based optimization (Durnez et al., 2017)
  • fMRIpower: Power calculations accounting for design and temporal autocorrelation (Mumford & Nichols, 2008)

Mixed Design Specification

Mixed designs combine sustained (block-level) and transient (event-level) components (Petersen & Dubis, 2012):

  1. Sustained regressor: Models the tonic task state (e.g., "task block on" vs. "rest"), boxcar convolved with HRF
  2. Transient regressors: Model individual trial onsets within each block, convolved with HRF
  3. These regressors are separable because they operate at different temporal frequencies

Key parameters:

  • Block duration: 20-40 seconds to provide enough events within each block (Petersen & Dubis, 2012)
  • Events per block: At least 4-6 for stable transient estimates
  • Inter-block rest: 16-20 seconds minimum for BOLD signal recovery (Glover, 1999)

Scanner-Related Timing Constraints

ConstraintGuidelineRationale
TR synchronizationStimulus onsets need not align with TR boundaries for event-related designsJittered onsets relative to TR improve temporal sampling of HRF
Trigger pulsesStart experiment on scanner trigger pulse (TTL signal)Ensures precise alignment between stimulus and acquisition timing
Total scan duration5-15 minutes per runLonger runs increase motion and fatigue; shorter runs waste setup time (Poldrack et al., 2011, Ch. 3)
Number of runs2-4 runs typical; split conditions across runs if neededAllows rest between runs; run-level effects can be modeled
Dummy scansFirst 3-5 TRs (5-10 s) are T1 equilibration artifactsDiscard or model as confounds (Poldrack et al., 2011, Ch. 5)

Rest/Fixation Baseline

  • Allocate 25-30% of total scan time to rest/fixation baseline (Friston et al., 1999)
  • Rest periods serve dual purpose: allow BOLD signal recovery and provide baseline estimate
  • For block designs, rest blocks of 12-16 seconds between active blocks (Glover, 1999)
  • For event-related designs, null trials (fixation) distributed throughout the sequence (Friston et al., 1999)

Condition Ordering

  • m-sequences: Pseudo-random sequences with optimal counterbalancing properties (Buracas & Boynton, 2002)
  • Optimized pseudo-random: Generated by optimization algorithms (optseq2, NeuroDesign) to maximize design efficiency while controlling trial-order effects (Dale, 1999)
  • Avoid: Simple alternation (ABABAB) which confounds condition with time, or purely random sequences which may produce long runs of the same condition

Behavioral Task Constraints

ConstraintGuidelineSource
Response mappingCounterbalance button assignments across subjectsPrevents lateralized motor confound
Practice effectsInclude out-of-scanner practice until performance plateausReduces learning-related activation changes during scanning
Task difficultyAim for 70-85% accuracyFloor/ceiling effects eliminate behavioral variance (Poldrack et al., 2011, Ch. 3)
Response windowAllow 1.5-3 seconds for speeded responsesAccommodate scanner environment slowing (~200 ms; Haatveit et al., 2010)
Stimulus duration0.5-4 seconds typical for visual stimuliLong enough for perceptual processing, short enough for event separation

Common Pitfalls

  1. Fixed ISI in event-related designs: Dramatically reduces design efficiency compared to jittered designs. Always jitter ISI for event-related fMRI (Dale, 1999)
  2. Too few trials per condition: Fewer than 20 events per condition yields unreliable single-subject estimates (Desmond & Glover, 2002). Plan for at least 30 per condition
  3. Ignoring HRF recovery time: Events separated by < 2 seconds produce nonlinear BOLD summation, making responses difficult to separate (Glover, 1999)
  4. No baseline/rest periods: Without rest periods, the model cannot estimate absolute activation levels and efficiency drops substantially (Friston et al., 1999)
  5. Confounding condition with time: Presenting all trials of one condition before another confounds the effect with scanner drift and fatigue
  6. Not counterbalancing response mappings: Lateralized motor responses (left vs. right hand) produce motor cortex activation that confounds task effects
  7. Ceiling/floor performance: If accuracy is near 100% or chance, there is no behavioral variance to correlate with brain activity
  8. Not optimizing the design matrix: Using arbitrary event timing instead of optimized sequences wastes statistical power that could be gained at no additional cost

Minimum Reporting Checklist

Based on COBIDAS guidelines (Nichols et al., 2017) and Poldrack et al. (2008):

  • Design type (block, event-related, mixed, rapid event-related)
  • Block duration (for block designs) or ISI distribution parameters (for event-related)
  • Number of conditions and number of trials per condition
  • Stimulus duration and response window
  • Jittering strategy and ISI range (min, max, mean, distribution)
  • Null trial proportion and distribution
  • Condition ordering method (optimized, m-sequence, pseudo-random)
  • Total scan duration per run and number of runs
  • Design optimization tool used (if any) and efficiency metric
  • Response mapping and counterbalancing scheme
  • Practice procedure (in-scanner or out-of-scanner, duration)
  • TR and its relationship to stimulus timing

References

  • Bandettini, P. A., Jesmanowicz, A., Wong, E. C., & Hyde, J. S. (1993). Processing strategies for time-course data sets in functional MRI of the human brain. Magnetic Resonance in Medicine, 30(2), 161-173.
  • Buracas, G. T., & Boynton, G. M. (2002). Efficient design of event-related fMRI experiments using m-sequences. NeuroImage, 16(3), 801-813.
  • Dale, A. M. (1999). Optimal experimental design for event-related fMRI. Human Brain Mapping, 8(2-3), 109-114.
  • Desmond, J. E., & Glover, G. H. (2002). Estimating sample size in functional MRI (fMRI) neuroimaging studies: Statistical power analyses. Journal of Neuroscience Methods, 118(2), 115-128.
  • Durnez, J., Blair, R., & Poldrack, R. A. (2017). NeuroDesign: Optimal experimental designs for task fMRI. bioRxiv, 119594.
  • Friston, K. J., Zarahn, E., Josephs, O., Henson, R. N. A., & Dale, A. M. (1999). Stochastic designs in event-related fMRI. NeuroImage, 10(5), 607-619.
  • Glover, G. H. (1999). Deconvolution of impulse response in event-related BOLD fMRI. NeuroImage, 9(4), 416-429.
  • Haatveit, B. C., Sundet, K., Hugdahl, K., et al. (2010). The validity of d prime as a working memory index. Neuropsychology, 24(5), 629-640.
  • Hagberg, G. E., Zito, G., Patria, F., & Sanes, J. N. (2001). Improved detection of event-related functional MRI signals using probability functions. NeuroImage, 14(5), 1193-1205.
  • Liu, T. T., Frank, L. R., Wong, E. C., & Buxton, R. B. (2001). Detection power, estimation efficiency, and predictability in event-related fMRI. NeuroImage, 13(4), 759-773.
  • Maus, B., van Breukelen, G. J. P., Goebel, R., & Berger, M. P. F. (2010). Optimal design of multi-subject blocked fMRI experiments. NeuroImage, 51(3), 1338-1348.
  • Mumford, J. A., & Nichols, T. E. (2008). Power calculation for group fMRI studies accounting for arbitrary design and temporal autocorrelation. NeuroImage, 39(1), 261-268.
  • Murphy, K., & Garavan, H. (2005). Deriving the optimal number of events for an event-related fMRI study based on the spatial extent of activation. NeuroImage, 27(4), 771-777.
  • Nichols, T. E., Das, S., Eickhoff, S. B., et al. (2017). Best practices in data analysis and sharing in neuroimaging using MRI (COBIDAS). Nature Neuroscience, 20(3), 299-303.
  • Petersen, S. E., & Dubis, J. W. (2012). The mixed block/event-related design. NeuroImage, 62(2), 1177-1184.
  • Poldrack, R. A., Fletcher, P. C., Henson, R. N., et al. (2008). Guidelines for reporting an fMRI study. NeuroImage, 40(2), 409-414.
  • Poldrack, R. A., Mumford, J. A., & Nichols, T. E. (2011). Handbook of Functional MRI Data Analysis. Cambridge University Press.
  • Wager, T. D., & Nichols, T. E. (2003). Optimization of experimental design in fMRI: A general framework using a genetic algorithm. NeuroImage, 18(2), 293-309.

See references/ for detailed design optimization examples and parameter lookup tables.

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Fmri Task Design Guide?

Guides fMRI task design: block vs. event-related vs. mixed; jittering; contrasts; power for BOLD detection

Waarom Fmri Task Design Guide gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Fmri Task Design Guide bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Fmri Task Design Guide in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/NeuroAIHub/BrainPilot/tree/main/packages/skills/skills/06_fMRI_Neuroimaging/fmri-task-design-guide. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Fmri Task Design Guide gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Fmri Task Design Guide gebruiken?

Zoveel als je wilt. Je kunt Fmri Task Design Guide gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Fmri Task Design Guide gratis?

Ja. Deze skill is door NeuroAIHub op GitHub gepubliceerd onder de licentie AGPL-3.0. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇