Day 2 · Modeling, connectivity, and ICA

Day 2Session 2.2Wager0:30 hLecture

GLM filtering and nuisance regressors

This session surveys the main sources of noise in fMRI time series (scanner drift, spikes, physiological fluctuations, head motion) and the post-acquisition tools for removing them: high-pass filtering, outlier indicator regressors, physiological models, and motion covariates. It uses a real conditioning dataset to show how task-correlated motion produces implausible results, discusses the trade-offs of scrubbing, and frames covariate selection as a causal-inference decision. Practical tools in SPM and CANlab are described.

Take-aways

  • Removing known noise (high-pass filtering, motion and spike regressors, physiological models) helps far more than modeling the residual noise structure.
  • Choose the high-pass cutoff relative to the design's longest periodicity and check how much contrast variance an event-related design loses.
  • Task-correlated motion does not average out at the group level; include motion covariates and outlier indicators, scrub sparingly, and reason causally about which covariates to add.

Key terms

  • high-pass filter
  • discrete cosine basis
  • 1/f noise
  • Nyquist limit
  • aliasing
  • RETROICOR
  • nuisance regressor
  • 24-parameter motion model
  • scrubbing
  • collider bias
Low-frequency drift fit and its separation from task signal
Low-frequency drift fit and its separation from task signal. Lecture 2.2 slides (Wager)

Outline

What the session covers

01Sources and consequences of noise

  • Scanner instability: slow drift over time and transient spikes or gradient artifacts.
  • Physiological noise: heartbeat, respiration, and head movement, which interact with the magnetic field and cause artifacts.
  • Thermal noise is inherent signal instability but is much smaller than the first two sources.
  • Consequences: reduced power, artifacts and bias, and violation of the independence assumption, so single-subject p-values are invalid without a noise model.
  • Two strategies: model and remove noise (high-pass filtering, physiological regressors) or model the noise structure (autocorrelation, multilevel models); the first helps much more.
  • Ciric et al. 2018 review many approaches to motion mitigation in connectivity, including movement-related regressors.

02Nuisance covariates and drift

  • The GLM Y = X beta + noise has an error covariance V whose form depends on the noise model.
  • Nuisance regressors capture known variance unrelated to the hypothesis: drift, physiological artifacts, and head motion.
  • Motion is typically six regressors (three translations, three rotations), sometimes with transformations added.
  • Drift is slow low-frequency change seen even in cadavers, so scanner instability rather than motion is the main cause.
  • Model drift with splines, polynomial bases, or a discrete cosine basis (the approach behind SPM high-pass filtering).
Convolved regressors for two conditions with event onsets
Convolved regressors for two conditions with event onsets. Lecture 2.2 slides (Wager)
Axial montage of task activation before nuisance filtering
Axial montage of task activation before nuisance filtering. Lecture 2.2 slides (Wager)

03High-pass filtering and choosing a cutoff

  • Typical noise is 1/f: most variance sits at low frequencies (slow drift).
  • High-pass filtering removes variation below a cutoff; the SPM default is 128 s (0.0078 Hz).
  • A 16 s on/off block design oscillates at a 32 s period (0.031 Hz), above the cutoff, so filtering removes noise but keeps signal.
  • Random event-related designs spread variance across frequencies; in the example an 80 s (0.0125 Hz) filter removed about 12% of contrast variance.
  • Rule of thumb: twice the longest periodicity in the design plus 20-30 s for safety, since real physiological signals are irregular.
  • For event-related designs, inspect the effect of the filter on regressors and especially contrasts, and do not remove too much.

04Spikes, physiological noise, and aliasing

  • Transient gradient artifacts appear as bright bands in individual slices; detect outliers via the global mean and successive differences (RMSSD).
  • Model flagged volumes with one indicator regressor per bad image.
  • Respiration and heartbeat are periodic and often alias into task frequencies; they are hard to remove and contribute to autocorrelation.
  • Nyquist limit: signals above half the sampling rate alias to lower frequencies; at TR = 2 s anything above 0.25 Hz aliases.
  • A realistic heartbeat at TR = 1 s aliases into low frequencies; avoiding most aliasing would require TR under 500 ms.
  • RETROICOR and RVHRCOR (Glover 2000; Chang and Glover 2009) model cardiac and respiratory phase, respiration volume, and heart rate.
Discrete cosine high-pass filter basis alongside a box-car task
Discrete cosine high-pass filter basis alongside a box-car task. Lecture 2.2 slides (Wager)

05Head motion: covariates, scrubbing, and a case study

  • Realignment corrects position but not field changes and spin-history artifacts induced by motion.
  • Solutions: nuisance regressors (movement and global CSF covariates) or scrubbing (dropping high-motion images as missing data).
  • A 24-covariate motion model: centered parameters, their squares, successive differences, and squared differences (Lund et al. 2006).
  • CS+ vs. CS- shock conditioning (N = 25): task-correlated motion and spikes did not average out and produced implausible whole-brain activation or deactivation.
  • Diagnostic: histograms of contrast values across the brain per subject should be roughly mean zero and on the same scale (fmri_data.plot).
  • Adding motion covariates with squares and derivatives plus spike regressors removed implausible ventricle deactivation and revealed the expected cingulate pattern.

06To scrub or not, when to control, and practical tools

  • Scrubbing concerns: data missing not at random, altered error distribution and autocorrelation, interpolation ignored in degrees of freedom, and no ground truth.
  • A matter of degree: removing about 1-3% of images via nuisance regressors is typical; lenient censoring produced better parcellations than strict censoring in recent work.
  • Covariate choice requires causal reasoning: adjust for confounders (back-door paths), generally not for mediators, descendants of mediators, or colliders.
  • Controlling for a collider opens a spurious path (collider bias); global signal regression is one example.
  • CANlab tools: movement_regressors() and fmri_data.outliers() flag outliers from global mean, missing values, RMSSD (dvars), Mahalanobis distance, and framewise displacement.
  • fmri_data.denoise_timeseries_pipeline removes motion, run intercepts, outliers, and filter effects at once, since sequential removal can reintroduce artifacts (Lindquist et al. 2019).
Colored white-matter fiber tract renderings from multiple views — Lecture 2.9 slides (Wager)

From the instructors' research

Related figures

Examples of these concepts in published work by the course instructors.

Genetic algorithm crossover and design-matrix construction for fMRI designs
Genetic algorithm crossover and design-matrix construction for fMRI designs. Wager & Nichols (2003), NeuroImage