Removal of Physiological Noise from FMRI Data

A couple of weeks ago, as I wrapped up the series on resting-state analyses, one of my alert readers asked whether I would be willing to go through a demonstration of removing physiological artifacts - for example, breathing, heart rate, sweating, growth of nasal hair, etc. - in other words, all of those things necessary for life that nevertheless can interfere with FMRI analyses.

Unfortunately, I do not have any breathing or heart rate data available, so I cannot adequately demonstrate what this looks like. In fact, in this post I'm not even going to explain it very concretely; I'm simply going to describe what my comes to mind when someone talks about removing physiological signals - to take you by the hand and guide you through my thought process. This may leave you unsatisfied, and you may have legitimate quarrels with my reasoning. However, it is also an opportunity to show how I think through things, which you may find helpful when tackling your own problems, or when evaluating how much you should trust my explanations on other matters.

Let's say that we had just collected an FMRI dataset along with respiratory and heart rate data. My advisor then calls me to his office, and tells me to figure out how to remove these sources of variance from the neuroimaging data. Failure to do so will result in receiving a vasectomy with a weed-whipper. After considering several ways to leave graduate school and finally concluding that it would not be feasible, the first thing that would come to mind is how to model these additional data.

Keep in mind that everything that you collect in an imaging experiment - well, almost everything - can be modeled. When we talk about creating a model in FMRI, often we mean including our regressors of interest, and inserting other sources of variance, such as head motion, into the model as "nuisance" regressors. This is not always an apt distinction, as it matters what you are interested in, and how you intend to model your data. Typically we convolve our regressors of interest with a gamma-shaped waveform, because we assume that whatever area of the brain is sensitive to that condition or stimulus will show a corresponding wave in MRI signal. However, in the case of head motion, or nuisance regressors, we don't convolve these regressors with anything; we simply enter them into the model as they are, one value per timepoint. My first thought would be to do something similar with any respiratory or heart rate data, and possibly resample it to be on the same timescale as the neuroimaging data. A few options available within AFNI come to mind, such as 1dUpsample and the stim_files option in 3dDeconvolve, that would allow entering this physiological data into the model.

However, upon further research I find that there is a function specifically built for removal of such artifacts, 3dretroicor, and that cardiac and respiratory data can be entered separately or together. I then look into programs such as, which can automatically generate the appropriate code to place this command where it belongs; and, notwithstanding reading up on the options within 3dretroicor and some of the original literature it is based on, my search is finished. I and my vas deferens can rest easily.

This may all seem an indirect, roundabout way of doing things; and you may say that it would be more efficient and straightforward to do an online search for the terms of my problem, to look through the AFNI message boards perhaps, and then be done with it. That is doubtless true is many cases. However, I would still have questions about what exactly is being done to the data at what step; and, in the present case, if the nuisance data is not being modeled, how it is being removed or filtered out of the imaging data. Then there are further issues about how this compounds with other processing steps, and what other precautions must be taken; and the list could go on. In any case, the user needs to know what is being done, and why.

For example, would there ever be any case where one would want to resample physiological data to the same timegrid as the imaging data, and remove it that way? Other physiological responses, such as galvanic skin response (GSR; broadly speaking, the amount of sweat secreted on the palms) can also be measured and inserted into a model, sometimes as parametric modulators if they are thought to capture any information beyond what the regressors provide; would this ever be appropriate in the case of breathing or heart rate measurements? Or does the slower periodicity of breathing and heart rate make only certain methods of modeling appropriate, but not others?

In the case of heart rate and breathing data, I can't say, because I haven't analyzed any; however, the question of what to do with it is an important one, and what is outlined above is a rough sketch of what I would think when presented with that problem. You can put away the weed-whipper now.