Nuisance Signal Regression

A key step in preparing fMRI data for statistical analysis is the removal of nusiance signals and noise. C-PAC provides a number of options for removing nuisance signals. These methods can be combined as desired by you, and are described below.


White Matter / CSF Regression

Signal changes in the white matter (WM) and cerebrospinal fluid (CSF) primarily reflect non-neural fluctuations such as scanner instabilities, subject motion, and physiological artifacts (e.g. respiration and cardiac effects) (Dagli et al., 1999; Windischberger et al., 2002). These signals are largely independent from the BOLD signal fluctuations recorded in gray matter, and may introduce temporal coherences that lead to an overestimation of functional connectivity strength. Successful estimation and correction for this non-neural noise allows for the exclusion such confounding effects.

Mean White Matter / CSF

The mean WM and CSF time series are calculated by averaging signal over all voxels within a WM or CSF mask for each time point. Mean WM and CSF time series are then used as temporal covariates and removed from the raw data through linear regression.

Note: The Lateral Ventricles Mask in standard space is provided for isolating signal changes in the CSF. This mask is based off of the HarvardOxford atlas that is in standard MNI space. If you wish to use your own standard and lateral ventricles mask, and wish to run CSF nuisance regression, you must specify it in your pipeline configuration.


The term “noise region-of-interest” (noise ROI) refers to areas such as white matter (WM) and cerebral spinal fluid (CSF) in which temporal fluctuations are unlikely to be modulated by neural activity, and thus primarily reflect physiological noise (Behzadi et al., 2007). Based on the assumption that signal from a noise ROI can be used to accurately model physiological fluctuations in gray matter regions, a novel component based noise reduction method (CompCor) was proposed to correct for physiological noise by regressing out principal components from noise ROIs (Behzadi et al., 2007). Compared to the average signal from WM and CSF regions (i.e. WM/CSF regression methods), signals captured by principal components derived from these noise ROIs can better account for voxel-specific phase differences in physiological noise due to the potential of principle component analysis to identify temporal pattern of physiological noise (Tomas et al., 2002). Thus, preprocessing with CompCor can significantly reduce physiological noise as well as noise from other sources (Behzadi et al., 2007; Chai et al., 2012).

The first step of CompCor is to determine noise ROIs. This can be done either by using anatomical data to identify voxels that consist primarily of either WM or CSF, or by defining noise ROIs as voxels with high temporal standard deviation. A principal component analysis (PCA) is then applied to characterize the time series data from the noise ROIs. Significant principal components are then introduced as covariates in a general linear model (GLM) as an estimate of the physiological noise signal space (Behzadi et al., 2007).

Global Signal Regression

Global signal, the average signal across all voxels in the brain, is assumed to reflect a combination of resting-state fluctuations, physiological noise (e.g. respiratory and cardiac noise), and other noise signals with non-neural origin. Global signal regression (GSR) is a preprocessing technique for removing the spontaneous BOLD fluctuations common to the whole brain using a general linear model (GLM). Although GSR can potentially change functional connectivity distributions and result in increased negative correlations (Murphy et al., 2009; Saad et al., 2012; Weissenbacher et al., 2009), this technique has been shown to facilitate the detection of localized neuronal signals and improve the specificity of functional connectivity analysis (Fox et al., 2005; Fox et al., 2009). Thus, GSR remains a common and useful processing technique in some situations.

Global Mean

A global mean (defined as the average signal over all voxels for each time point) is used as a temporal covariate and regressed out using linear regression.

First Principle Component Removal (PC1)

Performs a Principal Components Analysis and regresses out the first principal component, which is assumed to be the global mean signal.

Linear and Quadratic Detrending

Removes linear or quadratic trends in the timeseries. The linear trend is likely due to the scanner heating up as the scan progresses, while the quadratic trend is possibly due to slow movement-related effects.

Motion Correction

Movement during scanning is one of of the largest factors influencing the quality of fMRI data. Movement of the head between the acquisition of each volume can cause brain images to become misaligned. Head motion during scanning can also cause spurious changes in signal intensity. If they are not corrected, these changes can influence the results of activation and connectivity analyses. Recent studies have shown that motion as small as 0.1 mm can systematically bias both within- and between- group effects during the analysis of fMRI data (Power et al., 2011; Satterhwaite et al., 2012; Van Dijk et al., 2012). Even the most cooperative participants often still show displacements of up to a millimeter, and head movements of several millimeters are not uncommon in studies of hyperkinetic subjects such as young children, older adults, or patient populations.

There are four main approaches to motion correction: volume realignment, using a general linear model to regress out motion-related artifacts (i.e. regression of motion parameters, as described as one of the regressors in nuisance regression above), de-spiking of motion confounded time points, and censoring of motion confounded time points (i.e. “scrubbing”).

Volume Realignment

Volume realignment aligns reconstructed volumes by calculating motion parameters based on a solid-body model of the head and brain (Friston 1996). Based on these parameters, each volume is registered to the volume preceding it.

C-PAC runs volume realignment on all functional images during functional preprocessing. You can select from two sets of motion parameters to use during this process:

  • 6-Parameter Model - Three translation and three rotation parameters as described in Friston 1996.
  • Friston 24-Parameter Model - The 6 motion parameters of the current volume and the preceding volume, plus each of these values squared.

Regression of Motion Parameters

Another approach to motion correction is to regress out the effects of motion when running statistical analysis. This is done by calculating motion parameters and including them in your General Linear Model (Fox et al., 2005; Weissenbacher et al., 2009).

By default, C-PAC will calculate and output the motion parameters used during volume realignment. You can optionally enable the calculation of additional motion parameters, including Framewise Displacement (FD) and DVARS (as described below and in Power et al., 2011).

To view motion parameters generated by C-PAC, type the following: /path/to/datasink/directory

Where /path/to/output/directory is the path to your output directory (outputDirectory as specified in config.yml). This will output a ...all_params.csv file in the top level of each pipeline directory which contains all motion parameters calculated by C-PAC.


Note: You cannot run De-Spiking and Scrubbing at the same time.


One way to ensure that your results are have not been influenced by spurious, motion-related noise is to remove volumes during which significant movement occurred. This is known as volume censoring, or scrubbing. Power and colleagues (2011) proposed two measures to identify volumes contaminated by excessive motion; framewise displacement (FD) and DVARS:

  • FD is calculated from derivatives of the six rigid-body realignment parameters estimated during standard volume realignment, and is a compressed single index of the six realignment parameters.
  • DVARS is the root mean squared (RMS) change in BOLD signal from volume to volume (D referring to temporal derivative of time courses and VARS referring to RMS variance over voxels). DVARS is calculated by first differentiating the volumetric time series and then calculating the RMS signal change over the whole brain. This measure indexes the change rate of BOLD signal across the entire brain at each frame of data or, in other words, how much the intensity of a brain image changes relative to the previous time point.

Together, these two measures capture the head displacements and the brain-wide BOLD signal displacements from volume to volume over all voxels within the brain (Power et al., 2011).

After calculating FD and DVARS, thresholds can be applied to censor the data. Selecting thresholds for scrubbing is a trade-off. More stringent thresholds allow more complete removal of motion-contaminated data, and minimize motion-induced artifacts. Meanwhile, more stringent scrubbing will also remove more data, which may increase the variability and decrease the test-retest reliability of the data. Commonly used thresholds are FD > 0.2 to 0.5 mm and DVARS > 0.3 to 0.5% of BOLD.

IMPORTANT: Removing time points from a continuous time series (as is done during scrubbing) disrupts the temporal structure of the data and precludes frequency-based analyses such as ALFF/fAlff. However, scrubbing can effectively be used to minimize motion-related artifacts in seed-based correlation analyses (Power et al., 2011; 2012).

Note: You cannot run De-Spiking and Scrubbing at the same time.

Median Angle Correction

Median angle correction is another global signal correction approach. It is assumed that the global signal in resting-state fMRI can be viewed as the sum of two components: a component that reflects the intrinsic correlations of resting state fMRI signals between regions, and a nuisance component that reflects an additive global signal confound. Unlike the GSR method which removes both components, median angle correction can characterize the properties of the global signal and effectively minimize the effects of the additive global signal confound while preserving the desired components.

Principal component analysis (PCA) is used to decompose the resting-state data. Median angle is computed by taking the inverse cosine of each voxel’s time series vector’s projection onto the first principal component (i.e. the global mean signal) and then calculating the median over the angles from all the vectors. If an inverse relation is found between the median angle and the mean BOLD signal amplitude, then an additive signal confound is present. As resting-state data sets with high median angles and low mean BOLD magnitudes are likely to be the least contaminated by an additive global confound (He and Liu, 2011), the inverse relation between median angle and mean BOLD magnitude is used to correct for differences in the additive confound. Specifically, the angular distributions of datasets with small median angles can be shifted to attain a larger target median angle to effectively minimize the effects of the global signal confound. The calculation of target angle for median angle correction is described in He and Liu (2011).

Temporal Filtering

The overall goal of temporal filtering is to increase the signal-to-noise ratio. Due to the relatively poor temporal resolution of fMRI, time series data contain little high-frequency noise. They do, however, often contain very slow frequency fluctuations that may be unrelated to the signal of interest. Slow changes in magnetic field strength may be responsible for part of the low-frequency signal observed in fMRI time series (Smith et al., 1999). Other factors contributing to noise in a time series are cardiac and respiratory effects, which will often show up as noise around ~0.15 and ~0.34 Hz, respectively (Wager et al., 2007). The temporal filtering method implemented by C-PAC is relatively simple. You specify a lower and upper bound for a band-pass filter, which then removes any information in frequencies outside the specified frequency band.

Recent work has revealed a portion of the low-frequency signal (0.01 to 0.1 Hz) to be the result of slow oscillations intrinsic to brain activity (Gee et al., 2011; Zuo et al., 2010; Schroeder and Lakatos, 2009). Utilizing measures such as Amplitude of Low Frequency Fluctuations (ALFF) and fractional ALFF, the power of these oscillations has been shown to differ both across subjects (Zang et al., 2007) and between conditions (Yan et al., 2009). Resting functional connectivity has been shown to be most prominent at these frequency bands (Cordes et al., 2001), and as such these fluctuations are commonly used to measure functional connectivity in the resting brain (Gee et al., 2010).

As these low-frequency oscillations are likely of interest to researchers, it is important to take this knowledge into account when deciding on what temporal filtering settings to use. As a general rule, it is safe to filter frequencies below 0.0083 Hz (Ashby, 2011).

Additionally, there is some evidence (Davey et al., 2012) that temporal filtering may induce correlation in resting fMRI data, breaking the assumption of temporal sample independence and potentially invalidating the results of connectivity analysis. This should be taken into account when running temporal filtering on data on which you will later run connectivity analysis.

Configuring Nuisance Signal Regression Options

  1. Run Nuisance Signal Correction - [Off, On, On/Off]: Covary out various sources of noise.
  2. Lateral Ventricles Mask (Standard Space) - [path]: A binary mask of the lateral ventricles.
  3. Select Regressors: - [checkbox: compcor, wm, csf, global, pc1, motion, linear, quadratic]: Clicking on the + icon to the right of the box here will bring up a dialog where you can check off which nuisance variables you would like to include. You may generate multiple sets of nuisance regression strategies in this way. When you are done defining nuisance regression strategies, check the box next to each strategy you would like to run.
  4. CompCor Components - [integer]: Number of principle components to calculate when running CompCor. 5 or 6 is recommended.
  5. Use Friston 24-Parameter Model - [On, Off, On/Off]: Use the Friston 24-Parameter Model during volume realignment. If this option is turned off, only 6 parameters will be used. These parameters will also be output as a spreadsheet.
  6. Motion Spike De-Noising - [Off, De-Spiking, Scrubbing]: Remove or regress out volumes exhibiting excessive motion. De-Spiking will regress out the contribution of motion spikes in the volumes above the selected motion threshold, and Scrubbing will remove the volumes above the threshold, as described above.
  7. Framewise Displacement (FD) Calculation - [Jenkinson, Power]: (Motion Spike De-Noising only) Choose which Framewise Displacement (FD) calculation to apply the threshold to during de-spiking or scrubbing.
  8. Framewise Displacement (FD) Threshold - [decimal]: (Motion Spike De-Noising Only) Specify the maximum acceptable Framewise Displacement (FD) in millimeters. Any volume exhibiting FD greater than the decimal value in mm will be regressed out or scrubbed. For example, if the threshold given is 0.5, CPAC will apply de-spiking or scrubbing (whichever chosen, if either) to all volumes with a calculated mean FD value above 0.5mm.
  9. Number of Preceding Volumes to Remove - [integer]: (Motion Spike De-Noising Only) Number of volumes to remove preceding a volume with excessive FD.
  10. Number of Subsequent Volumes to Remove - [integer]: (Motion Spike De-Noising Only) Number of volumes to remove subsequent to a volume with excessive FD.

Configuration Without the GUI

The following key/value pairs must be defined in your pipeline configuration YAML for C-PAC to run nuisance correction:

Key Description Potential Values
runNuisance Run Nuisance Signal Correction A list where ‘1’ represents ‘yes’ and ‘0’ represents ‘no’ (e.g., ‘[1]’).
lateral_ventricles_mask Standard Lateral Ventricles Binary Mask. A path (e.g., $FSLDIR/data/atlases/HarvardOxford/ HarvardOxford-lateral-ventricles-thr25-2mm.nii.gz).
Corrections The nuisance corrections you wish to apply. Corrections include compcor, wm, csf, gm, global, pc1, motion, linear, and quadratic. Another mapping of key value pairs, where values are 0 for ‘Disable’ and 1 for ‘Enable’.
nComponents The number of principle components to calculate when running CompCor. We recommend 5 or 6. A list containing an integer representing the number of PCs (e.g., ‘[5]’).
runFristonModel Use the Friston 24-Parameter Model during volume realignment. A list where ‘1’ represents ‘yes’ and ‘0’ represents ‘no’ (e.g., ‘[1]’).
runMotionSpike Motion Spike De-Noising. Remove or regress out volumes exhibiting excessive motion. [‘Off’], [‘De-Spiking’], or [‘Scrubbing’]
fdCalc (Motion Spike De-Noising only) Choose which Framewise Displacement (FD) calculation to apply the threshold to during de-spiking or scrubbing. [‘Jenkinson’] or [‘Power’]
spikeThreshold (Motion Spike De-Noising only) Specify the maximum acceptable Framewise Displacement (FD) in millimeters or in percentage (with a %). Any volume exhibiting FD greater than the value (or within the top percentage of the percent value if given) will be regressed out or scrubbed. Decimal values like [0.2] or [1.0], or a percent string value like [‘5%’] or [‘10%’]

The box below contains an example of what these parameters might look like when defined in the YAML:

runNuisance : [1]
lateral_ventricles_mask : /usr/share/fsl/5.0/data/atlases/HarvardOxford/HarvardOxford-lateral-ventricles-thr25-2mm.nii.gz
Corrections :
    - compcor : 0
      wm : 0
      csf : 0
      global : 0
      pc1 : 0
      motion : 0
      linear : 0
      quadratic : 0
      gm : 0
nComponents : [5]
runMotionSpike :  ['Scrubbing']
fdCalc: ['Jenkinson']
spikeThreshold : [0.2]
numRemovePrecedingFrames : 2
numRemoveSubsequentFrames : 2

Configuring Median Angle Correction Options

  1. Run Median Angle Correction - [Off, On, On/Off]: Correct for the global signal using median angle regression.
  2. Target Angle (degrees) - [number]: The target angle used during median angle correction.

Configuration Without the GUI

The following key/value pairs must be defined in your pipeline configuration YAML for C-PAC to run median angle correction:

Key Description Potential Values
runMedianAngleCorrection Run Median Angle Correction A list where ‘1’ represents ‘yes’ and ‘0’ represents ‘no’ (e.g., ‘[1]’).
targetAngleDeg The target angle used during median angle correction. A list containing an integer representing the degrees (e.g., ‘[90]’).

The box below contains an example of what these parameters might look like when defined in the YAML:

runMedianAngleCorrection : [0]
targetAngleDeg : [90]

Configuring Temporal Filtering Options

  1. Run Temporal Filtering - [Off, On, On/Off]: Apply a temporal band-pass filter to functional data.
  2. Select regressors: - [dialogue: Low-frequency cutoff, High-frequency cutoff]: Clicking on the + icon to the right of the box here will bring up a dialog where you can define the upper and lower cutoffs for the bandpass filter. You may generate multiple sets of bandpass filter strategies in this way. When you are done defining bandpasses, check the box next to each bandpass you would like to run.

Configuration Without the GUI

The following key/value pairs must be defined in your pipeline configuration YAML for C-PAC to run temporal filtering:

Key Description Potential Values
runFrequencyFiltering Apply a temporal band-pass filter to functional data. A list where ‘1’ represents ‘yes’ and ‘0’ represents ‘no’ (e.g., ‘[1]’).
nuisanceBandpassFreq Define one or more band-pass filters. A list of two-element lists, where the first element in the list is the low frequency cutoff and the second element is the high frequency cutoff.

The box below contains an example of what these parameters might look like when defined in the YAML:

runFrequencyFiltering : [1]
nuisanceBandpassFreq : [[0.009, 0.1]]


Ashby, F.G., (2011). Preprocessing. In Statistical Analysis of MRI Data. Cambridge: Cambridge University Press.

Cordes, D., Haughton, V. M., Arfanakis, K., Carew, J. D., Turski, P. A., Moritz, C. H., Quigley, M. A., et al. (2001). Frequencies contributing to functional connectivity in the cerebral cortex in “resting-state” data. AJNR. American journal of neuroradiology, 22(7), 1326–1333.

Dagli, M.S., Ingeholm, J.E., Haxby, J.V., 1999. Localization of cardiac-induced signal change in fMRI. NeuroImage 9, 407–415.

Davey, C. E., Grayden, D. B., Egan, G. F., & Johnston, L. A. (2012). Filtering induces correlation in fMRI resting state data. Neuroimage. doi:10.1016/j.neuroimage.2012.08.022 Fox, M.D., Snyder, A.Z., Vincent, J.L., Corbetta, M., Van Essen, D.C., Raichle, M.E., 2005. The human brain is intrinsically organized into dynamic, anticorrelated functional networks. Proc Natl Acad Sci U S A 102, 9673-9678.

Fox, M.D., Zhang, D., Snyder, A.Z., Raichle, M.E., 2009. The global signal and observed anticorrelated resting state brain networks. J Neurophysiol 101, 3270-3283.

Friston, K. J., Williams, S., Howard, R., Frackowiak, R. S., & Turner, R. (1996). Movement-related effects in fMRI time-series. Magnetic Resonance in Medicine, 35(3), 346–355.

Gee, D. G., Biswal, B. B., Kelly, C., Stark, D. E., Margulies, D. S., Shehzad, Z., Uddin, L. Q., et al. (2011). Low frequency fluctuations reveal integrated and segregated processing among the cerebral hemispheres. Neuroimage, 54(1), 517–527.

He Hongjian, Liu Thomas T., A geometric view of global signal confounds in resting-state functional MRI, NeuroImage, Volume 59, Issue 3, 1 February 2012, Pages 2339-2348

Murphy, K., Birn, R.M., Handwerker, D.A., Jones, T.B., Bandettini, P.A., 2009. The impact of global signal regression on resting state correlations: are anti-correlated networks introduced? Neuroimage 44, 893-905.

Power, J.D., Barnes, K.A., Snyder, A.Z., Schlaggar, B.L., Petersen, S.E., 2011. Spurious but systematic correlations in functional connectivity MRI networks arise from subject motion. Neuroimage 59, 2142-2154.

Power, J.D., Barnes, K.A., Snyder, A.Z., Schlaggar, B.L., Petersen, S.E., 2012. Steps toward optimizing motion artifact removal in functional connectivity MRI; a reply to Carp. Neuroimage.

Saad, Z.S., Gotts, S.J., Murphy, K., Chen, G., Jo, H.J., Martin, A., Cox, R.W., 2012. Trouble at rest: how correlation patterns and group differences become distorted after global signal regression. Brain Connect 2, 25-32.

Satterthwaite, T.D., Wolf, D.H., Loughead, J., Ruparel, K., Elliott, M.A., Hakonarson, H., Gur, R.C., Gur, R.E., 2012. Impact of in-scanner head motion on multiple measures of functional connectivity: Relevance for studies of neurodevelopment in youth. Neuroimage 60, 623-632.

Schroeder, C. E., & Lakatos, P. (2009). Low-frequency neuronal oscillations as instruments of sensory selection. Trends in neurosciences, 32(1), 9–18. doi:10.

Smith, AM, Lewis, BK, Ruttimann, UE, Ye, FQ, Sinnwell, TM, Yang, Y, Duyn, JH, & Frank, JA. 1999. Investigation of low frequency drift in fMRI signal. Neuroimage, 9, 526–33.

Thomas, C.G., Harshman, R.A., Menon, R.S., 2002. Noise reduction in BOLD-based fMRI using component analysis. NeuroImage 17 (3), 1521–1537.

Van Dijk, K.R., Sabuncu, M.R., Buckner, R.L., 2012. The influence of head motion on intrinsic functional connectivity MRI. Neuroimage 59, 431-438.

Wager, T.D., Hernandes, L., Jonides, J., and Lindquist, M., Elements of Functional Neuroimaging. In Cacioppo, J.T., Tassinary, L.G., and Berntson, G.G., (2007) Handbook of Psychophysiology, Third Edition.

Weissenbacher, A., Kasess, C., Gerstl, F., Lanzenberger, R., Moser, E., Windischberger, C., 2009. Correlations and anticorrelations in resting-state functional connectivity MRI: a quantitative comparison of preprocessing strategies. Neuroimage 47, 1408-1416

Windischberger, C., Langenberger, H., Sycha, T., Tschernko, E.M., Fuchsjager-Mayerl, G., Schmetterer, L., Moser, E., 2002. On the origin of respiratory artifacts in BOLD-EPI of the human brain. Magn. Reson. Imaging 20, 575–582.

Yan, C., Liu, D., He, Y., Zou, Q., Zhu, C., Zuo, X., Long, X., et al. (2009). Spontaneous brain activity in the default mode network is sensitive to different resting-state conditions with limited cognitive load. PLoS ONE, 4(5), e5743.

Zang, Y.-F., He, Y., Zhu, C.-Z., Cao, Q.-J., Sui, M.-Q., Liang, M., Tian, L.-X., et al. (2007). Altered baseline brain activity in children with ADHD revealed by resting-state functional MRI. Brain & development, 29(2), 83–91.

Zuo, X.-N., Di Martino, A., Kelly, C., Shehzad, Z. E., Gee, D. G., Klein, D. F., Castellanos, F. X., et al. (2010). The oscillating brain: complex and reliable. Neuroimage, 49(2), 1432–1445.