Skip to content

Numerical-precision CI check for fMRIPrep (Verificarlo) #3663

Description

@oesteban

Objective

Instrument fMRIPrep with Verificarlo / Monte-Carlo Arithmetic — building on @yohanchatelain's fuzzy-fmriprep — and add a numerical-precision check to fMRIPrep's CI: each relevant change measures the significant-bit reproducibility of fMRIPrep's outputs, and a precision regression beyond tolerance fails CI. Adopted from the start of the project, so fMRIPrep accrues a numerical-variability track record before the engine transplants begin.

Rationale

Verificarlo instrumentation is applied at the tool level, independent of the workflow engine that orchestrates the pipeline. That makes it safe — and cheap — to adopt inside fMRIPrep immediately: it establishes fMRIPrep's own significant-bit precision baseline now, so that when the pipeline is later re-hosted on new workflow engines (Goal 3), the numerical-equivalence test already has a track record to compare against, rather than being stood up alongside the reconstructions it must judge. The same check also catches numerical-precision drift in fMRIPrep itself when dependencies or kernels change.

Methodological approach

  1. Instrument fMRIPrep with Verificarlo/MCA, starting from @yohanchatelain's fuzzy-fmriprep, reusing the instrumented numerical-library layers at the container/tool level.
  2. Add a CI job that runs the instrumented pipeline over a small, fixed test case, computes per-output significant-bit precision, and compares it against the recorded baseline.
  3. Fail CI on a significant-bit regression beyond tolerance; record every run so the baseline accumulates a track record (and dependency/kernel drift is visible).
  4. Publish the numerical-precision baseline over time as a standing, auditable signal.

Outcomes/impact

  1. fMRIPrep instrumented for numerical precision, with a significant-bit CI check that fails on regressions beyond tolerance.
  2. A growing numerical-variability track record for fMRIPrep, established before the engine transplants.

Impact. The reference numerical-variability baseline that the later engine-reconstruction equivalence checks (Goal 3) calibrate against — in place from day one, tool-level and engine-independent.

Direct upstream issues

(issues this one depends on / builds upon)

None — foundational, adopted at project start. Builds on @yohanchatelain's fuzzy-fmriprep.

Direct downstream issues

(issues that depend on this one)

Metadata

Metadata

Assignees

No one assigned

    Labels

    NiPreps-nextNiPreps-next (OS4LS Track 1) work item

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions