Introduction to fNIRS Signal Quality Steps
Introduction to fNIRS
0% Completed

Signal Quality, Pruning, and Motion Artifacts

No fNIRS dataset is uniformly good. Some channels never had good contact with the scalp, some periods were disrupted by a sneeze or a turn of the head, and some participants gave data that are noisy from beginning to end. Every analysis therefore has to decide what to do with data of poor quality: keep them, repair them, or remove them. These decisions are often treated as routine cleaning, made quickly and reported in a sentence, yet they can shape the results of a study as much as the statistical model that comes after them.

In this lesson, we look at how data quality is assessed, at the different levels at which data can be removed (a step commonly called pruning), and at the trade-off that every pruning decision involves: removing noisy data increases statistical power, but removing data selectively can bias what you conclude, and about whom. We then turn to motion artifacts, the most common reason for poor data in fNIRS, describe the main families of methods used to correct them, and spend some time on what these methods cannot do. As in the rest of this unit, our goal is not to recommend a particular method but to help you understand what each choice does to your data.

1. What Poor Data Look Like

Problems with fNIRS data have a small number of physical causes, and each leaves a recognizable signature in the raw intensities. In Lesson 4.2, we used these signatures to fix problems during setup; after the recording, the same signatures are used to decide which data can be trusted. The table summarizes the most common ones.

Problem Typical cause Signature in the data
Too little light Hair under the optode, poor contact, long separation, dark skin with a weak source Low intensity compared with channels of the same separation; no visible heartbeat; high relative noise
Too much light Short separation with high gain, light leaking between optodes, ambient light Intensity flat at the maximum value of the detector (saturation)
Movement of the optode Head movement, talking, jaw clenching, frowning, cable tension Sudden spikes, step changes in the baseline, or slow shifts, often in several channels at once
Slow drift Instrument warm-up, gradual loosening of the cap, slow physiological changes A trend over minutes that is unrelated to the task

Six simulated raw intensity traces: good contact, too little light, saturation, a motion spike, a baseline shift, and a slow drift

Figure 1. Signatures of good and poor data in raw intensity (simulated). A channel in good contact shows a clear cardiac pulsation. Too little light buries the pulsation in noise; saturation clips the signal at the detector maximum; movement produces spikes and baseline shifts; slow drifts appear over minutes.

To decide systematically, most pipelines compute one or more quality metrics for each channel, such as the mean intensity, the strength of the cardiac pulsation at both wavelengths (the idea behind the scalp coupling index of Lesson 4.2), or the variability of the signal relative to its mean (its coefficient of variation). It is worth keeping in mind that these metrics describe a continuum: there is no natural boundary between a good channel and a bad one. A pruning rule, however, turns that continuum into a binary decision by setting a threshold, and the choice of that threshold is one of the decisions this lesson is about.

2. Three Levels of Pruning

Data can be removed at three levels, and each has different consequences. At the level of channels, a channel whose quality metrics fall below the threshold is excluded from the analysis for that participant. This is the most common form of pruning, and its consequence is easy to overlook: different participants lose different channels, so every channel in a group analysis is based on a different subset of participants, and a region-of-interest average may combine different channels for different people. A channel that is often pruned, for example over a region with dense hair, ends up being estimated from fewer participants, and from a different kind of participant, than its neighbors.

At the level of trials or time segments, periods affected by artifacts are removed, usually after motion detection (Section 4). This preserves the rest of the recording, but it reduces the number of trials, and the reduction is rarely the same in every condition. At the level of participants, a whole dataset is excluded, typically when too many channels or trials have been lost for the remaining data to be meaningful. Participant exclusion has the most direct effect on the composition of the sample, and it is the one most often required by the design of the study, but it is also the one that most needs to be justified and reported.

3. The Trade-Off: Power versus Bias

Why prune at all? Because noisy data reduce your ability to detect an effect. A channel with no real signal contributes only noise to an average, and a single participant with very noisy estimates can inflate the variance of a group and hide an effect that is present in everyone else. Removing such data increases statistical power, the probability of detecting an effect that exists. But pruning also removes information, and beyond a certain point the loss of data outweighs the gain in quality: with too few channels, trials, or participants, power falls again. There is therefore a best level of pruning for power, somewhere between keeping everything and keeping only perfect data.

Power is only half of the story. The other half, which researchers consider much less often, is bias. Pruning is harmless for bias only if data quality is unrelated to the response you are measuring. When the reasons for poor data are related to the participants, to the conditions, or to the response itself, pruning changes what you estimate. Some common situations in fNIRS:

  • Participant characteristics. Dense, dark, or curly hair and darker skin reduce the detected light (Lesson 4.2), so quality thresholds exclude these participants more often. The sample that remains no longer represents the population, and if any characteristic associated with exclusion also relates to the response (age, for example, or a clinical condition), the group estimate is biased as well.
  • Group differences. Infants, young children, older adults, and many clinical groups move more or have different head anatomy. If one group loses more data than another, the comparison between them is made on samples selected differently.
  • Task-locked artifacts. If one condition involves speaking, moving, or emotional arousal, its trials are more likely to be rejected for motion. The trials that survive may be those in which the participant spoke less or engaged less with the task, and the conditions are then compared on different kinds of trials.

Figure 2 illustrates both sides of the trade-off with a simulated group study. As the exclusion threshold becomes stricter, power first increases, because the noisiest participants are removed, and then decreases, as the sample shrinks. At the same time, a subgroup whose data tend to be of lower quality disappears from the sample, and, because in this simulation its true response is somewhat smaller, the group estimate drifts away from the true population value. Notice that the threshold that maximizes power is already well into the region where the sample has changed: optimizing power alone does not protect you from bias.

Two panels from a simulated group study: statistical power first rises then falls as the exclusion threshold becomes stricter, while a lower-quality subgroup disappears from the sample and the group estimate becomes biased

Figure 2. The pruning trade-off in a simulated study of 40 participants, 30% of whom belong to a subgroup (B) whose data are of lower quality on average and whose true response is smaller. Participants are excluded when a quality score falls below a threshold. (a) Power rises from about 75% to about 97% as the noisiest participants are removed, then falls as too few remain. (b) At the same time, subgroup B shrinks from 30% to a few percent of the sample, and the group estimate becomes biased. At the threshold of best power, the estimate is already about 8% too high. Values are illustrative; the shape of the trade-off, not the numbers, is the point.

There is no threshold that removes this trade-off, but there are practices that make it visible and limit its consequences. Define the quality metrics and thresholds before looking at the results, and if possible register them in advance. Apply them without knowing the condition or group of each dataset. Report how many channels, trials, and participants were removed, separately for each group and condition, and check whether exclusion is associated with participant characteristics. Repeat the main analysis with a more lenient and a stricter threshold: a conclusion that survives both is more convincing than one that depends on a single choice. Finally, where possible, prefer methods that give noisy data less weight to methods that remove them entirely; we will see in Lesson 5.3 that statistical models can do this.

💭 Pause and Think

A study compares children with and without attention-deficit/hyperactivity disorder during an inhibition task. Because the children in the clinical group move more, 35% of their trials are rejected for motion, against 10% in the control group. The analysis finds a weaker prefrontal response in the clinical group. What alternative explanations should be ruled out before interpreting this difference, and what analyses would help?

Think about the number of trials left in each group, which trials are likely to survive rejection, whether motion itself could be related to how the children performed the task, and how the result changes with different rejection criteria.

4. Motion Artifacts and How They Are Handled

Motion artifacts are the most common reason for poor fNIRS data, and they are a direct consequence of how the measurement works. The intensity detected by a channel depends strongly on how each optode couples light into and out of the scalp (Lesson 5.1). When an optode shifts, tilts, or loses contact, even by a fraction of a millimeter, the coupling changes, and the detected intensity can change by far more than the 1% or so produced by brain activity (Lesson 4.1). Depending on the movement, the result is a brief spike, a step to a new baseline that persists after the movement, or a slow shift as the cap settles. Because a movement usually displaces several optodes at once, artifacts often appear in many channels simultaneously, and they affect both wavelengths in a similar way, which is very different from how the brain changes HbO₂ and HbR.

Handling motion artifacts usually involves two steps. The first is detection: identifying the periods affected, typically by looking for changes in amplitude or rate of change that exceed what physiology could produce, or by using the signal of an accelerometer on the cap (Lesson 4.2). The second is deciding what to do with the detected periods: reject them, by removing the affected trials or segments (the pruning discussed above), or correct them, by estimating the artifact and removing it from the signal. Correction keeps more data, which helps power and avoids some of the selection problems of rejection, but it relies on assumptions about what an artifact looks like. The main families of correction methods differ in those assumptions.

Family of methods Key idea What it assumes
Segment fitting Fit a smooth curve to each detected artifact segment, subtract it, and realign the segments that follow That artifacts have been detected correctly and are slower or larger than the signal of interest
Multiscale decomposition Decompose the signal into components at different time scales (for example, with wavelets) and remove the components that are outliers That artifacts are brief and rare enough to stand out as outliers
Robust statistics Down-weight sample-to-sample changes that are much larger than usual, using statistics that are not dominated by outliers That most of the recording is free of artifacts
Spatial components Identify patterns shared by many channels (for example, with principal component analysis) and remove the largest ones That the artifact, not the brain response, dominates the shared variance
Physiological models Use the expected relation between ΔHbO₂ and ΔHbR, which tend to change in opposite directions in the brain but in the same direction during motion That the brain response follows this textbook relation (Unit 3)
Reference signals Regress out an independent record of the motion, such as an accelerometer or a short-separation channel That the reference captures the artifact as it appears in each channel

Each family has many implementations, usually with parameters that control how aggressive the correction is, and new variants continue to appear. Methods are also often combined, for example by detecting artifacts first and then correcting only the detected segments. For an introductory course, the important point is not which method is best, which depends on the data and on the type of artifact, but that every method replaces part of the measured signal with an estimate based on its assumptions.

🔬 Going Deeper: How Do We Know a Correction Works?

In real data, the true brain response is unknown, so it is hard to tell whether a correction removed an artifact or part of the response. The most common way around this is to create data with a known answer: a synthetic response of known shape and amplitude is added to real recordings that contain genuine artifacts and physiology (for example, resting data), and each method is judged by how well it recovers the response that was added. Comparisons of this kind have been useful, but their conclusions depend on the type of artifact, the task, and the population in the test data. A method that performs well on adults sitting still with occasional head turns may not perform as well on infants, on speech tasks, or on participants walking. When you choose a method, ask whether it has been tested on data like yours.

5. What Motion Correction Cannot Do

Motion correction is useful, but its limits are easy to forget once the corrected signals look clean. The first limit is the information content of the data. Correction can remove the effect of a change in coupling, but it cannot recover light that was never detected: a channel that lost contact, or that saturated during a movement, carries no information about the brain during that period, and any corrected value is an interpolation. As in Lesson 4.2, the most effective motion correction remains a well-fitted cap and a comfortable participant.

The second, and more serious, limit is task-locked motion. When movement happens at the same time as the task, as in speaking, swallowing, pressing a button with force, or moving the head to look at a stimulus, the artifact and the brain response overlap in time, and often in shape. A method that removes the artifact will tend to remove part of the response, and a method that preserves the response will tend to leave part of the artifact. No algorithm can separate two signals that have the same timing without additional information, which is why independent references, such as accelerometers and short-separation channels, are so valuable in tasks with movement, and why a well-matched control condition (Lesson 4.2) is the best protection.

The third limit concerns methods that rely on physiological assumptions. A correction that enforces the expected opposite changes of HbO₂ and HbR will produce data that follow that pattern, whether or not the brain did. This can be appropriate in some studies, but it makes the corrected data unsuitable for asking whether the response follows the textbook pattern, which, as we saw in Lesson 3.2, is a useful expectation rather than a rule. The general rule is that a processing step should not assume what the analysis is meant to test.

⚠ A Common Mistake to Avoid

With many quality metrics, thresholds, correction methods, and parameters to choose from, it is tempting to try several combinations and keep the one that “cleans the data best,” judged by how clear the final result looks. This turns preprocessing into a hidden search for significance: across enough combinations, some will produce an effect by chance, and the reported result will not replicate.

Choose the pipeline using criteria that do not depend on the effect of interest, such as data quality metrics or performance on a separate dataset, fix it before analyzing the main contrast, and report any alternatives you tried.

💭 Pause and Think

In a picture-naming study, participants name each picture aloud. After motion correction, the response over the left inferior frontal cortex is clear in some participants and absent in others, and the participants with the clearest responses are those whose raw data showed the largest artifacts during speech. How would you interpret this pattern, and what would you check?

Think about task-locked motion, what the correction might have left behind or added, the information that short-separation channels or an accelerometer could provide, and how a control condition with speech but without naming would help.

6. Reporting Quality Decisions

Because quality decisions can change both the power and the conclusions of a study, readers need enough information to evaluate them. At a minimum, a methods section should state which quality metrics were used and with which thresholds, how motion artifacts were detected and handled, with the method and its parameters, and how many channels, trials, and participants were excluded, broken down by group and condition. When participants were excluded, describing their characteristics, including, where relevant, hair type and skin tone (Lesson 4.2), allows readers to judge whether the final sample represents the intended population. These items are part of the community’s reporting recommendations, which we discuss in Lesson 5.6. In the next lesson, we turn to what happens once the data have been cleaned: separating the brain response from systemic physiology and testing hypotheses about it.


📌 Key Takeaways

  • Poor data have recognizable signatures: too little light, saturation, motion spikes and steps, and slow drifts. Quality metrics describe a continuum; thresholds turn it into binary decisions.
  • Pruning happens at three levels: channels, trials or segments, and participants. Each changes the data available for the analysis differently.
  • Pruning trades power against bias. Removing noisy data first increases and then decreases power, and when data quality is related to participants, groups, or conditions, it changes who and what is studied.
  • Define criteria in advance, apply them blind to condition and group, report exclusions by group and condition, and check that conclusions hold across thresholds.
  • Motion artifacts come from changes in optode coupling and are much larger than brain signals. They are handled by detection, then rejection or correction; correction families differ in their assumptions about what an artifact looks like.
  • Correction cannot recover lost light, cannot separate task-locked motion from the response without independent references, and should not assume what the analysis is meant to test.

📚 Further Reading & Key References

  1. Kwasa, J., Peterson, H.M., Karrobi, K., et al. (2023). “Demographic reporting and phenotypic exclusion in fNIRS.” Frontiers in Neuroscience, 17, 1086208. [doi] — How data quality criteria can exclude participants with particular hair types and skin tones, and why exclusions should be reported.
  2. Yücel, M.A., Lühmann, A.v., Scholkmann, F., et al. (2021). “Best practices for fNIRS publications.” Neurophotonics, 8(1), 012101. [doi] — The community’s recommendations for reporting quality control, pruning, and motion correction, among other steps.

Society for Functional Near-Infrared Spectroscopy.
Content is for educational purposes.