[Paper] Cedalion Tutorial: A Python-based framework for comprehensive analysis of multimodal fNIRS & DOT from the lab to the everyday world

Published: (January 9, 2026 at 11:37 AM EST)
4 min read
Source: arXiv

Source: arXiv - 2601.05923v1

Overview

The paper introduces Cedalion, an open‑source Python framework that brings together every step of functional near‑infrared spectroscopy (fNIRS) and diffuse optical tomography (DOT) analysis—from raw signal cleaning to advanced machine‑learning (ML) models—under a single, reproducible workflow. By aligning with community standards (SNIRF, BIDS) and modern DevOps practices, Cedalion aims to make wearable neuroimaging pipelines as easy to share and scale as any other data‑science project.

Key Contributions

  • Unified Python stack for forward modelling, optode co‑registration, preprocessing, GLM analysis, DOT image reconstruction, and ML‑driven inference.
  • Standard‑compliant I/O (SNIRF, BIDS) that guarantees interoperability with existing neuroimaging tools.
  • Containerized, cloud‑ready pipelines (Docker + Jupyter) enabling one‑click reproducibility across local machines, HPC clusters, or SaaS platforms.
  • Seamless bridge to ML ecosystems (scikit‑learn, PyTorch, TensorFlow) for multimodal fusion with EEG/MEG, physiological signals, or synthetic data.
  • Automated documentation & CI testing that links each function to its original publication and continuously validates the code base.
  • Seven end‑to‑end tutorial notebooks that walk users through realistic use‑cases, from motion‑artifact correction to 3‑D DOT reconstruction.

Methodology

Cedalion is built as a modular Python package that follows a pipeline‑as‑code philosophy:

  1. Data Ingestion – Reads raw fNIRS/DOT files (SNIRF) and optional BIDS metadata.
  2. Optode Co‑registration – Uses photogrammetry (e.g., OpenCV‑based point cloud alignment) to map sensor locations onto a subject‑specific head model.
  3. Signal‑Quality & Motion Correction – Implements validated algorithms (e.g., wavelet filtering, spline interpolation) with quality metrics that can be logged automatically.
  4. Statistical Modeling – Provides a General Linear Model (GLM) interface that mirrors SPM/FSL conventions, supporting event‑related designs and HRF basis functions.
  5. DOT Image Reconstruction – Leverages a forward model (Monte‑Carlo photon migration) and inverse solvers (Tikhonov, TV regularization) to generate 3‑D absorption maps.
  6. Machine‑Learning Layer – Exposes preprocessed time‑series or reconstructed volumes as NumPy/PyTorch tensors, ready for classification, regression, or deep‑learning pipelines.
  7. Execution & Reproducibility – Pipelines are expressed as Jupyter notebooks that can be launched locally or via a Docker image; a CLI wrapper enables batch processing on cloud services.

All steps are orchestrated through a configuration object (YAML/JSON) that captures parameters, versioned dependencies, and provenance metadata, making the entire analysis auditable.

Results & Findings

  • Benchmarking against existing tools (Homer2, NIRS‑SPM) showed Cedalion’s preprocessing pipeline reduced motion‑artifact variance by ~15 % while preserving task‑related hemodynamic responses.
  • DOT reconstruction accuracy (measured by simulated ground‑truth phantoms) improved by 8 % in spatial resolution when using Cedalion’s integrated Monte‑Carlo forward model versus legacy analytical approximations.
  • ML integration demo: A convolutional neural network trained on reconstructed DOT volumes achieved 82 % accuracy in classifying a simple motor‑imagery task, comparable to state‑of‑the‑art EEG‑only models but with fewer electrodes.
  • Reproducibility test: The same notebook executed on three different environments (local laptop, AWS SageMaker, Google Colab) produced identical results (Δ < 1e‑6), confirming the robustness of the containerized workflow.

Practical Implications

  • Rapid prototyping for wearables – Developers can spin up a full fNIRS/DOT analysis pipeline in minutes, enabling quick iteration on sensor placement, signal‑quality algorithms, or AI models.
  • Cross‑modal research – By exposing data as standard tensors, Cedalion lets data scientists fuse optical data with EEG, eye‑tracking, or physiological streams using familiar ML libraries.
  • Regulatory‑grade reproducibility – The built‑in provenance tracking and BIDS compliance simplify the creation of audit trails required for clinical trials or FDA submissions.
  • Scalable cloud deployment – Container images and Jupyter‑hub integration mean large‑scale studies (e.g., population‑level neuroimaging) can be run on demand without custom infrastructure.
  • Community extensibility – Plug‑in architecture encourages contributions of new forward models, regularization schemes, or domain‑specific ML heads, fostering an ecosystem similar to PyTorch‑Lightning or scikit‑learn.

Limitations & Future Work

  • Performance on ultra‑high‑density arrays – Current Monte‑Carlo forward simulations are computationally intensive; GPU‑accelerated versions are planned.
  • Real‑time capability – Cedalion focuses on offline batch processing; future releases aim to support streaming pipelines for closed‑loop neurofeedback.
  • Limited native support for non‑optical modalities – While data can be imported, deeper integration (e.g., joint source reconstruction with MEG) remains a roadmap item.
  • User onboarding – The framework assumes familiarity with Python scientific stack; upcoming tutorials and a low‑code GUI are slated to lower the entry barrier for clinicians and engineers.

Cedalion positions itself as the “one‑stop shop” for modern fNIRS/DOT research, bridging the gap between neuroimaging labs and the broader AI‑driven data‑science community. For developers looking to embed optical neuroimaging into wearable devices, clinical decision support, or multimodal AI pipelines, the framework offers a reproducible, extensible, and cloud‑ready foundation ready for today’s data‑centric world.

Authors

  • E. Middell
  • L. Carlton
  • S. Moradi
  • T. Codina
  • T. Fischer
  • J. Cutler
  • S. Kelley
  • J. Behrendt
  • T. Dissanayake
  • N. Harmening
  • M. A. Yücel
  • D. A. Boas
  • A. von Lühmann

Paper Information

  • arXiv ID: 2601.05923v1
  • Categories: eess.SP, cs.AI, cs.LG, eess.IV, q-bio.QM
  • Published: January 9, 2026
  • PDF: Download PDF
Back to Blog

Related posts

Read more »