MEEGNet: An open source python library for the application of convolutional neural networks to MEG

Read the full article See related articles

Listed in

This article is not in any list yet, why not save it to one of your lists.
Log in to save this article

Abstract

Artificial Neural Networks (ANNs) are rapidly gaining traction in neuroscience, proving invaluable for decoding and modeling brain signals from techniques such as electroencephalography (EEG) and functional magnetic resonance imaging (fMRI). Although these networks are beginning to find applications in magnetoencephalography (MEG), their use in this domain is still in the early stages. Here, we introduces MEEGNet, a novel Python library paired with an intuitive convolutional neural network (CNN) architecture designed primarily for MEG data, yet adaptable to EEG signals. The MEEGNet model was trained and cross-validated using MEG data from 643 participants across four classification tasks, including auditory and visual stimulus classification and age prediction. Our model achieves competitive performance across all tasks, with a notable balance of accuracy and efficiency—for instance, reaching 92.70% test accuracy in an auditory vs. visual classification task while maintaining shorter training times than other architectures. The MEEGNet pipeline also integrates latent space visualization tools, adapted for MEG and EEG data. These include saliency maps and Grad-CAM methods, which enhance the interpretability of ANN-based classification and help address the black-box critique of such models. Importantly, the MEEGNet library is designed for extensibility, allowing the neuroscience and machine learning communities to add functionalities and ANN models. By prioritizing usability, transparency, and interpretability, MEEGNet empowers MEG- and EEG-based research with a user-friendly and modular framework.

Article activity feed