Fast and reproducible sign-flipping methods for source-level M/EEG parcel time courses

Source reconstruction of magnetoencephalography (MEG) and electroencephalography (EEG) data using unconstrained or data-driven source orientations can leave reconstructed dipole or parcel time courses with an arbitrary sign. Because each session is typically source reconstructed independently, this sign can differ across sessions. Resolving these sign inconsistencies is imperative for group-level analyses such as task-evoked responses and functional connectivity estimation, since opposite signs cancel when averaged across sessions. 'Sign flipping' aims to resolve this issue by flipping signs of each time course to maximise their alignment between sessions based on correlations between time-delay embedded covariances. Existing approaches rely on stochastic search, in which subsets of dipoles or parcels are repeatedly flipped and changes that improve the objective are retained. However, this procedure is computationally expensive and sensitive to the particular random draws and does not guarantee either optimality or reproducibility. Here, we show that sign ambiguity from the source reconstruction can be formulated as an instance of the Z 2 synchronisation problem, connecting sign-flipping to a well-studied class of problems in statistical physics and combinatorial optimisation. We introduce three methods: a semidefinite programming (SDP) relaxation, spectral synchronisation, and loopy belief propagation, each followed by greedy refinement of the exact objective function. This reformulation turns an apparently vast combinatorial search into a compact optimisation problem whose solution is deterministic or minimally sensitive to random initialisation. Across three M/EEG datasets (resting-state and task), the proposed methods run approximately 160 to more than 2,000 times faster than random search while yielding better solutions. We further show that the resulting sign-flipped data preserve both static and dynamic network features. We outline the theoretical and empirical trade-offs of each method and recommend SDP as the default for typical use cases. All methods are openly available through a standalone software package osl-signflip.

Authors

Institutions

Publication Details

Journal
bioRxiv (Cold Spring Harbor Laboratory)
Published
2026-12-03
DOI
https://doi.org/10.64898/2026.12.02.769701
Primary Topic
EEG and Brain-Computer Interfaces
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Fast and reproducible sign-flipping methods for source-level M/EEG parcel time courses

Ōiwi Parker Jones, Chetan Gohil, SungJun Cho, Mark W. Woolrich
bioRxiv (Cold Spring Harbor Laboratory)
EEG and Brain-Computer Interfaces
preprint

Fast and reproducible sign-flipping methods for source-level M/EEG parcel time courses

Ōiwi Parker Jones, Chetan Gohil, SungJun Cho, Mark W. Woolrich
preprint en

Abstract

Source reconstruction of magnetoencephalography (MEG) and electroencephalography (EEG) data using unconstrained or data-driven source orientations can leave reconstructed dipole or parcel time courses with an arbitrary sign. Because each session is typically source reconstructed independently, this sign can differ across sessions. Resolving these sign inconsistencies is imperative for group-level analyses such as task-evoked responses and functional connectivity estimation, since opposite signs cancel when averaged across sessions. 'Sign flipping' aims to resolve this issue by flipping signs of each time course to maximise their alignment between sessions based on correlations between time-delay embedded covariances. Existing approaches rely on stochastic search, in which subsets of dipoles or parcels are repeatedly flipped and changes that improve the objective are retained. However, this procedure is computationally expensive and sensitive to the particular random draws and does not guarantee either optimality or reproducibility. Here, we show that sign ambiguity from the source reconstruction can be formulated as an instance of the Z 2 synchronisation problem, connecting sign-flipping to a well-studied class of problems in statistical physics and combinatorial optimisation. We introduce three methods: a semidefinite programming (SDP) relaxation, spectral synchronisation, and loopy belief propagation, each followed by greedy refinement of the exact objective function. This reformulation turns an apparently vast combinatorial search into a compact optimisation problem whose solution is deterministic or minimally sensitive to random initialisation. Across three M/EEG datasets (resting-state and task), the proposed methods run approximately 160 to more than 2,000 times faster than random search while yielding better solutions. We further show that the resulting sign-flipped data preserve both static and dynamic network features. We outline the theoretical and empirical trade-offs of each method and recommend SDP as the default for typical use cases. All methods are openly available through a standalone software package osl-signflip.

bioRxiv (Cold Spring Harbor Laboratory)
University of Oxford (GB)
EEG and Brain-Computer Interfaces
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon