betaFeedback

WorksComputer Science

GLOW: General Linear Models Optimized with Ward's Method

Abstract

Neuroimaging seeks brain regions whose imaging features correlate with variables of interest (e.g., diagnosis, age), usually via the General Linear Model (GLM). Region-Based Analysis dilutes or splits any effect that does not fill exactly one atlas region. Voxel-Based Analysis, with Cluster Extent Thresholding and Threshold-Free Cluster Enhancement built on it, fits a GLM per voxel and groups adjacent significant voxels. But neighboring voxels can share a statistic without sharing a GLM, which a per-voxel statistic cannot detect. GLOW (General Linear Models Optimized with Ward's method) instead builds a hierarchy of nested regions by greedily minimizing GLM error (provably a special case of Ward's clustering). Maximum-statistic (Westfall-Young) permutation controls family-wise error over all regions. Significance spreads to an effect's nested fragments and the regions containing it; a final pruning step seeks whole, pure effect extents. We plant synthetic effects of known extent and varying strength in Human Connectome Project (HCP) diffusion images and in white noise. Pruning delivers wholeness: GLOW returns a spatially consistent effect as one region on 57% of HCP trials, the best baseline on 35%; baselines recover comparable volume, but in many pure pieces. The cost is positive predictive value (PPV): GLOW is more sensitive (by up to 0.29), but its regions overrun the effect, mostly because no hierarchy region isolates it, not because of pruning. On HCP, GLOW's mean Dice gains 0.059 over the best baseline at weaker effects and gives back 0.005 at stronger ones. On white noise, GLOW trails by up to 0.61 Dice: its hierarchy holds the effect, but its permutation test does not certify it. Runtime grows roughly linearly with voxel count, about 4.5 times the voxel-wise methods' on the full HCP volume. The PPV loss may trace to the assumption of spatially independent residuals.

Introduction

Introduction

A fundamental aim of neuroimaging research is to identify how independent variables (e.g. age, diagnosis, or behavioral measures) influence brain structure (Ashburner & Friston, 2000; Friston et al., 1995). For example, white-matter microstructure, as measured by fractional anisotropy (FA) or mean diffusivity (MD), may differ between clinical groups or correlate with behavioral scores [14]. Such a study images a set of individuals whose independent variable varies, then registers those images into a common anatomical space (Avants et al., 2011; Jenkinson et al., 2002). Throughout this work, we assume that registration has already been done.

The General Linear Model (GLM) provides a unified framework for testing whether image intensities correlate with independent variables after controlling for confounds [28] (Friston et al. 1995). By encoding hypotheses in a design-matrix/contrast framework, the GLM supports tt-tests, ANOVA, multiple regression, and factorial designs, with nuisance regressors explicitly adjusting for covariates such as age, sex, or acquisition site.

Before applying a GLM, one must decide how to group voxels for analysis. Region-Based Analyses (RBA) define regions a priori, typically from anatomical atlases [19] (Desikan et al. 2006; Glasser et al. 2016). Each region’s GLM tests whether an effect exists uniformly across its voxels. Statistical power suffers in two complementary ways: including non-effect voxels in a region dilutes the signal, while splitting a single effect across atlas boundaries fragments it (Eickhoff et al., 2018). Both errors are to be expected: atlas boundaries track anatomy, not the unknown extent of some effect.

Voxel-Based Analyses (VBA) sidestep atlas dependence by fitting a GLM at every voxel and gluing adjacent, significant voxels together post hoc (Ashburner & Friston, 2000; Friston et al., 1995). A central challenge for VBA is incorporating spatial scale: a lone island of significance is more likely to be a false positive than a large, contiguous continent of significant voxels. Cluster Extent Thresholding (CET) (Forman et al., 1995; Friston et al., 1994) and Threshold-Free Cluster Enhancement (TFCE) [15] act as spatial regularization steps on top of VBA, favoring continents over islands. CET thresholds the statistic map and keeps those clusters of suprathreshold voxels whose extent is unlikely under the null. TFCE sidesteps the choice of any one threshold by using all of them: each voxel’s statistic is enhanced in proportion to the extent of the suprathreshold clusters containing it, accumulated over every threshold. Because each voxel is tested on its own, the resulting map must be corrected for a massive number of comparisons. The family-wise error rate (FWER) [5] is controlled either parametrically, via Random Field Theory [29], or nonparametrically, via permutation [6, 25]. Multivariate data fit the same voxel-wise template: PALM tests several imaging features jointly at each voxel, via either classical multivariate statistics or non-parametric combination [26], still leaving the single voxel as the unit of inference.

VBA’s first aggregation across voxels comes before any test: each image is smoothed with a Gaussian kernel, so every voxel’s statistic already averages its neighbors. By the matched filter theorem [18], smoothing best detects a signal when the kernel matches the signal’s own extent: wide effects want a wide kernel, narrow effects a narrow one (Friston, 2004; Worsley, Marrett, Neelin, & Evans, [29]). That extent is not known a priori, so the analyst fixes one width in advance for the whole image, and conclusions can turn on the choice: kernels of 0 to 16 mm led one diffusion data set to four different conclusions (Jones et al., 2005). We smooth each voxel-wise baseline at the width which serves it best on our data (Appendix § 18).

VBA and the cluster methods built on it share a clear advantage over RBA: their output regions can mold to the contours of effects present in the data. But pooling per-voxel statistics, as CET and TFCE do, or blurring the images each voxel’s model is fit to, as smoothing does, is not the same as fitting one model across voxels. A per-voxel statistic is all VBA ever sees of a voxel’s GLM, and there is plenty of wiggle room among GLMs which share an FF-statistic (Figure 1).

Figure 1. Toy example: three voxels whose effects (A, B, C) are distinct yet share the same FF-statistic. Pooling across voxels reveals their heterogeneity.

Consider the three neighboring voxels of Figure 1, whose effects A, B, and C are clearly distinct yet produce an identical per-voxel statistic. Seeing three identical statistics, VBA is encouraged to glue the voxels together into a single output. The statistic is a bottleneck: whatever passes through it cannot tell VBA whether neighboring voxels agree on a model, so VBA can neither reward that agreement nor penalize its absence.

The bottleneck costs detection power, not only interpretation. Under the null, where imaging features carry no correlation with the independent variables, nn contiguous voxels which each reach F=100F = 100 under one shared effect A are rarer than nn contiguous voxels which each reach F=100F = 100 under whatever model they please; the first event is contained in the second. A per-voxel test draws its null from the second, looser event, so the permuted images are free to cobble together unrelated GLMs and compete with the observed statistic. Asking the voxels to agree on a model narrows what the null can offer, which is the power GLOW is after.

Cluster-wise inference has known weaknesses: Woo et al. [27] and Eklund et al. (2016) show that it can inflate false-positive rates and pool heterogeneous signals. A more principled remedy comes from All-Resolutions Inference (ARI) and its true-discovery-proportion descendants, which report a lower bound on the fraction of truly active voxels holding simultaneously for any region the analyst selects [11] (Blain et al. 2022). Yet the bound is a proportion, not a partition: for whatever region the analyst queries it reports how many voxels are active, never which ones.

Data-driven parcellation approaches, including spatially constrained clustering [13, 16] (Craddock et al. 2012; Michel et al. 2012), address the atlas-dependence problem but do not optimize regions specifically for GLM fit (Eickhoff et al., 2018).1 Our objective is to construct regions whose voxels follow one spatially homogeneous GLM. GLOW (General Linear Models Optimized with Ward’s method) does so by building a hierarchical segmentation which greedily minimizes each region’s GLM mean-squared error, via Ward’s agglomerative clustering [22]; in practice it measures that error only along the variables of interest § 4.2. The significance of all regions is evaluated with the same permutation machinery used for voxel-wise inference: Freedman–Lane residualization (Freedman & Lane, 1983) and Westfall-Young max-statistic FWER [24], as set out by Winkler et al. [25]. The only change is that this machinery is applied to GLOW’s data-derived regions rather than to fixed voxels or threshold-formed clusters. GLOW is multivariate as well: it analyzes several imaging features jointly (e.g. fractional anisotropy and mean diffusivity) within the GLM/MANCOVA framework [9], as PALM’s multivariate tests do at the voxel level [26].

We validate GLOW by imposing synthetic effects onto image sets of known ground truth and comparing detection performance against VBA, CET and TFCE. One image set honors our statistical assumptions (white Gaussian noise); the other carries the spatial correlations of real data (diffusion images from the Human Connectome Project [20]). In the remainder of the paper we analyze the GLM in the special case here where every voxel shares one design matrix § 3, describe GLOW’s method § 4, present experiments and results § 5 and § 7, and discuss how spatial dependence and region selection limit GLOW § 8.

Problem & Analysis

Problem Statement: Multiple-Hypothesis GLM

Let yv,s∈Rby_{v,s} \in\mathbb{R}^{b} hold the imaging features of voxel vv in image ss, one of NN images registered into a common anatomical space. Each (whole) image carries a vector of independent variables xs∈Rax_s \in\mathbb{R}^{a} (e.g. diagnostic labels, demographic covariates, or clinical scores).

Among these aa independent variables, a′<aa' < a are covariates (nuisance variables) whose correlation with the imaging features is not of interest; the remaining a−a′a-a' are the variables of interest. We seek spatially contiguous effect regions rr, each a set of voxels, in which xsx_s predicts yv,sy_{v,s} through one GLM shared by every v∈rv \in r:

yv,s=xsβr+ϵ,(1)y_{v,s} = x_s\beta_r + \epsilon, \tag*{(1)}

where βr∈Ra×b\beta_r \in\mathbb{R}^{a\times b} is the matrix of regression coefficients for region rr, and ϵ\epsilon is additive white Gaussian noise. We test the alternative H1H_1, that some entry of βr\beta_r is non-zero in the rows belonging to the a−a′a-a' variables of interest, against the null H0H_0 that every such entry is zero.

Finding the voxels which reject H0H_0 is only half the job; we also want them collected into output regions holding all, and only, those voxels governed by a single homogeneous GLM. In the language of Metrics Reloaded (Maier-Hein et al., 2024), this is an instance segmentation problem: a GLM’s extent should be neither fragmented across several output regions nor conflated with neighboring voxels. We quantify the two errors with Homogeneity and Completeness scores [10]:

completeness=1−H(R∣T)H(R)=I(R,T)H(R),homogeneity=1−H(T∣R)H(T)=I(R,T)H(T).(2)\begin{aligned} \mathrm{completeness} &= 1 - \frac{H(R \mid T)}{H(R)} = \frac{I(R,T)}{H(R)}, \qquad \mathrm{homogeneity} = 1 - \frac{H(T \mid R)}{H(T)} = \frac{I(R,T)}{H(T)}. \tag*{(2)} \end{aligned}

Here HH and II are entropy and mutual information, RR is the index of an output region (the output regions being pairwise disjoint) and TT is the ground truth effect label (T=0T = 0 outside every planted effect, T=kT = k inside effect kk). In computing them we assume a uniform distribution of voxels over the union of the output regions.2 Completeness is the percentage of the uncertainty in RR which observing TT resolves; it reaches 100% when each whole effect sits inside a single output region. Homogeneity is the percentage of the uncertainty in TT which observing RR resolves; it reaches 100% when no output region mixes two effects. Both are computed over detected voxels alone, so neither penalizes effect volume that went undetected. We therefore report them alongside sensitivity and PPV.

GLM/MANCOVA via QR Factorization (single-voxel)

We first review3 GLM regression through a QR factorization of the design matrix X∈RN×aX \in\mathbb{R}^{N\times a}; this single-voxel case lays the foundation for the multi-voxel extension which follows.

We perform a QR factorization of the design matrix XX:

X=QR(3)X = QR \tag*{(3)}

where Q∈RN×aQ \in\mathbb{R}^{N\times a} has orthonormal columns (i.e., QTQ=IaQ^TQ = I_a), and R∈Ra×aR \in\mathbb{R}^{a\times a} is upper triangular. Because RR is upper triangular and invertible (as XX has full column rank), the first kk columns of XX and the first kk columns of QQ span the same subspace. Before computing this QR factorization, we re-index the columns of XX so that covariates appear first, followed by the independent variables of interest. Taken together, these facts let us partition QQ:

Q=[Q0∣Q1](4)Q = \begin{bmatrix} Q_0 \mid Q_1 \end{bmatrix} \tag*{(4)}

where:

  • Q0∈RN×a′Q_0 \in\mathbb{R}^{N \times a'} spans the space of covariates. Components of YY in this span can be entirely attributed to nuisance variables.

  • Q1∈RN×(a−a′)Q_1 \in\mathbb{R}^{N \times(a-a')} spans the independent variables of interest, orthogonalized with respect to covariates. Components of YY in this span are explained by independent variables of interest while also being orthogonal to all nuisance variables.

  • Every direction orthogonal to both spans is residual: no linear combination of the independent variables reaches it.

In the univariate case (b=1b = 1), hypothesis testing is typically performed with FF-statistics (Kutner et al., 2005). With multiple imaging features (b>1b > 1) the problem generalizes to MANCOVA, but the spirit of the analysis is unchanged: a GLM’s fit is the ratio of the variance in yy it explains (the hypothesis matrix HH) to the variance left over (the error, or residual, matrix EE). We define EE precisely:

E≡(Yv−Xβ)T(Yv−Xβ)=YvT(IN−QQT)Yv,(5)E \equiv(Y_v - X\beta)^T(Y_v - X\beta) = Y_v^T(I_N - QQ^T)Y_v, \tag*{(5)}

where Yv∈RN×bY_v \in\mathbb{R}^{N \times b} are the imaging features of voxel vv. The second equality is seen by observing that when β\beta is chosen to minimize the mean-squared-error, XβX\beta is a projection of YvY_v into the column space of XX: Xβ=QQTYvX\beta= QQ^T Y_v. Equivalently, the residual is a projection into the orthogonal complement of XX: Yv−Xβ=(IN−QQT)YvY_v - X\beta= (I_N - QQ^T)Y_v.

The hypothesis matrix HH captures the portion of the covariance in YvY_v, explained by independent variables of interest, while being orthogonal to all nuisance variables:

H=YvTQ1Q1TYv(6)H = Y_v^T Q_1 Q_1^T Y_v \tag*{(6)}

A voxel with a strong effect yields a small EE and a large HH: much of the variance in YY is explained by the independent variables of interest (the last a−a′a-a' columns of XX). MANCOVA offers four generalizations of the FF-statistic (Wilks’ Lambda, Pillai’s Trace, Hotelling–Lawley Trace and Roy’s Largest Root), each a function of EE and HH [9].

GLOW instead scores a region by an estimate of its log-likelihood ratio (LLR), drawing the null distribution from permutation (§ 4.3) rather than from parametric theory. To derive it, take the residuals to be independent and identically normal. Appendix § 15 then shows that the log-likelihood of N∣r∣N|r| residuals is −N∣r∣2log⁡∣Σ^∣-\frac{N|r|}{2}\log|\widehat{\Sigma}| plus constants depending only on NN, bb and ∣r∣|r|, where Σ^\widehat{\Sigma} is their maximum-likelihood covariance estimate and ∣r∣|r| is the number of voxels in the region. The residuals under H1H_1, the full model, give Σ^=E/(N∣r∣)\hat{\Sigma} = E/(N|r|), while under H0H_0, the reduced model, they give Σ^=(E+H)/(N∣r∣)\hat{\Sigma} = (E + H)/(N|r|). Subtracting the two log-likelihoods cancels the shared constants, along with the (N∣r∣)−1(N|r|)^{-1} inside each determinant:

LLR⁡=N∣r∣2log⁡∣E+H∣∣E∣(7)\operatorname{LLR} = \frac{N|r|}{2}\log\frac{|E+H|}{|E|} \tag*{(7)}

Here ∣⋅∣|\cdot| denotes a matrix determinant; the region size ∣r∣|r| uses the same bars for cardinality. Equation (7) is an estimate because the true covariance Σ\Sigma is unknown: each model’s log-likelihood is evaluated at its maximum-likelihood estimate Σ^\hat{\Sigma} instead of at Σ\Sigma, so Equation (7) approaches the true log-likelihood ratio only as Σ^→Σ\hat{\Sigma} \to\Sigma.

The independence assumption, of course, is rarely valid in practice: residuals depend on one another wherever an image’s spatial autocorrelation is non-zero. This modeling error haunts our results.

GLM/MANCOVA via QR Factorization (multi-voxel)

Extending EE and HH to the multi-voxel case yields insight and, as seen later, desperately needed computational savings. The theme throughout is exploiting redundancy in the block structure of the multi-voxel analogues of XX and YY:

X′=[XX⋮X]∈RN∣r∣×a,Y′=[Y1Y2⋮Y∣r∣]∈RN∣r∣×b(8)X' = \begin{bmatrix} X\\ X\\ \vdots\\ X \end{bmatrix} \in\mathbb{R}^{N|r|\times a}, \qquad Y' = \begin{bmatrix} Y_1\\ Y_2\\ \vdots\\ Y_{|r|} \end{bmatrix} \in\mathbb{R}^{N|r|\times b} \tag*{(8)}

where region rr is a set of voxels vv, each with imaging features Yv∈RN×bY_v \in\mathbb{R}^{N\times b}. As a first example, the minimum-MSE mapping β\beta for a region follows from the spatial average Yˉr=1∣r∣∑v∈rYv\bar{Y}_r = \frac{1}{|r|}\sum_{v\in r}Y_v alone, never touching the full Y′Y':

β=(X′TX′)−1X′TY′=([XT ⋯ ][X⋮X])−1[XT ⋯ ][Y1⋮Y∣r∣]=(∣r∣XTX)−1XT(∑v∈rYv)=(XTX)−1XTYˉr(9)\begin{aligned} \beta&= (X'^{T}X')^{-1}X'^{T}Y'\\ &= \left([X^{T}\ \cdots]\begin{bmatrix}X\\ \vdots\\ X\end{bmatrix}\right)^{-1}[X^{T}\ \cdots]\begin{bmatrix}Y_1\\ \vdots\\ Y_{|r|}\end{bmatrix}\\ &= (|r|X^{T}X)^{-1}X^{T}\left(\sum_{v\in r}Y_v\right)\\ &= (X^{T}X)^{-1}X^{T}\bar{Y}_r \tag*{(9)} \end{aligned}

Extending EE and HH to a region needs a QR factorization of X′X'. Thanks again to the redundant structure of X′X', we can nearly re-use the one we have for XX:

Q′=1∣r∣[QQ⋮Q]∈RN∣r∣×a,R′=∣r∣R(10)Q' = \frac{1}{\sqrt{|r|}} \begin{bmatrix} Q\\ Q\\ \vdots\\ Q \end{bmatrix} \in\mathbb{R}^{N|r|\times a}, \qquad R' = \sqrt{|r|}R \tag*{(10)}

which has X′=Q′R′X' = Q'R', upper triangular R′R' and Q′TQ′=IaQ'^{T}Q' = I_a as required. Before computing EE it helps to define the spatial (image-pooled) covariance matrix S∈Rb×bS \in\mathbb{R}^{b \times b}, which measures how YvY_v varies across the voxels of rr:

S=∑v∈r(Yv−Yˉr)T(Yv−Yˉr)=Y′TY′−∣r∣YˉrTYˉr=Y′T(IN∣r∣−∣r∣CTC)Y′(11)\begin{aligned} S &= \sum_{v \in r}(Y_v-\bar{Y}_r)^T(Y_v-\bar{Y}_r) \\ &= Y'^{T}Y' - |r|\bar{Y}_r^{T}\bar{Y}_r \\ &= Y'^{T}(I_{N|r|}-|r|C^{T}C)Y' \tag*{(11)} \end{aligned}

where IN∣r∣I_{N|r|} is the N∣r∣×N∣r∣N|r| \times N|r| identity matrix and C=1∣r∣[IN,IN,…]C = \frac{1}{|r|}[I_N, I_N, \ldots] is the centering matrix which gives Yˉr=CY′\bar{Y}_r = CY'. We leave SS un-normalized, for consistency with EE and HH. The multi-voxel form of EE now follows from (5):

E=Y′T(IN∣r∣−Q′Q′T)Y′(12)E = Y'^{T}(I_{N|r|}-Q'Q'^{T})Y' \tag*{(12)}
=Y′T(IN∣r∣−∣r∣CTC+∣r∣CTC−Q′Q′T)Y′=S+1∣r∣Y′T[IN−QQT⋯IN−QQT⋮⋱⋮IN−QQT⋯IN−QQT]Y′=S+∣r∣YˉrT(IN−QQT)Yˉr(13)\begin{aligned} &=Y'^{T}(I_{N|r|}-|r|C^{T}C+|r|C^{T}C-Q'Q'^{T})Y' \\ &=S+\frac{1}{|r|}Y'^{T} \begin{bmatrix} I_N-QQ^{T} & \cdots& I_N-QQ^{T} \\ \vdots& \ddots& \vdots\\ I_N-QQ^{T} & \cdots& I_N-QQ^{T} \end{bmatrix} Y' \\ &=S+|r|\bar{Y}_r^{T}(I_N-QQ^{T})\bar{Y}_r \tag*{(13)} \end{aligned}

where we use (11) in the third equality.

Equation (13) splits the error into two sources. The first, ∣r∣YˉrT(IN−QQT)Yˉr|r|\bar{Y}_r^{T}(I_N-QQ^{T})\bar{Y}_r, is a regression error on the spatial average: it closely resembles the single-voxel EE of (5) and measures how far Yˉr\bar{Y}_r strays in directions XX cannot explain. The second, the spatial variance SS, is surprising at first because it does not depend on XX at all. Every voxel of region rr in image ss shares one estimate xsβx_s\beta, so the observations yv,sy_{v,s} can only sit close to that estimate by sitting close to each other: variation across space contributes exclusively to EE.

The multi-voxel Hypothesis Matrix can be derived from (6):

H=Y′TQ1Q1TY′=∣r∣YˉrTQ1Q1TYˉr(14)H=Y'^{T}Q_1Q_1^{T}Y'=|r|\bar{Y}_r^{T}Q_1Q_1^{T}\bar{Y}_r \tag*{(14)}

Method

Overview

GLOW first segments the image into candidate regions, greedily minimizing a variant of the GLM fit’s mean squared error (§ 4.2). It then tests each region with established permutation methods, discarding any whose fit the null hypothesis readily explains (§ 4.3). A final pruning step (§ 4.4) sifts the surviving regions for those which contain all, and only, the voxels of one effect’s extent.

Hierarchical Segmentation

We seek regions which show a convincingly non-zero correlation between YY and the independent variables of interest. To that end GLOW uses agglomerative clustering, repeatedly merging the neighboring pair of regions whose GLMs are most alike. Starting from one voxel per region, it merges until a single region remains. The result is a hierarchy of nested regions in which every multi-voxel region splits into exactly two subregions (see the first panel of Figure 2).

Figure 2. GLOW operating on a 1 × 4 array of voxels. Regions 0 to 3 are single voxels, regions 4 to 6 their merges. GLOW estimates that region 4 (voxels 0 and 1) contains an effect. Regions 0, 1, 4 and 6 were all found significant, but only region 4 is output to the user; the rest are pruned away, their significance explained by their intersection with region 4. The viewer at glow-viewer.web.app is another helpful entry point.

For a given number of regions, a natural segmentation objective minimizes the mean squared error summed across their GLMs, which agglomerative clustering pursues greedily, one merge at a time:

arg min⁡∑rTr⁡Er(15)\operatorname{arg\,min} \sum_{r} \operatorname{Tr} E_r \tag*{(15)}

We quantify ErE_r by its trace rather than its determinant4, which keeps the objective consistent with Ward’s method [22] and inherits its efficient implementation [2, 7]. Ward’s method minimizes the Within-Cluster-Sum-of-Squares (WCSS), summed over all clusters:

arg min⁡X∑rWCSS(r)=arg min⁡X∑r∑z∈rTr⁡(z−μr)(z−μr)T=arg max⁡X∑r∣r∣∥μr∥2(16)\operatorname*{arg\,min}_{X} \sum_r WCSS(r) = \operatorname*{arg\,min}_{X} \sum_r \sum_{z \in r} \operatorname{Tr}(z-\mu_r)(z-\mu_r)^T = \operatorname*{arg\,max}_{X} \sum_r |r|\lVert\mu_r\rVert^2 \tag*{(16)}

where zz are vector-valued observations from cluster rr, whose mean is μr\mu_r. Our objective (15) is nearly identical:

arg min⁡X∑rTr⁡Er=arg min⁡X∑rTr⁡YrTYr′−YrTQ′QTYr′=arg max⁡X∑r∣r∣∥QTYˉr∥F2(17)\operatorname*{arg\,min}_{X} \sum_r \operatorname{Tr} E_r = \operatorname*{arg\,min}_{X} \sum_r \operatorname{Tr} Y_r^{T}Y_r' - Y_r^{T}Q'Q^{T}Y_r' = \operatorname*{arg\,max}_{X} \sum_r |r|\lVert Q^{T}\bar{Y}_r\rVert_F^2 \tag*{(17)}

where we use (12) in the first line and the second line uses (10) and observes that ∑rTr⁡YrTYr′\sum_r \operatorname{Tr}Y_r^{T}Y_r' is constant across all voxel-to-region assignments. GLOW’s segmentation is therefore Ward’s method run on QTYvQ^{T}Y_v, each voxel’s imaging features multiplied by QTQ^{T} and vectorized. In effect GLOW throws away each voxel’s residual component before clustering, which makes sense: that component is GLM error whatever happens, so there is nothing to gain by making it consistent across a region.

The same argument raises a second question: should we discard the components of YrY_r lying in the span of the nuisance variables Q0Q_0 as well? Those directions are projected out of both EE and HH, so LLR is already invariant to shifts along them. Perhaps we would do better to Focus on the components of YrY_r which the variables of interest Q1Q_1 can explain. We test each objective empirically in § 7.1; GLOW uses Focus.

One observation before moving on: the spatial covariance SS inside EE (13) lends the objective a sense of anatomical relevance. Penalizing spatial covariance discourages merges which conflate distinct tissues, as distinct tissues often carry distinct imaging features. All three objectives apply some such penalty and differ only in the directions of RN\mathbb{R}^{N} along which they measure it, each being Ward’s method on a projected voxel (YvY_v, QTYvQ^{T}Y_v or Q1TYvQ_1^{T}Y_v). Naive measures spatial covariance in all NN directions, GLM Error only in the aa directions of XX, and Focus in the a−a′a-a' directions of interest alone (orthogonalized to the covariates).

That description is accurate, but in practice Focus all but ignores spatial covariance when building regions. Analyses conventionally append a bias column of ones to XX so that the GLM is robust to feature offsets (Bishop, 2006). The bias is usually a covariate, not a variable of interest: treating it as one tests the typically nonsensical hypothesis that some imaging feature is non-zero when averaged across the NN images. The bias column therefore lies in the span of Q0Q_0, and since Q1Q_1 is orthogonal to Q0Q_0, multiplying by Q1TQ_1^T strips each voxel’s across-image mean. Focus is then measuring spatial covariance among voxels which have each been centered on their own mean, and little covariance survives that centering. Much of the anatomical relevance which motivated the penalty is discarded along with those means.

The objectives themselves motivate some pre-processing. Each sums squares over the bb imaging features on their native scales, so whichever feature happens to carry the largest variance dominates the merges while the others go overlooked. The objectives also ignore correlations between features, which lets variance shared by two of them be counted twice. We therefore pre-process all YvY_v by de-meaning, normalizing each feature’s scale, and then applying Principal Component Analysis (PCA). Every voxel of every image goes into the mean and covariance estimates used for pre-processing.

Significance Testing

GLOW’s inference follows the framework of Winkler et al. [25], reusing that machinery (Freedman–Lane residual permutation and Westfall-Young max-statistic FWER) essentially unchanged. We review it before designing around the two GLOW-specific challenges which arise.

Permutation testing manipulates the observed data to produce statistics consistent with the null hypothesis. Specifically, we adopt the Freedman–Lane (Freedman & Lane, 1983) approach, in which residuals from a reduced model are shuffled among observations. That is, each voxel’s YvY_v is replaced with the permuted version:

Yv∗=P(IN−Q0Q0T)Yv+Q0Q0TYv,(18)Y_v^* = P(I_N - Q_0Q_0^T)Y_v + Q_0Q_0^T Y_v, \tag*{(18)}

where PP is a permutation matrix obtained by row-shuffling the identity matrix INI_N. When testing a single hypothesis (i.e. region), one rejects the null when the original, unpermuted statistic exceeds5 the (1−α)(1-\alpha) percentile of the permuted statistics, a reference set which includes the unpermuted statistic itself (Phipson & Smyth, [8]). This ensures the probability of a Type I error is no more than α\alpha.

Our images are only block-exchangeable (see Winkler et al., [25]): every voxel’s residual from image ss must be re-assigned together, to one image s′s'. GLOW therefore applies a single PP across all voxels within a permutation.

To control the FWER while maintaining statistical power, we apply the Westfall-Young permutation procedure (Westfall & Young, [24]). Each permutation records only the maximum statistic taken across all hypotheses (i.e. regions). A region is declared significant when its unpermuted statistic exceeds the 1−α1-\alpha percentile of those maxima. This holds the FWER at or below α\alpha under the global null, where no region carries an effect (weak control). Control in the strong sense, over the null regions of an image which also holds an effect, further requires subset pivotality (Westfall & Young, [24]): the null regions’ statistics must be distributed the same whether or not the effect is present. GLOW builds its family of regions from the data, so the effect shapes that family and nothing guarantees the condition; § 7.3 finds it violated on white noise at strong effects. Testing a full hierarchy of nested regions in this way echoes hierarchical testing (Meinshausen, 2008), which localizes an effect by descending a tree of correlated variable clusters under a size-weighted Bonferroni rule; GLOW instead optimizes its hierarchy for GLM fit and controls FWER with a simultaneous max-statistic over all regions rather than a top-down descent.

Two issues arise when applying Westfall-Young in GLOW’s context. First, GLOW tailors its regions to the effects present in the unpermuted images. Reusing those same regions on the permuted image sets, for which they were never optimized, would hand the observed statistics an advantage the null draws never had. Selecting regions on the observed data and then testing them there is circular (Kriegeskorte et al., 2009), and it breaks the exchangeability on which the FWER bound rests (Hemerik & Goeman, 2018). GLOW restores exchangeability by building a separate hierarchical segmentation for each permuted image set, then collecting the maximum statistic of each hierarchy into the comparison set.

The second issue concerns how each region’s statistic is prepared before the regions compete for the maximum: raw statistics are not comparable across regions of different sizes. Consider the Focus form of (17), which by (14) is just ∑rTr⁡Hr\sum_{r} \operatorname{Tr} H^{r}. GLOW builds each region to maximize the LLR’s numerator, but the optimization does not benefit all region sizes equally. Single-voxel and whole-image regions, for example, are the same in every hierarchy, so their statistics gain nothing from it. Without adjustment, a maximum over raw statistics would be dominated by the region sizes with the most flexibility to fit the data (often, regions of nearly the whole image). We need a way to remove this bias.

We obtain it with a second, nested6 permutation loop (Figure 3). Write τr\tau_r for region rr’s observed statistic (GLOW uses its LLR, though any of the MANCOVA statistics would serve). Recomputing it under $n_{\mathrm{inner}} permutations of a fixed hierarchy yields the null draws {τr,k}k=1ninner\{\tau_{r,k}\}_{k=1}^{n_{\mathrm{inner}}}. Counting the observed statistic among them as τr,0=τr\tau_{r,0}=\tau_r, as a permutation test counts the identity permutation, we calibrate by z-scoring,

Figure 3. GLOW’s nested permutation. Each outer Westfall-Young draw (j=1…nfwerj = 1 \ldots n_{\mathrm{fwer}}) re-segments the permuted images and records zj=max⁡rz^rz_j = \max_r \hat{z}_r. Calibrating a region (shaded) nests an inner loop (k=1…ninnerk = 1 \ldots n_{\mathrm{inner}}) that recomputes the region’s statistic as τr,k\tau_{r,k} to form its null {τr,k}\{\tau_{r,k}\}, then z-scores the observed τr\tau_r against it, making z^r\hat{z}_r comparable across region sizes.

z^r=τr−mean⁡{τr,k}k=0ninnerstd⁡{τr,k}k=0ninner,(19)\widehat{z}_r = \frac{\tau_r-\operatorname{mean}\{\tau_{r,k}\}_{k=0}^{n_{\mathrm{inner}}}}{\operatorname{std}\{\tau_{r,k}\}_{k=0}^{n_{\mathrm{inner}}}}, \tag*{(19)}

with the sample standard deviation. Each τr\tau_r is compared against references drawn for its own region, so the inflation that region’s size and shape carry is accounted for. This inner calibration nests inside the outer Westfall–Young loop of the first issue: each outer permutation jj re-segments the permuted images, calibrates every region of the resulting hierarchy through its own inner loop, and contributes that hierarchy’s maximum zj=max⁡rz^rz_j=\max_r \widehat{z}_r to the FWER null. A region is significant when its observed z^r\widehat{z}_r exceeds the 1−α1-\alpha percentile of these per-permutation maxima zjz_j.

Reassuringly, the weak FWER bound holds regardless of how well the z-scoring equalizes regions7. The calibration only steers power, giving regions of every size a fair chance at the maximum; it cannot inflate the false-positive rate under the global null.

Region Pruning

If all has gone well, GLOW has flagged a region matching each true effect’s extent as significant. It has almost certainly flagged that region’s relatives in the hierarchy too: a strong effect lends its significance to the smaller fragments nested inside it and to the larger regions which contain it. These overlapping regions are redundant descriptions of one effect, and GLOW’s final step prunes them away, leaving output regions which capture all, and only, the voxels of a single effect’s extent.

Let BB denote the set of bloomed regions, those output to the user; every other significant region is pruned (Figure 4). A valid BB must meet two requirements. First, its regions must be pairwise disjoint: homogeneous effects cannot meaningfully overlap, so neither should the regions we report. Second, every significant region must intersect some member of BB; otherwise we would silently discard a significant result. Together these make BB a tree-cut (similar in spirit to Michel et al. (2012)).

Figure 4. The pruning result for the running example from Figure 2. Region 4 is bloomed (output to the user). The smaller regions nested inside it (0 and 1) and the larger region containing it (6) are pruned, their significance explained away by their overlap with region 4.

One natural choice of BB maximizes the likelihood of the observed images. Under this model each voxel follows the βr\beta_r of whichever bloomed region contains it, while a voxel in no member of BB follows the reduced model’s βr\beta_r, contributing a convenient LLR of zero. Spatial independence of the residuals makes the objective tractable: the log-likelihood ratio over all significant voxels is just the sum of the per-region ratios, ∑r∈BLLR⁡(r)\sum_{r\in B}\operatorname{LLR}(r). Maximizing this sum has a clean global optimum, reached by a bottom-up Dynamic Programming (DP) solution over the hierarchy (Guigues et al. (2006); Salembier & Garrido [12]).

The principled simplicity of DP is, however, too good to be true. Partition a region rr into disjoint pieces r1,…,rkr_1,\ldots,r_k, the whole-region LLR never exceeds the sum over those pieces:

LLR⁡(r)≤∑i=1kLLR⁡(ri).(20)\operatorname{LLR}(r) \le\sum_{i=1}^{k} \operatorname{LLR}(r_i). \tag*{(20)}

A single βr\beta_r cannot follow the differing spatial means of r1,…,rkr_1,\ldots,r_k, so pooling them adds to EE while subtracting from HH (see Appendix § 16). DP therefore sacrifices completeness: offered a whole region or a partition of it, DP never prefers the whole. This violates our stated goal of outputting one region per effect; § 7.2 confirms it empirically.

An alternative maximizes LLR greedily: bloom the significant region of maximum LLR, prune every region which intersects it, and repeat until no candidates remain. This errs in the opposite direction, sacrificing homogeneity: it favors a large region, which may absorb non-effect volume alongside an effect’s extent. GLOW adopts greedy pruning on the strength of its empirical results (§ 7.2). Forgoing the maximum-likelihood DP for its greedy approximation is uncomfortable8; § 8 blames the ghost of the invalid independence assumption.

Experiment

Evaluating detection performance requires ground truth: to call a significant voxel a true or false positive, and thus to compute sensitivity or PPV, we must know which voxels carry an effect. Real image sets do not supply it. To validate in conditions as close to real images as possible, we impose a synthetic effect

Results

of known extent onto real data. Imposing an effect also puts its character under our control: turning the effect’s LLR knob up, we watch detection performance change as effects grow from subtle to obvious.

We test on two image sets: White Gaussian Noise (WGN), which satisfies our modeling assumptions (independent and identically distributed Gaussian residuals), and diffusion MRI maps from the Human Connectome Project (HCP), which carry the realistic spatial structure of a brain. § 9 provides the HCP diffusion processing details and instructions on how to repeat our experiments.

Each trial aims to plant one effect. For either image set we first sample the effect’s extent, the set of voxels it will occupy. Starting from a single seed voxel chosen uniformly at random, we grow the extent to a target size, at each step annexing whichever neighboring voxel minimizes the resulting region’s spatial variance Tr⁡(S)\operatorname{Tr}(S) (Figure 5). We call it the MinVar extent.

Two extent shapes on each source: HCP MinVar, HCP sphere, WGN MinVar, and WGN sphere

Figure 5. The two extent shapes on each source, each of 2,500 voxels, planted on the same images: one seed’s extents (red) on a shared axial slice of one of those images (HCP: FA; WGN: noise).

On HCP the MinVar extent follows tissue, so its voxels share a mean and its spatial variance SS stays small; on WGN, which has no tissue to follow, it is a one-voxel-thick dendrite spread through the crop. We also plant a shape which ignores the images: a ball of the same size centered in the crop, grown by repeated face-connected dilation (an octahedron, the ball of the voxel grid’s own metric). Each sphere is planted on the same images as its MinVar twin. On HCP a sphere typically straddles tissue boundaries, so its voxel means differ and SS is large, and the offset which brings the whole region to its target LLR must be larger than a MinVar extent of the same size would need. Such a sphere is arguably not one effect but several: the voxels on either side of an anatomical boundary share the planted offset but not a common Yˉ\bar{Y}, and so not one GLM in the sense of § 3.1.

Within either extent the real images supply the starting data Y′Y'. We draw the regressors of interest at random from a standard normal, so any initial correlation between the images and XX is purely coincidental, and append a bias column of ones as the sole covariate. We then add a spatially constant offset Δ∈RN×b\Delta\in\mathbb{R}^{N \times b}, the same in every voxel of the extent, chosen to bring the region to a target LLR (Figure 6). Many offsets reach that target; we take the one with the smallest mean-squared change from the original images, keeping the perturbed image set as faithful to the original as we can. Appendix § 17 gives the optimization detail.

Figure 6. Imposing a synthetic effect. Green and red mark moderate and severe effects imposed onto the original image set, in blue. The left column gives one image of the original set alongside its modified versions at each effect strength, each labeled with the FA offset the effect induces, βx\beta x. The right column repeats this for another image, the one with maximum xx.

Results

Unless otherwise noted, all experiments use the following defaults. Each source (WGN or HCP) is cropped to a single connected sphere of 25,000 voxels (about a tenth of a full-brain volume at HCP resolution), with N=100N = 100 subjects. Each trial uses a single imaging feature (b=1b = 1), on HCP sampled from our six microstructural maps (FA, MD, MK, ICVF, ISOVF, and OD; see § 9); the detection experiments also run at b=2b = 2, drawing two of the maps per seed. Synthetic effects take the MinVar extent unless a sphere is named. The design matrix holds one regressor of interest and the bias column (a=2a = 2, a′=1a' = 1). Synthetic effects span 10% of the crop. We set effect strength with LLR-per-voxel, which is closer to ∣r∣|r|-invariant than raw LLR, sweeping eleven logarithmically spaced values from 0.003 to 0.3. Experiments which do not sweep effect strength use that grid’s midpoint, 0.03. Both sources sit on a 2 mm isotropic grid, so a kernel width in millimeters means the same on each. The voxel-wise baselines smooth every image with a 2 mm FWHM Gaussian kernel (Appendix § 18); GLOW does not smooth. GLOW uses ninner=250n_{\mathrm{inner}} = 250 inner permutations. Each configuration runs 50 random seeds. Significance testing for all methods bounds FWER at α=0.05\alpha= 0.05 using nfwer=500n_{\mathrm{fwer}} = 500 outer (Westfall-Young) permutations. That is fewer permutations than a single published study ought to use, but it buys us comprehensive testing across many contexts here.

All performance comparisons report Dice, sensitivity, and positive predictive value (precision) against the planted ground-truth extent, together with the homogeneity and completeness of § 3.1. We report PPV rather than specificity because effects cover only a small fraction of the volume: specificity is then dominated by the large true-negative pool and stays near one even for a method which flags many false positives (Maier-Hein et al., 2024).

With a single planted effect, homogeneity and completeness each reduce to a simpler question. Completeness asks whether the detection comes back as one region, and is nearly binary. A trial that returns one region leaves no uncertainty in RR for TT to resolve, so H(R)=0H(R) = 0 and the convention scores it 1. A trial that returns several regions scores near 0, however cleanly those regions tile the effect: both scores see detected voxels alone, so as detection gets cleaner nearly every detected voxel carries the same label T=1T = 1, and H(T)H(T) vanishes, taking the numerator I(R,T)≤H(T)I(R,T) \le H(T) with it. Mean completeness is therefore close to the proportion of trials which return a single region. Homogeneity asks whether the region boundaries separate effect voxels from false positives. It credits only what the split into regions tells a reader about TT beyond the detected volume taken as a whole, so a single mixed region scores 0 however much of it is effect, while many small pure regions score near 1. Put plainly, completeness rewards handing the detection back in one piece, homogeneity rewards pieces that are each all effect or all false positive, and neither counts how much of the effect was found, which Dice and sensitivity measure.

Tuning: Segmentation Objective

We compare the three Ward’s objectives of Table 1. Ideally a segmentation produces some region which matches the effect’s extent, so we score it by oracle Dice: the largest Dice overlap with the ground truth extent taken across every region of the hierarchy (Figure 7). Of course, oracle Dice cannot be computed in practice; we use it here to isolate segmentation quality.

Figure 7. Segmentation quality. Oracle Dice of the best-matching region in the hierarchy for each of the three Ward’s objectives (Table 1). Markers show the mean across random seeds; error bars give its 95% confidence interval (±1.96 standard errors of the mean).

MethodObjectiveRemoves components of ...
Naive∑r∣r∣∥Yˉr∥F2\sum_r |r|\lVert\bar{Y}_r\rVert_F^2none
GLM Error∑r∣r∣∥QTYˉr∥F2\sum_r |r|\lVert Q^{T}\bar{Y}_r\rVert_F^2GLM residuals
Focus∑r∣r∣∥Q1TYˉr∥F2\sum_r |r|\lVert Q_1^{T}\bar{Y}_r\rVert_F^2GLM residuals & Covariates

Table 1. Segmentation objectives: three varieties of Ward’s method.

Comfortingly, every objective’s oracle Dice climbs toward one as the effect strengthens.

On WGN data, discarding the GLM residuals before segmentation (as both GLM Error and Focus do) consistently improves Dice.

On realistic images (HCP), Focus performs admirably at high LLR, suggesting that the reduced model’s GLM error may indeed be a distraction. We suspect its relative underperformance at low LLR is an artifact of how we sample effect extents: they are grown to minimize spatial variance, which is exactly what Naive Ward’s minimizes. GLM Error, whose QQ retains that critical bias column 1⃗\vec{1} in the span of Q0Q_0, inherits much of the same advantage. Focus is left adrift here because it strips each voxel’s across-image mean (see the Focus discussion of § 4.2).

The GLM Error and Naive objectives are, we would argue, “cheating” here: they reproduce the very mechanism which sampled the effect extent. GLOW therefore uses Focus, on the strength of its high-LLR performance and the fairness concern with the alternatives.

Neither Focus’s strength at high LLR nor its weakness at low LLR appears on WGN data. There a much higher proportion of the GLM error is spatial variance SS (13), so there is less to gain by focusing on the Q1Q_1 component of Yˉr\bar{Y}_r.

Tuning: Region Pruning

We next compare the two pruning rules of § 4.4: greedily blooming the maximum-LLR significant region, or using Dynamic Programming (DP) to find the disjoint set of significant regions which maximizes likelihood. Segmentation and hypothesis testing cap the Dice any pruning rule can reach, as sometimes no strong candidate sits among the regions declared significant. To quantify that ceiling we add an “Oracle” rule, which selects the BB of maximum Dice. The rules share one input: each experiment (a seed, effect strength and source, WGN or HCP) is segmented and tested once, and every rule prunes from that same set of significant regions (Figure 8).

Figure 8. Pruning rule comparison, under the Focus segmentation objective. Markers show the mean across random seeds; error bars give its 95% confidence interval.

On Dice the two rules are hard to separate. HCP’s average is 0.551 for greedy against 0.537 for DP, with DP winning only 15% of seed-paired comparisons. On WGN they tie (0.326 each). On whether an output region holds all (completeness) and only (homogeneity) of one effect, the difference is stark. As effect strength rises on HCP, greedy does a fine job of collecting whole effects (completeness →1\to1) and DP does just the opposite. As § 4.4 anticipated, partitioning a region into smaller outputs can only raise the LLR which DP maximizes, so completeness suffers. The flaw runs deep: at strong enough effects every individual voxel of an extent is declared significant, and (20) leaves DP no reason to bundle them back together. DP’s homogeneity is certainly higher, though that counts for little in this single-effect setting. At strong effects, where Dice approaches one, almost every output voxel9 belongs to the one effect, leaving little uncertainty in TT for RR to resolve.

GLOW is therefore built on greedy pruning and Focus segmentation, sidelining a global optimum in favor of its approximation; § 8 traces that choice back to the false independence assumption in our LLR.

Type I Error Control

Before evaluating detection performance, we verify that GLOW controls the FWER. Under the null hypothesis (no imposed effect) we run 1,000 seeds of HCP and WGN images. We report the percentage of experiments which declared any region significant, the empirical FWER, against the nominal rate (Figure 9).

Figure 9. FWER control. Shading is the pointwise 95% interval for the true rejection rate given the 1,000 null seeds, so a calibrated method’s band brackets the dashed ideal.

On both sources the empirical rejection rate tracks the nominal α\alpha across its whole range, the 95% band bracketing the ideal line (4.8% on HCP and 5.1% on WGN at α=0.05\alpha= 0.05), so at these 1,000 seeds GLOW’s FWER under the global null is indistinguishable from nominal.

That is weak control. Strong control asks more: in an image which does hold an effect, the chance of rejecting any region containing none of it must still not exceed α\alpha. The detection experiments of Section 5.4 measure this directly, since an output region without a single planted voxel is a false rejection of a true null. Table 2 counts the trials which return one. On HCP GLOW’s count never exceeds 5 of 50, indistinguishable from nominal (one-sided binomial p≥0.10p \ge0.10), though suggestive. On WGN the count holds at or near zero through the weaker effects, then climbs with strength to as many as 25 of 50, well above α\alpha. That climb is the risk anticipated in Section 3.3: the effect itself raises the null regions’ chance of reaching significance. VBA’s and CET’s counts do not move with strength, their false regions being the same few seeds’ null clusters throughout; VBA-TFCE’s vary more, and on WGN MinVar at b=2b = 2 it too exceeds α\alpha at each of the six strongest effects (6 to 9 of 50).

HCPWGN
LLR/∣r∣|r|MinVarSphereMinVarSphere
b=1b=1b=2b=2b=1b=1b=2b=2b=1b=1b=2b=2b=1b=1b=2b=2
0.018910100030
0.030010110020
0.047511100051
0.075410317241
0.119410319456
0.18931254101196
0.300022531625119

Table 2. GLOW trials (of 50) returning a region which holds no planted voxel, a false rejection of a true null. Bold where the count exceeds α=0.05\alpha= 0.05 (one-sided binomial p<0.05p < 0.05, i.e. 6 or more). The four weakest strengths of the grid (0.0030 to 0.0119) are omitted: every count there is 0 or 1.

GLOW therefore controls FWER in the weak sense, but on white noise not in the strong sense. A further region reported alongside an obvious effect deserves less confidence than its significance suggests.

Detection Performance

We compare GLOW against the voxel-wise baselines (VBA, CET, and VBA-TFCE) on detection metrics (Dice, Sensitivity, and PPV) as well as segmentation scores (Completeness and Homogeneity). Each voxel-wise method uses the statistic and smoothing kernel which jointly optimize its mean Dice on HCP (Appendix D). All three smooth at 2 mm FWHM and use Wilks’ Lambda, VBA-TFCE after per-voxel z-scoring; under our single-regressor contrast VBA and CET are invariant to the choice of statistic anyway. CET uses an initial cluster-forming threshold of 10−310^{-3}, as recommended by Woo et al. [27]; TFCE

Detection Performance

uses extent and height exponents e=0.5e = 0.5 and h=2h = 2, the standard three-dimensional settings [15].

We sweep effect strength in four modes, crossing the two sources with the two extent shapes of § 5, at b=1b = 1 and b=2b = 2. Figure 10 summarizes every cell as GLOW’s Dice minus that of the baseline with the best mean Dice there, paired by seed; Figure 11 and Figure 12 give the curves behind it.

Figure 10. GLOW’s Dice minus the best baseline’s, by source, extent shape, bb and effect strength. The best baseline is the one with the highest mean Dice in that cell (letter: V for VBA, T for VBA-TFCE, C for CET), and each entry is the mean of the 50 seed-paired differences, bold where its 95% confidence interval excludes zero.

Figure 11. Detection performance versus effect strength (b=1b = 1), one metric per row and one source and extent shape per column. Each curve is the mean across random seeds, shaded with the 95% confidence interval of that mean. PPV, completeness and homogeneity average over the trials which detect some effect voxel.

Figure 12. Fig 11 at b=2b = 2.

The source decides GLOW’s standing. On HCP, GLOW leads on Dice wherever the effect is hard to see and ties once it is easy: averaged over the effect strengths below LLR/∣r∣=0.03\mathrm{LLR}/|r| = 0.03 it gains 0.059 (MinVar extent, b=1b = 1 and 2), up to 0.16 in a single cell, and from LLR/∣r∣=0.03\mathrm{LLR}/|r| = 0.03 up it stays within 0.04 of the best baseline in every HCP cell. On WGN it trails from moderate strengths up, by as much as 0.34 on the MinVar extent and 0.61 on the sphere; at strong effects its Dice plateaus while the best baselines converge to 1.00. At a given nominal LLR/∣r∣\mathrm{LLR}/|r| the HCP sphere is easier to detect than the other three cells. A sphere straddling tissue boundaries has voxels whose means differ; fit with a common mean, that spread enters the error as the spatial variance SS (13), so reaching a given LLR/∣r∣\mathrm{LLR}/|r| takes a larger offset than a MinVar extent would need. A voxel-wise test fits each voxel its own mean, so it sees the larger offset without the spread: recomputed with each voxel centered on its own mean, the same region’s LLR/∣r∣\mathrm{LLR}/|r| is a median 2.7 times its nominal value across the HCP sphere’s trials at b=1b = 1 (2.3 at b=2b = 2), against 1.3 for the MinVar extent on HCP and 1.0 on WGN, where voxel means do not differ.

On WGN neither shape meets an anatomical boundary, so both carry the same per-voxel strength. What still separates them is their geometry, which matters to the baselines because they pool signal over

Detection Performance

neighboring voxels: all three smooth the images, and CET and TFCE also pool statistics over clusters. A compact sphere gains from that pooling, while a one-voxel-thick dendrite (the MinVar extent on WGN) loses by it. At LLR/∣r∣=0.0189|r| = 0.0189, VBA-TFCE’s Dice is 0.67 on the sphere against 0.01 on the dendrite, while GLOW’s rises only from 0.03 to 0.11.

Completeness separates GLOW from the baselines on the MinVar extent. Among trials that detect anything, GLOW returns the effect as one region on 57% of HCP trials against the best baseline’s 35% (45 against 40% on WGN), and through the HCP mid-range of effect strengths (LLR/∣r∣|r| from 0.0189 to 0.0754) it beats the best baseline’s completeness in 70% of seed-paired comparisons. Completeness here is close to the share of trials which return a single region (across all cells the two correlate at 0.990). This is the property § 3.1 asks for and the one Dice cannot see: on such an effect the baselines recover comparable volume but hand it back in pieces rather than as a whole region. On the HCP sphere, which § 5 argues is several effects rather than one, the gap closes: CET returns it as one region as often as GLOW at b=1b = 1 (70% each) and more often at b=2b = 2 (70 against 49%).

Wholeness costs precision. GLOW is the more aggressive detector on HCP: its sensitivity beats the best alternative by up to 0.24 on the MinVar extent and 0.29 on the sphere, and its PPV is lower at all eleven effect strengths of both, on the MinVar extent winning only 9 of the 402 seed-paired comparisons in which both GLOW and a baseline detect something.

GLOW’s PPV loss on HCP is largely undersegmentation: a region captures an effect and then keeps growing, bundling non-effect volume along with it. The alternative explanation, that these false positives make up wholly spurious regions, barely applies on HCP. Averaged over GLOW’s false positive voxels, the region a false voxel sits in holds 72% of the planted MinVar extent (64% of the sphere), and only 12 of the 1,793 regions GLOW returned on it hold none of the effect. This is exactly the error § 4.4 predicted of greedy pruning.

It is also why homogeneity runs the other way: on HCP, VBA holds above 0.95 until the effect is strong enough for its smoothed pieces to merge, while GLOW falls from 0.50 to 0.04 by the middle strength effect. Through the HCP mid-range, 99.7% of VBA’s regions lie wholly inside the planted extent against 17% of GLOW’s, at a median of 40 regions against GLOW’s 2. The baselines return many pure pieces of one effect; GLOW returns few pieces that straddle its boundary.

On WGN the deficit lies in the test rather than the tree. The best single node of GLOW’s own Focus hierarchy matches the MinVar extent about as well on WGN as on HCP (oracle Dice 0.52 against 0.55 at LLR/∣r∣=0.0189|r| = 0.0189; Figure 7), yet GLOW declares any region significant in 9 of 50 WGN trials there against 44 of 50 on HCP, at a median smallest pp-value of 0.18 against 0.004. GLOW’s segmentation, running on both the original and the permuted images, identifies the region whose GLM candidate is most compelling. On HCP data, where the images are smooth, a region’s neighbors offer limited variety from which to assemble a consistent GLM under the null hypothesis. WGN, on the other hand, has ample choice to construct a strong statistic under the null hypothesis, more so on the MinVar extent, whose dendritic tour of the volume offers more neighbors to choose from. GLOW catches up only once the effect is strong, and then by returning a region larger than the effect, so its WGN PPV stays at 0.66 to 0.92 from LLR/∣r∣|r| = 0.075 up.

On HCP, by contrast, the cause of the undersegmentation (low PPV) is mostly upstream of the pruning rule. Figure 13 (left) plots PPV against a budget of kk output regions for two Oracles, each choosing, with knowledge of the ground truth, at most kk regions whose union maximizes Dice against the planted effect. The first draws only from the FWER-significant regions, the same pool greedy ranks, so no pruning rule could beat it at the same region count; the second draws from any node of the Ward tree. Stepping from GLOW’s output to the first Oracle therefore measures what the pruning rule leaves behind; from the first Oracle to the second, what the significance test withheld; and from the second up to VBA’s PPV, what the segmentation never offered. At weak effects (LLR/∣r∣|r| = 0.0189, MinVar extent) greedy returns a PPV of 0.608 from a mean of 6.6 regions (median 1); with a budget of k=10k = 10 regions the first Oracle reaches 0.686, the second 0.732, and VBA reaches 0.998. Of the 0.390 separating greedy from VBA, greedy pruning accounts for 20%, the significance test for a further 12%, and the segmentation for the remaining 68%. In other words, at weak effects pruning can only do so much when segmentation does not isolate the effect’s extent somewhere in the tree.

Figure 13. The PPV available to a pruning rule, and to the tree it prunes, for the MinVar extent at b=1b = 1, over the same seeds as Figure 11. Each line gives the PPV of the union of at most kk regions, chosen with knowledge of the ground truth to maximize Dice with the planted extent. Solid lines choose from the FWER-significant regions alone, the pool GLOW’s greedy rule ranks; dashed lines choose from every node of the Ward tree. Circles mark GLOW’s own operating point, its mean region count against its mean PPV. All three are averaged over the trials in which GLOW discovered something. Both Oracles maximize Dice rather than PPV, so the wider pool is not guaranteed to be the more precise one.

Computation

As described thus far, GLOW is sorely in need of computational optimization. The central challenge is computing log-likelihood ratios for a hierarchical segmentation quickly. A region’s LLR needs its EE and HH matrices (13, 14), which depend only on ∣r∣|r|, YTYY^{T}Y and Yˉ\bar{Y}. Given these sufficient statistics for two regions, those of their union follow immediately. We may therefore walk the tree in topological order, from single voxels up to the whole image, at a per-region cost which no longer grows with region size ∣r∣|r|.

Better yet, re-indexing the voxels in the tree’s depth-first order leaves every region spanning a contiguous range of voxel indices. Each of ∣r∣|r|, Y′TY′Y^{\prime T}Y^\prime and Yˉr\bar{Y}_r is then the difference between two entries of a single cumulative sum over the voxels, the standard prefix-sum trick.

Even so, the inner calibration of Section 3.3 multiplies this workload: every region of every outer (FWER) permutation needs its own ninnern_{\mathrm{inner}} inner permutations to estimate the mean and standard deviation that studentize its LLR (19). A fit therefore pays for nfwern_{\mathrm{fwer}} tree builds, each carrying ninner+1n_{\mathrm{inner}}+1 LLR computations per region. This multiplier, not the clustering, separates GLOW’s wall time from a voxel-wise test’s.

To characterize compute time, we timed each method’s fit on HCP images at analysis-crop sizes ranging from 1,000 to 224,619 voxels (the full connected HCP support), with a single imaging feature (b=1b = 1). A moderate effect (per-voxel LLR of 0.03 over 10% of the crop) was imposed so the pruning step had a genuine effect to process. Each fit ran nfwer=500n_{\mathrm{fwer}} = 500 outer (Westfall-Young) permutations, GLOW additionally drawing ninner=250n_{\mathrm{inner}} = 250 inner permutations per region. Every method parallelized its permutation walk across all cores of one workstation (Intel i9-14900K, 24 cores / 32 threads) with a single consumer-grade NVIDIA RTX 4060 GPU; the reported wall time is what a user on such a machine waits for. All methods were tuned, to the author’s limited capability, to their best on that machine. GLOW’s wall time was bound by the GPU computing its LLRs: just 10 threads feeding it hierarchical segmentations were enough to saturate its bandwidth. At the full support GLOW takes about four and a half times as long as the voxel-wise methods.

Fig 14 shows GLOW scaling roughly linearly with voxel count. Two things make that possible: the LLR savings above, and constraining segmentation merges to neighboring regions alone (left unconstrained, Ward’s method scales as the square of the number of voxels [1]). Extrapolating that linear growth to the full HCP support (225k voxels) at 5,000 permutations, we estimate a GLOW fit at 74 minutes against 16 to 17 minutes for each baseline.

A wall time measured on all cores conflates how the algorithm grows with how well the machine parallelizes it. To isolate the growth we re-timed GLOW alone on a single pinned core, with no GPU and BLAS held to one thread, at nfwer=1n_{\mathrm{fwer}} = 1 (Figure 15).

Figure 15. GLOW’s per-permutation cost, timed on one core with no GPU and BLAS pinned to one thread. Panels sweep voxel count ∣V∣|V|, inner draws per tree ninnern_{\mathrm{inner}}, imaging features bb and subjects NN, each holding the rest at the shared center (25,000 voxels, one outer permutation, b=1b = 1, the full cohort). Median over three HCP crops (band: min to max) on a shared wall-time axis; titles give the fitted log-log slope, for ∣V∣|V| over its largest decade as in Figure 14.

Figure 14. Wall-clock fit time versus analyzed voxel count, on log-log axes. Each curve is the median over three HCP crops (shaded band: min to max). Each legend entry gives that method’s fitted log-log slope over the largest voxel counts (22,462 voxels and up). Note these times use nfwer=500n_{\mathrm{fwer}} = 500 outer permutations.

Per permutation, cost grows roughly linearly in voxel count and a little sublinearly in the inner draws, is nearly free in the number of subjects, and rises most steeply in the number of imaging features bb.

Discussion

GLOW’s advantage is concentrated where an effect is hard to see, and on real images: on HCP it leads on Dice below LLR /∣r∣=0.03/|r| = 0.03 and ties above it, while on white noise it trails from moderate strengths up. Part of that lead on subtle effects may come from the baselines’ kernel width: each runs at the single width that maximizes its mean Dice pooled over effect strengths, while subtle effects favor a wider one (Appendix § 18). A wider kernel would narrow GLOW’s lead on subtle effects, but would cost the baselines more Dice on strong effects than it gains on weak effects. GLOW, by contrast, has no kernel to tune, so it never needs a guess at the effect’s strength or geometry in advance. Compared to voxel-wise baselines, it does a better job handing a spatially consistent effect’s whole extent back to the user (the completeness gap of § 7.4), at the cost of bundling more tagalong false positive voxels along with it. GLOW’s keystone ingredient is that it reads imaging features across voxels when judging which GLMs are viable. VBA does great work with per-voxel statistics, but a per-voxel statistic can only characterize so much (Figure 1). Where an effect is strong enough to be noticed in each of its voxels alone, VBA does a great job. Where it is subtle enough to need repeated observation across voxels, GLOW shines.

Detection aside, per-voxel statistics make it hard to construct regions holding all, and only, the voxels of one consistent GLM. Adjacency among significant voxels may be too permissive a criterion for the job. Much has been written about a cluster’s poor spatial specificity, that its extent licenses no claim about which of its voxels carry the effect [11, 27]. There is a second difficulty: should two distinct effects happen to lie side by side, adjacency alone will not tell them apart. A sphere planted across a tissue boundary is such a case: a per-voxel test, fitting each voxel its own mean, cannot see the boundary, while GLOW’s region LLR can, since pooling the two sides adds their difference in means to EE (24). The Focus objective, which strips each voxel’s mean, does not segment along it, however. A hierarchical segmentation may offer a fruitful vantage point on the problem.

The pruning step presented here takes the common statistical approach of maximizing likelihood, and many of GLOW’s troubles trace back to the model generating that likelihood (independent and identically distributed Gaussian residuals):

LLR=N∣r∣2log⁡∣E+H∣∣E∣(21)\mathrm{LLR} = \frac{N|r|}{2}\log\frac{|E+H|}{|E|} \tag*{(21)}

The N∣r∣N|r| factor encapsulates the repeated measurements of a GLM’s deviation from H0H_0; it is the row count of the stacked regression of Y′Y' on X′X' (8). Given another NN images of unrelated subjects showing the same GLM, we would rightly double the LLR. It is concerning that adding ∣r∣|r| consistent voxels has the same impact. Correlation across space explains away part of the repeated measure: the extra voxels may only be mimicking their neighbors rather than independently pointing at one underlying GLM. This raises the essential question: how many independent observations does a region of size ∣r∣|r| over NN images actually provide? TFCE answers implicitly through its e=0.5e=0.5 and h=2h=2 exponents, trading a signal’s spatial extent against its height. CET does the same with its cluster-forming threshold: higher initial thresholds favor localized effects. VBA’s initial smoothing is clumsy here, requiring one kernel width be chosen a priori even though the optimal width depends on the effect’s strength (Appendix § 18) and geometry (compact effects prefer wider kernels than branching ones). Compounding the difficulty, any answer must depend on the image’s resolution and spatial autocorrelation, which varies across it, as some anatomy is more consistent than the rest (Hayasaka et al., 2004). Regardless, GLOW is the most naive of all, taking the N∣r∣N|r| count at face value.

At some point a method must decide which is less consistent under H0H_0: an intense GLM observed in a handful of voxels or a subtler GLM observed across many more. Let us follow this question, and the spatial independence assumption, through GLOW’s three steps.

(1) In practice the segmentation caps GLOW’s performance on real imaging data: at weak effects on HCP, most of the PPV GLOW leaves on the table lies beyond any pruning rule’s reach, because no node of the tree isolates the effect’s extent Figure 13. Modeling spatial autocorrelation might raise that ceiling.

(2) The studentization of (19) allows the hypothesis testing to largely sidestep this question. Observed regions are compared to permuted versions of themselves which, critically, have the same size and spatial autocorrelation (thanks to block-exchangeability).

(3) Spatial independence has profound consequences for the pruning method. It makes the likelihood additive across disjoint regions, so no preference is afforded to an intense, localized effect over a diffuse one carrying the same total. Dynamic Programming feels this as (20), where a region’s LLR never exceeds the sum over any partition of it, so the global optimum always fragments; greedy feels it as a raw LLR which grows with ∣r∣|r|, so its argmax overshoots the extent. GLOW backs away from the clean global optimum in favor of the greedy placeholder only because the second failure is the more forgiving of the two (§ 7.2).

A model which captures spatial dependence, such as a conditional autoregressive (CAR) prior (Besag, 1974), may improve the segmentation and lift these limits. An LLR which priced a region’s own spatial dependence might also be comparable across region sizes on its own, retiring the inner permutation loop which dominates GLOW’s runtime (§ 7.7).

Data & Code Availability

GLOW is implemented in Python 3 and is available for use and modification (MIT license) at github.com/matthigger/glow. The GLOW package would not have been possible without scikit-learn [7], NumPy (Harris et al., 2020), SciPy [21], nibabel [4], numba (Lam et al., 2015), PyTorch (Ansel et al., 2024) and joblib [4]; numba compiles the segmentation walk and PyTorch runs the GPU LLR kernels of § 7.7. Figures are drawn with matplotlib (Hunter, 2007) and seaborn [23].

For validation, we used the 3T diffusion images of the “100 unrelated subjects” in the HCP dataset (balsa.wustl.edu, updated August 2025). Data were provided by the Human Connectome Project, WU-Minn Consortium (Principal Investigators: David Van Essen and Kamil Ugurbil; 1U54MH091657) funded by the 16 NIH Institutes and Centers that support the NIH Blueprint for Neuroscience Research; and by the McDonnell Center for Systems Neuroscience at Washington University.

Our pre-processing pipeline (github.com/matthigger/hcp100-dki-noddi-mni, v1.1.0, archived at doi.org/10.5281/zenodo.20736203) reconstructs six microstructural maps per subject from the HCP diffusion images, orchestrated reproducibly at scale with BABS (Zhao et al., 2024) over the QSIRRecon workflow (Cieslak et al., 2021). DIPY’s diffusion-kurtosis fit [3] (Garyfallidis et al. 2014) (shells with bb-value ≤2000 s/mm2\le2000\ \mathrm{s}/\mathrm{mm}^{2}) yields fractional anisotropy (FA: directional coherence of water diffusion), mean diffusivity (MD: overall diffusion magnitude), and mean kurtosis (MK: non-Gaussianity of diffusion, reflecting microstructural complexity). AMICO (Daducci et al., 2015) fits the NODDI model (Zhang et al., 2012) to the full multi-shell data, yielding the intra-cellular volume fraction (ICVF: neurite density), the isotropic volume fraction (ISOVF: free-water content), and the orientation dispersion index (OD: angular spread of neurites). All maps are resampled to a common MNI template, registered with ANTs (Avants et al., 2011, 2025).

The resulting image set (doi.org/10.5281/zenodo.20736221) is available thanks to the WU-Minn HCP Open Access Data Use Terms, which permit redistribution of HCP-derived data (provided it is shared under those same terms). Every experiment given here can be re-generated programmatically; see the instructions at glow/_extra/benchmark/rerun.md in the repository. The provenance records behind every figure and table (one JSON per computed result, holding its inputs, score and timing) are archived at doi.org/10.5281/zenodo.22664285; the figures and tables redraw from them without the imaging data. The software also includes a dashboard-style viewer, which shows several regions of the hierarchical segmentation at once alongside their GLM models, their extents overlaid on the original images (glow-viewer.web.app).

Ethics

This study is a secondary analysis of de-identified, publicly released data and involved no new data collection. The Human Connectome Project diffusion data were acquired with Washington University Institutional Review Board approval and participants’ written informed consent [20]. Their secondary use here was reviewed by the Northeastern University Institutional Review Board and determined exempt (protocol #26-05-08, exempt category 4).

Author Contributions

All work was carried out by Matt Higger.

Funding

This work received no grant funding.

Declaration of Competing Interests

The author reports no conflicts of interest.

Declaration of the use of AI

Anthropic’s Claude (Anthropic, 2026) was used as a coding assistant for portions of the GLOW software implementation and to help draft and revise the language of this manuscript; AI-assisted commits are labeled in the git commit messages. Claude derived the justification of (20) in Appendix § 16 and identified that the candidate MANCOVA statistics are equivalent under VBA and CET (Appendix § 18); the author verified both. No AI system generated the experimental results. All AI-assisted text and code were reviewed and verified by the author, who takes full responsibility for the content of this work.

Maximized Log-Likelihood of Normal Samples

Let Y∈RN×bY \in\mathbb{R}^{N \times b} represent a set of NN vectors drawn from some unknown normal distribution. The maximum-likelihood estimators μ^=1N∑iyi\hat{\mu} = \frac{1}{N}\sum_i y_i and Σ^=1N∑i(yi−μ^)(yi−μ^)T\hat{\Sigma} = \frac{1}{N}\sum_i (y_i-\hat{\mu})(y_i-\hat{\mu})^T provide:

∑i=1N(yi−μ^)TΣ^−1(yi−μ^)=Tr⁡∑i=1N(yi−μ^)(yi−μ^)TΣ^−1=NTr⁡Σ^Σ^−1=Nb(22)\sum_{i=1}^{N}(y_i-\hat{\mu})^T\hat{\Sigma}^{-1}(y_i-\hat{\mu})=\operatorname{Tr}\sum_{i=1}^{N}(y_i-\hat{\mu})(y_i-\hat{\mu})^T\hat{\Sigma}^{-1}=N\operatorname{Tr}\hat{\Sigma}\hat{\Sigma}^{-1}=Nb \tag*{(22)}

It follows that the log-likelihood (Bishop, 2006) of all samples under the fitted distribution is:

log⁡P(Y∣μ^,Σ^)=−Nb2log⁡(2π)−N2log⁡∣Σ^∣−12∑i=1N(yi−μ^)TΣ^−1(yi−μ^)=−Nb2(1+log⁡(2π))−N2log⁡∣Σ^∣(23)\begin{aligned} \log P(Y\mid\hat{\mu},\hat{\Sigma})&=-\frac{Nb}{2}\log(2\pi)-\frac{N}{2}\log\lvert\hat{\Sigma}\rvert-\frac{1}{2}\sum_{i=1}^{N}(y_i-\hat{\mu})^T\hat{\Sigma}^{-1}(y_i-\hat{\mu})\\ &=-\frac{Nb}{2}(1+\log(2\pi))-\frac{N}{2}\log\lvert\hat{\Sigma}\rvert \tag*{(23)} \end{aligned}

Error and Hypothesis Under Region Pooling

Consider again a region rr partitioned into disjoint regions r1,…,rkr_1,\ldots,r_k, writing ErE_r and HrH_r for (13) and (14) evaluated on rr. The mechanism behind (20) is visible in the GLM error ErE_r, the total sum of squares, Tr=∑v∈rYvTYvT_r=\sum_{v\in r}Y_v^T Y_v, minus the variance explained by QQ:

Er=Tr−∣r∣YˉrTQQTYˉr=∑i(Eri+∣ri∣YˉriTQQTYˉri)−∣r∣YˉrTQQTYˉr=∑iEri+∑i∣ri∣(Yˉri−Yˉr)TQQT(Yˉri−Yˉr)(24)\begin{aligned} E_r&=T_r-\lvert r\rvert\bar{Y}_r^TQQ^T\bar{Y}_r\\ &=\sum_i\left(E_{r_i}+\lvert r_i\rvert\bar{Y}_{r_i}^TQQ^T\bar{Y}_{r_i}\right)-\lvert r\rvert\bar{Y}_r^TQQ^T\bar{Y}_r\\ &=\sum_i E_{r_i}+\sum_i\lvert r_i\rvert(\bar{Y}_{r_i}-\bar{Y}_r)^TQQ^T(\bar{Y}_{r_i}-\bar{Y}_r) \tag*{(24)} \end{aligned}

where the second equality uses Tr=∑iTriT_r = \sum_i T_{r_i} and each TriT_{r_i} is given by the first equality. The last equality uses ∣r∣Yˉr=∑i∣ri∣Yˉri|r|\bar{Y}_r = \sum_i |r_i|\bar{Y}_{r_i}. The reduced model’s error, E+HE + H, also obeys (24) with Q0Q_0 in place of QQ:

Er+Hr=∑i(Eri+Hri)+∑i∣ri∣(Yˉri−Yˉr)TQ0Q0T(Yˉri−Yˉr)(25)E_r + H_r = \sum_i (E_{r_i} + H_{r_i}) + \sum_i |r_i|(\bar{Y}_{r_i} - \bar{Y}_r)^T Q_0 Q_0^T(\bar{Y}_{r_i} - \bar{Y}_r) \tag*{(25)}

Subtracting (24) from (25) gives:

Hr=∑iHri−∑i∣ri∣(Yˉri−Yˉr)TQ1Q1T(Yˉri−Yˉr)(26)H_r = \sum_i H_{r_i} - \sum_i |r_i|(\bar{Y}_{r_i} - \bar{Y}_r)^T Q_1 Q_1^T(\bar{Y}_{r_i} - \bar{Y}_r) \tag*{(26)}

Because QQTQQ^T and Q1Q1TQ_1Q_1^T are projections, both corrections are positive semi-definite: pooling can only add to the error and only subtract from the hypothesis, with equality when every block’s spatial mean agrees with Yˉr\bar{Y}_r within the column space of XX. LLR (7) grows with HH and shrinks with EE, so the whole region’s ratio ∣Er+Hr∣/∣Er∣|E_r + H_r|/|E_r| cannot exceed the one its parts form together, ∣∑i(Eri+Hri)∣/∣∑iEri∣|\sum_i(E_{r_i} + H_{r_i})|/|\sum_i E_{r_i}|. Reaching (20) itself would further require accounting for the weight N∣ri∣N|r_i| each part carries in (7), which we leave aside.

Imposing an Effect: Constant Offset

For simplicity, we add a constant offset Δ∈RN×b\Delta\in\mathbb{R}^{N \times b} to each YvY_v within the region. Rather than impose an arbitrary effect direction β\beta,^10 we scale the existing components of Yˉr\bar{Y}_r until the region attains the desired effect strength. Letting Q2Q_2 denote any orthonormal basis for the residual space (the orthogonal complement of XX’s column space, so that Q2Q2T=IN−QQTQ_2Q_2^T = I_N - QQ^T), we decompose:

Yˉr=∑i=02QiQiTYˉr(27)\bar{Y}_r = \sum_{i=0}^{2} Q_i Q_i^T \bar{Y}_r \tag*{(27)}

so that our offset is:

Δ=∑i=02αiQiQiTYˉr(28)\Delta= \sum_{i=0}^{2} \alpha_i Q_i Q_i^T \bar{Y}_r \tag*{(28)}

where αi∈R\alpha_i \in\mathbb{R}. Orthonormality gives a convenient formulation of our minimization objective:

∥Δ∥F2=∑i=02αi2∥QiTYˉr∥F2(29)\|\Delta\|_F^2 = \sum_{i=0}^{2} \alpha_i^2 \|Q_i^T \bar{Y}_r\|_F^2 \tag*{(29)}

Next, we quantify the constraint that Δ\Delta impose a given LLR. Substituting Yv+ΔY_v + \Delta for every YvY_v modifies the earlier expressions for EE (13) and HH (14):

E=S+∣r∣(1+α2)2YˉrTQ2Q2TYˉr(30)E = S + |r|(1 + \alpha_2)^2 \bar{Y}_r^T Q_2 Q_2^T \bar{Y}_r \tag*{(30)}
H=∣r∣(1+α1)2YˉrTQ1Q1TYˉr(31)H = |r|(1 + \alpha_1)^2 \bar{Y}_r^T Q_1 Q_1^T \bar{Y}_r \tag*{(31)}

from which the LLR (7) follows.

Because the offset is constant across space, it has no impact on the spatial covariance SS (11). Notice, too, that α0\alpha_0 appears in neither equation above. The columns of Q0Q_0 hold the nuisance variables, whose correlations are projected away before the analysis; offsetting Δ\Delta along those directions only inflates the objective ∥Δ∥F2\lVert\Delta\rVert_F^2 without moving the LLR, so the optimum sets α0=0\alpha_0 = 0.

In summary, we choose α1\alpha_1 and α2\alpha_2 to minimize the offset norm (29) subject to a single constraint: the resulting LLR, computed from (30), (31) and (7), must match the user-provided target. We solve this constrained optimization with the Sequential Least Squares Programming (SLSQP) optimizer in SciPy [21].

Tuning the Voxel-wise Baselines

Each voxel-wise baseline (VBA, VBA-TFCE and CET) carries two choices, its statistic and its smoothing kernel, which we tune jointly: picking one at a time would assume the other’s answer.

Statistic. Four classical MANCOVA statistics generalize the univariate FF-statistic: Wilks’ Lambda (entered as 1−Λ1-\Lambda, so it grows with evidence against H0H_0), Pillai’s Trace, Hotelling–Lawley Trace and Roy’s Largest Root [9]. The fifth candidate is GLOW’s LLR (7) on a single-voxel region. Each also has a zz-scored variant, which standardizes every voxel’s statistic by its mean and standard deviation across the nfwer+1n_{\mathrm{fwer}}+1 permutation rows, the unpermuted row included [8], before the max-statistic null; this puts HCP’s spatially heterogeneous voxels on a common scale.

Kernel. Before the statistic is computed, every image is smoothed with an isotropic Gaussian of FWHM 0, 2, 4, 8 or 12 mm (0, 1, 2, 4 or 6 voxels). The kernel reads beyond the analyzed crop, and the smoothed images are divided by the identically smoothed brain mask so voxels at the brain’s edge are not dimmed.

Selection. Each baseline takes the best mean Dice of its 50 variants (5 statistics ×\times 2 scalings ×\times 5 kernels) over HCP experiments at b=1b=1: five effect strengths (0.003, 0.0075, 0.03, 0.12 and 0.3) crossed with 10 seeds, other settings at the defaults of Section 5.

With one regressor of interest, HH (6) has rank one, so every candidate is an increasing function of its one non-zero eigenvalue θ\theta: 1−Λ1-\Lambda and Pillai’s Trace equal θ/(1+θ)\theta/(1+\theta), Hotelling–Lawley and Roy equal θ\theta, and the LLR is N2log⁡(1+θ)\frac{N}{2}\log(1+\theta). An increasing map preserves the ordering of every voxel’s statistic, which is all VBA and CET read, so unscaled VBA is exactly invariant to the choice and CET nearly so11. VBA-TFCE integrates the statistic’s magnitude, and at 2 mm prefers z-scored Wilks’ Lambda (equivalently Pillai’s Trace); VBA and CET adopt the same statistic, unscaled. The preference holds at b=2b = 2, where HH is still rank one (Table 4).

MethodScalingLLRWilksPillaiHotellingRoy
VBAraw0.4110.4110.4110.4110.411
z-scored0.4090.4090.4090.4100.410
VBA-TFCEraw0.4640.4930.4930.4110.411
z-scored0.5030.5090.5090.4980.498
CETraw0.4920.4920.4920.4920.492
z-scored0.4900.4900.4900.4900.490

Table 4. Mean Dice over 250 unsmoothed experiments (HCP, MinVar extent, b=2b = 2, five effect strengths ×\times 50 seeds).

All three baselines peak at 2 mm pooled over effect strengths (the mean rows of Table 3), but that width wins only two of the fifteen pairings of baseline and strength. The best width shrinks as effect strength rises, from 4 to 12 mm at the weakest effects to no smoothing at the strongest: smoothing buys sensitivity with spatial precision, and a strong effect needs little of the first. Tuning the width per strength would make each baseline a function of the unknown truth, so each runs at its single best width.

MethodLLR/∣r∣\lvert r\rvert024812
VBA0.0030.0020.0040.0110.0230.031
0.00750.0310.0410.0870.1160.118
0.030.2420.2770.3930.4300.397
0.120.8480.8660.7870.6740.597
0.30.9950.9920.8100.6510.559
mean0.4240.4360.4170.3790.341
VBA-TFCE0.0030.0200.0340.0510.0470.039
0.00750.1280.1450.1850.1690.152
0.030.5710.6200.6170.5250.421
0.120.9800.9700.7970.6590.574
0.30.9970.9620.7380.6010.526
mean0.5390.5460.4780.4000.342
CET0.0030.0270.0390.0700.0820.070
0.00750.1200.1400.2180.2250.183
0.030.5050.5670.6130.5460.454
0.120.9710.9670.8060.6630.579
0.30.9990.9780.7560.6090.531
mean0.5240.5380.4920.4250.363

Table 3. Mean Dice against kernel width over the 50 tuning experiments (HCP, MinVar extent, b=1b = 1), each baseline at its chosen statistic, per effect strength (10 seeds per entry) and pooled over strengths (mean rows). Bolded entries are each row’s maximum. Each strength row is shaded in its baseline’s color, linearly in Dice, from white at the row’s minimum to darkest at its maximum.

References

  1. [1]Müllner, D. (2011). Modern hierarchical, agglomerative clustering algorithms. arXiv preprint arXiv:1109.2378.arxiv.org/abs/1109.2378
  2. [2]Murtagh, F., & Legendre, P. (2014). Ward’s hierarchical agglomerative clustering method: Which algorithms implement ward’s criterion? Journal of Classification, 31(3), 274–295.DOI
  3. [3]Neto Henriques, R., Correia, M. M., Marrale, M., Huber, E., Kruper, J., Koudoro, S., Yeatman, J. D., Garyfallidis, E., & Rokem, A. (2021). Diffusional kurtosis imaging in the diffusion imaging in Python project. Frontiers in Human Neuroscience, 15, 675433. https://doi.org/10.3389/fnhum.2021.675433
  4. [4]NiBabel Developers. (2025). NiBabel: Neuroimaging file format access in python [GLOW requires version 5.1 or later]. https://doi.org/10.5281/zenodo.591597
  5. [5]Nichols, T., & Hayasaka, S. (2003). Controlling the familywise error rate in functional neuroimaging: A comparative review. Statistical Methods in Medical Research, 12(5), 419–446. https://doi.org/10.1191/0962280203sm341ra
  6. [6]Nichols, T. E., & Holmes, A. P. (2002). Nonparametric permutation tests for functional neuroimaging: A primer with examples. Human Brain Mapping, 15(1), 1–25. https://doi.org/10.1002/hbm.1058
  7. [7]Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., & Duchesnay, E. (2011). Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12, 2825–2830.arxiv.org/abs/1201.0490
  8. [8]Phipson, B., & Smyth, G. K. (2010). Permutation p-values should never be zero: Calculating exact p-values when permutations are randomly drawn. Statistical Applications in Genetics and Molecular Biology, 9(1), Article39. https://doi.org/10.2202/1544-6115.1585
  9. [9]Rencher, A. C., & Christensen, W. F. (2012). Methods of multivariate analysis (3rd). John Wiley & Sons.
  10. [10]Rosenberg, A., & Hirschberg, J. (2007). V-measure: A conditional entropy-based external cluster evaluation measure. Proceedings of the 2007 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning (EMNLP-CoNLL), 410–420.
  11. [11]Rosenblatt, J. D., Finos, L., Weeda, W. D., Solari, A., & Goeman, J. J. (2018). All-resolutions inference for brain imaging. NeuroImage, 181, 786–796. https://doi.org/10.1016/j.neuroimage.2018.07.060
  12. [12]Salembier, P., & Garrido, L. (2000). Binary partition tree as an efficient representation for image processing, segmentation, and information retrieval. IEEE Transactions on Image Processing, 9(4), 561–576. https://doi.org/10.1109/83.841934
  13. [13]Schaefer, A., Kong, R., Gordon, E. M., Laumann, T. O., Zuo, X.-N., Holmes, A. J., Eickhoff, S. B., & Yeo, B. T. T. (2018). Local-global parcellation of the human cerebral cortex from intrinsic functional connectivity MRI. Cerebral Cortex, 28(9), 3095–3114. https://doi.org/10.1093/cercor/bhx179
  14. [14]Smith, S. M., Jenkinson, M., Johansen-Berg, H., Rueckert, D., Nichols, T. E., Mackay, C. E., Watkins, K. E., Ciccarelli, O., Cader, M. Z., Matthews, P. M., & Behrens, T. E. J. (2006). Tract-based spatial statistics: Voxelwise analysis of multi-subject diffusion data. NeuroImage, 31(4), 1487–1505. https://doi.org/10.1016/j.neuroimage.2006.02.024
  15. [15]Smith, S. M., & Nichols, T. E. (2009). Threshold-free cluster enhancement: Addressing problems of smoothing, threshold dependence and localisation in cluster inference. Neuroimage, 44(1), 83–98.DOI
  16. [16]Thirion, B., Varoquaux, G., Dohmatob, E., & Poline, J.-B. (2014). Which fMRI clustering gives good brain parcellations? Frontiers in Neuroscience, 8, 167. https://doi.org/10.3389/fnins.2014.00167
  17. [17]Trefethen, L. N., & Bau, D. (1997). Numerical linear algebra. Society for Industrial; Applied Mathematics.DOI
  18. [18]Turin, G. L. (1960). An introduction to matched filters. IRE Transactions on Information Theory, 6(3), 311–329. https://doi.org/10.1109/TIT.1960.1057571
  19. [19]Tzourio-Mazoyer, N., Landeau, B., Papathanassiou, D., Crivello, F., Etard, O., Delcroix, N., Mazoyer, B., & Joliot, M. (2002). Automated anatomical labeling of activations in spm using a macroscopic anatomical parcellation of the mni mri single-subject brain. Neuroimage, 15(1), 273–289.
  20. [20]Van Essen, D. C., Smith, S. M., Barch, D. M., Behrens, T. E. J., Yacoub, E., Uğurbil, K., & WU-Minn HCP Consortium. (2013). The wu-minn human connectome project: An overview. Neuroimage, 80, 62–79.DOI
  21. [21]Virtanen, P., Gommers, R., Oliphant, T. E., Haberland, M., Reddy, T., Cournapeau, D., Burovski, E., Peterson, P., Weckesser, W., Bright, J., van der Walt, S. J., Brett, M., Wilson, J., Millman, K. J., Mayorov, N., Nelson, A. R. J., Jones, E., Kern, R., Larson, E., . . . SciPy 1.0 Contributors. (2020). SciPy 1.0: Fundamental algorithms for scientific computing in python. Nature Methods, 17, 261–272. https://doi.org/10.1038/s41592-019-0686-2
  22. [22]Ward Jr, J. H. (1963). Hierarchical grouping to optimize an objective function. Journal of the American statistical association, 58(301), 236–244.
  23. [23]Waskom, M. L. (2021). seaborn: Statistical data visualization. Journal of Open Source Software, 6(60), 3021. https://doi.org/10.21105/joss.03021
  24. [24]Westfall, P. H., & Young, S. S. (1993). Resampling-based multiple testing: Examples and methods for p-value adjustment. John Wiley & Sons.DOI
  25. [25]Winkler, A. M., Ridgway, G. R., Webster, M. A., Smith, S. M., & Nichols, T. E. (2014). Permutation inference for the general linear model. NeuroImage, 92, 381–397. https://doi.org/10.1016/j.neuroimage.2014.01.060
  26. [26]Winkler, A. M., Webster, M. A., Brooks, J. C., Tracey, I., Smith, S. M., & Nichols, T. E. (2016). Non-parametric combination and related permutation tests for neuroimaging. Human Brain Mapping, 37(4), 1486–1511. https://doi.org/10.1002/hbm.23115
  27. [27]Woo, C.-W., Krishnan, A., & Wager, T. D. (2014). Cluster-extent based thresholding in fmri analyses: Pitfalls and recommendations. Neuroimage, 91, 412–419.
  28. [28]Worsley, K. J., Liao, C. H., Aston, J., Petre, V., Duncan, G. H., Morales, F., & Evans, A. C. (2002). A general statistical analysis for fmri data. NeuroImage, 15(1), 1–15.
  29. [29]Worsley, K. J., Marrett, S., Neelin, P., & Evans, A. C. (1996). Searching scale space for activation in PET images. Human Brain Mapping, 4(1), 74–90. https://doi.org/10.1002/(SICI)1097-0193(1996)4:1〈74::AID-HBM5〉3.0.CO;2-M

Paper details

vlnc:W_p4y3zdvt
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 9

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents