Anatomically constrained volumetric smoothing enhances fMRI reliability while avoiding smoothing artifacts.
The 3 matches
- [1] § Methods › Constrained smoothing ↔ csmooth/optimization.py, lines 8–42 · score 0.63 · heat kernel smoothing, full width, iteratively, optimized, FWHM
- [2] § Methods › Constrained smoothing › Equivalent parameter estimation and smoothing ↔ csmooth/optimization.py, lines 8–42 · score 0.61 · Heat kernel smoothing, full width, optimization, nodes, signal, graphs
- [3] § Methods › Constrained smoothing › Equivalent parameter estimation and smoothing ↔ csmooth/smooth.py, lines 292–360 · score 0.54 · graph signal, Gaussian kernel, computationally, smoothing kernel, nodes, component
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 114 lines · 5.4 KB · Apache-2.0 · 2 matches
- import numpy as np
- import time
- from csmooth.fwhm import estimate_fwhm
- from csmooth.heat import heat_kernel_smoothing
- from csmooth.utils import logger
- def graph_smoothing_with_gradient_descent(data, edge_src, edge_dst, edge_distances, fwhm,
- max_iterations=100, stop_threshold=0.01, initial_tau=None, learning_rate=1.0,
- decay_rate=0.99, random_seed=42):
- """
- Smooth a signal based on a graph targeting a specific fwhm.
- This function uses gradient descent to find the optimal smoothing parameter
- to achieve the target fwhm.
- First, a random noise image is generated. Then, the signal is smoothed using the initial tau.
- The fwhm of the smoothed signal is estimated. The gradient of the fwhm with respect to tau is computed.
- The tau is updated using the gradient and learning rate. This process is repeated until the fwhm is close
- enough to the target fwhm or the maximum number of iterations is reached.
- The final value of tau is used to smooth the original signal.
- :param data: signal data to be smoothed.
- :param edge_src: source nodes of the graph edges.
- :param edge_dst: destination nodes of the graph edges.
- :param edge_distances: distances of the graph edges.
- :param fwhm: target full width at half maximum in mm.
- :param max_iterations: maximum number of iterations for gradient descent.
- :param stop_threshold: threshold for stopping the gradient descent.
- :param initial_tau: initial value for the smoothing parameter. If None, 2*fwhm is used as the initial value.
- :param learning_rate: learning rate for gradient descent.
- :param decay_rate: decay rate for the learning rate.
- :param random_seed: random seed for generating the random noise image. By default, 42.
- :param patience: number of iterations to wait before stopping if the fwhm does not improve.
- :return: smoothed signal
- """
- tua = find_optimal_tau(fwhm=fwhm, edge_src=edge_src, edge_dst=edge_dst,
- edge_distances=edge_distances, shape=data.shape, initial_tau=initial_tau,
- max_iterations=max_iterations, stop_threshold=stop_threshold,
- learning_rate=learning_rate, decay_rate=decay_rate, random_seed=random_seed)
- smoothed_signal = heat_kernel_smoothing(signal_data=data, tau=tua, edge_src=edge_src,
- edge_dst=edge_dst, edge_distances=edge_distances)
- return smoothed_signal, tua
- def find_optimal_tau(fwhm, edge_src, edge_dst, edge_distances, shape, initial_tau=None,
- max_iterations=100, stop_threshold=0.005, learning_rate=3.0, decay_rate=0.99,
- random_seed=42, error_threshold=0.5, patience=20):
- # TODO: add momentum to the gradient descent
- start_time = time.time()
- initial_patience = patience
- if initial_tau is None:
- initial_tau = 2 * fwhm
- tau = initial_tau
- np.random.seed(random_seed)
- random_noise = np.random.randn(*shape)
- mae = np.inf
- current_fwhm = np.nan
- best_tau = tau
- best_mae = np.inf
- best_fwhm = current_fwhm
- for i in range(max_iterations):
- smoothed_noise = heat_kernel_smoothing(signal_data=random_noise, tau=tau, edge_src=edge_src,
- edge_dst=edge_dst, edge_distances=edge_distances)
- current_fwhm = estimate_fwhm(edge_src=edge_src, edge_dst=edge_dst,
- edge_distances=edge_distances, signal_data=smoothed_noise)
- logger.debug(f"Iteration {i}: current fwhm: {current_fwhm:.2f}, target fwhm: {fwhm:.2f} tau: {tau:.2f}")
- previous_mae = mae
- mae = np.abs(current_fwhm - fwhm)
- if mae < best_mae:
- best_mae = mae
- best_tau = tau
- best_fwhm = current_fwhm
- if mae < stop_threshold:
- break
- if i == max_iterations - 1:
- logger.warning(f"Maximum iterations reached ({max_iterations}). ")
- break
- gradient = current_fwhm - fwhm
- previous_tau = tau
- tau -= learning_rate * gradient
- if tau <= 0:
- logger.info(f"Tau became non-positive. Reducing tau to half of previous value.")
- tau = previous_tau / 2
- elif mae > previous_mae:
- logger.warning(f"MAE increased from {previous_mae:.4f} to {mae:.4f}.")
- patience -= 1
- if patience <= 0:
- logger.warning(f"Patience of {initial_patience} iterations exceeded. Stopping gradient descent.")
- break
- else:
- logger.warning(f"Continuing gradient descent with reduced learning rate.")
- learning_rate /= 2
- else:
- learning_rate *= decay_rate
- patience = initial_patience # reset patience if we made progress
- if mae > error_threshold:
- raise ValueError(f"Failed to achieve target fwhm within error threshold: {error_threshold:.3f}. "
- f"Final fwhm: {current_fwhm:.2f}, target fwhm: {fwhm:.2f}, "
- f"tau: {tau:.2f}.")
- end_time = time.time()
- logger.info(f"Gradient descent completed.")
- logger.info(f"Final tau: {best_tau:.2f}, "
- f"achieved fwhm: {best_fwhm:.2f}, "
- f"target fwhm: {fwhm:.2f}, "
- f"time taken: {(end_time - start_time) / 60:.2f} minutes")
- return best_tau
optimization.py at commit c423680, under Apache-2.0 · at the source
Overview
Abstract
Introduction: Smoothing fMRI data prior to analysis is a fundamental and widely used technique to increase sensitivity. Unconstrained smoothing can also reduce the spatial specificity of the analysis by introducing artifacts in the data. This study tested the effects of smoothing on the reliability and accuracy of both task fMRI and resting state data. The effects of unconstrained smoothing were compared to those of an anatomically constrained smoothing method, which prevents smoothing across the white and gray matter surfaces of the cortex.
Methods: Unconstrained Gaussian smoothing and anatomically constrained smoothing were applied to simulated data, a sensory task fMRI dataset, a precision fMRI motor task mapping dataset, and a resting state fMRI dataset. Smoothing-related artifacts were tested for and compared between the smoothing methods, and the effects of the smoothing methods on the reliability and accuracy were measured.
Results: In the experiments with simulated data, unconstrained Gaussian smoothing demonstrated decreased accuracy and increased white matter activation compared to constrained smoothing. In the sensory task activation analysis, both Gaussian and constrained smoothing increased the reliability of the sensory task fMRI activations, but Gaussian smoothing increased the percentage of active voxels in the white matter relative to constrained smoothing (p < 0.001). Relative to constrained smoothing, Gaussian smoothing with FWHM > 3 mm also decreased the accuracy of motor mapping results from individual sessions to the precision maps (p < 0.001). With cluster significance thresholding, mean false positive voxel percentages remained below 5% for both methods across the tested kernel widths. Both Gaussian and constrained smoothing demonstrated a biasing effect on the resting state connectivity of nearby regions and on the graph theory metrics of the functional connectomes.
Conclusion: This study showed that unconstrained Gaussian smoothing spreads activation across cortical boundaries, increases white matter activation, and biases graph theory connectivity metrics. Anatomically constrained smoothing reduced some of these smoothing artifacts while still increasing reliability and may be a reasonable alternative to unconstrained Gaussian smoothing.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 3 matches between paragraphs and lines of code.
ellisdg/csmooth
c4236808cb2cf49ebb8c29fe7c27a2384b3530b0, 3 March 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
15 files
- csmooth/
__init__.py , Python, 1 line - csmooth/
affine.py , Python, 76 lines - csmooth/
components.py , Python, 42 lines - csmooth/
fmriprep.py , Python, 317 lines - csmooth/
fwhm.py , Python, 24 lines - csmooth/
graph.py , Python, 301 lines - csmooth/
heat.py , Python, 25 lines - csmooth/
matrix.py , Python, 20 lines - csmooth/
optimization.py , Python, 114 lines, 2 matches - csmooth/
resampling.py , Python, 72 lines - csmooth/
smooth.py , Python, 442 lines, 1 match - csmooth/
utils.py , Python, 9 lines - setup.py, Python, 23 lines
- LICENSE, License, 201 lines
- README.md, Text, 173 lines
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 13 scripts, each with its path and the digest of its content;
- 3 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data availability statement
The sensory task fMRI data analyzed in this study can be found at openneuro.org under dataset ds005009 version 1.0.0. The fMRI data for the Midnight Scan Club analyzed in this study can be found at openneuro.org under dataset ds000224 version 1.0.4. Data analyzed in this study from the Human Connectome Project in Aging can be accessed through the National Institute of Mental Health Data Archive at nda.nih.gov. Data collection for the Human Connectome Project in Aging was supported by the National Institute on Aging of the National Institutes of Health under Award Number U01AG052564.
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, pages, dates, 2 authors, 6 keywords, 35 references.
Cite
This paper
Ellis, D. G., & Aizenberg, M. R. (2026). Anatomically constrained volumetric smoothing enhances fMRI reliability while avoiding smoothing artifacts. Frontiers in neuroimaging, 5, 1753534. https://
BibTeX
@article{ellis2026anatom
author = {Ellis, David G. and Aizenberg, Michele R.},
title = {{Anatomically constrained volumetric smoothing enhances fMRI reliability while avoiding smoothing artifacts}},
journal = {Frontiers in neuroimaging},
year = {2026},
month = may,
volume = {5},
pages = {1753534},
publisher = {Frontiers Media SA},
issn = {2813-1193},
doi = {10.3389/
url = {https://
pmid = {42146843},
pmcid = {PMC13175814}
}
RIS
TY - JOUR
AU - Ellis, David G.
AU - Aizenberg, Michele R.
TI - Anatomically constrained volumetric smoothing enhances fMRI reliability while avoiding smoothing artifacts
T2 - Frontiers in neuroimaging
J2 - Front Neuroimaging
PY - 2026
DA - 2026/
VL - 5
SP - 1753534
SN - 2813-1193
PB - Frontiers Media SA
DO - 10.3389/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.3389/
"type": "article-journal",
"title": "Anatomically constrained volumetric smoothing enhances fMRI reliability while avoiding smoothing artifacts",
"container-title": "Frontiers in neuroimaging",
"author": [
{
"family": "Ellis",
"given": "David G."
},
{
"family": "Aizenberg",
"given": "Michele R."
}
],
"container-title-short":
"volume": "5",
"page": "1753534",
"DOI": "10.3389/
"PMID": "42146843",
"PMCID": "PMC13175814",
"ISSN": "2813-1193",
"publisher": "Frontiers Media SA",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
1
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1162/imag.a.1198 [code]
- MEPrep: A robust pipeline for multi-echo fMRI denoising and preprocessing.Journal: Imaging neuroscience (Cambridge, Mass.)In common: TemplateFlow, Nilearn, NiBabel, 2 other tools, fMRI, methods / tools, 5 references
- [2] doi:10.1002/hbm.70469 [code]
- VarCoNet: A Variability-Aware Self-Supervised Framework for Functional Connectome Extraction From Resting-State fMRI.Journal: Human brain mappingIn common: TemplateFlow, Nilearn, NetworkX, 3 other tools, fMRI, methods / tools, 2 references
- [3] doi:10.1002/hbm.70483 [code]
- Untamed: Unconstrained Tensor Decomposition and Graph Node Embedding for Cortical Parcellation.Journal: Human brain mappingIn common: Nilearn, NiBabel, SciPy, 1 other tool, fMRI, methods / tools, 4 references
- [4] doi:10.1016/j.neuron.2026.04.011 [code]
- Precision fMRI reveals densely interdigitated network patches with conserved motifs in the lateral prefrontal cortex.Journal: NeuronIn common: Nilearn, NiBabel, SciPy, 1 other tool, fMRI, 5 references
- [5] doi:10.1038/s41398-026-04157-5 [code]
- Association of glymphatic function with 40-Hz neural oscillations, systemic metabolic markers, and cognitive performance in healthy aging adults: An EEG and MRI study.Journal: Translational psychiatryIn common: TemplateFlow, Nilearn, NetworkX, 3 other tools, fMRI
- [6] doi:10.1371/journal.pbio.3003856 [code]
- Aging and metabolism contribute separately to brain-body health.Journal: PLoS biologyIn common: Nilearn, NiBabel, SciPy, 1 other tool, 4 references
- [7] doi:10.1371/journal.pbio.3003684 [code]
- The retrieval of previously learned motor memories is facilitated by the reinstatement of default mode network manifold structures.Journal: PLoS biologyIn common: Nilearn, NiBabel, SciPy, 1 other tool, fMRI, 4 references
- [8] doi:10.1038/s41467-026-71270-w [code]
- Spatiotemporal dynamics of the human cortical functional hierarchy across the lifespan.Journal: Nature communicationsIn common: Nilearn, NetworkX, NiBabel, 2 other tools, fMRI, 2 references
- [9] doi:10.1038/s41467-026-75959-w [code]
- Charting higher-order models of brain function beyond pairwise interactions.Journal: Nature communicationsIn common: Nilearn, NetworkX, NiBabel, 2 other tools, 3 references
- [10] doi:10.1162/netn.a.549 [code]
- Distributed cortical network dynamics of binocular convergent eye movements in humans.Journal: Network neuroscience (Cambridge, Mass.)In common: NiBabel, NumPy, fMRI, 5 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 13 scripts, and 3 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:a33f97ccf4805187…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
