fNIRS machine learning, with the modality taken seriously

The model canvas is the same one EEG uses. What changes for fNIRS is which features carry information at 10 Hz, how the chromophore enters the design matrix, and how little a small cohort forgives a bad split.

fNIRS classification is not EEG classification with a different file extension. The sampling rate is an order of magnitude lower, the response is slow and haemodynamic rather than fast and electrical, the confounds are systemic rather than muscular, and cohorts are usually smaller.

BCILattice runs fNIRS through the same ML Suite canvas as EEG — 119 blocks covering classical models, deep architectures, domain adaptation and evaluation — but the design matrix reaching that canvas is built by chromophore-aware analysis steps, and the evaluation guardrails matter more here, not less.

Which features are worth extracting at 10 Hz

High-frequency feature families that carry EEG information have nothing to describe in a 10 Hz haemodynamic signal. What tends to survive is the slow structure: time-domain shape statistics over the response window, band power in the vlf and hemodynamic bands, and connectivity between optode pairs.

All 71 families remain available — the software does not decide for you — but the working default of one strong, cheap family per domain is a better starting point than switching everything on and asking a small cohort to support thousands of columns.

Chromophore is a modelling decision, not a preprocessing detail

Extracting features over All chromophores doubles the column count and puts two different physiological signals into the same matrix. Extracting over HbO alone is the common choice and halves the dimensionality; extracting both separately and comparing is the honest version of the question.

Because the chromophore control sits on the analysis step rather than being buried in an import setting, which choice was made is part of the study record.

Small cohorts punish a bad split harder

With twelve subjects, a random trial-level split can put the same subject on both sides of every fold, and the resulting accuracy describes subject identity rather than the task. A grouped split — subject wholly in train or wholly in test — is the only version that answers the question you asked.

It will score lower. The Results validation tab infers the grouping from the run and states which comparisons the design supports, so the lower number arrives with the reason attached.

Models that fit the data you have

  • Start classical

    SVM, random forest and the Riemannian family over covariance features are realistic first models for a cohort of tens rather than thousands of trials.

  • Sequence models

    LSTM, BiLSTM, GRU, TCN and Mamba suit the slow temporal structure of a haemodynamic response better than an architecture designed for fast oscillations.

  • Deep, with care

    EEGNet-family architectures are available and can be applied to fNIRS, but a deep model on a small cohort needs the nested evaluation more than it needs the capacity.

  • Cross-subject

    Domain adaptation blocks — CORAL, MMD, TCA, DANN, subject adaptation — address the between-subject variability that makes fNIRS models transfer poorly.

Questions

Can I classify fNIRS without deep learning?

Yes, and for most cohort sizes you should start there. Band power and time-domain shape features into an SVM or a Riemannian classifier is a strong, fast baseline that a deep model then has to beat.

Should I use HbO, HbR, or both?

HbO alone is the common choice and keeps the design matrix half the size. Using both doubles the columns and mixes two physiological signals unless you model them separately. The control is on the analysis step, so whichever you choose is recorded.

Why does my cross-subject accuracy collapse?

Between-subject variability in optode placement, coupling and physiology is large in fNIRS. That is the problem the domain adaptation blocks exist for — align the source and target distributions rather than expecting a within-subject model to transfer.

Is the ML canvas different for fNIRS?

No, it is the same canvas and the same 119 blocks. What differs is the design matrix that reaches it, which is built by chromophore-aware, correctly-sampled analysis steps upstream.

Read the reference

Related

Run a study end to end, on your own machine

The free plan covers two studies, the full analysis suite, and 118 of the 119 ML blocks.