mne-tools / mne-tools/mne-python
New Code Proposal: Add `ARMBR` blink artifact removal method to `mne.preprocessing`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
Describe the new feature or enhancement
I propose adding a new blink artifact removal method called Artifact-Reference Multivariate Backward Regression (ARMBR) to the mne.preprocessing module.
Key features:
-Removes blinks via multivariate linear regression using a binarized blink reference
-Works with minimal training data
-Requires no EOG channels
-Supports both offline and real-time/BCI pipelines
-Fully integrated with MNE: .fit(), .apply(), and .plot() methods using Raw objects
This method is described in the paper:
Alkhoury, L., Scanavini, G., Louviot, S., Radanovic, A., Shah, S. A., & Hill, N. J. (2025). Artifact-reference multivariate backward regression (ARMBR): A novel method for EEG blink artifact removal with minimal data requirements. Journal of Neural Engineering, 22(3), 036048. https://doi.org/10.1088/1741-2552/ade566
The code is MNE-compatible and includes:
-A class ARMBR for MNE pipelines
-Full test coverage using mne.datasets.sample
-Documentation and plotting utilities
-Example scripts for integration
I am happy to submit this toolbox as a PR for inclusion in mne.preprocessing.
Thanks for considering this contribution!
Describe your proposed implementation
The proposed feature would be implemented as a new class called ARMBR, located in the mne.preprocessing module (e.g., mne/preprocessing/armbr.py), similar to the structure used for ICA and rASR.
The class would expose the following methods:
-.fit(raw, ...): trains the projection matrix using EEG segments from raw data
-.apply(raw, ...): applies blink artifact suppression to the raw data in-place
-.plot(): visualizes EEG on before/after suppression
-.plot_blink_patterns(): visualizes spatial blink components via topomap
In addition:
-The class is fully compatible with MNE Raw objects and uses Annotations (e.g., armbr_fit) to define training segments.
-The underlying core function run_armbr() will be included in the same module for modular use.
-A dedicated test file (test_armbr.py) using MNE's sample dataset is included.
Let me know if the maintainers prefer a different naming convention or integration strategy.
Describe possible alternatives
A similar implementation is available in the GitHub repository (https://github.com/S-Shah-Lab/ARMBR) that accompanied the original publication of the paper. The proposed integration refactors that version to align with MNE’s coding standards, interface conventions, and documentation style.
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the proposed mne/preprocessing/armbr.py class with the existing ICA and rASR structure, then review the ARMBR repository and paper. Use the proposed test_armbr.py with mne.datasets.sample; done should include the stated fit, apply, plotting, documentation, examples, and test coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100