OSCR

From surface to depth: Using deep learning to predict striatal fMRI reward signaling from EEG.

Code ↔ Paper

4 matches 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 4 matches
  1. [1] § Methods › Deep learning model › Model training ↔ code/main_train.py, lines 205–268 · score 0.92 · cosine annealing learning, AdamW, CosineAnnealingLR, T_max, weight decay, scheduler
  2. [2] § Methods › Deep learning model › Model architecture ↔ code/utils/model_arch/autoencoder_new_ArturNH.py, lines 4–60 · score 0.70 · ReLU, spatial filtering, stride, kernel, Autoencoder, layer
  3. [3] § Methods › Deep learning model › Model training ↔ code/utils/train_utils.py, lines 163–302 · score 0.65 · training loss, scheduler, optimizer, cosine, PyTorch, epochs
  4. [4] § Methods › Data preprocessing ↔ code/utils/model_arch/autoencoder_new_ArturNH.py, lines 4–60 · score 0.54 · ReLU, spatial filtering, layer, block, temporal, channel

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 · 244 lines · 6.9 KB · no license · 2 matches

  1. import torch
  2. import torch.nn as nn
  3. class ArturBlock(nn.Module):
  4. """
  5. Input is [batch, emb, time]
  6. Artur block. Interpretable and lightweight.
  7. """
  8. FILTERING_SIZE = 51
  9. ENVELOPE_SIZE = 51
  10. # HIDDEN_CHANNELS = 5
  11. def __init__(self, in_channels, hidden_channels=5):
  12. super(ArturBlock, self).__init__()
  13. self.HIDDEN_CHANNELS = hidden_channels
  14. self.unmixing_layer = nn.Conv1d(in_channels, self.HIDDEN_CHANNELS, 1)
  15. self.unmixed_channels_batchnorm = torch.nn.BatchNorm1d(self.HIDDEN_CHANNELS, affine=True)
  16. # use it instead stride.
  17. self.band_pass = nn.Conv1d(
  18. self.HIDDEN_CHANNELS,
  19. self.HIDDEN_CHANNELS,
  20. kernel_size=self.FILTERING_SIZE,
  21. bias=False,
  22. groups=self.HIDDEN_CHANNELS,
  23. padding="same")
  24. self.norm = nn.BatchNorm1d(self.HIDDEN_CHANNELS, affine=False)
  25. self.act = nn.ReLU()
  26. self.low_pass = nn.Conv1d(
  27. self.HIDDEN_CHANNELS,
  28. self.HIDDEN_CHANNELS,
  29. kernel_size=self.ENVELOPE_SIZE,
  30. groups=self.HIDDEN_CHANNELS,
  31. padding="same")
  32. def forward(self, x):
  33. """
  34. - Spatial filter
  35. - Temporal filter
  36. 1. Learn band pass flter
  37. 2. Centering signals
  38. 3. Abs
  39. 4. low pass to get envelope
  40. """
  41. # Spatial filter
  42. x = self.unmixing_layer(x)
  43. x = self.unmixed_channels_batchnorm(x)
  44. # Temporal filter
  45. x = self.band_pass(x)
  46. x = self.norm(x)
  47. x = self.act(x)
  48. x = self.low_pass(x)
  49. return x
  50. class ConvBlock(nn.Module):
  51. """
  52. Input is [batch, emb, time]
  53. simple conv block from wav2vec 2.0
  54. - conv
  55. - layer norm by embedding axis
  56. - activation
  57. To do:
  58. add res blocks.
  59. """
  60. def __init__(
  61. self,
  62. in_channels,
  63. out_channels,
  64. kernel_size,
  65. stride=1,
  66. dilation=1,
  67. p_conv_drop=0.3):
  68. super(ConvBlock, self).__init__()
  69. # use it instead stride.
  70. self.conv1d = nn.Conv1d(
  71. in_channels,
  72. out_channels,
  73. kernel_size=kernel_size,
  74. bias=False,
  75. padding="same")
  76. self.norm = nn.LayerNorm(out_channels)
  77. self.activation = nn.GELU()
  78. self.drop = nn.Dropout(p=p_conv_drop)
  79. self.downsample = nn.MaxPool1d(kernel_size=stride, stride=stride)
  80. def forward(self, x):
  81. """
  82. - conv
  83. - norm
  84. - activation
  85. - downsample
  86. """
  87. x = self.conv1d(x)
  88. # norm by last axis.
  89. x = torch.transpose(x, -2, -1)
  90. x = self.norm(x)
  91. x = torch.transpose(x, -2, -1)
  92. x = self.activation(x)
  93. x = self.drop(x)
  94. x = self.downsample(x)
  95. return x
  96. class UpConvBlock(nn.Module):
  97. def __init__(self, scale, **args):
  98. super(UpConvBlock, self).__init__()
  99. self.conv_block = ConvBlock(**args)
  100. self.upsample = nn.Upsample(scale_factor=scale, mode="linear", align_corners=False)
  101. def forward(self, x):
  102. x = self.conv_block(x)
  103. x = self.upsample(x)
  104. return x
  105. class AutoEncoder1D_Artur(nn.Module):
  106. """
  107. This is implementation of AutoEncoder1D model for time serias regression
  108. decoder_reduce -size of reducing parameter on decoder stage. We do not want use a lot of features here.
  109. """
  110. def __init__(
  111. self,
  112. n_electrodes=30,
  113. n_freqs=16,
  114. n_channels_out=21,
  115. channels=[8, 16, 32, 32],
  116. kernel_sizes=[3, 3, 3],
  117. strides=[4, 4, 4],
  118. dilation=[1, 1, 1],
  119. decoder_reduce=1,
  120. hidden_channels=5,
  121. dropout_rate=0.3):
  122. super(AutoEncoder1D_Artur, self).__init__()
  123. self.n_electrodes = n_electrodes
  124. self.n_freqs = n_freqs
  125. self.n_inp_features = n_freqs*n_electrodes
  126. self.n_channels_out = n_channels_out
  127. self.model_depth = len(channels)-1
  128. self.artur_block = ArturBlock(
  129. in_channels=self.n_electrodes, hidden_channels=hidden_channels)
  130. self.spatial_reduce = ConvBlock(
  131. self.artur_block.HIDDEN_CHANNELS, channels[0], kernel_size=3, p_conv_drop=dropout_rate)
  132. # create downsample blcoks in Sequentional manner.
  133. self.downsample_blocks = nn.ModuleList([ConvBlock(channels[i],
  134. channels[i + 1],
  135. kernel_sizes[i],
  136. stride=strides[i],
  137. dilation=dilation[i],
  138. p_conv_drop=dropout_rate) for i in range(self.model_depth)])
  139. # make the same but in another side w/o last conv.
  140. channels = [ch // decoder_reduce for ch in channels[:-1]] + channels[-1:]
  141. # channels
  142. self.upsample_blocks = nn.ModuleList([UpConvBlock(scale=strides[i],
  143. in_channels=channels[i + 1],
  144. out_channels=channels[i],
  145. kernel_size=kernel_sizes[i]) for i in range(self.model_depth - 1, -1, -1)])
  146. self.conv1x1_one = nn.Conv1d(channels[0], self.n_channels_out, kernel_size=1, padding="same")
  147. def forward(self, x):
  148. """
  149. """
  150. batch, elec, time = x.shape
  151. x = self.artur_block(x)
  152. x = self.spatial_reduce(x)
  153. # encode information
  154. for i in range(self.model_depth):
  155. x = self.downsample_blocks[i](x)
  156. for i in range(self.model_depth):
  157. x = self.upsample_blocks[i](x)
  158. x = self.conv1x1_one(x)
  159. return x
  160. class AutoEncoder1D_Artur_MultiHead(nn.Module):
  161. """
  162. This is implementation of AutoEncoder1D model for time serias regression
  163. decoder_reduce -size of reducing parameter on decoder stage. We do not want use a lot of features here.
  164. """
  165. def __init__(self, dict_setting):
  166. super(AutoEncoder1D_Artur_MultiHead, self).__init__()
  167. dict_setting_new = dict_setting.copy()
  168. self.n_channels_out = dict_setting_new["n_channels_out"]
  169. dict_setting_new.pop("n_channels_out")
  170. dropout_rate = dict_setting_new.pop("dropout_rate", 0.3) # Default to 0.3 if not set
  171. # print('HOW: ', dict_setting)
  172. self.models = nn.ModuleList(
  173. [
  174. AutoEncoder1D_Artur(n_channels_out=1, dropout_rate=dropout_rate, **dict_setting_new)
  175. for i in range(self.n_channels_out)
  176. ])
  177. # print('HUI', len(self.models))
  178. def forward(self, x):
  179. """
  180. """
  181. batch, elec, time = x.shape
  182. preds = [model(x) for model in self.models]
  183. preds = torch.cat(preds, dim=1)
  184. return preds

autoencoder_new_ArturNH.py at commit 22671dc, no license · at the source

Overview

  1. Department of Neurology, Max Planck Institute for Human Cognitive & Brain Sciences, Leipzig, Germany
  2. Center for Psychiatry, Justus Liebig University, Giessen, Germany
  3. Department of Medicine, University of Helsinki, Helsinki, Finland
  4. University of Applied Sciences Jena, Jena, Germany
  5. IMPRS CoNI, Max Planck Research School on Cognitive NeuroImaging, Leipzig, Germany
  6. Neural Data Science and Statistical Computing Group, Max Planck Institute for Human Cognitive and Brain Sciences, Leipzig, Germany
  7. Center for Scalable Data Analytics and Artificial Intelligence (ScaDS.AI), Dresden/Leipzig, Germany
  8. Translational Psychiatry Unit, Department of Psychiatry and Psychotherapy, University Hospital Schleswig-Holstein, Lübeck, Germany
Journal: Imaging neuroscience (Cambridge, Mass.), volume 4, article IMAG.a.1160
Dates: received 16 July 2025; accepted 8 February 2026; published online 9 March 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1162/imag.a.1160 · PMID 41816006 · PMCID PMC12973074 · OpenAlex W7129453308
Open access: diamond, a free copy (OpenAlex)
Status: code verified
Categories: EEG (modality), fMRI (modality), human (organism), cognitive (subfield)
Methods: Connectivity, Statistics, Smoothing, state filtering, decompositions, Machine learning, Preprocessing, fMRI & imaging, Evoked potentials
Keywords: EEG–fMRI, deep learning, reward processing, ventral striatum, neurofeedback
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) (project number 222641018 — SFB/TRR 135); LOEWE program of the Hessian Ministry of Science and Arts (LOEWE1/16/519/03/09.001[0009]/98); Max Planck Society; BMBF (Federal Ministry of Education and Research) through the Center for Scalable Data Analytics and Artificial Intelligence (ScaDS.AI); European Union and the Free State of Saxony through BIOWIN; BMBF (Federal Ministry of Education and Research) through ACONITE (01IS22065)
Citations: not cited yet (Europe PMC); 69 references in the paper

Abstract

Reward processing is critical for motivation, learning, and decision making. It involves a network centered on the fronto-striatal circuit, with the ventral striatum (VS) playing a pivotal role. While functional magnetic resonance imaging (fMRI) has been instrumental in mapping subcortical VS reward signals, its cost and limited accessibility hinder broader clinical applications. In this study, we adapted a convolutional autoencoder deep learning (DL) model to reconstruct VS blood-oxygen-level-dependent (BOLD) activity from task-based electroencephalography (EEG) data, both recorded during a two-choice gambling task known to elicit reward-related activation in the VS. The model was trained on consecutive EEG–fMRI data from 19 healthy participants, allowing it to identify patterns that generalize across individuals. Results show that the DL model significantly outperforms linear baseline models in predicting VS activity: across leave-one-out folds, the mean correlation between the DL-derived and the ground truth VS BOLD signal was r¯=0.323, compared with r¯=0.213 for the linear model. Further validation confirmed that the DL-derived signal is anatomically specific to the VS and other reward-related areas, and that it is modulated by reward conditions, indicating its functional validity. EEG feature analyses revealed theta to beta frequency band involvement, particularly in right centroparietal and temporal, as well as frontal electrodes. Although the model’s generalization performance was modest, these findings demonstrate the feasibility of decoding subcortical reward-related signals from surface EEG using interpretable deep learning models. This work contributes to the foundation for EEG-based neurofeedback systems aimed at modulating subcortical reward circuits, with potential clinical applications for disorders characterized by impairments in these circuits. Future improvements in model generalization may be achieved by training on larger and more diverse datasets.

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 4 matches between paragraphs and lines of code.

naherzog/DLEEGfMRI

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 22671dc7494b23ec546c6bb2ee515ccbd663af66, 12 December 2025
Languages: Python (6)
Size: 13 files, 6 scripts
Software Heritage: not archived
Found in: “Data and Code Availability”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (5 files), PyTorch (5 files), pandas (3 files), Matplotlib (2 files), MNE-Python (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
7 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;
  • 6 scripts, each with its path and the digest of its content;
  • 4 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 and Code Availability

The pre-processed data, the codes used to train and evaluate the model, and the final weights are available here: https://github.com/naherzog/DLEEGfMRI. Requests for raw EEG or fMRI data will be evaluated individually and must comply with local regulations and the requirements of German authorities.

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, 30 September 2026: the first record

Recorded: type, language, journal, volume, pages, dates, 8 authors, 5 keywords, 6 funders, 67 references.

Cite

This paper

Herzog, N., Vähäsarja, L., Reinfeld, P., Scherf, N., Hofmann, S. M., Andreou, C., Villringer, A., & Mulert, C. (2026). From surface to depth: Using deep learning to predict striatal fMRI reward signaling from EEG. Imaging neuroscience (Cambridge, Mass.), 4, IMAG.a.1160. https://doi.org/10.1162/imag.a.1160

BibTeX

@article{herzog2026surface,
author = {Herzog, Nadine and Vähäsarja, Luka and Reinfeld, Pia and Scherf, Nico and Hofmann, Simon M. and Andreou, Christina and Villringer, Arno and Mulert, Christoph},
title = {{From surface to depth: Using deep learning to predict striatal fMRI reward signaling from EEG}},
journal = {Imaging neuroscience (Cambridge, Mass.)},
year = {2026},
month = mar,
volume = {4},
pages = {IMAG.a.1160},
publisher = {MIT Press},
issn = {2837-6056},
doi = {10.1162/imag.a.1160},
url = {https://doi.org/10.1162/imag.a.1160},
pmid = {41816006},
pmcid = {PMC12973074}
}

RIS

TY - JOUR
AU - Herzog, Nadine
AU - Vähäsarja, Luka
AU - Reinfeld, Pia
AU - Scherf, Nico
AU - Hofmann, Simon M.
AU - Andreou, Christina
AU - Villringer, Arno
AU - Mulert, Christoph
TI - From surface to depth: Using deep learning to predict striatal fMRI reward signaling from EEG
T2 - Imaging neuroscience (Cambridge, Mass.)
J2 - Imaging Neurosci (Camb)
PY - 2026
DA - 2026/03/09
VL - 4
SP - IMAG.a.1160
SN - 2837-6056
PB - MIT Press
DO - 10.1162/imag.a.1160
UR - https://doi.org/10.1162/imag.a.1160
LA - en
ER -

CSL-JSON

{
"id": "10.1162/imag.a.1160",
"type": "article-journal",
"title": "From surface to depth: Using deep learning to predict striatal fMRI reward signaling from EEG",
"container-title": "Imaging neuroscience (Cambridge, Mass.)",
"author": [
{
"family": "Herzog",
"given": "Nadine"
},
{
"family": "Vähäsarja",
"given": "Luka"
},
{
"family": "Reinfeld",
"given": "Pia"
},
{
"family": "Scherf",
"given": "Nico"
},
{
"family": "Hofmann",
"given": "Simon M."
},
{
"family": "Andreou",
"given": "Christina"
},
{
"family": "Villringer",
"given": "Arno"
},
{
"family": "Mulert",
"given": "Christoph"
}
],
"container-title-short": "Imaging Neurosci (Camb)",
"volume": "4",
"page": "IMAG.a.1160",
"DOI": "10.1162/imag.a.1160",
"PMID": "41816006",
"PMCID": "PMC12973074",
"ISSN": "2837-6056",
"publisher": "MIT Press",
"URL": "https://doi.org/10.1162/imag.a.1160",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
9
]
]
}
}

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.105 [code]
Right posterior theta reflects human parahippocampal phase resetting by salient cues during goal-directed navigation
Journal: n/a
In common: MNE-Python, pandas, Matplotlib, 1 other tool, fMRI, EEG, cognitive, 2 references
[2] doi:10.1002/hbm.70562 [code]
Distinct Physiological Mechanisms Drive Grey Matter Plasticity in Complex Versus Simple Sequence Learning.
Journal: Human brain mapping
In common: pandas, Matplotlib, NumPy, author A. Villringer
[3] doi:10.1371/journal.pone.0351872 [code]
Decoding visual object recognition from EEG signals.
Journal: PloS one
In common: MNE-Python, PyTorch, pandas, 2 other tools, EEG, 1 reference
[4] doi:10.7554/elife.100056 [code]
Multi-talker speech comprehension at different temporal scales in listeners with normal and impaired hearing.
Journal: eLife
In common: MNE-Python, PyTorch, pandas, 1 other tool, EEG, cognitive, 1 reference
[5] doi:10.1162/imag.a.1174 [code]
Retinal nerve fibre layer thickness reflects characteristics of brain grey and white matter.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Matplotlib, NumPy, author A. Villringer
[6] doi:10.1016/j.neuroimage.2026.122051 [code]
Determining hemispheric language dominance from MEG beta-power modulations: Concordance with fMRI.
Journal: NeuroImage
In common: MNE-Python, pandas, Matplotlib, 1 other tool, fMRI, cognitive, 1 reference
[7] doi:10.1038/s41597-025-05174-7 [code]
A large-scale MEG and EEG dataset for object recognition in naturalistic scenes
Journal: n/a
In common: MNE-Python, PyTorch, pandas, 2 other tools, fMRI, EEG
[8] doi:10.1162/imag.a.1169 [code]
Diazepam alters the shape of alpha oscillations recorded from human cortex using EEG.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: MNE-Python, pandas, Matplotlib, 1 other tool, EEG, 1 reference
[9] doi:10.1162/imag.a.1207 [code]
Investigating the temporal dynamics and modeling of mid-level feature representations in humans.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: MNE-Python, PyTorch, pandas, 2 other tools, EEG, cognitive
[10] doi:10.1002/hbm.70528 [code]
Explainable AI Insights Into EEG Classification and Its Alignment to Neural Correlates.
Journal: Human brain mapping
In common: MNE-Python, PyTorch, pandas, 2 other tools, EEG, cognitive

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.