Logo : Fmri Task Design Guide

Fmri Task Design Guide

OrganisationPopulaire
NeuroAIHub
fmri-task-design-guide

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

Add to TypingMind

Présentation

ÉditeurNeuroAIHub
DépôtBrainPilot
Nom de la compétencefmri-task-design-guide
Étoiles
1.1K
Forks
74
Fichiers inclus
1
LicenceAGPL-3.0
Liens
  • Instructions en Markdown

    Un fichier SKILL.md que le modèle charge à la demande : il ne consomme donc des tokens que lorsqu’une demande correspond réellement à la compétence.

  • Compatible avec tous les LLM

    Les compétences IA sont rédigées en Markdown et non sous forme de code propre à un fournisseur. Elles fonctionnent donc avec GPT, Claude, Gemini, Grok ou un modèle local.

  • Fichiers inclus : 1

    Des scripts, des gabarits et des références que le modèle peut consulter pendant son travail. Les fichiers sont en lecture seule et ne sont jamais exécutés.

  • Open source

    Publiée par NeuroAIHub sur GitHub. Consultez les sources avant de l’installer.

Installation

Installez la compétence IA Fmri Task Design Guide dans TypingMind pour l’utiliser avec n’importe quel LLM, ou ajoutez-la à un autre agent capable de lire SKILL.md.

1

Installer dans TypingMind

TypingMind installe une compétence directement depuis son dossier GitHub : l’application lit SKILL.md, regroupe les fichiers de ressources et enregistre le tout localement.

  1. Ouvrez l’application et accédez à Plugins → Compétences.
  2. Choisissez « Installer depuis GitHub ».
  3. Copiez l’URL ci-dessous, qui pointe vers le dossier de la compétence, puis collez-la et confirmez.
    https://github.com/NeuroAIHub/BrainPilot/tree/main/packages/skills/skills/06_fMRI_Neuroimaging/fmri-task-design-guide
  4. Activez la compétence dans chaque discussion où vous souhaitez pouvoir l’utiliser.
Plugins → Compétences → Ajouter une compétence → Via une URL GitHub, puis collez l’URL du dossier et appuyez sur Continuer.
2

Installer dans un autre agent

Tout agent capable de lire le format Agent Skills peut utiliser cette compétence : copiez le dossier dans le répertoire des compétences de cet 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
Redémarrez Claude Code après la copie pour que la nouvelle compétence soit prise en compte.

Utilisez cette compétence dans TypingMind

Activez Fmri Task Design Guide dans n’importe quelle discussion TypingMind et le modèle s’occupe du reste. Le nom et la description de la compétence figurent dans le prompt système. Dès qu’une demande correspond, le modèle charge lui-même l’intégralité des instructions : vous n’avez jamais à l’invoquer manuellement, et elle ne consomme aucun token tant qu’elle n’est pas utilisée.

Le modèle charge automatiquement Fmri Task Design Guide dès qu’une demande correspond à cette compétence.

Compatible avec tous les modèles IA

Les compétences IA sont de simples instructions Markdown, et non du code propre à un fournisseur. Ainsi, la compétence Fmri Task Design Guide n’est pas liée au modèle pour lequel elle a été conçue. Installez-la une seule fois dans TypingMind et utilisez-la avec GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou un modèle local que vous exécutez vous-même, le tout avec vos propres clés API.

  • Chargée uniquement en cas de besoin

    Le prompt système ne contient que le nom et la description. Les instructions sont récupérées à la première demande correspondante : une compétence inutilisée ne coûte donc rien.

  • Changez de modèle en cours de discussion

    La compétence étant constituée d’instructions et non de code, elle reste fonctionnelle lorsque vous changez de modèle : le nouveau modèle lit le même fichier SKILL.md.

Instructions de la compétence

Voici le contenu de SKILL.md que le modèle charge. Lisez-le avant l’installation : une compétence contient des instructions que votre modèle suivra.

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.

Fichiers inclus

Le modèle lit ces fichiers à la demande lorsque la compétence est chargée. Ils sont accessibles en lecture et ne sont jamais exécutés.

Foire aux questions

À quoi sert la compétence IA Fmri Task Design Guide ?

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

Pourquoi utiliser Fmri Task Design Guide sur TypingMind ?

Parce que vous l’installez une seule fois pour l’utiliser avec n’importe quel modèle. Fmri Task Design Guide se compose de simples instructions en Markdown plutôt que de code propre à un fournisseur. La même compétence fonctionne donc avec GPT-5, Claude, Gemini, Grok ou un modèle local, et vous pouvez changer de modèle en cours de discussion sans perturber son fonctionnement. TypingMind utilise vos propres clés API : vous payez donc directement les fournisseurs plutôt qu’un abonnement par siège, et vos compétences et discussions restent dans votre propre espace de stockage.

Comment installer Fmri Task Design Guide dans TypingMind ?

Dans TypingMind, ouvrez Plugins → Compétences → Installer depuis GitHub et collez https://github.com/NeuroAIHub/BrainPilot/tree/main/packages/skills/skills/06_fMRI_Neuroimaging/fmri-task-design-guide. TypingMind lit le fichier SKILL.md, regroupe les fichiers associés et installe le tout sous forme de compétence que vous pouvez activer pour chaque discussion.

Quels modèles d’IA peuvent utiliser Fmri Task Design Guide ?

N’importe quel modèle que vous connectez dans TypingMind. Les compétences IA sont de simples instructions en Markdown, et non du code propre à un fournisseur. GPT, Claude, Gemini, Grok et les modèles locaux peuvent donc tous charger cette compétence lorsqu’une demande lui correspond.

Combien de modèles d’IA puis-je utiliser avec Fmri Task Design Guide ?

Autant que vous le souhaitez. Vous pouvez utiliser Fmri Task Design Guide avec tout modèle qui prend en charge les compétences : GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama et bien d’autres, le tout dans TypingMind avec vos propres clés API.

La compétence IA Fmri Task Design Guide est-elle gratuite ?

Oui. Cette compétence est publiée sur GitHub par NeuroAIHub sous licence AGPL-3.0. Vous ne payez que votre propre fournisseur d’IA pour les tokens utilisés.

Que sont les compétences IA ?

Une compétence IA est un ensemble d’instructions réutilisables qui apprend à un modèle d’IA à accomplir une tâche précise. Elle suit le format ouvert Agent Skills : un fichier SKILL.md contenant un nom et une description, ainsi que les éventuels scripts, gabarits ou fichiers de référence dont le modèle peut avoir besoin. Le modèle ne lit les instructions que lorsque votre demande correspond à la compétence. Une compétence installée ne coûte donc rien tant qu’elle n’est pas utilisée.

En quoi les compétences IA diffèrent-elles des plugins ou des serveurs MCP ?

Un plugin ou un serveur MCP fournit au modèle de nouveaux outils à appeler : du code qui s’exécute quelque part et renvoie un résultat. Une compétence IA lui apporte plutôt des connaissances et une méthode : comment aborder une tâche, quelles étapes suivre et à quoi ressemble un bon résultat. Les compétences sont de simples instructions en Markdown. Elles ne nécessitent donc ni serveur, ni clé API, ni environnement d’exécution, et fonctionnent avec n’importe quel modèle.

Tout voir

Créez votre propre espace de travail IA dès maintenant

Abonnez-vous à notre newsletter pour être informé des nouvelles fonctionnalités et des prochains cadeaux à gagner 👇