Input Layer Regularization and Automated Regularization Hyperparameter Tuning for Myelin Water Estimation Using Deep Learning.
The 1 match
- [1] § Mathematical Formalism › Biexponential Signal Analysis ↔ src/makeSignals.py, lines 139–213 · score 0.73 · random variables, standard deviation, noise ratio, Gaussian, SNR, model
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 · 454 lines · 9.9 KB · no license · 1 match
- import numpy as np
- import torch
- import torch.nn as nn
- ##-----------------------------------------------------------------##
- ## Functions that give a pure signal, and another that adds noise ##
- ##-----------------------------------------------------------------##
- ## A) True signal - Three Parameters
- #----------------
- def myTrueModel(t, c, t21, t22, *, signalType="biexponential"):
- """
- Produces a pure, uncorrupted signal whose parameters we aim to approximate.
- Input:
- ------
- t (Array of length num_times) - Signal acquisition times.
- c (Nonnegative float) - initial fraction of component one.
- t21 (Nonnegative float) - Time constant for component 1.
- t22 (Nonnegative float) - Time constant for component 2.
- signalType (string, optional kwarg) - Type of signal. Choices are
- biexponential decay, power, quadratic, or sinusoidal.
- Output:
- -------
- signal (Array of length num_times) - Pure signal of the specified type
- """
- if signalType=="biexponential":
- return c*np.exp(-t/t21) + (1.0-c)*np.exp(-t/t22)
- elif signalType=="power":
- return c + (t/t21)**t22
- elif signalType=="quadratic":
- return c + (t/t21) + (t/t22)**2
- elif signalType=="sinusoidal":
- return c*np.cos(t/t21) + (1.0-c)*np.cos(t/t22)
- ## A) True signal - Two Parameters
- #---------------------------------
- def myTrueModel_2param(t, c1, c2, t21, t22, *, signalType="biexponential"):
- """
- Produces a pure, uncorrupted signal whose parameters we aim to approximate.
- Input:
- ------
- t (Array of length num_times) - Signal acquisition times.
- c1 (Nonnegative float) - initial fraction of component one.
- c2 (Nonnegative float) - initial fraction of component two.
- t21 (Nonnegative float) - Time constant for component 1.
- t22 (Nonnegative float) - Time constant for component 2.
- signalType (string, optional kwarg) - Type of signal. Choices are
- biexponential decay, power, quadratic, or sinusoidal.
- Output:
- -------
- signal (Array of length num_times) - Pure signal of the specified type
- """
- if signalType=="biexponential":
- return c1*np.exp(-t/t21) + (c2)*np.exp(-t/t22)
- elif signalType=="power":
- return c1 + (t/t21)**t22
- elif signalType=="quadratic":
- return c1 + (t/t21) + (t/t22)**2
- elif signalType=="sinusoidal":
- return c1*np.cos(t/t21) + (c2)*np.cos(t/t22)
- ## B) Noisy signal
- #-----------------
- def myNoisyModel(signal, snr, *, signalType="biexponential"):
- """
- Adds Gaussian noise to a pure signal. In particular, components of the
- noise are independent, identically distributed normal random variables
- with mean 0.0 and standard deviation that depends on the signalType.
- For biexponential and sinusoidal signals, the standard deviation ==
- 1.0/sqrt(snr). For power and quadratic signals, the standard deviation
- == sqrt[(time average of the signal)/snr].
- Input:
- ------
- signal (Tensor of size (batch_size, num_times)) - Tensor of pure
- signal. Rows index sample and columns index time.
- snr (positive float) - Signal-to-noise ratio
- signalType (string, optional kwarg) - Type of signal. Choices are
- biexponential decay, power, quadratic, or sinusoidal.
- Output:
- -------
- noisy_signal (Tensor of size (batch_size, num_times)) - Tensor of
- noisy signals. Rows index sample and columns index time.
- """
- if type(signal) == np.ndarray:
- num_times = len(signal)
- num_signals = 1
- if (signalType == "biexponential") or (signalType == "sinusoidal"):
- noiseLevel=np.max(signal)/snr
- # noiseLevel = 1.0/snr
- noise_Amp_on_SC = np.random.normal(loc=0.0, scale=noiseLevel, size=num_times)#eps_prime
- noise_on_QC = np.random.normal(loc=0.0, scale=noiseLevel, size=num_times) #eps_~
- elif type(signal) == torch.Tensor:
- num_times = signal.shape[0]
- try:
- num_signals = signal.shape[1]
- except:
- num_signals = 1
- if (signalType == "biexponential") or (signalType == "sinusoidal"):
- noiseLevel=torch.max(signal)/snr
- noise_Amp_on_SC = torch.normal(mean=0.0, std=noiseLevel, size = num_times)
- noise_on_QC = torch.normal(mean=0.0, std=noiseLevel, size = num_times)
- return ((signal + noise_Amp_on_SC)**2 + noise_on_QC**2)**0.5
- class Signal(object):
- def __init__(self,time_low, time_high, num_times, SNR, signalType, dataType="Tensor"):
- # What type of signal == being modeled? "biexponential", "sinusoidal", etc.
- self.signalType = signalType
- # Signal-to-noise ratio
- self.snr = SNR
- # Times at which the signal's intensity == measured. "acquisition times"
- if dataType == "Tensor":
- self.times = torch.linspace(time_low, time_high, num_times, dtype=torch.float64)
- else:
- self.times = np.linspace(time_low, time_high, num_times)
- # Define the equation for the true signal model.
- if self.signalType == "biexponential":
- def biexponential_decay_np(c, T21, T22):
- return c*np.exp(-self.times/T21) + (1.0-c)*np.exp(-self.times/T22)
- def biexponential_decay_tensor(c, T21, T22):
- return c*torch.exp(-self.times/T21) + (1.0-c)*torch.exp(-self.times/T22)
- if dataType == "Tensor": self.true_model = biexponential_decay_tensor
- else: self.true_model = biexponential_decay_np
- elif self.signalType == "power":
- def power_law(c, T21, T22):
- return c + (self.times/T21)**T22
- self.true_model = power_law
- elif self.signalType == "quadratic":
- def quadratic_signal(c, T21, T22):
- return c + (self.times/T21) + (self.times/T22)**2
- self.true_model = quadratic_signal
- elif self.signalType == "sinusoidal":
- def sinusoidal_signal_np(c, T21, T22):
- return c*np.cos(self.times/T21) + (1.0-c)*np.cos(self.times/T22)
- def sinusoidal_signal_tensor(c, T21, T22):
- return c*torch.cos(self.times/T21) + (1.0-c)*torch.cos(self.times/T22)
- if dataType == "Tensor": self.true_model = sinusoidal_signal_tensor
- else: self.true_model = sinusoidal_signal_np
- # Define how noise should be added to the signal.
- if dataType == "numpy":
- if (self.signalType == "biexponential") or (self.signalType == "sinusoidal"):
- def noise_model(signal):
- assert (len(self.times)==len(signal)), (f"Number of times" +
- "({len(self.times)}) and length of signal ({len(signal)})" +
- "are not equal.")
- num_times = len(self.times)
- num_signals = 1
- noiseLevel = 1.0/self.snr
- noise = np.random.normal(loc=0.0, scale=np.sqrt(noiseLevel), size=num_times)
- return signal + noise
- elif (self.signalType == "power") or (self.signalType == "quadratic"):
- def noise_model(signal):
- assert (len(self.times)==len(signal)), (f"Number of times" +
- "({len(self.times)}) and length of signal ({len(signal)})" +
- "are not equal.")
- num_times = len(self.times)
- num_signals = 1
- avg_signal = np.mean(signal)
- noiseLevel = avg_signal/self.snr
- noise = np.random.normal(loc=0.0, scale=np.sqrt(noiseLevel), size=num_times)
- return signal + noise
- elif dataType == "Tensor":
- if (self.signalType == "biexponential") or (self.signalType == "sinusoidal"):
- def noise_model(signal):
- num_times = len(signal[0,:]) # assumes all signals have same # of measurements
- assert (len(self.times)==num_times), (f"Number of times" +
- "({len(self.times)}) and length of signal ({num_times})" +
- "are not equal.")
- num_signals = len(signal[:,0])
- noiseLevel = 1.0/self.snr
- noise = torch.cat( [ torch.normal(mean=0.0,
- std=np.sqrt(noiseLevel),
- size=(1,num_times))
- for _ in range(0,num_signals) ]
- ,0)
- return signal + noise
- elif (self.signalType == "power") or (self.signalType == "quadratic"):
- def noise_model(signal):
- num_times = len(signal[0,:]) # assumes all signals have same # of measurements
- assert (len(self.times)==num_times), (f"Number of times" +
- "({len(self.times)}) and length of signal ({num_times})" +
- "are not equal.")
- num_signals = len(signal[:,0])
- avg_signal = torch.mean(signal, dim=1, keepdim=True)
- noiseLevel = avg_signal/self.snr
- noise = torch.cat( [ torch.normal(mean=0.0,
- std=torch.sqrt(noiseLevel[i,0]),
- size=(1,num_times))
- for i in range(0,num_signals) ]
- ,0)
- return signal + noise
- self.add_noise = noise_model
- print(f'The noise model == {self.add_noise}')
makeSignals.py at commit 5da9483, no license · at the source
Overview
- National Institute on Aging National Institutes of Health Baltimore Maryland USA
- Department of Mathematics University of Maryland College Park Maryland USA
Abstract
We present a deep learning framework that combines classical regularization and data preprocessing to improve estimation of the myelin water fraction (MWF) in the brain from magnetic resonance relaxometry data. The proposed method is developed within the context of biexponential signal modeling, a standard approach for quantifying MWF. Building on prior work on input layer regularization (ILR), we introduce several key extensions. First, we incorporate optimal regularization hyperparameter selection using either a dedicated neural network or generalized cross‐validation (GCV), applied on a signal‐by‐signal (or pixel‐by‐pixel) basis to generate concatenated input features. Second, we extend the framework to directly estimate MWF in addition to exponential time constants. On synthetic data, the proposed architecture outperforms both conventional regularized fitting methods and standard multilayer perceptrons. When applied to in vivo brain data, it again yields superior accuracy, with GCV‐based parameter selection performing slightly better than the neural network alternative. These findings demonstrate that ILR enhances MWF estimation within the biexponential model and that classical regularization techniques, when integrated with deep learning, can substantially improve quantitative estimation of myelin content.
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 1 match between paragraphs and lines of code.
ShashankSule/ILR-for-MWF
5da94836d47c81c438094d5c8c38d377ff70f2ec, 19 September 2025Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
17 files
- src/
DF_DataLoader.py , Python, 604 lines - src/
FC_NN_Architecture.py , Python, 1,127 lines - src/
GCV_Rician_Training_Gene , Python, 519 linesrateRegAndTrain.py - src/
generate_NDReg_NN_data.p , Python, 298 linesy - src/
generate_data.py , Python, 77 lines - src/
makeSignals.py , Python, 454 lines, 1 match - src/
noisySignalGen_3.py , Python, 100 lines - src/
regTraj.py , Python, 2,022 lines - src/
scratch.py , Python, 25 lines - src/
train_NDReg_NN.py , Python, 181 lines - src/
train_lambda_NN.py , Python, 159 lines - src/
wasserstein_distance.py , Python, 255 lines - tutorials/
BrainData.ipynb , Jupyter, 558 lines - tutorials/
Lambda_comparisons.ipynb , Jupyter, 201 lines - tutorials/
Param_estimation_synthet , Jupyter, 226 linesic.ipynb - tutorials/
brain_data_processing/ , MATLAB, 190 linesRelaxometry_mapping_NLLS .m - Readme.md, Text, 34 lines
The paper's code and data availability statement is in the Data section.
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;
- 16 scripts, each with its path and the digest of its content;
- 1 match 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 data that support the findings of this study are openly available in a GitHub repository at https://
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 2, 28 September 2026
- Publisher: n/a → Wiley
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 8 authors, 4 keywords, 7 MeSH terms, 1 funder, 33 references.
Cite
This paper
Modi, M., Sule, S., Palumbo, J., Rozowski, M., Hampton, G. S., Bouhrara, M., Czaja, W., & Spencer, R. G. (2026). Input Layer Regularization and Automated Regularization Hyperparameter Tuning for Myelin Water Estimation Using Deep Learning. NMR in biomedicine, 39(6), e70276. https://
BibTeX
@article{modi2026input,
author = {Modi, Mirage and Sule, Shashank and Palumbo, Jonathan and Rozowski, Michael and Hampton, Griffin S. and Bouhrara, Mustapha and Czaja, Wojciech and Spencer, Richard G.},
title = {{Input Layer Regularization and Automated Regularization Hyperparameter Tuning for Myelin Water Estimation Using Deep Learning}},
journal = {NMR in biomedicine},
year = {2026},
month = jun,
volume = {39},
number = {6},
pages = {e70276},
publisher = {Wiley},
issn = {0952-3480},
doi = {10.1002/
url = {https://
pmid = {42017233},
pmcid = {PMC13100866}
}
RIS
TY - JOUR
AU - Modi, Mirage
AU - Sule, Shashank
AU - Palumbo, Jonathan
AU - Rozowski, Michael
AU - Hampton, Griffin S.
AU - Bouhrara, Mustapha
AU - Czaja, Wojciech
AU - Spencer, Richard G.
TI - Input Layer Regularization and Automated Regularization Hyperparameter Tuning for Myelin Water Estimation Using Deep Learning
T2 - NMR in biomedicine
J2 - NMR Biomed
PY - 2026
DA - 2026/
VL - 39
IS - 6
SP - e70276
SN - 0952-3480
PB - Wiley
DO - 10.1002/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1002/
"type": "article-journal",
"title": "Input Layer Regularization and Automated Regularization Hyperparameter Tuning for Myelin Water Estimation Using Deep Learning",
"container-title": "NMR in biomedicine",
"author": [
{
"family": "Modi",
"given": "Mirage"
},
{
"family": "Sule",
"given": "Shashank"
},
{
"family": "Palumbo",
"given": "Jonathan"
},
{
"family": "Rozowski",
"given": "Michael"
},
{
"family": "Hampton",
"given": "Griffin S."
},
{
"family": "Bouhrara",
"given": "Mustapha"
},
{
"family": "Czaja",
"given": "Wojciech"
},
{
"family": "Spencer",
"given": "Richard G."
}
],
"container-title-short":
"volume": "39",
"issue": "6",
"page": "e70276",
"DOI": "10.1002/
"PMID": "42017233",
"PMCID": "PMC13100866",
"ISSN": "0952-3480",
"publisher": "Wiley",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
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.1002/nbm.70331 [code]
- Dipolar Order Mapping Based on Spin-Lock Magnetic Resonance Imaging.Journal: NMR in biomedicineIn common: Optimization Toolbox, PyTorch, seaborn, 5 other tools, structural MRI / diffusion
- [2] doi:10.1038/s42003-026-10957-8 [code]
- Brain defence by the extracellular matrix protein Cochlin.Journal: Communications biologyIn common: Optimization Toolbox, PyTorch, seaborn, 5 other tools, cellular / molecular
- [3] doi:10.1109/tmi.2026.3664328 [code]
- Axon Diameter Mapping From Myelin Water Diffusion MRI.Journal: IEEE transactions on medical imagingIn common: Optimization Toolbox, structural MRI / diffusion, cellular / molecular, 3 references
- [4] doi:10.1016/j.isci.2026.117375 [code]
- Motor priming is associated with widespread recruitment into neural ensembles and more rapid ensemble transitions.Journal: iScienceIn common: Optimization Toolbox, PyTorch, seaborn, 5 other tools
- [5] doi:10.1371/journal.pbio.3003915 [code]
- Noise-invariant representations of sound emerge along the canonical cortical hierarchy.Journal: PLoS biologyIn common: Optimization Toolbox, PyTorch, seaborn, 5 other tools
- [6] doi:10.1016/j.patter.2026.101590 [code]
- Density-based longitudinal neuron tracking in high-density electrophysiological recordings.Journal: Patterns (New York, N.Y.)In common: Optimization Toolbox, PyTorch, seaborn, 5 other tools
- [7] doi:10.1016/j.neuron.2026.03.034 [code]
- Dentate gyrus interneurons modulate winner-take-all network dynamics in freely behaving mice.Journal: NeuronIn common: Optimization Toolbox, PyTorch, seaborn, 5 other tools
- [8] doi:10.1038/s41593-026-02232-0 [code]
- Entorhinal cortex represents task-relevant remote locations independently of CA1.Journal: Nature neuroscienceIn common: Optimization Toolbox, PyTorch, seaborn, 5 other tools
- [9] doi:10.1080/07853890.2026.2685416 [code]
- Pulmonary and cerebral damage in COVID-19 survivors: is there any association?Journal: Annals of medicineIn common: Optimization Toolbox, PyTorch, seaborn, 4 other tools, structural MRI / diffusion
- [10] doi:10.1038/s42003-026-10276-y [code]
- The cellular correlates and adolescent reorganisation of cortical myelination networks in the common marmoset.Journal: Communications biologyIn common: Optimization Toolbox, seaborn, scikit-learn, 4 other tools, structural MRI / diffusion
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, 16 scripts, and 1 match 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:5040e872140efcfe…
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.
