Brain Connectivity Modeler

Advises on functional/effective connectivity methods: PPI, DCM, Granger causality, graph theory

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Brain Connectivity Modeler" with this command: npx skills add haoxuanlithuai/awesome_cognitive_and_neuroscience_skills/haoxuanlithuai-awesome-cognitive-and-neuroscience-skills-brain-connectivity-modeler

Brain Connectivity Modeler

Purpose

Brain connectivity analysis goes beyond mapping where activation occurs to ask how brain regions interact. This requires choosing among fundamentally different analytical frameworks: functional connectivity (statistical associations), effective connectivity (directed causal influences), and network topology (graph-theoretic properties). Each framework answers different questions and makes different assumptions.

A competent programmer without neuroscience training would not know the critical distinction between functional and effective connectivity, would likely confuse correlation with causation in brain networks, and would not appreciate why motion artifacts are particularly devastating for connectivity analyses. This skill encodes the domain judgment required to select and correctly implement brain connectivity methods.

When to Use This Skill

  • Choosing a connectivity method for task-based or resting-state fMRI
  • Implementing psychophysiological interaction (PPI) analysis
  • Setting up dynamic causal models (DCM)
  • Applying graph theory to brain network data
  • Evaluating whether Granger causality is appropriate for fMRI
  • Reviewing or troubleshooting existing connectivity analyses

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.

Functional vs. Effective Connectivity

This is the most fundamental distinction in brain connectivity analysis (Friston, 2011):

PropertyFunctional ConnectivityEffective Connectivity
DefinitionStatistical dependency between time seriesDirected causal influence of one region on another
DirectionalityUndirectedDirected
CausalityCannot infer causalityAttempts to infer causal structure
Model requirementModel-free (correlations)Model-based (requires explicit neural model)
Hypothesis typeExploratory or confirmatoryStrictly confirmatory
Primary methodsCorrelation, partial correlation, ICADCM, PPI, structural equation modeling
SourceFriston, 2011Friston, 2011; Friston et al., 2003

Domain warning: Functional connectivity (correlation) does not imply direct anatomical or causal connection. Two regions can show high functional connectivity because they share a common input, not because they directly influence each other (Friston, 2011).

Method Selection Decision Tree

What is your connectivity question?
 |
 +-- "Do regions A and B covary in activity?"
 | --> Functional connectivity (correlation, partial correlation)
 |
 +-- "Does the coupling between A and B change with task context?"
 | --> PPI (Friston et al., 1997; O'Reilly et al., 2012)
 |
 +-- "Does region A causally influence region B, and does this
 | change with experimental manipulation?"
 | --> DCM (Friston et al., 2003)
 | Requires: strong prior hypotheses, limited model space
 |
 +-- "What is the network topology (hubs, modules, efficiency)?"
 | --> Graph theory (Bullmore & Sporns, 2009)
 |
 +-- "Does activity in A temporally precede and predict B?"
 --> Granger causality (with STRONG caveats for fMRI;
 see Granger causality section below)

Functional Connectivity Methods

Seed-Based Correlation

  1. Extract mean time series from a seed ROI
  2. Compute Pearson correlation with all other voxels (or ROIs)
  3. Apply Fisher z-transformation: z = 0.5 * ln((1+r)/(1-r)) before group statistics (Fisher, 1921)
  4. Enter z-maps into second-level group analysis

Critical preprocessing:

  • Apply stringent motion correction: FD threshold < 0.2 mm for scrubbing or censoring (Power et al., 2014)
  • Band-pass filter to 0.01-0.1 Hz for resting-state (Biswal et al., 1995; but see Niazy et al., 2011 for caveats)
  • Regress out motion parameters (24-parameter model), WM/CSF signals (aCompCor; Behzadi et al., 2007)

Partial Correlation

Partial correlation between regions A and B controls for shared variance with all other regions in the model. This reduces the influence of common inputs but requires careful regularization when the number of regions is large relative to the number of time points (Smith et al., 2011).

  • Use regularized partial correlation (e.g., L1-penalized precision matrix) when the number of ROIs exceeds ~20% of the number of time points (Varoquaux et al., 2010)

Independent Component Analysis (ICA)

ICA decomposes the whole-brain fMRI signal into spatially independent components, each representing a network (Beckmann & Smith, 2004).

  • Model order (number of components): 20-25 for major networks; 70-100 for fine-grained parcellation (Smith et al., 2009)
  • Group ICA: Use temporal concatenation or dual regression (Beckmann et al., 2009; Nickerson et al., 2017)
  • Artifact identification: Classify components as signal or noise based on spatial pattern, power spectrum, and temporal properties (Griffanti et al., 2017)

Psychophysiological Interactions (PPI)

PPI tests whether the functional coupling between a seed region and other brain areas changes as a function of psychological context (e.g., task condition; Friston et al., 1997).

PPI Model Specification

The PPI GLM includes three regressors:

  1. Physiological regressor: Deconvolved time series from the seed region (the neural signal estimate)
  2. Psychological regressor: The task regressor (e.g., condition A vs. condition B)
  3. Interaction term: Element-wise product of the physiological and psychological regressors, reconvolved with the HRF

The interaction term is the regressor of interest. A significant PPI effect means that functional coupling with the seed region differs between task conditions (O'Reilly et al., 2012).

Generalized PPI (gPPI)

Standard PPI tests one psychological contrast at a time. Generalized PPI (gPPI) includes all task conditions simultaneously (McLaren et al., 2012):

  • Create separate PPI terms for each condition
  • Include all main-effect task regressors and the seed time series
  • More sensitive than standard PPI because it properly accounts for all conditions
  • Recommended over standard PPI for designs with more than two conditions (McLaren et al., 2012)

PPI Practical Considerations

ParameterRecommendationSource
Seed ROI definitionFunctional (from activation map) or anatomical atlas; 6-10 mm sphere typicalO'Reilly et al., 2012
DeconvolutionRequired for interaction term (SPM default); extract neural signal before computing interactionGitelman et al., 2003
Minimum events per condition20+ per condition for stable PPI estimatesO'Reilly et al., 2012
Multiple seed regionsRun separate PPI analyses per seed, then correct for multiple comparisonsO'Reilly et al., 2012

Dynamic Causal Modeling (DCM)

DCM models the causal architecture of brain regions using a biophysical generative model of neural dynamics and hemodynamic coupling (Friston et al., 2003).

DCM Model Specification

A DCM is defined by three matrices:

MatrixFunctionInterpretation
A (intrinsic)Fixed connections between regions (always on)Baseline coupling strength
B (modulatory)Condition-dependent modulation of connectionsHow task context changes coupling (the key experimental question)
C (driving input)Which regions receive direct task inputWhere external stimuli enter the network

DCM Requirements and Constraints

RequirementGuidelineSource
Number of regions3-8 regions maximumStephan et al., 2010
Prior hypothesesStrong prior hypotheses about network architecture requiredStephan et al., 2010
Model space sizeKeep total models < 20-30 for reliable BMSStephan et al., 2009
Task designEvent-related or block designs with clear experimental manipulationFriston et al., 2003
Time series extractionFrom first eigenvariate of activated voxels within ROIStephan et al., 2010
Data qualityStrong task activation in all modeled regionsStephan et al., 2010

Bayesian Model Selection (BMS)

After estimating all candidate models, use BMS to identify the winning model (Stephan et al., 2009):

  • Fixed-effects BMS (FFX): Assumes all subjects have the same model. Use when sample is homogeneous
  • Random-effects BMS (RFX): Allows different subjects to have different optimal models. Use for heterogeneous populations (Stephan et al., 2009)
  • Family-level inference: Group models into families sharing a feature (e.g., all models with a particular connection), then compare families. More robust than individual model comparison (Penny et al., 2010)
  • Report exceedance probability (probability that a model/family is more likely than all others) and protected exceedance probability (corrected for chance; Rigoux et al., 2014)

DCM Pitfalls

  • Too many models: Exhaustive model comparison with > 30 models leads to unreliable BMS (Stephan et al., 2010)
  • No activation in modeled regions: DCM requires that included regions show significant task-related activation. Including silent regions produces unreliable estimates
  • Confusing DCM with Granger causality: DCM models neural dynamics, not temporal precedence in BOLD signals

Granger Causality

Granger causality tests whether past values of time series X improve prediction of time series Y beyond Y's own past (Granger, 1969).

Severe Limitations for fMRI

LimitationExplanationSource
Hemodynamic confoundThe HRF varies across brain regions by 1-2 seconds. A region with a faster HRF will appear to "Granger-cause" a region with a slower HRF, regardless of true neural timingDavid et al., 2008; Seth et al., 2013
Low temporal resolutionfMRI TR (0.5-3 seconds) is far slower than neural dynamics (milliseconds), aliasing true causal structureSeth et al., 2013
Downsampling artifactsSubsampling a continuous process can reverse the apparent causal directionSeth et al., 2013

Domain warning: Granger causality applied to fMRI BOLD signals is widely considered unreliable for inferring neural causal direction due to hemodynamic variability (David et al., 2008; Seth et al., 2013). If causal inference is needed, use DCM (which explicitly models the hemodynamic delay) or consider EEG/MEG (which has millisecond temporal resolution).

Graph Theory for Brain Networks

Graph theory characterizes the topological organization of brain networks (Bullmore & Sporns, 2009).

Node Definition

MethodDescriptionExample AtlasesSource
Anatomical parcellationPredefined atlas regionsAAL (116 regions), Harvard-OxfordTzourio-Mazoyer et al., 2002
Functional parcellationData-driven boundariesSchaefer (100-1000 parcels), Gordon (333 parcels)Schaefer et al., 2018; Gordon et al., 2016
Voxel-levelEach voxel is a node~100,000 nodesComputationally expensive; rarely used for full graph metrics

Recommendation: Use functional parcellation (Schaefer or Gordon atlases) for most analyses. Functional parcels better respect the true boundaries of functional regions than anatomical atlases (Schaefer et al., 2018).

Edge Definition

MethodDescriptionThreshold ApproachSource
CorrelationPearson r between time seriesProportional (top 10-20% of connections) or absolute (r > 0.2-0.3)Bullmore & Sporns, 2009
Partial correlationControls for indirect connectionsSame thresholding optionsVaroquaux et al., 2010
CoherenceFrequency-domain couplingMagnitude squared coherence > thresholdSun et al., 2004

Domain warning: Thresholding strategy dramatically affects graph metrics. Always report results across a range of thresholds or use proportional thresholding to control for differences in overall connectivity strength across subjects (van den Heuvel et al., 2017).

Key Graph Metrics

MetricMeaningNormalizationSource
Clustering coefficientProportion of a node's neighbors that are also connected to each otherNormalize against random networks (C/C_random)Watts & Strogatz, 1998
Characteristic path lengthAverage shortest path between all node pairsNormalize against random networks (L/L_random)Watts & Strogatz, 1998
Small-worldnesssigma = (C/C_random) / (L/L_random); sigma > 1 indicates small-worldN/A (already normalized)Watts & Strogatz, 1998; Humphries & Gurney, 2008
Modularity (Q)Strength of community structure; Q > 0.3 typically indicates strong modular organizationCompare against null distributionNewman, 2006
Hub measuresDegree centrality, betweenness centrality, participation coefficientZ-score within networkBullmore & Sporns, 2009
Global efficiencyInverse of mean shortest path lengthNormalize against random networksLatora & Marchiori, 2001

Normalization requirement: Raw graph metrics are meaningless without comparison to null models. Always normalize against random networks (preserving degree distribution) or lattice networks (Watts & Strogatz, 1998; Rubinov & Sporns, 2010). Generate at least 1,000 random networks for stable null distributions.

Common Pitfalls

  1. Confusing functional connectivity with effective connectivity: Correlation between two regions does not imply direct or causal connection. Two regions may correlate because they receive common input from a third region (Friston, 2011)
  2. Motion artifacts in connectivity: Head motion creates spurious short-distance positive correlations and spurious long-distance negative correlations, mimicking real connectivity patterns (Power et al., 2012). Use stringent motion thresholds (FD < 0.2 mm; Power et al., 2014) and aggressive confound regression
  3. Not Fisher z-transforming correlations: Pearson r values are bounded and non-normally distributed. Always apply Fisher z-transformation before parametric group statistics (Fisher, 1921)
  4. Arbitrary graph thresholds: Reporting graph metrics at a single threshold without sensitivity analysis across thresholds can produce unreliable or threshold-dependent conclusions (van den Heuvel et al., 2017)
  5. Too many DCM models: Exhaustive model comparison across > 30 models leads to unreliable Bayesian model selection. Constrain the model space based on prior hypotheses (Stephan et al., 2010)
  6. Using Granger causality with fMRI: Regional HRF variability can reverse apparent causal direction in BOLD signals (David et al., 2008; Seth et al., 2013)
  7. Confounding connectivity with coactivation: Two regions that are both activated by a task may show correlation due to shared task-driven variance, not intrinsic neural coupling. Regress out task effects before computing resting-state-style connectivity on task data (Cole et al., 2019)
  8. Ignoring global signal effects: Global signal regression introduces artifactual anticorrelations. If using it, acknowledge this limitation (Murphy & Fox, 2017)

Minimum Reporting Checklist

  • Connectivity type (functional, effective, or graph-theoretic) and justification
  • ROI/node definition method, atlas used, number of regions
  • Time series extraction method (mean, first eigenvariate, PCA)
  • Preprocessing for connectivity (band-pass filter frequencies, confound model, motion threshold)
  • Edge definition (correlation type, thresholding method and values)
  • For PPI: seed region definition, deconvolution method, conditions in PPI model
  • For DCM: model space (A, B, C matrices for all models), BMS method (FFX/RFX), model evidence
  • For graph theory: normalization method, number of null networks, range of thresholds tested
  • Fisher z-transformation applied (yes/no)
  • Motion exclusion criteria and mean FD of included subjects
  • Software package and version

References

  • Beckmann, C. F., & Smith, S. M. (2004). Probabilistic independent component analysis for functional magnetic resonance imaging. IEEE Transactions on Medical Imaging, 23(2), 137-152.
  • Beckmann, C. F., Mackay, C. E., Filippini, N., & Smith, S. M. (2009). Group comparison of resting-state fMRI data using multi-subject ICA and dual regression. NeuroImage, 47(S1), S148.
  • Behzadi, Y., Restom, K., Liau, J., & Liu, T. T. (2007). A component based noise correction method (CompCor) for BOLD and perfusion based fMRI. NeuroImage, 37(1), 90-101.
  • Biswal, B., Yetkin, F. Z., Haughton, V. M., & Hyde, J. S. (1995). Functional connectivity in the motor cortex of resting human brain using echo-planar MRI. Magnetic Resonance in Medicine, 34(4), 537-541.
  • Bullmore, E., & Sporns, O. (2009). Complex brain networks: Graph theoretical analysis of structural and functional systems. Nature Reviews Neuroscience, 10(3), 186-198.
  • Cole, M. W., Ito, T., Bassett, D. S., & Schultz, D. H. (2019). Activity flow over resting-state networks shapes cognitive task activations. Nature Neuroscience, 19, 1718-1726.
  • David, O., Guillemain, I., Saillet, S., et al. (2008). Identifying neural drivers with functional MRI: An electrophysiological validation. PLoS Biology, 6(12), e315.
  • Fisher, R. A. (1921). On the "probable error" of a coefficient of correlation deduced from a small sample. Metron, 1, 3-32.
  • Friston, K. J. (2011). Functional and effective connectivity: A review. Brain Connectivity, 1(1), 13-36.
  • Friston, K. J., Buechel, C., Fink, G. R., et al. (1997). Psychophysiological and modulatory interactions in neuroimaging. NeuroImage, 6(3), 218-229.
  • Friston, K. J., Harrison, L., & Penny, W. (2003). Dynamic causal modelling. NeuroImage, 19(4), 1273-1302.
  • Gitelman, D. R., Penny, W. D., Ashburner, J., & Friston, K. J. (2003). Modeling regional and psychophysiologic interactions in fMRI: The importance of hemodynamic deconvolution. NeuroImage, 19(1), 200-207.
  • Gordon, E. M., Laumann, T. O., Adeyemo, B., et al. (2016). Generation and evaluation of a cortical area parcellation from resting-state correlations. Cerebral Cortex, 26(1), 288-303.
  • Granger, C. W. J. (1969). Investigating causal relations by econometric models and cross-spectral methods. Econometrica, 37(3), 424-438.
  • Griffanti, L., Douaud, G., Bijsterbosch, J., et al. (2017). Hand classification of fMRI ICA noise components. NeuroImage, 154, 188-205.
  • Humphries, M. D., & Gurney, K. (2008). Network "small-world-ness": A quantitative method for determining canonical network equivalence. PLoS ONE, 3(4), e0002051.
  • Latora, V., & Marchiori, M. (2001). Efficient behavior of small-world networks. Physical Review Letters, 87(19), 198701.
  • McLaren, D. G., Ries, M. L., Xu, G., & Johnson, S. C. (2012). A generalized form of context-dependent psychophysiological interactions (gPPI). NeuroImage, 61(4), 1277-1286.
  • Murphy, K., & Fox, M. D. (2017). Towards a consensus regarding global signal regression for resting state functional connectivity MRI. NeuroImage, 154, 169-173.
  • Newman, M. E. J. (2006). Modularity and community structure in networks. PNAS, 103(23), 8577-8582.
  • Nickerson, L. D., Smith, S. M., Ongur, D., & Beckmann, C. F. (2017). Using dual regression to investigate network shape and amplitude in functional connectivity analyses. Frontiers in Neuroscience, 11, 115.
  • Niazy, R. K., Xie, J., Miller, K., Beckmann, C. F., & Smith, S. M. (2011). Spectral characteristics of resting state networks. Progress in Brain Research, 193, 259-276.
  • O'Reilly, J. X., Woolrich, M. W., Behrens, T. E. J., et al. (2012). Tools of the trade: Psychophysiological interactions and functional connectivity. Social Cognitive and Affective Neuroscience, 7(5), 604-609.
  • Penny, W. D., Stephan, K. E., Daunizeau, J., et al. (2010). Comparing families of dynamic causal models. PLoS Computational Biology, 6(3), e1000709.
  • Power, J. D., Barnes, K. A., Snyder, A. Z., et al. (2012). Spurious but systematic correlations in functional connectivity MRI networks arise from subject motion. NeuroImage, 59(3), 2142-2154.
  • Power, J. D., Mitra, A., Laumann, T. O., et al. (2014). Methods to detect, characterize, and remove motion artifact in resting state fMRI. NeuroImage, 84, 320-341.
  • Rigoux, L., Stephan, K. E., Friston, K. J., & Daunizeau, J. (2014). Bayesian model selection for group studies revisited. NeuroImage, 84, 971-985.
  • Rubinov, M., & Sporns, O. (2010). Complex network measures of brain connectivity: Uses and interpretations. NeuroImage, 52(3), 1059-1069.
  • Schaefer, A., Kong, R., Gordon, E. M., et al. (2018). Local-global parcellation of the human cerebral cortex from intrinsic functional connectivity MRI. Cerebral Cortex, 28(9), 3095-3114.
  • Seth, A. K., Barrett, A. B., & Barnett, L. (2015). Granger causality analysis in neuroscience and neuroimaging. Journal of Neuroscience, 35(8), 3293-3297.
  • Smith, S. M., Fox, P. T., Miller, K. L., et al. (2009). Correspondence of the brain's functional architecture during activation and rest. PNAS, 106(31), 13040-13045.
  • Smith, S. M., Miller, K. L., Salimi-Khorshidi, G., et al. (2011). Network modelling methods for FMRI. NeuroImage, 54(2), 875-891.
  • Stephan, K. E., Penny, W. D., Daunizeau, J., et al. (2009). Bayesian model selection for group studies. NeuroImage, 46(4), 1004-1017.
  • Stephan, K. E., Penny, W. D., Moran, R. J., et al. (2010). Ten simple rules for dynamic causal modelling. NeuroImage, 49(4), 3099-3109.
  • Sun, F. T., Miller, L. M., & D'Esposito, M. (2004). Measuring interregional functional connectivity using coherence and partial coherence analyses of fMRI data. NeuroImage, 21(2), 647-658.
  • Tzourio-Mazoyer, N., Landeau, B., Papathanassiou, D., et al. (2002). Automated anatomical labeling of activations in SPM using a macroscopic anatomical parcellation of the MNI MRI single-subject brain. NeuroImage, 15(1), 273-289.
  • van den Heuvel, M. P., de Lange, S. C., Zalesky, A., et al. (2017). Proportional thresholding in resting-state fMRI functional connectivity networks and consequences for patient-control connectome studies. NeuroImage, 159, 437-449.
  • Varoquaux, G., Gramfort, A., Poline, J. B., & Thirion, B. (2010). Brain covariance selection: Better individual functional connectivity models using population prior. NIPS, 2334-2342.
  • Watts, D. J., & Strogatz, S. H. (1998). Collective dynamics of "small-world" networks. Nature, 393(6684), 440-442.

See references/ for detailed method implementation guides and parameter lookup tables.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

eeg preprocessing pipeline guide

No summary provided by upstream source.

Repository SourceNeeds Review
General

self-paced reading designer

No summary provided by upstream source.

Repository SourceNeeds Review
General

visual search array generator

No summary provided by upstream source.

Repository SourceNeeds Review
General

lesion-symptom mapping guide

No summary provided by upstream source.

Repository SourceNeeds Review