Contextual Minimum-Norm Estimate (CMNE) inverse solver — deep-learning-corrected dSPM (Dinh et al. 2021). More...
#include "../inv_global.h"#include "../inv_source_estimate.h"#include "inv_cmne_settings.h"#include <Eigen/Core>#include <Eigen/Dense>

Go to the source code of this file.
Classes | |
| struct | INVLIB::InvCMNEResult |
| CMNE result. More... | |
| class | INVLIB::InvCMNE |
| CMNE inverse solver. More... | |
Namespaces | |
| namespace | UTILSLIB |
| Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms). | |
| namespace | INVLIB |
| Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting). | |
Contextual Minimum-Norm Estimate (CMNE) inverse solver — deep-learning-corrected dSPM (Dinh et al. 2021).
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
INVLIB::InvCMNE implements the CMNE algorithm of Dinh et al., Contextual Minimum-Norm Estimates: A Deep Learning Method for Source Estimation in Neuroimaging, 2021. The static compute method combines a closed-form dSPM kernel with an LSTM correction step that runs in ONNX Runtime: dSPM is computed first, the time-courses are z-scored and rectified, an LSTM consumes a sliding lookBack window of past time samples and outputs the contextual correction, and the final CMNE estimate is the LSTM-modulated dSPM. The trainLstm helper drives the Python training pipeline (scripts/ml/training/train_cmne_lstm.py) through UTILSLIB::PythonRunner so the full train-and-deploy cycle is reachable from C++ without leaving the mne-cpp process.
Definition in file inv_cmne.h.