OSCR

Input Layer Regularization and Automated Regularization Hyperparameter Tuning for Myelin Water Estimation Using Deep Learning.

Code ↔ Paper

1 match between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 1 match
  1. [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

  1. import numpy as np
  2. import torch
  3. import torch.nn as nn
  4. ##-----------------------------------------------------------------##
  5. ## Functions that give a pure signal, and another that adds noise ##
  6. ##-----------------------------------------------------------------##
  7. ## A) True signal - Three Parameters
  8. #----------------
  9. def myTrueModel(t, c, t21, t22, *, signalType="biexponential"):
  10. """
  11. Produces a pure, uncorrupted signal whose parameters we aim to approximate.
  12. Input:
  13. ------
  14. t (Array of length num_times) - Signal acquisition times.
  15. c (Nonnegative float) - initial fraction of component one.
  16. t21 (Nonnegative float) - Time constant for component 1.
  17. t22 (Nonnegative float) - Time constant for component 2.
  18. signalType (string, optional kwarg) - Type of signal. Choices are
  19. biexponential decay, power, quadratic, or sinusoidal.
  20. Output:
  21. -------
  22. signal (Array of length num_times) - Pure signal of the specified type
  23. """
  24. if signalType=="biexponential":
  25. return c*np.exp(-t/t21) + (1.0-c)*np.exp(-t/t22)
  26. elif signalType=="power":
  27. return c + (t/t21)**t22
  28. elif signalType=="quadratic":
  29. return c + (t/t21) + (t/t22)**2
  30. elif signalType=="sinusoidal":
  31. return c*np.cos(t/t21) + (1.0-c)*np.cos(t/t22)
  32. ## A) True signal - Two Parameters
  33. #---------------------------------
  34. def myTrueModel_2param(t, c1, c2, t21, t22, *, signalType="biexponential"):
  35. """
  36. Produces a pure, uncorrupted signal whose parameters we aim to approximate.
  37. Input:
  38. ------
  39. t (Array of length num_times) - Signal acquisition times.
  40. c1 (Nonnegative float) - initial fraction of component one.
  41. c2 (Nonnegative float) - initial fraction of component two.
  42. t21 (Nonnegative float) - Time constant for component 1.
  43. t22 (Nonnegative float) - Time constant for component 2.
  44. signalType (string, optional kwarg) - Type of signal. Choices are
  45. biexponential decay, power, quadratic, or sinusoidal.
  46. Output:
  47. -------
  48. signal (Array of length num_times) - Pure signal of the specified type
  49. """
  50. if signalType=="biexponential":
  51. return c1*np.exp(-t/t21) + (c2)*np.exp(-t/t22)
  52. elif signalType=="power":
  53. return c1 + (t/t21)**t22
  54. elif signalType=="quadratic":
  55. return c1 + (t/t21) + (t/t22)**2
  56. elif signalType=="sinusoidal":
  57. return c1*np.cos(t/t21) + (c2)*np.cos(t/t22)
  58. ## B) Noisy signal
  59. #-----------------
  60. def myNoisyModel(signal, snr, *, signalType="biexponential"):
  61. """
  62. Adds Gaussian noise to a pure signal. In particular, components of the
  63. noise are independent, identically distributed normal random variables
  64. with mean 0.0 and standard deviation that depends on the signalType.
  65. For biexponential and sinusoidal signals, the standard deviation ==
  66. 1.0/sqrt(snr). For power and quadratic signals, the standard deviation
  67. == sqrt[(time average of the signal)/snr].
  68. Input:
  69. ------
  70. signal (Tensor of size (batch_size, num_times)) - Tensor of pure
  71. signal. Rows index sample and columns index time.
  72. snr (positive float) - Signal-to-noise ratio
  73. signalType (string, optional kwarg) - Type of signal. Choices are
  74. biexponential decay, power, quadratic, or sinusoidal.
  75. Output:
  76. -------
  77. noisy_signal (Tensor of size (batch_size, num_times)) - Tensor of
  78. noisy signals. Rows index sample and columns index time.
  79. """
  80. if type(signal) == np.ndarray:
  81. num_times = len(signal)
  82. num_signals = 1
  83. if (signalType == "biexponential") or (signalType == "sinusoidal"):
  84. noiseLevel=np.max(signal)/snr
  85. # noiseLevel = 1.0/snr
  86. noise_Amp_on_SC = np.random.normal(loc=0.0, scale=noiseLevel, size=num_times)#eps_prime
  87. noise_on_QC = np.random.normal(loc=0.0, scale=noiseLevel, size=num_times) #eps_~
  88. elif type(signal) == torch.Tensor:
  89. num_times = signal.shape[0]
  90. try:
  91. num_signals = signal.shape[1]
  92. except:
  93. num_signals = 1
  94. if (signalType == "biexponential") or (signalType == "sinusoidal"):
  95. noiseLevel=torch.max(signal)/snr
  96. noise_Amp_on_SC = torch.normal(mean=0.0, std=noiseLevel, size = num_times)
  97. noise_on_QC = torch.normal(mean=0.0, std=noiseLevel, size = num_times)
  98. return ((signal + noise_Amp_on_SC)**2 + noise_on_QC**2)**0.5
  99. class Signal(object):
  100. def __init__(self,time_low, time_high, num_times, SNR, signalType, dataType="Tensor"):
  101. # What type of signal == being modeled? "biexponential", "sinusoidal", etc.
  102. self.signalType = signalType
  103. # Signal-to-noise ratio
  104. self.snr = SNR
  105. # Times at which the signal's intensity == measured. "acquisition times"
  106. if dataType == "Tensor":
  107. self.times = torch.linspace(time_low, time_high, num_times, dtype=torch.float64)
  108. else:
  109. self.times = np.linspace(time_low, time_high, num_times)
  110. # Define the equation for the true signal model.
  111. if self.signalType == "biexponential":
  112. def biexponential_decay_np(c, T21, T22):
  113. return c*np.exp(-self.times/T21) + (1.0-c)*np.exp(-self.times/T22)
  114. def biexponential_decay_tensor(c, T21, T22):
  115. return c*torch.exp(-self.times/T21) + (1.0-c)*torch.exp(-self.times/T22)
  116. if dataType == "Tensor": self.true_model = biexponential_decay_tensor
  117. else: self.true_model = biexponential_decay_np
  118. elif self.signalType == "power":
  119. def power_law(c, T21, T22):
  120. return c + (self.times/T21)**T22
  121. self.true_model = power_law
  122. elif self.signalType == "quadratic":
  123. def quadratic_signal(c, T21, T22):
  124. return c + (self.times/T21) + (self.times/T22)**2
  125. self.true_model = quadratic_signal
  126. elif self.signalType == "sinusoidal":
  127. def sinusoidal_signal_np(c, T21, T22):
  128. return c*np.cos(self.times/T21) + (1.0-c)*np.cos(self.times/T22)
  129. def sinusoidal_signal_tensor(c, T21, T22):
  130. return c*torch.cos(self.times/T21) + (1.0-c)*torch.cos(self.times/T22)
  131. if dataType == "Tensor": self.true_model = sinusoidal_signal_tensor
  132. else: self.true_model = sinusoidal_signal_np
  133. # Define how noise should be added to the signal.
  134. if dataType == "numpy":
  135. if (self.signalType == "biexponential") or (self.signalType == "sinusoidal"):
  136. def noise_model(signal):
  137. assert (len(self.times)==len(signal)), (f"Number of times" +
  138. "({len(self.times)}) and length of signal ({len(signal)})" +
  139. "are not equal.")
  140. num_times = len(self.times)
  141. num_signals = 1
  142. noiseLevel = 1.0/self.snr
  143. noise = np.random.normal(loc=0.0, scale=np.sqrt(noiseLevel), size=num_times)
  144. return signal + noise
  145. elif (self.signalType == "power") or (self.signalType == "quadratic"):
  146. def noise_model(signal):
  147. assert (len(self.times)==len(signal)), (f"Number of times" +
  148. "({len(self.times)}) and length of signal ({len(signal)})" +
  149. "are not equal.")
  150. num_times = len(self.times)
  151. num_signals = 1
  152. avg_signal = np.mean(signal)
  153. noiseLevel = avg_signal/self.snr
  154. noise = np.random.normal(loc=0.0, scale=np.sqrt(noiseLevel), size=num_times)
  155. return signal + noise
  156. elif dataType == "Tensor":
  157. if (self.signalType == "biexponential") or (self.signalType == "sinusoidal"):
  158. def noise_model(signal):
  159. num_times = len(signal[0,:]) # assumes all signals have same # of measurements
  160. assert (len(self.times)==num_times), (f"Number of times" +
  161. "({len(self.times)}) and length of signal ({num_times})" +
  162. "are not equal.")
  163. num_signals = len(signal[:,0])
  164. noiseLevel = 1.0/self.snr
  165. noise = torch.cat( [ torch.normal(mean=0.0,
  166. std=np.sqrt(noiseLevel),
  167. size=(1,num_times))
  168. for _ in range(0,num_signals) ]
  169. ,0)
  170. return signal + noise
  171. elif (self.signalType == "power") or (self.signalType == "quadratic"):
  172. def noise_model(signal):
  173. num_times = len(signal[0,:]) # assumes all signals have same # of measurements
  174. assert (len(self.times)==num_times), (f"Number of times" +
  175. "({len(self.times)}) and length of signal ({num_times})" +
  176. "are not equal.")
  177. num_signals = len(signal[:,0])
  178. avg_signal = torch.mean(signal, dim=1, keepdim=True)
  179. noiseLevel = avg_signal/self.snr
  180. noise = torch.cat( [ torch.normal(mean=0.0,
  181. std=torch.sqrt(noiseLevel[i,0]),
  182. size=(1,num_times))
  183. for i in range(0,num_signals) ]
  184. ,0)
  185. return signal + noise
  186. self.add_noise = noise_model
  187. print(f'The noise model == {self.add_noise}')

makeSignals.py at commit 5da9483, no license · at the source

Overview

Authors: Mirage Modi1, Shashank Sule2, Jonathan Palumbo1, Michael Rozowski2, Griffin S. Hampton1, Mustapha Bouhrara1, Wojciech Czaja2, Richard G. Spencer1
  1. National Institute on Aging National Institutes of Health Baltimore Maryland USA
  2. Department of Mathematics University of Maryland College Park Maryland USA
Institutions: National Institute on Aging (United States); University of Maryland, College Park (United States)
Journal: NMR in biomedicine, volume 39, issue 6, article e70276
Dates: received 12 February 2025; accepted 21 February 2026; published online 22 April 2026; in print June 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1002/nbm.70276 · PMID 42017233 · PMCID PMC13100866 · OpenAlex W4407013023
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), human (organism), cellular / molecular (subfield)
Methods: Machine learning
Keywords: additive models, bilevel optimization, inverse problems, multiexponential analysis
MeSH: Deep Learning*, Myelin Sheath*, Water*, Algorithms, Brain, Humans, Magnetic Resonance Imaging (* major topic)
Topic: Brain Tumor Detection and Classification (Neurology, Neuroscience), according to OpenAlex
Funding: Intramural Research Program of the National Institutes of Health (NIH)
Citations: not cited yet (Europe PMC); 65 references in the paper

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

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 5da94836d47c81c438094d5c8c38d377ff70f2ec, 19 September 2025
Languages: Python (12), Jupyter (3), MATLAB (1)
Size: 42 files, 16 scripts
Software Heritage: not checked
Found in: “Data Availability Statement”
Holds: README, 3 notebooks
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: PyTorch (14 files), NumPy (12 files), pandas (10 files), Matplotlib (8 files), SciPy (7 files), seaborn (6 files), Optimization Toolbox (1 file), scikit-learn (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
17 files

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://github.com/ShashankSule/ILR‐for‐MWF (https://github.com/ShashankSule/ILR-for-MWF).

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://doi.org/10.1002/nbm.70276

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/nbm.70276},
url = {https://doi.org/10.1002/nbm.70276},
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/06/01
VL - 39
IS - 6
SP - e70276
SN - 0952-3480
PB - Wiley
DO - 10.1002/nbm.70276
UR - https://doi.org/10.1002/nbm.70276
LA - en
ER -

CSL-JSON

{
"id": "10.1002/nbm.70276",
"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": "NMR Biomed",
"volume": "39",
"issue": "6",
"page": "e70276",
"DOI": "10.1002/nbm.70276",
"PMID": "42017233",
"PMCID": "PMC13100866",
"ISSN": "0952-3480",
"publisher": "Wiley",
"URL": "https://doi.org/10.1002/nbm.70276",
"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 biomedicine
In 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 biology
In 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 imaging
In 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: iScience
In 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 biology
In 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: Neuron
In 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 neuroscience
In 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 medicine
In 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 biology
In 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.

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.