Deep Learning Empowered Microstructure Codebook: New Paradigm for Multi-Parameter Tissue Characterization Estimation.
The 3 matches
- [1] § Materials and Methods › Hybrid Mamba‐CNN Architecture for Joint Microstructure Learning ↔ MultiOrderGatedAggregation.py, lines 268–340 · score 0.60 · Gated Aggregation, MogaNet, block, module
- [2] § Materials and Methods › Hybrid Mamba‐CNN Architecture for Joint Microstructure Learning ↔ MultiOrderGatedAggregation.py, lines 268–340 · score 0.57 · SiLU, dilation, gating, aggregate, Moga, activation
- [3] § Materials and Methods › Hybrid Mamba‐CNN Architecture for Joint Microstructure Learning ↔ VisionMamba.py, lines 67–139 · score 0.55 · Vision Mamba, connection, transformation, sequence, fused, Residual
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 · 356 lines · 13 KB · no license · 2 matches
- # Copyright 2021 Garena Online Private Limited
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- import torch
- import torch.nn as nn
- import torch.nn.functional as F
- # MogaNet: Multi-order Gated Aggregation Network (ICLR 2024)
- # https://arxiv.org/pdf/2211.03295
- # https://github.com/Westlake-AI/MogaNet
- # Spatial Block with Multi-order Gated Aggregation
- def build_act_layer(act_type):
- """Build activation layer."""
- if act_type is None:
- return nn.Identity()
- assert act_type in ['GELU', 'ReLU', 'SiLU']
- if act_type == 'SiLU':
- return nn.SiLU()
- elif act_type == 'ReLU':
- return nn.ReLU()
- else:
- return nn.GELU()
- class ElementScale(nn.Module):
- """A learnable element-wise scaler."""
- def __init__(self, embed_dims, init_value=0., requires_grad=True):
- super(ElementScale, self).__init__()
- self.scale = nn.Parameter(
- init_value * torch.ones((1, embed_dims, 1, 1)),
- requires_grad=requires_grad
- )
- def forward(self, x):
- return x * self.scale
- class MultiOrderDWConv(nn.Module):
- """Multi-order Features with Dilated DWConv Kernel.
- Args:
- embed_dims (int): Number of input channels.
- dw_dilation (list): Dilations of three DWConv layers.
- channel_split (list): The raletive ratio of three splited channels.
- """
- def __init__(self,
- embed_dims,
- dw_dilation=[1, 2, 3,],
- channel_split=[1, 3, 4,],
- ):
- super(MultiOrderDWConv, self).__init__()
- self.split_ratio = [i / sum(channel_split) for i in channel_split]
- self.embed_dims_1 = int(self.split_ratio[1] * embed_dims)
- self.embed_dims_2 = int(self.split_ratio[2] * embed_dims)
- self.embed_dims_0 = embed_dims - self.embed_dims_1 - self.embed_dims_2
- self.embed_dims = embed_dims
- assert len(dw_dilation) == len(channel_split) == 3
- assert 1 <= min(dw_dilation) and max(dw_dilation) <= 3
- assert embed_dims % sum(channel_split) == 0
- # basic DW conv
- self.DW_conv0 = nn.Conv2d(
- in_channels=self.embed_dims,
- out_channels=self.embed_dims,
- kernel_size=5,
- padding=(1 + 4 * dw_dilation[0]) // 2,
- groups=self.embed_dims,
- stride=1, dilation=dw_dilation[0],
- )
- # DW conv 1
- self.DW_conv1 = nn.Conv2d(
- in_channels=self.embed_dims_1,
- out_channels=self.embed_dims_1,
- kernel_size=5,
- padding=(1 + 4 * dw_dilation[1]) // 2,
- groups=self.embed_dims_1,
- stride=1, dilation=dw_dilation[1],
- )
- # DW conv 2
- self.DW_conv2 = nn.Conv2d(
- in_channels=self.embed_dims_2,
- out_channels=self.embed_dims_2,
- kernel_size=7,
- padding=(1 + 6 * dw_dilation[2]) // 2,
- groups=self.embed_dims_2,
- stride=1, dilation=dw_dilation[2],
- )
- # a channel convolution
- self.PW_conv = nn.Conv2d( # point-wise convolution
- in_channels=embed_dims,
- out_channels=embed_dims,
- kernel_size=1)
- def forward(self, x):
- x_0 = self.DW_conv0(x)
- x_1 = self.DW_conv1(
- x_0[:, self.embed_dims_0: self.embed_dims_0+self.embed_dims_1, ...])
- x_2 = self.DW_conv2(
- x_0[:, self.embed_dims-self.embed_dims_2:, ...])
- x = torch.cat([
- x_0[:, :self.embed_dims_0, ...], x_1, x_2], dim=1)
- x = self.PW_conv(x)
- return x
- class MultiOrderGatedAggregation(nn.Module):
- """Spatial Block with Multi-order Gated Aggregation.
- Args:
- embed_dims (int): Number of input channels.
- attn_dw_dilation (list): Dilations of three DWConv layers.
- attn_channel_split (list): The raletive ratio of splited channels.
- attn_act_type (str): The activation type for Spatial Block.
- Defaults to 'SiLU'.
- """
- def __init__(self,
- embed_dims,
- attn_dw_dilation=[1, 2, 3],
- attn_channel_split=[1, 3, 4],
- attn_act_type='SiLU',
- attn_force_fp32=False,
- ):
- super(MultiOrderGatedAggregation, self).__init__()
- self.embed_dims = embed_dims
- self.attn_force_fp32 = attn_force_fp32
- self.proj_1 = nn.Conv2d(
- in_channels=embed_dims, out_channels=embed_dims, kernel_size=1)
- self.gate = nn.Conv2d(
- in_channels=embed_dims, out_channels=embed_dims, kernel_size=1)
- self.value = MultiOrderDWConv(
- embed_dims=embed_dims,
- dw_dilation=attn_dw_dilation,
- channel_split=attn_channel_split,
- )
- self.proj_2 = nn.Conv2d(
- in_channels=embed_dims, out_channels=embed_dims, kernel_size=1)
- # activation for gating and value
- self.act_value = build_act_layer(attn_act_type)
- self.act_gate = build_act_layer(attn_act_type)
- # decompose
- self.sigma = ElementScale(
- embed_dims, init_value=1e-5, requires_grad=True)
- def feat_decompose(self, x):
- x = self.proj_1(x)
- # x_d: [B, C, H, W] -> [B, C, 1, 1]
- x_d = F.adaptive_avg_pool2d(x, output_size=1)
- x = x + self.sigma(x - x_d)
- x = self.act_value(x)
- return x
- def forward_gating(self, g, v):
- with torch.autocast(device_type='cuda', enabled=False):
- g = g.to(torch.float32)
- v = v.to(torch.float32)
- return self.proj_2(self.act_gate(g) * self.act_gate(v))
- def forward(self, x):
- shortcut = x.clone()
- # proj 1x1
- x = self.feat_decompose(x)
- # gating and value branch
- g = self.gate(x)
- v = self.value(x)
- # aggregation
- if not self.attn_force_fp32:
- x = self.proj_2(self.act_gate(g) * self.act_gate(v))
- else:
- x = self.forward_gating(self.act_gate(g), self.act_gate(v))
- x = x + shortcut
- return x
- class ChannelAggregationFFN(nn.Module):
- """An implementation of FFN with Channel Aggregation.
- Args:
- embed_dims (int): The feature dimension. Same as
- `MultiheadAttention`.
- feedforward_channels (int): The hidden dimension of FFNs.
- kernel_size (int): The depth-wise conv kernel size as the
- depth-wise convolution. Defaults to 3.
- act_type (str): The type of activation. Defaults to 'GELU'.
- ffn_drop (float, optional): Probability of an element to be
- zeroed in FFN. Default 0.0.
- """
- def __init__(self,
- embed_dims,
- feedforward_channels,
- kernel_size=3,
- act_type='GELU',
- ffn_drop=0.):
- super(ChannelAggregationFFN, self).__init__()
- self.embed_dims = embed_dims
- self.feedforward_channels = feedforward_channels
- self.fc1 = nn.Conv2d(
- in_channels=embed_dims,
- out_channels=self.feedforward_channels,
- kernel_size=1)
- self.dwconv = nn.Conv2d(
- in_channels=self.feedforward_channels,
- out_channels=self.feedforward_channels,
- kernel_size=kernel_size,
- stride=1,
- padding=kernel_size // 2,
- bias=True,
- groups=self.feedforward_channels)
- self.act = build_act_layer(act_type)
- self.fc2 = nn.Conv2d(
- in_channels=feedforward_channels,
- out_channels=embed_dims,
- kernel_size=1)
- self.drop = nn.Dropout(ffn_drop)
- self.decompose = nn.Conv2d(
- in_channels=self.feedforward_channels, # C -> 1
- out_channels=1, kernel_size=1,
- )
- self.sigma = ElementScale(
- self.feedforward_channels, init_value=1e-5, requires_grad=True)
- self.decompose_act = build_act_layer(act_type)
- def feat_decompose(self, x):
- # x_d: [B, C, H, W] -> [B, 1, H, W]
- x = x + self.sigma(x - self.decompose_act(self.decompose(x)))
- return x
- def forward(self, x):
- # proj 1
- x = self.fc1(x)
- x = self.dwconv(x)
- x = self.act(x)
- x = self.drop(x)
- # proj 2
- x = self.feat_decompose(x)
- x = self.fc2(x)
- x = self.drop(x)
- return x
- def build_norm_layer(norm_type, embed_dims):
- """Build normalization layer."""
- assert norm_type in ['BN', 'GN', 'LN2d', 'SyncBN']
- if norm_type == 'GN':
- return nn.GroupNorm(embed_dims, embed_dims, eps=1e-5)
- if norm_type == 'SyncBN':
- return nn.SyncBatchNorm(embed_dims, eps=1e-5)
- else:
- return nn.BatchNorm2d(embed_dims, eps=1e-5)
- class MogaBlock(nn.Module):
- """A block of MogaNet.
- Args:
- embed_dims (int): Number of input channels.
- ffn_ratio (float): The expansion ratio of feedforward network hidden
- layer channels. Defaults to 4.
- drop_rate (float): Dropout rate after embedding. Defaults to 0.
- drop_path_rate (float): Stochastic depth rate. Defaults to 0.1.
- act_type (str): The activation type for projections and FFNs.
- Defaults to 'GELU'.
- norm_cfg (str): The type of normalization layer. Defaults to 'BN'.
- init_value (float): Init value for Layer Scale. Defaults to 1e-5.
- attn_dw_dilation (list): Dilations of three DWConv layers.
- attn_channel_split (list): The raletive ratio of splited channels.
- attn_act_type (str): The activation type for the gating branch.
- Defaults to 'SiLU'.
- """
- def __init__(self,
- embed_dims,
- ffn_ratio=4.,
- drop_rate=0.,
- drop_path_rate=0.,
- act_type='GELU',
- norm_type='BN',
- init_value=1e-5,
- attn_dw_dilation=[1, 2, 3],
- attn_channel_split=[1, 3, 4],
- attn_act_type='SiLU',
- attn_force_fp32=False,
- ):
- super(MogaBlock, self).__init__()
- self.out_channels = embed_dims
- self.norm1 = build_norm_layer(norm_type, embed_dims)
- # spatial attention
- self.attn = MultiOrderGatedAggregation(
- embed_dims,
- attn_dw_dilation=attn_dw_dilation,
- attn_channel_split=attn_channel_split,
- attn_act_type=attn_act_type,
- attn_force_fp32=attn_force_fp32,
- )
- self.norm2 = build_norm_layer(norm_type, embed_dims)
- # channel MLP
- mlp_hidden_dim = int(embed_dims * ffn_ratio)
- self.mlp = ChannelAggregationFFN( # DWConv + Channel Aggregation FFN
- embed_dims=embed_dims,
- feedforward_channels=mlp_hidden_dim,
- act_type=act_type,
- ffn_drop=drop_rate,
- )
- # init layer scale
- self.layer_scale_1 = nn.Parameter(
- init_value * torch.ones((1, embed_dims, 1, 1)), requires_grad=True)
- self.layer_scale_2 = nn.Parameter(
- init_value * torch.ones((1, embed_dims, 1, 1)), requires_grad=True)
- def forward(self, x):
- # spatial
- identity = x
- x = self.layer_scale_1 * self.attn(self.norm1(x))
- x = identity + x
- # channel
- identity = x
- x = self.layer_scale_2 * self.mlp(self.norm2(x))
- x = identity + x
- return x
- if __name__ == '__main__':
- # Define the input tensor with a batch size of 4, 64 channels, and spatial dimensions 32x32
- input_tensor = torch.randn(1, 64, 32, 32)
- # Instantiate the MultiOrderGatedAggregation layer
- moga_layer = MogaBlock(embed_dims=64)
- # Pass the input tensor through the layer
- output_tensor = moga_layer(input_tensor)
- # Print the shape of the input and output tensors
- print(f"Input shape: {input_tensor.shape}")
- print(f"Output shape: {output_tensor.shape}")
MultiOrderGatedAggregation.py at commit 709f52d, no license · at the source
Overview
- School of Computer Science and Engineering, Nanjing University of Science and Technology, Nanjing, China
- School of Information and Communication Engineering, University of Electronic Science and Technology of China, Chengdu, China
Abstract
Diffusion MRI (dMRI) enables the examination of microstructural profiles and tissue changes using specific microstructural modeling, but it requires long acquisition times and dense q‐space sampling. Current deep learning‐based methods are also limited by their inability to generalize across protocols and extend to new microstructural indices. This work introduces a novel framework that addresses these limitations by learning a microstructural codebook, facilitating accurate, rapid, and multi‐parameter microstructure imaging. Our approach integrates the spherical mean technique (SMT) with a hybrid Mamba‐CNN architecture and learnable tissue‐compartment kernels, effectively capturing multiscale spatial dependencies while linking spherical mean signals to biophysical microstructure models. This design enhances both interpretability and adaptability, enabling robust estimation of 24 microstructural metrics derived from 8 widely used biophysical diffusion models, even under undersampled acquisition conditions. Notably, the framework demonstrates strong generalization across diverse acquisition protocols and enables seamless adaptation to novel microstructural indices with minimal fine‐tuning, underscoring its flexibility and practical utility. Extensive experiments on multiple datasets confirm the method's superior accuracy, generalization, and transferability. This work presents a codebook‐driven framework for microstructure imaging that bridges biophysical modeling and deep learning to enable more interpretable and adaptable dMRI analysis. The code is available at https://
Reproduced under the paper's license (CC BY-NC), 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.
1nlandempire/Microstructure-codebook-imaging
709f52de75a2876e86f4f11264ab2ba6ea99a5eb, 2 December 2025Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
6 files
- Model.py, Python, 136 lines
- MultiOrderGatedAggregati
on.py , Python, 356 lines, 2 matches - VisionMamba.py, Python, 552 lines, 1 match
- forward.py, Python, 102 lines
- rope.py, Python, 141 lines
- README.md, Text, 72 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;
- 5 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
Datasets cited
- db.humanconnectome.org/
data/ , at Human Connectome Project; found in “Data Availability Statement”projects - openneuro:ds001226, at OpenNeuro; found in “Data Availability Statement”
- openneuro:ds002080, at OpenNeuro; found in “Data Availability Statement”
- openneuro:ds003346, at OpenNeuro; found in “Data Availability Statement”
Data Availability Statement
The data supporting the findings of this study are openly available in public repositories: The SUDMEX CONN dataset at https://
Reproduced under the paper's license (CC BY-NC), 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, 28 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 8 authors, 4 keywords, 7 MeSH terms, 4 funders, 70 references.
Cite
This paper
Wang, T., Wan, Z., Cao, S., Yu, J., He, Y., Xie, Y., Zhang, F., & Wu, Y. (2026). Deep Learning Empowered Microstructure Codebook: New Paradigm for Multi-Parameter Tissue Characterization Estimation. Human brain mapping, 47(5), e70513. https://
BibTeX
@article{wang2026deep,
author = {Wang, Tenglong and Wan, Zhonghua and Cao, Shuxin and Yu, Jiahao and He, Yifei and Xie, Yu and Zhang, Fan and Wu, Ye},
title = {{Deep Learning Empowered Microstructure Codebook: New Paradigm for Multi-Parameter Tissue Characterization Estimation}},
journal = {Human brain mapping},
year = {2026},
month = apr,
volume = {47},
number = {5},
pages = {e70513},
publisher = {Wiley},
issn = {1065-9471},
doi = {10.1002/
url = {https://
pmid = {41857810},
pmcid = {PMC13140400}
}
RIS
TY - JOUR
AU - Wang, Tenglong
AU - Wan, Zhonghua
AU - Cao, Shuxin
AU - Yu, Jiahao
AU - He, Yifei
AU - Xie, Yu
AU - Zhang, Fan
AU - Wu, Ye
TI - Deep Learning Empowered Microstructure Codebook: New Paradigm for Multi-Parameter Tissue Characterization Estimation
T2 - Human brain mapping
J2 - Hum Brain Mapp
PY - 2026
DA - 2026/
VL - 47
IS - 5
SP - e70513
SN - 1065-9471
PB - Wiley
DO - 10.1002/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1002/
"type": "article-journal",
"title": "Deep Learning Empowered Microstructure Codebook: New Paradigm for Multi-Parameter Tissue Characterization Estimation",
"container-title": "Human brain mapping",
"author": [
{
"family": "Wang",
"given": "Tenglong"
},
{
"family": "Wan",
"given": "Zhonghua"
},
{
"family": "Cao",
"given": "Shuxin"
},
{
"family": "Yu",
"given": "Jiahao"
},
{
"family": "He",
"given": "Yifei"
},
{
"family": "Xie",
"given": "Yu"
},
{
"family": "Zhang",
"given": "Fan"
},
{
"family": "Wu",
"given": "Ye"
}
],
"container-title-short":
"volume": "47",
"issue": "5",
"page": "e70513",
"DOI": "10.1002/
"PMID": "41857810",
"PMCID": "PMC13140400",
"ISSN": "1065-9471",
"publisher": "Wiley",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
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.1038/s43856-026-01614-6 [code]
- Simulation-based inference at the theoretical limit for fast, robust microstructural MRI with minimal diffusion data.Journal: Communications medicineIn common: DIPY, PyTorch, NumPy, structural MRI / diffusion, 7 references
- [2] doi:10.1002/nbm.70277 [code]
- Hierarchical Bayesian Modelling Improves Microstructural Parameter Mapping in Diffusion and Exchange MRI Data.Journal: NMR in biomedicineIn common: DIPY, NumPy, structural MRI / diffusion, 7 references
- [3] doi:10.1038/s41598-026-51531-w [code]
- Multimodal age-dependent diffusion-MRI analysis of the neocortex in a rat model of cortical dysplasia.Journal: Scientific reportsIn common: DIPY, NumPy, structural MRI / diffusion, 5 references
- [4] doi:10.1016/j.isci.2026.116671 [code]
- A high-resolution functional network-organized atlas of human superficial white matter from ultra-high-field diffusion MRI.Journal: iScienceIn common: DIPY, PyTorch, NumPy, structural MRI / diffusion, author Yifei He
- [5] doi:10.1002/mrm.70490 [code]
- Dependence of the Extra-Cellular Diffusion Coefficient on the Fractions of Neurites and Cell Bodies in Gray Matter.Journal: Magnetic resonance in medicineIn common: structural MRI / diffusion, 6 references
- [6] doi:10.1002/mrm.70496 [code]
- A Deep Nonlinear Subspace Modeling and Reconstruction for Diffusion-Weighted Imaging Using Denoising Auto-Encoder.Journal: Magnetic resonance in medicineIn common: DIPY, PyTorch, NumPy, structural MRI / diffusion, 3 references
- [7] doi:10.1016/j.nicl.2026.104057 [code]
- Tensor-derived diffusion MRI metrics and NODDI in multiple sclerosis classification.Journal: NeuroImage. ClinicalIn common: structural MRI / diffusion, 6 references
- [8] doi:10.1186/s12916-026-04903-y [code]
- Structural connectome architecture and biological vulnerability shape cortical atrophy in cocaine use disorder.Journal: BMC medicineIn common: NumPy, OpenNeuro ds003346, structural MRI / diffusion, 1 reference
- [9] doi:10.1038/s42003-026-10256-2 [code]
- Diffusion MRI experimental design optimization for microstructure imaging.Journal: Communications biologyIn common: structural MRI / diffusion, 5 references
- [10] doi:10.1162/imag.a.1341 [code]
- Massively parallelized brain tractography using compute clusters, supercomputers, and graphics processing units.Journal: Imaging neuroscience (Cambridge, Mass.)In common: DIPY, NumPy, structural MRI / diffusion, 3 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, 5 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:50d40d5fa4c1d817…
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.
