Input Layer Regularization and Automated Regularization Hyperparameter Tuning for Myelin Water Estimation Using Deep Learning.
One block of code here has a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 1 match
- [1] § Mathematical Formalism › Biexponential Signal Analysis ↔ src/makeSignals.py, lines 139 to 213 · score 0.73 · random variables, standard deviation, noise ratio, Gaussian, SNR, model · block
oscr:b:V8P2FWDP64TDN-C· Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: 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.1162/imag_a_00526 [code]
- Microstructure-informed brain tissue classification using clustering of quantitative MRI measures.Journal: Imaging neuroscience (Cambridge, Mass.)In common: seaborn, scikit-learn, pandas, 3 other tools, structural MRI / diffusion, cellular / molecular, 3 references
- [2] doi:10.1093/braincomms/fcaf017 [code]
- Brain microstructure alterations in subjective cognitive decline: a multi-component T2 relaxometry study.Journal: Brain communicationsIn common: seaborn, pandas, SciPy, 2 other tools, structural MRI / diffusion, cellular / molecular, 3 references
- [3] doi:10.1371/journal.pone.0323614
- Validation of a data-driven multicomponent T2 analysis for quantifying myelin content in the cuprizone mouse model of multiple sclerosis.Journal: PloS oneIn common: structural MRI / diffusion, cellular / molecular, 5 references
- [4] doi:10.1002/mrm.70255 [code]
- Field Strength-Dependent White Matter R&
lt;sub& gt;1& lt;/ sub& gt; and R& lt;sub& gt;2& lt;/ sub& gt; Anisotropy of Phase-Cycled Balanced Steady-State Free Precession Relaxometry. Journal: Magnetic resonance in medicineIn common: seaborn, pandas, SciPy, 2 other tools, structural MRI / diffusion, 3 references - [5] doi:10.3389/fradi.2022.930666 [code]
- Variability and reproducibility of multi-echo <i>T</
i><sub>2</ sub> relaxometry: Insights from multi-site, multi-session and multi-subject MRI acquisitions. Journal: Frontiers in radiologyIn common: seaborn, pandas, SciPy, 2 other tools, structural MRI / diffusion, 3 references - [6] doi:10.1073/pnas.2402813121 [code]
- Evidence of association between higher cardiorespiratory fitness and higher cerebral myelination in aging.Journal: Proceedings of the National Academy of Sciences of the United States of AmericaIn common: structural MRI / diffusion, cellular / molecular, 1 reference, author Mustapha Bouhrara
- [7] doi:10.1162/imag_a_00164 [code]
- Identification of diffusion, kurtosis, and propagator MRI markers of Alzheimer's disease pathology in post-mortem human tissue.Journal: Imaging neuroscience (Cambridge, Mass.)In common: seaborn, scikit-learn, pandas, 3 other tools, structural MRI / diffusion, 2 references
- [8] doi:10.1038/s41598-022-22739-3 [code]
- Span of regularization for solution of inverse problems with application to magnetic resonance relaxometry of the brain.Journal: Scientific reportsIn common: structural MRI / diffusion, 4 references
- [9] doi:10.3390/ijms26146878 [code]
- Identifying Cortical Molecular Biomarkers Potentially Associated with Learning in Mice Using Artificial Intelligence.Journal: International journal of molecular sciencesIn common: PyTorch, seaborn, scikit-learn, 4 other tools, cellular / molecular, 1 reference
- [10] doi:10.53941/tai.2025.100001 [code]
- Self-Supervised Based Multi-View Graph Presentation Learning for Drug-Drug Interaction Prediction.Journal: Transactions on artificial intelligenceIn common: PyTorch, seaborn, scikit-learn, 4 other tools, cellular / molecular, 1 reference
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:81fa38661c36d2c0…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1002/nbm.70276)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1002/nbm.70276.svg
:target: https://openscicode.org/badge/doi/10.1002/nbm.70276
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1002/nbm.70276"><img src="https://openscicode.org/badge/doi/10.1002/nbm.70276.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
