Search bioRxiv⌕ Search

bioRxiv · 10.64898/2026.10.30.763051

Diagnose Harmonisation (DHARM): An open-source tool for the harmonisation and analysis of batch effects in MRI-derived measures.

Abstract

Technical differences between scanners, acquisition protocols, machine hardware and processing pipelines can introduce systematic variation into MRI-derived measures. Numerous harmonisation methods have been developed to reduce these effects. However, validation of these methods is often performed using different criteria depending on the method itself, the datasets used and the study design. Consequently, determining whether harmonisation is required, selecting an appropriate method and establishing whether or not technical variation has been sufficiently removed without compromising biological signal remain challenging. In this manuscript, we introduce Diagnose Harmonisation (DHARM), an open-source Python toolbox for diagnosing batch effects, applying harmonisation and evaluating harmonisation performance in cross-sectional and repeated-measures settings. DHARM is user-friendly, comes with GUI-based and command-line interfaces, and has graphical reporting. It provides standardised reporting workflows combining complementary measures of batch-associated differences in feature location, scale, empirical distributions, covariance and multivariate structure, together with measures assessing preservation of biological covariate effects and repeated-measures consistency. The framework includes several established harmonisation approaches, but its evaluation workflow is method-agnostic: users can also supply data harmonised using external or newly developed methods and benchmark their outputs using the same common set of diagnostics. We demonstrate DHARM using multisite cross-sectional MRI measures from UK Biobank, Cam-CAN and OxBAC as well as travelling-heads data from the ON-Harmony dataset. Across the cross-sectional datasets, harmonisation substantially reduced additive batch effects, while residual differences in variance and empirical distributions varied between methods. Multivariate diagnostics further demonstrated that reduction of batch-associated structure can coexist with preservation or increased detectability of biologically relevant variation. In the repeated-measures example, harmonisation reduced batch-associated and within-subject variability, while broadly preserving subject-level and biological relationships. DHARM provides a reproducible framework for diagnosing batch effects, applying different harmonisation methods and evaluating harmonisation as a multi-criteria problem rather than relying on a single measure of success. By jointly characterising technical variation and preservation of biologically meaningful information, DHARM can support dataset- and objective-specific selection, benchmarking and validation of harmonisation strategies.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Turnbull, J., Bhalerao, G., Nichols, T. E., McCarthy, P., Gillis, G., Blane, J., Zhaoyi Mo, B., Warrington, S., Sotiropoulos, S. N., Besenczi, R., Alfaro-Almagro, F., Smith, S. M., Griffanti, L.. 2026-11-03. Diagnose Harmonisation (DHARM): An open-source tool for the harmonisation and analysis of batch effects in MRI-derived measures.. https://doi.org/10.64898/2026.10.30.763051

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related preprints

Simple, static, spiking nonlinearities can account for seemingly complex interactions between visual, motor and cognitive variables in the visual cortex.

Neural activity in the visual cortex is driven by the stimulus and modulated by multiple task-related variables, including spatial attention, eye movements, and perceptual decisions. These multiple influences are each typically described as nonlinear interactions such as gain or normalization, raising the question of how these diverse signals can be combined through cellular or circuit mechanisms. Here we address this problem by examining neuronal responses in macaque visual areas V2 and V3 during a visual discrimination task that dissociates spatial attention from motor planning and microsaccadic eye movements. Using a statistical modeling framework, we show that attentional, microsaccade-related, and choice-related influences on neural activity are best explained by a simple additive stimulus-independent input modulation, which manifests as a gain via a spiking nonlinearity. In addition to explaining how interactions between variables might be accomplished mechanistically, this framework also resolves a controversy about the relationship between microsaccades and spatial attention. We find that neither microsaccade direction nor microsaccade-related neural activity accounts for attentional modulation, although these variables are often correlated, leading to apparent interactions. Thus, visual cortex can integrate sensory, motor-related, and cognitive signals through a parsimonious mechanism that preserves stable stimulus representations while supporting flexible, context-dependent modulation.

neuroscience↗

40 Hz visual stimulation increases gamma-band functional connectivity between visual, parietal and frontal regions

Visual stimulation at 40 Hz is being investigated as a non-invasive intervention for Alzheimer's disease. Its neural responses have been reported in regions beyond the visual cortex, and concurrent cognitive tasks have been shown to increase their spatial extent. However, it is unclear whether these responses reflect increased functional connectivity between regions or a common response to the stimulus, and whether a concurrent task changes this connectivity. We recorded EEG from 29 healthy young adults during Regular 40 Hz flicker and Irregular 30-50 Hz flicker, each with and without a target-counting task (2 x 2 within-participant design). Source-space connectivity between visual, parietal, and frontal regions was estimated with the debiased squared weighted phase-lag index (dWPLI). Regular stimulation increased 38-42 Hz connectivity for all three region pairs, with the largest increase between visual and parietal regions (increase in all 29 participants). The increase was specific to the stimulation frequency and was observed with two source reconstruction methods and in sensor space. The visual-parietal increase remained significant after correction for source leakage (spatial mixing between reconstructed sources) and after removal of the estimated stimulus-locked component, whereas the increases in visual-frontal and parietal-frontal connectivity did not. The concurrent task did not modulate the visual-parietal effect. For visual-frontal and parietal-frontal connectivity, the stimulation-by-ask interaction was not significant. These results show that 40 Hz visual stimulation increases gamma-band connectivity beyond the visual cortex, and much of this increase reflects a common stimulus-locked response, and connectivity beyond this response was observed mainly between visual and parietal regions.

neuroscience↗

Feedback Valence, Prediction Error, and the Limits of Computational Attribution in Symptom-Related EEG

Feedback-locked electroencephalography (EEG) responses are often interpreted using model-derived prediction errors (PEs), although signed PE can be strongly coupled to feedback valence in binary-outcome tasks. We revisited a published anxiety-related EEG association using two open probabilistic-learning datasets to examine measurement reliability, predictor separability, and participant-level recovery. In the primary dataset, greater trait anxiety was associated with a larger negative-minus-positive FCz theta response among 46 participants with elevated depressive symptoms after adjustment for depression severity. The association also differed between the sampled depression-symptom groups. The feedback contrast showed useful within-session reliability, but matched delta and P3-minus-N2 analyses did not establish theta specificity. Within participants, feedback valence and signed PE were highly correlated (r = -0.964). Exact-design simulations showed that population-level model discrimination could succeed despite poor recovery of individual neural slopes. Participant-specific learning-model refits recovered overall signed PE more consistently than the within-valence variation needed to distinguish it from feedback valence. An independent dataset reproduced the FCz feedback contrast in untreated and placebo cohorts but lacked trait-anxiety scores. Adding signed PE to valence yielded a small held-out predictive improvement under one reinforcement-learning specification, with limited support across sessions and no comparable support under the dual-rate model or in placebo. Together, these findings support a symptom-related feedback EEG association while constraining its theta-specific and participant-level computational interpretation.

neuroscience↗