mne-tools / mne-python

MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python
https://mne.tools
BSD 3-Clause "New" or "Revised" License
2.68k stars 1.31k forks source link

Decoding: Don't recommend highpass filtering for decoding approaches #10679

Open skjerns opened 2 years ago

skjerns commented 2 years ago

I recently stumbled across a paper by van Driel et al. (2021) that analyses highpass filtering for decoding approaches. It claims that highpass filtering introduces spurious findings and can artificially bloat accuracy scores due to temporal smearing/leakage of information. I tested this in our own decoding dataset and indeed, the higher our HP is, the better our accuracy scores become (sometimes even before stim-onset, indicating spurious information leakage). This is of special importance when making claims about temporal characteristics of the signal.

In i.e. this example for decoding, a rather high 2 Hz HP is used. I think it might be good to remove it from the example and mention the problem of using HP filtering for decoding. However, there might be reasons to keep it in the current form, and it would be premature to change the tutorials just based on this paper. What do you think?

Most of the examples use a HP filter: https://mne.tools/stable/auto_examples/decoding/index.html

cbrnr commented 2 years ago

This is only a problem if you want to do causal (online) classification. In these applications, you only have information up to a current time point, and our non-causal filters cannot be used in these scenarios. But unless you do not care about online classification or causality, we should probably use causal filters. I think it's not necessary to completely get rid of HP filters for this reason.