High Angular Resolution Functional Imaging (HARFI)
- HARFI is a white-matter fMRI framework that models direction-resolved functional correlations using spherical harmonic representations.
- The pipeline transforms preprocessed 4D fMRI data into voxel-wise directional correlation maps through detrending, filtering, and directional sampling.
- Containerized implementation ensures reproducibility and generates MRtrix-compatible FOD outputs for downstream tractography analyses.
Searching arXiv for HARFI and related white-matter functional imaging papers. Search query: HARFI white matter functional correlation spherical harmonics Schilling functional orientation distributions
Using the arXiv search tool to locate directly relevant HARFI papers and adjacent work. High Angular Resolution Functional Imaging (HARFI) is a white-matter functional MRI framework for estimating direction-resolved functional correlations and representing them as functional orientation distributions (FODs). In the available literature, HARFI is described as a white-matter analogue of high-angular-resolution diffusion methods: rather than characterizing anisotropic diffusion, it characterizes the anisotropic directional structure of BOLD signal correlations. The framework was originally introduced by Schilling et al. (2019), and the later containerization work formalizes HARFI as a pipeline that transforms preprocessed 4D fMRI data into local directional correlation maps, voxel-wise spherical harmonic representations, and MRtrix-compatible FOD volumes suitable for downstream tractography-style analysis (Li et al., 9 Jul 2025).
1. Scientific object and rationale
HARFI addresses a problem that conventional fMRI analysis largely leaves implicit: white matter is structurally anisotropic, and its functional relationships need not be isotropic in the neighborhood of a voxel. The literature underlying HARFI states that functional MRI has historically focused primarily on gray matter, particularly cortical gray matter and associated nuclei, whereas white-matter BOLD changes have been observed in structures such as the corpus callosum, internal capsule, and optic radiations. It further states that white-matter resting-state signals form functional networks aligned with known white-matter pathways, and that white-matter resting-state fMRI shows anisotropic directional neighborhood correlations that are broadly consistent with white-matter bundle orientations derived from diffusion MRI and can persist over long distances (Li et al., 9 Jul 2025).
Within that framing, HARFI asks a directionally explicit question: for a given voxel, in which spatial directions do nearby BOLD signals correlate most strongly? The pipeline therefore departs from gray-matter-oriented analyses that treat functional relationships chiefly as isotropic local smoothness, seed-based coupling, ICA structure, or parcel-level interactions. Its central outputs are twofold. First, it generates local directional correlation maps, meaning a set of correlation values across directions on the sphere for each voxel. Second, it fits those directional profiles as FODs, creating a compact continuous angular representation that can be exported into MRtrix-compatible form and used for pathway-oriented downstream analysis (Li et al., 9 Jul 2025).
This scientific rationale places HARFI at the intersection of white-matter fMRI and angular-domain modeling. A broader antecedent is the nonparametric analysis of high-angular-resolution diffusion measurements directly in acquisition space, where local structure is inferred from directional geometry rather than from early reduction to scalar summaries (Olhede et al., 2010). HARFI is distinct in modality and target, but it shares the premise that angular structure itself is an informative object of inference.
2. Pipeline architecture and core processing stages
The containerization paper gives the HARFI workflow as a fixed sequence:
Preprocessed fMRI → Detrending and filtering → Directional sampling → Directional integration → Correlation maps → Spherical harmonic fitting → MRtrix-compatible FODs (Li et al., 9 Jul 2025)
The pipeline assumes that the input data have already undergone external fMRI preprocessing. The required inputs are a preprocessed 4D fMRI volume and a corresponding brain mask registered to fMRI space. Standard preprocessing is explicitly recommended, especially slice-timing correction and motion correction, with SPM12 or FSL named as suitable tools. The paper does not impose a single upstream preprocessing stack and does not specify additional required steps such as nuisance regression, physiological denoising, smoothing, or spatial normalization (Li et al., 9 Jul 2025).
Once the preprocessed 4D volume is supplied, HARFI performs temporal cleanup internally. The first frames are discarded to avoid magnetic equilibration transients, with given as the recommended default. Linear detrending is then applied to correct signal drift, followed by band-pass filtering between $0.015$ Hz and $0.1$ Hz. Both the low-pass and high-pass components are implemented with a Chebyshev Type II filter in MATLAB (Li et al., 9 Jul 2025).
Directional sampling follows. HARFI uses 60 uniformly distributed unit vectors on the sphere, stored in Jones60.mat. For each voxel, the method samples the local neighborhood along each of these directions using linear interpolation, so values can be evaluated at intermediate points rather than only at integer voxel centers. A radius parameter controls the extent of directional sampling. The original paper recommended mm, but the implementation interprets the radius parameter in voxels rather than millimeters; for 3 mm isotropic fMRI, achieving the intended 9 mm radius therefore requires setting voxels. The containerization paper adds that 8 mm or 10 mm also works well (Li et al., 9 Jul 2025).
For each voxel and each sampled direction, correlation coefficients are calculated for neighborhood voxels up to distance along that direction, and these coefficients are integrated over distance to produce a single directional correlation measure. The resulting object is a 4D directional-correlation image containing one integrated correlation value per voxel per sampled direction. This stage produces what the paper calls the correlation maps (Li et al., 9 Jul 2025).
The final representational step is spherical harmonic fitting. HARFI computes voxel-wise spherical harmonic coefficients from the 60-direction directional correlation profile, using regularized least-squares fitting via an internal MATLAB SH toolbox. These coefficients are then rearranged into MRtrix-compatible FOD volumes, allowing tractography software such as tckgen from MRtrix3 to generate putative functional pathways (Li et al., 9 Jul 2025).
3. Angular representation, FODs, and asymmetric correlation structure
HARFI’s distinguishing representational choice is to treat the directional correlation profile at each voxel as a function on the sphere and to encode that function with spherical harmonics. This serves several purposes stated in the literature: smoothing noisy directional samples, reducing data dimensionality, identifying principal functional connectivity orientations, and producing outputs interoperable with diffusion-style FOD tooling (Li et al., 9 Jul 2025).
The pipeline computes two spherical harmonic fits. One is an even-order-only fit, which enforces antipodal symmetry. The other is a full fit including even and odd orders, intended to capture potential asymmetry in functional correlations. The latter is emphasized as a key extension beyond earlier white-matter functional-correlation tensor approaches, because it enables explicit modeling of asymmetric voxel-wise correlations rather than restricting the representation to antipodally symmetric orientation structure (Li et al., 9 Jul 2025).
The conceptual distinction is straightforward. An even-order-only fit encodes
which is appropriate when opposite directions are treated as equivalent orientations. The full fit permits
and is therefore used to represent asymmetric functional correlation structure. In the HARFI literature, this asymmetry is not merely a mathematical convenience; it is presented as a biologically relevant degree of freedom for white-matter functional organization (Li et al., 9 Jul 2025).
The available containerization paper is procedurally explicit but mathematically abbreviated. It states that HARFI fits the directional correlation function voxel-wise with spherical harmonics, that regularized least squares is used, and that both even-only and full even-plus-odd representations are produced. It does not print the explicit spherical harmonic basis expansion, the maximum harmonic order, the regularization penalty, or the exact coefficient normalization. Accordingly, the published account is sufficient to specify the representational logic of HARFI, but not to fully reconstruct its mathematical implementation from the paper alone (Li et al., 9 Jul 2025).
A related methodological line in diffusion MRI strengthens the significance of this design choice. Joint spatial-angular reconstruction frameworks in diffusion MRI likewise use spherical harmonics to represent direction-dependent signal continuously on the sphere and show that preserving angular structure is critical for downstream orientation-sensitive analysis (Wu et al., 27 Jan 2025). HARFI differs in signal model and modality, but the shared emphasis on explicit angular representation is notable.
4. Software realization, containerization, and reproducibility
The principal 2025 contribution to HARFI is not a new biological claim but a software and reproducibility intervention. The containerization paper argues that adoption of the original HARFI source release was limited because running the code was technically complex, and it presents a robust and efficient containerized implementation intended to make the workflow portable and reproducible across public datasets (Li et al., 9 Jul 2025).
In the course of reconstructing the original pipeline, two implementation issues were identified. First, the radius parameter mismatch: the paper’s recommended radius was specified in millimeters, whereas the code interpreted the parameter in voxels. Second, a code section responsible for detrending had been accidentally commented out in the earlier GitHub repository. After correcting these two issues, the authors report being able to reproduce the exact outputs provided by the original authors (Li et al., 9 Jul 2025).
The corrected pipeline was developed and tested in MATLAB R2022b Update 10 on Ubuntu 22.04 LTS, compiled into a standalone executable using MATLAB Compiler (mcc), and configured to run with MATLAB Runtime rather than a full MATLAB installation. That executable was then packaged into a Singularity container. The paper states that Singularity 3.8.1 was used to build the container and that execution was tested with Singularity 3.8.1 and 4.3.1 on Ubuntu 22.04 LTS. A runscript was added so that the pipeline launches automatically through singularity run (Li et al., 9 Jul 2025).
The user-facing dependency model is intentionally minimal. The practical requirements are a system capable of running Singularity, a preprocessed 4D fMRI input, and a corresponding mask registered to fMRI space. The container bundles the compiled MATLAB executable, MATLAB Runtime for R2022b Update 10, required libraries, additional source or reference files, and Jones60.mat for directional sampling (Li et al., 9 Jul 2025).
Validation was performed on the BLSA dataset and five public OpenNeuro datasets: Animated caricatures fMRI study, THINGS-fMRI, motor-fmri, neuroCOVID-fMRI, and changepoint-fMRI. Example scan resolutions shown in the paper include mm, 0 mm, and 1 mm. The validation strategy was qualitative, following the original HARFI paper: correlation maps were expected to show heterogeneous functional correlation patterns across brain regions, and FODs were expected to show complex angular structure, including single-directional glyphs, crossing or more complex distributions, and asymmetry where present (Li et al., 9 Jul 2025).
5. Relation to neighboring high-resolution imaging research
HARFI belongs to a wider family of methods that aim to preserve or recover fine spatial or angular structure from measurements that are noisy, coarse, or undersampled. The most direct adjacent line is spatial-angular super-resolution in diffusion MRI. “Spatial-Angular Representation Learning for High-Fidelity Continuous Super-Resolution in Diffusion MRI” models diffusion signal as a continuous function of spatial coordinates and angular directions by combining implicit neural representations with spherical harmonics, thereby jointly enhancing spatial and angular resolution rather than treating them as separate tasks (Wu et al., 27 Jan 2025). That work is not HARFI, but it is methodologically adjacent: it reinforces the importance of treating direction-dependent MRI signal as an explicitly angular object, and it shows that data-fidelity modules and frequency-aware losses can materially improve orientation-sensitive reconstructions.
A second neighboring line is high-resolution functional MRI super-resolution. “Resolution- and Stimulus-agnostic Super-Resolution of Ultra-High-Field Functional MRI: Application to Visual Studies” addresses a different bottleneck: recovery of fine-scale mesoscale organization in visual cortex from lower-resolution 7T fMRI. Its target is the localization of interdigitated motion-selective and color-selective sites, and the paper is explicit that the method is purely spatial super-resolution rather than a model of angular tuning or directional encoding (Li et al., 2023). Relative to that work, HARFI is distinctive in that its primary object is not submillimeter spatial sharpening of cortical maps, but directional functional correlation structure in white matter.
The conceptual contrast is therefore important. HARFI models anisotropic functional relationships directly. The 7T fMRI super-resolution paper seeks to infer high-frequency spatial detail from lower-resolution acquisitions. The diffusion super-resolution paper seeks continuous space-angle reconstruction from undersampled data. Taken together, these literatures indicate that “high angular resolution functional imaging” can refer to at least two different but convergent ambitions: explicit angular-domain modeling of function, as in HARFI, and computational recovery of fine-scale spatial structure that may support functional interpretation, as in high-field fMRI super-resolution (Li et al., 9 Jul 2025, Li et al., 2023, Wu et al., 27 Jan 2025).
A plausible implication is that future HARFI variants could converge with continuous space-angle learning schemes. That inference is not stated as an achieved result in the HARFI containerization paper, but the adjacent diffusion literature shows a concrete design pattern for jointly modeling space and direction (Wu et al., 27 Jan 2025).
6. Scope, limitations, and open technical questions
The published HARFI literature is explicit about several limits of present specification. Most importantly, the containerization paper is a reproducibility and deployment paper rather than a full mathematical rederivation of the original method. It does not provide the exact correlation estimator, the weighting used in integration over distance, the explicit formula for the spherical harmonic basis expansion, the maximum SH order, the regularization term used in fitting, the exact command-line interface, input-output file format details, or runtime and memory benchmarks (Li et al., 9 Jul 2025).
Validation is qualitative rather than quantitative. The paper reports successful calculation of functional correlation maps and successful capture of complex, asymmetric functional distributions across several datasets, but it does not provide numerical benchmarking, formal statistical testing of output stability, or head-to-head quantitative comparison with other white-matter fMRI methods such as functional-correlation tensor approaches (Li et al., 9 Jul 2025).
Interpretive caveats are also only lightly discussed. The paper reiterates that white-matter BOLD signals exhibit anisotropic neighborhood correlations aligned with white-matter architecture, but it does not extensively analyze vascular confounds, partial-volume effects, gray-matter leakage, preprocessing sensitivity, or the epistemic status of “functional pathways” produced by tractography on fMRI-derived FODs. Its focus is infrastructural: correcting the implementation, packaging the workflow, and enabling broader use (Li et al., 9 Jul 2025).
Methodologically, angular resolution in HARFI is limited by the 60 sampled directions and by the chosen spherical harmonic model. The pipeline also depends on externally preprocessed data, so upstream choices can propagate into the directional estimates. In addition, the container produces MRtrix-compatible FODs but does not include downstream quantitative analyses or statistical inference modules; users are expected to develop those separately if needed (Li et al., 9 Jul 2025).
These limitations do not negate the importance of HARFI. They define its current status. HARFI is best understood as a specialized framework for direction-resolved white-matter fMRI analysis whose distinctive contribution is to make anisotropic functional correlation itself the object of modeling. In its current documented form, it provides a workflow from preprocessed fMRI volumes to local directional correlation maps and asymmetric FOD representations, together with a reproducible containerized implementation that lowers the practical barrier to studying functional white-matter architecture at high angular resolution (Li et al., 9 Jul 2025).